:root {
    --ink: #17211f;
    --muted: #66716d;
    --line: #dce3df;
    --surface: #ffffff;
    --canvas: #f3f6f4;
    --navy: #172e38;
    --navy-2: #214451;
    --teal: #0e796b;
    --teal-dark: #075e54;
    --mint: #dff4ed;
    --gold: #c78f33;
    --gold-soft: #f8ecd5;
    --red: #a83737;
    --red-soft: #fce9e7;
    --blue-soft: #e6f0f7;
    --shadow: 0 20px 60px rgba(23, 46, 56, .12);
    --radius: 16px;
    --radius-sm: 10px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--canvas);
}

/* P1.6 cashier shifts and financial documents */
.finance-content {
    display: grid;
    gap: 24px;
}
.finance-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.finance-summary article {
    padding: 18px;
    border: 1px solid #dfe8e3;
    border-radius: 15px;
    background: #fff;
}
.finance-summary span,
.finance-summary small {
    display: block;
    color: var(--muted);
}
.finance-summary span {
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
}
.finance-summary strong {
    display: block;
    margin: 9px 0 4px;
    color: var(--ink);
    font-size: clamp(1.3rem, 2vw, 2rem);
}
.finance-summary small {
    font-size: .72rem;
}
.finance-control-grid,
.finance-document-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.finance-policy ol {
    display: grid;
    gap: 12px;
    margin: 18px 0 0;
    padding: 0;
    counter-reset: finance-policy;
    list-style: none;
}
.finance-policy li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 3px 12px;
    align-items: center;
}
.finance-policy li::before {
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--mint);
    color: var(--teal-dark);
    font-weight: 900;
    content: counter(finance-policy);
    counter-increment: finance-policy;
}
.finance-policy li span {
    color: var(--muted);
    font-size: .8rem;
}
.cashier-shift-list {
    display: grid;
    gap: 14px;
}
.cashier-shift-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}
.cashier-shift-heading h3 {
    margin: 3px 0;
}
.cashier-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 17px;
}
.cashier-facts div {
    padding: 12px;
    border-radius: 11px;
    background: #f3f7f5;
}
.cashier-facts span,
.cashier-facts strong,
.cashier-facts small {
    display: block;
}
.cashier-facts span,
.cashier-facts small {
    color: var(--muted);
    font-size: .72rem;
}
.cashier-facts strong {
    margin-top: 5px;
    font-size: .9rem;
}
.cashier-close-form {
    display: grid;
    grid-template-columns: minmax(150px, .6fr) minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e3ebe7;
}
.cashier-close-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 800;
}
.cashier-closed-note {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: .78rem;
}
.finance-action-list {
    display: grid;
    gap: 1px;
    margin-top: 14px;
    overflow: hidden;
    border: 1px solid #dfe8e3;
    border-radius: 12px;
    background: #dfe8e3;
}
.finance-action-list > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 14px;
    align-items: center;
    padding: 13px;
    background: #f9fbfa;
}
.finance-action-list strong,
.finance-action-list small {
    display: block;
}
.finance-action-list small {
    margin-top: 3px;
    color: var(--muted);
    font-size: .7rem;
}
.document-shell {
    width: min(980px, calc(100% - 32px));
    margin: 30px auto 60px;
}
.document-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.financial-document {
    padding: clamp(24px, 5vw, 52px);
    border: 1px solid #dfe8e3;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 50px rgb(16 37 32 / 8%);
}
.financial-document > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    padding-bottom: 28px;
    border-bottom: 2px solid var(--ink);
}
.financial-document > header h1,
.financial-document > header h2 {
    margin: 5px 0 0;
}
.document-title {
    text-align: right;
}
.document-title span {
    color: var(--muted);
    font-size: .78rem;
}
.document-parties {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 28px 0;
}
.document-parties div {
    padding: 14px;
    border-radius: 12px;
    background: #f3f7f5;
}
.document-parties span,
.document-parties strong,
.document-parties small {
    display: block;
}
.document-parties span,
.document-parties small {
    color: var(--muted);
    font-size: .74rem;
}
.document-parties strong {
    margin: 5px 0 3px;
}
.document-lines td:last-child,
.document-lines th:last-child {
    text-align: right;
}
.document-totals {
    display: grid;
    gap: 8px;
    width: min(360px, 100%);
    margin: 24px 0 24px auto;
}
.document-totals div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 9px 0;
    border-bottom: 1px solid #e3ebe7;
}
.document-grand-total {
    color: var(--teal-dark);
    font-size: 1.12rem;
}
.financial-document > footer {
    padding-top: 20px;
    border-top: 1px solid #dfe8e3;
    color: var(--muted);
    font-size: .75rem;
}

@media (max-width: 1120px) {
    .finance-summary,
    .cashier-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .finance-control-grid,
    .finance-document-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 760px) {
    .finance-content .page-heading,
    .cashier-shift-heading,
    .financial-document > header {
        align-items: flex-start;
        flex-direction: column;
    }
    .finance-summary,
    .cashier-facts,
    .document-parties {
        grid-template-columns: 1fr;
    }
    .cashier-close-form,
    .finance-action-list > div {
        grid-template-columns: 1fr;
    }
    .finance-action-list > div > span:nth-child(2) {
        text-align: left;
    }
    .document-title {
        text-align: left;
    }
    .financial-document {
        padding: 22px;
    }
}
@media print {
    .document-actions {
        display: none;
    }
    .document-shell {
        width: 100%;
        margin: 0;
    }
    .financial-document {
        border: 0;
        box-shadow: none;
    }
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
a { color: inherit; }
button, input { font: inherit; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.05; letter-spacing: -.045em; }
h2 { font-size: 1.25rem; letter-spacing: -.02em; }
.muted { color: var(--muted); line-height: 1.65; }
.eyebrow { margin-bottom: .55rem; color: var(--teal); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.brand-mark { display: grid; place-items: center; width: 68px; height: 68px; margin-bottom: 2rem; border-radius: 20px; background: var(--gold); color: #fff; font-size: 1.05rem; font-weight: 900; letter-spacing: -.04em; box-shadow: 0 12px 30px rgba(199, 143, 51, .28); }
.brand-mark-small { width: 38px; height: 38px; margin: 0; border-radius: 11px; font-size: .7rem; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, 1.15fr) minmax(420px, .85fr); }
.auth-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: clamp(3rem, 8vw, 8rem); background: var(--navy); color: #fff; }
.auth-brand::after { content: ""; position: absolute; right: -18%; bottom: -30%; width: 36rem; height: 36rem; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.02); }
.auth-brand .eyebrow { color: #71ccb8; }
.auth-brand h1 { max-width: 600px; margin-bottom: 1.5rem; }
.auth-brand h1 span { display: block; color: #71ccb8; }
.brand-copy { max-width: 560px; color: #c4d1ce; font-size: 1.08rem; line-height: 1.7; }
.feature-list { z-index: 1; display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.feature-list li { padding: .65rem .9rem; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; color: #d8e3e0; font-size: .78rem; }
.auth-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem; }
.auth-card { width: min(100%, 440px); padding: clamp(2rem, 5vw, 3.5rem); border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.auth-card h2 { margin-bottom: .4rem; font-size: 2rem; }
.stack-lg { display: grid; gap: 1.25rem; margin-top: 2rem; }
.field { display: grid; gap: .5rem; }
.field label { font-size: .82rem; font-weight: 750; }
.field input { width: 100%; min-height: 48px; padding: .75rem .9rem; border: 1px solid #bac7c2; border-radius: var(--radius-sm); background: #fff; color: var(--ink); outline: none; }
.field input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,121,107,.14); }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: .65rem 1rem; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-weight: 750; text-decoration: none; }
.button-primary { background: var(--teal); color: #fff; }
.button-primary:hover { background: var(--teal-dark); }
.button-secondary { border-color: var(--line); background: #fff; color: var(--ink); }
.button-quiet { background: transparent; color: var(--muted); }
.button-block { width: 100%; }
.alert { padding: 1rem; border-radius: var(--radius-sm); font-size: .87rem; line-height: 1.5; }
.alert ul { margin: .5rem 0 0; padding-left: 1.25rem; }
.alert-error { border: 1px solid #efc4bf; background: var(--red-soft); color: #732626; }
.support-note, .legal-note { margin: 1.5rem 0 0; color: var(--muted); font-size: .78rem; text-align: center; }
.legal-note { margin-top: 1.25rem; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 1.5rem 1rem; background: var(--navy); color: #d8e3e0; }
.sidebar-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 2.5rem; color: #fff; font-size: .92rem; text-decoration: none; }
.sidebar-brand strong { display: block; color: #71ccb8; }
.nav-label { margin: 1.5rem .75rem .5rem; color: #79908a; font-size: .63rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nav-item { display: flex; justify-content: space-between; margin: .15rem 0; padding: .7rem .8rem; border-radius: 8px; color: #bfcdca; font-size: .86rem; text-decoration: none; }
.nav-item.active { background: rgba(113,204,184,.13); color: #fff; }
.nav-item small { color: #758c87; }
.nav-disabled { cursor: not-allowed; }
.sidebar-footer { margin-top: auto; padding: 1rem .8rem 0; border-top: 1px solid rgba(255,255,255,.08); color: #79908a; font-size: .7rem; }
.app-main { min-width: 0; }
.topbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1.25rem, 4vw, 3rem); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); }
.topbar .eyebrow { margin: 0; }
.topbar-title { margin: .2rem 0 0; font-weight: 800; }
.topbar-actions, .user-chip { display: flex; align-items: center; gap: 1rem; }
.user-chip { gap: .65rem; }
.user-chip span:not(.avatar) { display: grid; font-size: .78rem; }
.user-chip small { color: var(--muted); }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--mint); color: var(--teal-dark); font-weight: 900; }
.content { width: min(1440px, 100%); margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem); }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2.25rem; }
.page-heading h1 { margin-bottom: .65rem; font-size: clamp(2rem, 4vw, 3rem); }
.page-heading p:last-child { margin-bottom: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.metric-card { display: flex; align-items: center; gap: 1rem; min-height: 132px; padding: 1.35rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.metric-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; font-size: .72rem; font-weight: 900; }
.metric-green { background: var(--mint); color: var(--teal-dark); }
.metric-blue { background: var(--blue-soft); color: #376988; }
.metric-gold { background: var(--gold-soft); color: #8b611d; }
.metric-card p, .metric-card strong, .metric-card small { display: block; }
.metric-card p { margin: 0 0 .15rem; color: var(--muted); font-size: .73rem; font-weight: 700; text-transform: uppercase; }
.metric-card strong { font-size: 1.35rem; }
.metric-card small { margin-top: .2rem; color: var(--muted); }
.panel-grid { display: grid; grid-template-columns: 1.45fr .75fr; gap: 1rem; margin-top: 1rem; }
.panel { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.panel-heading h2 { margin-bottom: 0; }
.status-badge { display: inline-flex; align-items: center; width: fit-content; padding: .35rem .6rem; border-radius: 999px; font-size: .68rem; font-weight: 800; white-space: nowrap; }
.status-success { background: var(--mint); color: var(--teal-dark); }
.status-danger { background: var(--red-soft); color: var(--red); }
.status-neutral { background: #edf1ef; color: #59625f; }
.check-list { display: grid; gap: .4rem; margin-top: 1.25rem; }
.check-list > div { display: flex; gap: .8rem; padding: .8rem; border-radius: 10px; }
.check-list > div:hover { background: var(--canvas); }
.check-list > div > span { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--mint); color: var(--teal-dark); font-weight: 900; }
.check-list p { margin: 0; }
.check-list strong, .check-list small { display: block; }
.check-list small { margin-top: .25rem; color: var(--muted); }
.accent-panel { background: var(--navy); color: #fff; }
.accent-panel .eyebrow { color: #71ccb8; }
.accent-panel > p:not(.eyebrow) { color: #c4d1ce; line-height: 1.65; }
.date-preview { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.1); }
.date-preview span, .date-preview strong { display: block; }
.date-preview span { color: #8da19d; font-size: .72rem; text-transform: uppercase; }
.date-preview strong { margin-top: .3rem; }

.health-shell, .error-shell { min-height: 100vh; display: grid; place-content: center; padding: 2rem; }
.health-brand { width: fit-content; margin: 0 auto 1.5rem; color: var(--ink); }
.health-card { width: min(680px, calc(100vw - 2rem)); padding: clamp(1.5rem, 5vw, 3rem); border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.health-summary { display: flex; align-items: flex-start; gap: 1rem; }
.health-summary h1 { margin-bottom: .75rem; font-size: 2rem; }
.health-pulse { flex: 0 0 14px; width: 14px; height: 14px; margin-top: .35rem; border-radius: 50%; }
.health-pulse.is-healthy { background: var(--teal); box-shadow: 0 0 0 7px var(--mint); }
.health-pulse.is-unhealthy { background: var(--red); box-shadow: 0 0 0 7px var(--red-soft); }
.health-checks { margin: 2rem 0 0; }
.health-checks > div { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; border-top: 1px solid var(--line); }
.health-checks dt { font-weight: 750; }
.health-checks dd { margin: 0; }
.health-time { margin: 1.25rem 0 0; color: var(--muted); font-size: .72rem; }
.error-shell { display: flex; max-width: 620px; margin: 0 auto; flex-direction: column; justify-content: center; align-items: flex-start; }
.error-shell h1 { margin-bottom: 1rem; }
.error-shell code { margin: .5rem 0 1.5rem; padding: .65rem .8rem; border-radius: 7px; background: #e7ece9; }
.error-shell pre { max-width: 100%; overflow: auto; padding: 1rem; border-radius: 8px; background: #222; color: #fff; }

@media (max-width: 980px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { min-height: 42vh; padding: 3rem; }
    .auth-brand::after, .feature-list { display: none; }
    .auth-panel { padding: 2rem 1rem; }
    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 1rem;
        height: auto;
        padding: .8rem 1rem;
    }
    .sidebar nav {
        display: flex;
        align-items: center;
        gap: .3rem;
        min-width: 0;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }
    .sidebar .nav-label, .sidebar-footer { display: none; }
    .sidebar-brand { flex: 0 0 auto; margin: 0; }
    .sidebar .nav-item {
        flex: 0 0 auto;
        margin: 0;
        padding: .6rem .7rem;
        white-space: nowrap;
    }
    .metric-grid, .panel-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .auth-brand { min-height: 34vh; padding: 2rem 1.25rem; }
    .brand-mark { width: 54px; height: 54px; margin-bottom: 1.25rem; }
    .brand-copy { margin-bottom: 0; }
    .topbar { align-items: flex-start; }
    .topbar-actions .status-badge, .user-chip span:not(.avatar), .topbar > div:first-child { display: none; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .page-heading .button { width: 100%; }
    .content { padding: 1.25rem; }
    .sidebar { grid-template-columns: 1fr; }
}

@media print {
    .sidebar, .topbar, .button { display: none !important; }
    .app-shell { display: block; }
    .content { padding: 0; }
    .panel, .metric-card { break-inside: avoid; box-shadow: none; }
}

/* P1.1 administration */
.admin-content { max-width: 1540px; }
.admin-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.admin-summary article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(20, 52, 44, .06);
}
.admin-summary span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.admin-summary strong { color: var(--ink); font-size: 1.65rem; }
.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}
.admin-grid .admin-panel:last-child { grid-column: 1 / -1; }
.admin-form { display: grid; gap: 15px; }
.admin-form label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-size: .82rem;
    font-weight: 700;
}
.admin-form input,
.admin-form select {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid #ced9d3;
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}
.admin-form input:focus,
.admin-form select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(15, 124, 104, .12);
    outline: none;
}
.admin-form button { justify-self: start; }
.admin-form button:disabled { cursor: not-allowed; opacity: .5; }
.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.notice {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 12px;
    font-weight: 700;
}
.notice-success { border: 1px solid #9ed5c5; background: #eaf8f3; color: #14634f; }
.notice-error { border: 1px solid #f0b5b5; background: #fff1f1; color: #9b2c2c; }
.data-panel { margin-bottom: 20px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th,
.data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #e5ebe7;
    text-align: left;
    vertical-align: middle;
}
.data-table th {
    color: #65736e;
    font-size: .74rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.data-table td { color: #263832; font-size: .88rem; }
.data-table td strong,
.data-table td small { display: block; }
.data-table td small { margin-top: 3px; color: #72817c; }
.data-table code {
    padding: 4px 7px;
    border-radius: 7px;
    background: #edf3f0;
    color: #315c50;
}
.empty-state {
    padding: 26px;
    border: 1px dashed #cad6d0;
    border-radius: 14px;
    color: #71807b;
    text-align: center;
}
@media (max-width: 900px) {
    .admin-grid, .admin-summary { grid-template-columns: 1fr; }
    .admin-grid .admin-panel:last-child { grid-column: auto; }
}
@media (max-width: 620px) {
    .form-row { grid-template-columns: 1fr; }
}

/* P1.2 hotel inventory */
.inventory-content { max-width: 1540px; }
.inventory-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}
.inventory-form-grid .inventory-form-panel:last-child { grid-column: 1 / -1; }
.inventory-form-panel { align-self: start; }
.inventory-form-panel .panel-heading { margin-bottom: 20px; }
.admin-form textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #ced9d3;
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    line-height: 1.5;
    resize: vertical;
}
.admin-form textarea:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(15, 124, 104, .12);
    outline: none;
}
.form-row-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inventory-empty {
    margin-bottom: 20px;
    padding: clamp(24px, 5vw, 48px);
    text-align: center;
}
.inventory-empty .button { margin-top: 8px; }
.inventory-data-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.room-chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
    margin-top: 20px;
}
.room-chip {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid #dfe8e3;
    border-radius: 14px;
    background: #f9fbfa;
}
.room-chip > div,
.room-chip > div strong,
.room-chip > div small,
.room-chip > small {
    display: block;
}
.room-chip > div strong {
    color: var(--ink);
    font-size: 1.45rem;
    letter-spacing: -.03em;
}
.room-chip small { color: var(--muted); }
.rate-card-list {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}
.rate-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px;
    border: 1px solid #dfe8e3;
    border-radius: 14px;
    background: #f9fbfa;
}
.rate-card strong,
.rate-card small { display: block; }
.rate-card small { margin-top: 4px; color: var(--muted); }
.rate-price { text-align: right; white-space: nowrap; }
.rate-price strong { color: var(--teal-dark); font-size: 1.08rem; }
@media (max-width: 1000px) {
    .inventory-form-grid,
    .inventory-data-grid { grid-template-columns: 1fr; }
    .inventory-form-grid .inventory-form-panel:last-child { grid-column: auto; }
}
@media (max-width: 700px) {
    .form-row-three { grid-template-columns: 1fr; }
    .rate-card { align-items: flex-start; flex-direction: column; }
    .rate-price { text-align: left; }
}

/* P1.3 reservations */
.reservation-content {
    display: grid;
    gap: 20px;
    min-width: 0;
}
.reservation-content > * {
    min-width: 0;
}
.reservation-form-grid {
    display: grid;
    grid-template-columns: minmax(300px, .78fr) minmax(460px, 1.22fr);
    gap: 20px;
}
.reservation-form-panel {
    align-self: start;
}
.reservation-form-panel .panel-heading {
    margin-bottom: 20px;
}
.availability-panel,
.reservation-table-panel {
    overflow: hidden;
}
.availability-wrap,
.reservation-table-wrap {
    overflow-x: auto;
    margin: 0 -24px -24px;
    padding: 0 24px 24px;
}
.availability-table,
.reservation-table {
    width: 100%;
    min-width: 780px;
    border-collapse: separate;
    border-spacing: 0;
}
.availability-table th,
.availability-table td,
.reservation-table th,
.reservation-table td {
    padding: 13px 14px;
    border-bottom: 1px solid #e1e9e5;
    color: var(--ink);
    font-size: .9rem;
    text-align: left;
    vertical-align: middle;
}
.availability-table th,
.reservation-table th {
    background: #f7faf8;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.availability-table tbody tr:last-child td,
.reservation-table tbody tr:last-child td {
    border-bottom: 0;
}
.availability-table th:first-child,
.availability-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
    min-width: 190px;
}
.availability-table th:first-child {
    z-index: 2;
    background: #f7faf8;
}
.has-availability {
    color: var(--teal-dark) !important;
    font-weight: 800;
}
.sold-out {
    color: #a84a3f !important;
    font-weight: 800;
}
.guest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}
.guest-card {
    display: grid;
    gap: 7px;
    padding: 18px;
    border: 1px solid #dfe8e3;
    border-radius: 15px;
    background: #f9fbfa;
}
.guest-card strong,
.guest-card small {
    display: block;
}
.guest-card small {
    color: var(--muted);
    line-height: 1.45;
}
.button-small {
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 9px;
    font-size: .8rem;
}
.button-danger {
    border-color: #e7c8c2;
    background: #fff7f5;
    color: #9b3d32;
}
.button-danger:hover {
    border-color: #dba99f;
    background: #fbece8;
}
@media (max-width: 1050px) {
    .reservation-form-grid {
        grid-template-columns: 1fr;
    }
    .reservation-content .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}
@media (max-width: 700px) {
    .availability-wrap,
    .reservation-table-wrap {
        margin-right: -16px;
        margin-left: -16px;
        padding-right: 16px;
        padding-left: 16px;
    }
}

/* P1.4 front office */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.status-warning {
    border-color: #ead6a8;
    background: #fff8e8;
    color: #8a6417;
}
.front-office-content,
.front-office-content > *,
.front-stay-card,
.folio-ledger {
    min-width: 0;
}
.front-office-content {
    display: grid;
    gap: 20px;
}
.front-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.front-summary article {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 18px 20px;
    border: 1px solid #dde8e2;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(13, 52, 43, .04);
}
.front-summary span,
.front-summary small {
    color: var(--muted);
}
.front-summary span {
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.front-summary strong {
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 1.45rem;
}
.front-summary small {
    font-size: .78rem;
}
.room-rack-panel {
    overflow: hidden;
}
.front-room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
    margin-top: 18px;
}
.front-room-card {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 16px;
    border: 1px solid #dde7e2;
    border-left: 4px solid #cfdbd5;
    border-radius: 14px;
    background: #f9fbfa;
}
.front-room-card.room-status-clean {
    border-left-color: #1f8b70;
    background: #f4fbf8;
}
.front-room-card.room-status-occupied {
    border-left-color: #be8122;
    background: #fffaf0;
}
.front-room-card.room-status-dirty {
    border-left-color: #b65b4b;
    background: #fff7f5;
}
.front-room-card.room-status-out {
    border-left-color: #6b7480;
    background: #f5f6f7;
}
.front-room-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.front-room-heading strong {
    display: block;
    color: var(--ink);
    font-size: 1.25rem;
}
.front-room-heading small,
.front-room-card p small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}
.front-room-heading > span {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .8);
    color: var(--ink);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}
.room-status-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}
.room-status-form label,
.room-status-form select {
    width: 100%;
    min-width: 0;
}
.front-stays-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    padding-top: 5px;
}
.front-stays-heading h2 {
    margin: 3px 0 0;
}
.front-stays-heading > p {
    max-width: 570px;
    margin: 0;
    text-align: right;
}
.front-stay-list {
    display: grid;
    gap: 20px;
    min-width: 0;
}
.front-stay-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}
.front-stay-header h2 {
    margin: 3px 0 2px;
}
.stay-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin: 20px 0;
    overflow: hidden;
    border: 1px solid #dfe8e3;
    border-radius: 13px;
    background: #dfe8e3;
}
.stay-facts > div {
    min-width: 0;
    padding: 14px 16px;
    background: #f9fbfa;
}
.stay-facts span,
.stay-facts strong,
.stay-facts small {
    display: block;
}
.stay-facts span {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.stay-facts strong {
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: .92rem;
}
.stay-facts small {
    margin-top: 3px;
    color: var(--muted);
    font-size: .75rem;
}
.balance-due,
.amount-charge {
    color: #a24c39 !important;
}
.balance-credit,
.amount-credit {
    color: #236f9e !important;
}
.balance-settled {
    color: var(--teal-dark) !important;
}
.front-action-callout,
.checkout-bar,
.checkout-complete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px;
    border: 1px solid #dce7e2;
    border-radius: 13px;
    background: #f7faf8;
}
.front-action-callout p,
.checkout-bar p,
.checkout-complete p {
    margin: 4px 0 0;
    color: var(--muted);
}
.early-arrival-note {
    display: block;
    margin-top: 7px;
    color: #8a6417;
}
.folio-ledger {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e9e5;
}
.folio-ledger h3 {
    margin: 3px 0 0;
}
.folio-table th:last-child,
.folio-table td:last-child {
    text-align: right;
}
.folio-table td strong,
.folio-table td small {
    display: block;
}
.folio-table td small {
    margin-top: 3px;
    color: var(--muted);
    font-size: .73rem;
}
.entry-type {
    display: inline-block;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.entry-charge {
    background: #fff1ed;
    color: #9e4736;
}
.entry-payment {
    background: #eaf7f2;
    color: var(--teal-dark);
}
.amount-charge,
.amount-credit {
    font-weight: 800;
    white-space: nowrap;
}
.folio-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}
.folio-action-form {
    min-width: 0;
    padding: 18px;
    border: 1px solid #dfe8e3;
    border-radius: 14px;
    background: #f9fbfa;
}
.folio-form-heading {
    display: grid;
    gap: 3px;
    margin-bottom: 14px;
}
.folio-form-heading small {
    color: var(--muted);
}
.checkout-bar,
.checkout-complete {
    margin-top: 18px;
}
.checkout-ready {
    border-color: #b9ddcf;
    background: #f0faf6;
}
.checkout-complete {
    border-color: #cbd8d2;
    background: #f7f9f8;
}

@media (max-width: 1100px) {
    .front-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .stay-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 850px) {
    .front-office-content .page-heading,
    .front-stays-heading,
    .front-action-callout,
    .checkout-bar,
    .checkout-complete {
        align-items: flex-start;
        flex-direction: column;
    }
    .front-stays-heading > p {
        max-width: none;
        text-align: left;
    }
    .folio-action-grid {
        grid-template-columns: 1fr;
    }
    .front-action-callout form,
    .checkout-bar form {
        width: 100%;
    }
    .front-action-callout .button,
    .checkout-bar .button {
        width: 100%;
    }
}
@media (max-width: 700px) {
    .front-summary,
    .stay-facts {
        grid-template-columns: 1fr;
    }
    .front-stay-header {
        flex-direction: column;
        gap: 10px;
    }
    .folio-ledger .table-wrap {
        margin-right: -16px;
        margin-left: -16px;
        padding-right: 16px;
        padding-left: 16px;
    }
    .room-status-form {
        grid-template-columns: 1fr;
    }
}

/* P1.5 housekeeping, night audit, and operational reports */
.operations-content,
.operations-content > *,
.operations-grid > *,
.operations-report-grid > * {
    min-width: 0;
}
.operations-content {
    display: grid;
    gap: 20px;
    max-width: 1580px;
}
.operations-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.operations-summary article {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 18px 20px;
    border: 1px solid #dde8e2;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(13, 52, 43, .04);
}
.operations-summary span,
.operations-summary small {
    color: var(--muted);
}
.operations-summary span {
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.operations-summary strong {
    color: var(--ink);
    font-size: 1.45rem;
}
.operations-summary small {
    font-size: .78rem;
}
.operations-grid,
.operations-report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.housekeeping-create-form {
    margin-top: 18px;
}
.audit-readiness-list {
    display: grid;
    gap: 13px;
    margin-top: 18px;
}
.audit-readiness-card {
    display: grid;
    gap: 14px;
    padding: 17px;
    border: 1px solid #dde7e2;
    border-radius: 14px;
    background: #f8fbf9;
}
.audit-readiness-card.audit-ready {
    border-color: #b9ddcf;
    background: #f1faf6;
}
.audit-readiness-card.audit-blocked {
    border-color: #ead0ca;
    background: #fff8f6;
}
.audit-readiness-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}
.audit-readiness-heading strong,
.audit-readiness-heading small {
    display: block;
}
.audit-readiness-heading small {
    margin-top: 4px;
    color: var(--muted);
}
.audit-checks,
.audit-blockers {
    display: grid;
    gap: 7px;
    margin: 0;
    padding-left: 20px;
    font-size: .84rem;
    line-height: 1.45;
}
.audit-checks {
    color: var(--teal-dark);
}
.audit-blockers {
    color: #9b3d32;
}
.audit-snapshot {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.audit-snapshot span {
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(27, 88, 72, .1);
    border-radius: 10px;
    background: rgba(255, 255, 255, .72);
}
.audit-snapshot small,
.audit-snapshot strong {
    display: block;
}
.audit-snapshot small {
    color: var(--muted);
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.audit-snapshot strong {
    margin-top: 4px;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: .8rem;
}
.audit-readiness-card form,
.audit-readiness-card .button {
    width: 100%;
}
.housekeeping-task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 14px;
    margin-top: 18px;
}
.housekeeping-task-card {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 17px;
    border: 1px solid #dfe8e3;
    border-left: 4px solid #c7d5ce;
    border-radius: 14px;
    background: #f9fbfa;
}
.housekeeping-task-card.task-pending {
    border-left-color: #b65b4b;
}
.housekeeping-task-card.task-in_progress {
    border-left-color: #be8122;
}
.housekeeping-task-card.task-completed {
    border-left-color: #5f879c;
}
.housekeeping-task-card.task-verified {
    border-left-color: #1f8b70;
    background: #f4fbf8;
}
.task-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.task-card-heading h3 {
    margin: 3px 0;
    color: var(--ink);
    font-size: 1.15rem;
}
.task-card-heading small {
    color: var(--muted);
}
.task-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.task-meta span {
    min-width: 0;
    padding: 9px;
    border-radius: 9px;
    background: #fff;
}
.task-meta small,
.task-meta strong {
    display: block;
}
.task-meta small {
    color: var(--muted);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}
.task-meta strong {
    margin-top: 3px;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: .78rem;
}
.priority-urgent {
    color: #a33f34 !important;
}
.task-notes {
    margin: 0;
    padding: 11px 12px;
    border-radius: 9px;
    background: #eef4f1;
    color: #455b54;
    font-size: .82rem;
    line-height: 1.5;
}
.task-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.task-actions form {
    flex: 1 1 145px;
}
.task-actions .button {
    width: 100%;
}
.task-complete-mark {
    width: 100%;
    padding: 10px 12px;
    border-radius: 9px;
    background: #e9f7f1;
    color: var(--teal-dark);
    font-size: .8rem;
    font-weight: 800;
    text-align: center;
}
.operations-report-panel {
    overflow: hidden;
}
.operations-table th:not(:first-child),
.operations-table td:not(:first-child) {
    text-align: right;
}
.audit-history-list,
.activity-list {
    display: grid;
    gap: 1px;
    margin-top: 15px;
    overflow: hidden;
    border: 1px solid #dfe8e3;
    border-radius: 12px;
    background: #dfe8e3;
}
.audit-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px;
    background: #f9fbfa;
}
.audit-history-item > div:last-child {
    text-align: right;
}
.audit-history-item strong,
.audit-history-item small,
.audit-history-item span {
    display: block;
}
.audit-history-item small,
.audit-history-item span {
    color: var(--muted);
    font-size: .75rem;
}
.audit-history-item small {
    margin-top: 4px;
}
.audit-history-item > div:last-child strong {
    margin-top: 4px;
    font-size: .8rem;
}
.activity-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    padding: 13px 14px;
    background: #f9fbfa;
}
.activity-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--mint);
    color: var(--teal-dark);
    font-size: .64rem;
    font-weight: 900;
}
.activity-item strong,
.activity-item small {
    display: block;
}
.activity-item small {
    margin-top: 3px;
    color: var(--muted);
    font-size: .73rem;
}
.activity-item > small {
    margin: 0;
    text-align: right;
}

@media (max-width: 1150px) {
    .operations-grid,
    .operations-report-grid {
        grid-template-columns: 1fr;
    }
    .operations-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 760px) {
    .operations-content .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }
    .operations-summary,
    .audit-snapshot {
        grid-template-columns: 1fr;
    }
    .housekeeping-task-grid {
        grid-template-columns: 1fr;
    }
    .task-meta {
        grid-template-columns: 1fr;
    }
    .audit-history-item,
    .task-card-heading {
        align-items: flex-start;
        flex-direction: column;
    }
    .audit-history-item > div:last-child {
        text-align: left;
    }
    .activity-item {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .activity-item > small {
        grid-column: 2;
        text-align: left;
    }
    .operations-report-panel .table-wrap {
        margin-right: -16px;
        margin-left: -16px;
        padding-right: 16px;
        padding-left: 16px;
    }
}
