/* StayNest — hotel booking & management prototype.
   Warm hospitality gold/charcoal identity — distinct from TapFix/AquaGo/TripNest. */

.sn {
    --sn-gold: #b8860b;
    --sn-gold-2: #d4a017;
    --sn-charcoal: #26221c;
    --sn-bg: #faf7f2;
    --sn-panel: var(--panel, #fff);
    --sn-line: #ece4d5;
    --sn-muted: #7a715f;
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--sn-charcoal);
}
.sn * { box-sizing: border-box; }

.sn-topbar { display: flex; align-items: center; gap: .8rem; padding: .7rem 1.1rem; background: var(--sn-charcoal); border-bottom: 1px solid #000; position: sticky; top: 0; z-index: 20; }
.sn-brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; color: #fff; }
.sn-brand .logo { width: 28px; height: 28px; border-radius: 8px; background: var(--sn-gold-2); display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.sn-brand small { display: block; font-weight: 600; color: #b3a98f; font-size: .66rem; }
.sn-nav { display: flex; gap: .3rem; margin-left: .5rem; }
.sn-navbtn { border: none; background: none; padding: .45rem .9rem; border-radius: 999px; font: 700 .8rem/1 inherit; color: #beb49c; cursor: pointer; }
.sn-navbtn.active { background: var(--sn-gold-2); color: #26221c; }
.sn-top-actions { margin-left: auto; }
.sn-live-dot { font-size: .66rem; font-weight: 800; color: #eab308; display: inline-flex; align-items: center; gap: .3rem; }
.sn-live-dot::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: #facc15; }

.sn-view { display: none; } .sn-view.active { display: block; }

/* ── Phone frame ─────────────────────────────────────────────────── */
.sn-app-wrap { background: var(--sn-bg); min-height: calc(100vh - 56px); display: flex; align-items: flex-start; justify-content: center; padding: 2rem 1rem; }
.sn-phone { width: 100%; max-width: 360px; background: #1a1610; border-radius: 2.1rem; padding: .55rem; box-shadow: 0 40px 80px -30px rgba(184, 134, 11, .3); }
.sn-phone-screen { background: var(--sn-panel); border-radius: 1.7rem; overflow: hidden; position: relative; height: 700px; display: flex; flex-direction: column; }
.sn-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 120px; height: 22px; background: #1a1610; border-radius: 0 0 14px 14px; z-index: 5; }
.sn-statusbar { display: flex; justify-content: space-between; padding: .5rem 1.1rem .2rem; font-size: .72rem; font-weight: 700; flex: none; }
.sn-screen-scroll { flex: 1; overflow-y: auto; padding-bottom: 4.4rem; }

.sn-app-hd { display: flex; align-items: center; justify-content: space-between; padding: .3rem 1.1rem .7rem; }
.sn-app-hd b { font-size: 1.05rem; font-weight: 800; }

.sn-searchbox { margin: 0 1.1rem 1rem; background: var(--sn-panel); border: 1px solid var(--sn-line); border-radius: 1rem; padding: .9rem; box-shadow: 0 6px 16px -8px rgba(0,0,0,.1); }
.sn-searchbox input { width: 100%; border: 1px solid var(--sn-line); border-radius: .7rem; padding: .55rem .7rem; font-size: .8rem; margin-bottom: .6rem; }
.sn-daterow { display: flex; justify-content: space-between; font-size: .74rem; color: var(--sn-muted); font-weight: 700; margin-bottom: .7rem; }
.sn-searchbox button { width: 100%; background: var(--sn-gold-2); color: #26221c; border: none; border-radius: .7rem; padding: .6rem; font-weight: 800; font-size: .8rem; cursor: pointer; }

.sn-sect-hd { padding: 0 1.1rem .5rem; } .sn-sect-hd h4 { font-size: .9rem; font-weight: 800; }

.sn-hotel-card { margin: 0 1.1rem .8rem; border-radius: 1rem; overflow: hidden; cursor: pointer; box-shadow: 0 6px 18px -8px rgba(38,34,28,.18); }
.sn-hotel-img { height: 100px; display: flex; align-items: flex-end; padding: .6rem .8rem; color: #fff; position: relative; }
.sn-hotel-img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.55), transparent 60%); }
.sn-hotel-img span { position: relative; font-weight: 800; font-size: .95rem; }
.sn-hotel-info { background: var(--sn-panel); padding: .6rem .8rem; border: 1px solid var(--sn-line); border-top: none; border-radius: 0 0 1rem 1rem; }
.sn-hotel-info .meta { font-size: .72rem; color: var(--sn-muted); margin-bottom: .3rem; }
.sn-hotel-info .foot { display: flex; justify-content: space-between; align-items: center; }
.sn-hotel-info .px { font-weight: 800; color: var(--sn-gold); font-size: .86rem; }
.sn-amenity { font-size: .62rem; font-weight: 700; background: #fdf6e3; color: #92660a; padding: .1rem .4rem; border-radius: 4px; margin-right: .25rem; }

.sn-back-row { display: flex; align-items: center; gap: .6rem; padding: .3rem 1.1rem .8rem; }
.sn-back-row .back { font-size: 1.1rem; cursor: pointer; }
.sn-back-row b { font-size: .95rem; font-weight: 800; flex: 1; text-align: center; margin-right: 1.5rem; }

.sn-room-card { margin: 0 1.1rem .8rem; background: var(--sn-panel); border: 1px solid var(--sn-line); border-radius: 1rem; padding: .85rem; display: flex; gap: .8rem; cursor: pointer; }
.sn-room-card .ic { font-size: 1.8rem; }
.sn-room-card .t { font-weight: 800; font-size: .84rem; }
.sn-room-card .meta { font-size: .7rem; color: var(--sn-muted); margin: .2rem 0; }
.sn-room-card .px { margin-left: auto; text-align: right; font-weight: 800; color: var(--sn-gold); font-size: .88rem; flex: none; }
.sn-room-card .px small { display: block; font-weight: 600; color: var(--sn-muted); font-size: .6rem; }

.sn-detail-card { margin: 0 1.1rem 1rem; background: var(--sn-panel); border: 1px solid var(--sn-line); border-radius: 1rem; padding: .9rem 1rem; }
.sn-detail-row { display: flex; justify-content: space-between; padding: .45rem 0; border-top: 1px solid var(--sn-line); font-size: .8rem; }
.sn-detail-row:first-child { border-top: none; }
.sn-detail-row .k { color: var(--sn-muted); } .sn-detail-row .v { font-weight: 700; }
.sn-price-card { margin: 0 1.1rem 1rem; background: var(--sn-bg); border: 1px solid var(--sn-line); border-radius: 1rem; padding: .9rem 1rem; }
.sn-price-row { display: flex; justify-content: space-between; font-size: .78rem; padding: .25rem 0; }
.sn-price-row.total { font-weight: 800; font-size: .92rem; border-top: 1px solid var(--sn-line); margin-top: .4rem; padding-top: .5rem; color: var(--sn-gold); }
.sn-book-bar { position: sticky; bottom: 0; padding: .8rem 1.1rem; background: var(--sn-panel); border-top: 1px solid var(--sn-line); }
.sn-book-bar button { width: 100%; background: var(--sn-gold-2); color: #26221c; border: none; border-radius: .8rem; padding: .75rem; font-weight: 800; font-size: .85rem; cursor: pointer; }

.sn-confirm-card { margin: 2.4rem 1.4rem; text-align: center; }
.sn-confirm-ic { font-size: 2.4rem; margin-bottom: .5rem; }
.sn-confirm-card h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.sn-qr { display: inline-block; background: var(--sn-charcoal); color: #fff; font-family: ui-monospace, monospace; font-size: 1.3rem; letter-spacing: .3rem; padding: 1rem 1.4rem; border-radius: .8rem; margin-bottom: .8rem; line-height: 1.3; }
.sn-confirm-card p { font-size: .8rem; color: var(--sn-muted); margin-bottom: 1.2rem; font-weight: 700; }
.sn-primary-btn { width: 100%; background: var(--sn-gold-2); color: #26221c; border: none; border-radius: .8rem; padding: .75rem; font-weight: 800; font-size: .85rem; cursor: pointer; }

.sn-bottomnav { position: absolute; bottom: 0; left: 0; right: 0; background: var(--sn-panel); border-top: 1px solid var(--sn-line); display: flex; padding: .6rem 0 .7rem; }
.sn-bottomnav button { flex: 1; border: none; background: none; display: flex; flex-direction: column; align-items: center; gap: .15rem; font-size: .62rem; font-weight: 700; color: var(--sn-muted); cursor: pointer; }
.sn-bottomnav button.active { color: var(--sn-gold); }
.sn-bottomnav .ic { font-size: 1.15rem; }

.sn-toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--sn-charcoal); color: #fff; padding: .5rem 1rem; border-radius: 999px; font-size: .74rem; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
.sn-toast.show { opacity: 1; }

/* ── Admin — occupancy grid (signature component) ────────────────── */
.sn-admin { display: flex; min-height: calc(100vh - 56px); background: var(--sn-bg); }
.sn-admin-side { width: 220px; flex: none; background: var(--sn-charcoal); color: #cbc1a9; padding: 1rem .6rem; }
.sn-admin-side .brand { display: flex; align-items: center; gap: .5rem; padding: .4rem .6rem 1.1rem; color: #fff; font-weight: 800; }
.sn-admin-side .mark { width: 26px; height: 26px; border-radius: 7px; background: var(--sn-gold-2); display: flex; align-items: center; justify-content: center; font-size: .78rem; }
.sn-admin-side .brand small { display: block; font-weight: 600; color: #8b826c; font-size: .66rem; }
.sn-admin-nav { display: flex; flex-direction: column; }
.sn-admin-nav button { display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; padding: .5rem .6rem; border-radius: .6rem; font: 700 .8rem/1 inherit; color: #cbc1a9; background: none; border: none; cursor: pointer; margin-bottom: .1rem; }
.sn-admin-nav button:hover { background: rgba(255,255,255,.06); }
.sn-admin-nav button.active { background: var(--sn-gold-2); color: #26221c; }
.sn-admin-main { flex: 1; padding: 1.4rem 1.8rem; overflow-x: auto; }
.sn-admin-hd h2 { font-size: 1.2rem; font-weight: 800; } .sn-admin-hd p { font-size: .8rem; color: var(--sn-muted); }
.sn-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .8rem; margin: 1.1rem 0; }
.sn-stat { background: var(--sn-panel); border: 1px solid var(--sn-line); border-radius: .9rem; padding: .9rem 1rem; }
.sn-stat .ic { width: 34px; height: 34px; border-radius: .6rem; display: flex; align-items: center; justify-content: center; color: #fff; font-size: .95rem; margin-bottom: .5rem; }
.sn-stat .v { font-size: 1.3rem; font-weight: 800; } .sn-stat .k { font-size: .72rem; color: var(--sn-muted); font-weight: 700; }

.sn-room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: .5rem; margin: .8rem 0 1.2rem; }
.sn-room-cell { aspect-ratio: 1; border-radius: .6rem; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: .68rem; font-weight: 800; cursor: pointer; }
.sn-room-cell.avail { background: #dcfce7; color: #166534; }
.sn-room-cell.occupied { background: #fee2e2; color: #991b1b; }
.sn-room-cell.maint { background: #fef9c3; color: #854d0e; }
.sn-room-cell small { font-weight: 600; font-size: .58rem; margin-top: .1rem; }
.sn-legend { display: flex; gap: 1rem; font-size: .72rem; color: var(--sn-muted); margin-bottom: .3rem; }
.sn-legend span { display: inline-flex; align-items: center; gap: .3rem; }
.sn-legend i { width: .6rem; height: .6rem; border-radius: 3px; display: inline-block; }

.sn-charts { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; }
.sn-chart-card { background: var(--sn-panel); border: 1px solid var(--sn-line); border-radius: 1rem; padding: 1rem; }
.sn-chart-card h4 { font-size: .84rem; font-weight: 800; margin-bottom: .7rem; }
.sn-chart-card svg { width: 100%; height: 180px; display: block; }

@media (max-width: 860px) {
    .sn-admin { flex-direction: column; }
    .sn-admin-side { width: 100%; display: flex; overflow-x: auto; padding: .6rem; }
    .sn-admin-side .brand { display: none; }
    .sn-admin-nav { flex-direction: row; gap: .3rem; }
    .sn-admin-nav button { white-space: nowrap; }
    .sn-charts { grid-template-columns: 1fr; }
}
