/* Brand surfaces for the public header and auth drawers */
.brand-topbar {
    background: #f2f5f6 !important;
    border-bottom-color: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.brand-topbar .brand-logo {
    background: #17262b !important;
    border-radius: 6px !important;
    box-shadow: none !important;
}
.brand-topbar #topbar-company-name { color: #17262b !important; }
.brand-topbar .brand-subtitle { color: #40565d !important; }
.brand-topbar #nav-public .brand-login {
    color: #17262b !important;
    font-weight: 500;
}
.brand-topbar #nav-public .brand-login:hover { color: #356a8a !important; }
.brand-topbar #nav-public .brand-cta {
    background: #17262b !important;
    color: #fff !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    padding: 8px 14px !important;
    font-weight: 600;
}
.brand-topbar #nav-public .brand-cta:hover { background: #356a8a !important; }
.brand-topbar #auth-app button,
.brand-topbar #auth-app-mobile button { color: #40565d !important; }
.brand-topbar #auth-app button:hover,
.brand-topbar #auth-app-mobile button:hover { background: #e1e9eb !important; color: #17262b !important; }
.brand-topbar .brand-initials {
    background: #d7e3e7 !important;
    color: #356a8a !important;
    border: 0 !important;
}
.brand-topbar .w-px { background: #d7e3e7 !important; }
.brand-topbar #topbar-hamburger { color: #17262b !important; }

/* Auth drawer */
#login-modal,
#register-modal {
    background: rgba(23, 38, 43, .52) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
#login-modal .auth-drawer,
#register-modal .auth-drawer {
    max-width: 460px;
    background: #f2f5f6 !important;
    box-shadow: none !important;
    border-radius: 8px 0 0 8px;
}
.auth-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 24px 18px;
    background: #f2f5f6;
    flex-shrink: 0;
}
.auth-brand {
    display: block;
    color: #356a8a;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .14em;
    line-height: 1.2;
    text-transform: uppercase;
}
.auth-head h3 {
    margin: 9px 0 0;
    color: #17262b;
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1.1;
}
.auth-head p {
    margin: 6px 0 0;
    color: #40565d;
    font-size: 13px;
    line-height: 1.45;
}
.auth-close {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 4px;
    background: #e1e9eb;
    color: #40565d;
    cursor: pointer;
}
.auth-close:hover { background: #d7e3e7; color: #17262b; }
.auth-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 24px;
    background: #f2f5f6;
}
.auth-field { margin-top: 15px; }
.auth-label {
    display: block;
    margin-bottom: 7px;
    color: #17262b;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}
.auth-input {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 0;
    border-radius: 4px;
    background: #ffffff;
    color: #17262b !important;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.35;
    outline: none;
    transition: background-color .16s ease, box-shadow .16s ease;
}
.auth-input::placeholder { color: #63777e !important; opacity: 1; }
.auth-input:focus { background: #fff; box-shadow: 0 0 0 2px #356a8a; }
.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin-top: 20px;
    padding: 12px 16px;
    border: 0;
    border-radius: 4px;
    background: #356a8a;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .16s ease, opacity .16s ease;
}
.auth-submit:hover { background: #2b5872; }
.auth-submit[data-consent="0"], .auth-submit:disabled { opacity: .45; cursor: not-allowed; }
.auth-submit:focus-visible, .auth-close:focus-visible { outline: 3px solid #7fb2c8; outline-offset: 2px; }
.auth-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 16px;
    margin-top: 16px;
    font-size: 13px;
}
.auth-link {
    color: #356a8a;
    font-weight: 600;
    text-decoration: none;
}
.auth-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-link-muted { color: #40565d; font-weight: 500; }
.auth-note {
    margin-top: 14px;
    color: #40565d;
    font-size: 13px;
    line-height: 1.5;
}
.auth-rules {
    display: grid;
    gap: 6px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    color: #40565d;
    font-size: 13px;
    line-height: 1.4;
}
.auth-rules li { display: flex; align-items: center; gap: 8px; min-height: 20px; }
.auth-rules .rule-off { color: #9fb1b7; }
.auth-rules .rule-on { color: #356a8a; }
.auth-rules li.text-secondary { color: #356a8a; }
.auth-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
    color: #40565d;
    font-size: 13px;
    line-height: 1.5;
    cursor: pointer;
}
.auth-consent input {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    margin-top: 2px;
    accent-color: #356a8a;
}

@media (max-width: 640px) {
    #login-modal .auth-drawer,
    #register-modal .auth-drawer { max-width: none; border-radius: 0; }
    .auth-head { padding: 20px 20px 14px; }
    .auth-body { padding: 0 20px 20px; }
    .brand-topbar #nav-public { gap: 8px !important; }
    .brand-topbar #nav-public .brand-login { display: inline-flex !important; font-size: 14px; }
    .brand-topbar #nav-public .brand-cta { padding: 8px 10px !important; }
}


/* Fields stay readable in the browser's autofill state. */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #17262b !important;
}

/* The public header and auth drawers keep the light palette in dark app theme. */
html[data-theme="dark"] .brand-topbar {
    background: #f2f5f6 !important;
    border-bottom-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
html[data-theme="dark"] .brand-topbar #topbar-company-name,
html[data-theme="dark"] .brand-topbar #nav-public .brand-login,
html[data-theme="dark"] .brand-topbar #topbar-hamburger { color: #17262b !important; }
html[data-theme="dark"] .brand-topbar .brand-subtitle,
html[data-theme="dark"] .brand-topbar #auth-app button,
html[data-theme="dark"] .brand-topbar #auth-app-mobile button { color: #40565d !important; }
html[data-theme="dark"] .brand-topbar #nav-public .brand-cta { background: #17262b !important; color: #fff !important; }
html[data-theme="dark"] .brand-topbar #nav-public .brand-cta:hover { background: #356a8a !important; }
html[data-theme="dark"] .brand-topbar .brand-initials { background: #d7e3e7 !important; color: #356a8a !important; }
html[data-theme="dark"] #login-modal .auth-drawer,
html[data-theme="dark"] #register-modal .auth-drawer { background: #f2f5f6 !important; }
html[data-theme="dark"] .auth-head { background: #f2f5f6 !important; }
html[data-theme="dark"] .auth-head h3,
html[data-theme="dark"] .auth-label { color: #17262b !important; }
html[data-theme="dark"] .auth-head p,
html[data-theme="dark"] .auth-note,
html[data-theme="dark"] .auth-link-muted,
html[data-theme="dark"] .auth-rules,
html[data-theme="dark"] .auth-consent { color: #40565d !important; }
html[data-theme="dark"] .auth-input {
    background: #ffffff !important;
    color: #17262b !important;
    -webkit-text-fill-color: #17262b !important;
}
html[data-theme="dark"] .auth-input::placeholder { color: #63777e !important; }
html[data-theme="dark"] .auth-close { background: #e1e9eb !important; color: #40565d !important; }

html[data-theme="dark"] body #login-modal .auth-input,
html[data-theme="dark"] body #register-modal .auth-input {
    background: #ffffff !important;
    color: #17262b !important;
    -webkit-text-fill-color: #17262b !important;
    box-shadow: none !important;
}
html[data-theme="dark"] body #login-modal .auth-input::placeholder,
html[data-theme="dark"] body #register-modal .auth-input::placeholder {
    color: #63777e !important;
    -webkit-text-fill-color: #63777e !important;
}


/* ---------- Off-canvas menu ---------- */
.menu-backdrop {
    background: rgba(23, 38, 43, .52) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.menu-panel {
    width: 304px;
    background: #f2f5f6 !important;
    border-right: 1px solid #e1e9eb;
    box-shadow: none !important;
}
.menu-head {
    background: #f2f5f6 !important;
    border-bottom: 1px solid #e1e9eb !important;
    padding: 20px !important;
}
.menu-logo {
    background: #17262b !important;
    border-radius: 6px !important;
    box-shadow: none !important;
}
.menu-wordmark { color: #17262b !important; letter-spacing: -.03em; }
.menu-close {
    background: #e1e9eb !important;
    color: #40565d !important;
    border-radius: 4px !important;
}
.menu-close:hover { background: #d7e3e7 !important; color: #17262b !important; }
.menu-nav { padding-top: 12px !important; padding-bottom: 12px !important; }
.menu-item {
    margin: 3px 10px !important;
    padding: 12px 14px !important;
    border-radius: 4px !important;
    color: #17262b !important;
    font-size: 15px;
    font-weight: 500;
}
.menu-item i { color: #40565d !important; }
.menu-item:hover { background: #e1e9eb !important; }
.menu-item.active { background: #d7e3e7 !important; color: #356a8a !important; }
.menu-item.active i { color: #356a8a !important; }
.menu-item .nav-badge, .menu-item .menu-badge {
    background: #356a8a !important;
    color: #fff !important;
    border-radius: 2px !important;
    font-size: 12px !important;
    line-height: 18px;
    min-width: 20px;
    padding: 1px 6px !important;
}

/* ---------- Shared drawer chrome ---------- */
.modal,
.drawer-backdrop {
    background: rgba(23, 38, 43, .52) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.modal-drawer-panel {
    background: #f2f5f6 !important;
    color: #17262b !important;
    box-shadow: none !important;
}
.modal-drawer-panel > div:first-child {
    background: #f2f5f6 !important;
    border-color: #e1e9eb !important;
}
.modal-drawer-panel .border-b,
.modal-drawer-panel .border-t { border-color: #e1e9eb !important; }
.modal-drawer-panel h3 { color: #17262b !important; }
.modal-drawer-panel label { color: #17262b !important; }
.modal-drawer-panel .bg-primary { background: #356a8a !important; }
.modal-drawer-panel .bg-primary:hover { background: #2b5872 !important; }

.drawer-panel {
    background: #f2f5f6 !important;
    color: #17262b !important;
    box-shadow: none !important;
}
.drawer-panel.open { box-shadow: none !important; }
.drawer-header {
    background: #f2f5f6 !important;
    border-bottom: 1px solid #e1e9eb !important;
}
.drawer-body { background: #f2f5f6 !important; color: #17262b !important; }
.drawer-footer {
    background: #f2f5f6 !important;
    border-top: 1px solid #e1e9eb !important;
}
.drawer-panel h2,
.drawer-panel h3,
.drawer-panel label { color: #17262b !important; }
.drawer-panel .bg-primary { background: #356a8a !important; }
.drawer-panel .bg-primary:hover { background: #2b5872 !important; }

/* One field language inside every drawer. */
:is(.drawer-panel, .modal-drawer-panel) input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]),
:is(.drawer-panel, .modal-drawer-panel) select,
:is(.drawer-panel, .modal-drawer-panel) textarea {
    background: #ffffff !important;
    color: #17262b !important;
    border: 0 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: 15px !important;
}
:is(.drawer-panel, .modal-drawer-panel) input::placeholder,
:is(.drawer-panel, .modal-drawer-panel) textarea::placeholder { color: #63777e !important; opacity: 1 !important; }
:is(.drawer-panel, .modal-drawer-panel) input:focus,
:is(.drawer-panel, .modal-drawer-panel) select:focus,
:is(.drawer-panel, .modal-drawer-panel) textarea:focus {
    outline: none !important;
    background: #fff !important;
    box-shadow: 0 0 0 2px #356a8a !important;
}

/* Keep these surfaces light in dark app theme, like the public header and auth. */
html[data-theme="dark"] .menu-panel { background: #f2f5f6 !important; }
html[data-theme="dark"] .menu-head { background: #f2f5f6 !important; }
html[data-theme="dark"] .menu-wordmark,
html[data-theme="dark"] .menu-item { color: #17262b !important; }
html[data-theme="dark"] .menu-item i { color: #40565d !important; }
html[data-theme="dark"] .menu-item:hover { background: #e1e9eb !important; }
html[data-theme="dark"] .menu-item.active { background: #d7e3e7 !important; color: #356a8a !important; }
html[data-theme="dark"] .menu-item.active i { color: #356a8a !important; }
html[data-theme="dark"] .modal-drawer-panel,
html[data-theme="dark"] .drawer-panel { background: #f2f5f6 !important; color: #17262b !important; }
html[data-theme="dark"] .modal-drawer-panel .border-b,
html[data-theme="dark"] .modal-drawer-panel .border-t,
html[data-theme="dark"] .drawer-header,
html[data-theme="dark"] .drawer-footer { border-color: #e1e9eb !important; }
html[data-theme="dark"] .modal-drawer-panel h3,
html[data-theme="dark"] .modal-drawer-panel label,
html[data-theme="dark"] .drawer-panel h2,
html[data-theme="dark"] .drawer-panel h3,
html[data-theme="dark"] .drawer-panel label { color: #17262b !important; }
html[data-theme="dark"] :is(.drawer-panel, .modal-drawer-panel) input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]),
html[data-theme="dark"] :is(.drawer-panel, .modal-drawer-panel) select,
html[data-theme="dark"] :is(.drawer-panel, .modal-drawer-panel) textarea {
    background: #ffffff !important;
    color: #17262b !important;
    -webkit-text-fill-color: #17262b !important;
}

/* Same field height and type size in every drawer. */
:is(.drawer-panel, .modal-drawer-panel) input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]),
:is(.drawer-panel, .modal-drawer-panel) select {
    min-height: 46px !important;
    padding: 11px 13px !important;
    font-size: 16px !important;
}


/* ---------- Main app surfaces ---------- */
body { background-color: #f2f5f6 !important; color: #17262b; }
#app { background-color: #f2f5f6; }

[class~="bg-slate-50"] { background-color: #f2f5f6 !important; }
[class~="bg-slate-100"] { background-color: #e1e9eb !important; }
[class~="border-slate-200"] { border-color: #e1e9eb !important; }
[class~="border-slate-100"] { border-color: #edf1f2 !important; }
[class~="bg-slate-800"], [class~="bg-slate-900"] { background-color: #17262b !important; }
[class~="text-slate-800"], [class~="text-slate-700"] { color: #17262b !important; }
[class~="text-slate-600"] { color: #40565d !important; }
[class~="text-slate-500"] { color: #53666c !important; }

[class~="bg-primary"] { background-color: #356a8a !important; }
[class~="text-primary"] { color: #356a8a !important; }
[class~="border-primary"] { border-color: #356a8a !important; }
[class~="hover:bg-primaryDark"]:hover { background-color: #2b5872 !important; }
[class~="hover:text-primary"]:hover { color: #356a8a !important; }
[class~="focus:border-primary"]:focus { border-color: #356a8a !important; }
[class~="focus:ring-primary"]:focus { --tw-ring-color: #356a8a !important; }
[class~="focus:ring-blue-500"]:focus { --tw-ring-color: #356a8a !important; }
[class~="ring-blue-500"] { --tw-ring-color: #356a8a !important; }

[class~="bg-blue-50"] { background-color: #e1e9eb !important; }
[class~="bg-blue-100"] { background-color: #d7e3e7 !important; }
[class~="bg-blue-500"], [class~="bg-blue-600"] { background-color: #356a8a !important; }
[class~="hover:bg-blue-600"]:hover, [class~="hover:bg-blue-700"]:hover { background-color: #2b5872 !important; }
[class~="text-blue-500"], [class~="text-blue-600"], [class~="text-blue-700"] { color: #356a8a !important; }
[class~="border-blue-200"], [class~="border-blue-300"] { border-color: #d7e3e7 !important; }
[class~="bg-green-500"], [class~="bg-amber-500"], [class~="bg-red-500"] { /* keep semantic status colours */ }

/* Chessboard */
.chessboard-container { background: transparent; }
.chessboard-table td,
.chessboard-table th { border-color: #e1e9eb; }
.cell-empty:hover { background-color: #f2f5f6; }
.stat-card {
    background: #fff !important;
    border-color: #e1e9eb !important;
    box-shadow: none !important;
}
.stat-card:hover { transform: none !important; box-shadow: none !important; border-color: #d7e3e7 !important; }
.today-overlay {
    background: rgba(53, 106, 138, .08) !important;
    border-left-color: #356a8a !important;
}
.filter-active-dot { background: #356a8a !important; }
.booking-bar:hover { box-shadow: none !important; }
.booking-bar { border-radius: 4px; }
.btn-primary { background: #17262b !important; background-image: none !important; box-shadow: none !important; }
.btn-primary:hover { background: #356a8a !important; background-image: none !important; box-shadow: none !important; }
.chat-bubble-out { background: #d7e3e7; }

/* Tasks */
.type-chip {
    background: #fff !important;
    border-color: #e1e9eb !important;
    border-radius: 4px !important;
    color: #17262b !important;
}
.type-chip:hover { background: #e1e9eb !important; }
.type-chip.active {
    background: #356a8a !important;
    border-color: #356a8a !important;
    color: #fff !important;
}
.task-card {
    background: #fff !important;
    border-color: #e1e9eb !important;
    border-radius: 6px !important;
    box-shadow: none !important;
}
.task-card:hover {
    border-color: #356a8a !important;
    box-shadow: none !important;
    transform: none !important;
}
.task-card.selected {
    border-color: #356a8a !important;
    background: #d7e3e7 !important;
}
.task-card.overdue { border-left-color: #b54a45 !important; }
.task-check { accent-color: #356a8a; }
.task-icon { border-radius: 4px; }
.task-assignee { background: #e1e9eb !important; color: #40565d !important; }
.task-filters .type-chip { margin: 0; }

/* Stay / guests */
#view-stay { background: #f2f5f6 !important; }
.stay-list { background: #fff !important; border-color: #e1e9eb !important; }
.stay-list-title, .stay-ws-left h2, .stay-dialog-name, .stay-card-title { color: #17262b !important; }
.stay-search, .stay-select {
    background: #fff !important;
    border-color: #e1e9eb !important;
    border-radius: 4px !important;
}
.stay-dialog.active,
.stay-dialog.has-unread,
.stay-dialog.is-today.active {
    background: #d7e3e7 !important;
    border-color: #d7e3e7 !important;
}
.stay-dialog.has-unread { border-left-color: #356a8a !important; }
.stay-dialog.has-unread .stay-dialog-name { color: #2b5872 !important; }
.stay-dialog.has-unread .stay-dialog-preview { color: #17262b !important; }
.stay-dialog.has-unread:hover { background: #cfdee3 !important; }
.stay-dialog.is-today { background: #f2f5f6 !important; border-left-color: #356a8a !important; }
.stay-dialog.is-today.is-checkin { border-left-color: #15803d !important; }
.stay-dialog.is-today.is-checkout { border-left-color: #b45309 !important; }
.stay-dialog:hover { background: #f2f5f6 !important; }
.stay-unread-chip { border-color: #e1e9eb !important; }
.stay-unread-chip.active {
    background: #d7e3e7 !important;
    border-color: #d7e3e7 !important;
    color: #2b5872 !important;
}
.stay-unread-dot { background: #b54a45 !important; }
.stay-badge.unread { background: #b54a45 !important; color: #fff !important; }
.stay-badge.deposit { background: #17262b !important; color: #fff !important; }
.stay-ws-phone { color: #356a8a !important; }
.stay-ws-meta-link:hover { color: #356a8a !important; }
.stay-tab { color: #53666c; }
.stay-tab.active { color: #17262b !important; border-bottom-color: #356a8a !important; }
.stay-tab-badge { background: #b54a45 !important; }
.stay-btn { background: #fff !important; border-color: #e1e9eb !important; border-radius: 4px !important; color: #17262b !important; }
.stay-btn:hover { background: #e1e9eb !important; }
.stay-btn.primary { background: #356a8a !important; border-color: #356a8a !important; color: #fff !important; }
.stay-btn.primary:hover { background: #2b5872 !important; }
.stay-wf-step.current .stay-wf-dot { background: #356a8a !important; box-shadow: 0 0 0 4px rgba(53,106,138,.18) !important; }
.stay-wf-step.done .stay-wf-dot { background: #15803d !important; }
.msg-filter-btn { border-color: #e1e9eb !important; background: #fff !important; border-radius: 4px !important; color: #17262b !important; }
.msg-filter-btn.active { background: #356a8a !important; border-color: #356a8a !important; color: #fff !important; }
.ev-out { background: #356a8a !important; }
.stay-send { background: #356a8a !important; border-radius: 4px !important; }
.stay-composer-row textarea { border-color: #e1e9eb !important; border-radius: 4px !important; }
.stay-workflow-step-card, .stay-card { border-color: #e1e9eb !important; border-radius: 6px !important; }

.stay-dialog.active:hover,
.stay-dialog.is-today.active:hover {
    background: #cfdee3 !important;
    border-color: #cfdee3 !important;
}
/* Settings / pricing navigation and controls */
.settings-sidebar { background: #fff !important; border-color: #e1e9eb !important; }
.settings-nav-item:hover { background: #e1e9eb !important; color: #17262b !important; }
.settings-nav-item.is-active { background: #d7e3e7 !important; color: #2b5872 !important; border-left-color: #356a8a !important; }
.settings-nav-item.is-active i { color: #356a8a !important; }
.settings-content { background: #f2f5f6 !important; }
.settings-card { border-color: #e1e9eb !important; border-radius: 6px !important; box-shadow: none !important; }
.switch:checked { background: #356a8a !important; }
.switch:focus-visible { outline-color: #356a8a !important; }
.pricing-input { border: 0 !important; border-radius: 4px !important; background: #fff !important; color: #17262b !important; }
.pricing-input:focus { outline: 2px solid #356a8a !important; }

/* Reports */
.reports-page { background: #f2f5f6 !important; }
.rep-tabs, .period-toggle { background: #e1e9eb !important; border-radius: 4px !important; }
.rep-tab, .period-toggle-btn { border-radius: 4px !important; color: #40565d !important; }
.rep-tab.active, .period-toggle-btn.active { background: #fff !important; color: #17262b !important; box-shadow: none !important; }
.rep-period select { border: 0 !important; border-radius: 4px !important; background: #fff !important; color: #17262b !important; }
.rep-btn { border-color: #e1e9eb !important; border-radius: 4px !important; color: #17262b !important; background: #fff !important; }
.rep-btn:hover { background: #e1e9eb !important; }
.rep-btn.primary { background: #356a8a !important; border-color: #356a8a !important; color: #fff !important; }
.kpi-card, .rep-card { border-color: #e1e9eb !important; border-radius: 6px !important; box-shadow: none !important; }
.kpi-card:hover { transform: none !important; box-shadow: none !important; border-color: #d7e3e7 !important; }
.kpi-value, .rep-card-title, .donut-row b, .top-name, .top-revenue, .exp-title, .exp-amount { color: #17262b !important; }
.top-card { border-color: #e1e9eb !important; border-radius: 6px !important; }
.top-card.first { background: #d7e3e7 !important; border-color: #d7e3e7 !important; }
.cascade-row.total { background: #d7e3e7 !important; border-color: #356a8a !important; color: #17262b !important; }
.op-type-toggle button.active { background: #356a8a !important; border-color: #356a8a !important; color: #fff !important; }
.op-field input, .op-field select, .op-field textarea { border: 0 !important; border-radius: 4px !important; background: #fff !important; color: #17262b !important; }

/* ---------- Landing button language: 4px rectangles ---------- */
.chessboard-container button,
.tasks-page button,
.stay-list button,
.stay-workspace button,
.settings-content button,
.reports-page button,
.drawer-panel button,
.modal-drawer-panel button { border-radius: 4px !important; }

/* Chessboard week arrows */

/* ---------- Dark theme ---------- */
html[data-theme="dark"] {
    color-scheme: dark;
}
html[data-theme="dark"] body { background: #0f1d21 !important; color: #eaf1f2 !important; }
html[data-theme="dark"] #app { background: #0f1d21 !important; }
html[data-theme="dark"] [class~="bg-slate-50"] { background-color: #0f1d21 !important; }
html[data-theme="dark"] [class~="bg-slate-100"] { background-color: #17282d !important; }
html[data-theme="dark"] [class~="bg-white"] { background-color: #17282d !important; }
html[data-theme="dark"] [class~="border-slate-200"] { border-color: #2a4148 !important; }
html[data-theme="dark"] [class~="border-slate-100"] { border-color: #22383e !important; }
html[data-theme="dark"] [class~="text-slate-900"],
html[data-theme="dark"] [class~="text-slate-800"],
html[data-theme="dark"] [class~="text-slate-700"] { color: #eaf1f2 !important; }
html[data-theme="dark"] [class~="text-slate-600"],
html[data-theme="dark"] [class~="text-slate-500"] { color: #afc3c7 !important; }
html[data-theme="dark"] [class~="text-slate-400"] { color: #8fa5aa !important; }
html[data-theme="dark"] [class~="bg-slate-800"],
html[data-theme="dark"] [class~="bg-slate-900"] { background-color: #1e3137 !important; }

html[data-theme="dark"] [class~="bg-primary"] { background-color: #7fb0c4 !important; color: #0f1d21 !important; }
html[data-theme="dark"] [class~="text-primary"] { color: #7fb0c4 !important; }
html[data-theme="dark"] [class~="border-primary"] { border-color: #7fb0c4 !important; }
html[data-theme="dark"] [class~="hover:bg-primaryDark"]:hover { background-color: #94c1d1 !important; }
html[data-theme="dark"] [class~="bg-blue-50"] { background-color: #17282d !important; }
html[data-theme="dark"] [class~="bg-blue-100"] { background-color: #1e3137 !important; }
html[data-theme="dark"] [class~="bg-blue-500"],
html[data-theme="dark"] [class~="bg-blue-600"] { background-color: #7fb0c4 !important; color: #0f1d21 !important; }
html[data-theme="dark"] [class~="text-blue-500"],
html[data-theme="dark"] [class~="text-blue-600"],
html[data-theme="dark"] [class~="text-blue-700"] { color: #7fb0c4 !important; }
html[data-theme="dark"] [class~="border-blue-200"],
html[data-theme="dark"] [class~="border-blue-300"] { border-color: #2a4148 !important; }

/* Header */
html[data-theme="dark"] .brand-topbar { background: #102226 !important; border-bottom-color: transparent !important; }
html[data-theme="dark"] .brand-logo { background: #1e3137 !important; }
html[data-theme="dark"] .brand-logo i { color: #7fb0c4 !important; }
html[data-theme="dark"] #topbar-company-name,
html[data-theme="dark"] #nav-public .brand-login { color: #eaf1f2 !important; }
html[data-theme="dark"] .brand-subtitle { color: #afc3c7 !important; }
html[data-theme="dark"] #nav-public .brand-cta { background: #7fb0c4 !important; color: #0f1d21 !important; }
html[data-theme="dark"] #nav-public .brand-cta:hover { background: #94c1d1 !important; }
html[data-theme="dark"] .brand-initials { background: #1e3137 !important; color: #7fb0c4 !important; }
html[data-theme="dark"] .brand-topbar .w-px { background: #2a4148 !important; }

/* Menu */
html[data-theme="dark"] .menu-backdrop,
html[data-theme="dark"] .drawer-backdrop,
html[data-theme="dark"] .modal { background: rgba(3, 12, 15, .68) !important; }
html[data-theme="dark"] .menu-panel { background: #102226 !important; border-right-color: #22383e; }
html[data-theme="dark"] .menu-head { background: #102226 !important; border-bottom-color: #22383e !important; }
html[data-theme="dark"] .menu-wordmark { color: #eaf1f2 !important; }
html[data-theme="dark"] .menu-close { background: #1e3137 !important; color: #afc3c7 !important; }
html[data-theme="dark"] .menu-item { color: #eaf1f2 !important; }
html[data-theme="dark"] .menu-item i { color: #afc3c7 !important; }
html[data-theme="dark"] .menu-item:hover { background: #17282d !important; }
html[data-theme="dark"] .menu-item.active { background: #1e3137 !important; color: #7fb0c4 !important; }
html[data-theme="dark"] .menu-item.active i { color: #7fb0c4 !important; }

/* Auth drawers */
html[data-theme="dark"] #login-modal .auth-drawer,
html[data-theme="dark"] #register-modal .auth-drawer { background: #102226 !important; }
html[data-theme="dark"] .auth-head { background: #102226 !important; }
html[data-theme="dark"] .auth-brand { color: #7fb0c4; }
html[data-theme="dark"] .auth-head h3 { color: #eaf1f2 !important; }
html[data-theme="dark"] .auth-head p,
html[data-theme="dark"] .auth-note,
html[data-theme="dark"] .auth-link-muted,
html[data-theme="dark"] .auth-rules,
html[data-theme="dark"] .auth-consent { color: #afc3c7 !important; }
html[data-theme="dark"] .auth-label { color: #eaf1f2 !important; }
html[data-theme="dark"] .auth-close { background: #1e3137 !important; color: #afc3c7 !important; }
html[data-theme="dark"] .auth-input { background: #1e3137 !important; color: #eaf1f2 !important; -webkit-text-fill-color: #eaf1f2 !important; }
html[data-theme="dark"] .auth-input::placeholder { color: #8fa5aa !important; -webkit-text-fill-color: #8fa5aa !important; }
html[data-theme="dark"] .auth-submit { background: #7fb0c4 !important; color: #0f1d21 !important; }
html[data-theme="dark"] .auth-link { color: #7fb0c4; }
html[data-theme="dark"] .auth-rules .rule-off { color: #617a80; }
html[data-theme="dark"] .auth-rules .rule-on,
html[data-theme="dark"] .auth-rules li.text-secondary { color: #7fb0c4; }

/* All drawers */
html[data-theme="dark"] .modal-drawer-panel,
html[data-theme="dark"] .drawer-panel { background: #102226 !important; color: #eaf1f2 !important; }
html[data-theme="dark"] .modal-drawer-panel > div:first-child { background: #102226 !important; border-color: #22383e !important; }
html[data-theme="dark"] .modal-drawer-panel .border-b,
html[data-theme="dark"] .modal-drawer-panel .border-t,
html[data-theme="dark"] .drawer-header,
html[data-theme="dark"] .drawer-footer { border-color: #22383e !important; }
html[data-theme="dark"] .drawer-header,
html[data-theme="dark"] .drawer-footer,
html[data-theme="dark"] .drawer-body { background: #102226 !important; }
html[data-theme="dark"] .modal-drawer-panel h3,
html[data-theme="dark"] .modal-drawer-panel label,
html[data-theme="dark"] .drawer-panel h2,
html[data-theme="dark"] .drawer-panel h3,
html[data-theme="dark"] .drawer-panel label { color: #eaf1f2 !important; }
html[data-theme="dark"] .modal-drawer-panel .bg-primary,
html[data-theme="dark"] .drawer-panel .bg-primary { background: #7fb0c4 !important; color: #0f1d21 !important; }

html[data-theme="dark"] body :is(.drawer-panel, .modal-drawer-panel) input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]),
html[data-theme="dark"] body :is(.drawer-panel, .modal-drawer-panel) select,
html[data-theme="dark"] body :is(.drawer-panel, .modal-drawer-panel) textarea {
    background: #1e3137 !important;
    color: #eaf1f2 !important;
    -webkit-text-fill-color: #eaf1f2 !important;
    box-shadow: none !important;
}
html[data-theme="dark"] body :is(.drawer-panel, .modal-drawer-panel) input::placeholder,
html[data-theme="dark"] body :is(.drawer-panel, .modal-drawer-panel) textarea::placeholder { color: #8fa5aa !important; -webkit-text-fill-color: #8fa5aa !important; }
html[data-theme="dark"] body :is(.drawer-panel, .modal-drawer-panel) input:focus,
html[data-theme="dark"] body :is(.drawer-panel, .modal-drawer-panel) select:focus,
html[data-theme="dark"] body :is(.drawer-panel, .modal-drawer-panel) textarea:focus { box-shadow: 0 0 0 2px #7fb0c4 !important; }

/* Chessboard */
html[data-theme="dark"] .chessboard-container { background: transparent !important; }
html[data-theme="dark"] .chessboard-table td,
html[data-theme="dark"] .chessboard-table th { border-color: #22383e !important; }
html[data-theme="dark"] .cell-empty:hover { background-color: #17282d !important; }
html[data-theme="dark"] .today-overlay { background: rgba(127, 176, 196, .12) !important; border-left-color: #7fb0c4 !important; }
html[data-theme="dark"] .filter-active-dot { background: #7fb0c4 !important; }
html[data-theme="dark"] .stat-card { background: #17282d !important; border-color: #2a4148 !important; }
html[data-theme="dark"] .stat-card:hover { border-color: #3b5960 !important; }
html[data-theme="dark"] .stat-card * { color: #eaf1f2; }
html[data-theme="dark"] .btn-primary { background: #7fb0c4 !important; color: #0f1d21 !important; }
html[data-theme="dark"] .btn-primary:hover { background: #94c1d1 !important; }
html[data-theme="dark"] .booking-bar[class~="bg-blue-500"] { background-color: #4c87a0 !important; color: #fff !important; }
html[data-theme="dark"] .chat-bubble-out { background: #2a4148; color: #eaf1f2; }

/* Tasks */
html[data-theme="dark"] .type-chip { background: #17282d !important; border-color: #2a4148 !important; color: #eaf1f2 !important; }
html[data-theme="dark"] .type-chip:hover { background: #1e3137 !important; }
html[data-theme="dark"] .type-chip.active { background: #7fb0c4 !important; border-color: #7fb0c4 !important; color: #0f1d21 !important; }
html[data-theme="dark"] .task-card { background: #17282d !important; border-color: #2a4148 !important; }
html[data-theme="dark"] .task-card:hover { border-color: #7fb0c4 !important; }
html[data-theme="dark"] .task-card.selected { background: #1e3137 !important; border-color: #7fb0c4 !important; }
html[data-theme="dark"] .task-title { color: #eaf1f2 !important; }
html[data-theme="dark"] .task-meta { color: #afc3c7 !important; }
html[data-theme="dark"] .task-assignee { background: #1e3137 !important; color: #afc3c7 !important; }
html[data-theme="dark"] .task-check { accent-color: #7fb0c4; }

/* Guests */
html[data-theme="dark"] #view-stay { background: #0f1d21 !important; }
html[data-theme="dark"] .stay-list { background: #102226 !important; border-color: #22383e !important; }
html[data-theme="dark"] .stay-list-title,
html[data-theme="dark"] .stay-ws-left h2,
html[data-theme="dark"] .stay-dialog-name,
html[data-theme="dark"] .stay-card-title { color: #eaf1f2 !important; }
html[data-theme="dark"] .stay-search,
html[data-theme="dark"] .stay-select { background: #1e3137 !important; border-color: #2a4148 !important; color: #eaf1f2 !important; }
html[data-theme="dark"] .stay-dialog:hover { background: #17282d !important; }
html[data-theme="dark"] .stay-dialog.active,
html[data-theme="dark"] .stay-dialog.has-unread,
html[data-theme="dark"] .stay-dialog.is-today.active { background: #1e3137 !important; border-color: #2a4148 !important; }
html[data-theme="dark"] .stay-dialog.active:hover,
html[data-theme="dark"] .stay-dialog.is-today.active:hover { background: #22383e !important; }
html[data-theme="dark"] .stay-dialog.is-today { background: #102226 !important; }
html[data-theme="dark"] .stay-dialog.is-today.is-checkin { border-left-color: #22c55e !important; }
html[data-theme="dark"] .stay-dialog.is-today.is-checkout { border-left-color: #f59e0b !important; }
html[data-theme="dark"] .stay-dialog.has-unread { border-left-color: #7fb0c4 !important; }
html[data-theme="dark"] .stay-dialog.has-unread .stay-dialog-name { color: #7fb0c4 !important; }
html[data-theme="dark"] .stay-dialog.has-unread .stay-dialog-preview { color: #eaf1f2 !important; }
html[data-theme="dark"] .stay-unread-chip { background: #17282d !important; border-color: #2a4148 !important; color: #eaf1f2 !important; }
html[data-theme="dark"] .stay-unread-chip.active { background: #1e3137 !important; border-color: #7fb0c4 !important; color: #7fb0c4 !important; }
html[data-theme="dark"] .stay-badge.deposit { background: #7fb0c4 !important; color: #0f1d21 !important; }
html[data-theme="dark"] .stay-ws-phone { color: #7fb0c4 !important; }
html[data-theme="dark"] .stay-tab { color: #afc3c7; }
html[data-theme="dark"] .stay-tab.active { color: #eaf1f2 !important; border-bottom-color: #7fb0c4 !important; }
html[data-theme="dark"] .stay-btn { background: #17282d !important; border-color: #2a4148 !important; color: #eaf1f2 !important; }
html[data-theme="dark"] .stay-btn:hover { background: #1e3137 !important; }
html[data-theme="dark"] .stay-btn.primary { background: #7fb0c4 !important; border-color: #7fb0c4 !important; color: #0f1d21 !important; }
html[data-theme="dark"] .stay-wf-step.current .stay-wf-dot { background: #7fb0c4 !important; color: #0f1d21 !important; box-shadow: 0 0 0 4px rgba(127,176,196,.18) !important; }
html[data-theme="dark"] .stay-wf-step.done .stay-wf-dot { background: #22c55e !important; }
html[data-theme="dark"] .msg-filter-btn { background: #17282d !important; border-color: #2a4148 !important; color: #eaf1f2 !important; }
html[data-theme="dark"] .msg-filter-btn.active { background: #7fb0c4 !important; border-color: #7fb0c4 !important; color: #0f1d21 !important; }
html[data-theme="dark"] .ev-in { background: #1e3137; color: #eaf1f2; }
html[data-theme="dark"] .ev-out { background: #7fb0c4 !important; color: #0f1d21 !important; }
html[data-theme="dark"] .stay-send { background: #7fb0c4 !important; color: #0f1d21 !important; }
html[data-theme="dark"] .stay-composer-row textarea { background: #1e3137 !important; border-color: #2a4148 !important; color: #eaf1f2 !important; }
html[data-theme="dark"] .stay-card { background: #17282d !important; border-color: #2a4148 !important; }

/* Settings / pricing / reports */
html[data-theme="dark"] .settings-sidebar { background: #102226 !important; border-color: #22383e !important; }
html[data-theme="dark"] .settings-content { background: #0f1d21 !important; }
html[data-theme="dark"] .settings-nav-item { color: #afc3c7; }
html[data-theme="dark"] .settings-nav-item:hover { background: #17282d !important; color: #eaf1f2 !important; }
html[data-theme="dark"] .settings-nav-item.is-active { background: #1e3137 !important; color: #7fb0c4 !important; border-left-color: #7fb0c4 !important; }
html[data-theme="dark"] .settings-card { background: #17282d !important; border-color: #2a4148 !important; }
html[data-theme="dark"] .switch:checked { background: #7fb0c4 !important; }
html[data-theme="dark"] .pricing-input { background: #1e3137 !important; color: #eaf1f2 !important; }
html[data-theme="dark"] .rep-tabs,
html[data-theme="dark"] .period-toggle { background: #17282d !important; }
html[data-theme="dark"] .rep-tab.active,
html[data-theme="dark"] .period-toggle-btn.active { background: #1e3137 !important; color: #eaf1f2 !important; }
html[data-theme="dark"] .rep-period select { background: #1e3137 !important; color: #eaf1f2 !important; }
html[data-theme="dark"] .rep-btn { background: #17282d !important; border-color: #2a4148 !important; color: #eaf1f2 !important; }
html[data-theme="dark"] .rep-btn.primary { background: #7fb0c4 !important; border-color: #7fb0c4 !important; color: #0f1d21 !important; }
html[data-theme="dark"] .kpi-card,
html[data-theme="dark"] .rep-card { background: #17282d !important; border-color: #2a4148 !important; }
html[data-theme="dark"] .kpi-value,
html[data-theme="dark"] .rep-card-title,
html[data-theme="dark"] .donut-row b,
html[data-theme="dark"] .top-name,
html[data-theme="dark"] .top-revenue,
html[data-theme="dark"] .exp-title,
html[data-theme="dark"] .exp-amount { color: #eaf1f2 !important; }
html[data-theme="dark"] .top-card { border-color: #2a4148 !important; }
html[data-theme="dark"] .top-card.first { background: #1e3137 !important; border-color: #2a4148 !important; }
html[data-theme="dark"] .cascade-row.total { background: #1e3137 !important; border-color: #7fb0c4 !important; color: #eaf1f2 !important; }
html[data-theme="dark"] .op-type-toggle button.active { background: #7fb0c4 !important; border-color: #7fb0c4 !important; color: #0f1d21 !important; }
html[data-theme="dark"] .rep-svg path[stroke="#356a8a"] { stroke: #7fb0c4 !important; }
html[data-theme="dark"] .rep-svg path[fill="rgba(53,106,138,.12)"] { fill: rgba(127,176,196,.16) !important; }
html[data-theme="dark"] .rep-svg rect[fill="#356a8a"] { fill: #7fb0c4 !important; }
html[data-theme="dark"] .rep-svg circle[fill="#356a8a"] { fill: #7fb0c4 !important; }

/* Dark-theme corrections for the specific controls that carry the most state. */
html[data-theme="dark"] .brand-topbar #topbar-company-name,
html[data-theme="dark"] .brand-topbar #nav-public .brand-login { color: #eaf1f2 !important; }
html[data-theme="dark"] .brand-topbar .brand-subtitle { color: #afc3c7 !important; }
html[data-theme="dark"] .task-filters .type-chip { background: #17282d !important; color: #eaf1f2 !important; border-color: #2a4148 !important; }
html[data-theme="dark"] .task-filters .type-chip.active { background: #7fb0c4 !important; color: #0f1d21 !important; border-color: #7fb0c4 !important; }
html[data-theme="dark"] .stay-group-head { background: #17282d !important; color: #afc3c7 !important; }
html[data-theme="dark"] .stay-group-head b { color: #eaf1f2 !important; }
html[data-theme="dark"] .stay-badge-today { background: #1e3137 !important; color: #eaf1f2 !important; }
html[data-theme="dark"] .stay-badge-today.checkin { background: #123c2c !important; color: #86efac !important; }
html[data-theme="dark"] .stay-badge-today.inhouse { background: #1e3137 !important; color: #7fb0c4 !important; }
html[data-theme="dark"] .stay-badge-today.checkout { background: #3a2a12 !important; color: #fbbf24 !important; }
html[data-theme="dark"] .stay-badge.debt,
html[data-theme="dark"] .stay-badge.problem { background: #4a1f22 !important; color: #fecaca !important; }
/* Auth body is a separate surface; force it in dark mode with enough specificity. */
html[data-theme="dark"] body #login-modal .auth-body,
html[data-theme="dark"] body #register-modal .auth-body { background: #102226 !important; }
html[data-theme="dark"] body #login-modal .auth-head h3,
html[data-theme="dark"] body #register-modal .auth-head h3 { color: #eaf1f2 !important; }
html[data-theme="dark"] body #login-modal .auth-head p,
html[data-theme="dark"] body #register-modal .auth-head p { color: #afc3c7 !important; }
html[data-theme="dark"] body #login-modal .auth-label,
html[data-theme="dark"] body #register-modal .auth-label { color: #eaf1f2 !important; }
html[data-theme="dark"] body #login-modal .auth-input,
html[data-theme="dark"] body #register-modal .auth-input {
    background: #1e3137 !important;
    color: #eaf1f2 !important;
    -webkit-text-fill-color: #eaf1f2 !important;
}
html[data-theme="dark"] body #login-modal .auth-input::placeholder,
html[data-theme="dark"] body #register-modal .auth-input::placeholder { color: #8fa5aa !important; -webkit-text-fill-color: #8fa5aa !important; }
html[data-theme="dark"] body #login-modal .auth-submit,
html[data-theme="dark"] body #register-modal .auth-submit { background: #7fb0c4 !important; color: #0f1d21 !important; }
html[data-theme="dark"] body #login-modal .auth-link,
html[data-theme="dark"] body #register-modal .auth-link { color: #7fb0c4 !important; }
html[data-theme="dark"] body #login-modal .auth-link-muted,
html[data-theme="dark"] body #register-modal .auth-link-muted { color: #afc3c7 !important; }
html[data-theme="dark"] body #login-modal .auth-note,
html[data-theme="dark"] body #register-modal .auth-note { color: #afc3c7 !important; }
html[data-theme="dark"] .menu-logo { background: #1e3137 !important; }
html[data-theme="dark"] .menu-logo i { color: #7fb0c4 !important; }
html[data-theme="dark"] .menu-item .nav-badge { background: #7fb0c4 !important; color: #0f1d21 !important; }
/* Week arrows live over the table, at the visible edges of the board. */
/* Compact week arrows instead of full-height strips. */
/* Restore the original full-height week arrows. */

/* Hamburger in dark mode. */
html[data-theme="dark"] .brand-topbar #topbar-hamburger { color: #eaf1f2 !important; background: transparent !important; }
html[data-theme="dark"] .brand-topbar #topbar-hamburger:hover { background: #1e3137 !important; }

/* One corner language: 6px for surfaces, 4px for controls, circles stay circles. */
[class*="rounded-2xl"], [class*="rounded-3xl"] { border-radius: 6px !important; }
[class*="rounded-xl"], [class*="rounded-lg"], [class*="rounded-md"] { border-radius: 4px !important; }
[class~="rounded"] { border-radius: 4px !important; }
.modal-drawer-panel { border-radius: 6px 0 0 6px !important; }
#login-modal .auth-drawer, #register-modal .auth-drawer { border-radius: 6px 0 0 6px !important; }
.stay-dialog, .stay-card, .stay-workflow { border-radius: 6px !important; }
.stay-search, .stay-select, .stay-btn, .stay-pager button { border-radius: 4px !important; }
@media (max-width: 640px) {
    .modal-drawer-panel, #login-modal .auth-drawer, #register-modal .auth-drawer { border-radius: 0 !important; }
}

/* Dark analytics: labels and tables must stay readable. */
html[data-theme="dark"] .kpi-label,
html[data-theme="dark"] .kpi-prev,
html[data-theme="dark"] .rep-range,
html[data-theme="dark"] .rep-muted,
html[data-theme="dark"] .top-meta { color: #afc3c7 !important; }
html[data-theme="dark"] .donut-row { color: #afc3c7 !important; }
html[data-theme="dark"] .donut-row b { color: #eaf1f2 !important; }
html[data-theme="dark"] .rep-tab { color: #afc3c7 !important; }
html[data-theme="dark"] .rep-tab.active { color: #eaf1f2 !important; }
html[data-theme="dark"] .rep-table th { color: #8fa5aa !important; border-color: #2a4148 !important; }
html[data-theme="dark"] .rep-table td { color: #eaf1f2 !important; border-color: #22383e !important; }
html[data-theme="dark"] .rep-table tr { border-color: #22383e !important; }
html[data-theme="dark"] .exp-title span { color: #8fa5aa !important; }
html[data-theme="dark"] .op-field label { color: #afc3c7 !important; }
html[data-theme="dark"] .rep-svg rect[fill="#e2e8f0"] { fill: #2a4148 !important; }
/* The left arrow sits at the edge of the fixed object column, not under it. */

/* Dark report/tax pages */
html[data-theme="dark"] .reports-page { background: #0f1d21 !important; color: #eaf1f2 !important; }
html[data-theme="dark"] .cascade-row.income { background: #123c2c !important; color: #86efac !important; }
html[data-theme="dark"] .cascade-row.commission { background: #3a2a12 !important; color: #fbbf24 !important; }
html[data-theme="dark"] .cascade-row.expense { background: #4a1f22 !important; color: #fecaca !important; }
html[data-theme="dark"] .cascade-row.total { background: #1e3137 !important; border-color: #7fb0c4 !important; color: #eaf1f2 !important; }
html[data-theme="dark"] #view-tax .opacity-70 { opacity: 1 !important; }
html[data-theme="dark"] #view-tax .bg-white { background: #17282d !important; }
html[data-theme="dark"] #view-tax h1,
html[data-theme="dark"] #view-tax h2,
html[data-theme="dark"] #view-tax .text-slate-900,
html[data-theme="dark"] #view-tax .text-slate-800 { color: #eaf1f2 !important; }
html[data-theme="dark"] #view-tax p,
html[data-theme="dark"] #view-tax .text-slate-500 { color: #afc3c7 !important; }

/* Week arrows are fixed at the visible board edges and use the active-booking steel. */

/* Week arrows: colour only, no layout or behaviour changes. */
.nav-arrow { background: #356a8a !important; border-color: #356a8a !important; }
.nav-arrow-label { color: #ffffff !important; }
.nav-arrow:hover { background: #2b5872 !important; border-color: #2b5872 !important; }
html[data-theme="dark"] .nav-arrow { background: #4c87a0 !important; border-color: #4c87a0 !important; }
html[data-theme="dark"] .nav-arrow-label { color: #ffffff !important; }
html[data-theme="dark"] .nav-arrow:hover { background: #5b9ab3 !important; border-color: #5b9ab3 !important; }


/* ---------- Settings: locations and objects ---------- */
.settings-card {
    background: #fff !important;
    border-color: #e1e9eb !important;
    border-radius: 6px !important;
    box-shadow: none !important;
}
.settings-title-block h1 { color: #17262b !important; }
.settings-title-block p { color: #40565d !important; }

.obj-card {
    background: #fff !important;
    border-color: #e1e9eb !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    padding: 16px !important;
}
.obj-card:hover {
    border-color: #356a8a !important;
    box-shadow: none !important;
    transform: none !important;
}
.obj-image {
    height: 138px !important;
    border-radius: 4px !important;
    background: #d7e3e7 !important;
    color: #356a8a !important;
}
.obj-image-icon {
    border-radius: 4px !important;
    background: #17262b !important;
    color: #fff !important;
    backdrop-filter: none !important;
}
.obj-image .obj-cover { border-radius: 4px !important; }
.obj-status { border-radius: 4px !important; }
.obj-status.active { background: #dcfce7 !important; color: #166534 !important; }
.obj-status.inactive { background: #e1e9eb !important; color: #40565d !important; }
.obj-card .bg-slate-50 { background: #e1e9eb !important; }
.obj-card h3 { color: #17262b !important; }
.obj-card p { color: #40565d !important; }
.section-card {
    background: #fff !important;
    border-color: #e1e9eb !important;
    border-radius: 6px !important;
    box-shadow: none !important;
}
.section-card:hover { border-color: #356a8a !important; box-shadow: none !important; transform: none !important; }
.section-title { color: #17262b !important; }
.section-preview { color: #40565d !important; }

/* ---------- Settings: subscription ---------- */
#current-subscription > div {
    background: #e1e9eb !important;
    border: 1px solid #d7e3e7 !important;
    border-radius: 6px !important;
}
#current-subscription .bg-blue-100 { background: #d7e3e7 !important; }
#current-subscription .text-primary { color: #356a8a !important; }
#current-subscription .bg-primary { background: #356a8a !important; }
#current-subscription .bg-slate-100 { background: #d7e3e7 !important; }

#subscription-tariffs > div {
    background: #fff !important;
    border-width: 1px !important;
    border-color: #e1e9eb !important;
    border-radius: 6px !important;
    box-shadow: none !important;
}
#subscription-tariffs > div[class*="border-green-500"] { border-color: #2f6b4f !important; }
#subscription-tariffs > div[class*="border-primary"] { border-color: #356a8a !important; }
#subscription-tariffs > div[class*="opacity-60"] { opacity: .55 !important; }
#subscription-tariffs .bg-primary { background: #356a8a !important; }
#subscription-tariffs .bg-green-500 { background: #2f6b4f !important; }
#subscription-tariffs .text-primary { color: #356a8a !important; }
#subscription-tariffs .border-primary { border-color: #356a8a !important; }
#subscription-tariffs .text-secondary { color: #2f6b4f !important; }
#subscription-tariffs .bg-green-100 { background: #dcfce7 !important; }
#subscription-tariffs .text-green-700 { color: #166534 !important; }
#subscription-tariffs .bg-slate-100 { background: #e1e9eb !important; }
#subscription-tariffs .bg-white { background: #fff !important; }
#subscription-tariffs button {
    border-radius: 4px !important;
    min-height: 44px;
    box-shadow: none !important;
}
#subscription-tariffs button[class*="bg-primary"] { background: #356a8a !important; color: #fff !important; }
#subscription-tariffs button[class*="bg-primary"]:hover { background: #2b5872 !important; }
#subscription-tariffs button[class*="border-primary"] { background: #fff !important; color: #356a8a !important; }
#subscription-tariffs button[class*="border-primary"]:hover { background: #e1e9eb !important; }

#orders-history > div > div {
    background: #e1e9eb !important;
    border-radius: 4px !important;
}
#orders-history .bg-white { background: #fff !important; }
#orders-history .bg-blue-50 { background: #d7e3e7 !important; }

html[data-theme="dark"] .settings-card { background: #17282d !important; border-color: #2a4148 !important; }
html[data-theme="dark"] .settings-title-block h1 { color: #eaf1f2 !important; }
html[data-theme="dark"] .settings-title-block p { color: #afc3c7 !important; }
html[data-theme="dark"] .obj-card { background: #17282d !important; border-color: #2a4148 !important; }
html[data-theme="dark"] .obj-card:hover { border-color: #7fb0c4 !important; }
html[data-theme="dark"] .obj-image { background: #1e3137 !important; color: #7fb0c4 !important; }
html[data-theme="dark"] .obj-image-icon { background: rgba(3, 12, 15, .7) !important; }
html[data-theme="dark"] .obj-status.active { background: #123c2c !important; color: #86efac !important; }
html[data-theme="dark"] .obj-status.inactive { background: #1e3137 !important; color: #afc3c7 !important; }
html[data-theme="dark"] .obj-card .bg-slate-50 { background: #1e3137 !important; }
html[data-theme="dark"] .obj-card h3 { color: #eaf1f2 !important; }
html[data-theme="dark"] .obj-card p { color: #afc3c7 !important; }
html[data-theme="dark"] .section-card { background: #17282d !important; border-color: #2a4148 !important; }
html[data-theme="dark"] .section-title { color: #eaf1f2 !important; }
html[data-theme="dark"] .section-preview { color: #afc3c7 !important; }

html[data-theme="dark"] #current-subscription > div { background: #17282d !important; border-color: #2a4148 !important; }
html[data-theme="dark"] #current-subscription .bg-blue-100 { background: #1e3137 !important; }
html[data-theme="dark"] #current-subscription .bg-slate-100 { background: #2a4148 !important; }
html[data-theme="dark"] #current-subscription .bg-primary { background: #7fb0c4 !important; }
html[data-theme="dark"] #current-subscription .text-primary { color: #7fb0c4 !important; }
html[data-theme="dark"] #current-subscription .text-dark { color: #eaf1f2 !important; }
html[data-theme="dark"] #subscription-tariffs > div { background: #17282d !important; border-color: #2a4148 !important; }
html[data-theme="dark"] #subscription-tariffs > div[class*="border-green-500"] { border-color: #4ade80 !important; }
html[data-theme="dark"] #subscription-tariffs > div[class*="border-primary"] { border-color: #7fb0c4 !important; }
html[data-theme="dark"] #subscription-tariffs .bg-primary { background: #7fb0c4 !important; color: #0f1d21 !important; }
html[data-theme="dark"] #subscription-tariffs .bg-green-500 { background: #166534 !important; color: #dcfce7 !important; }
html[data-theme="dark"] #subscription-tariffs .text-primary { color: #7fb0c4 !important; }
html[data-theme="dark"] #subscription-tariffs .border-primary { border-color: #7fb0c4 !important; }
html[data-theme="dark"] #subscription-tariffs .text-secondary { color: #86efac !important; }
html[data-theme="dark"] #subscription-tariffs .bg-green-100 { background: #123c2c !important; }
html[data-theme="dark"] #subscription-tariffs .text-green-700 { color: #86efac !important; }
html[data-theme="dark"] #subscription-tariffs .bg-slate-100 { background: #1e3137 !important; }
html[data-theme="dark"] #subscription-tariffs .bg-white { background: #17282d !important; }
html[data-theme="dark"] #subscription-tariffs .text-dark,
html[data-theme="dark"] #subscription-tariffs .text-muted { color: #afc3c7 !important; }
html[data-theme="dark"] #subscription-tariffs button[class*="border-primary"] { background: #17282d !important; color: #7fb0c4 !important; }
html[data-theme="dark"] #subscription-tariffs button[class*="border-primary"]:hover { background: #1e3137 !important; }
html[data-theme="dark"] #orders-history > div > div { background: #1e3137 !important; }
html[data-theme="dark"] #orders-history .bg-white { background: #17282d !important; }
html[data-theme="dark"] #orders-history .bg-blue-50 { background: #1e3137 !important; }

/* Access settings: compact, legible switches. */
.switch {
    width: 44px !important;
    height: 24px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #c4d2d7 !important;
    box-shadow: none !important;
    flex: 0 0 44px !important;
}
.switch::after {
    top: 3px !important;
    left: 3px !important;
    width: 18px !important;
    height: 18px !important;
    background: #fff !important;
    box-shadow: none !important;
}
.switch:checked { background: #356a8a !important; }
.switch:checked::after { left: 23px !important; }
.switch:focus-visible { outline: 3px solid #7fb2c8 !important; outline-offset: 2px !important; }
.access-toggle { min-height: 58px; }
.access-toggle > span:first-child { line-height: 1.3; }

html[data-theme="dark"] .switch { background: #2a4148 !important; }
html[data-theme="dark"] .switch::after { background: #eaf1f2 !important; }
html[data-theme="dark"] .switch:checked { background: #7fb0c4 !important; }
html[data-theme="dark"] .switch:checked::after { background: #0f1d21 !important; }

/* Tasks: add menu */
.task-add-wrap { position: relative; display: inline-flex; }
.task-add-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 192px;
    padding: 5px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
    z-index: 120;
}
.task-add-menu.hidden { display: none; }
.task-add-menu button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #334155;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.task-add-menu button:hover { background: #f1f5f9; color: #0f172a; }
.task-add-menu button i { width: 15px; height: 15px; color: #64748b; }
html[data-theme="dark"] .task-add-menu { background: #17282d; border-color: #2a4148; box-shadow: 0 12px 28px rgba(0,0,0,.35); }
html[data-theme="dark"] .task-add-menu button { color: #eaf1f2; }
html[data-theme="dark"] .task-add-menu button:hover { background: #1e3137; color: #fff; }
html[data-theme="dark"] .task-add-menu button i { color: #8fa7ad; }

/* Password visibility */
.auth-password { position: relative; }
.auth-password .auth-input { padding-right: 46px; }
.auth-eye {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #63777e;
    cursor: pointer;
}
.auth-eye:hover { background: #e8eff1; color: #17262b; }
.auth-eye:focus-visible { outline: 2px solid #356a8a; outline-offset: 1px; }
html[data-theme="dark"] .auth-eye { color: #afc3c7; }
html[data-theme="dark"] .auth-eye:hover { background: #2a4148; color: #eaf1f2; }