:root {
    --bg: #f6f7f4;
    --surface: #ffffff;
    --ink: #1d2522;
    --muted: #65736f;
    --line: #dbe2dd;
    --brand: #0f766e;
    --brand-dark: #115e59;
    --accent: #b7791f;
    --danger: #b42318;
    --shadow: 0 18px 45px rgba(20, 35, 31, 0.08);
}

* {
    box-sizing: border-box;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

body {
    margin: 0;
    min-height: 100vh;
    display: block;
    padding-left: 190px;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

.reservation-alert {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 70;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(92vw, 420px);
    padding: 13px 15px;
    border-radius: 8px;
    background: #fef3c7;
    color: #78350f;
    box-shadow: 0 18px 45px rgba(20, 35, 31, 0.2);
}

.reservation-alert[hidden] {
    display: none;
}

.reservation-alert strong {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f59e0b;
    color: #ffffff;
}

.reservation-alert span {
    font-weight: 700;
}

.stock-alert {
    bottom: 96px;
    background: #fee2e2;
    color: #7f1d1d;
}

.stock-alert strong {
    background: #dc2626;
}

.hourly-room-alert {
    bottom: 170px;
    background: #dcfce7;
    color: #14532d;
}

.hourly-room-alert strong {
    background: #15803d;
}

.backup-alert {
    right: 22px;
    bottom: 244px;
    background: #fee2e2;
    color: #7f1d1d;
}

.backup-alert strong {
    background: #b42318;
}

.quick-actions {
    position: fixed;
    left: auto;
    top: 40px;
    right: 168px;
    bottom: auto;
    z-index: 65;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    user-select: none;
}

.quick-actions-handle {
    padding: 5px 12px;
    border: 1px solid rgba(15, 118, 110, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--brand-dark);
    box-shadow: 0 8px 20px rgba(20, 35, 31, 0.12);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: grab;
    touch-action: none;
}

.quick-action-button {
    min-width: 112px;
    padding: 12px 15px;
    border: 0;
    border-radius: 999px;
    background: var(--brand);
    color: #ffffff;
    box-shadow: 0 16px 35px rgba(20, 35, 31, 0.22);
    font: inherit;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
}

body:has(.quick-actions) .global-cash-status {
    padding-left: 14px;
    min-height: 66px;
}

.quick-actions.is-dragging .quick-actions-handle {
    cursor: grabbing;
}

.quick-actions.is-dragging {
    opacity: 0.92;
}

.quick-action-button:hover {
    background: var(--brand-dark);
}

.reservation-alert a {
    color: #0f766e;
    font-weight: 700;
}

.alert-close-button {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(127, 29, 29, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
}

.alert-close-button:hover {
    background: #ffffff;
}

.reservation-alert.is-active {
    animation: alertPulse 1.2s ease-in-out 2;
}

@keyframes alertPulse {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

a {
    color: inherit;
    text-decoration: none;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    width: 190px;
    overflow-y: auto;
    min-height: 100vh;
    padding: 22px 12px;
    background: #17211f;
    color: #eef4f1;
}

.menu-check {
    display: none;
}

.sidebar-head {
    display: block;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 26px;
}

.brand-mark,
.brand-logo {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #ffffff;
    font-weight: 700;
}

.brand-logo {
    object-fit: contain;
    padding: 4px;
}

.brand-text {
    min-width: 0;
    display: grid;
    gap: 1px;
    line-height: 1;
    justify-items: center;
}

.brand-text strong {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.login-brand .brand-text strong {
    color: var(--ink);
}

.brand-wordmark {
    display: block;
    width: 96px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter:
        brightness(0)
        invert(1)
        drop-shadow(0 0 2px rgba(255, 255, 255, 0.75))
        drop-shadow(0 0 6px rgba(159, 227, 216, 0.75));
    opacity: 1;
}

.login-brand .brand-text small {
    color: #4b5552;
}

.menu-button {
    display: none;
}

.mobile-user-chip {
    display: none;
}

.nav {
    display: grid;
    gap: 8px;
}

.nav a {
    padding: 11px 12px;
    border-radius: 8px;
    color: #cfdbd7;
}

.nav a:hover,
.nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.user-box {
    margin-top: 24px;
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #cfdbd7;
    display: grid;
    gap: 8px;
    font-size: 13px;
}

.user-box span {
    color: #ffffff;
    font-weight: 700;
}

.user-box small {
    color: #aebbb7;
    font-weight: 700;
    line-height: 1.1;
}

.user-box a {
    color: #9fe3d8;
    font-weight: 700;
}

.user-box .change-password-link {
    color: #ffffff;
    font-size: 12px;
}

.user-box .sidebar-logout-button {
    color: #9fe3d8;
    text-align: left;
}


.main {
    position: relative;
    min-height: 100vh;
    padding: 30px;
    overflow: hidden;
}

.main::before {
    content: "";
    position: fixed;
    left: calc(190px + (100vw - 190px) / 2);
    top: 50%;
    width: min(44vw, 520px);
    aspect-ratio: 1;
    background: url("../img/logo.png") center / contain no-repeat;
    filter: drop-shadow(0 24px 48px rgba(20, 35, 31, 0.28));
    opacity: 0.21;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.main > * {
    position: relative;
    z-index: 1;
}

.global-cash-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-left: 5px solid var(--brand);
    border-radius: 8px;
    background: rgba(236, 253, 245, 0.94);
    color: var(--brand-dark);
    box-shadow: 0 10px 26px rgba(20, 35, 31, 0.08);
}

.global-cash-status div {
    display: grid;
    gap: 3px;
}

.global-cash-status strong {
    font-size: 15px;
}

.global-cash-status span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.global-cash-status a {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--brand);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.input-action-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.input-action-row input {
    flex: 1 1 auto;
    min-width: 0;
}

.input-action-row .button {
    flex: 0 0 auto;
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.page-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
}

h1 {
    font-size: 34px;
}

h2 {
    font-size: 18px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.button-small {
    min-height: 34px;
    padding: 0 11px;
    font-size: 13px;
}

.danger-button {
    background: var(--danger);
    color: #ffffff;
}

.warning-button {
    background: #b7791f;
    color: #ffffff;
}

.secondary-button {
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--ink);
}

.icon-button {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stat,
.panel,
.room {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.stat {
    padding: 18px;
}

.stat span,
.stat small {
    color: var(--muted);
}

.stat strong {
    display: block;
    margin: 10px 0 4px;
    font-size: 30px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 18px;
}

.entry-layout {
    display: grid;
    gap: 18px;
}

.panel {
    padding: 18px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-head a {
    color: var(--brand-dark);
    font-weight: 700;
}

.filter-form {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(140px, 1fr)) minmax(170px, .9fr) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
}

.filter-form label {
    display: grid;
    gap: 6px;
}

.filter-form span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.filter-form input,
.filter-form select {
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
    background: #fff;
}

.filter-form .inline-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
}

.filter-form .inline-check input {
    width: auto;
    min-height: 0;
}

.compact-filter-form {
    grid-template-columns: minmax(180px, 320px) auto;
}

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

.section-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

.section-tabs a {
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    font-weight: 700;
}

.section-tabs a.is-active {
    border-color: var(--brand);
    background: var(--brand);
    color: #ffffff;
}

.stock-low-row {
    background: #fef2f2;
}

.stock-low-row td {
    color: #7f1d1d;
}

.stock-low-value {
    display: inline-flex;
    min-width: 32px;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fee2e2;
    color: #b42318;
    font-weight: 800;
}

.summary-list {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
}

.summary-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line);
}

.summary-list dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.summary-list dd {
    margin: 0;
    color: var(--ink);
    font-weight: 700;
    text-align: right;
}

.cash-section {
    margin-top: 18px;
    margin-bottom: 18px;
}

.inventory-count-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8faf9;
}

.inventory-count-grid h3 {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 15px;
}

.report-actions .form-actions {
    justify-content: flex-end;
}

.reports-filter {
    grid-template-columns: repeat(2, minmax(160px, 220px)) auto;
}

.report-kpi-grid .kpi-card strong {
    font-size: 26px;
}

.reports-main-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
    margin-bottom: 18px;
}

.report-panel-wide {
    min-width: 0;
}

.muted-inline,
.report-note {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.daily-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(34px, 1fr));
    gap: 8px;
    min-height: 210px;
    align-items: end;
    padding-top: 10px;
}

.daily-bar {
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 8px;
    min-width: 0;
    height: 190px;
    text-align: center;
}

.daily-bar span {
    align-self: end;
    width: 100%;
    min-height: 4px;
    border-radius: 8px 8px 2px 2px;
    background: linear-gradient(180deg, var(--brand), var(--brand-dark));
    box-shadow: 0 10px 18px rgba(15, 118, 110, 0.16);
}

.daily-bar small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.metric-bars {
    display: grid;
    gap: 14px;
}

.metric-bar {
    display: grid;
    gap: 7px;
}

.metric-bar div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.metric-bar strong,
.metric-bar span {
    min-width: 0;
}

.metric-bar strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-bar span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

.metric-bar i {
    display: block;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8efed;
}

.metric-bar b {
    display: block;
    height: 100%;
    min-width: 4px;
    border-radius: inherit;
    background: var(--brand);
}

.mini-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.mini-stat-grid div {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8faf9;
}

.mini-stat-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.mini-stat-grid strong {
    display: block;
    margin-top: 6px;
    font-size: 20px;
}

.compact-report-table {
    margin-top: 4px;
}

.report-sheet {
    display: grid;
    gap: 22px;
}

.report-title {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.report-title img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.void-report-banner {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid #f3b6b6;
    border-left: 6px solid #c0392b;
    border-radius: 8px;
    background: #fde8e8;
    color: #7f1d1d;
}

.void-report-banner strong {
    font-size: 1.1rem;
    letter-spacing: .04em;
}

.report-title h2,
.report-section h2 {
    margin: 0;
}

.report-section {
    display: grid;
    gap: 12px;
}

.report-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tabs-shell {
    display: grid;
    gap: 14px;
}

.tab-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tabs-nav {
    display: inline-grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 6px;
    width: min(100%, 520px);
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7faf8;
}

.tabs-nav label,
.tabs-nav a {
    display: grid;
    place-items: center;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--muted);
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.tabs-nav label:hover,
.tabs-nav a:hover {
    background: #eef5f1;
    color: var(--ink);
}

.linked-tabs {
    display: inline-flex;
    flex-wrap: nowrap;
    width: auto;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    margin: -10px 0 18px;
}

.linked-tabs a {
    flex: 0 0 auto;
    min-width: 118px;
    white-space: nowrap;
}

.linked-tabs a.active {
    background: var(--accent);
    color: #fff;
}

.tab-panel {
    display: none;
}

#tab-cartera:checked ~ .tabs-nav label[for="tab-cartera"],
#tab-empresas:checked ~ .tabs-nav label[for="tab-empresas"],
#tab-cortes:checked ~ .tabs-nav label[for="tab-cortes"] {
    background: var(--accent);
    color: #fff;
}

#tab-cartera:checked ~ .tab-panel-cartera,
#tab-empresas:checked ~ .tab-panel-empresas,
#tab-cortes:checked ~ .tab-panel-cortes {
    display: block;
}

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

.entry-form label {
    display: grid;
    gap: 7px;
}

.entry-form .full {
    grid-column: 1 / -1;
}

[data-sale-cart-form] {
    grid-template-columns: 1.1fr 1.7fr 0.55fr 0.75fr 0.9fr auto;
    align-items: end;
    gap: 12px;
}

[data-sale-cart-form] .sale-barcode-field,
[data-sale-cart-form] .sale-product-field,
[data-sale-cart-form] .sale-quantity-field,
[data-sale-cart-form] .sale-price-field,
[data-sale-cart-form] .sale-payment-field,
[data-sale-cart-form] .sale-description-field,
[data-sale-cart-form] .sale-add-action {
    grid-column: auto;
}

[data-sale-cart-form] .sale-description-field {
    grid-column: 1 / 5;
}

[data-sale-cart-form] .sale-add-action {
    align-self: end;
    justify-content: stretch;
}

[data-sale-cart-form] .sale-add-action .button {
    width: 100%;
}

.sale-cart,
.payment-split-box {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
}

.sale-cart[hidden],
.payment-split-box[hidden] {
    display: none;
}

.sale-cart h3,
.payment-split-box h3 {
    margin: 0 0 10px;
    font-size: 15px;
}

.sale-cart .report-note,
.payment-split-box .report-note {
    margin-bottom: 0;
}

.form-grid {
    display: grid;
    grid-column: 1 / -1;
    gap: 14px;
}

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

.form-grid.three-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-inline-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(140px, 0.4fr) auto;
    align-items: end;
    gap: 12px;
}

.laundry-line-grid {
    grid-template-columns: minmax(220px, 1.4fr) minmax(90px, 0.5fr) minmax(140px, 0.8fr) auto;
    align-items: end;
}

.field-with-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: stretch;
}

.field-action-button {
    min-height: 42px;
    padding-inline: 14px;
    white-space: nowrap;
}

.icon-only-field-action {
    width: 42px;
    padding: 0;
    font-size: 22px;
    line-height: 1;
}

.form-quick-action {
    display: flex;
    justify-content: flex-start;
}

.form-section-title {
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.settings-form {
    grid-template-columns: 1fr;
    gap: 18px;
}

.settings-section {
    display: grid;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.settings-section:first-child {
    padding-top: 0;
    border-top: 0;
}

.settings-section h3 {
    margin: 0;
    font-size: 18px;
}

.settings-grid {
    display: grid;
    gap: 12px;
}

.settings-grid-compact {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.settings-wide {
    grid-column: span 2;
}

.tariff-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 10px 14px;
}

.tariff-settings-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(120px, 0.9fr) minmax(90px, 0.65fr);
    gap: 10px;
    align-items: end;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.tariff-settings-row strong {
    align-self: center;
}

.cancellation-settings-grid {
    display: grid;
    gap: 10px;
}

.tariff-preview {
    padding: 10px 12px;
    border: 1px solid #cfded8;
    border-radius: 8px;
    background: #f7fbf9;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.tariff-preview:empty,
.tariff-preview[hidden] {
    display: none;
}

.tariff-preview.is-special {
    border-color: #a8dbc7;
    background: #eafaf3;
    color: #0b6b50;
}

.cancellation-rule-row {
    display: grid;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
}

.cancellation-rule-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    gap: 10px;
}

.entry-form span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.entry-form input,
.entry-form select,
.entry-form textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
}

.entry-form textarea {
    resize: vertical;
}

.entry-form .locked-field,
.entry-form input[readonly],
.entry-form textarea[readonly] {
    background: #f3f7f5;
    color: var(--muted);
    cursor: not-allowed;
}

.entry-form input:focus,
.entry-form select:focus,
.entry-form textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
    outline: none;
}

.entry-form input.field-invalid,
.entry-form select.field-invalid,
.entry-form textarea.field-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.14);
}

.field-feedback {
    color: var(--danger);
    font-size: 12px;
    font-weight: 700;
}

.field-feedback[hidden] {
    display: none;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    padding: 24px;
    background: #17211f;
}

.login-shell {
    width: min(100%, 420px);
}

.login-panel {
    padding: 28px;
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.login-brand {
    margin-bottom: 24px;
    color: var(--ink);
}

.login-brand small {
    color: var(--muted);
}

.login-form {
    display: grid;
    gap: 16px;
}

.login-form label {
    display: grid;
    gap: 7px;
}

.login-form span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.login-form input {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    font: inherit;
}

.login-form input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
    outline: none;
}

.form-error {
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fee2e2;
    color: var(--danger);
    font-size: 14px;
    font-weight: 700;
}

.form-success {
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #dcfce7;
    color: #166534;
    font-size: 14px;
    font-weight: 700;
}

.page-message {
    margin-bottom: 18px;
}

.app-notice {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 32px;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 10px 10px 10px 12px;
    border: 1px solid transparent;
    border-left-width: 4px;
    box-shadow: 0 10px 26px rgba(13, 21, 19, 0.08);
    transition: opacity 180ms ease, transform 180ms ease;
}

.app-notice.form-success {
    border-color: #86d7ab;
    border-left-color: #16834d;
    background: #effcf4;
}

.app-notice.form-error {
    border-color: #f3aaa7;
    border-left-color: #c5261d;
    background: #fff3f2;
}

.app-notice.is-dismissing {
    opacity: 0;
    transform: translateY(-6px);
}

.notice-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    font-size: 19px;
    font-weight: 900;
}

.form-success .notice-icon {
    background: #16834d;
}

.form-error .notice-icon {
    background: #c5261d;
}

.notice-content {
    min-width: 0;
}

.notice-close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: currentColor;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.notice-close:hover,
.notice-close:focus-visible {
    background: rgba(13, 21, 19, 0.08);
    outline: none;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--brand-dark);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

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

.table-actions form {
    margin: 0;
}

.table-actions .button {
    min-height: 34px;
    padding: 0 11px;
}

.muted-inline {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.company-timeline {
    display: grid;
    gap: 12px;
    margin-top: 6px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 12px;
    position: relative;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 20px;
    bottom: -16px;
    width: 2px;
    background: var(--line);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-marker {
    width: 18px;
    height: 18px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 1px var(--line);
    margin-top: 4px;
    z-index: 1;
}

.timeline-corte .timeline-marker {
    background: #2563eb;
}

.timeline-abono .timeline-marker,
.timeline-saldo_aplicado .timeline-marker {
    background: #16a34a;
}

.timeline-pago_anulado .timeline-marker,
.timeline-corte_anulado .timeline-marker,
.timeline-saldo_anulado .timeline-marker {
    background: var(--danger);
}

.timeline-content {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .78);
}

.timeline-head,
.timeline-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.timeline-head span,
.timeline-meta span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.timeline-content p {
    margin: 6px 0 0;
    color: var(--muted);
}

.timeline-meta {
    justify-content: flex-start;
    margin-top: 8px;
}

.audit-json {
    margin: 0;
    max-height: 320px;
    overflow: auto;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 0.86rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.disabled-link {
    opacity: 0.45;
    pointer-events: none;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 120;
}

.modal.is-open {
    display: grid;
    place-items: center;
    padding: 24px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 21, 19, 0.58);
}

.modal-panel {
    position: relative;
    width: min(100%, 780px);
    max-height: min(86vh, 820px);
    overflow: auto;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 30px 80px rgba(13, 21, 19, 0.28);
}

body.has-open-modal .quick-actions {
    display: none;
}

.modal-panel-wide {
    width: min(100%, 1040px);
}

.wide-modal {
    width: min(100%, 1040px);
}

.modal-table-scroll {
    max-height: 52vh;
    overflow: auto;
    margin-top: 16px;
    padding-right: 2px;
}

.laundry-grid-wrap {
    grid-column: 1 / -1;
    overflow-x: auto;
    padding-bottom: 4px;
}

.laundry-grid {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.laundry-grid th,
.laundry-grid td {
    padding: 7px;
    border: 1px solid var(--line);
    text-align: center;
}

.laundry-grid th {
    background: #f2f6f5;
    color: var(--ink);
    font-weight: 800;
}

.laundry-grid tbody th {
    width: 150px;
    text-align: left;
}

.laundry-grid input {
    min-height: 34px;
    padding: 6px;
    text-align: center;
}

.laundry-week-block {
    display: grid;
    gap: 10px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.laundry-week-block:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.laundry-week-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.laundry-week-head strong {
    font-size: 1rem;
}

.laundry-week-head span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

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

.compact-entry-form label {
    gap: 5px;
}

.compact-entry-form input,
.compact-entry-form select,
.compact-entry-form textarea {
    min-height: 38px;
    padding: 8px 10px;
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.modal-actions {
    gap: 10px;
}

.action-modal {
    width: min(100%, 420px);
}

.action-modal .modal-head {
    justify-content: flex-end;
    margin-bottom: 0;
}

.action-card-head {
    display: grid;
    justify-items: center;
    gap: 12px;
    margin: -8px 0 14px;
    text-align: center;
}

.action-card-head h2 {
    color: #555555;
    font-size: 28px;
}

.action-info-icon,
.confirm-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 4px solid #88b2c4;
    color: #88b2c4;
    font-size: 46px;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
}

.action-info-icon {
    border: 0;
    background: #86c5ee;
    color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
}

.action-details {
    display: grid;
    gap: 7px;
    margin: 0 0 24px;
    text-align: center;
}

.action-details div {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.action-details dt {
    color: #555555;
    font-weight: 700;
}

.action-details dd {
    margin: 0;
    color: #666666;
}

.status-pending {
    color: #2563eb;
}

.action-list {
    display: grid;
    gap: 10px;
}

.action-button {
    width: 100%;
}

.whatsapp-button {
    background: #25d366;
    color: #ffffff;
}

.call-button {
    background: #f39c12;
    color: #ffffff;
}

.contact-confirm-panel {
    width: min(100%, 512px);
    display: grid;
    justify-items: center;
    gap: 18px;
    padding: 36px 26px 28px;
    text-align: center;
}

.contact-confirm-panel h2 {
    color: #555555;
    font-size: 30px;
}

.contact-confirm-panel p {
    margin: 0;
    color: #666666;
    font-size: 18px;
}

.confirmation-panel {
    width: min(100%, 500px);
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 18px;
    overflow: visible;
    padding: 28px;
    border-radius: 14px;
}

.confirmation-icon {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border: 3px solid #d69a22;
    border-radius: 50%;
    background: #fff8e8;
    color: #a76500;
    font-size: 34px;
    font-weight: 900;
}

.confirmation-panel[data-tone="danger"] .confirmation-icon {
    border-color: #e58d87;
    background: #fff1f0;
    color: #c5261d;
}

.confirmation-panel[data-tone="success"] .confirmation-icon {
    border-color: #72c99a;
    background: #effcf4;
    color: #16834d;
}

.confirmation-copy {
    min-width: 0;
}

.confirmation-copy .eyebrow {
    margin: 0 0 4px;
}

.confirmation-copy h2 {
    margin: 0;
    color: var(--ink);
    font-size: 24px;
}

.confirmation-copy > p:not(.eyebrow) {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.confirmation-detail {
    padding: 10px 12px;
    border-radius: 8px;
    background: #f3f6f5;
    color: var(--ink) !important;
    font-weight: 800;
}

.confirmation-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}

.confirmation-panel[data-tone="danger"] [data-confirmation-accept] {
    background: var(--danger);
}

.confirmation-panel[data-tone="success"] [data-confirmation-accept] {
    background: #16834d;
}

.text-prompt-field {
    display: grid;
    gap: 7px;
    margin-top: 14px;
}

.text-prompt-field span {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 800;
}

.text-prompt-field textarea {
    width: 100%;
    min-height: 92px;
    resize: vertical;
}

.checkout-panel {
    max-height: min(92vh, 760px);
}

.checkout-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 14px;
}

.checkout-summary div {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8faf9;
}

.checkout-summary dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.checkout-summary dd {
    margin: 5px 0 0;
    color: var(--ink);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.checkout-form {
    align-items: end;
}

.compact-note {
    padding: 8px 10px;
}

.confirm-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.login-help {
    display: grid;
    gap: 5px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

.login-help strong {
    color: var(--ink);
}

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

th,
td {
    padding: 13px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

th {
    color: var(--muted);
    font-size: 13px;
}

.empty-state {
    color: var(--muted);
    text-align: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge-button {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.badge.success {
    background: #dcfce7;
    color: #166534;
}

.badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.badge.info {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge.muted {
    background: #edf2f0;
    color: #5f6f6a;
}

.badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

.room-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.room-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.room-list span {
    color: var(--brand-dark);
    font-weight: 700;
}

.room-list strong {
    display: grid;
    gap: 3px;
    text-align: right;
}

.room-list strong small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    max-width: 260px;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.permission-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.permission-option input {
    margin-top: 3px;
}

.permission-option span {
    display: grid;
    gap: 3px;
}

.permission-option small {
    color: var(--muted);
    font-size: 12px;
}

.user-profile-form {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.user-active-option {
    min-height: 38px;
    margin: 0;
    align-items: center;
}

.type-permission-form {
    display: grid;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.type-permission-form:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.compact-panel-head {
    margin-bottom: 0;
}

.permission-summary {
    display: grid;
    gap: 5px;
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8faf9;
    color: var(--muted);
    font-size: 13px;
}

.permission-summary strong {
    color: var(--ink);
}

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

.permission-group-card {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(13, 32, 28, 0.06);
}

.permission-group-card h2 {
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.permission-group-card-extra {
    border-top: 4px solid var(--brand);
}

.permission-group-card-blocked {
    border-top: 4px solid #b3261e;
}

.permission-group-card .permission-grid {
    margin-bottom: 0;
}

.housekeeping-panel {
    margin-bottom: 18px;
}

.housekeeping-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    gap: 18px;
}

.housekeeping-grid h3 {
    margin: 0 0 12px;
    font-size: 16px;
}

.housekeeping-list li {
    align-items: stretch;
}

.inline-form {
    margin: 0;
}

.room-item-state-form {
    display: grid;
    grid-template-columns: minmax(130px, 0.45fr) minmax(180px, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.room-item-state-form select,
.room-item-state-form input {
    min-height: 38px;
}

.muted-block {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.compact-list {
    display: grid;
    gap: 10px;
    margin: 14px 0;
}

.compact-list h3 {
    margin: 0;
    font-size: 15px;
}

.compact-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
}

.compact-list-row > div:first-child {
    display: grid;
    gap: 3px;
}

.compact-list-row span,
.compact-list-row small {
    color: var(--muted);
}

.compact-list-row.is-muted {
    opacity: 0.72;
}

.compact-list-actions {
    min-width: min(100%, 320px);
}

.compact-list-actions .inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.compact-list-actions input {
    min-width: 0;
}

.entity-history {
    display: grid;
    gap: 12px;
}

.entity-history-item {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.entity-history-item time {
    color: var(--muted);
    font-weight: 700;
}

.entity-history-item div {
    display: grid;
    gap: 4px;
}

.entity-history-item span {
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.entity-history-item em {
    width: fit-content;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef2f7;
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
    font-weight: 700;
}

.entity-history-item p {
    margin: 0;
    color: var(--muted);
}

.empty-state.compact {
    margin: 10px 0 0;
    text-align: left;
}

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.room {
    min-height: 130px;
    padding: 18px;
    display: grid;
    align-content: space-between;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow);
    text-align: left;
}

.room strong {
    font-size: 32px;
}

.room span {
    font-weight: 700;
}

.room small {
    color: var(--muted);
    font-weight: 700;
}

.room-maintenance-reason {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.room-maintenance-reason[hidden] {
    display: none;
}

.room-form {
    display: block;
}

.room-action {
    cursor: pointer;
    font: inherit;
    transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.room-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 50px rgba(20, 35, 31, 0.12);
}

.room-action:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.22);
    outline-offset: 3px;
}

.room-action:disabled,
.room-action.is-loading {
    cursor: wait;
    opacity: 0.72;
}

.room-state-card {
    cursor: default;
}

.room-state-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.room-state-actions .inline-form {
    margin: 0;
}

.state-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.state-chip.is-active,
.state-chip:disabled {
    background: var(--brand);
    color: #ffffff;
    cursor: default;
}

.state-chip-limpieza.is-active,
.state-chip-limpieza:disabled {
    border-color: #b91c1c;
    background: #dc2626;
    color: #ffffff;
}

.state-chip-retoque.is-active,
.state-chip-retoque:disabled {
    border-color: #0369a1;
    background: #0ea5e9;
    color: #ffffff;
}

.state-chip-mantenimiento.is-active,
.state-chip-mantenimiento:disabled {
    border-color: #b45309;
    background: #c47a12;
    color: #ffffff;
}

.room-inline-message[hidden] {
    display: none;
}

.room.available {
    border-top: 5px solid var(--brand);
}

.room.reserved-today {
    border-top-color: #f59e0b;
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 48%);
    box-shadow: 0 18px 46px rgba(180, 83, 9, 0.16);
}

.room-reservation-note {
    display: grid;
    gap: 5px;
    margin-top: 8px;
    color: #7c4a03;
    font-weight: 700;
}

.room.occupied {
    border-top: 5px solid var(--accent);
}

.room.needs-cleaning,
.room.needs-retouch {
    box-shadow: 0 18px 46px rgba(14, 116, 144, 0.18);
}

.room.needs-cleaning {
    background: linear-gradient(180deg, #fff5f5 0%, #ffffff 48%);
}

.room.needs-retouch {
    background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 48%);
}

.room.needs-cleaning.needs-retouch {
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 48%);
    box-shadow: 0 18px 46px rgba(194, 65, 12, 0.16);
}

.room-alert-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.room.cleaning {
    border-top: 5px solid #dc2626;
    background: linear-gradient(180deg, #fff5f5 0%, #ffffff 42%);
    box-shadow: 0 18px 46px rgba(185, 28, 28, 0.16);
}

.room.retouch {
    border-top: 5px solid #0ea5e9;
    background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 42%);
    box-shadow: 0 18px 46px rgba(14, 165, 233, 0.14);
}

.room.maintenance {
    border-top: 5px solid #c47a12;
}

@media (max-width: 900px) {
    [data-sale-cart-form] {
        grid-template-columns: 1fr;
    }

    [data-sale-cart-form] .sale-barcode-field,
    [data-sale-cart-form] .sale-product-field,
    [data-sale-cart-form] .sale-quantity-field,
    [data-sale-cart-form] .sale-price-field,
    [data-sale-cart-form] .sale-payment-field,
    [data-sale-cart-form] .sale-description-field,
    [data-sale-cart-form] .sale-add-action {
        grid-column: 1 / -1;
    }

    body {
        grid-template-columns: 1fr;
        padding-left: 0;
    }

    .sidebar {
        inset: auto;
        width: auto;
        min-height: auto;
        padding: 14px 16px;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .sidebar-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
    }

    .brand {
        margin-bottom: 12px;
    }

    .nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }

    .nav a {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .user-box {
        margin-top: 12px;
        padding: 10px 0 0;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    .reports-filter,
    .reports-main-grid {
        grid-template-columns: 1fr;
    }

    .daily-chart {
        grid-template-columns: repeat(auto-fit, minmax(28px, 1fr));
    }

    .filter-actions {
        justify-content: flex-start;
    }

    .checkout-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    body {
        align-content: start;
    }

    .sidebar {
        min-height: 58px;
        height: auto;
        padding: 12px;
    }

    .reservation-alert {
        right: 12px;
        bottom: 12px;
        left: 12px;
        justify-content: center;
        flex-wrap: wrap;
        text-align: center;
    }

    .stock-alert {
        bottom: 92px;
    }

    .hourly-room-alert {
        bottom: 172px;
    }

    .backup-alert {
        bottom: 252px;
    }

    .quick-actions {
        left: auto !important;
        top: 14px !important;
        right: 74px !important;
        bottom: auto !important;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        max-width: calc(100vw - 132px);
        z-index: 82;
    }

    .report-kpi-grid {
        grid-template-columns: 1fr;
    }

    .mini-stat-grid {
        grid-template-columns: 1fr;
    }

    .metric-bar div {
        display: grid;
        gap: 3px;
    }

    .metric-bar span {
        text-align: left;
    }

    .quick-actions-handle {
        display: none;
    }

    .quick-action-button {
        min-height: 38px;
        min-width: 0;
        flex: 0 1 auto;
        padding: 9px 13px;
        font-size: 0.88rem;
        box-shadow: 0 8px 20px rgba(20, 35, 31, 0.2);
    }

    .tabs-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .linked-tabs {
        display: flex;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .linked-tabs a {
        flex: 0 0 auto;
        min-width: 128px;
    }

    .tabs-nav label,
    .tabs-nav a {
        min-height: 38px;
        padding: 7px 6px;
        font-size: 0.88rem;
    }

    .filter-form {
        grid-template-columns: 1fr;
        padding: 12px;
    }

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

    .sidebar-head {
        margin-bottom: 0;
    }

    .brand {
        flex: 0 0 auto;
        margin-bottom: 0;
    }

    .brand-mark,
    .brand-logo {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .brand-wordmark {
        display: none;
    }

    .brand-text {
        gap: 0;
        justify-items: start;
    }

    .brand-text strong {
        font-size: 14px;
    }

    .mobile-user-chip {
        min-width: 0;
        flex: 1 1 auto;
        display: grid;
        gap: 2px;
        color: #ffffff;
        font-size: 12px;
        line-height: 1.1;
        text-align: right;
    }

    .mobile-user-chip strong,
    .mobile-user-chip span {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-user-chip span {
        color: #9fe3d8;
        font-weight: 700;
    }

    .menu-button {
        width: 42px;
        height: 38px;
        flex: 0 0 42px;
        display: grid;
        place-content: center;
        gap: 5px;
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.08);
        cursor: pointer;
    }

    .menu-button span {
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: #ffffff;
    }

    .nav {
        display: none;
        margin-top: 12px;
        overflow-x: visible;
        padding-bottom: 0;
    }

    .menu-check:checked ~ .nav {
        display: grid;
    }

    .nav a {
        width: 100%;
        padding: 10px 11px;
        font-size: 14px;
    }

    .user-box {
        display: none;
    }

    .menu-check:checked ~ .user-box {
        display: block;
        margin-top: 10px;
        padding: 10px 11px 0;
    }

    .menu-check:checked ~ .user-box span,
    .menu-check:checked ~ .user-box small {
        display: none;
    }

    .menu-check:checked ~ .user-box a {
        display: inline-block;
    }

    .main {
        padding: 22px 16px;
    }

    body:has(.quick-actions) .global-cash-status,
    .global-cash-status {
        align-items: flex-start;
        flex-direction: column;
        padding-left: 14px;
        min-height: 0;
    }

    .global-cash-status a {
        width: 100%;
        text-align: center;
    }

    .input-action-row {
        flex-direction: column;
    }

    .input-action-row .button {
        width: 100%;
    }

    .main::before {
        left: 50%;
        top: 56%;
        width: 76vw;
        opacity: 0.15;
    }

    h1 {
        font-size: 28px;
    }

    .page-head {
        align-items: stretch;
        flex-direction: column;
    }

    .page-head-actions {
        justify-content: stretch;
    }

    .page-head-actions .button {
        flex: 1 1 180px;
    }

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

    .settings-grid-compact,
    .tariff-settings-grid,
    .tariff-settings-row,
    .cancellation-rule-grid {
        grid-template-columns: 1fr;
    }

    .settings-wide {
        grid-column: auto;
    }

    .tariff-settings-row {
        align-items: stretch;
    }

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

    .inventory-count-grid {
        grid-template-columns: 1fr;
    }

    .checkout-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .permission-two-columns {
        grid-template-columns: 1fr;
    }

    .checkout-summary div {
        padding: 8px 10px;
    }

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

    .checkout-panel {
        padding: 14px;
    }

    .checkout-panel .modal-head {
        margin-bottom: 12px;
    }

    .stats-grid,
    .rooms-grid,
    .housekeeping-grid {
        grid-template-columns: 1fr;
    }

    .housekeeping-list li {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .housekeeping-list .button {
        width: 100%;
    }

    table {
        display: block;
        overflow-x: auto;
    }

    .responsive-table {
        display: block;
        overflow: visible;
    }

    .responsive-table thead {
        display: none;
    }

    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        width: 100%;
    }

    .responsive-table tbody {
        display: block;
    }

    .responsive-table tr {
        display: grid;
        gap: 8px 12px;
        padding: 12px 0;
        border-bottom: 1px solid var(--line);
    }

    .responsive-table tr:last-child {
        border-bottom: 0;
    }

    .responsive-table td {
        display: grid;
        gap: 3px;
        min-width: 0;
        padding: 0;
        border-bottom: 0;
        overflow-wrap: anywhere;
    }

    .responsive-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
    }

    .responsive-table td[colspan] {
        grid-column: 1 / -1;
        text-align: center;
    }

    .responsive-table td[colspan]::before {
        display: none;
    }

    .reservations-table tr {
        grid-template-columns: 0.7fr 1.45fr 1.35fr;
    }

    .reservations-table td:nth-child(4),
    .reservations-table td:nth-child(5) {
        grid-row: 2;
    }

    .guests-table tr {
        grid-template-columns: 0.8fr 0.45fr 1fr 1.15fr;
    }

    .guests-table td:nth-child(5),
    .guests-table td:nth-child(6),
    .guests-table td:nth-child(7),
    .guests-table td:nth-child(8) {
        grid-row: 2;
    }

    .guests-table td:nth-child(8) {
        grid-column: 3 / span 2;
    }

    .guests-table .table-actions {
        gap: 6px;
    }

    .guests-table .table-actions .button {
        min-height: 32px;
        padding: 0 8px;
        font-size: 12px;
    }

    .users-table tr {
        grid-template-columns: 0.9fr 1.25fr 0.9fr;
    }

    .users-table td:nth-child(4),
    .users-table td:nth-child(5) {
        grid-row: 2;
    }

    .users-table td:nth-child(5) {
        grid-column: 2 / span 2;
    }

    .users-table .table-actions .button {
        min-height: 32px;
        padding: 0 8px;
        font-size: 12px;
    }

    .modal.is-open {
        padding: 12px;
        align-items: stretch;
    }

    .modal-panel {
        max-height: calc(100vh - 24px);
        padding: 16px;
    }

    .form-grid.two-columns,
    .form-grid.three-columns {
        grid-template-columns: 1fr;
    }

    .compact-inline-form,
    .room-item-state-form,
    .laundry-line-grid {
        grid-template-columns: 1fr;
    }

    .modal-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        align-items: stretch;
    }

    .modal-actions .button {
        width: 100%;
        min-width: 0;
        padding-right: 10px;
        padding-left: 10px;
        white-space: normal;
    }
}

@media (max-width: 620px) {
    .confirmation-panel {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 14px;
        padding: 24px 18px 18px;
        text-align: center;
    }

    .confirmation-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }

    .confirmation-actions .button {
        width: 100%;
    }

    .app-notice {
        grid-template-columns: 34px minmax(0, 1fr) 30px;
        gap: 9px;
    }
}

@media (max-width: 420px) {
    .checkout-summary,
    .checkout-form {
        grid-template-columns: 1fr;
    }
}

@media print {
    body {
        display: block;
        padding-left: 0;
        background: #ffffff;
    }

    .sidebar,
    .reservation-alert,
    .report-actions .form-actions {
        display: none !important;
    }

    .main {
        padding: 0;
        overflow: visible;
    }

    .main::before {
        display: none;
    }

    .panel,
    .report-sheet {
        border: 0;
        box-shadow: none;
    }

    .report-sheet {
        padding: 0;
    }

    .page-break {
        break-before: page;
    }

    table {
        display: table;
        width: 100%;
        overflow: visible;
        font-size: 11px;
    }

    th,
    td {
        padding: 6px;
    }
}
