:root {
    --bg: #f4faff;
    --ink: #1e1a16;
    --muted: #6b5f56;
    --line: #eee;
    --cream: #ecdca0;
    --brand: #7d331e;
    --brand-dark: #6e2b17;
    --panel: #f7f4ec;
    --field-border: #d8d0c2;
    --section-title: #5b3a2d;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: system-ui, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
}

a {
    color: inherit;
}

main {
    padding: 0;
}

.topbar {
    align-items: center;
    background: #3b7d9e;
    color: #fff;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 18px;
}

.mobile-menu-toggle {
    display: none;
}

.role-reception .topbar {
    background: #453832;
}

.topbar span {
    color: #eadfce;
    margin-left: 10px;
}

.topbar nav {
    align-items: center;
    display: flex;
    gap: 8px;
}

.topbar a,
.topbar summary,
.topbar .nav-tutorial-button {
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    display: block;
    line-height: 1.2;
    padding: 6px 7px;
    text-decoration: none;
}

.topbar a:hover,
.topbar summary:hover,
.topbar .nav-tutorial-button:hover {
    background: rgba(255, 255, 255, .12);
    border-radius: 4px;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown summary {
    list-style: none;
}

.nav-dropdown summary::-webkit-details-marker {
    display: none;
}

.nav-dropdown summary::after {
    content: "▾";
    font-size: 10px;
    margin-left: 5px;
}

.nav-dropdown-menu {
    background: #216384;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 4px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
    display: none;
    min-width: 180px;
    padding: 6px;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 50;
}

.nav-dropdown[open] .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu {
    display: grid;
    gap: 2px;
}

.nav-dropdown-menu a {
    white-space: nowrap;
}

.nav-dropdown-heading {
    color: rgba(255, 255, 255, .72);
    font-size: 11px;
    font-weight: 700;
    padding: 7px 8px 2px;
    text-transform: uppercase;
}

.global-search {
    position: relative;
    width: min(280px, 28vw);
}

.global-search input {
    background: rgba(255, 255, 255, .96);
    border: 0;
    border-radius: 4px;
    color: #1e1a16;
    height: 30px;
    padding: 6px 9px;
}

.global-search-results {
    background: #f7f4ec;
    border: 1px solid #d8d0c2;
    border-radius: 6px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
    color: #1e1a16;
    display: grid;
    gap: 2px;
    max-height: min(420px, 70vh);
    min-width: 360px;
    overflow: auto;
    padding: 6px;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 80;
}

.global-search-results[hidden] {
    display: none;
}

.global-search-result {
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: #1e1a16;
    cursor: pointer;
    display: block;
    padding: 8px;
    text-align: left;
    width: 100%;
}

.global-search-result:hover,
.global-search-result.is-active {
    background: #eae3d5;
}

.global-search-result strong,
.global-search-result span {
    display: block;
}

.global-search-result span {
    color: #6b5f56;
    font-size: 12px;
    margin-top: 2px;
}

.global-search-empty {
    color: #6b5f56;
    padding: 8px;
}

.nav-tutorial-button {
    background: transparent;
    border: 0;
    border-radius: 0;
    color: #fff;
    cursor: pointer;
    line-height: 1.2;
    padding: 6px 7px;
}

.nav-tutorial-button:hover {
    background: rgba(255, 255, 255, .12);
    border-radius: 4px;
}

.nav-menu-button {
    background: transparent;
    border: 0;
    border-radius: 0;
    color: #fff;
    cursor: pointer;
    display: block;
    justify-content: flex-start;
    line-height: 1.2;
    padding: 6px 7px;
    text-align: left;
    width: 100%;
}

.nav-menu-button:hover {
    background: rgba(255, 255, 255, .12);
}

.pms-tour-overlay {
    background: rgba(20, 18, 16, .48);
    bottom: 0;
    display: none;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1000;
}

.pms-tour-overlay.is-active {
    display: block;
}

.pms-tour-highlight {
    border: 2px solid #ff7800;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(20, 18, 16, .48), 0 8px 26px rgba(0, 0, 0, .28);
    display: none;
    pointer-events: none;
    position: fixed;
    z-index: 1001;
}

.pms-tour-highlight.is-active {
    display: block;
}

.pms-tour-card {
    background: #f7f4ec;
    border: 1px solid #d8d0c2;
    border-radius: 8px;
    box-shadow: 0 16px 46px rgba(0, 0, 0, .28);
    color: #1e1a16;
    display: none;
    max-width: 380px;
    padding: 18px 16px 16px;
    position: fixed;
    width: calc(100vw - 32px);
    z-index: 1002;
}

.pms-tour-close {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: #6b5f56;
    cursor: pointer;
    display: inline-flex;
    font-size: 20px;
    height: 28px;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 8px;
    top: 8px;
    width: 28px;
}

.pms-tour-close:hover {
    background: #eae3d5;
    color: #1e1a16;
}

.pms-tour-card.is-active {
    display: grid;
    gap: 12px;
}

.pms-tour-card h2 {
    color: #5b3a2d;
    font-size: 18px;
    margin: 0;
}

.pms-tour-card p {
    color: #3d352f;
    line-height: 1.45;
    margin: 0;
}

.pms-tour-progress {
    color: #6b5f56;
    font-size: 12px;
    font-weight: 700;
    padding-right: 34px;
}

.pms-tour-note {
    color: #7b7068 !important;
    font-size: 12px;
    line-height: 1.35;
}

.pms-tour-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.pms-tour-actions button {
    padding: 7px 10px;
}

@media (max-width: 520px) {
    .pms-tour-card {
        max-height: calc(100vh - 28px);
        overflow: auto;
        padding: 18px 14px 14px;
    }

    .pms-tour-actions {
        justify-content: stretch;
    }

    .pms-tour-actions button {
        flex: 1;
    }
}

.proforma-reminder {
    background: rgba(30, 26, 22, .38);
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    left: 0;
    padding: 18px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 90;
}

.proforma-reminder[hidden] {
    display: none;
}

.proforma-reminder-card {
    align-self: flex-start;
    background: #f7f4ec;
    border: 1px solid #d8d0c2;
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, .24);
    max-width: 420px;
    padding: 14px;
    width: min(420px, calc(100vw - 36px));
}

.proforma-reminder-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.proforma-reminder h2 {
    color: #5b3a2d;
    font-size: 18px;
    margin: 0;
}

.proforma-reminder p {
    color: #6b5f56;
    margin: 8px 0 12px;
}

.proforma-reminder-item {
    background: #eae7e0;
    border: 1px solid #d8d0c2;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 7px;
    padding: 8px;
}

.proforma-reminder-item strong,
.proforma-reminder-item span {
    display: block;
}

.proforma-reminder-item span {
    color: #6b5f56;
    font-size: 12px;
    margin-top: 2px;
}

.proforma-reminder-link {
    margin-top: 12px;
    width: 100%;
}

.auth-page {
    align-items: center;
    display: flex;
    min-height: 100vh;
    justify-content: center;
}

.login-card {
    background: var(--panel);
    border: 1px solid var(--field-border);
    max-width: 380px;
    padding: 28px;
    width: calc(100% - 32px);
}

.login-card h1 {
    margin: 0 0 8px;
}

.login-card p {
    color: var(--muted);
    margin: 0 0 22px;
}

.turnstile-status {
    color: var(--muted);
    font-size: 13px;
    margin: 6px 0 10px;
}

#turnstileWidget {
    margin: 8px 0 14px;
}

label {
    display: grid;
    font-weight: 700;
    gap: 6px;
    margin-bottom: 12px;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    background: #fff;
    border: 1px solid var(--field-border);
    border-radius: 4px;
    padding: 8px 9px;
    width: 100%;
}

textarea {
    min-height: 76px;
    resize: vertical;
}

.large-textarea {
    min-height: 260px;
}

.field-help {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

button,
.button-secondary {
    background: #245f67;
    border: 0;
    border-radius: 4px;
    box-shadow: 0 10px 20px rgba(36, 95, 103, .16);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    padding: 9px 12px;
    text-decoration: none;
}

button:hover,
.button-secondary:hover {
    background: #1b4f56;
    color: #ffffff;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
    opacity: .68;
}

.button-secondary {
    background: #245f67;
}

.topbar .nav-menu-button {
    background: transparent;
    border: 0;
    color: #fff;
    display: block;
    justify-content: flex-start;
    padding: 6px 7px;
    text-align: left;
    width: 100%;
}

.topbar .nav-menu-button:hover {
    background: rgba(255, 255, 255, .12);
}

@media (max-width: 900px) {
    .topbar {
        align-items: stretch;
        display: grid;
        gap: 8px;
    }

    .topbar nav {
        flex-wrap: wrap;
    }

    .global-search {
        grid-column: 1 / -1;
        order: 20;
        width: 100%;
    }

    .global-search-results {
        left: 0;
        min-width: min(360px, calc(100vw - 36px));
        right: auto;
    }
}

@media (max-width: 768px) {
    .topbar {
        align-items: center;
        display: grid;
        gap: 8px 12px;
        grid-template-columns: 1fr auto;
        padding: 10px 12px;
    }

    .topbar > div {
        min-width: 0;
    }

    .topbar span {
        display: none;
    }

    .mobile-menu-toggle {
        align-items: center;
        background: rgba(255, 255, 255, .12);
        border: 1px solid rgba(255, 255, 255, .24);
        border-radius: 5px;
        color: #fff;
        display: inline-flex;
        font-size: 20px;
        height: 36px;
        justify-content: center;
        padding: 0;
        width: 42px;
    }

    .mobile-menu-toggle:hover {
        background: rgba(255, 255, 255, .18);
    }

    .topbar nav {
        display: none !important;
        grid-column: 1 / -1;
    }

    .topbar.is-mobile-menu-open nav {
        align-items: stretch;
        background: rgba(0, 0, 0, .08);
        border-radius: 6px;
        display: grid !important;
        gap: 3px;
        padding: 6px;
    }

    .topbar a,
    .topbar summary,
    .topbar .nav-menu-button,
    .nav-tutorial-button {
        display: block;
        padding: 9px 8px;
        text-align: left;
        width: 100%;
    }

    .nav-dropdown-menu {
        background: rgba(0, 0, 0, .12);
        border: 0;
        box-shadow: none;
        min-width: 0;
        padding: 4px 0 4px 14px;
        position: static;
    }

    .nav-dropdown:hover .nav-dropdown-menu {
        display: none;
    }

    .nav-dropdown[open] .nav-dropdown-menu {
        display: grid;
    }

    .global-search {
        display: none;
        grid-column: 1 / -1;
        order: 90;
        width: 100%;
    }

    .global-search input {
        height: 34px;
        width: 100%;
    }

    .global-search-results {
        left: 0;
        min-width: 0;
        right: 0;
        width: 100%;
    }
}

.alert {
    background: #ffe0dc;
    border: 1px solid #d9695d;
    margin-bottom: 14px;
    padding: 10px;
}

.page-toolbar {
    align-items: end;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.page-toolbar h1 {
    margin: 0;
}

.page-toolbar p {
    color: var(--muted);
    margin: 4px 0 0;
}

.data-panel {
    background: var(--panel);
    border: 1px solid var(--field-border);
    margin-bottom: 10px;
    overflow-x: auto;
    padding: 14px;
}

.data-table {
    border-collapse: collapse;
    width: 100%;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid var(--field-border);
    padding: 9px 8px;
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    background: #efe8d7;
    font-size: 12px;
    text-transform: uppercase;
}

.data-table tr.is-disabled {
    color: var(--muted);
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.table-actions form {
    margin: 0;
}

.table-bulk-actions {
    align-items: center;
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.table-bulk-actions select {
    width: auto;
}

.duplicate-group + .duplicate-group {
    margin-top: 16px;
}

.duplicate-group h2 {
    margin: 0;
}

.button-danger {
    background: #5b1f18;
}

.form-panel {
    max-width: 720px;
}

.wide-form-panel {
    max-width: 980px;
}

.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.catalog-filters {
    margin-bottom: 14px;
}

.catalog-filters form {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(160px, 1fr) minmax(140px, 180px) minmax(180px, 2fr) auto;
}

.filter-actions {
    display: flex;
    gap: 8px;
}

.statistics-filters {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    margin-bottom: 0;
}

.statistics-filters .toolbar-checkbox,
.statistics-filters .filter-actions {
    align-self: center;
}

.two-column-panel {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rate-center-form {
    display: grid;
    gap: 0;
}

.rate-center-controls {
    align-items: start;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(160px, 220px) minmax(160px, 220px) minmax(90px, 120px) auto;
}

.rate-center-actions {
    align-self: start;
    display: flex;
    gap: 8px;
    padding-top: 25px;
}

.rate-derived-panel {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.rate-booking-reference-note {
    background: #f4f1e5;
}

.rate-booking-converter {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 6px;
}

.rate-booking-converter label {
    color: var(--muted);
    display: grid;
    font-size: 12px;
    font-weight: 700;
    gap: 5px;
    margin-bottom: 0;
    max-width: 220px;
}

.rate-booking-converter input {
    box-sizing: border-box;
    height: 38px;
    min-width: 150px;
}

.rate-booking-converter button {
    align-items: center;
    box-sizing: border-box;
    height: 38px;
    margin: 0;
    padding-bottom: 0;
    padding-top: 0;
}

.rate-booking-converter span {
    align-items: center;
    color: var(--section-title);
    display: inline-flex;
    font-weight: 800;
    height: 38px;
    margin: 0;
    min-height: 38px;
    padding: 0;
}

.rate-season-help {
    line-height: 1.35;
    margin-top: 6px;
}

.rate-center-table th:first-child {
    min-width: 160px;
    text-align: left;
}

.rate-center-table .rate-occupancy {
    color: var(--section-title);
    font-weight: 700;
    white-space: nowrap;
}

.rate-group-row th {
    background: #ded8ca;
    color: #5b3a2d;
    font-size: 12px;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.rate-group-row small {
    color: var(--muted);
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    margin-left: 8px;
    text-transform: none;
}

.rate-center-table input {
    background: rgba(255, 255, 255, .72);
    min-width: 88px;
    width: 100%;
}

.rate-center-table input:disabled,
.rate-center-form textarea[readonly] {
    color: var(--text);
    opacity: 1;
}

.rate-override-badge {
    color: var(--muted);
    display: block;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 3px;
    text-transform: uppercase;
}

.rate-override-badge.is-manual {
    color: #7d331e;
}

.rate-recalculate-dialog {
    background: #f7f4ec;
    border: 1px solid #d8d0c2;
    border-radius: 8px;
    color: var(--text);
    max-width: 460px;
    padding: 18px;
}

.extra-bed-table {
    max-width: 620px;
}

.rate-center-note {
    margin: 0 0 10px;
}

.rate-channel-agency {
    background: #eeeeee;
}

.rate-center-table th.rate-channel-agency {
    background: #eeeeee;
}

.rate-channel-website {
    background: #ffebeb;
}

.rate-center-table th.rate-channel-website {
    background: #ffebeb;
}

.rate-channel-walk-in {
    background: #edf7ea;
}

.rate-center-table th.rate-channel-walk-in {
    background: #edf7ea;
}

.rate-channel-booking {
    background: #d5e7fd;
}

.rate-center-table th.rate-channel-booking {
    background: #d5e7fd;
}

.stats-kpi-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    margin-bottom: 14px;
}

.stats-kpi-card {
    background: #fff;
    border: 1px solid var(--field-border);
    display: grid;
    gap: 5px;
    min-height: 118px;
    padding: 14px;
}

.stats-kpi-card.is-primary {
    background: #f4f1e5;
    border-color: #c7bda7;
    grid-column: span 2;
}

.stats-kpi-card span,
.stats-kpi-card small,
.stats-bar-row small,
.empty-note {
    color: var(--muted);
}

.stats-kpi-card span {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.stats-kpi-card strong {
    color: var(--section-title);
    font-size: 28px;
    line-height: 1.05;
}

.stats-kpi-card.is-primary strong {
    font-size: 40px;
}

.stats-progress,
.stats-bar-track {
    background: #eae7e0;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.stats-progress span,
.stats-bar-track span {
    background: #3b7d9e;
    display: block;
    height: 100%;
}

.stats-chart-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 14px;
}

.stats-chart-card {
    align-content: start;
    display: grid;
    gap: 10px;
}

.stats-chart-card h2 {
    margin-bottom: 2px;
}

.stats-bar-row {
    display: grid;
    gap: 5px;
}

.stats-bar-label {
    align-items: baseline;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.stats-bar-label span {
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stats-bar-label strong {
    color: var(--section-title);
    font-size: 13px;
    white-space: nowrap;
}

.import-table input,
.import-table select {
    min-width: 120px;
}

.import-table tr.has-warning td {
    background: #fff4d6;
}

.compact-toolbar {
    align-items: start;
}

.color-chip {
    border: 1px solid var(--line);
    border-radius: 3px;
    height: 14px;
    margin-top: 4px;
    width: 34px;
}

.data-table details pre {
    max-width: 320px;
    white-space: pre-wrap;
}

@media (max-width: 780px) {
    .catalog-filters form {
        grid-template-columns: 1fr;
    }

    .statistics-filters,
    .rate-center-controls,
    .two-column-panel,
    .stats-kpi-grid,
    .stats-chart-grid {
        grid-template-columns: 1fr;
    }

    .stats-kpi-card.is-primary {
        grid-column: auto;
    }
}

.topic-picker {
    border: 1px solid var(--field-border);
    display: grid;
    gap: 4px;
    margin: 0 0 12px;
    padding: 12px;
}

.topic-picker legend {
    color: var(--section-title);
    font-weight: 800;
    padding: 0 6px;
}

.draft-panel h2 {
    margin-top: 0;
}

.alert-success {
    background: #e2f4dc;
    border-color: #7cab66;
}

.status-pill {
    background: #eae7e0;
    border-radius: 999px;
    color: #5b3a2d;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
}

.status-pill.is-active {
    background: #cfe0c8;
    color: #1f4d2a;
}

.status-pill.is-inactive {
    background: #ead1c8;
    color: #7a2f1f;
}

.users-access-table td {
    vertical-align: top;
}

.users-access-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.users-access-actions form {
    margin: 0;
}

.users-access-details {
    position: relative;
}

.users-access-details summary {
    list-style: none;
}

.users-access-details summary::-webkit-details-marker {
    display: none;
}

.users-access-button {
    box-shadow: none;
    font-size: 0.82rem;
    padding: 6px 9px;
}

.users-access-inline-form {
    background: #f7f4ec;
    border: 1px solid var(--field-border);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .16);
    margin-top: 8px;
    min-width: min(520px, calc(100vw - 48px));
    padding: 12px;
    position: absolute;
    right: 0;
    z-index: 20;
}

.settings-form {
    display: grid;
    gap: 14px;
}

.settings-panel h2 {
    color: var(--section-title);
    font-size: 18px;
    margin: 0 0 14px;
}

.settings-help {
    color: var(--muted);
    float: left;
    margin: 10px 0 12px;
}

.settings-status-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settings-status-grid div {
    background: #fff;
    border: 1px solid var(--field-border);
    padding: 10px;
}

.settings-status-grid span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
}

.settings-status-grid strong {
    color: var(--section-title);
}

.security-warning {
    background: #fff4d6;
    border-color: #d6a84f;
}

.form-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-inline-action {
    box-shadow: none;
    font-size: 12px;
    margin-top: 6px;
    min-height: 28px;
    padding: 5px 8px;
}

.finance-compact-card {
    padding: 14px 16px;
}

.finance-card-header {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 10px;
}

.finance-card-header h2 {
    margin-bottom: 4px;
}

.finance-compact-help {
    float: none;
    font-size: 12.5px;
    margin: 0;
}

.finance-proforma-row {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(120px, 160px) minmax(160px, 220px) auto;
    max-width: 560px;
}

.finance-proforma-row label,
.finance-proforma-row input {
    margin-bottom: 0;
}

.finance-header-actions {
    align-items: center;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

.finance-compact-table th,
.finance-compact-table td {
    padding: 7px 8px;
    vertical-align: middle;
}

.finance-compact-table input,
.finance-compact-table select {
    min-height: 34px;
}

.finance-compact-table tr.is-add-row td {
    background: #fbfaf7;
}

.finance-table-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.finance-table-actions .finance-inline-action {
    margin-top: 0;
}

.button-secondary.finance-inline-action.delete-checkbox {
    background: #74b600;
}

.finance-bank-modal-card {
    width: min(720px, 100%);
}

.exchange-rate-actions {
    align-items: center;
    display: block;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.exchange-rate-actions.finance-header-actions {
    display: flex;
    margin-bottom: 0;
}

.exchange-rate-updated-at {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.waiting-filter-card,
.waiting-list-card {
    margin-bottom: 16px;
}

.waiting-filter-form {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(5, minmax(120px, 1fr)) minmax(180px, 1.5fr) auto;
}

.waiting-filter-form label,
.waiting-modal-form label {
    margin-bottom: 0;
}

.waiting-filter-actions,
.waiting-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.waiting-list-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.waiting-list-head p {
    color: var(--muted);
    font-weight: 700;
    margin: 0;
}

.waiting-table th,
.waiting-table td {
    vertical-align: middle;
}

.waiting-table td small {
    color: var(--muted);
    display: block;
    margin-top: 3px;
}

.waiting-actions form {
    display: inline-flex;
    margin: 0;
}

.waiting-actions .kw-button {
    font-size: 12px;
    line-height: 1.1;
    padding: 7px 9px;
}

.waiting-priority-high {
    background: #fff1ed;
    border-color: #e29a81;
    color: #8f341f;
}

.waiting-status-active,
.waiting-status-waiting {
    background: #fff8db;
    border-color: #e4c763;
    color: #765c00;
}

.waiting-status-contacted {
    background: #e8f3f4;
    border-color: #94c2c8;
    color: #245f67;
}

.waiting-status-resolved,
.waiting-status-confirmed {
    background: #e9f6ed;
    border-color: #9ccca9;
    color: #276236;
}

.waiting-status-closed,
.waiting-status-lost,
.waiting-status-cancelled {
    background: #f3ece5;
    border-color: #d2beb0;
    color: #7b6353;
}

.waiting-modal {
    max-width: 860px;
    width: min(860px, calc(100vw - 28px));
}

.waiting-modal-form {
    display: grid;
    gap: 12px;
}

.waiting-form-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.current-logo {
    align-content: start;
    display: grid;
    gap: 8px;
}

.current-logo img {
    background: #fff;
    border: 1px solid var(--field-border);
    max-height: 86px;
    max-width: 180px;
    object-fit: contain;
    padding: 8px;
}

.current-logo span {
    color: var(--muted);
    font-size: 12px;
}

.bank-accounts-list {
    display: block;
    float: left;
    width: 100%;
}

.bank-account-card {
    border: 1px solid var(--field-border);
    margin: 0 0 30px;
    padding: 12px;
}

.bank-account-card legend {
    font-weight: 700;
    padding: 0 6px;
}

.settings-inline-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.settings-inline-actions label {
    margin-bottom: 0;
}

.delete-checkbox {
    color: #7b1c1c;
}

.settings-actions {
    justify-content: flex-end;
}

.official-fiscal-panel {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 14px 16px;
}

.official-fiscal-panel h2 {
    margin-bottom: 8px;
}

.official-fiscal-summary {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 13px;
}

.official-fiscal-summary span {
    color: var(--muted);
}

.official-fiscal-summary strong {
    color: var(--text);
}

.official-fiscal-summary strong.is-enabled {
    color: #24522c;
}

.official-fiscal-summary strong.is-disabled {
    color: #7a4d3e;
}

.official-fiscal-help {
    float: none;
    margin: 8px 0 0;
}

.official-fiscal-configure {
    flex: 0 0 auto;
}

.kuwera-modal-backdrop {
    align-items: center;
    background: rgba(38, 33, 29, .42);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 22px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 80;
}

.kuwera-modal-backdrop[hidden] {
    display: none;
}

.kuwera-modal-card {
    background: #fffdf8;
    border: 1px solid var(--field-border);
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(45, 35, 26, .28);
    max-height: calc(100vh - 44px);
    overflow: auto;
    padding: 22px;
    position: relative;
    width: min(640px, 100%);
}

.kuwera-modal-close {
    align-items: center;
    background: #f5efe4;
    border: 1px solid var(--field-border);
    border-radius: 999px;
    color: var(--text);
    display: inline-flex;
    font-size: 22px;
    height: 34px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    position: absolute;
    right: 14px;
    top: 14px;
    width: 34px;
}

.kuwera-modal-close:hover {
    background: #eadfce;
    color: var(--text);
}

.modal-kicker {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    margin: 0 42px 4px 0;
    text-transform: uppercase;
}

.kuwera-modal-card h2 {
    margin: 0 42px 14px 0;
}

.official-fiscal-warning {
    background: #fff1ed;
    border-color: #a9462d;
    color: #7a1d16;
    margin-bottom: 12px;
}

.official-fiscal-confirm {
    margin-top: -2px;
}

.official-fiscal-audit {
    background: #fbfaf7;
    border: 1px solid var(--field-border);
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px;
}

.official-fiscal-audit span {
    color: var(--muted);
    font-size: 12px;
}

.report-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

.report-export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.report-tabs a {
    background: #f5efe4;
    border: 1px solid var(--field-border);
    border-radius: 999px;
    color: var(--text);
    font-weight: 700;
    padding: 8px 15px;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}

.report-tabs a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.report-tabs a.is-active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 5px 14px rgba(31, 95, 103, .22);
    color: #245f67;
}

.fiscal-report-filters {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin-bottom: 6px;
}

.fiscal-report-filters .fiscal-filter-field {
    flex: 1 1 132px;
    min-width: 120px;
}

.fiscal-report-filters .fiscal-filter-month {
    flex-basis: 150px;
}

.fiscal-report-filters .fiscal-filter-year {
    flex: 0 1 94px;
    min-width: 84px;
}

.fiscal-report-filters .fiscal-filter-date {
    flex-basis: 142px;
}

.fiscal-report-filters .fiscal-filter-document-type,
.fiscal-report-filters .fiscal-filter-payment {
    flex-basis: 160px;
}

.fiscal-report-filters .fiscal-filter-search {
    flex: 1.4 1 190px;
}

.fiscal-report-filters label {
    margin-bottom: 4px;
}

.fiscal-report-filters input,
.fiscal-report-filters select {
    min-height: 38px;
}

.fiscal-report-filters .filter-actions {
    align-items: center;
    flex: 0 0 auto;
    gap: 7px;
    padding-top: 22px;
}

.fiscal-report-table td,
.fiscal-report-table th {
    vertical-align: middle;
}

.fiscal-report-table tr.is-cancelled-document td {
    background: #fff7f4;
    color: #7a4d3e;
}

.fiscal-report-action {
    font-size: 0.82rem;
    padding: 6px 9px;
}

.fiscal-report-kpis .stats-kpi-card strong {
    font-size: 1.35rem;
}

@media (max-width: 760px) {
    .fiscal-report-filters {
        display: grid;
        grid-template-columns: 1fr;
    }

    .fiscal-report-filters .filter-actions {
        padding-top: 0;
    }

    .official-fiscal-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .finance-card-header {
        flex-direction: column;
    }

    .finance-header-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .waiting-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .waiting-search-field,
    .waiting-filter-actions {
        grid-column: 1 / -1;
    }

    .waiting-form-grid {
        grid-template-columns: 1fr;
    }

    .finance-proforma-row {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .official-fiscal-audit {
        grid-template-columns: 1fr;
    }

    .settings-status-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }
}
