/* Stayora admin */
:root {
  --brand: #d8322b; --brand-600: #bf2620; --brand-50: #fdeceb; --brand-100: #fbd9d7;
  --ink: #15112b; --ink-2: #2d2846; --muted: #6c6884; --line: #e8e6f0; --line-2: #f1f0f6;
  --bg: #f6f6fa; --card: #fff; --green: #12a150; --green-50: #e8f8ef; --red: #e5484d; --red-50: #fef0f0; --amber: #b45309; --amber-50: #fff6e5; --blue: #1d6fd1; --blue-50: #e8f2ff;
  --side: 248px; --radius: 14px;
  --font: "Plus Jakarta Sans", "Hind Siliguri", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.015em; line-height: 1.25; }
p { margin: 0; }
img { max-width: 100%; }
.i { width: 18px; height: 18px; flex: none; }
.i-sm { width: 15px; height: 15px; flex: none; }
.muted { color: var(--muted); }
.hide { display: none !important; }
.nowrap { white-space: nowrap; }

/* shell */
.a-side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: #111827; color: #c7cbd4; display: flex; flex-direction: column; z-index: 60; transition: transform .2s; }
.a-brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px; color: #fff; font-weight: 800; font-size: 18px; border-bottom: 1px solid rgba(255,255,255,.06); }
.a-brand svg { width: 30px; height: 30px; }
.a-brand small { display: block; font-size: 10.5px; font-weight: 600; color: #8f8ab0; letter-spacing: .06em; text-transform: uppercase; }
.a-nav { flex: 1; overflow-y: auto; padding: 10px 12px 30px; scrollbar-width: thin; scrollbar-color: #2e2950 transparent; }
.a-nav .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #6f6a92; font-weight: 700; padding: 14px 10px 6px; }
.a-nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; font-weight: 500; font-size: 13.5px; transition: background .15s, color .15s; }
.a-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.a-nav a.on { background: var(--brand); color: #fff; box-shadow: 0 8px 18px -8px rgba(216,50,43,.7); }
.a-nav a .n { margin-left: auto; background: #ff5f6d; color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 20px; padding: 1px 7px; }
.a-main { margin-left: var(--side); min-height: 100vh; display: flex; flex-direction: column; }
.a-top { position: sticky; top: 0; z-index: 50; background: rgba(246,246,250,.85); backdrop-filter: blur(8px); display: flex; align-items: center; gap: 14px; padding: 12px 28px; border-bottom: 1px solid var(--line); }
.a-top .burger { display: none; }
.a-search { position: relative; flex: 1; max-width: 420px; }
.a-search input { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 0 14px 0 38px; outline: none; }
.a-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.a-search .i { position: absolute; left: 12px; top: 11px; color: var(--muted); }
.a-top .sp { flex: 1; }
.a-user { display: flex; align-items: center; gap: 10px; }
.a-user .av { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #f0766f); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.a-content { padding: 26px 28px 60px; flex: 1; }
.a-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.a-head h1 { font-size: 24px; }
.a-head p { color: var(--muted); margin-top: 4px; }
.a-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ui */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 9px; font-weight: 600; font-size: 13.5px; border: 1px solid transparent; white-space: nowrap; transition: .15s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-light { background: #fff; border-color: var(--line); }
.btn-light:hover { border-color: var(--brand); color: var(--brand); }
.btn-soft { background: var(--brand-50); color: var(--brand); }
.btn-danger { background: var(--red-50); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 7px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); padding: 20px; }
.card + .card { margin-top: 18px; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-h h3 { font-size: 15.5px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
.g-main { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; gap: 14px; align-items: flex-start; }
.kpi .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.kpi .ic.v { background: var(--brand-50); color: var(--brand); } .kpi .ic.g { background: var(--green-50); color: var(--green); } .kpi .ic.a { background: var(--amber-50); color: var(--amber); } .kpi .ic.b { background: var(--blue-50); color: var(--blue); }
.kpi small { color: var(--muted); font-size: 12.5px; display: block; }
.kpi strong { font-size: 22px; font-weight: 800; letter-spacing: -.02em; display: block; margin-top: 2px; }
.kpi .delta { font-size: 12px; font-weight: 600; }
.up { color: var(--green); } .down { color: var(--red); }
.field { display: block; margin-bottom: 14px; }
.field > span, .lbl { display: block; font-weight: 600; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; }
.field small.help, .help { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.in, .sel, .ta { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; background: #fff; outline: none; font-size: 13.5px; }
.ta { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.in:focus, .sel:focus, .ta:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.in[type=color] { padding: 3px; width: 70px; }
.chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.chk input { width: 16px; height: 16px; accent-color: var(--brand); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.switch input { position: absolute; opacity: 0; }
.switch .tr { width: 38px; height: 22px; border-radius: 22px; background: #d6d3e3; position: relative; transition: background .15s; flex: none; }
.switch .tr::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .tr { background: var(--brand); }
.switch input:checked + .tr::after { transform: translateX(16px); }
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.alert-ok { background: var(--green-50); color: #0c6b37; } .alert-err { background: var(--red-50); color: #b42318; } .alert-info { background: var(--brand-50); color: #8a1d18; } .alert-warn { background: var(--amber-50); color: var(--amber); }
.tbl-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fcfcfe; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:hover { background: #fbfaff; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.thumb { width: 42px; height: 42px; border-radius: 9px; object-fit: contain; background: var(--bg); padding: 3px; flex: none; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 20px; font-size: 11.5px; font-weight: 700; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.pill.pending, .pill.on_hold, .pill.requested, .pill.review, .pill.open, .pill.new, .pill.customer_reply, .pill.unpaid { background: var(--amber-50); color: var(--amber); }
.pill.processing, .pill.quoted, .pill.approved, .pill.partial { background: var(--brand-50); color: var(--brand); }
.pill.shipped, .pill.received, .pill.answered { background: var(--blue-50); color: var(--blue); }
.pill.completed, .pill.paid, .pill.success, .pill.active, .pill.published, .pill.settled, .pill.refunded, .pill.exchanged, .pill.accepted, .pill.ordered, .pill.collected { background: var(--green-50); color: var(--green); }
.pill.cancelled, .pill.failed, .pill.returned, .pill.rejected, .pill.blocked, .pill.suspended, .pill.hidden { background: var(--red-50); color: var(--red); }
.pill.draft, .pill.incomplete, .pill.closed { background: #eceaf3; color: #5b5778; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a, .tabs button { padding: 9px 12px; font-weight: 600; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 6px; align-items: center; }
.tabs a.on, .tabs button.on { color: var(--brand); border-color: var(--brand); }
.tabs .c { background: var(--line-2); border-radius: 10px; padding: 0 7px; font-size: 11px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters .in, .filters .sel { width: auto; min-width: 140px; }
.pager { display: flex; gap: 4px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 32px; height: 32px; padding: 0 9px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 12.5px; }
.pager .on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager .off { opacity: .4; }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.timeline { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 16px; }
.timeline .ev { position: relative; margin-bottom: 14px; font-size: 13px; }
.timeline .ev::before { content: ""; position: absolute; left: -22px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); }
.timeline .ev.status::before { background: var(--brand); }
.timeline .ev small { color: var(--muted); display: block; }
.chart { width: 100%; height: 220px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 200px; padding-top: 10px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .b i { display: block; width: 100%; max-width: 34px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #f0766f, var(--brand)); min-height: 3px; position: relative; }
.bars .b i:hover::after { content: attr(data-v); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 11px; padding: 3px 7px; border-radius: 6px; white-space: nowrap; font-style: normal; }
.bars .b small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.list-row:last-child { border: 0; }
.prog { height: 6px; background: var(--line-2); border-radius: 6px; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--brand); border-radius: 6px; }
.img-pick { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.img-pick .ph { width: 86px; height: 86px; border-radius: 10px; border: 1px dashed #c9c5da; background: var(--bg) center/contain no-repeat; position: relative; display: grid; place-items: center; color: var(--muted); font-size: 11px; text-align: center; overflow: hidden; }
.img-pick .ph img { width: 100%; height: 100%; object-fit: contain; }
.img-pick .ph .x { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: rgba(21,17,43,.7); color: #fff; display: grid; place-items: center; font-size: 13px; line-height: 1; }
.repeater .rrow { display: grid; gap: 8px; margin-bottom: 8px; align-items: center; }
.repeater .rrow .rm { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--red); background: var(--red-50); }
.sticky-save { position: sticky; bottom: 0; background: rgba(246,246,250,.92); backdrop-filter: blur(6px); padding: 12px 0; margin-top: 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; z-index: 20; }
.set-nav { position: sticky; top: 80px; }
.set-nav a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.set-nav a:hover { background: #fff; }
.set-nav a.on { background: #fff; color: var(--brand); box-shadow: 0 0 0 1px var(--line); }
.set-nav .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 14px 12px 4px; }
.mod-card { display: flex; gap: 14px; align-items: flex-start; }
.mod-card .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; flex: none; }
.mod-card h4 { font-size: 14.5px; margin-bottom: 4px; }
.mod-card p { color: var(--muted); font-size: 12.5px; }
.bulkbar { display: flex; gap: 8px; align-items: center; padding: 10px 12px; background: var(--brand-50); border-radius: 10px; margin-bottom: 12px; }
.msg { display: flex; gap: 10px; margin-bottom: 14px; }
.msg.staff { flex-direction: row-reverse; }
.msg .bubble { max-width: 75%; background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.msg.staff .bubble { background: var(--brand-50); }
.auth { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 80% 10%, rgba(216,50,43,.2), transparent 40%), linear-gradient(135deg, #111827, #1f2937); padding: 20px; }
.auth .card { width: 100%; max-width: 400px; padding: 30px; border: 0; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); }
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; z-index: 200; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.side-mask { display: none; }
@media (max-width: 1100px) { .g4 { grid-template-columns: 1fr 1fr; } .g-main { grid-template-columns: 1fr; } .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .a-side { transform: translateX(-100%); }
  .a-side.open { transform: none; }
  .side-mask.open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 55; }
  .a-main { margin-left: 0; }
  .a-top { padding: 10px 14px; }
  .a-top .burger { display: grid; }
  .a-content { padding: 18px 14px 50px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 110px 1fr; }
  .a-user .nm { display: none; }
}
@media print { .a-side, .a-top, .no-print { display: none !important; } .a-main { margin: 0; } }

/* dashboard revenue bars: fit phone width */
@media (max-width: 640px) { .bars { gap: 2px; overflow: hidden; } .bars .b small { display: none; } .card:has(> .bars) { min-width: 0; overflow: hidden; } .g-main > * { min-width: 0; } }

/* ---------------------------------------------------------------- hotel */
.pill.confirmed { background: var(--blue-50); color: var(--blue); }
.pill.checked_in, .pill.clean, .pill.won { background: var(--green-50); color: var(--green); }
.pill.checked_out, .pill.inactive, .pill.lost { background: #eceef2; color: #4b5563; }
.pill.no_show, .pill.dirty, .pill.out_of_order, .pill.maintenance { background: var(--red-50); color: var(--red); }
.pill.inspecting { background: var(--amber-50); color: var(--amber); }
.tape { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.tape table { border-collapse: collapse; min-width: 100%; font-size: 12px; table-layout: fixed; }
.tape th, .tape td { border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 0; height: 34px; }
.tape thead th { position: sticky; top: 0; background: #f8f9fb; font-weight: 600; text-align: center; padding: 6px 2px; z-index: 2; }
.tape thead th.today, .tape td.today { background: #fff7f6; }
.tape thead th.we { color: var(--brand); }
.tape .rm { position: sticky; left: 0; background: #fff; z-index: 3; width: 150px; min-width: 150px; padding: 0 10px; text-align: left; font-weight: 600; white-space: nowrap; }
.tape .grp td { background: #f3f4f6; font-weight: 700; padding: 6px 10px; height: auto; }
.tape .grp td.rm { background: #f3f4f6; }
.tape td.cell { position: relative; width: 64px; min-width: 64px; }
.tape .bar { position: absolute; top: 4px; bottom: 4px; left: 2px; z-index: 1; border-radius: 6px; padding: 0 8px; display: flex; align-items: center; font-size: 11.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 6px -2px rgba(0,0,0,.3); }
.tape .bar.confirmed { background: #2f6fd6; } .tape .bar.pending { background: #e59a0b; } .tape .bar.checked_in { background: #13a05a; } .tape .bar.checked_out { background: #8b93a1; }
.tape .bar.block { background: repeating-linear-gradient(45deg, #9ca3af, #9ca3af 6px, #b8bec8 6px, #b8bec8 12px); color: #111; }
.tape .free { color: var(--muted); font-size: 11px; text-align: center; }
.hk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.hk { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 14px; border-top: 4px solid var(--green); }
.hk.dirty { border-top-color: var(--red); } .hk.inspecting { border-top-color: var(--amber); } .hk.out_of_order { border-top-color: #111827; }
.hk .no { font-size: 22px; font-weight: 800; }
.hk select { width: 100%; margin-top: 8px; }
.day-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.mini-b { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.mini-b:last-child { border: 0; }
.occ-bars .b i { background: linear-gradient(180deg, #f0766f, var(--brand)); }
.occ-bars .b.today i { background: #111827; }
.room-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.room-pick label { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 4px; }
.room-pick label strong { font-size: 14px; }
@media (max-width: 1100px) { .day-cols { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
    .grid.g4 { grid-template-columns: 1fr 1fr; gap: 10px; }
    .g4 .kpi { padding: 12px; gap: 10px; flex-direction: column; }
    .g4 .kpi .ic { width: 34px; height: 34px; border-radius: 10px; }
    .g4 .kpi strong { font-size: 18px; }
    .g4 .kpi .delta { font-size: 11px; }
    .tape .rm { width: 96px; min-width: 96px; }
}
