/* Hotel owner dashboard: white surfaces, one green accent, thin borders, 8 px grid. */
:root {
  --bg: #f6f7f8; --card: #fff; --line: #e6e8eb; --text: #14181f; --muted: #6b7280;
  --accent: #17603f; --accent-soft: #e7f3ec; --warn: #b45309; --warn-soft: #fef3e2; --danger: #b42318; --danger-soft: #fdecea;
  --radius: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 Inter, "Segoe UI", system-ui, -apple-system, sans-serif; }
[hidden] { display: none !important; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 20px; margin: 0; font-weight: 650; }
h3 { font-size: 15px; margin: 24px 0 8px; font-weight: 650; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error { color: var(--danger); min-height: 20px; margin: 8px 0 0; }
svg.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* Controls */
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label { display: block; font-weight: 550; font-size: 13px; margin-bottom: 16px; }
label input, label select, label textarea { margin-top: 6px; font-weight: 400; font-size: 14px; }
label i { color: var(--danger); font-style: normal; }
.field-title { font-weight: 550; font-size: 13px; margin-bottom: 6px; }
.field-title .muted { font-weight: 400; display: block; }
.counter { float: right; font-weight: 400; color: var(--muted); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; font-weight: 550; white-space: nowrap; text-decoration: none; }
.btn:hover { background: #f3f4f6; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #114a31; }
.btn.danger { color: var(--danger); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.wide { width: 100%; justify-content: center; padding: 10px; }
.btn:disabled { opacity: .55; cursor: default; }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-weight: 550; }
.icon-btn { background: none; border: 0; cursor: pointer; font-size: 16px; padding: 4px 8px; border-radius: var(--radius); }
.icon-btn:hover { background: #f3f4f6; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline input, .inline select { width: auto; flex: 1 1 140px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two.top-align { align-items: start; }
.gap { margin-top: 16px; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* Switch */
.switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #d1d5db; transition: background .15s; pointer-events: none; }
.switch span:after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span:after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Pills */
.pill { display: inline-block; padding: 1px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #eef0f2; color: #4b5563; white-space: nowrap; }
.pill.ok { background: var(--accent-soft); color: var(--accent); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; margin-right: 6px; }
.dot.on { background: #16a34a; }

/* Sign in */
.login { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 360px; max-width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 32px; text-align: center; }
.login-card label { text-align: left; }
.login-card .brand-mark { margin: 0 auto 12px; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-mark svg.ico { width: 24px; height: 24px; }

/* Shell */
.app { display: flex; min-height: 100%; }
.side { width: 232px; flex-shrink: 0; background: var(--card); border-right: 1px solid var(--line); padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 20px; }
.brand b { display: block; font-size: 14px; line-height: 1.25; }
.brand span { color: var(--muted); font-size: 12px; }
.side nav button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; border: 0; background: none; border-radius: var(--radius); cursor: pointer; text-align: left; color: #374151; font-weight: 500; margin-bottom: 2px; }
.side nav button:hover { background: #f3f4f6; }
.side nav button.on { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.side nav .n { margin-left: auto; background: var(--danger); color: #fff; border-radius: 99px; font-size: 11px; min-width: 18px; padding: 0 5px; text-align: center; line-height: 18px; }
.main { flex: 1; min-width: 0; }
.top { display: flex; align-items: center; gap: 16px; padding: 12px 32px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.search { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 12px; color: var(--muted); }
.search input { border: 0; padding: 8px 0; color: var(--text); }
.search input:focus { outline: 0; }
.search:focus-within { outline: 2px solid var(--accent); }
.who { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); }
main { padding: 24px 32px 64px; max-width: 1280px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.head .muted { margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.card > h3:first-child { margin-top: 0; }
.cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }

/* Today */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.stat .ico { color: var(--accent); width: 22px; height: 22px; }
.stat span { display: block; color: var(--muted); font-size: 13px; margin-top: 8px; }
.stat b { font-size: 28px; line-height: 1.2; font-weight: 700; }
.rowlink { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 4px; border: 0; border-top: 1px solid var(--line); background: none; cursor: pointer; text-align: left; }
.rowlink:first-of-type { border-top: 0; }
.rowlink:hover { background: #fafafa; }
.rowlink .ico { color: var(--warn); }
.rowlink b { display: block; }
.rowlink .go { margin-left: auto; color: var(--muted); }
.occ { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.occ:first-of-type { border-top: 0; }
.occ .ico { color: var(--warn); width: 24px; height: 24px; }
.empty { color: var(--muted); padding: 12px 0; margin: 0; }

/* Rooms */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { padding: 4px 12px; border: 1px solid var(--line); border-radius: 99px; background: #fff; cursor: pointer; font-weight: 550; font-size: 13px; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.room { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.room-top { display: flex; justify-content: space-between; align-items: center; }
.room-no { font-size: 18px; font-weight: 700; }
.room-guest { font-weight: 600; min-height: 21px; overflow-wrap: anywhere; }
.room-line { color: var(--muted); font-size: 13px; min-height: 20px; }
.room-foot { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.add-room { display: flex; gap: 8px; }
.add-room input { width: 140px; }

/* Tables and lists */
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fafafa; }
td { padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.right, th.right { text-align: right; }
td .btn + .btn { margin-left: 6px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 8px 14px; cursor: pointer; font-weight: 550; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }

/* Promotions */
.promo { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.promo-img { height: 130px; background: #eef0f2 center/cover; display: flex; align-items: center; justify-content: center; color: #9ca3af; }
.promo-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.promo-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; }

/* Hotel information */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; max-width: 760px; }
.list-row { display: grid; gap: 8px; margin-bottom: 8px; align-items: center; }
.list-row input { min-width: 0; }
.thumb { width: 56px; height: 40px; border: 1px dashed #c7ccd3; border-radius: 6px; background: #fafafa center/cover; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); font-size: 11px; position: relative; flex-shrink: 0; }
.thumb.has { border-style: solid; }
.thumb.big { width: 160px; height: 96px; }
.thumb input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; padding: 0; }
.upload { display: flex; align-items: center; gap: 10px; }
.sticky-save { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 12px; align-items: center; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 30%); margin-top: 16px; }
input[type=color] { height: 38px; padding: 3px; }

/* Setup guide */
.progress { height: 6px; border-radius: 99px; background: #e5e7eb; overflow: hidden; margin-bottom: 20px; }
.progress i { display: block; height: 100%; background: var(--accent); }
.step { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 12px; }
.step-no { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid #c7ccd3; display: flex; align-items: center; justify-content: center; font-weight: 650; font-size: 13px; flex-shrink: 0; }
.step.done .step-no { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-body { flex: 1; }
.step-body ol { margin: 6px 0 0; padding-left: 20px; color: var(--muted); }
.step .btn { flex-shrink: 0; }

/* Settings */
.setting { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.setting:first-of-type { border-top: 0; }
.setting div { flex: 1; }
.setting .muted { display: block; font-size: 12px; }
.qrs { display: flex; gap: 20px; flex-wrap: wrap; }
.qr { text-align: center; font-size: 12px; font-weight: 600; }
.qr canvas { width: 112px; height: 112px; border: 1px solid var(--line); border-radius: 6px; display: block; margin-bottom: 6px; image-rendering: pixelated; }
.qr .none { width: 112px; height: 112px; border: 1px dashed #c7ccd3; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 400; margin-bottom: 6px; padding: 8px; }

/* Check-in panel */
.shade { position: fixed; inset: 0; background: rgba(17, 24, 39, .35); z-index: 20; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: 640px; max-width: 100%; background: var(--card); z-index: 21; padding: 24px 28px; overflow-y: auto; box-shadow: -1px 0 0 var(--line); animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.person { display: grid; grid-template-columns: 2fr .8fr 1.4fr auto; gap: 8px; margin-bottom: 8px; }
.tv-preview { border-radius: var(--radius); padding: 14px 16px; min-height: 190px; color: #fff; background: linear-gradient(160deg, #141a3a 0%, #3b2a55 60%, #7a4a52 100%); font-size: 12px; }
.tvp-head { display: flex; align-items: center; gap: 6px; color: #f2b93b; font-size: 11px; margin-bottom: 14px; }
.tvp-head .ico { width: 14px; height: 14px; }
.tvp-eyebrow { color: #f2b93b; letter-spacing: .12em; text-transform: uppercase; font-size: 10px; }
.tvp-name { font: 700 24px/1.2 Georgia, "Times New Roman", serif; color: #fbe9c0; overflow-wrap: anywhere; }
.tvp-note { margin-top: 8px; opacity: .9; }
.tvp-occ { margin-top: 10px; color: #f2b93b; font: italic 700 15px Georgia, serif; }

dialog { border: 1px solid var(--line); border-radius: 12px; padding: 24px; width: 520px; max-width: calc(100% - 32px); }
dialog::backdrop { background: rgba(17, 24, 39, .35); }
dialog h2 { margin-bottom: 12px; }
.found { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-top: 8px; }
.found div { flex: 1 1 160px; }
.found select { width: auto; }
.code { font-size: 18px; font-weight: 700; letter-spacing: .08em; }
#foundTvs { margin: 12px 0; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #14181f; color: #fff; padding: 10px 18px; border-radius: var(--radius); opacity: 0; pointer-events: none; transition: all .2s; z-index: 50; max-width: 90%; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--danger); }

@media (max-width: 980px) {
  .side { width: 64px; padding: 12px 8px; }
  .brand div:last-child, .side nav button span.t { display: none; }
  .side nav button { justify-content: center; padding: 10px; }
  .side nav .n { position: absolute; margin: -18px 0 0 22px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cols, .two, .form-grid { grid-template-columns: 1fr; }
  main, .top { padding-left: 16px; padding-right: 16px; }
  .who { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Second design pass: gold mark, sign-in scene, label-left rows, TV preview apps ---------- */
.brand-mark { background: none; color: #b8892b; border-radius: 0; }
.brand-mark svg.ico { width: 30px; height: 30px; }
.brand b { font-size: 14px; }
.side nav button.on { border-radius: 999px; }

.login { position: relative; background: linear-gradient(#f7f8f7 0%, #eef3ef 55%, #dfe9e2 100%); overflow: hidden; }
.login:before, .login:after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -60px; height: 240px; border-radius: 50% 50% 0 0 / 100% 100% 0 0; background: #cfdcd3; }
.login:after { left: 35%; right: -30%; bottom: -90px; height: 260px; background: #bccdc2; }
.login-card { position: relative; z-index: 1; width: 460px; box-shadow: 0 10px 40px rgba(20, 40, 30, .08); }
.login-card h1 { margin: 0; font-size: 20px; }
.login-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin-top: 18px; }
@media (max-width: 520px) { .login-fields { grid-template-columns: 1fr; } }

.form-rows { max-width: 640px; }
.form-rows label { display: grid; grid-template-columns: 210px minmax(0, 1fr); align-items: center; gap: 12px; margin-bottom: 12px; }
.form-rows label input { margin-top: 0; }
@media (max-width: 700px) { .form-rows label { grid-template-columns: 1fr; gap: 4px; } }

.tv-preview { position: relative; min-height: 210px; background: linear-gradient(160deg, #10183a 0%, #2c2a5a 45%, #8a5a4e 80%, #d49a5a 100%); }
.tvp-apps { display: flex; gap: 5px; margin-top: 14px; }
.tvp-apps span { font-size: 8px; font-weight: 700; padding: 3px 6px; border-radius: 3px; background: rgba(255, 255, 255, .92); color: #222; }
.tvp-apps span:nth-child(2) { color: #d00; } .tvp-apps span:nth-child(3) { background: #111; color: #e50914; } .tvp-apps span:nth-child(4) { background: #1a73e8; color: #fff; }
.rowlink .ico { padding: 6px; width: 32px; height: 32px; border-radius: 50%; background: var(--warn-soft); color: var(--warn); }
.occ .ico { color: #b8892b; }

/* ---------- Compact room cards with a "more" menu ---------- */
.grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.room { padding: 12px 14px; gap: 2px; }
.room-no { font-size: 16px; }
.room-guest { font-size: 14px; }
.room-line { font-size: 12px; min-height: 18px; }
.room-foot { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); flex-wrap: nowrap; align-items: center; }
.room-foot .btn.small { padding: 3px 8px; font-size: 12px; white-space: nowrap; }
.more { position: relative; margin-left: auto; }
.more summary { list-style: none; cursor: pointer; letter-spacing: 1px; }
.more summary::-webkit-details-marker { display: none; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; min-width: 170px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 7px 10px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.menu button:hover { background: #f3f4f6; }
.menu button.danger { color: var(--danger); }

/* ---------- TV theme picker ---------- */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 8px 0 20px; max-width: 820px; }
.theme { text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 8px; cursor: pointer; font: inherit; }
.theme[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.theme-art { height: 96px; border-radius: 6px; padding: 12px; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.theme-art span { font-size: 8px; letter-spacing: .14em; font-weight: 700; }
.theme-art b { font: 700 17px/1.1 Georgia, "Times New Roman", serif; }
.theme-art i { width: 34px; height: 3px; border-radius: 2px; margin-top: 5px; }
.theme-name { font-weight: 650; margin-top: 8px; }
