:root {
  --bg: #07121e;
  --surface: #0d1c2b;
  --surface-2: #112538;
  --line: rgba(154, 184, 211, .16);
  --text: #f4f8fb;
  --muted: #91a8bd;
  --blue: #54a9ff;
  --green: #4ed3a0;
  --amber: #ffbc55;
  --red: #ff6d6d;
}

* { box-sizing: border-box; }
html, body { min-width: 960px; min-height: 100%; margin: 0; background: var(--bg); }
body { font-family: "Heebo", Arial, sans-serif; color: var(--text); overflow: hidden; }
button { font: inherit; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.display-shell { min-height: 100vh; padding: clamp(22px, 2.1vw, 42px) clamp(28px, 3vw, 60px) 20px; display: grid; grid-template-rows: auto auto 1fr auto; gap: clamp(16px, 1.6vw, 28px); background: radial-gradient(circle at 12% 0%, #153654 0, transparent 31%), linear-gradient(145deg, #07131f 0%, #091725 100%); }
.display-header { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand { display: flex; align-items: center; gap: 17px; }
.brand-icon { width: 57px; height: 57px; border-radius: 16px; display: grid; place-items: center; color: var(--blue); background: rgba(84,169,255,.13); border: 1px solid rgba(84,169,255,.18); }
.brand-icon svg { width: 30px; height: 30px; }
.brand span { display: block; color: var(--muted); font-size: clamp(14px, 1vw, 19px); font-weight: 600; }
.brand strong { display: block; margin-top: 1px; font-size: clamp(29px, 2.35vw, 47px); line-height: 1.15; }
.header-status { display: flex; align-items: center; gap: 25px; }
.live-indicator { display: flex; align-items: center; gap: 9px; color: #b2c3d2; font-size: clamp(13px, .9vw, 17px); }
.live-indicator i { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 6px rgba(78,211,160,.09); animation: pulse 2s infinite; }
.clock { min-width: 116px; padding-right: 24px; border-right: 1px solid var(--line); text-align: left; direction: ltr; }
.clock strong { display: block; font-size: clamp(26px, 2vw, 39px); line-height: 1; letter-spacing: .02em; }
.clock span { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; }
#fullscreen-button { width: 45px; height: 45px; border: 1px solid var(--line); border-radius: 11px; display: grid; place-items: center; color: #9cb1c4; background: rgba(255,255,255,.035); cursor: pointer; }
#fullscreen-button:hover { color: #fff; background: rgba(255,255,255,.08); }

.display-summary { min-height: 82px; padding: 15px 21px; border: 1px solid var(--line); border-radius: 14px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 27px; background: rgba(17,37,56,.8); box-shadow: 0 12px 45px rgba(0,0,0,.16); }
.display-summary > div:first-child { display: flex; align-items: center; gap: 14px; }
.display-summary > div:first-child span { color: var(--muted); font-size: clamp(14px, 1vw, 18px); font-weight: 600; }
.display-summary > div:first-child strong { min-width: 54px; font-size: clamp(31px, 2.5vw, 50px); color: #fff; line-height: 1; }
.display-summary p { margin: 0; padding-right: 26px; border-right: 1px solid var(--line); color: #d3e0eb; font-size: clamp(15px, 1.15vw, 21px); }
.legend { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: clamp(12px, .82vw, 15px); white-space: nowrap; }
.legend span { display: flex; align-items: center; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.new { background: var(--green); }
.dot.waiting { background: var(--amber); }
.dot.urgent { background: var(--red); }

.ticket-board { min-height: 0; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; background: rgba(13,28,43,.91); box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.board-head, .ticket-row { display: grid; grid-template-columns: 52px minmax(140px, .8fr) minmax(350px, 2.5fr) minmax(225px, 1.2fr) minmax(135px, .8fr) minmax(125px, .7fr); align-items: center; gap: 21px; }
.board-head { min-height: 54px; padding: 0 27px; color: #7892a9; background: rgba(255,255,255,.025); border-bottom: 1px solid var(--line); font-size: clamp(12px, .8vw, 15px); font-weight: 700; }
.ticket-list { height: 100%; }
.ticket-row { position: relative; min-height: clamp(104px, 11vh, 140px); padding: 15px 27px; border-bottom: 1px solid var(--line); }
.ticket-row:last-child { border-bottom: 0; }
.ticket-row::after { content: ""; position: absolute; top: 18%; bottom: 18%; right: 0; width: 4px; border-radius: 4px 0 0 4px; background: var(--status); }
.ticket-row.status-new { --status: var(--green); }
.ticket-row.status-waiting { --status: var(--amber); }
.ticket-row.status-urgent { --status: var(--red); }
.ticket-row.category-service { background: linear-gradient(90deg, rgba(255,109,109,.035), rgba(255,109,109,.13)); }
.ticket-row.category-quote { background: linear-gradient(90deg, rgba(148,112,255,.035), rgba(148,112,255,.14)); }
.ticket-row.category-finance { background: linear-gradient(90deg, rgba(255,188,85,.03), rgba(255,188,85,.13)); }
.ticket-row.category-general { background: linear-gradient(90deg, rgba(84,169,255,.03), rgba(84,169,255,.12)); }
.ticket-row.category-unclassified { background: linear-gradient(90deg, rgba(145,168,189,.02), rgba(145,168,189,.08)); }
.row-number { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #dceaf5; background: rgba(255,255,255,.075); border: 1px solid rgba(255,255,255,.11); font-size: clamp(15px, 1vw, 19px); font-weight: 800; }
.ticket-number { color: var(--blue); font-size: clamp(16px, 1.15vw, 22px); font-weight: 800; direction: ltr; text-align: right; }
.ticket-info strong { display: block; margin-bottom: 5px; font-size: clamp(17px, 1.25vw, 24px); line-height: 1.25; }
.ticket-info span { display: block; max-width: 670px; color: var(--muted); font-size: clamp(13px, .92vw, 17px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact strong { display: block; font-size: clamp(15px, 1vw, 19px); }
.contact span { display: block; margin-top: 3px; color: var(--muted); font-size: clamp(12px, .82vw, 15px); direction: ltr; text-align: right; }
.opened { font-size: clamp(14px, .95vw, 18px); }
.opened span { display: block; color: var(--muted); font-size: .78em; }
.wait-time { display: inline-flex; align-items: center; gap: 7px; width: fit-content; padding: 7px 11px; border-radius: 20px; color: var(--status); background: color-mix(in srgb, var(--status) 10%, transparent); border: 1px solid color-mix(in srgb, var(--status) 24%, transparent); font-size: clamp(13px, .9vw, 17px); font-weight: 800; }
.channel { display: inline-flex; margin-top: 7px; color: #879eb3; font-size: clamp(11px, .72vw, 13px); font-weight: 700; }
.empty-state { min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); }
.empty-state[hidden] { display: none; }
.empty-icon { width: 78px; height: 78px; margin-bottom: 18px; border-radius: 50%; display: grid; place-items: center; color: var(--green); background: rgba(78,211,160,.09); }
.empty-icon svg { width: 38px; height: 38px; }
.empty-state strong { color: var(--text); font-size: 30px; }
.empty-state span { margin-top: 5px; font-size: 17px; }
footer { display: flex; justify-content: space-between; color: #637d94; font-size: clamp(11px, .75vw, 14px); }
footer b { color: #8da5b9; }

@keyframes pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(78,211,160,.08); } 50% { box-shadow: 0 0 0 9px rgba(78,211,160,.02); } }
@media (max-height: 760px) {
  .display-shell { padding-top: 18px; gap: 13px; }
  .ticket-row { min-height: 86px; }
  .display-summary { min-height: 68px; padding-block: 10px; }
}
