/* ============================================================
   THE MARICH PASS GATEWAY HOTEL — Admin Theme
   Hospitality palette: deep greens + warm gold accents
   ============================================================ */

:root {
    --mp-green:      #123f2e;
    --mp-green-dark: #0b2b1f;
    --mp-green-soft: #e8f1ec;
    --mp-gold:       #c9a227;
    --mp-gold-dark:  #a8861c;
    --mp-cream:      #f7f5ef;
    --sidebar-w:     250px;
    --bs-body-font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body { background: var(--mp-cream); font-family: var(--bs-body-font-family); min-height: 100vh; }

/* ---------- Buttons ---------- */
.btn-main {
    background: var(--mp-green); color: #fff; border: 1px solid var(--mp-green);
}
.btn-main:hover, .btn-main:focus { background: var(--mp-green-dark); color: #fff; }
.btn-main-outline { border: 1.5px solid var(--mp-green); color: var(--mp-green); background: #fff; }
.btn-main-outline:hover { background: var(--mp-green); color: #fff; }
.text-main { color: var(--mp-green) !important; }
.bg-main { background: var(--mp-green) !important; color: #fff; }
.bg-gold { background: var(--mp-gold) !important; color: #1a1a1a; }

/* ---------- Auth pages ---------- */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.auth-bg {
    position: fixed; inset: 0; z-index: -1;
    background: linear-gradient(150deg, #0b2b1f 0%, #123f2e 55%, #1b5a40 100%);
}
.auth-bg::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(201,162,39,.18), transparent 45%),
                radial-gradient(circle at 80% 80%, rgba(201,162,39,.12), transparent 40%);
}
.auth-wrap { width: 100%; padding: 1rem; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.auth-card { width: 100%; max-width: 420px; border-radius: 1rem; overflow: hidden; background: #fff; }
.auth-logo {
    width: 62px; height: 62px; border-radius: 16px;
    background: linear-gradient(135deg, var(--mp-green), #1b5a40);
    color: var(--mp-gold); display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem;
}
.auth-link { color: var(--mp-green); text-decoration: none; font-weight: 600; }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
    width: var(--sidebar-w); background: var(--mp-green-dark);
    display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 1040;
    transition: transform .25s ease;
}
.sidebar-brand {
    display: flex; align-items: center; gap: .7rem; padding: 1rem 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,.08); color: #fff;
}
.sidebar-brand-icon {
    width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px;
    background: linear-gradient(135deg, var(--mp-gold), var(--mp-gold-dark));
    color: #1a1a1a; display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.sidebar-logo { width: 44px; height: 44px; flex: 0 0 44px; object-fit: contain; border-radius: 8px; background: #fff; padding: 3px; }
.sidebar-brand-text { line-height: 1.2; min-width: 0; }
.brand-name { display: block; font-weight: 700; font-size: .82rem; letter-spacing: .02em; }
.brand-sub { display: block; font-size: .66rem; color: rgba(255,255,255,.55); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: .7rem .6rem; }
.sidebar-link {
    display: flex; align-items: center; gap: .75rem; padding: .62rem .8rem;
    color: rgba(255,255,255,.78); text-decoration: none; border-radius: .55rem;
    font-size: .9rem; margin-bottom: .12rem; transition: background .15s, color .15s;
}
.sidebar-link i { width: 20px; text-align: center; font-size: .95rem; color: rgba(255,255,255,.6); }
.sidebar-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-link.active { background: var(--mp-green); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--mp-gold); }
.sidebar-link.active i { color: var(--mp-gold); }
.sidebar-footer { padding: .7rem .6rem; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-logout { color: #f0a6a6 !important; }

.app-main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }

.app-navbar {
    background: #fff; border-bottom: 1px solid #e6e3da; padding: .55rem 1rem;
    position: sticky; top: 0; z-index: 1030;
}
.navbar-title { font-weight: 700; color: var(--mp-green); }
.avatar-circle {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--mp-green); color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: .8rem; font-weight: 700;
}

.app-content { padding: 1.25rem 1.25rem 1rem; flex: 1; }
.app-footer {
    border-top: 1px solid #e6e3da; background: #fff; padding: .6rem 1.25rem;
    display: flex; justify-content: space-between; font-size: .78rem; color: #777;
}

/* ---------- Cards / stat cards ---------- */
.stat-card { border: none; border-radius: .8rem; overflow: hidden; box-shadow: 0 2px 10px rgba(18,63,46,.06); transition: transform .15s ease, box-shadow .15s ease; height: 100%; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(18,63,46,.12); }
.stat-card .card-body { display: flex; align-items: center; gap: 1rem; }
.stat-icon {
    width: 52px; height: 52px; border-radius: 14px; flex: 0 0 52px;
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.stat-label { font-size: .78rem; color: #7a7a7a; text-transform: uppercase; letter-spacing: .03em; }
.stat-value { font-size: 1.45rem; font-weight: 700; color: #263238; line-height: 1.15; }
.stat-sub { font-size: .78rem; color: #999; }

.card { border: 1px solid #ece9df; box-shadow: 0 1px 4px rgba(18,63,46,.05); }
.card-header { background: #fff; border-bottom: 1px solid #eeeae0; font-weight: 600; }
.table thead th { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: #6a6a6a; background: #faf9f5; border-bottom-width: 1px; white-space: nowrap; }
.table td, .table th { vertical-align: middle; }

/* ---------- Room status board ---------- */
.room-tile { border-radius: .6rem; border: 1px solid #e6e3da; background: #fff; padding: .7rem; text-align: center; height: 100%; transition: transform .12s; }
.room-tile:hover { transform: scale(1.03); }
.room-tile .room-no { font-weight: 700; color: var(--mp-green); }
.room-tile .room-status { font-size: .72rem; font-weight: 600; }
.room-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* ---------- Tables hover ---------- */
.table-hover tbody tr:hover { background: #f2f7f4; }
.badge { font-weight: 600; }

/* ---------- Global search ---------- */
.global-search-wrap { position: relative; width: 300px; }
.global-search-results { position: absolute; top: 105%; left: 0; right: 0; z-index: 1050; max-height: 380px; overflow-y: auto; border: none; }
.global-search-results .search-head { font-size: .7rem; text-transform: uppercase; color: #999; padding: .4rem .8rem; }
.global-search-results a { display: flex; justify-content: space-between; align-items: center; padding: .45rem .8rem; text-decoration: none; color: #333; font-size: .85rem; border-bottom: 1px solid #f0eee6; }
.global-search-results a:hover { background: #f2f7f4; }
.global-search-results .text-muted { font-size: .72rem; }

/* ---------- Folio ---------- */
.folio-line { display: flex; justify-content: space-between; padding: .45rem .4rem; border-bottom: 1px dashed #e6e3da; }
.folio-total { font-weight: 700; background: var(--mp-green-soft); border-radius: .5rem; }
.folio-balance { font-size: 1.25rem; font-weight: 800; }

/* ---------- Print ---------- */
.print-doc { background: #fff; padding: 2.5rem; max-width: 820px; margin: 0 auto; color: #000; font-size: 14px; }
@media print {
    body * { visibility: hidden; }
    .print-doc, .print-doc * { visibility: visible; }
    .print-doc { position: absolute; inset: 0; width: 100%; padding: 1.5rem; box-shadow: none; }
}
.print-brand h4 { color: #0b2b1f; font-weight: 800; letter-spacing: .03em; }
.print-rule { border-top: 2px solid #0b2b1f; margin: .4rem 0; }
.print-rule-dash { border-top: 1px dashed #bbb; margin: .5rem 0; }

/* ---------- Misc ---------- */
.pointer { cursor: pointer; }
.small-note { font-size: .75rem; color: #999; }
.avatar-lg { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.thumb-doc { max-width: 220px; border-radius: .4rem; }

@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-sidebar.show { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1035; display: none; }
    .sidebar-overlay.show { display: block; }
    .global-search-wrap { width: 100%; }
}

/* ---------- Tinted stat-icon backgrounds ---------- */
.bg-main-soft { background: var(--mp-green-soft); }
.bg-success-soft { background: #e3f3e9; }
.bg-warning-soft { background: #fdf3d7; }
.bg-danger-soft { background: #fbe4e4; }
.bg-primary-soft { background: #e3edf7; }
.bg-warning.bg-opacity-10, .badge.bg-warning.bg-opacity-10 { background: rgba(255,193,7,.18) !important; }

/* ---------- Section titles ---------- */
.section-title { font-weight: 700; color: var(--mp-green); border-bottom: 1px solid #e6e3da; padding-bottom: .35rem; margin-bottom: .5rem; }

/* ---------- Autocomplete ---------- */
.autocomplete-box {
    position: absolute; z-index: 1080; top: 100%; left: 0; right: 0; display: none;
    background: #fff; border: 1px solid #e0dcca; border-radius: .5rem; box-shadow: 0 8px 24px rgba(18,63,46,.14);
    max-height: 260px; overflow-y: auto;
}
.autocomplete-box.show { display: block; }
.autocomplete-item { padding: .5rem .75rem; cursor: pointer; font-size: .86rem; border-bottom: 1px solid #f0eee6; }
.autocomplete-item:hover { background: #f2f7f4; }

/* ---------- Report KPI ---------- */
.report-kpi {
    flex: 1 1 140px; background: #faf9f5; border: 1px solid #ece9df; border-radius: .6rem;
    padding: .8rem 1rem; display: flex; flex-direction: column; gap: .15rem;
}

/* ---------- Notification dropdown ---------- */
.notif-menu .dropdown-item:hover { background: #f2f7f4; }

/* ---------- Words line in receipts ---------- */
.formatted-amount { font-size: .72rem; letter-spacing: .05em; } 
 
/* ==========================================================================
   Live refresh
   A quiet bar that offers to reload when another member of staff (or the
   website) has added a record. It never reloads by itself, so a half-typed
   form is never lost.
   ========================================================================== */

.mpgh-refresh-bar {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translate(-50%, 150%);
    z-index: 1080;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .7rem .55rem 1rem;
    background: #123f2e;
    color: #f5f2e8;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(18, 63, 46, .28);
    font-size: .9rem;
    transition: transform .28s ease, opacity .28s ease;
    opacity: 0;
    max-width: min(92vw, 34rem);
}

.mpgh-refresh-bar.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

.mpgh-refresh-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mpgh-refresh-bar .btn-light {
    color: #123f2e;
    font-weight: 600;
}

.mpgh-refresh-bar .btn-link {
    color: rgba(245, 242, 232, .7);
    text-decoration: none;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0 .35rem;
}

.mpgh-refresh-bar .btn-link:hover {
    color: #f5f2e8;
}

/* Manual refresh control in the navbar */
.mpgh-refresh-wrap .mpgh-refresh-label {
    display: none;
}

@media (min-width: 1400px) {
    .mpgh-refresh-wrap .mpgh-refresh-label {
        display: inline;
    }
}

.mpgh-stale {
    opacity: .92;
}

/* ==========================================================================
   Audible housekeeping alert.

   Shown when a room has been checked out and needs turning over. It slides up
   from the same edge as the live-refresh bar so the two never overlap visually
   when they appear together, and it carries a link straight to the task.
   ========================================================================== */

.mpgh-hk-bar {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translate(-50%, 150%);
    z-index: 1085;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .7rem .55rem 1rem;
    background: #7a4a12;
    color: #fff6e6;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(122, 74, 18, .3);
    font-size: .9rem;
    transition: transform .28s ease, opacity .28s ease;
    opacity: 0;
    max-width: min(92vw, 34rem);
}

.mpgh-hk-bar.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

.mpgh-hk-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mpgh-hk-bar .btn-light {
    color: #7a4a12;
    font-weight: 600;
}

.mpgh-hk-bar .btn-link {
    color: rgba(255, 246, 230, .7);
    text-decoration: none;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0 .35rem;
}

.mpgh-hk-bar .btn-link:hover {
    color: #fff6e6;
}

/* Sound switch in the navbar. The label is dropped on narrow screens so the
   button does not push the other navbar controls off the row. */
.mpgh-sound-wrap .mpgh-sound-label {
    display: none;
}

@media (min-width: 1400px) {
    .mpgh-sound-wrap .mpgh-sound-label {
        display: inline;
    }
}

/* Admin hub tiles (/admin/) — a card that is really a link, so it needs to
   announce itself as clickable on hover and on keyboard focus. */
.admin-tile {
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.admin-tile:hover,
.admin-tile:focus-visible {
    transform: translateY(-2px);
    border-color: var(--mpgh-main, #123f2e);
    box-shadow: 0 .35rem .9rem rgba(18, 63, 46, .13);
}

.admin-tile:focus-visible {
    outline: 2px solid var(--mpgh-main, #123f2e);
    outline-offset: 2px;
}

@media print {
    .mpgh-refresh-bar,
    .mpgh-refresh-wrap,
    .mpgh-hk-bar,
    .mpgh-sound-wrap {
        display: none !important;
    }
}
