/* ============================================================================
   RIM Hotels & Suites - design system
   Glassmorphic surfaces over an animated aurora field. Every legacy class name
   used by the Razor views is preserved so the redesign is purely presentational.
   ========================================================================== */

:root {
    /* Light green / white / grey palette. The token names are unchanged so every existing
       rule keeps working; only the values moved from a dark theme to a light one. */
    --hms-bg-0: #f6faf7;
    --hms-bg-1: #eef5f0;
    --hms-bg-2: #e4efe8;
    --hms-accent: #1f9d63;
    --hms-accent-2: #46b985;
    --hms-accent-3: #8fd3b0;
    --hms-accent-warm: #b4801f;
    --hms-text: #15291f;
    --hms-text-soft: #3d5548;
    --hms-text-dim: #6b8478;
    --hms-glass: rgba(255, 255, 255, 0.74);
    --hms-glass-strong: rgba(255, 255, 255, 0.9);
    --hms-glass-border: rgba(24, 82, 58, 0.16);
    --hms-glass-border-soft: rgba(24, 82, 58, 0.09);
    --hms-shadow: 0 18px 44px rgba(23, 62, 45, 0.14);
    --hms-shadow-sm: 0 8px 22px rgba(23, 62, 45, 0.09);
    --hms-radius: 18px;
    --hms-radius-sm: 12px;
    --hms-blur: 16px;
    --hms-ok: #17945c;
    --hms-warn: #a97a16;
    --hms-bad: #bf3a48;
    --hms-info: #2f6fa8;
    --hms-sidebar-w: 268px;
    /* Surfaces introduced for the light theme. */
    --hms-surface: rgba(255, 255, 255, 0.84);
    --hms-surface-alt: rgba(31, 157, 99, 0.07);
    --hms-topbar: rgba(255, 255, 255, 0.8);
    --hms-header-tint: rgba(31, 157, 99, 0.055);
    --hms-glow: rgba(31, 157, 99, 0.26);
    --hms-on-accent: #ffffff;
}

/* ---------------------------------------------------------------- reset ---- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

@media (min-width: 768px) {
    html {
        font-size: 15px;
    }
}

body.hms-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--hms-text);
    background: radial-gradient(1200px 700px at 10% -12%, rgba(70, 185, 133, 0.18), transparent 62%), radial-gradient(1000px 620px at 90% -4%, rgba(143, 211, 176, 0.22), transparent 64%), radial-gradient(900px 700px at 50% 112%, rgba(31, 157, 99, 0.12), transparent 66%), linear-gradient(165deg, #ffffff, var(--hms-bg-0) 42%, var(--hms-bg-1) 78%, var(--hms-bg-2));
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

    /* Animated aurora: two slow-drifting blurred orbs behind everything. */
    body.hms-body::before,
    body.hms-body::after {
        content: "";
        position: fixed;
        z-index: 0;
        border-radius: 50%;
        filter: blur(90px);
        opacity: 0.55;
        pointer-events: none;
    }

    body.hms-body::before {
        width: 46vw;
        height: 46vw;
        top: -14vw;
        left: -10vw;
        background: radial-gradient(circle, rgba(70, 185, 133, 0.45), transparent 70%);
        animation: hms-drift-a 26s ease-in-out infinite alternate;
    }

    body.hms-body::after {
        width: 52vw;
        height: 52vw;
        bottom: -20vw;
        right: -12vw;
        background: radial-gradient(circle, rgba(143, 211, 176, 0.5), transparent 70%);
        animation: hms-drift-b 32s ease-in-out infinite alternate;
    }

@keyframes hms-drift-a {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(6vw, 5vw, 0) scale(1.15);
    }
}

@keyframes hms-drift-b {
    from {
        transform: translate3d(0, 0, 0) scale(1.1);
    }

    to {
        transform: translate3d(-7vw, -4vw, 0) scale(1);
    }
}

/* ---------------------------------------------------------------- shell ---- */

.hms-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: var(--hms-sidebar-w) minmax(0, 1fr);
    min-height: 100vh;
}

/* -------------------------------------------------------------- sidebar ---- */

.hms-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 22px 16px 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 250, 247, 0.88));
    backdrop-filter: blur(var(--hms-blur)) saturate(150%);
    -webkit-backdrop-filter: blur(var(--hms-blur)) saturate(150%);
    border-right: 1px solid var(--hms-glass-border-soft);
    overflow-y: auto;
}

.hms-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 20px;
    border-bottom: 1px solid var(--hms-glass-border-soft);
    margin-bottom: 14px;
}

.hms-brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 14px;
    font-weight: 800;
    letter-spacing: 0.06em;
    font-size: 0.9rem;
    color: var(--hms-on-accent);
    background: linear-gradient(135deg, var(--hms-accent), var(--hms-accent-2));
    box-shadow: 0 10px 26px rgba(31, 157, 99, 0.3);
    animation: hms-breathe 6s ease-in-out infinite;
}

.hms-brand-logo {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    object-fit: contain;
    border-radius: 12px;
}

@keyframes hms-breathe {
    0%, 100% {
        box-shadow: 0 10px 24px rgba(31, 157, 99, 0.24);
    }

    50% {
        box-shadow: 0 14px 32px rgba(70, 185, 133, 0.4);
    }
}

.hms-brand strong {
    display: block;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    color: var(--hms-text);
}

.hms-brand small {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hms-text-soft);
}

.hms-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-bottom: 24px;
}

.hms-nav-group {
    margin: 18px 8px 6px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--hms-text-dim);
}

.hms-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--hms-radius-sm);
    color: var(--hms-text-soft);
    font-size: 0.875rem;
    text-decoration: none;
    border: 1px solid transparent;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

    .hms-nav-link:hover,
    .hms-nav-link:focus-visible {
        color: var(--hms-text);
        background: var(--hms-glass);
        border-color: var(--hms-glass-border-soft);
        transform: translateX(3px);
        text-decoration: none;
    }

    .hms-nav-link::before {
        content: "";
        position: absolute;
        left: -16px;
        top: 50%;
        width: 3px;
        height: 0;
        border-radius: 0 3px 3px 0;
        background: linear-gradient(180deg, var(--hms-accent), var(--hms-accent-2));
        transform: translateY(-50%);
        transition: height 0.2s ease;
    }

    .hms-nav-link:hover::before {
        height: 22px;
    }

    .hms-nav-link.is-active {
        color: var(--hms-on-accent);
        font-weight: 650;
        background: linear-gradient(135deg, var(--hms-accent), var(--hms-accent-2));
        box-shadow: 0 10px 26px rgba(31, 157, 99, 0.26);
    }

        .hms-nav-link.is-active::before {
            display: none;
        }

    .hms-nav-link.is-pending {
        color: var(--hms-text-dim);
        cursor: not-allowed;
        opacity: 0.55;
        font-style: italic;
    }

        .hms-nav-link.is-pending:hover {
            background: transparent;
            transform: none;
            border-color: transparent;
        }

/* The menu button only exists on phones: hidden on the desktop where the sidebar is a fixed rail. */
.hms-nav-toggle {
    display: none;
}

/* ----------------------------------------------------------------- main ---- */

.hms-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hms-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 30px;
    background: var(--hms-topbar);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    border-bottom: 1px solid var(--hms-glass-border-soft);
}

.hms-page-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    background: linear-gradient(100deg, #15291f, #1f9d63 58%, #46b985);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hms-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hms-user-name {
    font-size: 0.82rem;
    color: var(--hms-text-soft);
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--hms-surface);
    border: 1px solid var(--hms-glass-border-soft);
}

.hms-content {
    padding: 26px 30px 56px;
    animation: hms-fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes hms-fade-up {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* Stagger children for the entrance animation. */
.hms-content > * {
    animation: hms-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

    .hms-content > *:nth-child(1) {
        animation-delay: 0.02s;
    }

    .hms-content > *:nth-child(2) {
        animation-delay: 0.06s;
    }

    .hms-content > *:nth-child(3) {
        animation-delay: 0.10s;
    }

    .hms-content > *:nth-child(4) {
        animation-delay: 0.14s;
    }

    .hms-content > *:nth-child(5) {
        animation-delay: 0.18s;
    }

    .hms-content > *:nth-child(6) {
        animation-delay: 0.22s;
    }

    .hms-content > *:nth-child(7) {
        animation-delay: 0.26s;
    }

    .hms-content > *:nth-child(8) {
        animation-delay: 0.30s;
    }

/* ----------------------------------------------------------- glass cards ---- */

.card {
    background: var(--hms-surface);
    backdrop-filter: blur(var(--hms-blur)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--hms-blur)) saturate(140%);
    border: 1px solid var(--hms-glass-border);
    border-radius: var(--hms-radius);
    box-shadow: var(--hms-shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    color: var(--hms-text);
    margin-bottom: 20px;
    overflow: hidden;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease, border-color 0.28s ease;
}

    .card:hover {
        transform: translateY(-3px);
        border-color: rgba(31, 157, 99, 0.3);
        box-shadow: var(--hms-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    }

.card-header,
.card-footer {
    background: var(--hms-header-tint);
    border-color: var(--hms-glass-border-soft);
    color: var(--hms-text);
    padding: 14px 18px;
}

.card-header {
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Older views mark headers with Bootstrap's bg-white; keep them on the same tint as the rest
   so the card hierarchy stays uniform in the light theme. */
.card > .card-header.bg-white,
.card > .card-footer.bg-white {
    background: var(--hms-header-tint) !important;
}

.card-body {
    padding: 18px;
    color: var(--hms-text-soft);
}

.card-title {
    color: var(--hms-text);
    font-weight: 650;
    margin-bottom: 10px;
}

/* ------------------------------------------------------------ stat tiles ---- */

.hms-stat {
    position: relative;
    padding: 18px 18px 16px;
    border-radius: var(--hms-radius);
    background: var(--hms-surface);
    border: 1px solid var(--hms-glass-border);
    backdrop-filter: blur(var(--hms-blur)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--hms-blur)) saturate(140%);
    box-shadow: var(--hms-shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    overflow: hidden;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}

    .hms-stat::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(120deg, transparent 30%, rgba(31, 157, 99, 0.14) 50%, transparent 70%);
        transform: translateX(-120%);
        transition: transform 0.7s ease;
    }

    .hms-stat:hover {
        transform: translateY(-4px);
        box-shadow: var(--hms-shadow);
    }

        .hms-stat:hover::after {
            transform: translateX(120%);
        }

.hms-stat-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--hms-text-dim);
    margin-bottom: 8px;
}

.hms-stat-value {
    display: block;
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    background: linear-gradient(120deg, #15291f, var(--hms-accent) 85%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hms-stat-note {
    display: block;
    margin-top: 6px;
    font-size: 0.76rem;
    color: var(--hms-text-dim);
}

/* ---------------------------------------------------------------- tables ---- */

.table-responsive {
    border-radius: var(--hms-radius);
    /* A wide table must scroll rather than be clipped: the menu and stock screens carry inline forms
       that make a table wider than a phone or a narrow window, and `overflow: hidden` used to cut the
       right-hand columns off with no way to reach them. */
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--hms-glass-border-soft);
}

.table {
    width: 100%;
    margin: 0;
    color: var(--hms-text-soft);
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.86rem;
}

    .table > :not(caption) > * > * {
        padding: 10px 14px;
        background: transparent;
        border-bottom: 1px solid var(--hms-glass-border-soft);
        color: inherit;
        vertical-align: middle;
    }

    .table thead th,
    .table-light > th,
    .table > thead {
        background: var(--hms-surface-alt) !important;
        color: var(--hms-text) !important;
        font-size: 0.74rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        border-bottom: 1px solid var(--hms-glass-border) !important;
        white-space: nowrap;
    }

.table-hover > tbody > tr {
    transition: background 0.16s ease, transform 0.16s ease;
}

    .table-hover > tbody > tr:hover > * {
        background: rgba(31, 157, 99, 0.08) !important;
        color: var(--hms-text);
    }

.table tbody tr:last-child > * {
    border-bottom: 0;
}

.table-sm > :not(caption) > * > * {
    padding: 7px 11px;
}

/* ---- serial number column ---- */

.hms-col-sn,
.hms-sn {
    width: 3.5rem;
    text-align: right;
    color: var(--hms-text-dim);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ---- forms living inside table cells ---- */

/* A price or availability form sits at the end of its row. It wraps instead of forcing the column
   wider than the screen, so the table stays readable in a narrow window. */
.hms-inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.hms-inline-input {
    width: 8rem;
    min-width: 6rem;
}

/* The per-item edit form opens inside its row; its width is bounded by the cell, never by a fixed
   pixel minimum that could not fit on a phone. */
.hms-edit-form {
    min-width: min(320px, 100%);
    max-width: 100%;
}

/* -------------------------------------------------------------- controls ---- */

.btn {
    --hms-btn-bg: var(--hms-surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 11px;
    border: 1px solid var(--hms-glass-border);
    background: var(--hms-btn-bg);
    color: var(--hms-text);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.16s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

    .btn:hover {
        transform: translateY(-1px);
        box-shadow: var(--hms-shadow-sm);
        text-decoration: none;
        color: var(--hms-text);
    }

    .btn:active {
        transform: translateY(0) scale(0.99);
    }

    .btn:focus-visible {
        outline: 2px solid var(--hms-accent);
        outline-offset: 2px;
    }

.btn-sm {
    padding: 5px 11px;
    font-size: 0.78rem;
    border-radius: 9px;
}

.btn-primary,
.btn-success {
    background: linear-gradient(135deg, var(--hms-accent), var(--hms-accent-2));
    border-color: transparent;
    color: var(--hms-on-accent);
    box-shadow: 0 10px 24px rgba(31, 157, 99, 0.24);
}

    .btn-primary:hover,
    .btn-success:hover {
        color: var(--hms-on-accent);
        box-shadow: 0 14px 30px rgba(31, 157, 99, 0.34);
    }

.btn-outline-light,
.btn-outline-secondary {
    border-color: var(--hms-glass-border);
    color: var(--hms-text-soft);
}

    .btn-outline-light:hover,
    .btn-outline-secondary:hover {
        border-color: rgba(31, 157, 99, 0.45);
        background: rgba(31, 157, 99, 0.09);
        color: var(--hms-text);
    }

.btn-outline-primary {
    border-color: rgba(31, 157, 99, 0.5);
    color: #157048;
}

    .btn-outline-primary:hover {
        background: rgba(31, 157, 99, 0.12);
        color: #104f34;
    }

.btn-outline-danger,
.btn-danger {
    border-color: rgba(191, 58, 72, 0.45);
    color: #a52d39;
}

    .btn-outline-danger:hover,
    .btn-danger:hover {
        background: rgba(191, 58, 72, 0.1);
        color: #8c2531;
    }

.btn-outline-warning {
    border-color: rgba(169, 122, 22, 0.45);
    color: #8a6311;
}

    .btn-outline-warning:hover {
        background: rgba(169, 122, 22, 0.1);
    }

.btn-outline-success {
    border-color: rgba(23, 148, 92, 0.45);
    color: #147a4c;
}

    .btn-outline-success:hover {
        background: rgba(23, 148, 92, 0.1);
    }

.btn-outline-dark {
    border-color: var(--hms-glass-border);
    color: var(--hms-text-soft);
}

.btn-light {
    background: #ffffff;
    color: var(--hms-text);
    border-color: var(--hms-glass-border);
}

.btn-link {
    border-color: transparent;
    background: transparent;
    color: var(--hms-accent);
    box-shadow: none;
}

    .btn-link:hover {
        background: transparent;
        color: #147a4c;
        box-shadow: none;
    }

/* forms */

.form-label {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hms-text-dim);
    margin-bottom: 5px;
}

.form-control,
.form-select {
    background: #ffffff;
    border: 1px solid var(--hms-glass-border);
    border-radius: 10px;
    color: var(--hms-text);
    padding: 8px 12px;
    font-size: 0.87rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

    .form-control::placeholder {
        color: rgba(107, 132, 120, 0.85);
    }

    .form-control:focus,
    .form-select:focus {
        background: #ffffff;
        border-color: rgba(31, 157, 99, 0.6);
        box-shadow: 0 0 0 3px rgba(31, 157, 99, 0.15);
        color: var(--hms-text);
        outline: none;
    }

    .form-select option {
        background: #ffffff;
        color: var(--hms-text);
    }

.form-control-sm,
.form-select-sm {
    padding: 5px 9px;
    font-size: 0.8rem;
}

.form-text {
    color: var(--hms-text-dim);
    font-size: 0.76rem;
}

.form-check-input {
    background-color: #ffffff;
    border-color: var(--hms-glass-border);
}

    .form-check-input:checked {
        background-color: var(--hms-accent);
        border-color: var(--hms-accent);
    }

.form-check-label {
    color: var(--hms-text-soft);
    font-size: 0.86rem;
}

/* --------------------------------------------------------------- badges ---- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: rgba(31, 157, 99, 0.09);
    border: 1px solid var(--hms-glass-border);
    color: var(--hms-text-soft);
}

    .badge.bg-success,
    .badge.text-bg-success {
        background: rgba(23, 148, 92, 0.14) !important;
        color: #136f45 !important;
        border-color: rgba(23, 148, 92, 0.34);
    }

    .badge.bg-danger,
    .badge.text-bg-danger {
        background: rgba(191, 58, 72, 0.14) !important;
        color: #9c2a37 !important;
        border-color: rgba(191, 58, 72, 0.34);
    }

    .badge.bg-warning,
    .badge.text-bg-warning {
        background: rgba(169, 122, 22, 0.16) !important;
        color: #7d5a0f !important;
        border-color: rgba(169, 122, 22, 0.36);
    }

    .badge.bg-secondary,
    .badge.text-bg-secondary {
        background: rgba(107, 132, 120, 0.14) !important;
        color: #4a6055 !important;
        border-color: rgba(107, 132, 120, 0.3);
    }

    .badge.bg-info,
    .badge.text-bg-info {
        background: rgba(47, 111, 168, 0.14) !important;
        color: #245a8b !important;
        border-color: rgba(47, 111, 168, 0.32);
    }

/* --------------------------------------------------------------- alerts ---- */

.alert {
    border-radius: var(--hms-radius-sm);
    border: 1px solid var(--hms-glass-border);
    background: var(--hms-surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--hms-text);
    padding: 12px 16px;
    animation: hms-fade-up 0.4s ease both;
}

.alert-success {
    border-color: rgba(23, 148, 92, 0.4);
    background: rgba(23, 148, 92, 0.09);
    color: #145c3a;
}

.alert-danger {
    border-color: rgba(191, 58, 72, 0.38);
    background: rgba(191, 58, 72, 0.08);
    color: #8a2531;
}

.alert-warning {
    border-color: rgba(169, 122, 22, 0.38);
    background: rgba(169, 122, 22, 0.09);
    color: #6d4f0d;
}

.alert-info,
.alert-secondary,
.alert-light {
    border-color: rgba(47, 111, 168, 0.32);
    background: rgba(47, 111, 168, 0.08);
    color: #23527d;
}

.btn-close {
    filter: none;
    opacity: 0.5;
}

/* ------------------------------------------------------- room/board tiles ---- */

.hms-room-tile,
.hms-board-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--hms-glass);
    border: 1px solid var(--hms-glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--hms-text);
    text-decoration: none;
    box-shadow: var(--hms-shadow-sm);
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.22s ease;
    overflow: hidden;
}

    .hms-room-tile::before,
    .hms-board-tile::before {
        content: "";
        position: absolute;
        inset: 0 auto 0 0;
        width: 4px;
        background: linear-gradient(180deg, var(--hms-accent), var(--hms-accent-2));
        opacity: 0.85;
    }

    .hms-room-tile:hover,
    .hms-board-tile:hover {
        transform: translateY(-3px) scale(1.012);
        border-color: rgba(31, 157, 99, 0.4);
        box-shadow: var(--hms-shadow);
        color: var(--hms-text);
        text-decoration: none;
    }

/* Availability grid */

.hms-cal-wrap {
    overflow-x: auto;
    border-radius: var(--hms-radius);
    border: 1px solid var(--hms-glass-border-soft);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hms-cal {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.78rem;
    min-width: 680px;
}

    .hms-cal th,
    .hms-cal td {
        padding: 7px 9px;
        border-bottom: 1px solid var(--hms-glass-border-soft);
        border-right: 1px solid var(--hms-glass-border-soft);
        text-align: center;
        white-space: nowrap;
    }

    .hms-cal thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(10px);
        color: var(--hms-text);
        font-size: 0.7rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

.hms-cal-room,
.hms-cal-name {
    text-align: left;
    font-weight: 650;
    color: var(--hms-text);
    background: rgba(246, 250, 247, 0.96);
    position: sticky;
    left: 0;
    z-index: 1;
}

.hms-cal-cell {
    color: var(--hms-text-dim);
    transition: background 0.15s ease, color 0.15s ease;
}

.hms-cal td:hover {
    background: rgba(31, 157, 99, 0.09);
}

/* ---------------------------------------------------------------- auth ---- */

.hms-auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background: radial-gradient(900px 600px at 15% 10%, rgba(70, 185, 133, 0.22), transparent 62%), radial-gradient(900px 600px at 85% 90%, rgba(143, 211, 176, 0.26), transparent 64%), linear-gradient(165deg, #ffffff, var(--hms-bg-0) 45%, var(--hms-bg-2));
}

.hms-auth-wrap {
    width: min(430px, 100%);
    animation: hms-fade-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hms-auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: center;
    margin-bottom: 22px;
}

.hms-auth-card {
    padding: 30px 28px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid var(--hms-glass-border);
    box-shadow: var(--hms-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    color: var(--hms-text);
}

    .hms-auth-card h1,
    .hms-auth-card h2 {
        font-size: 1.25rem;
        font-weight: 700;
        margin-bottom: 6px;
    }

    .hms-auth-card .card-body {
        padding: 0;
    }

/* -------------------------------------------------------------- utility ---- */

a {
    color: var(--hms-accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

    a:hover {
        color: #147a4c;
        text-decoration: underline;
    }

h1, h2, h3, h4, h5, h6 {
    color: var(--hms-text);
    font-weight: 650;
    letter-spacing: -0.01em;
}

/* --------------------------------------------------- finance screen pieces ---- */

/* Document references read as data, not prose, so they use a monospaced face. */
.hms-code {
    font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace;
    font-size: 0.82em;
    letter-spacing: 0.01em;
    padding: 2px 7px;
    border-radius: 7px;
    background: rgba(31, 157, 99, 0.09);
    border: 1px solid rgba(31, 157, 99, 0.16);
    color: #17624a;
    white-space: nowrap;
}

/* Approval trail on the expense detail screen. */
.hms-timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 18px;
    border-left: 2px solid rgba(31, 157, 99, 0.24);
}

    .hms-timeline > li {
        position: relative;
        padding: 0 0 16px 6px;
    }

        .hms-timeline > li:last-child {
            padding-bottom: 0;
        }

        .hms-timeline > li::before {
            content: "";
            position: absolute;
            left: -25px;
            top: 5px;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: var(--hms-accent);
            box-shadow: 0 0 0 3px rgba(31, 157, 99, 0.16);
        }

.hms-timeline-action {
    display: block;
    font-weight: 650;
    color: var(--hms-text);
    font-size: 0.86rem;
}

.hms-timeline-meta {
    display: block;
    font-size: 0.76rem;
    color: var(--hms-text-dim);
}

/* The set of statement lines awaiting reconciliation. */
.hms-checklist {
    max-height: 290px;
    overflow-y: auto;
    padding: 10px 12px;
    border-radius: var(--hms-radius-sm);
    border: 1px solid var(--hms-glass-border-soft);
    background: rgba(255, 255, 255, 0.7);
}

    .hms-checklist .form-check {
        margin-bottom: 6px;
    }

/* ------------------------------------------------------------- printing ---- */

@media print {
    body.hms-body {
        background: #ffffff;
    }

        body.hms-body::before,
        body.hms-body::after {
            display: none;
        }

    .hms-sidebar,
    .hms-topbar,
    .d-print-none,
    .btn {
        display: none !important;
    }

    .hms-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .hms-content {
        padding: 0;
        animation: none;
    }

    .card,
    .hms-stat {
        break-inside: avoid;
        box-shadow: none;
        background: #ffffff;
        border: 1px solid #c9d6cf;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

        .card:hover,
        .hms-stat:hover {
            transform: none;
        }

    .hms-stat-value,
    .hms-page-title {
        -webkit-text-fill-color: #15291f;
        color: #15291f;
        background: none;
    }
}

h4, h5 {
    font-size: 1.02rem;
}

hr {
    border-color: var(--hms-glass-border-soft);
    opacity: 1;
}

small, .text-muted {
    color: var(--hms-text-dim) !important;
}

.text-danger {
    color: var(--hms-bad) !important;
}

.text-success {
    color: var(--hms-ok) !important;
}

.text-warning {
    color: var(--hms-warn) !important;
}

.d-inline {
    display: inline;
}

.list-unstyled {
    list-style: none;
    padding-left: 0;
}

/* Loading shimmer used for any element marked .is-loading. */
.is-loading {
    position: relative;
    overflow: hidden;
    color: transparent !important;
}

    .is-loading::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
        animation: hms-shimmer 1.3s linear infinite;
    }

@keyframes hms-shimmer {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(100%);
    }
}

/* ----------------------------------------------------------- scrollbars ---- */

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}

::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(107, 132, 120, 0.32);
    border-radius: 999px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(31, 157, 99, 0.45);
    }

/* ------------------------------------------------------------ the till ---- */

/* A product tile is a Bootstrap button, and Bootstrap gives every .btn `white-space: nowrap`. That is
   right for a "Save" but wrong for a dish name: "MG SPIRIT (MOJITO COCKTAIL)" or a long single word
   could not wrap, so it grew wider than its column and pushed the price and the stock badge out of the
   card. The tile is now allowed to wrap its title and is clipped to its own column instead of
   stretching the grid. */
.pos-product {
    /* A grid column defaults to min-width:auto, which lets its content widen the whole row. */
    min-width: 0;
}

.pos-add {
    white-space: normal;
    overflow: hidden;
}

    .pos-add > .fw-semibold {
        /* The full name is always shown: long titles wrap onto more rows instead of truncating
           with an ellipsis. The price sits on its own row below it. */
        display: block;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
        line-height: 1.25;
    }

    /* The price and the badge stay on one line each, so they never split mid-figure. */
    .pos-add .money,
    .pos-add .badge {
        white-space: nowrap;
    }

    /* On a very narrow tile the price and the stock badge share one row; allow the badge to drop
       onto the next line rather than spilling out of the card. */
    .pos-add .pos-add-meta {
        flex-wrap: wrap;
        gap: 4px 8px;
    }

.pos-category {
    /* Category names are buttons too, and a long one must wrap rather than widen the filter bar. */
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
}

/* A basket line: the name may be long, the quantity controls must stay reachable. */
.cart-line {
    gap: 8px;
}

    .cart-line > div:first-child {
        min-width: 0;
        flex: 1 1 auto;
    }

        .cart-line > div:first-child .fw-semibold {
            overflow-wrap: anywhere;
        }

    .cart-line > div:last-child {
        flex: 0 0 auto;
    }

/* ---- tables that stack on narrow screens ---- */

/* A table with a serial number, a code, a name, prices, a status and an inline form cannot be read
   across a phone: the columns squeeze until the numbers wrap and the save button scrolls out of
   sight. A table marked .hms-table-stack turns each row into its own small block instead, and every
   cell keeps its heading by reading the data-label attribute off the cell. */
@media (max-width: 767.98px) {
    .hms-table-stack thead {
        display: none;
    }

    .hms-table-stack,
    .hms-table-stack tbody,
    .hms-table-stack tr,
    .hms-table-stack td {
        display: block;
        width: 100%;
    }

        .hms-table-stack tr {
            padding: 8px 0;
            border-bottom: 1px solid var(--hms-glass-border-soft);
        }

            .hms-table-stack tr:last-child {
                border-bottom: 0;
            }

        .hms-table-stack td {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
            padding: 6px 12px !important;
            border: 0 !important;
            text-align: left !important;
            overflow-wrap: anywhere;
        }

            .hms-table-stack td::before {
                content: attr(data-label);
                flex: 0 0 40%;
                font-size: 0.7rem;
                font-weight: 700;
                letter-spacing: 0.1em;
                text-transform: uppercase;
                color: var(--hms-text-dim);
            }

            /* A cell carrying a form or a block of text reads better above its input than beside it. */
            .hms-table-stack td:has(form),
            .hms-table-stack td.hms-cell-wide {
                flex-direction: column;
                align-items: stretch;
            }

                .hms-table-stack td:has(form)::before,
                .hms-table-stack td.hms-cell-wide::before {
                    margin-bottom: 4px;
                }

            .hms-table-stack td .hms-inline-form {
                justify-content: flex-start;
            }

            .hms-table-stack td .hms-inline-input,
            .hms-table-stack td .form-control,
            .hms-table-stack td .form-select {
                width: 100%;
            }

            /* An empty-state row spans the whole table and has no heading of its own to show. */
            .hms-table-stack td[colspan]::before {
                display: none;
            }
}

/* ------------------------------------------------------------- responsive ---- */

@media (max-width: 1100px) {
    :root {
        --hms-sidebar-w: 232px;
    }

    .hms-content {
        padding: 22px 20px 48px;
    }
}

@media (max-width: 900px) {
    .hms-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .hms-sidebar {
        position: relative;
        height: auto;
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
        border-right: 0;
        border-bottom: 1px solid var(--hms-glass-border-soft);
    }

    .hms-sidebar-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .hms-brand {
        border-bottom: 0;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .hms-nav-toggle {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        width: 44px;
        height: 44px;
        flex: 0 0 auto;
        padding: 0 11px;
        border-radius: 12px;
        border: 1px solid var(--hms-glass-border);
        background: var(--hms-surface);
        color: var(--hms-text-soft);
        cursor: pointer;
        transition: background 0.18s ease, transform 0.18s ease;
    }

        .hms-nav-toggle:hover {
            background: var(--hms-glass-strong);
        }

        .hms-nav-toggle:active {
            transform: scale(0.96);
        }

    .hms-nav-toggle-bar {
        display: block;
        width: 100%;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
        transition: transform 0.22s ease, opacity 0.22s ease;
    }

    .hms-nav-toggle.is-active .hms-nav-toggle-bar:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .hms-nav-toggle.is-active .hms-nav-toggle-bar:nth-child(2) {
        opacity: 0;
    }

    .hms-nav-toggle.is-active .hms-nav-toggle-bar:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    /* The menu is collapsed behind the button until opened, so a phone is not buried under the
       whole navigation on every page load. */
    .hms-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 3px;
        padding: 12px 0 0;
    }

        .hms-nav.is-open {
            display: flex;
        }

    .hms-nav-group {
        width: auto;
        margin: 14px 8px 4px;
    }

    .hms-nav-link {
        width: 100%;
    }

        .hms-nav-link::before {
            display: none;
        }

        .hms-nav-link:hover {
            transform: none;
        }

    .hms-topbar {
        position: relative;
        padding: 13px 18px;
    }

    .hms-page-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 560px) {
    .hms-content {
        padding: 16px 13px 40px;
    }

    .hms-stat-value {
        font-size: 1.5rem;
    }

    .hms-user-name {
        display: none;
    }

    .hms-topbar {
        flex-wrap: wrap;
        gap: 10px;
    }

    .hms-user {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* Respect the user's motion preference: no drifting or entrance motion. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    body.hms-body::before,
    body.hms-body::after {
        animation: none;
        opacity: 0.35;
    }
}

/* ------------------------------------------------------------ reporting ---- */

.hms-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.hms-report-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

    .hms-report-tabs a {
        padding: 7px 14px;
        border-radius: 999px;
        font-size: 0.86rem;
        font-weight: 600;
        text-decoration: none;
        color: var(--hms-text-soft);
        background: var(--hms-surface);
        border: 1px solid var(--hms-glass-border-soft);
        transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
    }

        .hms-report-tabs a:hover {
            transform: translateY(-1px);
            color: var(--hms-text);
        }

        .hms-report-tabs a.is-active {
            background: linear-gradient(135deg, var(--hms-accent), var(--hms-accent-2));
            color: var(--hms-on-accent);
            border-color: transparent;
            box-shadow: 0 8px 18px var(--hms-glow);
        }

.hms-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

    .hms-filter .hms-filter-field {
        min-width: 150px;
    }

.hms-quick-range {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ---- inline SVG charts (no CDN, render offline) ---- */

.hms-chart {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

.hms-chart-grid {
    stroke: var(--hms-glass-border);
    stroke-width: 1;
    opacity: 0.75;
}

.hms-chart-axis {
    font-size: 11px;
    fill: var(--hms-text-dim);
}

.hms-chart-label {
    font-size: 11.5px;
    fill: var(--hms-text-soft);
}

.hms-chart-value {
    font-size: 11px;
    font-weight: 700;
    fill: var(--hms-text);
}

.hms-chart-track {
    fill: var(--hms-glass-border-soft);
}

.hms-chart-bar {
    transition: opacity 0.18s ease;
}

    .hms-chart-bar:hover {
        opacity: 0.82;
    }

    .hms-chart-bar.c1, .hms-legend-dot.c1, .hms-donut-seg.c1 {
        fill: #1f9d63;
        stroke: #1f9d63;
    }

    .hms-chart-bar.c2, .hms-legend-dot.c2, .hms-donut-seg.c2 {
        fill: #2f6fa8;
        stroke: #2f6fa8;
    }

    .hms-chart-bar.c3, .hms-legend-dot.c3, .hms-donut-seg.c3 {
        fill: #b4801f;
        stroke: #b4801f;
    }

    .hms-chart-bar.c4, .hms-legend-dot.c4, .hms-donut-seg.c4 {
        fill: #7d5ba6;
        stroke: #7d5ba6;
    }

    .hms-chart-bar.c5, .hms-legend-dot.c5, .hms-donut-seg.c5 {
        fill: #bf3a48;
        stroke: #bf3a48;
    }

    .hms-chart-bar.c6, .hms-legend-dot.c6, .hms-donut-seg.c6 {
        fill: #17945c;
        stroke: #17945c;
    }

    .hms-chart-bar.c7, .hms-legend-dot.c7, .hms-donut-seg.c7 {
        fill: #6b8478;
        stroke: #6b8478;
    }

    .hms-chart-bar.c8, .hms-legend-dot.c8, .hms-donut-seg.c8 {
        fill: #46b985;
        stroke: #46b985;
    }

.hms-chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    color: var(--hms-text-dim);
    font-size: 0.88rem;
    border: 1px dashed var(--hms-glass-border);
    border-radius: var(--hms-radius-sm);
}

.hms-chart-donut {
    max-width: 240px;
    margin: 0 auto;
}

.hms-chart-donut-total {
    font-size: 15px;
    font-weight: 700;
    fill: var(--hms-text);
}

.hms-chart-donut-caption {
    font-size: 11px;
    fill: var(--hms-text-dim);
}

.hms-legend {
    display: grid;
    gap: 6px;
    margin-top: 12px;
}

.hms-legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    color: var(--hms-text-soft);
}

.hms-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.hms-legend-amount {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    color: var(--hms-text);
    font-weight: 600;
}

/* ---- settlement state ---- */

.hms-state {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

    .hms-state.is-paid {
        background: rgba(23, 148, 92, 0.14);
        color: var(--hms-ok);
    }

    .hms-state.is-partial {
        background: rgba(180, 128, 31, 0.16);
        color: var(--hms-warn);
    }

    .hms-state.is-unpaid {
        background: rgba(191, 58, 72, 0.14);
        color: var(--hms-bad);
    }

    .hms-state.is-neutral {
        background: var(--hms-surface-alt);
        color: var(--hms-text-dim);
    }

/* ---- drill-through table links ---- */

.hms-drill {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed var(--hms-accent-3);
}

    .hms-drill:hover {
        color: var(--hms-accent);
        border-bottom-color: var(--hms-accent);
    }

.hms-report-head {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.hms-report-meta {
    font-size: 0.82rem;
    color: var(--hms-text-dim);
}

@media print {
    .hms-report-tabs,
    .hms-filter,
    .hms-quick-range {
        display: none !important;
    }

    .hms-chart {
        max-width: 100%;
    }
}
