:root {
    --accent: #e85d4c;
    --accent-hover: #d14a39;
    --accent-glow: rgba(232, 93, 76, 0.25);
    --surface: #ffffff;
    --surface-2: #f4f6fa;
    --surface-elevated: rgba(255, 255, 255, 0.85);
    --border: rgba(15, 23, 42, 0.08);
    --text: #0f172a;
    --text-muted: #64748b;
    --sidebar: #0c1222;
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    --sidebar-active: rgba(232, 93, 76, 0.15);
}

.dark {
    --surface: #111318;
    --surface-2: #0a0d12;
    --surface-elevated: rgba(17, 19, 24, 0.9);
    --border: rgba(255, 255, 255, 0.07);
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --sidebar: #080b10;
}

body {
    background-color: var(--surface-2);
    color: var(--text);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-glow), transparent),
        linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 48px 48px, 48px 48px;
}

.dark body {
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(232, 93, 76, 0.12), transparent),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

.font-display { font-family: 'Syne', sans-serif; }
.font-body { font-family: 'DM Sans', sans-serif; }

[x-cloak] { display: none !important; }

.glass-card {
    background: var(--surface-elevated);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
}

.dark .glass-card {
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #c94a3a);
    color: white;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.nav-pill {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: all 0.2s;
    color: var(--text-muted);
}

.nav-pill:hover { color: var(--text); background: rgba(15, 23, 42, 0.05); }
.dark .nav-pill:hover { background: rgba(255, 255, 255, 0.06); }

.nav-pill.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 12px var(--accent-glow);
}

.input-modern {
    width: 100%;
    padding: 0.625rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-modern:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.theme-toggle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; }
html:not(.dark) .theme-toggle .icon-sun { display: block; }
html.dark .theme-toggle .icon-moon { display: block; }

.admin-sidebar {
    background: var(--sidebar);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-radius: 0.625rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #94a3b8;
    transition: all 0.15s;
}

.admin-nav-item:hover {
    background: var(--sidebar-hover);
    color: #e2e8f0;
}

.admin-nav-item.active {
    background: var(--sidebar-active);
    color: #fff;
    border-left: 3px solid var(--accent);
    padding-left: calc(1rem - 3px);
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: var(--accent-glow);
    border-radius: 50%;
    filter: blur(30px);
    opacity: 0.5;
}

.report-card {
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem;
    background: var(--surface);
    transition: all 0.2s;
}

.report-card:hover {
    border-color: rgba(232, 93, 76, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

html.dark .report-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.report-card-compact {
    padding: 0.625rem 0.75rem;
    border-radius: 0.75rem;
    border-color: transparent;
    background: transparent;
}

.report-card-compact:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border);
    background: var(--surface-2);
}

.bbcode-btn {
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.375rem;
    border-radius: 0.375rem;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
    transition: all 0.15s;
}

.bbcode-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(232, 93, 76, 0.08);
}

.bbcode-emoji {
    font-size: 0.875rem;
    min-width: 1.625rem;
}

.bbcode-color-red { color: #ef4444; }
.bbcode-color-green { color: #10b981; }
.bbcode-color-blue { color: #3b82f6; }
.bbcode-color-orange { color: #f97316; }
.bbcode-color-purple { color: #a855f7; }

[x-cloak] { display: none !important; }

.admin-content .glass-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.admin-content .input-modern {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #059669;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.dark .alert-success { color: #34d399; }

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #dc2626;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.dark .alert-error { color: #f87171; }

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #d97706;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.dark .alert-warning { color: #fbbf24; }

/* Mobile bottom navigation */
.mobile-bottom-nav {
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.08);
}

.dark .mobile-bottom-nav {
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.4);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.15s;
    padding: 0.25rem;
}

.mobile-nav-item.active {
    color: var(--accent);
}

.mobile-nav-item.mobile-nav-fab {
    color: white;
}

.mobile-nav-item.mobile-nav-fab svg {
    background: linear-gradient(135deg, var(--accent), #c94a3a);
    border-radius: 9999px;
    padding: 0.5rem;
    width: 2.75rem;
    height: 2.75rem;
    margin-top: -0.75rem;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.mobile-nav-item.mobile-nav-fab.active svg {
    box-shadow: 0 0 0 2px var(--accent);
}

.safe-area-pb {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

@media (max-width: 640px) {
    .glass-card {
        border-radius: 0.875rem;
    }

    .input-modern {
        font-size: 16px;
    }
}
