/* Bahay Dagat Resort demo. EulClavie demo chassis. */
:root {
  --navy: #0F2739;
  --ink: #0F2739;
  --muted: #4A5D72;
  --paper: #FAF7F2;
  --card: #fff;
  --line: rgba(15, 39, 57, .08);
  --line2: rgba(15, 39, 57, .14);
  --accent: #0C8FA8;
  --accent-d: #0A7488;
  --accent-soft: rgba(12, 143, 168, .10);
  --green: #1C8A5E; --green-s: rgba(28, 138, 94, .12);
  --amber: #B7791F; --amber-s: rgba(214, 150, 30, .16);
  --violet: #6E52D9; --violet-s: rgba(110, 82, 217, .12);
  --red: #C2412D; --red-s: rgba(194, 65, 45, .10);
  --slate: #5C6B7D; --slate-s: rgba(92, 107, 125, .14);
  --shadow: 0 1px 2px rgba(15, 39, 57, .05);
  --shadow-lg: 0 24px 48px rgba(15, 39, 57, .18);
  --r: 16px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Manrope, system-ui, sans-serif; font-size: 15px; line-height: 24px; color: var(--ink); background: var(--paper); overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-d); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 20px; }
.center { text-align: center; }
.ink { color: var(--ink); }
.owe { color: var(--red); }
.ok { color: var(--green); }
.ic { flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 12px; border: 1px solid transparent; font-weight: 600; cursor: pointer; transition: transform .15s var(--ease), background .15s, box-shadow .15s; white-space: nowrap; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-d); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: #18374f; }
.btn-ghost { background: #fff; border-color: var(--line2); color: var(--ink); }
.btn-ghost:hover { background: #F3F0EA; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #a83524; }
.danger-text { color: var(--red); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn-xl { min-height: 56px; font-size: 17px; border-radius: 14px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; cursor: pointer; color: inherit; }
.icon-btn:hover { background: rgba(15, 39, 57, .06); }
.icon-btn.sm { width: 36px; height: 36px; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 8px 0; color: var(--accent-d); font-weight: 600; cursor: pointer; min-height: 44px; }
.link-btn:hover { text-decoration: underline; }

/* ---------- login ---------- */
body.is-login { background: radial-gradient(1200px 600px at 80% -10%, rgba(12, 143, 168, .16), transparent 60%), var(--paper); }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 16px 40px rgba(15, 39, 57, .08); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.login-brand { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.login-name { font-size: 22px; line-height: 28px; font-weight: 700; }
.logo-mark { width: 48px; height: 48px; border-radius: 14px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.logo-mark.sm { width: 36px; height: 36px; border-radius: 10px; }
.login-sub { text-align: center; color: var(--muted); font-size: 13px; position: relative; }
.login-sub::before, .login-sub::after { content: ''; position: absolute; top: 50%; width: 28%; height: 1px; background: var(--line2); }
.login-sub::before { left: 0; } .login-sub::after { right: 0; }
.role-cards { display: grid; gap: 8px; }
.role-card { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px; border: 1px solid var(--line2); border-radius: 14px; background: #fff; cursor: pointer; min-height: 56px; transition: border-color .15s, background .15s, transform .15s var(--ease); }
.role-card:hover { border-color: var(--accent); background: var(--accent-soft); }
.role-card:active { transform: scale(.99); }
.role-card > span:last-child { display: flex; flex-direction: column; line-height: 20px; }
.role-card b { font-weight: 600; }
.role-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-d); display: grid; place-items: center; flex: none; }
.login-form { display: grid; gap: 12px; padding-top: 4px; }
.login-foot { text-align: center; border-top: 1px solid var(--line); padding-top: 16px; }

/* ---------- form fields ---------- */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line2); border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; min-height: 64px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled, select:disabled { background: #F4F2EE; color: var(--muted); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234A5D72' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.pw { position: relative; }
.pw input { padding-right: 48px; }
.pw-eye { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 44px; height: 40px; border: 0; background: none; cursor: pointer; color: var(--muted); display: grid; place-items: center; border-radius: 8px; }
.pw-eye:hover { color: var(--ink); }
.check { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.form-grid.one { grid-template-columns: 1fr; }
.span2 { grid-column: 1 / -1; }
.sec-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 8px; border-top: 1px solid var(--line); margin-top: 4px; }
.sec-label:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.hint { color: var(--muted); font-size: 13px; min-height: 0; }
.hint.warn { color: var(--amber); font-weight: 600; }
.form-err { background: var(--red-s); color: var(--red); border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: 14px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 16px; }
.rate-box { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--accent-soft); border-radius: 12px; padding: 12px 16px; }
.rate-total { font-size: 20px; font-weight: 700; color: var(--accent-d); white-space: nowrap; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; background: var(--navy); color: #fff; display: flex; flex-direction: column; padding: 24px 16px 16px; z-index: 40; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 24px; }
.brand .logo-mark { width: 40px; height: 40px; border-radius: 12px; }
.brand-name { font-weight: 700; font-size: 17px; line-height: 22px; }
.brand-sub { font-size: 12px; color: rgba(255, 255, 255, .6); line-height: 16px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 44px; border-radius: 12px; color: rgba(255, 255, 255, .78); font-weight: 500; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav a.active { background: var(--accent); color: #fff; font-weight: 600; }
.side-foot { margin-top: auto; padding-top: 24px; display: grid; gap: 8px; }
.side-user { display: flex; align-items: center; gap: 12px; padding: 8px; }
.side-user > span:last-child { display: flex; flex-direction: column; line-height: 18px; min-width: 0; }
.side-user b { font-weight: 600; font-size: 14px; }
.side-user span span { font-size: 12px; color: rgba(255, 255, 255, .6); }
.side-out { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .16); background: transparent; color: #fff; cursor: pointer; font-weight: 600; }
.side-out:hover { background: rgba(255, 255, 255, .07); }
.demo-by { font-size: 12px; color: rgba(255, 255, 255, .5); padding: 4px 8px 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.main { margin-left: 248px; min-width: 0; }
.shell-hk .main { margin-left: 0; }
.strip { display: flex; align-items: center; gap: 12px; justify-content: center; background: #FFF4DC; color: #6B4E12; font-size: 13px; line-height: 20px; padding: 4px 16px; border-bottom: 1px solid rgba(183, 121, 31, .2); }
.strip-link { background: none; border: 0; color: #6B4E12; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 6px 4px; }
.strip-x { background: none; border: 0; cursor: pointer; color: #6B4E12; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; }
.strip-x:hover { background: rgba(183, 121, 31, .14); }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 12px 32px; background: rgba(250, 247, 242, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); min-height: 72px; }
.topbar h1 { font-size: 24px; line-height: 32px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hamb { display: none; }
.top-search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line2); border-radius: 12px; padding: 0 12px; width: 280px; color: var(--muted); }
.top-search input, .search-in input { border: 0 !important; padding: 8px 0 !important; min-height: 42px; box-shadow: none !important; background: transparent !important; }
.top-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.user-chip { display: flex; align-items: center; gap: 8px; }
.uc-text { display: flex; flex-direction: column; line-height: 18px; }
.uc-text b { font-weight: 600; font-size: 14px; }
.uc-text span { font-size: 12px; color: var(--muted); }
.content { padding: 24px 32px 48px; max-width: 1440px; outline: none; }
.scrim { display: none; }

/* ---------- page parts ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 24px; margin-bottom: 24px; min-width: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h3 { font-size: 17px; line-height: 24px; }
.card-head.sub { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.count-badge { background: var(--accent-soft); color: var(--accent-d); font-weight: 700; font-size: 13px; padding: 2px 10px; border-radius: 99px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.two-col > .card { margin-bottom: 0; }
.stack-col { display: grid; gap: 24px; }
.stack-col .card { margin-bottom: 0; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
.three-col .card { margin-bottom: 0; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; color: var(--ink); display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, transform .2s var(--ease); min-width: 0; }
a.kpi:hover { border-color: rgba(12, 143, 168, .4); transform: translateY(-1px); }
.kpi-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; font-weight: 600; gap: 8px; }
.kpi-val { font-size: 28px; line-height: 36px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-accent .kpi-val, .kpi-val.accent { color: var(--accent-d); }
.kpi-sub { font-size: 13px; line-height: 18px; color: var(--muted); }
.kpis.small-kpis { grid-template-columns: repeat(4, 1fr); }

/* chart */
.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: rgba(15, 39, 57, .07); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 12px; font-family: Manrope, sans-serif; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: url(#none); fill: rgba(12, 143, 168, .08); }
.chart .dot-end { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.chart .cross, .chart .hov { opacity: 0; }
.chart.hovering .cross, .chart.hovering .hov { opacity: 1; }
.chart .cross { stroke: rgba(15, 39, 57, .25); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .hov { fill: #fff; stroke: var(--accent); stroke-width: 2; }
.tip { position: absolute; left: 0; top: 0; pointer-events: none; background: var(--navy); color: #fff; padding: 6px 10px; border-radius: 10px; font-size: 12px; line-height: 16px; display: flex; flex-direction: column; min-width: 120px; box-shadow: var(--shadow-lg); }
.tip b { font-size: 15px; line-height: 20px; }

/* lists */
.rows { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-top: 1px solid var(--line); cursor: pointer; border-radius: 10px; transition: background .15s; min-height: 56px; }
.list-row:first-child { border-top: 0; }
.list-row:hover { background: #F7F4EE; }
.list-row.static { cursor: default; }
.list-row.static:hover { background: none; }
.lr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 20px; }
.lr-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; line-height: 20px; white-space: nowrap; }
.rank { display: flex; flex-direction: column; }
.rank-row { display: grid; grid-template-columns: 1fr auto 52px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.rank-row:first-child { border-top: 0; }
.rank-row b { font-variant-numeric: tabular-nums; text-align: right; }
.rank-row > span:last-child { text-align: right; }
.rank-row.total { border-top: 1px solid var(--line2); font-weight: 700; }
.rank-row small { display: block; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); padding: 32px 16px; text-align: center; }
.empty .ic { color: rgba(15, 39, 57, .3); }

/* pills */
.pill { display: inline-flex; align-items: center; border-radius: 99px; padding: 2px 10px; font-size: 12px; line-height: 18px; font-weight: 600; white-space: nowrap; }
.pill-res, .st-res.pill { background: var(--violet-s); color: var(--violet); }
.pill-in, .st-occ.pill { background: var(--accent-soft); color: var(--accent-d); }
.pill-out { background: var(--slate-s); color: var(--slate); }
.pill-cancel { background: var(--red-s); color: var(--red); }
.pill-due { background: var(--amber-s); color: #8A5A10; }
.st-clean.pill, .hk-inspected.pill { background: var(--green-s); color: var(--green); }
.st-dirty.pill, .hk-dirty.pill { background: var(--amber-s); color: #8A5A10; }
.st-ooo.pill { background: var(--slate-s); color: var(--slate); }
.hk-cleaning.pill { background: var(--accent-soft); color: var(--accent-d); }
.hk-clean.pill { background: rgba(28, 138, 94, .08); color: var(--green); }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.filters select { width: auto; min-width: 160px; }
.search-in { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line2); border-radius: 10px; padding: 0 12px; flex: 1 1 260px; color: var(--muted); background: #fff; }
.search-in:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.date-in { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 13px; color: var(--muted); font-weight: 600; }
.date-in input { width: 160px; }
.count-line { margin-bottom: 8px; }
.more-wrap { display: flex; justify-content: center; padding-top: 16px; }
.more-wrap:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line2); background: #fff; cursor: pointer; font-weight: 600; font-size: 14px; transition: background .15s, border-color .15s; }
.chip b { font-weight: 700; color: var(--muted); }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip.on b { color: rgba(255, 255, 255, .7); }
.seg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.custom-dates { display: flex; gap: 8px; flex-wrap: wrap; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 4px; flex: none; }
.sw.st-clean { background: var(--green); } .sw.st-dirty { background: #D6961E; } .sw.st-occ { background: var(--accent); } .sw.st-res { background: var(--violet); } .sw.st-ooo { background: var(--slate); }
.sw.hk-dirty { background: #D6961E; } .sw.hk-cleaning { background: var(--accent); } .sw.hk-clean { background: #7CC4A3; } .sw.hk-inspected { background: var(--green); }
.sw.bar-res { background: var(--violet); } .sw.bar-in { background: var(--accent); } .sw.bar-out { background: #A9B4C0; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.legend.inline { margin: 0 0 0 auto; gap: 16px; font-size: 13px; color: var(--muted); }
.legend.inline span { display: inline-flex; align-items: center; gap: 6px; }

/* tables */
.table-wrap { overflow: auto; max-height: 70vh; border-radius: 12px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { position: sticky; top: 0; background: #fff; z-index: 1; text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr[data-open] { cursor: pointer; }
.tbl tbody tr:hover td { background: #F9F7F3; }
.tbl tr.empty-row:hover td { background: none; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .total-row td { border-top: 1px solid var(--line2); background: #FBFAF7; }
.tbl td.owe { font-weight: 700; }

/* ---------- modal & drawer ---------- */
.modal-wrap, .drawer-wrap { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal-scrim { position: absolute; inset: 0; background: rgba(15, 39, 57, .42); opacity: 0; transition: opacity .22s var(--ease); }
.in .modal-scrim { opacity: 1; }
.modal { position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; opacity: 0; transform: translateY(12px) scale(.98); transition: transform .26s var(--ease), opacity .2s var(--ease); }
.modal.sm { max-width: 420px; }
.modal.lg { max-width: 720px; }
.modal-wrap.in .modal { opacity: 1; transform: none; }
.modal-head, .drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 12px 24px; border-bottom: 1px solid var(--line); }
.modal-head h2, .drawer-head h2 { font-size: 19px; line-height: 28px; }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.drawer-wrap { place-items: stretch end; padding: 0; }
.drawer { position: relative; width: 440px; max-width: 100%; height: 100%; background: #fff; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: translateX(24px); opacity: 0; transition: transform .28s var(--ease), opacity .2s var(--ease); }
.drawer-wrap.in .drawer { transform: none; opacity: 1; }
.drawer-sub { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.drawer-body { padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.drawer-h { font-size: 15px; margin-top: 8px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.kv > div { display: flex; flex-direction: column; line-height: 20px; min-width: 0; }
.kv span { font-size: 12px; color: var(--muted); font-weight: 600; }
.kv b { font-weight: 600; }
.note { display: flex; gap: 8px; align-items: flex-start; background: var(--accent-soft); color: var(--accent-d); padding: 12px; border-radius: 12px; font-size: 14px; line-height: 20px; }
.note.warn { background: var(--amber-s); color: #7A4F0E; }
.money-box { background: #F7F4EE; border-radius: 12px; padding: 12px 16px; display: grid; gap: 4px; }
.money-box > div { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.money-box span { color: var(--muted); }
.mb-total { border-top: 1px solid var(--line2); padding-top: 8px; margin-top: 4px; font-size: 17px; }
.mb-total span { color: var(--ink); font-weight: 600; }
.guest-box { display: flex; flex-direction: column; border: 1px solid var(--line2); border-radius: 12px; padding: 12px 16px; line-height: 22px; }
.ci-head { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; background: #F7F4EE; border-radius: 12px; padding: 12px 16px; }
.ci-head > div { display: flex; flex-direction: column; line-height: 20px; }

#toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 8px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 600; font-size: 14px; opacity: 0; transform: translateY(-8px); transition: opacity .2s var(--ease), transform .25s var(--ease); }
.toast.in { opacity: 1; transform: none; }
.toast-ok .ic { color: #6FD3E6; }
.toast-err { background: var(--red); }

/* ---------- room board ---------- */
.floor { margin-bottom: 24px; }
.floor:last-child { margin-bottom: 0; }
.floor h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.room { position: relative; display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 0; padding: 12px; min-height: 112px; border-radius: 14px; border: 1px solid var(--line2); background: #fff; cursor: pointer; overflow: hidden; transition: transform .18s var(--ease), box-shadow .18s; }
.room:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15, 39, 57, .08); }
.room-no { font-size: 20px; line-height: 28px; font-weight: 700; }
.room-type { font-size: 12px; color: var(--muted); font-weight: 600; }
.room-who { font-size: 14px; font-weight: 600; line-height: 20px; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; min-height: 20px; }
.room-sub { font-size: 12px; line-height: 16px; color: var(--muted); }
.room.st-clean { background: #F3FAF6; border-color: rgba(28, 138, 94, .30); }
.room.st-dirty { background: #FDF6E8; border-color: rgba(214, 150, 30, .40); }
.room.st-occ { background: #EAF6F9; border-color: rgba(12, 143, 168, .32); }
.room.st-res { background: #F3F0FD; border-color: rgba(110, 82, 217, .30); }
.room.st-ooo { background: repeating-linear-gradient(135deg, #F2F3F5 0 8px, #EAECEF 8px 16px); border-color: rgba(92, 107, 125, .32); }
.room.st-ooo .room-who { font-weight: 500; font-size: 12px; color: var(--slate); white-space: normal; line-height: 16px; }

/* ---------- calendar ---------- */
.cal-card { padding: 16px; }
.cal-tools { gap: 12px; }
.seg { display: flex; align-items: center; gap: 4px; }
.cal-range { font-size: 15px; }
.cal-wrap { overflow: auto; max-height: calc(100vh - 260px); border: 1px solid var(--line); border-radius: 12px; }
.cal { --lab: 112px; min-width: 980px; position: relative; }
.cal-row { position: relative; display: grid; grid-template-columns: var(--lab) repeat(var(--days), 1fr); min-height: 44px; border-bottom: 1px solid var(--line); }
.cal-head { position: sticky; top: 0; z-index: 4; background: #fff; border-bottom: 1px solid var(--line2); }
.cal-head .cal-lab { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cal-lab { position: sticky; left: 0; z-index: 3; background: #fff; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-right: 1px solid var(--line2); }
.cal-lab b { font-weight: 700; }
.cal-lab span { font-size: 12px; color: var(--muted); }
.ooo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--slate); }
.cal-day { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 0; font-size: 11px; line-height: 14px; color: var(--muted); border-left: 1px solid var(--line); }
.cal-day b { font-size: 15px; line-height: 20px; color: var(--ink); }
.cal-day.wkend { background: #FBF9F5; }
.cal-day.is-today { background: var(--accent-soft); color: var(--accent-d); }
.cal-day.is-today b { color: var(--accent-d); }
.cal-group { position: sticky; left: 0; padding: 8px 12px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #F7F4EE; border-bottom: 1px solid var(--line); }
.cal-cell { border: 0; border-left: 1px solid var(--line); background: transparent; cursor: pointer; min-height: 44px; padding: 0; transition: background .12s; }
.cal-cell:hover:not(:disabled) { background: var(--accent-soft); }
.cal-cell.is-today { background: rgba(12, 143, 168, .05); }
.cal-cell.past { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(15, 39, 57, .025) 6px 12px); cursor: default; }
.bars { position: absolute; left: var(--lab); right: 0; top: 0; bottom: 0; pointer-events: none; }
.bar { position: absolute; top: 7px; bottom: 7px; left: calc(var(--l) / var(--days) * 100%); width: calc(var(--w) / var(--days) * 100% - 3px); pointer-events: auto; border: 0; border-radius: 8px; color: #fff; font-size: 12px; font-weight: 600; text-align: left; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; transition: filter .15s, transform .15s var(--ease); }
.bar:hover { filter: brightness(1.08); transform: translateY(-1px); }
.bar-res { background: var(--violet); }
.bar-in { background: var(--accent); }
.bar-out { background: #A9B4C0; }

/* ---------- housekeeping ---------- */
.hk-hello { display: flex; flex-direction: column; margin-bottom: 16px; }
.hk-hello b { font-size: 20px; line-height: 28px; }
.hk-tabs { display: none; }
.hk-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: start; }
.hk-col { background: #F7F4EE; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hk-col-head { display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 4px 4px 8px; }
.hk-col-head b { margin-left: auto; color: var(--muted); }
.hk-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.hk-item.urgent { border-color: rgba(194, 65, 45, .40); background: #FFF8F6; }
.hk-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hk-no { font-size: 20px; line-height: 28px; }
.hk-ctx { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; color: var(--muted); font-weight: 600; }
.hk-item.urgent .hk-ctx { color: var(--red); }
.hk-who { min-height: 40px; font-size: 14px; }
.hk-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.hk-btns .btn { flex: 1; }
.hk-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); padding: 24px 0; font-size: 14px; }
.shell-hk .content { max-width: 1200px; margin: 0 auto; }

/* ---------- folio ---------- */
.folio { max-width: 880px; padding: 32px; }
.folio-head { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--line2); }
.folio-brand { display: flex; gap: 12px; }
.folio-brand > div:last-child { display: flex; flex-direction: column; line-height: 20px; font-size: 13px; color: var(--muted); }
.folio-brand b { font-size: 17px; color: var(--ink); line-height: 24px; }
.folio-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.folio-meta h2 { font-size: 22px; }
.folio-meta span:not(.pill) { color: var(--muted); font-weight: 600; }
.folio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 24px 0; }
.folio-grid > div { display: flex; flex-direction: column; line-height: 20px; }
.folio-grid span { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.folio-grid small { color: var(--muted); font-size: 13px; }
.folio-tbl th { position: static; }
.folio-sum { margin: 16px 0 0 auto; max-width: 320px; display: grid; gap: 4px; }
.folio-sum > div { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.folio-sum span { color: var(--muted); }
.fs-total { border-top: 1px solid var(--line2); padding-top: 8px; font-size: 18px; }
.fs-total span { color: var(--ink); font-weight: 700; }
.folio-h { font-size: 15px; margin: 32px 0 8px; }
.folio-foot { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }
.act-cell { width: 44px; text-align: right; }

/* reports & settings */
.rep-range { display: flex; gap: 12px; align-items: baseline; margin-bottom: 16px; flex-wrap: wrap; }
.rep-h { font-size: 16px; margin: 32px 0 12px; }
.rep-two { margin-top: 8px; }
.settings { max-width: 980px; }
.rate-tbl input { min-height: 40px; }
.rate-tbl td:first-child input { font-weight: 600; margin-bottom: 2px; }
.peso-in { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.peso-in input { width: 112px; text-align: right; }
.num-in { width: 80px; text-align: right; }
.seasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; padding: 16px; background: #F7F4EE; border-radius: 12px; }
.seasons > div { display: flex; flex-direction: column; }

/* ---------- responsive ---------- */
@media (min-width: 1600px) { .kpis { grid-template-columns: repeat(6, 1fr); } .kpis.small-kpis { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1280px) {
  .top-search { width: 220px; }
}
@media (max-width: 1100px) {
  .three-col { grid-template-columns: 1fr 1fr; }
  .three-col > :last-child { grid-column: 1 / -1; }
  .hk-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .28s var(--ease); width: 280px; }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(15, 39, 57, .42); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .hamb { display: inline-grid; margin-left: -8px; }
  .topbar { padding: 8px 16px; gap: 8px; min-height: 64px; }
  .topbar h1 { font-size: 20px; line-height: 28px; }
  .top-search { display: none; }
  .uc-text { display: none; }
  .content { padding: 16px 16px 48px; }
  .two-col, .three-col { grid-template-columns: 1fr; }
  .hk-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: #F1EDE6; padding: 4px; border-radius: 14px; margin-bottom: 12px; }
  .hk-tab { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 56px; border: 0; border-radius: 10px; background: transparent; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); padding: 6px 2px; }
  .hk-tab .sw { width: 10px; height: 10px; }
  .hk-tab b { font-size: 17px; color: var(--ink); }
  .hk-tab.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
  .hk-cols { grid-template-columns: 1fr; }
  .hk-col { display: none; background: transparent; padding: 0; }
  .hk-col.active { display: flex; }
  .hk-col-head { display: none; }
  .hk-item { padding: 16px; }
  .hk-btns .btn { min-height: 48px; font-size: 15px; }
  .hk-who { min-height: 44px; }
}
@media (max-width: 700px) {
  body { font-size: 15px; }
  .card { padding: 16px; border-radius: 14px; margin-bottom: 16px; }
  .page-head { margin-bottom: 16px; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi { padding: 12px; }
  .kpi-val { font-size: 22px; line-height: 30px; }
  .filters select, .filters .search-in { flex: 1 1 100%; min-width: 0; }
  .date-in { flex: 1 1 calc(50% - 4px); flex-direction: column; align-items: stretch; gap: 2px; }
  .date-in input { width: 100%; }
  .strip { font-size: 12px; padding: 2px 8px 2px 16px; justify-content: flex-start; gap: 4px; }
  .strip > span { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .modal-wrap { padding: 0; place-items: end stretch; }
  .modal, .modal.sm, .modal.lg { max-width: none; border-radius: 20px 20px 0 0; max-height: 92vh; }
  .modal-body { padding: 16px; }
  .modal-foot { padding: 12px 16px; }
  .modal-foot .btn { flex: 1; }
  .drawer { width: 100%; }
  .drawer-body { padding: 16px; }
  .drawer-actions .btn { flex: 1 1 calc(50% - 4px); }
  .kv { grid-template-columns: 1fr 1fr; }
  .room-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .legend { margin-bottom: 16px; }
  .chip { min-height: 44px; }
  .legend.inline { margin: 0; width: 100%; flex-wrap: wrap; }
  .cal-tools .seg { order: 1; }
  .cal-range { order: 2; flex: 1 1 100%; font-size: 14px; }
  .cal-tools select { order: 3; }
  .cal-wrap { max-height: 70vh; }
  .cal { --lab: 72px; min-width: 820px; }
  .cal-lab span { display: none; }
  .cal-lab { padding: 0 8px; }
  .folio { padding: 16px; }
  .folio-head { flex-direction: column; }
  .folio-meta { align-items: flex-start; }
  .folio-grid { grid-template-columns: 1fr; }
  .folio-sum { max-width: none; }
  .seasons { grid-template-columns: 1fr; }
  .kpis.small-kpis { grid-template-columns: 1fr 1fr; }
  .kpis.small-kpis .kpi:first-child { grid-column: 1 / -1; }
  .rank-row { grid-template-columns: 1fr auto 44px; }
  .ci-head { grid-template-columns: 1fr; }
  .list-row { flex-wrap: wrap; }
  .list-row .btn { width: 100%; min-height: 44px; }
  .list-row .lr-main { flex: 1 1 60%; }

  /* tables become stacked cards */
  .table-wrap { max-height: none; overflow: visible; }
  .tbl.stack thead { display: none; }
  .tbl.stack td.m-hide, .tbl.stack td:empty { display: none; }
  .tbl.stack, .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: 100%; }
  .tbl.stack tr { border: 1px solid var(--line2); border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; background: #fff; }
  .tbl.stack tr.empty-row { border: 0; }
  .tbl.stack td { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0; padding: 6px 0; text-align: right; min-height: 32px; }
  .tbl.stack td::before { content: attr(data-label); font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; flex: none; }
  .tbl.stack td > * { min-width: 0; }
  .tbl.stack tr.empty-row td::before { content: none; }
  .tbl.stack tr.empty-row td { display: block; }
  .tbl.stack tr:hover td { background: none; }
  .rate-tbl td:first-child { flex-direction: column; align-items: stretch; text-align: left; }
  .folio-tbl th:nth-child(1), .folio-tbl td:nth-child(1) { white-space: nowrap; }
  .folio-tbl { font-size: 14px; }
  .folio-tbl td, .folio-tbl th { padding: 8px 6px; }
}
@media (max-width: 380px) {
  .kpi-val { font-size: 20px; }
}

/* housekeeping phone first */
body.is-hk .topbar { padding: 8px 16px; }
body.is-hk .uc-text { display: flex; }
@media (max-width: 700px) {
  body.is-hk .uc-text { display: none; }
}

/* print: bill or report only */
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .strip, .no-print, .page-head, #toasts, .scrim, .filters { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; }
  .card { border: 0; box-shadow: none; padding: 0; }
  .folio { max-width: none; }
  .chart { display: none; }
  .table-wrap { max-height: none; overflow: visible; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Shared demo strip colours: identical on every EulClavie demo */
.strip { background: #FFF6E5; color: #6B4A00; border-bottom: 1px solid rgba(183, 121, 31, .22); font-size: 13px; line-height: 20px; font-weight: 500; }
.strip .ic, .strip > svg { color: #6B4A00; }
.strip .strip-link { color: #6B4A00; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; background: none; }
.strip .strip-link:hover { background: rgba(183, 121, 31, .12); }
.strip .strip-x { color: #6B4A00; text-decoration: none; background: none; }
.strip .strip-x:hover { background: rgba(183, 121, 31, .14); color: #6B4A00; }
