:root {
    --theme-bg: #202225;
    --theme-surface: rgba(46, 48, 51, 0.96);
    --theme-surface-raised: rgba(57, 59, 62, 0.98);
    --theme-surface-soft: rgba(255, 250, 244, 0.055);
    --theme-border: rgba(211, 202, 193, 0.22);
    --theme-border-strong: rgba(169, 54, 66, 0.52);
    --theme-heading: #fffaf4;
    --theme-text: #eee9e2;
    --theme-muted: #bfb8af;
    --theme-accent: #a93642;
    --theme-accent-hover: #c64b56;
    --theme-accent-soft: rgba(169, 54, 66, 0.15);
    --theme-table-head: rgba(68, 65, 64, 0.98);
    --theme-table-row: rgba(255, 250, 244, 0.025);
    --theme-table-row-alt: rgba(255, 250, 244, 0.05);
    --theme-table-row-hover: rgba(169, 54, 66, 0.12);
    --theme-field: rgba(34, 36, 39, 0.96);
    --theme-shadow: 0 18px 44px rgba(8, 7, 7, 0.28);
    --theme-danger: #d85862;
    --theme-partner-price: #aebdc3;
    --theme-onsite-price: #d9a45f;
    --bg: var(--theme-bg);
    --panel: var(--theme-surface);
    --panel-strong: var(--theme-surface-raised);
    --ink: var(--theme-heading);
    --muted: var(--theme-muted);
    --line: var(--theme-border);
    --field: var(--theme-field);
    --field-ink: var(--theme-text);
    --primary: var(--theme-accent);
    --primary-dark: var(--theme-accent-hover);
    --accent: var(--theme-accent);
    --cyan: #9fafb7;
    --danger: var(--theme-danger);
    --shadow: var(--theme-shadow);
}

body:not(.login-page) {
    background:
        radial-gradient(circle at 14% 4%, rgba(169, 54, 66, 0.18), transparent 31%),
        radial-gradient(circle at 90% 2%, rgba(174, 189, 195, 0.13), transparent 29%),
        linear-gradient(145deg, #242629 0%, #2e3033 48%, #1c1e21 100%);
    color: var(--theme-text);
}

.app-header {
    border-bottom-color: rgba(211, 202, 193, 0.2);
    background: rgba(37, 39, 42, 0.94);
    box-shadow: 0 10px 30px rgba(10, 9, 9, 0.22);
    backdrop-filter: blur(18px);
}

.app-brand span,
.section-heading h1,
.modal-head h2,
.card h2,
.panel h2 {
    color: var(--theme-heading);
}

.app-brand img,
.site-logo {
    filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.38));
}

.main-nav a:hover,
.main-nav a.is-active,
.team-tabs a:hover,
.team-tabs a.is-active,
.finance-workspace-tabs a:hover,
.finance-workspace-tabs a.is-active {
    border-color: rgba(169, 54, 66, 0.48);
    background: rgba(169, 54, 66, 0.17);
    color: #fff8f3;
}

.primary-button,
button.primary-button,
.service-toggle-button.is-active {
    border-color: #bd4651;
    background: linear-gradient(135deg, #b83f4b, #7b202b);
    color: #fff;
    box-shadow: 0 10px 25px rgba(94, 18, 28, 0.25);
}

.primary-button:hover,
button.primary-button:hover {
    background: linear-gradient(135deg, #ce5360, #922d38);
    box-shadow: 0 13px 30px rgba(94, 18, 28, 0.32);
}

.ghost-button,
.secondary-button {
    border-color: rgba(200, 193, 186, 0.3);
    background: rgba(255, 250, 244, 0.065);
    color: var(--theme-text);
}

.ghost-button:hover,
.secondary-button:hover {
    border-color: rgba(174, 189, 195, 0.55);
    background: rgba(174, 189, 195, 0.13);
}

.app-modal::backdrop {
    background: rgba(12, 12, 13, 0.62);
    backdrop-filter: blur(6px);
}

.modal-form,
.app-modal > div,
.app-modal > form,
.card,
.panel,
.dashboard-card,
.employee-panel,
.finance-panel,
.weekly-bilan-card {
    border-color: var(--theme-border);
    background-color: var(--theme-surface);
    box-shadow: var(--theme-shadow);
}

input,
select,
textarea {
    border-color: rgba(211, 202, 193, 0.26);
    background: var(--theme-field);
    color: var(--theme-text);
}

input:focus,
select:focus,
textarea:focus {
    border-color: #bb4a55;
    box-shadow: 0 0 0 3px rgba(169, 54, 66, 0.18);
}

table thead th {
    border-color: var(--theme-border);
    background: var(--theme-table-head);
    color: #e6ded6;
}

table tbody tr:nth-child(even) {
    background: var(--theme-table-row-alt);
}

table tbody tr:hover {
    background: var(--theme-table-row-hover);
}

.eyebrow,
.accent-text,
a:not(.primary-button):not(.discord-login-button):focus-visible {
    color: #d8767f;
}

.badge,
.status-pill,
.role-pill,
.declaration-role,
.hr-role-pill {
    border-color: rgba(174, 189, 195, 0.3);
    background: rgba(174, 189, 195, 0.13);
    color: #dce4e7;
}

.alert-success {
    border-color: rgba(88, 184, 130, 0.46);
    background: rgba(52, 126, 86, 0.2);
    color: #d8f4e3;
}

.alert-error,
.danger-zone {
    border-color: rgba(216, 88, 98, 0.5);
    background: rgba(132, 34, 45, 0.2);
    color: #ffdadd;
}

.login-page {
    background:
        radial-gradient(circle at 18% 12%, rgba(169, 54, 66, 0.3), transparent 34%),
        radial-gradient(circle at 86% 8%, rgba(174, 189, 195, 0.2), transparent 28%),
        linear-gradient(145deg, #242629, #3a3b3d 52%, #1d1f21);
}

.login-panel {
    border: 1px solid rgba(98, 86, 82, 0.24);
    background: rgba(247, 243, 237, 0.96);
    box-shadow: 0 26px 70px rgba(8, 7, 7, 0.3);
}

.login-panel h1,
.login-panel label,
.login-panel .brand-block strong {
    color: #282526;
}

.login-panel .eyebrow {
    color: #8f2633;
}

.login-panel input,
.login-panel select,
.login-panel textarea {
    border-color: #c9c1b9;
    background: #fffdf9;
    color: #282526;
}

.login-panel input:focus,
.login-panel select:focus,
.login-panel textarea:focus {
    border-color: #a93642;
    box-shadow: 0 0 0 3px rgba(169, 54, 66, 0.14);
}

@media (max-width: 760px) {
    .app-header {
        background: rgba(37, 39, 42, 0.98);
    }
}
