:root {
  color-scheme: light;
  --page: #f3f6f7;
  --paper: #fff;
  --ink: #162b2b;
  --muted: #5b6c72;
  --line: #dce5e8;
  --brand: #08675c;
  --sidebar: #102d2c;
  --sidebar-text: #c8dbd9;
  --radius: 14px;
  font: 15px/1.45 Inter, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
:focus-visible { outline: 3px solid #208caa; outline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.85rem, 3vw, 2.55rem); line-height: 1.12; letter-spacing: -.045em; }
h2 { font-size: 1.16rem; line-height: 1.35; letter-spacing: -.02em; }
small { display: block; color: var(--muted); }
.shell { display: grid; grid-template-columns: 226px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; overflow-y: auto; background: var(--sidebar); color: var(--sidebar-text); padding: 24px 15px 14px; z-index: 8; }
.brand { display: flex; align-items: center; gap: 11px; color: #f4fffc; font-size: 1.13rem; font-weight: 750; line-height: 1.26; padding: 5px 9px; }
.brand:hover { color: white; }
.brand-icon { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 10px; color: #0f3731; background: #a4e8d6; font-weight: 850; font-size: 1.2rem; }
.brand small { color: #a8c1bd; font-size: .66rem; font-weight: 500; }
.nav-label { color: #a0bdb8; font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin: 25px 11px 8px; }
.nav-link { display: flex; gap: 10px; align-items: center; padding: 8px 11px; border-radius: 8px; font-size: .88rem; min-height: 38px; }
.nav-link:hover { color: #fff; background: #193b39; }
.nav-link.selected { color: #e0fff5; background: #225047; font-weight: 680; }
.nav-icon { display: inline-block; flex: 0 0 19px; text-align: center; color: #a5dad1; font-size: 1.03rem; }
.account { display: flex; gap: 9px; align-items: center; border-top: 1px solid #35514f; margin-top: auto; padding: 13px 1px 0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; flex: 0 0 32px; place-items: center; background: #375956; color: white; }
.account strong { display: block; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #f2fbfa; }
.account-text { min-width: 0; margin-right: auto; }
.account small { color: #b6cdca; font-size: .66rem; }
.logout { border: none; background: none; color: #e2f2ef; font-size: 1.15rem; border-radius: 8px; padding: 4px 7px; }
.logout:hover { background: #294744; }
.topbar { min-height: 57px; background: var(--paper); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 clamp(15px, 3vw, 40px); color: var(--muted); font-size: .86rem; }
.top-search { margin-inline-start: auto; color: var(--brand); font-weight: 650; }
.menu-toggle { display: none !important; }
.content { max-width: 1660px; margin: 0 auto; min-width: 0; padding: clamp(18px, 3vw, 38px); }
.heading { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 22px; }
.heading p, .panel-head p { margin-top: 5px; color: var(--muted); }
.heading-actions, .form-actions, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.heading-actions { flex-shrink: 0; }
.date-line { display: flex; gap: 7px; align-items: center; color: var(--brand) !important; font-size: .82rem; font-weight: 700; margin: 0 0 9px !important; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 39px; padding: 8px 13px; border: 1px solid transparent; border-radius: 8px; font-size: .85rem; font-weight: 665; letter-spacing: -.01em; }
.button.primary { background: var(--brand); color: #fff; }
.button.primary:hover { background: #07594f; }
.button.secondary { background: var(--paper); border-color: #ccdadd; color: #294647; }
.button.secondary:hover { background: #f0f7f5; color: var(--brand); }
.button.danger { background: #fff0f0; border-color: #f0cbcb; color: #942d37; }
.button.danger:hover { background: #f8dbda; }
.button.square { width: 39px; padding: 0; font-size: 1.28rem; }
.quiet-link, .table-link { color: var(--brand); font-weight: 680; }
.quiet-link { font-size: .85rem; }
.quiet-link:hover, .table-link:hover { text-decoration: underline; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 17px; }
.metric { border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; background: var(--paper); display: grid; gap: 7px; }
.metric-icon { border-radius: 8px; width: 36px; height: 36px; display: grid; place-items: center; font-size: 1.15rem; flex: 0 0 36px; }
.metric-icon.blue { color: #205b9c; background: #e9f1fd; }
.metric-icon.amber { color: #8e4b12; background: #fff1e0; }
.metric-icon.teal { color: #086a68; background: #def3f2; }
.metric-icon.green { color: #126649; background: #e6f5e9; }
.metric-title { font-size: .8rem; font-weight: 620; color: var(--muted); }
.metric strong { font-size: 1.73rem; font-weight: 775; letter-spacing: -.04em; line-height: 1; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 2px 4px #152b2b04; }
.content > .panel + .panel, .content > .panel + .detail-columns { margin-top: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 13px; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.panel-head p { font-size: .83rem; }
.panel-pad { padding: 16px 19px; }
.room-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(85px, 1fr)); gap: 8px; padding: 13px 18px 16px; }
.room-tile { min-height: 57px; padding: 7px 8px; border-radius: 8px; background: #f5f7fa; text-align: center; color: #435965; border: 1px solid #e5eaee; }
.room-tile:hover { color: inherit; border-color: currentColor; }
.room-tile strong { display: block; font-size: .95rem; }
.room-tile span { display: block; font-size: .64rem; overflow-wrap: anywhere; line-height: 1.2; }
.dashboard-columns, .detail-columns { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; }
.dashboard-columns { margin-top: 16px; align-items: start; }
.activity { padding: 0 19px 6px; }
.activity-row { display: flex; gap: 9px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.activity-row:last-child { border-bottom: 0; }
.activity-row > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.activity-row strong { font-size: .86rem; }
.activity-row small, .activity-note { font-size: .73rem; color: var(--muted); }
.activity-note { text-align: right; }
.stack { display: grid; gap: 13px; align-content: start; }
.form-panel { max-width: 970px; padding: clamp(15px, 2.5vw, 25px); }
.form-panel > h2 { margin-bottom: 6px; }
.form-panel > .form-grid + h2 { margin-top: 17px; }
.form-grid + label, .form-panel > .form-actions { margin-top: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 11px 14px; align-items: start; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
label { display: grid; gap: 5px; color: #365052; font-size: .82rem; font-weight: 660; }
input:not([type="checkbox"]), select, textarea { max-width: 100%; min-width: 0; width: 100%; min-height: 39px; padding: 6px 9px; color: var(--ink); background: #fff; border: 1px solid #c8d7dc; border-radius: 7px; font-size: .9rem; font-weight: 480; }
input[type="file"] { padding: 5px; }
textarea { min-height: 76px; resize: vertical; }
.checkbox { display: flex; align-items: center; gap: 5px; min-height: 36px; }
.checkbox input { accent-color: var(--brand); }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.filters > label { flex: 0 1 auto; min-width: 116px; }
.filters > label:has(input[type="date"]) { min-width: 145px; }
.filters > label:has(input[type="search"]) { flex: 1 1 190px; max-width: 360px; }
.table-scroll { overflow-x: auto; }
table { border-collapse: separate; border-spacing: 0; width: 100%; text-align: left; font-size: .85rem; }
th { background: #f7f9fa; color: #4b6269; font-weight: 700; font-size: .73rem; }
td, th { padding: 10px 15px; border-bottom: 1px solid #ebf0f2; text-align: left; vertical-align: middle; }
tbody tr:last-child > * { border-bottom: 0; }
td small { font-size: .72rem; }
.details { display: grid; grid-template-columns: minmax(90px, .95fr) minmax(0,1.35fr); gap: 10px 13px; padding: 3px 19px; color: var(--ink); }
.details dt { color: var(--muted); }
.details dd { margin: 0; overflow-wrap: anywhere; }
details { padding: 9px 10px; background: #f7f9fa; border: 1px solid var(--line); border-radius: 8px; }
summary { color: #30494b; cursor: pointer; font-weight: 640; font-size: .85rem; }
details > form, details > .form-grid { margin-top: 10px; }
.room-photo { display: block; width: 100%; max-height: 330px; object-fit: contain; background: #eef4f4; }
.badge { display: inline-flex; align-items: center; gap: 5px; width: max-content; max-width: 100%; border-radius: 999px; padding: 3px 8px; font-size: .71rem; font-weight: 680; color: #4f5f69; background: #eef1f4; }
.badge > span { display: block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 6px; }
.badge-ready, .tile-ready, .badge-done { background: #e9f7ee; border-color: #d4ebdd; color: #18664a; }
.badge-confirmed, .tile-confirmed, .chip-confirmed, .badge-open { background: #e5edff; border-color: #bccdf0; color: #224f91; }
.badge-staying, .tile-staying, .chip-staying, .badge-working { background: #ddf4ef; border-color: #a8ded2; color: #095d52; }
.badge-dirty, .tile-dirty, .badge-cleaning, .tile-cleaning { background: #fff4dd; border-color: #f5e1b3; color: #81500c; }
.badge-repair, .tile-repair, .chip-repair, .badge-maintenance, .tile-maintenance, .chip-maintenance { background: #fee9e6; border-color: #f0beb6; color: #913a34; }
.badge-other, .tile-other, .chip-other, .badge-unavailable, .tile-unavailable, .chip-unavailable { background: #eee9f3; border-color: #e1d2e9; color: #6c4779; }
.chip-complete { background: #e9edef; border-color: #c9d5da; color: #435b67; }
.calendar-panel { overflow: hidden; }
.calendar-filters > label { flex: 1 1 96px; max-width: 180px; min-width: 98px; }
.calendar-filters > label:has(input[type="search"]) { max-width: 235px; }
.calendar-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.date-nav, .legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.date-nav strong { padding: 0 4px; white-space: nowrap; }
.calendar-grid { overflow: auto; max-height: min(67vh, 660px); overscroll-behavior: contain; }
.schedule { table-layout: fixed; width: max-content; min-width: 100%; }
.schedule .room-col { width: 121px; }
.schedule .day-col { width: 86px; }
.schedule th, .schedule td { border-bottom: 1px solid var(--line); border-right: 1px solid #e7eef0; padding: 0; }
.schedule thead th { position: sticky; top: 0; z-index: 2; text-align: center; height: 42px; white-space: nowrap; }
.schedule thead th small { font-size: .67rem; }
.schedule thead .room-head { z-index: 4; left: 0; text-align: left; padding-left: 11px; }
.schedule tbody th { position: sticky; left: 0; z-index: 1; text-align: left; padding: 6px 10px; height: 46px; background: #f8fbfa; }
.schedule tbody th a { color: var(--brand); font-size: .98rem; }
.schedule tbody th small { font-size: .64rem; line-height: 1.15; font-weight: 525; }
.schedule .today { background: #edf9f5; }
.schedule th.weekend:not(.today) { background: #edf0f4; }
.booking-chip { display: block; margin: 4px 3px; padding: 6px; border: 1px solid; border-radius: 6px; font-size: .75rem; font-weight: 670; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.booking-chip:hover { text-decoration: underline; color: inherit; }
.empty-cell { min-height: 44px; display: grid; place-items: center; color: #57827d; font-size: 1.08rem; }
.empty-cell span { opacity: .55; }
.empty-cell:hover, .empty-cell:focus-visible { background: #d9f1eb; color: var(--brand); }
.empty-cell:hover span, .empty-cell:focus-visible span { opacity: 1; }
.hint { color: var(--muted); font-size: .78rem; }
.calendar-hint { padding: 11px 15px; border-top: 1px solid var(--line); }
.empty { color: var(--muted); padding: 15px 18px; }
.notice { border-radius: 8px; background: #eef3f8; border: 1px solid #d2e0eb; padding: 10px 14px; margin-bottom: 13px; }
.notice.error { background: #fff0ef; color: #87322f; border-color: #f0cfcc; }
.notice.success { background: #e7f8ed; color: #175842; border-color: #ccebd9; }
.public { display: grid; place-content: center; min-height: 100dvh; padding: 20px; background: radial-gradient(ellipse at 8% 3%, #d5ede5, transparent 54%), var(--page); }
.login-card, .error-page { width: min(100%, 440px); padding: 27px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.login-card .brand { color: var(--ink); padding: 0 0 20px; }
.login-card .brand small { color: var(--muted); }
.login-card h1 { margin-bottom: 18px; font-size: 1.8rem; }
.error-page p { margin: 13px 0; }
.error-page .button { margin: 0 6px 3px 0; }
@media (max-width: 1020px) {
  .shell { grid-template-columns: 186px minmax(0,1fr); }
  .sidebar { padding-inline: 10px; }
  .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metrics { gap: 8px; }
  .metric { padding: 12px; }
}
@media (max-width: 780px) {
  .shell { display: block; }
  .sidebar { display: none; position: fixed; top: 53px; bottom: 0; left: 0; height: auto; width: min(265px, 87vw); box-shadow: 5px 0 26px #1733303d; }
  .sidebar.open { display: flex; }
  .topbar { position: sticky; top: 0; z-index: 7; min-height: 53px; }
  .menu-toggle { display: inline-flex !important; min-height: 33px; padding: 4px 8px; }
  .dashboard-columns, .detail-columns { grid-template-columns: minmax(0,1fr); }
  .schedule .room-col { width: 94px; }
  .schedule .day-col { width: 76px; }
}
@media (max-width: 480px) {
  .heading { align-items: start; flex-direction: column; gap: 11px; margin-bottom: 15px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .form-grid { grid-template-columns: minmax(0,1fr); }
  .form-grid.two { gap: 8px; }
  .filters, .calendar-bar, .panel-head { padding: 10px 12px; }
  .panel-head { align-items: start; }
  .panel-head .quiet-link { white-space: nowrap; }
  .activity { padding-inline: 12px; }
  .room-tiles { padding-inline: 12px; }
}
@media print {
  .sidebar, .topbar, .filters, .button { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; }
}
