/* Globales Dark-Theme Styles */

:root {
    --km-surface-950: #0b1220;
    --km-surface-925: #0f1624;
    --km-surface-900: #111827;
    --km-surface-875: #1a1d23;
    --km-surface-850: #1b1e24;
    --km-surface-825: #1f232a;
    --km-surface-800: #1f2937;
    --km-surface-775: #232428;
    --km-surface-760: #23272a;
    --km-surface-750: #2c2f36;
    --km-surface-725: #2d3138;
    --km-surface-720: #2d3139;
    --km-surface-700: #2f3136;
    --km-surface-690: #2f323a;
    --km-surface-675: #30343a;
    --km-surface-650: #36393f;
    --km-surface-625: #374151;
    --km-surface-600: #3a3f46;
    --km-surface-575: #3c3f46;
    --km-surface-550: #404040;
    --km-surface-525: #40444b;
    --km-surface-500: #4b5563;
    --km-surface-475: #4f545c;
    --km-surface-450: #5a6268;
    --km-surface-400: #6b7280;
    --km-surface-350: #8a8f9b;
    --km-surface-300: #9ca3af;
    --app-bg: #18191c;
    --app-text: #f3f3f3;
    --app-text-secondary: #e5e7eb;
    --text-white: #fff;
    --text-bright: #f3f4f6;
    --text-soft: #e3e3e3;
    --text-muted: #b9bbbe;
    --text-muted-strong: #8e9297;
    --text-muted-soft: #aaa;
    --text-dark: #111111;
    --accent-discord: #7289da;
    --accent-discord-strong: #5865f2;
    --accent-nav: #a0522d;
    --accent-back: #43b581;
    --surface-card: #292b2f;
    --surface-strong: #36393f;
    --surface-deep: #23272a;
    --border-strong: #40444b;
    --flash-success-bg: #4caf50;
    --flash-error-bg: #f44336;
    --flash-warning-bg: #ff9800;
    --flash-info-bg: #2563eb;
    --hover-border-color: #d97706;
}

body.theme-dark {
    --bg-primary: #141720;
    --bg-secondary: #1a1f2a;
    --bg-tertiary: #212838;
    --border-color: rgba(120, 132, 156, 0.3);
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0;
    --text-muted: rgba(226, 232, 240, 0.68);
    --accent-primary: #d97706;
    --accent-warning: #d97706;
    --flash-warning-bg: #d97706;
    --page-surface: #181b23;
    --page-surface-strong: #141720;
    --page-surface-raised: #212838;
    --page-border: rgba(120, 132, 156, 0.3);
    --page-border-strong: rgba(120, 132, 156, 0.5);
    --page-accent: #d97706;
    --page-accent-soft: rgba(217, 119, 6, 0.2);
    --page-glow: rgba(217, 119, 6, 0.14);
    --page-shadow: 0 20px 50px rgba(6, 10, 18, 0.55);
    --ticket-surface: var(--page-surface);
    --ticket-surface-strong: var(--page-surface-strong);
    --ticket-surface-raised: var(--page-surface-raised);
    --ticket-border: var(--page-border);
    --ticket-border-strong: var(--page-border-strong);
    --ticket-accent: var(--page-accent);
    --ticket-accent-soft: var(--page-accent-soft);
    --ticket-glow: var(--page-glow);
    --ticket-shadow: var(--page-shadow);
}

body.theme-dark .main-content {
    position: relative;
    background:
        radial-gradient(900px 420px at 10% -10%, rgba(255, 147, 71, 0.18), transparent 60%),
        radial-gradient(720px 360px at 90% 0%, rgba(255, 112, 67, 0.14), transparent 55%),
        radial-gradient(620px 520px at 100% 100%, rgba(255, 122, 69, 0.18), transparent 70%) !important;
    color: var(--text-primary);
}

body.theme-dark .main-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 120px 120px;
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}

body.theme-dark .main-content > * {
    position: relative;
    z-index: 1;
}

body.theme-dark .page-header:not(.text-center) {
    position: relative;
    text-align: left !important;
    background: linear-gradient(135deg, rgba(26, 31, 42, 0.96), rgba(16, 19, 27, 0.98));
    border: 1px solid var(--page-border);
    border-radius: 18px;
    padding: 24px 26px;
    margin: 12px 0 28px;
    box-shadow: var(--page-shadow);
}

body.theme-dark .page-header h1 {
    margin: 0;
    font-size: var(--page-header-title-size);
    font-weight: 650;
    color: #f8fafc;
}

body.theme-dark .page-header:not(.text-center) p {
    text-align: left !important;
}

body.theme-dark .page-header:not(.text-center)::after {
    content: "";
    position: absolute;
    left: 26px;
    bottom: 18px;
    width: 140px;
    height: 2px;
    background: linear-gradient(90deg, var(--page-accent), rgba(255, 130, 76, 0.22));
    border-radius: 999px;
    opacity: 0.9;
}

body.theme-dark .panel-container {
    position: relative;
    z-index: 0;
    margin-bottom: 24px;
    background: transparent;
    border: none;
}

body.theme-dark .panel-container.open {
    z-index: 20;
}

body.theme-dark .panel-header {
    position: relative;
    background: linear-gradient(135deg, rgba(28, 34, 46, 0.96), rgba(19, 22, 30, 0.98));
    border: 1px solid var(--page-border);
    border-radius: 16px;
    padding: 18px 22px;
    box-shadow: 0 16px 36px rgba(6, 10, 18, 0.45);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

body.theme-dark .panel-header:hover {
    background: linear-gradient(135deg, rgba(30, 36, 48, 0.98), rgba(21, 25, 34, 0.98));
    border-color: var(--page-border-strong);
    box-shadow: 0 22px 40px rgba(6, 10, 18, 0.5);
    transform: translateY(-1px);
}

body.theme-dark .panel-container.open .panel-header {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

body.theme-dark .panel-title {
    gap: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

body.theme-dark .panel-subtitle {
    color: var(--text-muted);
}

body.theme-dark .chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--page-accent-soft);
    border: 1px solid rgba(255, 154, 60, 0.32);
    color: #ffe7d0;
    font-size: 0.95rem;
}

body.theme-dark .panel-content {
    background: linear-gradient(180deg, rgba(19, 22, 30, 0.98), rgba(16, 19, 26, 0.98));
    border: 1px solid var(--page-border);
    border-top: none;
    border-radius: 0 0 16px 16px;
    box-shadow: var(--page-shadow);
}

body.theme-dark .main-content input[type="text"],
body.theme-dark .main-content input[type="search"],
body.theme-dark .main-content select,
body.theme-dark .main-content textarea {
    background: rgba(12, 15, 22, 0.9);
    border: 1px solid var(--page-border);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 10px 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.theme-dark .main-content input[type="text"]:focus,
body.theme-dark .main-content input[type="search"]:focus,
body.theme-dark .main-content select:focus,
body.theme-dark .main-content textarea:focus {
    outline: none;
    border-color: var(--page-accent);
    box-shadow: 0 0 0 3px rgba(255, 154, 60, 0.2);
    background: rgba(12, 15, 22, 1);
}

body.theme-dark .main-content textarea::placeholder,
body.theme-dark .main-content input::placeholder {
    color: rgba(226, 232, 240, 0.45);
}

body.theme-dark .main-content:not(.main-content--tickets) .btn-primary:hover {
    background: #f08a2e;
}

body.theme-dark .main-content:not(.main-content--tickets) .btn-primary:active {
    background: #e67e22;
}

@media (max-width: 900px) {
    body.theme-dark .page-header {
        padding: 20px;
    }

    body.theme-dark .page-header::after {
        left: 20px;
    }
}
