/* Admin Dashboard Styles */
:root {
    --primary-color: #0052cc;
    --secondary-color: #f0f4ff;
    --accent-color: #ff3366;
    --text-color: #333;
    --light-text: #777;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #f5f7fa;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Login Form */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    background-color: #fff;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.form-check-input {
    margin-right: 10px;
}

.form-check-label {
    margin-left: 5px;
    cursor: pointer;
}

/* Network Settings Styles */
.section-subtitle {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary-color);
}

.network-entry {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #f5f7fa;
    position: relative;
    transition: all 0.3s ease;
}

.network-entry:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.network-entry .form-group {
    flex: 1;
    margin-bottom: 0;
}

.network-entry.error {
    border-color: var(--danger-color);
    background-color: rgba(220, 53, 69, 0.05);
}

.network-entry.highlight {
    background-color: rgba(0, 123, 255, 0.05);
    border-color: var(--primary-color);
}

.remove-network {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.remove-network:hover {
    opacity: 1;
    background-color: rgba(220, 53, 69, 0.1);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn:hover {
    background-color: #0046ad;
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.875rem;
}

/* Card Styles */
.card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    background-color: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.card-body {
    padding: 20px;
}

/* Stats Cards */
.stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.stat-label {
    font-size: 1rem;
    color: var(--light-text);
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: var(--secondary-color);
    font-weight: 600;
    color: var(--primary-color);
}

.table tbody tr:hover {
    background-color: #f9f9f9;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

.bg-success {
    background-color: var(--success-color);
    color: white;
}

.bg-warning {
    background-color: var(--warning-color);
    color: #212529;
}

.bg-danger {
    background-color: var(--danger-color);
    color: white;
}

/* Utility Classes */
.d-flex {
    display: flex;
}

.gap-15 {
    gap: 15px;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

/* Search and Filter Container */
.search-filter-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.search-filter-container .form-control,
.search-filter-container .form-select {
    margin-bottom: 0;
}

/* Import/Export Buttons */
.import-export {
    display: flex;
    gap: 10px;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
}

.file-input-label {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.file-input-label:hover {
    background-color: #0046ad;
}

input[type="file"] {
    position: absolute;
    font-size: 100px;
    right: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
}

/* Image Preview */
.image-preview img {
    max-width: 100%;
    max-height: 200px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

/* Transaction Hash Link */
.tx-hash {
    color: var(--primary-color);
    text-decoration: none;
}

.tx-hash:hover {
    text-decoration: underline;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s, transform 0.3s;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.alert-success {
    background-color: var(--success-color);
    color: white;
}

.alert-error {
    background-color: var(--danger-color);
    color: white;
}

.alert-info {
    background-color: var(--primary-color);
    color: white;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .stat-card {
        flex-basis: calc(50% - 20px);
    }
    
    .d-flex {
        flex-direction: column;
    }
    
    .d-flex > .form-group {
        margin-right: 0;
        width: 100%;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid var(--border-color);
    }
    
    .table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        text-align: right;
        border: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .table tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 10px;
        text-align: left;
    }
    
    .import-export {
        flex-direction: column;
        align-items: stretch;
    }
    
    .file-input-wrapper, .import-export button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .network-entry {
        flex-direction: column;
        gap: 10px;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.modal-close {
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
}

.btn-warning {
    background-color: var(--warning-color);
    color: #000;
}

.btn-warning:hover {
    background-color: #e0a800;
}