* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --accent-blue: #3b82f6;
    --accent-blue-dark: #2563eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Login Screen */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Dashboard Layout */
.dashboard-screen {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.admin-info h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.role {
    display: inline-block;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 4px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s;
    font-size: 14px;
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-blue);
    color: white;
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 600;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--accent-color, var(--accent-blue));
    opacity: 0.1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--accent-color, var(--accent-blue));
    position: absolute;
    opacity: 1;
}

.stat-info h3 {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
}

/* Forms */
.form-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.form-card h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.form-card h3 {
    font-size: 18px;
    margin-bottom: 16px;
}

.form-description {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    background: var(--bg-primary);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: white;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--accent-blue-dark);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Rates Grid */
.rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

/* Messages */
.message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    display: block;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    display: block;
}

.rate-message {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    display: none;
}

.rate-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    display: block;
}

.rate-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    display: block;
}

.error-message {
    margin-top: 12px;
    color: #991b1b;
    font-size: 14px;
    display: none;
}

.error-message.show {
    display: block;
}

.info-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.info-card h2 {
    font-size: 24px;
    margin-bottom: 16px;
}

.info-card p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-card li:last-child {
    border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-screen {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .main-content {
        padding: 16px;
    }

    .stats-grid,
    .rates-grid {
        grid-template-columns: 1fr;
    }
}

