:root {
  --ink: #172522;
  --muted: #697773;
  --line: #dfe6e2;
  --canvas: #f4f6f3;
  --panel: #ffffff;
  --green: #17483c;
  --green-2: #2d6a5a;
  --gold: #d1a654;
  --shadow: 0 22px 60px rgba(24, 49, 42, .15);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.app-shell { display: grid; grid-template-columns: 224px 1fr; min-height: 100vh; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 75% 15%, rgba(209,166,84,.18), transparent 32%), linear-gradient(145deg, #10352d, #1e5547); }
.login-card { width: min(430px, 100%); padding: 34px; border-radius: 22px; background: rgba(255,255,255,.98); box-shadow: 0 32px 90px rgba(5,24,19,.35); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; color: var(--green); }
.login-brand .brand-mark { background: var(--green); color: var(--gold); }
.login-brand strong { display: block; font-family: Georgia, serif; font-size: 22px; }
.login-brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; letter-spacing: .18em; }
.login-card h1 { margin-bottom: 8px; }
.login-copy { margin-bottom: 24px; }
.login-fields { gap: 15px; }
.login-error { min-height: 20px; margin: 13px 0 5px; color: #a13f3f; font-size: 12px; }
.login-button { width: 100%; min-height: 46px; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 26px 18px 18px; background: #11372f; color: #fff; display: flex; flex-direction: column; z-index: 10; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; padding: 0 10px 32px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.55); border-radius: 14px; font-family: Georgia, serif; font-size: 24px; color: #ecd091; }
.brand strong { display: block; font-family: Georgia, serif; font-size: 22px; letter-spacing: .02em; }
.brand small, .user-card small { display: block; opacity: .65; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.sidebar nav { display: grid; gap: 8px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.72); background: transparent; border: 0; border-radius: 12px; padding: 12px 14px; text-align: left; }
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,.11); }
.nav-item span { width: 22px; font-size: 20px; text-align: center; }
.nav-item b { font-weight: 550; font-size: 14px; }
.sidebar-bottom { margin-top: auto; }
.user-card { margin-top: 14px; padding: 16px 10px 4px; border-top: 1px solid rgba(255,255,255,.13); display: flex; align-items: center; gap: 10px; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #d6b66c; color: #153a32; font-weight: 750; }
.user-card strong { display: block; font-size: 13px; margin-bottom: 3px; }
main { min-width: 0; }
.topbar { height: 106px; padding: 22px 42px; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.88); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 8; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-family: Georgia, "Songti SC", serif; font-size: 29px; font-weight: 500; }
h2 { font-family: Georgia, "Songti SC", serif; font-weight: 500; margin-bottom: 5px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.eyebrow { margin-bottom: 5px; font-size: 10px; font-weight: 750; letter-spacing: .18em; color: var(--green-2); text-transform: uppercase; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.language-picker select, input, select { border: 1px solid #cfd9d4; border-radius: 10px; background: #fff; color: var(--ink); }
.language-picker select { padding: 10px 28px 10px 10px; }
.icon-button { position: relative; border: 1px solid var(--line); width: 42px; height: 42px; border-radius: 12px; background: #fff; color: var(--ink); font-size: 22px; }
.badge { position: absolute; top: -7px; right: -7px; min-width: 21px; height: 21px; padding: 0 5px; display: grid; place-items: center; border-radius: 12px; background: #c85948; color: #fff; font-size: 10px; font-weight: 750; border: 2px solid #fff; }
.primary-button, .quiet-button { border-radius: 11px; padding: 11px 16px; font-weight: 650; border: 1px solid transparent; }
.primary-button { color: #fff; background: var(--green); box-shadow: 0 7px 18px rgba(23,72,60,.19); }
.primary-button:hover { background: #0d3c31; }
.quiet-button { border-color: var(--line); background: #fff; color: var(--ink); }
.content { padding: 34px 42px 60px; max-width: 1500px; margin: auto; }
.date-row { display: flex; justify-content: space-between; align-items: end; margin-bottom: 24px; }
.date-label { font-family: Georgia, "Songti SC", serif; font-size: 20px; margin-bottom: 4px; }
.subtle { color: var(--muted); font-size: 12px; margin-bottom: 0; }
.summary-grid { display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)); gap: 12px; margin-bottom: 22px; }
.summary-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 15px; display: flex; align-items: center; gap: 12px; }
.summary-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; background: var(--status, #9aa8a4); box-shadow: 0 0 0 5px color-mix(in srgb, var(--status) 14%, transparent); }
.summary-card strong { font-family: Georgia, serif; font-size: 23px; display: block; line-height: 1; }
.summary-card span:last-child { color: var(--muted); font-size: 11px; }
.board-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: 0 12px 38px rgba(32,50,44,.05); }
.panel-head { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin-bottom: 3px; }
.filters { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.filter { padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: #fff; font-size: 11px; }
.filter.active { color: #fff; background: var(--green); border-color: var(--green); }
.room-board { padding-top: 22px; display: grid; gap: 20px; }
.floor-group h3 { margin: 0 0 10px; color: var(--muted); }
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(154px, 1fr)); gap: 11px; }
.room-card { min-height: 116px; padding: 15px; text-align: left; border-radius: 13px; border: 1px solid color-mix(in srgb, var(--status) 26%, var(--line)); border-left: 4px solid var(--status); background: linear-gradient(145deg, color-mix(in srgb, var(--status) 8%, white), #fff 66%); color: var(--ink); transition: transform .17s ease, box-shadow .17s ease; }
.room-card:hover { transform: translateY(-2px); box-shadow: 0 11px 25px rgba(20,43,37,.10); }
.room-number { font-family: Georgia, serif; font-size: 24px; margin-bottom: 4px; }
.room-type { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.room-status { margin-top: 14px; display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 750; color: var(--status); }
.room-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.guest-line { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; font-size: 11px; color: var(--muted); }
.loading { padding: 50px; text-align: center; color: var(--muted); }
.backdrop { position: fixed; inset: 0; background: rgba(11,28,24,.32); backdrop-filter: blur(3px); z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; z-index: 22; width: min(470px, 100vw); height: 100vh; background: #fff; box-shadow: var(--shadow); transform: translateX(105%); transition: transform .25s ease; overflow: auto; }
.drawer.open { transform: translateX(0); }
.drawer-head, .modal-head { padding: 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.drawer-head h2, .modal-head h2 { margin: 0; font-size: 26px; }
.drawer-content { padding: 22px; }
.detail-hero { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--canvas); margin-bottom: 18px; }
.detail-status { color: var(--status); font-weight: 750; font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.detail-grid div { padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.detail-grid small { color: var(--muted); display: block; margin-bottom: 4px; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 18px 0; }
.action-button { padding: 12px 8px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 650; }
.action-button:hover { border-color: var(--green); color: var(--green); }
.list { display: grid; gap: 9px; }
.list-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; display: flex; justify-content: space-between; gap: 14px; }
.list-item strong { display: block; font-size: 13px; }
.list-item small { color: var(--muted); }
.unread { background: #f1f7f4; border-color: #bed3ca; }
.amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.modal { width: min(650px, calc(100vw - 24px)); max-height: calc(100vh - 30px); border: 0; border-radius: 18px; padding: 0; box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(11,28,24,.42); backdrop-filter: blur(4px); }
.modal.compact { width: min(470px, calc(100vw - 24px)); }
.form-section { padding: 20px 24px; border-bottom: 1px solid var(--line); }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
label span { display: block; color: var(--muted); font-size: 11px; margin: 0 0 6px 2px; }
input, select { width: 100%; padding: 11px 12px; outline: none; }
input:focus, select:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(45,106,90,.10); }
.availability-hint { margin-top: 14px; padding: 10px 12px; border-radius: 9px; background: #eef4f1; color: var(--green); font-size: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 18px 24px; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 60; transform: translate(-50%, 30px); opacity: 0; background: #152e28; color: #fff; border-radius: 10px; padding: 11px 16px; box-shadow: var(--shadow); transition: .2s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

[data-status="VACANT"] { --status: #2d7a5f; }
[data-status="OCCUPIED"] { --status: #bd7541; }
[data-status="RESERVED"] { --status: #5a72a6; }
[data-status="DIRTY"] { --status: #b45151; }
[data-status="CLEANING"] { --status: #a7872b; }
[data-status="INSPECTED"] { --status: #477e88; }
[data-status="MAINTENANCE"], [data-status="OUT_OF_SERVICE"] { --status: #6c6972; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 76px 1fr; }
  .sidebar { padding: 22px 10px; }
  .brand { padding: 0 7px 28px; }
  .brand > span:last-child, .nav-item b, .user-card > span:last-child { display: none; }
  .nav-item { justify-content: center; padding: 12px; }
  .nav-item span { width: auto; }
  .user-card { justify-content: center; padding-inline: 0; }
  .summary-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; top: auto; bottom: 0; width: 100%; height: 68px; padding: 7px 12px calc(7px + env(safe-area-inset-bottom)); flex-direction: row; z-index: 18; }
  .brand, .sidebar-bottom, .nav-item[data-action="show-arrivals"] { display: none; }
  .sidebar nav { width: 100%; grid-template-columns: repeat(3, 1fr); display: grid; }
  .nav-item { display: flex; flex-direction: column; gap: 2px; padding: 5px; font-size: 10px; }
  .nav-item b { display: block; font-size: 9px; }
  .topbar { height: 82px; padding: 14px 16px; }
  .topbar h1 { font-size: 23px; }
  .topbar .eyebrow { display: none; }
  .language-picker { display: none; }
  .primary-button span:first-child { display: none; }
  .top-actions .primary-button { padding: 10px; font-size: 12px; }
  .content { padding: 22px 14px 95px; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .summary-card { padding: 12px; }
  .board-panel { padding: 17px 12px; }
  .panel-head { display: block; }
  .filters { margin-top: 15px; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; }
  .room-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .room-card { min-height: 108px; padding: 13px; }
  .form-grid.two { grid-template-columns: 1fr; }
}
