/* Uzbur Cue — v2.0.1 — tikai lietotnes izkārtojums. Krāsas, fonti, pogas, lauki: /design/*.css
   Blīvums "pults" (data-density="tools"). Kadra signāla tokeni un ikonas ir dizaina sistēmā. */

:root {
  /* --cue-now / --cue-next ir dizaina sistēmā (tokens.css, 2026-11-16) */
  --cue-idle: var(--panel-2);
  --cue-fg: #ffffff;
}

body { min-height: 100vh; }
.cue-num { font-variant-numeric: tabular-nums; }
.cue-hide { display: none !important; }

/* ---------- josla ---------- */
.cue-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; flex: none; }
.cue-brand img { width: 24px; height: 24px; display: block; }
.cue-brand span { font: 700 16px/1 var(--f-display); letter-spacing: -.01em; }
.cue-brand span b { font-weight: 700; color: var(--glow); }
.cue-title { font: 600 15px/1.2 var(--f-display); color: var(--fg); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uz-appbar .uz-appbar__end { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.cue-lang { min-width: 44px; }

/* ---------- projektu saraksts ---------- */
.cue-page { padding-block: var(--s-6) var(--s-8); }
.cue-page .uz-lead { margin: var(--s-2) 0 var(--s-5); color: var(--muted); max-width: 64ch; }
.cue-new { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-5); }
.cue-new .uz-input { flex: 1 1 280px; }
.cue-plist td.cue-pname a { color: var(--fg); font-weight: 600; text-decoration: none; }
.cue-plist td.cue-pname a:hover { color: var(--glow); }
.cue-plist td.cue-pname small { display: block; color: var(--dim); font-weight: 400; }
.cue-acts { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: nowrap; }
.cue-ver { color: var(--dim); font-size: var(--text-xs); margin-top: var(--s-6); }

/* ---------- pieslēgšanās ---------- */
.cue-login { max-width: 380px; margin: 14vh auto 0; padding-inline: 16px; }
.cue-login .uz-card { gap: var(--s-4); padding: var(--s-5); }
.cue-login img { width: 140px; height: auto; display: block; }

/* ---------- redaktors ---------- */
.cue-settings { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: flex-end; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); background: var(--panel); }
.cue-settings .uz-field { gap: 4px; }
.cue-stepper { display: flex; align-items: center; gap: 6px; height: var(--ctl-h); }
.cue-stepper b { min-width: 28px; text-align: center; font: 700 18px/1 var(--f-display); }

.cue-gridwrap { overflow: auto; height: calc(100vh - 52px - 78px); }
table.cue-grid { border-collapse: separate; border-spacing: 0; table-layout: fixed; width: max-content; min-width: 100%; font-size: 14px; }
.cue-grid th, .cue-grid td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); vertical-align: top; padding: 4px; background: var(--bg); }
.cue-grid thead th { position: sticky; top: 0; z-index: 5; background: var(--panel); text-align: left; font: 600 12px/1.3 var(--f-body); color: var(--muted); padding: 8px 6px; }
.cue-grid thead th .uz-input { height: var(--ctl-h-s); font-weight: 600; }
.cue-grid .c-num { width: 52px; min-width: 52px; max-width: 52px; position: sticky; left: 0; z-index: 3; color: var(--dim); font-size: 12px; text-align: center; padding-top: 11px; }
.cue-grid .c-name { width: 220px; min-width: 220px; max-width: 220px; position: sticky; left: 52px; z-index: 3; box-shadow: 1px 0 0 var(--line-2); }
.cue-grid thead .c-num, .cue-grid thead .c-name { z-index: 6; }
.cue-grid .c-tc { width: 176px; }
.cue-grid .c-note { width: 200px; }
.cue-grid .c-cam { width: 236px; }
.cue-grid .c-act { width: 148px; white-space: nowrap; }

/* šūnās lauks bez rāmja, līdz to aiztiek (izklājlapas paraugs; sistēmā tāda nav) */
.cue-cell { width: 100%; display: block; border: 1px solid transparent; border-radius: var(--r-s); background: transparent; padding: 6px 8px; color: var(--fg); font: inherit; line-height: 1.35; resize: none; overflow: hidden; min-height: 32px; }
.cue-cell::placeholder { color: var(--dim); }
.cue-cell:hover { border-color: var(--line-2); }
.cue-cell:focus { outline: none; border-color: var(--glow); background: var(--panel-2); }
.cue-cell[aria-invalid="true"] { border-color: var(--bad); }
.cue-cell.is-order { border-color: var(--warn); }
.c-cam .cue-cell { min-height: 52px; }
.cue-tc { display: flex; gap: 4px; }
.cue-tc .cue-cell { font-variant-numeric: tabular-nums; }
.cue-tc .uz-btn { flex: none; }
.cue-tc + small { display: block; color: var(--dim); font-size: 11px; padding: 2px 8px 0; }

.cue-grid tr.is-scene td { background: var(--panel-2); border-top: 2px solid var(--brand-2); }
.cue-grid tr.is-scene td.c-num { color: var(--glow); font: 700 14px/1 var(--f-display); }
.cue-grid tr.is-scene .cue-cell[data-f="s.name"] { font: 700 16px/1.3 var(--f-display); }
.cue-grid tr.is-scene .cue-cell[data-f="s.note"] { color: var(--muted); }
.cue-grid tr.is-add td { background: transparent; border-right: 0; }
.cue-rowacts { display: flex; gap: 2px; }
.cue-up .uz-icon { transform: rotate(-90deg); }
.cue-down .uz-icon { transform: rotate(90deg); }
.cue-back .uz-icon { transform: rotate(180deg); }
.cue-edempty { max-width: 560px; margin: var(--s-7) var(--s-5); }

/* ---------- vadība ---------- */
.cue-ctl { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr) minmax(280px, 340px); height: calc(100vh - 52px); }
.cue-ctl > section { overflow: auto; min-height: 0; }
.cue-col-rd { border-right: 1px solid var(--line); background: var(--panel); }
.cue-col-main { padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); }
.cue-col-side { border-left: 1px solid var(--line); background: var(--panel); padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-4); }

.cue-bigtc { font: 800 32px/1 var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.cue-bigtc.is-off { color: var(--dim); }

.cue-rd { padding: 6px 0 var(--s-7); }
.cue-rd__scene { display: flex; justify-content: space-between; gap: 8px; padding: var(--s-4) var(--s-4) 6px; font: 700 13px/1.3 var(--f-display); color: var(--glow); }
.cue-rd__scene span + span { font: 400 12px/1.3 var(--f-body); color: var(--dim); font-variant-numeric: tabular-nums; }
.cue-rd__ev { display: grid; grid-template-columns: 1fr auto; gap: 8px; width: 100%; padding: 8px var(--s-4) 8px 12px; border: 0; border-left: 4px solid transparent; background: transparent; text-align: left; cursor: pointer; color: var(--fg); }
.cue-rd__ev:hover { background: var(--panel-2); }
.cue-rd__ev b { font-weight: 600; }
.cue-rd__ev small { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; padding-top: 2px; }
.cue-rd__ev.is-past b { color: var(--muted); font-weight: 400; }
.cue-rd__ev[aria-current="true"] { background: color-mix(in srgb, var(--cue-now) 22%, transparent); border-left-color: var(--cue-now); }
.cue-rd__ev.is-next { background: color-mix(in srgb, var(--cue-next) 16%, transparent); border-left-color: var(--cue-next); }

/* TAGAD / NĀKAMAIS karte (vadībā) */
.cue-card { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); }
.cue-card__head { display: flex; align-items: baseline; gap: var(--s-3); padding: 12px var(--s-4); color: var(--cue-fg); background: var(--cue-idle); }
.cue-card--now .cue-card__head { background: var(--cue-now); }
.cue-card--next .cue-card__head { background: var(--cue-next); }
.cue-card.is-idle .cue-card__head { background: var(--cue-idle); color: var(--muted); }
.cue-card__tag { font: 700 13px/1 var(--f-display); opacity: .85; flex: none; }
.cue-card__name { font: 800 22px/1.15 var(--f-display); letter-spacing: -.01em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; }
.cue-card__scene { font-size: 14px; opacity: .9; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cue-card__cd { font: 800 20px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.cue-card__note { padding: 8px var(--s-4); color: var(--warn); border-bottom: 1px solid var(--line); font-size: 14px; display: flex; gap: 8px; align-items: center; }
.cue-card__cams { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.cue-card__cam { padding: 10px var(--s-4) 12px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.cue-card__cam b { display: block; font: 600 12px/1.3 var(--f-body); color: var(--muted); margin-bottom: 2px; }
.cue-card__cam p { margin: 0; white-space: pre-wrap; font-size: 15px; }
.cue-card__cam p.is-none { color: var(--dim); }
.cue-card--next .cue-card__cam p { color: var(--muted); }

.cue-nav { display: grid; grid-template-columns: 1fr 2fr; gap: var(--s-2); }
.cue-nav .uz-btn { height: 64px; font-size: 17px; }
.cue-hint { font-size: var(--text-xs); color: var(--dim); }

.cue-side-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 var(--s-3); }
.cue-side .uz-select, .cue-side .uz-input { width: 100%; }
.cue-level { display: flex; align-items: center; gap: var(--s-2); }
.cue-level .uz-meter { flex: 1; height: 8px; }
.cue-level.is-hot .uz-meter > i { background: var(--warn); }
.cue-camrow { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.cue-camrow .uz-dot.is-on { background: var(--ok); }
.cue-camrow .uz-dot:not(.is-on) { background: var(--line-3); }
.cue-camrow b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cue-camrow .uz-chip { height: 22px; margin-left: 6px; }
.cue-msg { display: flex; gap: var(--s-2); }
.cue-msg .uz-input { flex: 1; min-width: 0; }

.cue-qr { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-4); }
.cue-qr figure { margin: 0; text-align: center; }
.cue-qr .cue-qr__img { background: #fff; border-radius: var(--r-s); padding: 8px; }
.cue-qr .cue-qr__img svg { display: block; width: 100%; height: auto; }
.cue-qr figcaption { font: 700 15px/1.3 var(--f-display); margin-top: 8px; }
.cue-qr small { display: block; color: var(--dim); word-break: break-all; font-size: 11px; }

@media (max-width: 1100px) {
  .cue-ctl { grid-template-columns: minmax(0, 1fr); height: auto; }
  .cue-col-rd { max-height: 40vh; border-right: 0; border-bottom: 1px solid var(--line); order: 2; }
  .cue-col-main { order: 1; }
  .cue-col-side { order: 3; border-left: 0; }
}
@media (max-width: 760px) {
  .cue-bigtc { font-size: 22px; }
  .cue-gridwrap { height: auto; }
}
