/*!
 * Hotel Asset Management System - application stylesheet
 * Structure: 1. Theme tokens  2. Base  3. Shell (header, navigation, page header, footer)
 *            4. Components  5. Data grid  6. Forms  7. Module-specific  8. Labels & print
 * All colours come from the theme tokens in section 1.
 */

/* ===================================================================== 1. Theme tokens */
:root, [data-theme="corporate"], [data-theme="system"] {
  --hdr: #0b2e59; --hdr-ink: #ffffff; --hdr-dim: #a9bdd6; --hdr-hover: rgba(255,255,255,.1); --hdr-field: rgba(255,255,255,.12);
  --bg: #f3f5f8; --surface: #ffffff; --surface-2: #f7f8fa; --surface-3: #eef1f5; --ink: #1d2733; --muted: #5d6b7a; --line: #dde2e8; --line-strong: #c3ccd6;
  --accent: #0a6ed1; --accent-hover: #0857a6; --accent-soft: #e8f1fb; --accent-ink: #ffffff;
  --nav-bg: #ffffff; --nav-ink: #32404f; --nav-dim: #7a8796; --nav-active-bg: #e8f1fb; --nav-active-ink: #0a5ab0; --nav-bar: #0a6ed1;
  --ok: #107e3e; --ok-bg: #e6f4ea; --warn: #9a5800; --warn-bg: #fdf1dc; --bad: #bb0000; --bad-bg: #fde8e8; --info: #0a5ab0; --info-bg: #e5effa; --mute: #556270; --mute-bg: #eceff3;
  --chart-1: #0a6ed1; --chart-2: #9cc3ea; --chart-3: #107e3e; --chart-4: #e9730c; --chart-5: #bb0000; --chart-6: #925ace;
  color-scheme: light;
}
[data-theme="slate"] {
  --hdr: #263240; --hdr-ink: #fff; --hdr-dim: #a8b3c0; --accent: #34699a; --accent-hover: #2a557d; --accent-soft: #e9f0f7; --nav-active-bg: #e9f0f7; --nav-active-ink: #2a557d; --nav-bar: #34699a;
  --chart-1: #34699a; --chart-2: #a9c2da;
}
[data-theme="emerald"] {
  --hdr: #0f3d30; --hdr-ink: #fff; --hdr-dim: #9fc2b5; --accent: #127a52; --accent-hover: #0d5f3f; --accent-soft: #e5f3ec; --nav-active-bg: #e5f3ec; --nav-active-ink: #0d5f3f; --nav-bar: #127a52;
  --chart-1: #127a52; --chart-2: #9fd0b9;
}
[data-theme="teal"] {
  --hdr: #0a4651; --hdr-ink: #fff; --hdr-dim: #9cc4cb; --accent: #00798a; --accent-hover: #005f6c; --accent-soft: #e2f3f5; --nav-active-bg: #e2f3f5; --nav-active-ink: #005f6c; --nav-bar: #00798a;
  --chart-1: #00798a; --chart-2: #97cfd7;
}
[data-theme="maroon"] {
  --hdr: #4d1620; --hdr-ink: #fff; --hdr-dim: #d3a9b1; --accent: #8e2236; --accent-hover: #721b2b; --accent-soft: #f7e9ec; --nav-active-bg: #f7e9ec; --nav-active-ink: #721b2b; --nav-bar: #8e2236;
  --chart-1: #8e2236; --chart-2: #dfaab4;
}
[data-theme="dark"] {
  --hdr: #0d1117; --hdr-ink: #e6edf3; --hdr-dim: #8b98a7; --hdr-hover: rgba(255,255,255,.08); --hdr-field: rgba(255,255,255,.08);
  --bg: #0f141a; --surface: #161c24; --surface-2: #1b222c; --surface-3: #222a35; --ink: #dfe6ee; --muted: #93a1b0; --line: #2a3340; --line-strong: #3a4554;
  --accent: #4c9bf0; --accent-hover: #73b2f5; --accent-soft: #17293d; --accent-ink: #0b1420;
  --nav-bg: #12171e; --nav-ink: #c9d3dd; --nav-dim: #7d8a98; --nav-active-bg: #1b2a3c; --nav-active-ink: #8cc2fa; --nav-bar: #4c9bf0;
  --ok: #5dc787; --ok-bg: #12301f; --warn: #f2b45a; --warn-bg: #36280f; --bad: #ff7b72; --bad-bg: #3b1716; --info: #79b8ff; --info-bg: #142a42; --mute: #a3afbb; --mute-bg: #232b35;
  --chart-1: #4c9bf0; --chart-2: #2f5378; --chart-3: #5dc787; --chart-4: #f2a14a; --chart-5: #ff7b72; --chart-6: #b392f0;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    --hdr: #0d1117; --hdr-ink: #e6edf3; --hdr-dim: #8b98a7; --hdr-hover: rgba(255,255,255,.08); --hdr-field: rgba(255,255,255,.08);
    --bg: #0f141a; --surface: #161c24; --surface-2: #1b222c; --surface-3: #222a35; --ink: #dfe6ee; --muted: #93a1b0; --line: #2a3340; --line-strong: #3a4554;
    --accent: #4c9bf0; --accent-hover: #73b2f5; --accent-soft: #17293d; --accent-ink: #0b1420;
    --nav-bg: #12171e; --nav-ink: #c9d3dd; --nav-dim: #7d8a98; --nav-active-bg: #1b2a3c; --nav-active-ink: #8cc2fa; --nav-bar: #4c9bf0;
    --ok: #5dc787; --ok-bg: #12301f; --warn: #f2b45a; --warn-bg: #36280f; --bad: #ff7b72; --bad-bg: #3b1716; --info: #79b8ff; --info-bg: #142a42; --mute: #a3afbb; --mute-bg: #232b35;
    --chart-1: #4c9bf0; --chart-2: #2f5378; --chart-3: #5dc787; --chart-4: #f2a14a; --chart-5: #ff7b72; --chart-6: #b392f0;
    color-scheme: dark;
  }
}
[data-theme="contrast"] {
  --hdr: #000; --hdr-ink: #fff; --hdr-dim: #e0e0e0; --bg: #fff; --surface: #fff; --surface-2: #f0f0f0; --surface-3: #e6e6e6; --ink: #000; --muted: #222; --line: #000; --line-strong: #000;
  --accent: #003fbf; --accent-hover: #002d8a; --accent-soft: #dfe7ff; --nav-bg: #fff; --nav-ink: #000; --nav-dim: #222; --nav-active-bg: #000; --nav-active-ink: #fff; --nav-bar: #000;
  --ok: #005a24; --warn: #6b3a00; --bad: #a00000; --info: #00338f; --mute: #222;
}

/* ===================================================================== 2. Base */
:root { --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, "Liberation Mono", monospace; --radius: 4px; --hdr-h: 64px; --nav-w: 248px; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--accent-hover); }
h1, h2, h3 { font-weight: 600; margin: 0; line-height: 1.3; }
h1 { font-size: 20px; } h2 { font-size: 15px; } h3 { font-size: 14px; }
p { margin: 0; }
.muted { color: var(--muted); } .small { font-size: 12.5px; }
.tag, code { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ic { width: 16px; height: 16px; flex: none; fill: currentColor; vertical-align: -3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
[data-theme="contrast"] :focus-visible { outline-width: 3px; }
[hidden] { display: none !important; }
kbd { font-family: var(--mono); font-size: 11.5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 3px; padding: 0 4px; background: var(--surface); }

/* ===================================================================== 3. Shell */
.hdr { position: fixed; inset: 0 0 auto 0; height: calc(var(--hdr-h) + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); background: var(--hdr); color: var(--hdr-ink); z-index: 40;
  display: flex; align-items: center; gap: 6px; padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); box-shadow: 0 1px 0 rgba(0,0,0,.2); }
.hdr-btn { height: 36px; min-width: 36px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: var(--radius); background: transparent; color: var(--hdr-ink); cursor: pointer; font: 13px var(--font); position: relative; text-decoration: none; }
.hdr-btn:hover { background: var(--hdr-hover); color: var(--hdr-ink); text-decoration: none; }
.hdr-btn .ic { width: 18px; height: 18px; }
.hdr-brand { display: flex; align-items: center; gap: 10px; color: var(--hdr-ink); padding: 0 8px; min-width: 0; text-decoration: none; }
.hdr-brand:hover { text-decoration: none; color: var(--hdr-ink); }
.hdr-logo { width: 28px; height: 28px; border-radius: 3px; background: #fff; color: var(--hdr); display: grid; place-items: center; flex: none; overflow: hidden; }
.hdr-logo img { width: 100%; height: 100%; object-fit: contain; }
.hdr-logo .ic { width: 18px; height: 18px; }
.hdr-product { font-weight: 600; font-size: 15px; white-space: nowrap; }
.hdr-tenant { color: var(--hdr-dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 1px solid rgba(255,255,255,.25); padding-left: 12px; margin-left: 2px; }
.hdr-search { flex: 1; max-width: 460px; margin: 0 16px; position: relative; }
.hdr-search input { width: 100%; height: 34px; min-height: 0; border: 1px solid transparent; border-radius: var(--radius); background: var(--hdr-field); color: var(--hdr-ink); padding: 0 12px 0 34px; font-size: 13.5px; }
.hdr-search input::placeholder { color: var(--hdr-dim); }
.hdr-search input:focus { background: #fff; color: #1d2733; border-color: #fff; box-shadow: none; }
.hdr-search .ic { position: absolute; left: 11px; top: 9px; color: var(--hdr-dim); }
.hdr-spacer { flex: 1; }
.hdr-badge { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #d9262c; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.hdr .avatar { background: rgba(255,255,255,.18); color: #fff; }
.hdr-user-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav { position: fixed; top: calc(var(--hdr-h) + env(safe-area-inset-top, 0px)); bottom: 0; left: 0; width: var(--nav-w); background: var(--nav-bg); border-right: 1px solid var(--line); overflow-y: auto; z-index: 30;
  padding: 10px 0 calc(16px + env(safe-area-inset-bottom, 0px)) env(safe-area-inset-left, 0px); }
.nav-group { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--nav-dim); padding: 14px 18px 5px; }
.nav a { display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 18px; color: var(--nav-ink); font-size: 13.5px; border-left: 3px solid transparent; white-space: nowrap; }
.nav a:hover { background: var(--surface-3); text-decoration: none; color: var(--nav-ink); }
.nav a.on { background: var(--nav-active-bg); color: var(--nav-active-ink); border-left-color: var(--nav-bar); font-weight: 600; }
.nav .ic { width: 16px; height: 16px; color: var(--nav-dim); }
.nav a.on .ic { color: var(--nav-active-ink); }
body.nav-collapsed { --nav-w: 56px; }
body.nav-collapsed .nav-group, body.nav-collapsed .nav a span { display: none; }
body.nav-collapsed .nav a { justify-content: center; padding: 0; }

.main { margin-left: var(--nav-w); padding-top: calc(var(--hdr-h) + env(safe-area-inset-top, 0px)); min-height: 100vh; display: flex; flex-direction: column; }
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px max(24px, env(safe-area-inset-right, 0px)) 14px 24px; display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head-text { flex: 1; min-width: 0; }
.crumbs { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--accent); }
.crumbs .ic { width: 10px; height: 10px; vertical-align: 0; }
.page-head h1 { overflow-wrap: anywhere; }
.page-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.content { padding: 20px max(24px, env(safe-area-inset-right, 0px)) 28px 24px; display: grid; gap: 16px; align-content: start; flex: 1; width: 100%; max-width: 1440px; }
.content > * { min-width: 0; }
.foot { border-top: 1px solid var(--line); padding: 12px max(24px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) 24px; font-size: 12px; color: var(--muted);
  display: flex; gap: 6px 18px; flex-wrap: wrap; justify-content: space-between; background: var(--surface); }
.scrim { display: none; }
.only-mobile { display: none !important; }

@media (max-width: 1024px) {
  .hdr-tenant, .hdr-user-name { display: none; }
}
@media (max-width: 900px) {
  :root { --hdr-h: 50px; }
  .nav { transform: translateX(-100%); transition: transform .2s ease; width: 270px; box-shadow: 4px 0 16px rgba(0,0,0,.15); z-index: 45; }
  body.nav-open .nav { transform: none; }
  body.nav-collapsed { --nav-w: 248px; }
  body.nav-collapsed .nav-group, body.nav-collapsed .nav a span { display: initial; }
  body.nav-collapsed .nav a { justify-content: flex-start; padding: 0 18px; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }
  body.nav-open .scrim, body.help-open .scrim { display: block; }
  .main { margin-left: 0; }
  .hdr-search { display: none; }
  body.search-open .hdr-search { display: block; position: fixed; left: 0; right: 0; top: calc(var(--hdr-h) + env(safe-area-inset-top, 0px)); margin: 0; max-width: none; padding: 8px max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px)); background: var(--hdr); z-index: 41; }
  body.search-open .hdr-search .ic { left: 23px; top: 17px; }
  .only-mobile { display: inline-flex !important; }
  .hide-mobile { display: none !important; }
  .page-head { padding: 10px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); }
  .page-head h1 { font-size: 18px; }
  .content { padding: 14px max(16px, env(safe-area-inset-right, 0px)) 22px max(16px, env(safe-area-inset-left, 0px)); gap: 14px; }
  .foot { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .btn-label { display: none; }
}
@media (max-width: 480px) { .hdr-product { font-size: 14px; } .toolbar { width: 100%; } }

/* ===================================================================== 4. Components */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.card > .card-h { margin: -16px -16px 14px; padding: 11px 16px; border-bottom: 1px solid var(--line); min-height: 46px; }
.card-h h2 { font-size: 14.5px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: start; }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
@media (max-width: 460px) { .tiles { grid-template-columns: 1fr 1fr; gap: 10px; } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; color: var(--ink); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: start; }
a.tile:hover { border-color: var(--accent); text-decoration: none; color: var(--ink); }
.tile .k { font-size: 12.5px; color: var(--muted); grid-column: 1; }
.tile .v { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; grid-column: 1; overflow-wrap: anywhere; line-height: 1.25; }
.tile .s { font-size: 12px; color: var(--muted); grid-column: 1; }
.tile .ti { grid-column: 2; grid-row: 1 / span 3; width: 38px; height: 38px; border-radius: var(--radius); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.tile .ti .ic { width: 18px; height: 18px; }
.tile .ti.ok { background: var(--ok-bg); color: var(--ok); } .tile .ti.warn { background: var(--warn-bg); color: var(--warn); } .tile .ti.bad { background: var(--bad-bg); color: var(--bad); }
@media (max-width: 460px) { .tile { padding: 12px; } .tile .ti { display: none; } .tile .v { font-size: 18px; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink);
  font: 600 13px var(--font); cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--surface-3); text-decoration: none; color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn-danger { color: var(--bad); border-color: var(--line-strong); }
.btn-danger:hover { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn .ic { width: 14px; height: 14px; }
.btn-ghost { border-color: transparent; background: transparent; }
.icon-btn { border: 0; background: none; color: var(--ink); width: 34px; height: 34px; border-radius: var(--radius); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--surface-3); }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.seg > * { border: 0; border-right: 1px solid var(--line-strong); border-radius: 0; height: 32px; padding: 0 14px; display: inline-flex; align-items: center; font: 600 13px var(--font); color: var(--ink); background: transparent; cursor: pointer; }
.seg > *:last-child { border-right: 0; }
.seg > *:hover { background: var(--surface-3); text-decoration: none; color: var(--ink); }
.seg > .on, .seg > .btn-primary { background: var(--accent); color: var(--accent-ink); }

.pill { display: inline-block; font-size: 11.5px; font-weight: 600; line-height: 18px; padding: 0 7px; border-radius: 3px; white-space: nowrap; border: 1px solid transparent; }
.pill-ok { background: var(--ok-bg); color: var(--ok); } .pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-bad { background: var(--bad-bg); color: var(--bad); } .pill-info { background: var(--info-bg); color: var(--info); }
.pill-mute { background: var(--mute-bg); color: var(--mute); }
[data-theme="contrast"] .pill { border-color: currentColor; background: #fff; }

.flash { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius); border: 1px solid; font-size: 13.5px; }
.flash .ic { margin-top: 2px; }
.flash > div { flex: 1; min-width: 0; }
.flash-ok { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.flash-bad { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.flash-warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.flash-info { background: var(--info-bg); color: var(--info); border-color: color-mix(in srgb, var(--info) 35%, transparent); }
.flash ul { margin: 4px 0 0; padding-left: 18px; }
.flash-close { background: none; border: 0; color: inherit; cursor: pointer; padding: 0; opacity: .7; }

.empty { text-align: center; padding: 32px 16px; color: var(--muted); }
.empty h2 { color: var(--ink); margin-bottom: 6px; }
.empty .ic { width: 36px; height: 36px; color: var(--line-strong); margin-bottom: 8px; }
.kv { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 8px 20px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; position: relative; }
.bar > i { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.rowbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; font-size: 13.5px; }
.rowbar .bar { grid-column: 1 / -1; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; font-size: 13.5px; padding: 8px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline li::before { content: ""; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--accent); justify-self: center; }

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); overflow-x: auto; background: var(--surface); }
.tabs button, .tabs a { border: 0; background: none; padding: 11px 16px; font: 600 13.5px var(--font); color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.tabs button:hover, .tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs .on { color: var(--accent); border-bottom-color: var(--accent); }
.tabs .count { display: inline-block; margin-left: 6px; padding: 0 6px; font-size: 11px; line-height: 17px; border-radius: 8px; background: var(--surface-3); color: var(--muted); }
.tab-panel { display: grid; gap: 16px; }

/* Dropdown menus */
details.menu { position: relative; }
details.menu > summary { list-style: none; cursor: pointer; }
details.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.16);
  width: min(300px, calc(100vw - 24px)); padding: 6px 0; z-index: 60; max-height: calc(100vh - 80px); overflow-y: auto; }
.menu-pop a, .menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 14px; border: 0; background: none; color: var(--ink); font: 13.5px var(--font); cursor: pointer; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-3); text-decoration: none; color: var(--ink); }
.menu-pop .sep { height: 1px; background: var(--line); margin: 6px 0; }
.menu-pop .menu-h { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 14px 4px; }
.menu-pop .on { font-weight: 600; color: var(--accent); }
.menu-pop .menu-user { padding: 8px 14px 10px; display: flex; gap: 10px; align-items: center; }
.menu-note { padding: 8px 14px; font-size: 13px; display: grid; gap: 2px; border-top: 1px solid var(--line); }
.menu-note:first-of-type { border-top: 0; }
.swatch { display: inline-flex; border-radius: 2px; overflow: hidden; border: 1px solid var(--line-strong); flex: none; }
.swatch i { width: 9px; height: 16px; display: block; }

/* Modal */
.modal-back { position: fixed; inset: 0; background: rgba(15,20,26,.5); z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); color: var(--ink); border-radius: var(--radius); width: min(440px, 100%); box-shadow: 0 16px 48px rgba(0,0,0,.3); }
.modal-h { padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 15px; display: flex; gap: 10px; align-items: center; }
.modal-h .ic { color: var(--warn); width: 18px; height: 18px; }
.modal-b { padding: 16px 18px; font-size: 14px; }
.modal-f { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }

/* Help panel */
.help-panel { position: fixed; top: calc(var(--hdr-h) + env(safe-area-inset-top, 0px)); right: 0; bottom: 0; width: min(400px, 100%); background: var(--surface); border-left: 1px solid var(--line); z-index: 46;
  display: flex; flex-direction: column; box-shadow: -6px 0 20px rgba(0,0,0,.12); padding-right: env(safe-area-inset-right, 0px); }
.help-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.help-head h2 { flex: 1; font-size: 14.5px; }
.help-kicker { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.help-body { padding: 16px; overflow-y: auto; display: grid; gap: 10px; align-content: start; font-size: 13.5px; line-height: 1.55; }
.help-body h1, .help-body h2, .help-body h3 { font-size: 13.5px; margin-top: 6px; }
.help-body ul, .help-body ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.help-foot { border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 12px; justify-content: space-between; font-size: 12.5px; flex-wrap: wrap; }

/* ===================================================================== 5. Data grid */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.card .tbl-wrap { border-radius: 2px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--line-strong); background: var(--surface-2); white-space: nowrap; }
.tbl th a { color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.tbl th a:hover { color: var(--ink); text-decoration: none; }
.tbl th a.sorted { color: var(--ink); }
.tbl th .ic { width: 10px; height: 10px; }
.tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.tbl tbody tr:hover td { background: var(--accent-soft); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tfoot td { font-weight: 600; background: var(--surface-2); border-top: 1px solid var(--line-strong); }
.tbl tr.cur td { font-weight: 600; background: var(--accent-soft); }
.tbl .chk, .chk { width: 16px; height: 16px; accent-color: var(--accent); vertical-align: middle; }
.tbl td.actions-col { white-space: nowrap; text-align: right; }
.grid-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.grid-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.pager { display: inline-flex; flex-wrap: wrap; }
.pager a, .pager span { min-width: 32px; height: 30px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); margin-left: -1px; background: var(--surface); font-size: 13px; color: var(--ink); }
.pager > :first-child { border-radius: var(--radius) 0 0 var(--radius); margin-left: 0; }
.pager > :last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.pager a:hover { background: var(--surface-3); text-decoration: none; }
.pager .on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); position: relative; z-index: 1; }
.pager .dis { color: var(--line-strong); }

/* ===================================================================== 6. Forms */
form.stack, .stack { display: grid; gap: 14px; }
.fgrid { display: grid; gap: 12px 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.field { display: grid; gap: 4px; min-width: 0; align-content: start; }
.field.wide { grid-column: 1 / -1; }
label, .lbl { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.req { color: var(--bad); }
input, select, textarea { width: 100%; font: 14px var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 6px 10px; min-height: 34px; }
select { padding-right: 28px; }
textarea { min-height: 76px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), inset 0 0 0 1px var(--accent); }
input[readonly] { background: var(--surface-2); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; min-height: 0; padding: 0; accent-color: var(--accent); box-shadow: none; }
input[type=file] { padding: 4px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--ink); font-weight: 400; }
.check input { margin-top: 2px; flex: none; }
.hint { font-size: 12px; color: var(--muted); }
.err { font-size: 12px; color: var(--bad); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters { display: flex; gap: 10px 12px; flex-wrap: wrap; align-items: end; }
.filters .field { flex: 1 1 170px; }
.section-title { font-size: 13px; font-weight: 600; color: var(--ink); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
fieldset.group { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 16px; margin: 0; background: var(--surface); }
fieldset.group > legend { font-size: 13px; font-weight: 600; padding: 0 6px; margin-left: -6px; }
.form-foot { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  margin: 0 -16px -16px; background: var(--surface-2); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.form-foot .spacer { flex: 1; }

/* ===================================================================== 7. Modules */
.asset-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.asset-photo { width: 96px; height: 96px; border-radius: var(--radius); object-fit: cover; background: var(--surface-2); color: var(--line-strong); border: 1px solid var(--line); display: grid; place-items: center; }
.asset-photo .ic { width: 34px; height: 34px; }
.code-box { display: grid; gap: 10px; justify-items: center; padding: 14px; background: #fff; color: #111; border-radius: var(--radius); border: 1px solid var(--line); }
.code-box svg { max-width: 100%; height: auto; display: block; }
@media (max-width: 640px) { .asset-head { grid-template-columns: 1fr; } .asset-head .asset-photo { display: none; } }
.room-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
@media (max-width: 460px) { .room-grid { grid-template-columns: 1fr 1fr; } }
.room { display: grid; gap: 1px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.room:hover { border-color: var(--accent); text-decoration: none; color: var(--ink); }
.room .rn { font-size: 16px; font-weight: 600; } .room .rt { font-size: 12px; color: var(--muted); }
.room .rc { font-size: 12.5px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.room.flag { border-color: var(--warn); }
.room .rflag { font-size: 11.5px; color: var(--warn); font-weight: 600; }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 220px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.perm-group { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.perm-group h3 { background: var(--surface-2); padding: 10px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; }
.perm-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 10px 20px; padding: 14px 16px; }
.diff td.old { color: var(--bad); text-decoration: line-through; }
.diff td.new { color: var(--ok); }
.theme-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.theme-card { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.theme-card:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.theme-card .swatch { width: 100%; } .theme-card .swatch i { width: 25%; height: 28px; }
.rule { display: grid; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.rule:first-of-type { border-top: 0; padding-top: 0; }
#reader { width: 100%; max-width: 460px; border-radius: var(--radius); overflow: hidden; background: #000; }

/* Login */
/* Sign-in page: property showcase (left) and sign-in panel (right) */
.signin { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 460px); background: var(--surface); }
.signin-show { position: relative; color: #fff; background-color: var(--hdr); padding: 36px 48px 28px; display: flex; flex-direction: column; gap: 28px; overflow: hidden; isolation: isolate;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(160deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,0) 45%, rgba(0,0,0,.28) 100%);
  background-size: 40px 40px, 40px 40px, auto; }
.signin-show::after { content: ""; position: absolute; right: -120px; bottom: -160px; width: 520px; height: 520px; border-radius: 50%; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.02); z-index: -1; }
.signin-show.has-photo { background-image: linear-gradient(100deg, rgba(5,20,40,.92) 0%, rgba(5,20,40,.78) 45%, rgba(5,20,40,.35) 100%), var(--photo); background-size: cover; background-position: center; }
.signin-show.has-photo::after { display: none; }
.signin-show-top { display: flex; align-items: center; gap: 16px; }
.prop-plate { height: 64px; min-width: 64px; max-width: 220px; padding: 8px 12px; background: #fff; border-radius: 6px; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.25); flex: none; }
.prop-plate img { max-height: 48px; max-width: 196px; object-fit: contain; display: block; }
.prop-plate.is-mono { width: 64px; padding: 0; background: #fff; }
.prop-plate.is-mono span { font: 600 24px/1 Georgia, "Times New Roman", serif; color: var(--hdr); letter-spacing: .02em; }
.prop-name { font-size: 18px; font-weight: 600; line-height: 1.25; }
.prop-sub { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.7); margin-top: 3px; }
.signin-show-mid { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 0; max-width: 700px; }
.signin-show h1 { font-size: 34px; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
.signin-lead { color: rgba(255,255,255,.82); font-size: 16px; margin-top: 12px; max-width: 520px; }
.showcase { position: relative; height: 230px; margin: 34px 0 30px; }
.sc-card { position: absolute; background: #fff; color: #1d2733; border-radius: 8px; box-shadow: 0 18px 40px rgba(0,0,0,.28), 0 2px 6px rgba(0,0,0,.12); font-size: 12px; }
.sc-k { color: #5b6b7c; font-size: 11.5px; }
.sc-title { font-weight: 600; font-size: 13px; }
.sc-label { left: 0; top: 40px; width: 250px; padding: 12px; display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: center; transform: rotate(-2deg); animation: scIn .7s ease both; }
.sc-qr { width: 76px; height: 76px; } .sc-qr svg { width: 76px; height: 76px; display: block; }
.sc-tag { font: 700 13px var(--mono); margin-top: 2px; }
.sc-name { font-size: 11.5px; margin-top: 2px; }
.sc-bars { height: 16px; margin-top: 6px; background: repeating-linear-gradient(90deg, #1d2733 0 2px, transparent 2px 3px, #1d2733 3px 4px, transparent 4px 7px, #1d2733 7px 8px, transparent 8px 9px); }
.sc-room { left: 232px; top: 0; width: 236px; padding: 14px; z-index: 2; animation: scIn .7s .12s ease both; }
.sc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sc-ico { width: 32px; height: 32px; border-radius: 6px; background: #e8f1fb; color: #0a6ed1; display: grid; place-items: center; } .sc-ico .ic { width: 16px; height: 16px; }
.sc-pill { margin-left: auto; background: #e8f5ee; color: #107e3e; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.sc-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 5px; }
.sc-list li { display: flex; gap: 7px; align-items: center; } .sc-list .ic { width: 13px; height: 13px; color: #107e3e; }
.sc-meter { height: 5px; background: #edf1f5; border-radius: 3px; overflow: hidden; margin-bottom: 5px; } .sc-meter i { display: block; height: 100%; background: #107e3e; }
.sc-kpi { left: 452px; top: 70px; width: 184px; padding: 14px; z-index: 3; transform: rotate(1.5deg); animation: scIn .7s .24s ease both; }
.sc-chart { display: flex; align-items: flex-end; gap: 6px; height: 64px; margin-top: 10px; border-bottom: 1px solid #d5dce4; }
.sc-chart i { flex: 1; background: #0a6ed1; border-radius: 2px 2px 0 0; opacity: .85; } .sc-chart i:nth-child(odd) { background: #9cc3ea; }
@keyframes scIn { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .sc-card { animation: none; } }
.signin-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; max-width: 620px; }
.signin-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: rgba(255,255,255,.9); }
.signin-points .ic { width: 18px; height: 18px; flex: none; color: #8fc1f0; margin-top: 1px; }
.signin-show-foot { font-size: 12px; color: rgba(255,255,255,.6); }
.signin-panel { display: flex; flex-direction: column; padding: 32px max(40px, env(safe-area-inset-right, 0px)) 24px 40px; gap: 24px; background: var(--surface); border-left: 1px solid var(--line); }
.signin-product { display: flex; align-items: center; gap: 12px; }
.product-mark { width: 40px; height: 40px; border-radius: 6px; background: var(--hdr); color: #fff; display: grid; place-items: center; flex: none; overflow: hidden; }
.product-mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; } .product-mark .ic { width: 22px; height: 22px; }
.product-name { display: block; font-weight: 600; font-size: 15px; line-height: 1.25; } .product-co { display: block; font-size: 12px; color: var(--muted); }
.signin-form { flex: 1; width: 100%; max-width: 360px; margin: 0 auto; display: grid; gap: 16px; align-content: center; }
.signin-form h2 { font-size: 24px; font-weight: 600; } .signin-form h2 + p { margin-top: 4px; }
.input-icon { position: relative; }
.input-icon > .ic { position: absolute; left: 11px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.input-icon input { padding-left: 36px; height: 42px; }
.input-icon input[type=password], .input-icon input#password { padding-right: 42px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; translate: 0 -50%; width: 34px; height: 34px; border: 0; background: none; color: var(--muted); border-radius: var(--radius); cursor: pointer; display: grid; place-items: center; }
.pw-toggle:hover, .pw-toggle[aria-pressed=true] { color: var(--accent); background: var(--surface-3); }
.signin-btn { height: 42px !important; font-size: 14.5px !important; justify-content: center; width: 100%; }
.signin-foot { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); text-align: center; justify-items: center; }
.signin-foot > div { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; }
.img-current { display: flex; gap: 10px; align-items: center; margin-top: 6px; } .img-current img { height: 34px; max-width: 120px; object-fit: contain; border: 1px solid var(--line); border-radius: 3px; background: #fff; padding: 2px; }
@media (max-width: 1180px) { .sc-kpi { display: none; } }
@media (max-width: 980px) {
  .signin { grid-template-columns: 1fr; }
  .signin-show { padding: calc(20px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 22px max(20px, env(safe-area-inset-left, 0px)); gap: 14px; }
  .signin-show h1 { font-size: 22px; } .signin-lead { font-size: 14px; margin-top: 6px; }
  .showcase, .signin-points, .signin-show-foot { display: none; }
  .prop-plate { height: 52px; min-width: 52px; } .prop-plate img { max-height: 38px; } .prop-plate.is-mono { width: 52px; } .prop-plate.is-mono span { font-size: 20px; }
  .signin-panel { border-left: 0; padding: 22px max(20px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); }
  .signin-product { justify-content: center; }
}
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.error-page .card { max-width: 480px; display: grid; gap: 12px; }
.error-code { font-size: 13px; font-weight: 600; color: var(--muted); }

/* ===================================================================== 8. Labels & print */
.sheet { display: flex; flex-wrap: wrap; gap: 8px; }
.label { background: #fff; color: #111; border: 1px dashed #bbb; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2mm; align-items: center; padding: 1.5mm 2mm; overflow: hidden; font-family: Arial, Helvetica, sans-serif; break-inside: avoid; }
.label .lq svg { display: block; }
.label .lt { min-width: 0; display: grid; gap: 0.4mm; }
.label .l-hotel { font-size: 6pt; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label .l-tag { font: 700 8pt Consolas, "Courier New", monospace; white-space: nowrap; }
.label .l-name { font-size: 6.5pt; line-height: 1.15; max-height: 2.3em; overflow: hidden; }
.label .l-loc { font-size: 6pt; color: #444; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label .lb svg { display: block; max-width: 100%; height: auto; }
.label.size-50x25 { width: 50mm; height: 25mm; } .label.size-50x25 .lq svg { width: 20mm; height: 20mm; }
.label.size-38x25 { width: 38mm; height: 25mm; } .label.size-38x25 .lq svg { width: 18mm; height: 18mm; } .label.size-38x25 .l-name { display: none; }
.label.size-70x35 { width: 70mm; height: 35mm; } .label.size-70x35 .lq svg { width: 28mm; height: 28mm; }
.label.size-70x35 .l-tag { font-size: 10pt; } .label.size-70x35 .l-name { font-size: 8pt; } .label.size-70x35 .l-hotel { font-size: 7pt; }
.label.layout-barcode { grid-template-columns: 1fr; text-align: center; } .label.layout-barcode .lq { display: none; }

@media print {
  @page { margin: 8mm; }
  body { background: #fff; color: #000; }
  .hdr, .nav, .page-head .toolbar, .no-print, .flash, .help-panel, .scrim, .foot, .form-foot, .tabs { display: none !important; }
  .main { margin: 0; padding: 0; }
  .page-head { border: 0; padding: 0 0 8px; }
  .content { padding: 0; max-width: none; display: block; }
  .card, .tbl-wrap { border: 0; padding: 0; }
  .label { border: 0.2mm solid #ddd; }
  .sheet { gap: 2mm; }
  a { color: #000; }
}
@media (prefers-reduced-motion: reduce) { .nav { transition: none; } }

/* Form action bar: the last row of buttons in a card form becomes a footer bar, primary action on the right */
form.card.stack > .actions:last-child, form.card > .actions:last-child:not(.filters .actions) { margin: 6px -16px -16px; padding: 12px 16px; background: var(--surface-2); border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius); flex-direction: row-reverse; justify-content: flex-start; }
form.stack:not(.card) > .actions:last-child { justify-content: flex-end; flex-direction: row-reverse; }
form.card.filters > .actions:last-child { margin: 0; padding: 0; background: none; border: 0; flex-direction: row; }

/* Header on small screens: logo only; dashboard KPI grid in rows of three */
.hdr-brand { flex: 0 1 auto; }
.hdr-product { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .hdr-product { display: none; } .hdr-btn { min-width: 34px; padding: 0 6px; } }
@media (min-width: 901px) { .tiles.tiles-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ===================================================================== Version 1.1 additions */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.room-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 220px; overflow: auto; }
.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; }
ol.steps { margin: 0; padding: 0; list-style: none; counter-reset: st; display: grid; gap: 10px; }
ol.steps > li { counter-increment: st; position: relative; padding-left: 36px; min-height: 24px; font-size: 13.5px; }
ol.steps > li > strong { display: block; line-height: 24px; }
ol.steps > li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
ol.steps > li > span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
ol.steps-row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.tbl-edit td { padding: 6px 8px; vertical-align: middle; }
.tbl-edit input, .tbl-edit select { min-height: 32px; height: 32px; font-size: 13px; padding: 0 8px; width: 100%; }
.tbl-edit input[type=checkbox] { width: 16px; height: 16px; min-height: 0; }
.tbl-edit tfoot td { background: var(--surface-2); font-weight: 600; }
.seg label.btn { cursor: pointer; }
@media (min-width: 1025px) { .hdr-tenant { display: inline-flex; align-items: center; gap: 8px; } }
.hdr-tenant img { height: 24px; max-width: 90px; object-fit: contain; background: #fff; border-radius: 2px; padding: 2px 4px; }
/* User guide */
.guide { display: grid; grid-template-columns: minmax(0, 270px) minmax(0, 1fr); gap: 16px; align-items: start; }
.guide-toc { position: sticky; top: calc(var(--hdr-h) + 16px); padding: 8px 0 12px; max-height: calc(100vh - var(--hdr-h) - 32px); overflow: auto; }
.guide-toc .nav-group { padding: 12px 16px 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.guide-toc a { display: block; padding: 4px 16px; font-size: 13px; }
.guide-chapter { font-size: 16px; margin-top: 8px; }
.help-body table { border-collapse: collapse; width: 100%; font-size: 13px; }
.help-body th, .help-body td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.help-body th { background: var(--surface-2); font-weight: 600; }
.help-body h3 { font-size: 13.5px; margin-top: 8px; color: var(--ink); }
.help-body code { background: var(--surface-3); padding: 1px 4px; border-radius: 3px; }
.manual-cover { display: none; }
@media (max-width: 900px) { .guide { grid-template-columns: minmax(0, 1fr); } .guide-toc { display: none; } }
@media print {
  .guide { display: block; } .no-print, .page-head .toolbar, .guide-toc { display: none !important; }
  .manual-cover { display: block; page-break-after: always; padding-top: 30vh; }
  .manual-cover h1 { font-size: 32pt; margin: 6pt 0; } .mc-product { font-size: 12pt; text-transform: uppercase; letter-spacing: .1em; color: #555; }
  .mc-prop { font-size: 16pt; } .mc-meta { margin-top: 8pt; color: #555; } .mc-toc { margin-top: 30pt; font-size: 12pt; line-height: 1.8; }
  .guide-chapter { page-break-before: always; font-size: 18pt; margin: 0 0 8pt; }
  .guide-topic { page-break-inside: avoid; border: 0 !important; padding: 0 !important; margin-bottom: 12pt; }
  .guide-topic .card-h { border: 0 !important; margin: 0 0 4pt !important; padding: 0 !important; min-height: 0 !important; }
  .page-head { display: none !important; }
}
ol.steps:not(.steps-row) > li { line-height: 24px; }
.bulk-bar .actions select, .bulk-bar .actions input { width: auto; min-width: 200px; flex: 0 1 260px; }
.guide-topic { scroll-margin-top: calc(var(--hdr-h) + 12px); }
ol.steps-plain > li > strong { display: inline; line-height: inherit; }

/* ===================================================================== Logos in the header
   panel: white panel fitted to the logo (also used by the Dark theme). light: white header bar, no panel. plain: no panel. */
.hdr-logo.has-img { display: flex; align-items: center; width: auto; height: 46px; max-width: 200px; padding: 5px 9px; border-radius: 6px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.hdr-logo.has-img img { display: block; width: auto; height: 100%; max-width: 182px; object-fit: contain; }
.hdr-tenant .tenant-logo { height: 46px; max-width: 170px; padding: 5px 9px; background: #fff; border-radius: 6px; display: inline-flex; align-items: center; flex: none; box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.hdr-tenant .tenant-logo img { display: block; height: 100%; width: auto; max-width: 152px; object-fit: contain; background: none; padding: 0; border-radius: 0; }
html.hdr-plain .hdr-logo.has-img, html.hdr-plain .hdr-tenant .tenant-logo { background: transparent; box-shadow: none; padding: 0; }
html.hdr-light:not([data-theme="dark"]):not([data-theme="system"]) .hdr { --hdr: #ffffff; --hdr-ink: #1d2733; --hdr-dim: #5f6b7a; --hdr-hover: #eef1f5; --hdr-field: #f1f3f6;
  border-bottom: 3px solid var(--accent); box-shadow: 0 1px 6px rgba(16,24,40,.06); }
html.hdr-light:not([data-theme="dark"]):not([data-theme="system"]) .hdr-logo.has-img,
html.hdr-light:not([data-theme="dark"]):not([data-theme="system"]) .hdr-tenant .tenant-logo { background: transparent; box-shadow: none; padding: 0; height: 48px; }
html.hdr-light:not([data-theme="dark"]):not([data-theme="system"]) .hdr-tenant { border-left-color: var(--line); }
html.hdr-light:not([data-theme="dark"]):not([data-theme="system"]) .hdr .avatar { background: var(--accent); color: #fff; }
html.hdr-light:not([data-theme="dark"]):not([data-theme="system"]) .hdr-search input { border-color: var(--line); }
html.hdr-light:not([data-theme="dark"]):not([data-theme="system"]) .hdr-search input:focus { border-color: var(--accent); }
html.hdr-light:not([data-theme="dark"]):not([data-theme="system"]) .hdr-logo:not(.has-img) { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: light) {
  html.hdr-light[data-theme="system"] .hdr { --hdr: #ffffff; --hdr-ink: #1d2733; --hdr-dim: #5f6b7a; --hdr-hover: #eef1f5; --hdr-field: #f1f3f6; border-bottom: 3px solid var(--accent); box-shadow: 0 1px 6px rgba(16,24,40,.06); }
  html.hdr-light[data-theme="system"] .hdr-logo.has-img, html.hdr-light[data-theme="system"] .hdr-tenant .tenant-logo { background: transparent; box-shadow: none; padding: 0; height: 48px; }
  html.hdr-light[data-theme="system"] .hdr-tenant { border-left-color: var(--line); }
  html.hdr-light[data-theme="system"] .hdr .avatar { background: var(--accent); color: #fff; }
}
@media (max-width: 1280px) { .hdr-logo.has-img + .hdr-product { display: none; } }
@media (max-width: 640px) { .hdr-logo.has-img, .hdr-tenant .tenant-logo { height: 36px !important; max-width: 120px; padding: 3px 6px; } .hdr-logo.has-img img { max-width: 108px; } }
.logo-field { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.logo-preview { width: 300px; height: 150px; border: 1px solid var(--line); border-radius: var(--radius); display: grid; place-items: center; padding: 12px; overflow: hidden;
  background-color: #fff; background-image: linear-gradient(45deg, #f0f2f5 25%, transparent 25%), linear-gradient(-45deg, #f0f2f5 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f0f2f5 75%), linear-gradient(-45deg, transparent 75%, #f0f2f5 75%);
  background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.logo-preview.is-empty { border-style: dashed; color: #8a96a3; font-size: 13px; background-image: none; background-color: var(--surface-2); }
@media (max-width: 700px) { .logo-field { grid-template-columns: minmax(0, 1fr); } .logo-preview { width: 100%; max-width: 300px; } }

/* Sign-in: hotel logo plate (left) and product logo (above the form) */
.prop-plate.is-logo { width: auto; height: auto; max-width: 100%; min-width: 0; padding: 14px 20px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.prop-plate.is-logo img { display: block; max-width: min(300px, 100%); max-height: 110px; width: auto; height: auto; }
html.hdr-plain .prop-plate.is-logo { background: transparent; box-shadow: none; padding: 0; }
.signin-show-top.has-logo { flex-direction: column; align-items: flex-start; gap: 14px; }
.signin-product.has-logo { flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.product-logo { width: 240px; height: 120px; max-width: 100%; display: grid; place-items: center; }
.product-logo img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.signin-product.has-logo .product-co { margin-top: 2px; }
@media (max-width: 980px) {
  .prop-plate.is-logo { padding: 10px 14px; } .prop-plate.is-logo img { max-width: 220px; max-height: 80px; }
  .signin-show-top.has-logo { align-items: center; text-align: center; width: 100%; }
  .product-logo { width: 180px; height: 90px; }
}

/* Print header on every printed page: hotel logo, name, address, printed by */
.print-head { display: none; }
@media print {
  .print-head { display: flex !important; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 0.4mm solid #000; padding-bottom: 3mm; margin-bottom: 4mm; font-size: 9pt; color: #000; }
  .print-head img { height: 18mm; max-width: 50mm; object-fit: contain; }
  .print-head .ph-name { font-size: 12pt; font-weight: 600; }
  .print-head .ph-meta { text-align: right; }
}
.create-rooms > summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.create-rooms > summary::-webkit-details-marker { display: none; }
.create-rooms > summary .ic { color: var(--accent); width: 18px; height: 18px; flex: none; }
.create-rooms[open] > summary { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.code-cloud { display: flex; flex-wrap: wrap; gap: 6px; max-height: 260px; overflow: auto; }
.code-cloud .tag { background: var(--surface-2); border: 1px solid var(--line); border-radius: 3px; padding: 2px 6px; }
.consent-box { border-color: var(--bad); }
.bulk-bar { display: grid; gap: 6px; }
.btn-danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; } .btn-danger-solid:hover { filter: brightness(.92); color: #fff; }
.checklist { border-left: 3px solid var(--accent); }
.check-steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; }
.check-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.check-steps li:last-child { border-bottom: 0; }
.cs-mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; background: var(--surface-3); color: var(--muted); }
.cs-mark .ic { width: 26px; height: 26px; color: var(--ok); }
.is-done .cs-mark { background: none; } .is-done .cs-text strong { color: var(--muted); font-weight: 500; }
.is-next .cs-mark { background: var(--accent); color: #fff; }
.cs-text { display: grid; gap: 1px; }
@media (max-width: 640px) { .check-steps li { grid-template-columns: 28px minmax(0, 1fr); } .check-steps li .btn { grid-column: 2; justify-self: start; } }
.deps .dep { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 12px 14px; display: grid; gap: 10px; }
.dep-h { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.dep-n { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 600; font-size: 12px; flex: none; }
.dep-items { list-style: none; margin: 0; padding: 0 0 0 36px; display: grid; gap: 4px; font-size: 13px; max-height: 240px; overflow: auto; }
.dep-items li { display: flex; gap: 8px; flex-wrap: wrap; }
.dep-fix { display: flex; gap: 8px; align-items: flex-start; background: var(--info-bg); color: var(--ink); border-radius: var(--radius); padding: 8px 10px; font-size: 13px; margin-left: 36px; }
.dep-fix .ic { color: var(--info); flex: none; margin-top: 2px; }
@media (max-width: 640px) { .dep-items, .dep-fix { margin-left: 0; padding-left: 0; } }
.nowrap { white-space: nowrap; } .dep-row > td { background: var(--surface-2); padding-top: 4px; } .dep-row summary { cursor: pointer; color: var(--accent); padding: 4px 0; }

.cl-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.cl-ring { --p: 0; width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: radial-gradient(closest-side, var(--surface) 76%, transparent 78% 100%), conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-3) 0); }
.cl-ring span { font-size: 12.5px; font-weight: 600; }
.cl-text { flex: 1 1 260px; min-width: 0; display: grid; gap: 1px; }
.cl-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.checklist .check-steps { margin-top: 12px; border-top: 1px solid var(--line); }
.btn-ghost { background: none; border-color: transparent; color: var(--muted); }

/* ===================================================================== Help me panel and guided steps */
.help-panel { width: min(420px, 100%); }
.help-icon { width: 38px; height: 38px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.help-icon .ic { width: 20px; height: 20px; }
.help-head .help-kicker { color: var(--accent); }
.help-head h2 { font-size: 16px; }
.help-intro { font-size: 14px; line-height: 1.55; }
.help-example { display: flex; gap: 10px; background: #fdf6e3; border: 1px solid #f0e0b0; color: #4a3b12; border-radius: 8px; padding: 10px 12px; font-size: 13.5px; }
.help-example .ic { color: #b7860b; flex: none; margin-top: 2px; }
.help-ex-k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a6a10; margin-bottom: 2px; }
.help-big { width: 100%; justify-content: center; min-height: 42px; font-size: 14px; }
.help-count { font-weight: 400; opacity: .85; margin-left: 4px; font-size: 13px; }
.help-sec { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.help-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.help-steps li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; }
.help-steps li:hover, .help-steps li:focus-visible { background: var(--accent-soft); outline: none; }
.hs-n { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface); }
.hs-eg { display: inline-block; margin-top: 4px; background: var(--accent-soft); color: var(--accent); border-radius: 4px; padding: 1px 8px; font-size: 12.5px; }
.help-more { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.help-more > summary { cursor: pointer; font-weight: 600; color: var(--accent); padding: 4px 0; }
.help-md { display: grid; gap: 10px; }
.help-foot a { display: inline-flex; gap: 6px; align-items: center; }
[data-theme="dark"] .help-example { background: #2c2512; border-color: #5a4a1c; color: #f1e3b5; }
.nav-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 12px; }
.tour { position: fixed; inset: 0; z-index: 80; }
.tour-spot { position: fixed; border-radius: 8px; box-shadow: 0 0 0 9999px rgba(12, 20, 32, .55); outline: 2px solid #fff; transition: all .2s ease; pointer-events: auto; }
.tour-pop { position: fixed; background: var(--surface); color: var(--ink); border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.3); padding: 14px 16px; display: grid; gap: 6px; z-index: 81; }
.tour-k { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.tour-t { font-size: 15px; }
.tour-eg { justify-self: start; background: var(--accent-soft); color: var(--accent); border-radius: 4px; padding: 1px 8px; font-size: 12.5px; }
.tour-b { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.tour-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 90; background: #1d2733; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13.5px; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
@media print { .tour, .tour-toast { display: none !important; } }

/* ===================================================================== Help Centre */
.hc-tabs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 8px; overflow-x: auto; flex-wrap: nowrap; }
.hc-tabs button { white-space: nowrap; }
.btn-help { color: var(--ok); border-color: var(--ok); }
.btn-help .ic { color: var(--ok); }
.hc-hero { background: var(--hdr); color: var(--hdr-ink); border-radius: 10px; padding: 26px 30px; }
.hc-hero h2 { font-size: 22px; margin: 0 0 8px; color: inherit; }
.hc-hero p { margin: 0; max-width: 980px; line-height: 1.6; opacity: .92; }
.hc-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.hc-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; color: var(--ink); text-decoration: none; display: grid; gap: 8px; align-content: start; }
.hc-card:hover { border-color: var(--accent); text-decoration: none; }
.hc-card h3 { margin: 0; font-size: 15px; } .hc-card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.hc-ic { width: 40px; height: 40px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.hc-ic .ic { width: 20px; height: 20px; }
@media (max-width: 1100px) { .hc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .hc-cards { grid-template-columns: minmax(0, 1fr); } .hc-hero { padding: 18px; } .hc-hero h2 { font-size: 18px; } }
.flow { display: grid; gap: 12px; }
.flow-lane { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: stretch; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.flow-lab { border-left: 4px solid var(--accent); padding-left: 10px; display: grid; align-content: center; gap: 2px; }
.flow-lab span { font-size: 12px; color: var(--muted); }
.flow-row { display: flex; align-items: center; gap: 0; overflow-x: auto; }
.flow-box { flex: 1 1 0; min-width: 130px; background: var(--surface); border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); border-radius: 6px; padding: 8px 10px; display: grid; gap: 2px; color: var(--ink); text-decoration: none; }
.flow-box:hover { border-color: var(--accent); text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.flow-box strong { font-size: 13px; } .flow-box span { font-size: 11.5px; color: var(--muted); }
.flow-box.is-off { opacity: .55; }
.flow-arrow { flex: 0 0 74px; position: relative; height: 2px; background: var(--line-strong); margin: 0 4px; }
.flow-arrow::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--line-strong); border-right: 0; }
.flow-arrow span { position: absolute; left: 0; right: 6px; top: -18px; text-align: center; font-size: 11px; color: var(--muted); white-space: nowrap; }
@media (max-width: 900px) {
  .flow-lane { grid-template-columns: minmax(0, 1fr); }
  .flow-row { flex-direction: column; align-items: stretch; }
  .flow-box { min-width: 0; }
  .flow-arrow { flex: 0 0 26px; width: 2px; height: 26px; margin: 2px auto; }
  .flow-arrow::after { right: -4px; top: auto; bottom: -1px; border: 5px solid transparent; border-top: 7px solid var(--line-strong); border-bottom: 0; }
  .flow-arrow span { left: 10px; top: 5px; text-align: left; }
}
.hc-journey > summary { cursor: pointer; font-weight: 600; display: flex; gap: 8px; align-items: center; list-style: none; }
.hc-journey > summary::-webkit-details-marker { display: none; }
.hc-journey > summary .ic { color: var(--accent); }
.hc-pending { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hc-pend { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; border-left: 4px solid var(--line-strong); }
.hc-pend.has-bad { border-left-color: var(--bad); } .hc-pend.has-warn { border-left-color: var(--warn); } .hc-pend.has-info { border-left-color: var(--info); }
.hp-n { font-size: 26px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.hc-pend.is-zero .hp-n { color: var(--muted); }
.hp-t { display: grid; gap: 2px; }
@media (max-width: 900px) { .hc-pending { grid-template-columns: minmax(0, 1fr); } }
.demo-steps { list-style: none; margin: 0; padding: 0; display: grid; }
.demo-steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.demo-steps li:last-child { border-bottom: 0; }
.ds-n { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.ds-say { margin-top: 4px; display: flex; gap: 6px; align-items: flex-start; color: var(--muted); font-style: italic; font-size: 13px; }
.ds-say .ic { flex: none; margin-top: 2px; }
.print-only { display: none; }
@media print {
  .hc-panel[hidden] { display: grid !important; }
  .print-only { display: block !important; }
  .hc-print-h { break-before: page; font-size: 16pt; margin: 0 0 4mm; }
  .hc-hero { background: none !important; color: #000 !important; border: 0.3mm solid #000; }
  .hc-journey { break-inside: avoid; } .hc-journey:not([open]) > .help-body { display: block; }
  .flow-arrow span { color: #000; }
}

/* Settings: header style options and favicon preview */
.ls-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ls-opt { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; cursor: pointer; background: var(--surface); }
.ls-opt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.ls-opt > input { position: absolute; opacity: 0; pointer-events: none; }
.ls-opt strong { display: block; }
.ls-demo { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 10px; border-radius: 5px; background: var(--hdr); color: var(--hdr-ink); overflow: hidden; }
.ls-demo .ls-t { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.ls-demo .ls-l { height: 30px; display: inline-flex; align-items: center; flex: none; max-width: 84px; }
.ls-demo .ls-l img { height: 100%; width: auto; max-width: 100%; object-fit: contain; display: block; }
.ls-demo .ls-l b { font-size: 9px; letter-spacing: .08em; padding: 0 6px; }
.ls-demo.ls-panel .ls-l { background: #fff; border-radius: 4px; padding: 3px 5px; color: #333; }
.ls-demo.ls-light { background: #fff; color: #1d2733; border: 1px solid var(--line); border-bottom: 3px solid var(--accent); }
.ls-demo.ls-plain .ls-l b { color: var(--hdr-ink); }
@media (max-width: 900px) { .ls-options { grid-template-columns: minmax(0, 1fr); } }
.fav-field { grid-template-columns: 300px minmax(0, 1fr); }
.fav-preview { width: 300px; max-width: 100%; display: grid; gap: 12px; justify-items: start; }
.fav-tab { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-3); border-radius: 8px 8px 0 0; padding: 8px 14px; font-size: 12.5px; min-width: 190px; border: 1px solid var(--line); border-bottom: 0; }
.fav-tab img { width: 16px; height: 16px; object-fit: contain; }
.fav-big { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; padding: 6px; background: #fff; }

/* Several units on the asset form, and the rooms & serial numbers grid */
.card-inset { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--surface-2); padding: 14px; display: grid; gap: 12px; }
.units-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.units-tools .inline { display: flex; gap: 8px; align-items: flex-start; }
.units-tools .inline input, .units-tools .inline textarea { flex: 1; min-width: 0; }
.units-tools textarea { min-height: 38px; resize: vertical; }
.units-tbl td { padding-top: 4px; padding-bottom: 4px; }
.units-tbl select, .units-tbl input { width: 100%; }
.units-tbl { max-height: none; }
.field.is-off { opacity: .55; }
@media (max-width: 800px) { .units-tools { grid-template-columns: minmax(0, 1fr); } }

/* ===================================================================== Interactive reports (filter, sort, chart, print view) */
.rpt-params { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.rpt-params .field { min-width: 160px; flex: 0 1 200px; }
.rpt-paperbar, .rpt-chartbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; }
.rpt-paperbar[hidden], .rpt-chartbar[hidden], .rpt-hint[hidden], .rpt-chart[hidden] { display: none; }
.rpt-chartbar { border-left: 3px solid var(--accent); }
.rpt-pb-end { margin-left: auto; display: flex; gap: 8px; }
.rpt-ctl { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; margin: 0; }
.rpt-ctl select { width: auto; min-height: 30px; height: 30px; padding: 0 26px 0 8px; font-size: 13px; color: var(--ink); font-weight: 400; }
.rpt-ctl.check { color: var(--ink); font-weight: 400; align-items: center; }
.rpt-ctl.check input { margin: 0; }
.rpt-cols { position: relative; }
.rpt-cols-pop { left: 0; right: auto; min-width: 230px; max-height: 360px; overflow: auto; padding-bottom: 6px; z-index: 40; }
.rpt-cols-pop .check { padding: 5px 14px; cursor: pointer; }
.rpt-cols-pop .check:hover { background: var(--surface-3); }
.btn-excel { color: #107c41; border-color: color-mix(in srgb, #107c41 45%, var(--line-strong)); }
.btn-excel:hover { background: color-mix(in srgb, #107c41 10%, var(--surface)); }
.rpt-hint { margin: 0; }
.rpt-sheet { display: grid; gap: 12px; }
.rpt-letterhead, .rpt-printed { display: none; }
.rpt-title { display: none; }
.rpt-topbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.rpt-q { position: relative; flex: 0 1 320px; min-width: 200px; }
.rpt-q .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 14px; height: 14px; }
.rpt-q input { padding-left: 32px; width: 100%; }
.rpt-chart { position: relative; height: 340px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: var(--surface); }
.rpt-wrap { max-height: 70vh; overflow: auto; }
.rpt-tbl thead tr:first-child th { position: sticky; top: 0; z-index: 2; }
.rpt-tbl thead tr.rpt-frow th { position: sticky; top: 37px; z-index: 2; padding: 4px 6px; background: var(--surface-2); }
.rpt-frow input { height: 28px; min-height: 28px; font-size: 12px; padding: 0 6px; width: 100%; min-width: 60px; font-weight: 400; }
.rpt-th { cursor: pointer; user-select: none; }
.rpt-th:hover { color: var(--ink); }
.rpt-th.num { text-align: right; }
.rpt-sort { display: inline-block; width: 0; height: 0; margin-left: 6px; vertical-align: middle; border: 4px solid transparent; border-top-color: var(--line-strong); border-bottom: 0; opacity: .6; }
.rpt-th.is-asc .rpt-sort, .rpt-th.is-desc .rpt-sort { opacity: 1; border-top-color: var(--accent); }
.rpt-th.is-asc .rpt-sort { border-top: 0; border-bottom: 4px solid var(--accent); }
.rpt-th.is-asc, .rpt-th.is-desc { color: var(--ink); }
.rpt-tbl td.empty { text-align: center; color: var(--muted); padding: 24px; }
.rpt-tbl tfoot td { position: sticky; bottom: 0; }

/* Print view on screen: a paper sheet on a grey desk */
body.rpt-paper .nav, body.rpt-paper .page-head, body.rpt-paper .rpt-params, body.rpt-paper .content > section, body.rpt-paper .flash, body.rpt-paper .rpt-topbar .btn { display: none !important; }
body.rpt-paper .main { margin-left: 0; }
body.rpt-paper .content { max-width: none; background: var(--surface-3); min-height: calc(100vh - var(--hdr-h)); }
body.rpt-paper .rpt-paperbar { position: sticky; top: calc(var(--hdr-h) + 6px); z-index: 20; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
body.rpt-paper .rpt-stage { overflow-x: auto; padding: 4px 0 24px; }
body.rpt-paper .rpt-sheet { width: var(--sheet-w, 297mm); max-width: none; margin: 0 auto; padding: 12mm 10mm; background: #fff; color: #1d2733; border: 0; box-shadow: 0 2px 16px rgba(0,0,0,.18); border-radius: 2px;
  --ink: #1d2733; --muted: #5d6b7a; --line: #dde2e8; --line-strong: #c3ccd6; --surface: #fff; --surface-2: #f4f6f8; --surface-3: #eef1f5; --accent-soft: #eef4fb; }
body.rpt-paper .rpt-letterhead { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid var(--accent); padding-bottom: 8px; }
body.rpt-paper .rpt-letterhead img { height: 48px; width: auto; max-width: 160px; object-fit: contain; }
.rl-name { font-size: 18px; font-weight: 700; } .rl-sub { font-size: 12px; color: var(--muted); }
body.rpt-paper .rpt-title { display: block; text-align: center; }
.rpt-title h2 { font-size: 16px; text-transform: uppercase; letter-spacing: .05em; margin: 0; }
.rpt-note { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.rpt-filters-note { font-size: 12px; color: var(--muted); font-style: italic; }
body.rpt-paper .rpt-printed { display: block; text-align: right; }
body.rpt-paper .rpt-wrap { max-height: none; overflow: visible; border: 0; }
body.rpt-paper.rpt-fit .rpt-tbl { width: 100%; table-layout: auto; }
body.rpt-paper.rpt-fit .rpt-tbl td { white-space: normal; overflow-wrap: anywhere; }
body.rpt-paper.rpt-fit .rpt-tbl th { white-space: normal; }
body.rpt-paper.rpt-fit .rpt-frow input { min-width: 0; }
.rpt-tbl td.num, .rpt-tbl td.nw { white-space: nowrap !important; overflow-wrap: normal !important; }
body.rpt-paper:not(.rpt-fit) .rpt-wrap { overflow-x: auto; }
body.rpt-paper .rpt-tbl thead tr th, body.rpt-paper .rpt-tbl tfoot td { position: static; }
body.rpt-paper .rpt-tbl td, body.rpt-paper .rpt-tbl th { border: 1px solid var(--line); padding: 4px 6px; }
body.rpt-paper .rpt-tbl tbody tr:hover td { background: inherit; }
body.rpt-paper .rpt-tbl a { color: inherit; }
body.rpt-t-s .rpt-tbl { font-size: 10.5px; } body.rpt-t-n .rpt-tbl { font-size: 12px; } body.rpt-t-l .rpt-tbl { font-size: 14px; }
body.rpt-paper.rpt-t-s .rpt-tbl th { font-size: 10px; } body.rpt-paper.rpt-t-l .rpt-tbl th { font-size: 13px; }
body.rpt-paper .rpt-chart { border-color: var(--line); background: #fff; height: 300px; }
@media (max-width: 900px) { .rpt-q { flex: 1 1 100%; } .rpt-chart { height: 280px; } body.rpt-paper .rpt-sheet { padding: 8mm 6mm; } }

@media print {
  body:has(.rpt-sheet) .print-head, .rpt-paperbar, .rpt-chartbar, .rpt-hint, .rpt-topbar, .rpt-params { display: none !important; }
  body.rpt-paper .content { background: #fff; padding: 0; min-height: 0; }
  body.rpt-paper .rpt-stage { overflow: visible; padding: 0; }
  body.rpt-paper .rpt-sheet { width: auto; padding: 0; box-shadow: none; margin: 0; }
  .rpt-letterhead { display: flex !important; gap: 12px; align-items: center; border-bottom: 2px solid #000; padding-bottom: 6px; }
  .rpt-letterhead img { height: 44px; width: auto; max-width: 160px; object-fit: contain; }
  .rpt-title, .rpt-printed { display: block !important; }
  .rpt-title { text-align: center; }
  .rpt-wrap { max-height: none !important; overflow: visible !important; }
  .rpt-frow { display: none; }
  .rpt-tbl thead { display: table-header-group; } .rpt-tbl tfoot { display: table-row-group; }
  .rpt-tbl tr { break-inside: avoid; }
  .rpt-tbl td, .rpt-tbl th { border: 0.2mm solid #999 !important; padding: 1.2mm 1.6mm !important; background: none !important; color: #000 !important; position: static !important; }
  .rpt-tbl thead th { background: #eee !important; }
  .rpt-sort { display: none; }
  .rpt-chart { break-inside: avoid; border: 0 !important; height: 260px !important; }
  .rpt-chart { height: auto !important; text-align: center; }
  .rpt-chart canvas { max-width: 100% !important; height: auto !important; }
  body.rpt-chart-only .rpt-wrap, body.rpt-chart-only .rpt-printed ~ *, body.rpt-chart-only .rpt-filters-note { display: none !important; }
  body.rpt-chart-only .rpt-chart { height: 150mm !important; }
}
.rpt-group { gap: 10px; }
.rpt-group-h { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 4px 0 0; }
.rpt-card { color: inherit; display: grid; gap: 6px; text-decoration: none; align-content: start; border-top: 3px solid var(--accent); transition: box-shadow .15s, transform .15s; }
.rpt-card:hover { text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-1px); }
.rpt-card h3 { font-size: 15px; margin: 0; color: var(--ink); }
.rpt-card-go { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-size: 13px; font-weight: 600; margin-top: 4px; }

/* Rooms + units per room + Fill rooms */
.u-rooms { display: grid; grid-template-columns: minmax(0, 1fr) 130px auto; gap: 4px 8px; align-items: end; }
.u-rooms .field { gap: 4px; }
.u-rooms-hint { grid-column: 1 / -1; }
.u-per { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.u-per:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.u-per input { border: 0; border-radius: 0; min-width: 0; flex: 1; text-align: center; font-weight: 600; box-shadow: none; outline: 0; -moz-appearance: textfield; }
.u-per input::-webkit-inner-spin-button { opacity: 1; }
.u-per.is-locked input { background: var(--surface-2); color: var(--muted); cursor: default; }
.u-per.is-locked input::-webkit-inner-spin-button { display: none; }
.u-per-edit { border: 0; border-left: 1px solid var(--line); background: var(--surface-2); color: var(--accent); width: 34px; flex: none; cursor: pointer; display: grid; place-items: center; }
.u-per-edit:hover { background: var(--accent-soft); }
.u-per:not(.is-locked) .u-per-edit { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 640px) { .u-rooms { grid-template-columns: minmax(0, 1fr) 110px; } .u-rooms > .btn { grid-column: 1 / -1; } }
.u-per .i-done { display: none; } .u-per:not(.is-locked) .i-done { display: block; } .u-per:not(.is-locked) .i-edit { display: none; }
