:root {
    --site-surface-base: #ffffff;
    --site-surface-soft: #f7f5f1;
    --site-surface-muted: #efe9df;
    --site-border-color: rgba(96, 76, 51, 0.12);
    --site-text-primary: #24180f;
    --site-text-secondary: #6e5b47;
    --site-shadow-soft: 0 18px 42px rgba(52, 39, 24, 0.08);
}

[data-bs-theme="dark"],
body.dark-mode {
    --site-surface-base: #171b21;
    --site-surface-soft: #1f252d;
    --site-surface-muted: #262d36;
    --site-border-color: rgba(216, 188, 154, 0.14);
    --site-text-primary: #f1e7db;
    --site-text-secondary: #c6b6a4;
    --site-shadow-soft: 0 20px 48px rgba(0, 0, 0, 0.28);
}

[data-bs-theme="dark"] body,
body.dark-mode {
    background: linear-gradient(180deg, #13171d 0%, #171b21 100%);
    color: var(--site-text-primary);
}

[data-bs-theme="dark"] .site-main-shell,
body.dark-mode .site-main-shell {
    background: transparent;
}

[data-bs-theme="dark"] main,
[data-bs-theme="dark"] section,
[data-bs-theme="dark"] article,
body.dark-mode main,
body.dark-mode section,
body.dark-mode article {
    color: inherit;
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .offcanvas,
[data-bs-theme="dark"] .accordion-item,
[data-bs-theme="dark"] .list-group-item,
[data-bs-theme="dark"] .dropdown-menu:not(.modern-dropdown-menu),
[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] .page-item .page-link,
[data-bs-theme="dark"] .breadcrumb,
[data-bs-theme="dark"] .alert,
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .input-group-text,
[data-bs-theme="dark"] .form-check-input,
[data-bs-theme="dark"] .btn-light,
[data-bs-theme="dark"] .bg-white,
[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] [class*="card"],
body.dark-mode .card,
body.dark-mode .modal-content,
body.dark-mode .offcanvas,
body.dark-mode .accordion-item,
body.dark-mode .list-group-item,
body.dark-mode .dropdown-menu:not(.modern-dropdown-menu),
body.dark-mode .table,
body.dark-mode .page-item .page-link,
body.dark-mode .breadcrumb,
body.dark-mode .alert,
body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode .input-group-text,
body.dark-mode .form-check-input,
body.dark-mode .btn-light,
body.dark-mode .bg-white,
body.dark-mode .bg-light,
body.dark-mode [class*="card"] {
    background-color: var(--site-surface-soft) !important;
    border-color: var(--site-border-color) !important;
    color: var(--site-text-primary) !important;
    box-shadow: var(--site-shadow-soft);
}

[data-bs-theme="dark"] .form-control::placeholder,
[data-bs-theme="dark"] .form-select,
body.dark-mode .form-control::placeholder,
body.dark-mode .form-select {
    color: var(--site-text-secondary) !important;
}

[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] .text-secondary,
[data-bs-theme="dark"] small,
body.dark-mode .text-muted,
body.dark-mode .text-secondary,
body.dark-mode small {
    color: var(--site-text-secondary) !important;
}

[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6,
[data-bs-theme="dark"] p,
[data-bs-theme="dark"] li,
[data-bs-theme="dark"] dt,
[data-bs-theme="dark"] dd,
[data-bs-theme="dark"] label,
[data-bs-theme="dark"] span,
[data-bs-theme="dark"] strong,
[data-bs-theme="dark"] div,
[data-bs-theme="dark"] a:not(.btn):not(.modern-brand):not(.modern-utility-button):not(.modern-icon-button):not(.user-profile-btn),
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode p,
body.dark-mode li,
body.dark-mode dt,
body.dark-mode dd,
body.dark-mode label,
body.dark-mode span,
body.dark-mode strong,
body.dark-mode div,
body.dark-mode a:not(.btn):not(.modern-brand):not(.modern-utility-button):not(.modern-icon-button):not(.user-profile-btn) {
    color: inherit;
}

[data-bs-theme="dark"] a:not(.btn):hover,
body.dark-mode a:not(.btn):hover {
    color: #f3d6aa;
}

[data-bs-theme="dark"] .btn-outline-secondary,
[data-bs-theme="dark"] .btn-outline-dark,
body.dark-mode .btn-outline-secondary,
body.dark-mode .btn-outline-dark {
    color: var(--site-text-primary);
    border-color: var(--site-border-color);
}

[data-bs-theme="dark"] .btn-outline-secondary:hover,
[data-bs-theme="dark"] .btn-outline-dark:hover,
body.dark-mode .btn-outline-secondary:hover,
body.dark-mode .btn-outline-dark:hover {
    background-color: rgba(216, 188, 154, 0.12);
    border-color: rgba(216, 188, 154, 0.2);
}

[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] .table > :not(caption) > * > *,
body.dark-mode .table,
body.dark-mode .table > :not(caption) > * > * {
    color: var(--site-text-primary) !important;
    border-color: var(--site-border-color) !important;
    background-color: transparent !important;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > *,
body.dark-mode .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

[data-bs-theme="dark"] hr,
body.dark-mode hr {
    border-color: var(--site-border-color);
    opacity: 1;
}

[data-bs-theme="dark"] img,
body.dark-mode img {
    opacity: 0.98;
}
