/* Hospitality Web Client – styles (ported from the Android "Grid" theme) */
:root {
  --bg: #0f1c33;
  --bg-2: #060e1b;
  --card: rgba(32, 42, 53, .72);
  --card-focus: rgba(32, 42, 53, .9);
  --stroke: rgba(90, 103, 117, .25);
  --focus: #ffc300;
  --focus-soft: rgba(111, 90, 50, .5);
  --text: #ffffff;
  --muted: #b9c2cf;
  --accent: #3f8ee6;
  --danger: #e05656;
  --ok: #3ec27a;
  --radius: 10px;
  --pad: clamp(12px, 2vw, 32px);
  --fs: clamp(14px, 1.15vw, 22px);
}
[data-theme="dark"] { --bg: #000; --bg-2: #000; --card: rgba(20,20,20,.8); --card-focus: rgba(30,30,30,.95); }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg-2);
  color: var(--text);
  font: var(--fs)/1.4 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
a { color: inherit; }
[v-cloak] { display: none; }
:focus { outline: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 4px; }

/* ---------- app shell ---------- */
#app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.bg { position: absolute; inset: 0; background: var(--bg) center/cover no-repeat; z-index: 0; transition: background-image .4s; }
.bg::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.78); }
.topbar {
  position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--pad) * .6) var(--pad); min-height: 64px;
}
.topbar .left { display: flex; align-items: center; gap: 14px; }
.topbar .logo { height: clamp(34px, 3.4vw, 60px); width: auto; object-fit: contain; }
.topbar .sep { width: 1px; height: 36px; background: rgba(255,255,255,.3); }
.topbar .clock { font-size: 1.9em; font-weight: 300; letter-spacing: 1px; }
.topbar .date { line-height: 1.15; color: var(--muted); font-size: .9em; }
.topbar .right { text-align: right; }
.topbar .home-btn { margin-left: auto; margin-right: 24px; }
.topbar .title { font-size: 1.4em; font-weight: 600; }
.topbar .sub { color: var(--muted); font-size: .85em; }
.topbar .net { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); margin-left: 8px; vertical-align: middle; }
.topbar .net.off { background: var(--danger); }

.main { position: relative; z-index: 1; flex: 1; overflow: auto; padding: 0 var(--pad) var(--pad); scroll-behavior: smooth; }
.hidden { display: none !important; }

/* ---------- focusable "cards" ---------- */
.focusable { transition: transform .15s, box-shadow .15s, border-color .15s; border: 2px solid var(--stroke); cursor: pointer; }
.focusable:focus, .focusable:hover { border-color: var(--focus); background: var(--card-focus); transform: scale(1.04); box-shadow: 0 6px 24px rgba(0,0,0,.5); z-index: 1; }
.focusable:focus { border-color: var(--focus); }

/* ---------- home greeting + grid ---------- */
.greeting { text-align: center; margin: 2vh 0 3vh; }
.greeting h1 { margin: 0; font-weight: 400; font-size: 2.2em; }
.greeting p { margin: 4px 0 0; color: var(--muted); font-size: 1.1em; }
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
.tile {
  background: var(--card); border-radius: var(--radius); padding: 18px 12px; min-height: 130px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
}
.tile.big { grid-column: span 2; min-height: 170px; }
.tile img { width: clamp(44px, 4.2vw, 80px); height: clamp(44px, 4.2vw, 80px); object-fit: contain; }
.tile .name { font-weight: 600; font-size: 1.05em; }
.tile .desc { color: var(--muted); font-size: .8em; }

/* ---------- rows of cards (Leanback style) ---------- */
.row { margin-top: 22px; }
.row h2 { font-size: 1.15em; font-weight: 500; margin: 0 0 10px; color: var(--muted); letter-spacing: .5px; text-transform: uppercase; }
.row .cards { display: flex; gap: 16px; overflow-x: auto; overflow-y: hidden; padding: 8px 6px 14px; scroll-behavior: smooth; }
.card {
  flex: 0 0 auto; width: clamp(170px, 15vw, 260px); background: var(--card); border-radius: var(--radius); overflow: hidden;
}
.card .img { width: 100%; aspect-ratio: 16/10; background: #1a2a44 center/cover no-repeat; display: flex; align-items: center; justify-content: center; }
.card .img.icon { background-size: 45%; }
.card .img img { width: 100%; height: 100%; object-fit: cover; }
.card .img.contain img { object-fit: contain; padding: 18%; }
.card .img.fit img { object-fit: contain; }
.card .body { padding: 10px 12px 12px; }
.card .t { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
.card .d { color: var(--muted); font-size: .82em; margin-top: 3px; max-height: 3.6em; overflow: hidden; white-space: pre-line; }
.card .price { color: var(--focus); font-weight: 600; margin-top: 4px; }
.card .badge { position: absolute; top: 8px; right: 8px; background: var(--focus); color: #000; border-radius: 12px; padding: 1px 9px; font-weight: 700; font-size: .85em; }
.card { position: relative; }
.card.wide { width: clamp(220px, 20vw, 340px); }

.empty { color: var(--muted); padding: 24px 6px; }
.loader { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 24px 6px; }
.spinner { width: 22px; height: 22px; border: 3px solid rgba(255,255,255,.25); border-top-color: var(--focus); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.errbox { background: rgba(224,86,86,.15); border: 1px solid var(--danger); border-radius: var(--radius); padding: 14px 16px; margin: 16px 0; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

/* ---------- buttons / forms ---------- */
.btn {
  background: var(--card); border: 2px solid var(--stroke); border-radius: 8px; padding: 10px 22px; cursor: pointer; color: var(--text);
  transition: transform .12s, border-color .12s, background .12s; font-weight: 500; min-width: 110px;
}
.btn:focus, .btn:hover { border-color: var(--focus); transform: scale(1.04); background: var(--card-focus); }
.btn.primary { background: var(--accent); border-color: var(--accent); }
.btn.primary:focus, .btn.primary:hover { border-color: var(--focus); }
.btn.danger { background: rgba(224,86,86,.35); }
.btn.small { padding: 6px 14px; min-width: 0; }
.btn.round { width: 52px; height: 52px; min-width: 0; padding: 0; font-size: 1.6em; border-radius: 50%; }
.btn[disabled] { opacity: .45; cursor: default; transform: none; }
.actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.field { margin: 12px 0; }
.field label { display: block; color: var(--muted); font-size: .85em; margin-bottom: 4px; }
.input, textarea.input, select.input {
  width: 100%; background: rgba(0,0,0,.35); border: 2px solid var(--stroke); border-radius: 8px; padding: 10px 12px; color: var(--text);
}
.input:focus { border-color: var(--focus); }
textarea.input { min-height: 90px; resize: vertical; }
select.input option { color: #000; }
input[type=date].input, input[type=time].input { color-scheme: dark; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { background: var(--card); border: 2px solid var(--stroke); border-radius: 20px; padding: 8px 18px; cursor: pointer; }
.chip:focus, .chip:hover { border-color: var(--focus); }
.chip.on { background: var(--accent); border-color: var(--accent); }
.chip.past { opacity: .45; text-decoration: line-through; }
.hint { color: var(--muted); font-size: .85em; }

/* ---------- dialogs ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.65); display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(3px); }
.dialog {
  background: #142238; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; width: min(760px, 96vw); max-height: 92vh;
  display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.6); animation: pop .18s ease-out;
}
.dialog.wide { width: min(1200px, 96vw); }
.dialog.narrow { width: min(480px, 96vw); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.dialog header { padding: 18px 24px 10px; font-size: 1.3em; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog header small { color: var(--muted); font-size: .7em; font-weight: 400; }
.dialog .content { padding: 6px 24px 18px; overflow: auto; }
.dialog footer { padding: 10px 24px 18px; display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.info-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 22px; }
@media (max-width: 760px) { .info-layout { grid-template-columns: 1fr; } }
.info-layout .poster { width: 100%; border-radius: 10px; object-fit: cover; max-height: 50vh; }
.info-layout .times { display: flex; gap: 20px; margin: 10px 0; color: var(--muted); }
.info-layout .times b { color: var(--text); }
.htmltext { line-height: 1.55; }
.htmltext font { color: inherit !important; }
.list { display: flex; flex-direction: column; gap: 10px; }
.list .item { background: var(--card); border-radius: 10px; padding: 12px 16px; display: flex; gap: 14px; align-items: center; }
.list .item.focusable { border-width: 2px; }
.list .item .grow { flex: 1; min-width: 0; }
.list .item .meta { color: var(--muted); font-size: .85em; }
.list .item .num { font-weight: 700; font-size: 1.1em; color: var(--focus); }
.status { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: .78em; background: rgba(255,255,255,.12); text-transform: uppercase; letter-spacing: .5px; }
.status.new { background: rgba(63,142,230,.4); } .status.confirmed, .status.done, .status.completed, .status.delivered { background: rgba(62,194,122,.4); }
.status.canceled, .status.cancelled, .status.rejected { background: rgba(224,86,86,.4); }
.qty { display: flex; align-items: center; justify-content: center; gap: 22px; font-size: 1.8em; margin: 10px 0 6px; }
.stars { display: flex; gap: 6px; }
.star { font-size: 1.7em; cursor: pointer; color: rgba(255,255,255,.3); border-radius: 6px; padding: 0 3px; line-height: 1; }
.star.on { color: var(--focus); }
.star:focus { outline: 2px solid var(--focus); }
.question { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.total-line { display: flex; justify-content: space-between; font-size: 1.15em; font-weight: 600; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.15); }
.pin { font-size: 2em; letter-spacing: 12px; text-align: center; }

/* ---------- splash ---------- */
.splash { position: fixed; inset: 0; z-index: 40; background: #000; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.splash video, .splash .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.splash .cover { background: center/cover no-repeat; }
.splash .shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.1) 60%); }
.splash .logo { position: absolute; top: 4vh; left: 4vw; height: 12vh; object-fit: contain; }
.splash .msg { position: relative; text-align: center; padding: 0 5vw 9vh; max-width: 1100px; }
.splash .msg h1 { font-size: 2.4em; font-weight: 300; margin: 0 0 8px; }
.splash .msg p { font-size: 1.3em; color: #e8e8e8; margin: 0; }
.splash .msg .press { margin-top: 26px; color: var(--muted); animation: blink 1.6s infinite; font-size: .95em; }
@keyframes blink { 50% { opacity: .35; } }
.splash .btn { position: relative; margin-bottom: 4vh; }

/* ---------- boot / toast ---------- */
.boot { position: fixed; inset: 0; z-index: 60; background: var(--bg-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.boot img { height: 20vh; object-fit: contain; }
.boot .bar { width: 260px; height: 4px; background: rgba(255,255,255,.15); border-radius: 2px; overflow: hidden; }
.boot .bar i { display: block; height: 100%; width: 40%; background: var(--focus); animation: slide 1.2s infinite ease-in-out; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.boot .ver { position: absolute; bottom: 14px; right: 18px; color: var(--muted); font-size: .8em; }
.toast {
  position: fixed; bottom: 4vh; left: 50%; transform: translateX(-50%); z-index: 70; background: rgba(20,34,56,.96); border: 1px solid rgba(255,255,255,.15);
  padding: 14px 26px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.6); max-width: 90vw; animation: pop .18s ease-out;
}
.toast.error { border-color: var(--danger); }
.toast.success { border-color: var(--ok); }

/* ---------- settings ---------- */
.settings { max-width: 820px; }
.settings .box { background: var(--card); border-radius: var(--radius); padding: 18px 22px; margin-top: 18px; }
.settings .box h3 { margin: 0 0 8px; font-weight: 500; color: var(--muted); text-transform: uppercase; font-size: .9em; letter-spacing: .5px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; }
.kv span:nth-child(odd) { color: var(--muted); }

/* ---------- vod player ---------- */
.player { position: fixed; inset: 0; z-index: 55; background: #000; display: flex; align-items: center; justify-content: center; }
.player video { width: 100%; height: 100%; }
.player .close { position: absolute; top: 20px; right: 20px; }
.movie-layout { display: grid; grid-template-columns: 240px 1fr; gap: 22px; }
.movie-layout img { width: 100%; border-radius: 10px; }
@media (max-width: 640px) { .movie-layout { grid-template-columns: 1fr; } }

/* ---------- weather ---------- */
.topbar .wx { display: flex; align-items: center; gap: 8px; margin-left: 18px; padding: 4px 12px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; }
.topbar .wx:focus, .topbar .wx:hover { border-color: var(--focus); }
.topbar .wx img { width: 34px; height: 34px; }
.topbar .wx .temp { font-size: 1.4em; font-weight: 300; }
.topbar .wx .city { color: var(--muted); font-size: .8em; }
.wx-now { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.wx-now img { width: 96px; height: 96px; }
.wx-now .big { font-size: 3.2em; font-weight: 300; line-height: 1; }
.wx-now .desc { font-size: 1.1em; margin-top: 4px; }
.wx-now .meta { color: var(--muted); font-size: .9em; margin-top: 6px; }
.wx-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 20px; }
.wx-day { background: var(--card); border-radius: 10px; padding: 10px 4px; text-align: center; font-size: .85em; }
.wx-day img { width: 40px; height: 40px; margin: 4px 0; }
.wx-day .dn { font-weight: 600; text-transform: capitalize; }
.wx-day .mm { color: var(--muted); }
.wx-day .mm b { color: var(--text); }
.wx-search { display: flex; gap: 10px; margin-top: 20px; }
.wx-search .input { flex: 1; }
.card .img.wx-card { flex-direction: column; gap: 4px; }
.card .img.wx-card img { width: 46%; height: auto; object-fit: contain; }
.card .img.wx-card .t2 { font-size: 1.6em; font-weight: 300; }
@media (max-width: 760px) { .wx-days { grid-template-columns: repeat(4, 1fr); } .topbar .wx .city { display: none; } }

/* ---------- language list ---------- */
.lang-item { cursor: pointer; }
.lang-item.on { border-color: var(--accent); background: rgba(63,142,230,.18); }
.lang-item .flag { font-size: 1.7em; width: 44px; text-align: center; }
.lang-item .check { color: var(--focus); font-size: 1.4em; font-weight: 700; }

/* ---------- bill ---------- */
.bill { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .95em; }
.bill th, .bill td { padding: 8px 10px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.1); vertical-align: top; }
.bill th { color: var(--muted); font-weight: 500; font-size: .85em; text-transform: uppercase; letter-spacing: .5px; }
.bill .num { text-align: right; white-space: nowrap; }
.bill .items { width: 40%; }
.bill .items b { font-weight: 500; }
.bill tr.void td { opacity: .45; text-decoration: line-through; }
.bill tr.void td .status { text-decoration: none; }
.bill tfoot td { border-bottom: 0; border-top: 2px solid rgba(255,255,255,.3); font-weight: 700; font-size: 1.15em; padding-top: 12px; }
.bill-head { margin-top: 4px; }
@media print {
  body { overflow: visible; background: #fff; color: #000; }
  .bg, .topbar, .main, .toast, .overlay .dialog footer, .splash { display: none !important; }
  .overlay { position: static; background: none; backdrop-filter: none; padding: 0; }
  .dialog { background: #fff; color: #000; box-shadow: none; border: 0; width: 100%; max-height: none; }
  .dialog .content { overflow: visible; }
  .bill th, .bill td { border-color: #ccc; } .bill tfoot td { border-top-color: #000; }
  .hint, .kv span:nth-child(odd) { color: #555; }
  .status { border: 1px solid #999; background: none; }
}

/* ---------- live TV / radio ---------- */
.card .img.chlogo { background: linear-gradient(160deg, #1a2a44, #0b1426); }
.card .img.chlogo img { object-fit: contain; padding: 12%; }
.card.ch { width: clamp(150px, 12vw, 210px); }
.card.ch .badge { left: 8px; right: auto; background: rgba(0,0,0,.65); color: #fff; }
.player.live video { object-fit: contain; }
.player.radio video { position: absolute; bottom: 0; left: 0; width: 100%; height: 56px; background: #000; }
.player .radio-art { position: absolute; inset: 0 0 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(circle at 50% 40%, #1a2a44, #000 70%); }
.player .radio-art img { width: min(40vw, 320px); max-height: 40vh; object-fit: contain; }
.player .radio-art .n { font-size: 2em; font-weight: 300; }
.player .osd { position: absolute; left: 0; right: 0; top: 0; padding: 22px 190px 22px 28px; display: flex; align-items: center; gap: 18px; background: linear-gradient(rgba(0,0,0,.8), rgba(0,0,0,0)); transition: opacity .3s; pointer-events: none; }
.player .osd img { height: 56px; max-width: 120px; object-fit: contain; }
.player .osd .lcn { font-size: 2.2em; font-weight: 300; }
.player .osd .n { font-size: 1.4em; font-weight: 600; }
.player .osd .epg { color: var(--muted); font-size: .9em; }
.player .osd .hint { margin-left: auto; color: var(--muted); font-size: .85em; text-align: right; }
.player .osd.hide { opacity: 0; }
.player .digits { position: absolute; top: 30px; right: 40px; font-size: 3.5em; font-weight: 300; background: rgba(0,0,0,.6); padding: 4px 22px; border-radius: 12px; }
.player .perr { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); background: rgba(20,34,56,.95); border: 1px solid var(--danger); border-radius: 12px; padding: 18px 24px; max-width: 70vw; text-align: center; }
.player .close { z-index: 2; }

/* ---------- registration ---------- */
.register { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 20px; }
.register .box { background: rgba(20,34,56,.92); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; width: min(560px, 96vw); padding: 28px 32px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.register .logo { display: block; height: 80px; margin: 0 auto 10px; object-fit: contain; }
.register h1 { font-size: 1.5em; font-weight: 500; text-align: center; margin: 0 0 4px; }
.register .devid { display: flex; gap: 10px; align-items: center; }
.register .devid .input { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 2px; font-size: 1.15em; }
.register .err { color: #ff9d9d; margin-top: 10px; }
