/**
 * Traffic Empire v10.7.0
 * Modern Ad-Network Design System
 */

:root {
    --bg-base: #09090b;
    --bg-surface: #111113;
    --bg-elevated: #1a1a1e;
    --bg-card: #111113;
    --primary: #E5FF00;
    --primary-hover: #D4EB00;
    --primary-glow: rgba(229, 255, 0, 0.4);
    --primary-subtle: rgba(229, 255, 0, 0.08);
    --secondary: #FF007F;
    --secondary-hover: #E60073;
    --secondary-glow: rgba(255, 0, 127, 0.4);
    --secondary-subtle: rgba(255, 0, 127, 0.08);
    --accent: #00FF66;
    --accent-glow: rgba(0, 255, 102, 0.3);
    --cyan: #00E5FF;
    --text: #FAFAFA;
    --text-muted: #a1a1aa;
    --text-dim: #71717a;
    --text-faint: #3f3f46;
    --border: rgba(255,255,255,0.08);
    --border-light: rgba(255,255,255,0.04);
    --border-color: rgba(255,255,255,0.08);
    --card-bg: #111113;
    --bg-darker: #09090b;
    --text-primary: #FAFAFA;
    --neutral-800: #18181b;
    --error: #ef4444;
    --success: #22c55e;
    --warning: #eab308;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== LIGHT THEME ==================== */
[data-theme="light"] {
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-elevated: #f1f5f9;
    --bg-card: #ffffff;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-glow: rgba(37, 99, 235, 0.25);
    --primary-subtle: rgba(37, 99, 235, 0.06);
    --secondary: #dc2626;
    --secondary-hover: #b91c1c;
    --secondary-glow: rgba(220, 38, 38, 0.2);
    --secondary-subtle: rgba(220, 38, 38, 0.06);
    --accent: #16a34a;
    --accent-glow: rgba(22, 163, 74, 0.2);
    --cyan: #0891b2;
    --text: #0f172a;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    --text-faint: #cbd5e1;
    --border: rgba(0,0,0,0.08);
    --border-light: rgba(0,0,0,0.04);
    --border-color: rgba(0,0,0,0.08);
    --card-bg: #ffffff;
    --bg-darker: #f1f5f9;
    --text-primary: #0f172a;
    --neutral-800: #f1f5f9;
    --error: #dc2626;
    --success: #16a34a;
    --warning: #ca8a04;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
}
[data-theme="light"] .topbar-logo-icon { background: var(--primary); color: #FFFFFF; }
[data-theme="light"] .sidebar-avatar { background: var(--primary); color: #FFFFFF; }
[data-theme="light"] .sidebar-section { border-bottom-color: rgba(0,0,0,0.05); }
[data-theme="light"] .sidebar-section-toggle:hover { background: rgba(0,0,0,0.04); }
[data-theme="light"] .sidebar-link:hover { background: rgba(0,0,0,0.04); }
[data-theme="light"] .sidebar-link.active { background: rgba(26, 115, 232, 0.08); }
[data-theme="light"] .card { box-shadow: 0 1px 3px rgba(0,0,0,0.08); border-color: var(--border); }
[data-theme="light"] .card:hover { border-color: var(--primary); box-shadow: 0 2px 12px rgba(26, 115, 232, 0.15); }
[data-theme="light"] .btn-primary { color: #FFFFFF; }
[data-theme="light"] .sidebar-overlay { background: rgba(0,0,0,0.3); }
[data-theme="light"] input, [data-theme="light"] textarea, [data-theme="light"] select {
    background: var(--bg-surface);
    border-color: var(--border);
    color: var(--text);
}
[data-theme="light"] .auth-card { box-shadow: 0 4px 24px rgba(0,0,0,0.08); }
[data-theme="light"] .topbar-badge { background: var(--error); }
[data-theme="light"] .stat-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 0.85rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}
.theme-toggle:hover { color: var(--text); border-color: var(--primary); }

/* ==================== GLOBAL RESET ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-base);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    letter-spacing: -0.025em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s;
}

a:hover { text-decoration: underline; }

::selection {
    background-color: var(--primary);
    color: #000;
}

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

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ==================== TOPBAR ==================== */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 14px;
    z-index: 1001;
}
.topbar-admin { border-bottom-color: rgba(255, 0, 127, 0.2); }

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 6px;
    line-height: 1;
    display: none;
}
.sidebar-toggle:hover { color: var(--text); }

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.topbar-logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}
.topbar-logo-text {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text);
    letter-spacing: -0.03em;
}
.topbar-logo-text span { color: var(--primary); }
.topbar-admin .topbar-logo-text span { color: var(--secondary); }

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}
.topbar-icon {
    position: relative;
    color: var(--text-dim);
    font-size: 1.1rem;
    padding: 5px;
    text-decoration: none;
    transition: color 0.2s;
}
.topbar-icon:hover { color: var(--text); text-decoration: none; }
.topbar-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    background: var(--error);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 1px 4px;
    line-height: 1.2;
}
.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
}
.topbar-credits {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
}
.topbar-credits small { color: var(--text-dim); font-weight: 400; }
.topbar-level {
    background: var(--secondary-subtle);
    color: var(--secondary);
    padding: 3px 8px;
    font-weight: 600;
    font-size: 0.75rem;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: 260px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); }

.sidebar-admin { border-right-color: rgba(255, 0, 127, 0.2); }

.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid var(--border);
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}
.sidebar-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.sidebar-username {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
}
.sidebar-role {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    padding: 8px 0;
}

.sidebar-section { border-bottom: 1px solid rgba(255,255,255,0.03); }

.sidebar-section-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.2s;
}
.sidebar-section-toggle:hover { color: var(--text); background: rgba(255,255,255,0.02); }
.sidebar-section-icon { font-size: 0.9rem; width: 20px; text-align: center; }
.sidebar-section-label { flex: 1; text-align: left; }
.sidebar-chevron {
    font-size: 0.7rem;
    transition: transform 0.2s;
}
.sidebar-section.open .sidebar-chevron { transform: rotate(180deg); }

.sidebar-section-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}
.sidebar-section.open .sidebar-section-items {
    max-height: 2000px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px 9px 30px;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-decoration: none;
    transition: all var(--transition);
    border-left: 2px solid transparent;
    border-radius: 0;
}
.sidebar-link:hover {
    color: var(--text);
    background: rgba(255,255,255,0.04);
    text-decoration: none;
}
.sidebar-link.active {
    color: var(--primary);
    background: var(--primary-subtle);
    border-left-color: var(--primary);
    font-weight: 600;
}
.sidebar-link-icon { width: 18px; text-align: center; font-size: 0.85rem; }
.sidebar-link-badge {
    margin-left: auto;
    background: var(--error);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    min-width: 18px;
    text-align: center;
    border-radius: 10px;
}

.sidebar-admin-link,
.sidebar-logout-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.sidebar-admin-link:hover,
.sidebar-logout-link:hover { background: rgba(255,255,255,0.03); text-decoration: none; }
.sidebar-logout-link { color: var(--text-dim); }
.sidebar-logout-link:hover { color: var(--error); }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999;
}

/* ==================== MAIN CONTENT (with sidebar) ==================== */
.main-content.has-sidebar {
    margin-left: 260px;
    margin-top: 56px;
    min-height: calc(100vh - 56px);
    padding: 32px 40px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .sidebar-toggle { display: block; }
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-overlay.open { display: block; }
    .main-content.has-sidebar {
        margin-left: 0;
    }
}

@media (max-width: 640px) {
    .topbar { padding: 0 10px; gap: 8px; }
    .topbar-logo-text { font-size: 0.75rem; }
    .topbar-credits { font-size: 0.75rem; }
    .topbar-level { font-size: 0.65rem; padding: 2px 6px; }
    .main-content.has-sidebar { padding: 20px 15px; }
    .sidebar { width: 280px; }
}

/* HIDE OLD NAVBAR (backwards compat) */
.navbar { display: none !important; }
.navbar-menu { display: none !important; }
.navbar-right { display: none !important; }
.mobile-hamburger { display: none !important; }

/* ==================== AUTH PAGES ==================== */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: var(--bg-base);
}

.auth-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 48px;
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    text-align: center;
    margin-bottom: 36px;
}

.auth-logo-icon {
    width: 52px;
    height: 52px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 1.5rem;
}

.auth-logo h1 {
    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.auth-logo h1 span { color: var(--primary); }

.auth-card h2 {
    text-align: center;
    margin-bottom: 28px;
    font-size: 1.2rem;
    font-weight: 600;
}

.auth-form { margin-bottom: 24px; }

.auth-link {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==================== FORMS ==================== */
.form-group { margin-bottom: 20px; }

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="search"],
input[type="date"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 0.875rem;
    transition: all var(--transition);
}

select option {
    background: var(--bg-elevated);
    color: var(--text);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-subtle);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-dim);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

select { cursor: pointer; }

/* Number-Input Spinner sichtbar machen (Dark Theme) */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    filter: invert(1);
    cursor: pointer;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-1px);
    text-decoration: none;
}

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

.btn-secondary {
    background: var(--secondary);
    color: #fff;
}

.btn-secondary:hover {
    background: var(--secondary-hover);
    box-shadow: 0 0 16px var(--secondary-glow);
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-subtle);
    text-decoration: none;
}

.btn-success { background: var(--success); color: #000; border-radius: var(--radius-sm); }
.btn-danger { background: var(--error); color: #fff; border-radius: var(--radius-sm); }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 0.78rem; }

/* ==================== ALERTS ==================== */
.alert {
    padding: 14px 18px;
    margin-bottom: 20px;
    border: 1px solid;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    line-height: 1.5;
}

.alert-error {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.alert-success {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.alert-warning {
    background: rgba(234, 179, 8, 0.08);
    border-color: rgba(234, 179, 8, 0.2);
    color: var(--warning);
}

.alert-info {
    background: rgba(0, 229, 255, 0.06);
    border-color: rgba(0, 229, 255, 0.15);
    color: var(--cyan);
}

/* ==================== CARDS ==================== */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
    border-color: rgba(255,255,255,0.12);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    letter-spacing: -0.02em;
}

/* Card Neon variant */
.card-neon {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.card-neon:hover {
    border-color: rgba(229, 255, 0, 0.2);
}

/* ==================== STATS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
}

.stat-card:hover {
    border-color: rgba(255,255,255,0.12);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-value {
    font-family: inherit;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.stat-value.primary { color: var(--primary); }
.stat-value.secondary { color: var(--secondary); }
.stat-value.accent { color: var(--accent); }
.stat-value.cyan { color: var(--cyan); }

/* ==================== GLOW TEXT ==================== */
.glow-text { }
.glow-primary { color: var(--primary); }
.glow-secondary { color: var(--secondary); }
.glow-accent { color: var(--accent); }

/* ==================== PROGRESS ==================== */
.progress {
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 3px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ==================== XP BAR ==================== */
.xp-container {
    margin-bottom: 24px;
    padding: 20px;
}

.xp-bar {
    height: 8px;
    background: var(--bg-elevated);
    border-radius: 4px;
    overflow: hidden;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    border-radius: 4px;
    transition: width 0.5s ease;
    background-size: 200% 100%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.xp-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.xp-level {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.95rem;
}

.xp-text { color: var(--text-muted); font-size: 0.85rem; }

/* ==================== TABLES ==================== */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.table th {
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.table tr:hover td {
    background: rgba(255,255,255,0.02);
}

/* ==================== BADGES ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 20px;
}

.badge-pending { background: rgba(234, 179, 8, 0.1); color: var(--warning); border: 1px solid rgba(234, 179, 8, 0.2); }
.badge-approved { background: rgba(34, 197, 94, 0.1); color: var(--success); border: 1px solid rgba(34, 197, 94, 0.2); }
.badge-rejected { background: rgba(239, 68, 68, 0.1); color: var(--error); border: 1px solid rgba(239, 68, 68, 0.2); }

/* ==================== AD DELIVERY ==================== */
.surfbar-container {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

.surfbar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.surfbar-timer {
    font-family: inherit;
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
}

.surfbar-reward { text-align: right; }
.surfbar-reward .credits { color: var(--primary); font-weight: 600; font-size: 1.1rem; }
.surfbar-reward .xp { color: var(--secondary); font-size: 0.9rem; }

.surfbar-progress {
    height: 6px;
    background: var(--neutral-800);
    margin-bottom: 25px;
    overflow: hidden;
}

.surfbar-progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width 1s linear;
    box-shadow: 0 0 10px var(--accent-glow);
}

.surfbar-site {
    background: var(--bg-elevated);
    padding: 20px;
    margin-bottom: 20px;
    border-left: 3px solid var(--cyan);
}

.surfbar-site-title { font-weight: 600; margin-bottom: 5px; }
.surfbar-site-url { color: var(--cyan); font-size: 0.9rem; }

.surfbar-iframe {
    width: 100%;
    height: 500px;
    border: 1px solid var(--border);
    background: #fff;
}

.surfbar-controls { display: flex; gap: 10px; }

/* ==================== FOOTER ==================== */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 40px 32px 20px;
    background: var(--bg-surface);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 24px;
}

.footer-brand .footer-logo {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text);
}

.footer-brand .footer-logo span { color: var(--primary); }

.footer-desc {
    color: var(--text-dim);
    font-size: 0.82rem;
    margin-top: 8px;
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.footer-links a {
    display: block;
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* ==================== COOKIE BANNER ==================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 20px 30px;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.5);
}

.cookie-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex: 1;
    min-width: 200px;
}

.cookie-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cookie-link {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: underline;
}

.cookie-link:hover { color: var(--primary); }

.cookie-accept {
    white-space: nowrap;
}

/* ==================== LEGAL PAGES ==================== */
.legal-content {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

.legal-content h2 {
    font-size: 2rem;
    margin-bottom: 25px;
    color: var(--primary);
}

.legal-content h3 {
    font-size: 1.3rem;
    margin: 30px 0 15px;
    color: var(--text);
}

.legal-content h4 {
    font-size: 1.1rem;
    margin: 20px 0 10px;
    color: var(--text-muted);
}

.legal-content p {
    color: var(--text-muted);
    margin-bottom: 15px;
}

.legal-content ul, .legal-content ol {
    color: var(--text-muted);
    margin: 10px 0 15px 25px;
}

.legal-content li {
    margin-bottom: 8px;
}

/* ==================== CHECKBOX ==================== */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-group label {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0;
    cursor: pointer;
    line-height: 1.5;
}

.checkbox-group label a {
    color: var(--primary);
    text-decoration: underline;
}

/* ==================== ADMIN CMS ==================== */
.cms-editor {
    margin-bottom: 25px;
}

.cms-editor label {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 5px;
}

.cms-editor .cms-desc {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 10px;
}

.cms-editor textarea {
    min-height: 200px;
    font-size: 0.9rem;
}

.cms-editor.cms-small textarea {
    min-height: 60px;
}

.cms-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.cms-tabs a {
    padding: 8px 16px;
    font-size: 0.82rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition);
}

.cms-tabs a:hover, .cms-tabs a.active {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-subtle);
    text-decoration: none;
}

/* ==================== GRID HELPERS ==================== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ==================== UTILITY CLASSES ==================== */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-accent { color: var(--accent) !important; }
.text-cyan { color: var(--cyan) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-dim { color: var(--text-dim) !important; }
.text-error { color: var(--error) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.1rem; }
.text-xl { font-size: 1.3rem; }
.text-2xl { font-size: 1.6rem; }
.font-bold { font-weight: 700; }
.font-display { font-family: 'Inter', sans-serif; font-weight: 800; letter-spacing: -0.03em; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.p-0 { padding: 0 !important; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* ==================== PAGINATION ==================== */
.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 25px;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    transition: all var(--transition);
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}

.pagination .active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    font-weight: 600;
}

/* ==================== ANIMATIONS ==================== */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px currentColor; }
    50% { box-shadow: 0 0 20px currentColor; }
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fade-in 0.3s ease-out;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .navbar { padding: 0 15px; }
    .navbar .container { flex-wrap: wrap; height: auto; padding: 15px 0; }
    .navbar-menu { 
        order: 3; 
        width: 100%; 
        justify-content: center; 
        margin-top: 15px; 
        flex-wrap: wrap;
        gap: 0;
    }
    .nav-link { padding: 8px 12px; font-size: 0.82rem; }
    .main-content { padding: 20px 16px; }
    .main-content.has-sidebar { margin-left: 0; padding: 16px; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-value { font-size: 1.4rem; }
    .surfbar-timer { font-size: 2.5rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
    .cookie-inner { flex-direction: column; text-align: center; }
    .cookie-actions { justify-content: center; }
    .page-header h1 { font-size: 1.25rem; }
}

/* ==================== FORUM THREAD ==================== */
.forum-post {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 14px;
    transition: border-color var(--transition);
}

.forum-post:hover {
    border-color: rgba(255,255,255,0.12);
}

/* ==================== TABS ==================== */
.tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.tab {
    padding: 10px 18px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab:hover {
    color: var(--text);
    text-decoration: none;
}

.tab.active {
    color: var(--text);
    border-bottom-color: var(--secondary);
}

/* ==================== TOOLTIP ==================== */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.78rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    z-index: 100;
}

.tooltip:hover::after {
    opacity: 1;
}


/* ==================== v10.5 PAGE LAYOUT SYSTEM ==================== */
.page-header {
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.page-header h1 {
    font-size: 1.5rem;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}
.page-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title .section-icon {
    font-size: 1.1rem;
}
.section-title .section-badge {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    background: var(--primary-subtle);
    color: var(--primary);
}

/* Improved Card with clearer hierarchy */
.card-v2 {
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 24px;
    margin-bottom: 20px;
    transition: border-color 0.2s;
}
.card-v2:hover {
    border-color: rgba(229, 255, 0, 0.2);
}
.card-v2 .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.card-v2 .card-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
}

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .page-header h1 { font-size: 1.25rem; }
}

/* Stat widgets - cleaner */
.stat-widget {
    text-align: center;
    padding: 20px 16px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: border-color 0.2s, transform 0.15s;
}
.stat-widget:hover {
    border-color: rgba(229, 255, 0, 0.2);
    transform: translateY(-1px);
}
.stat-widget .stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
}
.stat-widget .stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.stat-widget .stat-sub {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 2px;
}

/* Status pill */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.4;
}
.status-pill.active { background: rgba(0,255,102,0.1); color: #00FF66; border: 1px solid rgba(0,255,102,0.2); }
.status-pill.pending { background: rgba(255,234,0,0.1); color: #FFEA00; border: 1px solid rgba(255,234,0,0.2); }
.status-pill.rejected { background: rgba(255,0,51,0.1); color: #FF0033; border: 1px solid rgba(255,0,51,0.2); }
.status-pill.paused { background: rgba(255,170,0,0.1); color: #FFAA00; border: 1px solid rgba(255,170,0,0.2); }
.status-pill.draft { background: rgba(136,136,136,0.1); color: #888; border: 1px solid rgba(136,136,136,0.2); }

/* Better tables */
.table-v2 {
    width: 100%;
    border-collapse: collapse;
}
.table-v2 thead th {
    padding: 10px 12px;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}
.table-v2 tbody td {
    padding: 12px;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    vertical-align: middle;
}
.table-v2 tbody tr:hover {
    background: rgba(229,255,0,0.02);
}

/* Action buttons row */
.action-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.empty-state .empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.5;
}
.empty-state h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text);
}
.empty-state p {
    font-size: 0.85rem;
    max-width: 400px;
    margin: 0 auto 16px;
}

/* Info/hint boxes */
.hint-box {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.82rem;
    line-height: 1.6;
    margin-bottom: 20px;
}
.hint-info { background: rgba(0,170,255,0.06); border: 1px solid rgba(0,170,255,0.15); color: var(--text-muted); }
.hint-success { background: rgba(0,255,102,0.06); border: 1px solid rgba(0,255,102,0.15); color: var(--text-muted); }
.hint-warning { background: rgba(255,234,0,0.06); border: 1px solid rgba(255,234,0,0.15); color: var(--text-muted); }
.hint-error { background: rgba(255,0,51,0.06); border: 1px solid rgba(255,0,51,0.15); color: var(--text-muted); }
