/* =========================================================================
   EarnHub Design System - Mobile-First, Accessible, Light & Dark Mode
   ========================================================================= */
:root {
    --eh-primary: #0f766e;
    --eh-primary-hover: #115e59;
    --eh-secondary: #0f172a;
    --eh-accent: #d97706;
    --eh-bg: #f8fafc;
    --eh-surface: #ffffff;
    --eh-surface-alt: #f1f5f9;
    --eh-text: #0f172a;
    --eh-text-muted: #475569;
    --eh-border: #e2e8f0;
    --eh-success: #15803d;
    --eh-warning: #b45309;
    --eh-danger: #b91c1c;
    --eh-info: #0369a1;
    --eh-radius: 0.625rem;
    --eh-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] {
    --eh-primary: #14b8a6;
    --eh-primary-hover: #0d9488;
    --eh-secondary: #f8fafc;
    --eh-accent: #f59e0b;
    --eh-bg: #0b1120;
    --eh-surface: #1e293b;
    --eh-surface-alt: #0f172a;
    --eh-text: #f8fafc;
    --eh-text-muted: #94a3b8;
    --eh-border: #334155;
    --eh-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--eh-bg);
    color: var(--eh-text);
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--eh-primary);
    text-decoration: none;
}
a:hover {
    color: var(--eh-primary-hover);
    text-decoration: underline;
}

.navbar-earnhub {
    background-color: var(--eh-surface);
    border-bottom: 1px solid var(--eh-border);
    box-shadow: var(--eh-shadow);
}

.eh-card {
    background-color: var(--eh-surface);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius);
    box-shadow: var(--eh-shadow);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.eh-stat-card {
    background-color: var(--eh-surface);
    border: 1px solid var(--eh-border);
    border-left: 4px solid var(--eh-primary);
    border-radius: var(--eh-radius);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--eh-shadow);
    height: 100%;
}

.eh-stat-card .stat-label {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--eh-text-muted);
    margin-bottom: 0.35rem;
}

.eh-stat-card .stat-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--eh-text);
    margin-bottom: 0.15rem;
}

.btn-eh-primary {
    background-color: var(--eh-primary);
    color: #ffffff !important;
    border: 1px solid var(--eh-primary);
    font-weight: 600;
    padding: 0.5rem 1.1rem;
    border-radius: 0.5rem;
    display: inline-block;
    text-decoration: none !important;
}
.btn-eh-primary:hover {
    background-color: var(--eh-primary-hover);
    border-color: var(--eh-primary-hover);
}

.btn-eh-outline {
    background-color: transparent;
    color: var(--eh-primary) !important;
    border: 1px solid var(--eh-primary);
    font-weight: 600;
    padding: 0.5rem 1.1rem;
    border-radius: 0.5rem;
    display: inline-block;
    text-decoration: none !important;
}
.btn-eh-outline:hover {
    background-color: var(--eh-primary);
    color: #ffffff !important;
}

.eh-badge {
    display: inline-block;
    padding: 0.25em 0.65em;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.eh-badge-success { background-color: #dcfce7; color: #166534; }
.eh-badge-warning { background-color: #fef3c7; color: #92400e; }
.eh-badge-danger  { background-color: #fee2e2; color: #991b1b; }
.eh-badge-info    { background-color: #e0f2fe; color: #075985; }
.eh-badge-neutral { background-color: #f1f5f9; color: #334155; }

.eh-hero {
    background: linear-gradient(135deg, #0f172a 0%, #134e4a 100%);
    color: #ffffff;
    padding: 4rem 0;
}

.eh-sidebar {
    background-color: var(--eh-surface);
    border-right: 1px solid var(--eh-border);
    min-height: calc(100vh - 64px);
    padding: 1.25rem 0.75rem;
}

.eh-sidebar .nav-link {
    color: var(--eh-text);
    padding: 0.6rem 0.9rem;
    border-radius: 0.5rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}
.eh-sidebar .nav-link:hover,
.eh-sidebar .nav-link.active {
    background-color: var(--eh-primary);
    color: #ffffff !important;
}

.table-eh {
    width: 100%;
    border-collapse: collapse;
    color: var(--eh-text);
}
.table-eh th {
    background-color: var(--eh-surface-alt);
    color: var(--eh-text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--eh-border);
}
.table-eh td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--eh-border);
    vertical-align: middle;
}

.form-control, .form-select {
    background-color: var(--eh-surface);
    color: var(--eh-text);
    border: 1px solid var(--eh-border);
}
.form-control:focus, .form-select:focus {
    background-color: var(--eh-surface);
    color: var(--eh-text);
    border-color: var(--eh-primary);
    box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.2);
}

footer.eh-footer {
    background-color: #0f172a;
    color: #cbd5e1;
    margin-top: auto;
    padding: 3rem 0 2rem;
}
footer.eh-footer a {
    color: #94a3b8;
}
footer.eh-footer a:hover {
    color: #ffffff;
}
