/* GTA Studio — sistema de diseño
   Herramienta densa, tema oscuro, acento ámbar. */

:root {
  --bg:            #0d0f12;
  --bg-panel:      #141820;
  --bg-panel-2:    #1a1f29;
  --bg-hover:      #212836;
  --bg-input:      #0a0c10;
  --line:          #262d3a;
  --line-soft:     #1e242f;

  --txt:           #e6e9ef;
  --txt-dim:       #8e98ab;
  --txt-faint:     #5b6475;

  --amber:         #ff9422;
  --amber-dim:     #b4681a;
  --amber-ghost:   rgba(255,148,34,.12);

  --green:         #3ecf8e;
  --blue:          #4a9eff;
  --violet:        #a777ff;
  --red:           #ff5c5c;
  --yellow:        #ffcc33;

  --r:             6px;
  --r-lg:          10px;
  --sidebar:       212px;

  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a3140; border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3a4354; }

/* ---------- boot ---------- */
.boot {
  height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
}
.boot-logo { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.boot-logo span { color: var(--amber); }
.boot-msg { color: var(--txt-dim); font-size: 12px; }

/* ---------- shell ---------- */
.shell { display: flex; height: 100vh; }

.sidebar {
  width: var(--sidebar); flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.sb-logo {
  padding: 16px 16px 14px; font-size: 15px; font-weight: 800;
  letter-spacing: -.3px; border-bottom: 1px solid var(--line-soft);
}
.sb-logo span { color: var(--amber); }
.sb-nav { flex: 1; overflow-y: auto; padding: 8px 8px; }
.sb-section {
  font-size: 10px; text-transform: uppercase; letter-spacing: .8px;
  color: var(--txt-faint); padding: 12px 8px 5px; font-weight: 600;
}
.sb-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 8px; border-radius: var(--r);
  color: var(--txt-dim); width: 100%; text-align: left;
  font-size: 13px;
}
.sb-item:hover { background: var(--bg-hover); color: var(--txt); }
.sb-item.active { background: var(--amber-ghost); color: var(--amber); font-weight: 500; }
.sb-item .ico { width: 15px; text-align: center; font-size: 13px; opacity: .9; }
.sb-item .count {
  margin-left: auto; font-size: 10px; font-family: var(--mono);
  background: var(--bg-hover); padding: 1px 5px; border-radius: 8px; color: var(--txt-faint);
}
.sb-foot { border-top: 1px solid var(--line-soft); padding: 10px; }
.sb-user { display: flex; align-items: center; gap: 8px; padding: 4px; }
.sb-user .who { min-width: 0; }
.sb-user .nm { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user .rl { font-size: 10px; color: var(--txt-faint); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 48px; flex-shrink: 0; display: flex; align-items: center;
  gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line);
  background: var(--bg-panel);
}
.topbar h1 { font-size: 15px; font-weight: 650; letter-spacing: -.2px; }
.topbar .sub { color: var(--txt-faint); font-size: 11px; }
.topbar .spacer { flex: 1; }

.content { flex: 1; overflow-y: auto; padding: 20px; }
.content.flush { padding: 0; }

/* ---------- primitivos ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--r);
  background: var(--bg-panel-2); border: 1px solid var(--line);
  color: var(--txt); font-size: 12px; font-weight: 500;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--bg-hover); border-color: #333c4d; }
.btn.primary { background: var(--amber); border-color: var(--amber); color: #1a1000; font-weight: 650; }
.btn.primary:hover { background: #ffa33f; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--txt-dim); }
.btn.ghost:hover { background: var(--bg-hover); color: var(--txt); }
.btn.danger { color: var(--red); border-color: #43262b; }
.btn.sm { padding: 3px 8px; font-size: 11px; }
.btn.lg { padding: 9px 18px; font-size: 13px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.input, .select, .textarea {
  background: var(--bg-input); border: 1px solid var(--line);
  border-radius: var(--r); padding: 7px 10px; font-size: 12.5px;
  width: 100%; outline: none; transition: border-color .12s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--amber-dim); }
.input::placeholder, .textarea::placeholder { color: var(--txt-faint); }
.textarea { resize: vertical; line-height: 1.6; font-family: var(--sans); }
.select { cursor: pointer; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--txt-faint) 50%), linear-gradient(135deg, var(--txt-faint) 50%, transparent 50%); background-position: calc(100% - 14px) 13px, calc(100% - 9px) 13px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 11px; color: var(--txt-dim); font-weight: 500; }

.panel { background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel-hd {
  padding: 12px 14px; border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 10px;
}
.panel-hd h3 { font-size: 13px; font-weight: 650; }
.panel-bd { padding: 14px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 4px; font-size: 10.5px;
  font-weight: 600; letter-spacing: .2px;
  background: var(--bg-hover); color: var(--txt-dim);
  white-space: nowrap;
}
.badge.amber  { background: rgba(255,148,34,.14); color: var(--amber); }
.badge.green  { background: rgba(62,207,142,.14); color: var(--green); }
.badge.blue   { background: rgba(74,158,255,.14); color: var(--blue); }
.badge.violet { background: rgba(167,119,255,.14); color: var(--violet); }
.badge.red    { background: rgba(255,92,92,.14);  color: var(--red); }
.badge.yellow { background: rgba(255,204,51,.14); color: var(--yellow); }
.badge.game   { font-family: var(--mono); font-size: 10px; }

.avatar {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 10px; font-weight: 700;
  color: #0d0f12; letter-spacing: -.2px;
}
.avatar.sm { width: 20px; height: 20px; font-size: 9px; }
.avatar.lg { width: 34px; height: 34px; font-size: 13px; }
.avatar.empty { background: var(--bg-hover); color: var(--txt-faint); border: 1px dashed var(--line); }

.muted { color: var(--txt-dim); }
.faint { color: var(--txt-faint); }
.mono  { font-family: var(--mono); }
.row   { display: flex; align-items: center; gap: 8px; }
.col   { display: flex; flex-direction: column; gap: 8px; }
.grow  { flex: 1; }
.wrap  { flex-wrap: wrap; }

.empty {
  padding: 48px 20px; text-align: center; color: var(--txt-faint);
}
.empty .big { font-size: 30px; margin-bottom: 10px; opacity: .5; }
.empty h3 { font-size: 14px; color: var(--txt-dim); margin-bottom: 5px; font-weight: 600; }
.empty p { font-size: 12px; max-width: 380px; margin: 0 auto 14px; line-height: 1.6; }

.spinner {
  width: 13px; height: 13px; border: 2px solid var(--line);
  border-top-color: var(--amber); border-radius: 50%;
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- dashboard ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px,1fr)); gap: 14px; }
.ch-card { padding: 14px; }
.ch-card .hd { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.ch-card .nm { font-size: 14px; font-weight: 650; }
.ch-card .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.stat-row { display: flex; gap: 18px; padding-top: 11px; border-top: 1px solid var(--line-soft); }
.stat .n { font-size: 19px; font-weight: 700; font-family: var(--mono); letter-spacing: -1px; }
.stat .l { font-size: 10px; color: var(--txt-faint); text-transform: uppercase; letter-spacing: .4px; }
.pipebar { display: flex; height: 5px; border-radius: 3px; overflow: hidden; background: var(--bg-input); margin-bottom: 10px; }
.pipebar i { display: block; }

/* ---------- tablero (Monday) ---------- */
.view-tabs { display: flex; gap: 2px; background: var(--bg-input); padding: 2px; border-radius: var(--r); }
.view-tabs button {
  padding: 4px 12px; border-radius: 4px; font-size: 12px;
  color: var(--txt-dim); font-weight: 500;
}
.view-tabs button.on { background: var(--bg-panel-2); color: var(--txt); box-shadow: 0 1px 2px rgba(0,0,0,.3); }

.filters {
  display: flex; align-items: center; gap: 8px; padding: 10px 18px;
  border-bottom: 1px solid var(--line); background: var(--bg-panel);
  flex-wrap: wrap;
}
.filters .select, .filters .input { width: auto; min-width: 118px; padding: 5px 9px; font-size: 12px; }
.filters .input.search { min-width: 210px; }

.board-scroll { overflow: auto; height: 100%; }

.group { margin-bottom: 18px; }
.group-hd {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 18px; position: sticky; top: 0; z-index: 3;
  background: var(--bg); font-weight: 650; font-size: 12.5px;
}
.group-hd .caret { color: var(--txt-faint); font-size: 10px; width: 10px; transition: transform .15s; }
.group-hd.closed .caret { transform: rotate(-90deg); }
.group-hd .n { font-size: 11px; color: var(--txt-faint); font-family: var(--mono); font-weight: 400; }
.group-color { width: 3px; height: 15px; border-radius: 2px; }

table.board { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 1180px; }
table.board th {
  font-size: 10px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--txt-faint); font-weight: 600; text-align: left;
  padding: 6px 10px; background: var(--bg); position: sticky; top: 0; z-index: 2;
  border-bottom: 1px solid var(--line);
}
table.board td {
  padding: 8px 10px; border-bottom: 1px solid var(--line-soft);
  vertical-align: middle; background: var(--bg-panel);
}
table.board tr:hover td { background: var(--bg-panel-2); }
table.board td:first-child { border-left: 3px solid transparent; }
table.board tr:hover td:first-child { border-left-color: var(--amber); }
.cell-title { font-weight: 550; font-size: 12.5px; cursor: pointer; }
.cell-title:hover { color: var(--amber); }
.cell-btn { width: 100%; text-align: left; padding: 3px 5px; border-radius: 4px; }
.cell-btn:hover { background: var(--bg-hover); outline: 1px solid var(--line); }

.chip-status {
  display: inline-block; padding: 3px 9px; border-radius: 4px;
  font-size: 11px; font-weight: 600; color: #0d0f12; white-space: nowrap;
}

.due { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-family: var(--mono); }
.due .bar { width: 34px; height: 4px; border-radius: 2px; background: var(--bg-input); overflow: hidden; }
.due .bar i { display: block; height: 100%; }

.health { display: flex; align-items: center; gap: 5px; font-size: 11px; font-family: var(--mono); }
.health .ok { color: var(--green); }
.health .bad { color: var(--yellow); }

/* kanban */
.kanban { display: flex; gap: 12px; padding: 16px 18px; height: 100%; align-items: flex-start; }
.kcol { width: 252px; flex-shrink: 0; background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--r-lg); max-height: 100%; display: flex; flex-direction: column; }
.kcol-hd { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 650; }
.kcol-bd { padding: 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.kcard {
  background: var(--bg-panel-2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 10px; cursor: grab;
}
.kcard:hover { border-color: #38414f; }
.kcard.dragging { opacity: .4; }
.kcard .t { font-size: 12.5px; font-weight: 600; margin-bottom: 7px; line-height: 1.35; }
.kcard .m { display: flex; align-items: center; gap: 6px; }
.kcol.dragover { border-color: var(--amber); background: var(--amber-ghost); }

/* calendario */
.cal { padding: 16px 18px; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.cal-dow { background: var(--bg-panel); padding: 7px; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--txt-faint); text-align: center; font-weight: 600; }
.cal-day { background: var(--bg-panel); min-height: 92px; padding: 6px; }
.cal-day.other { background: var(--bg); }
.cal-day .d { font-size: 11px; font-family: var(--mono); color: var(--txt-faint); margin-bottom: 4px; }
.cal-day.today .d { color: var(--amber); font-weight: 700; }
.cal-ev { font-size: 10.5px; padding: 2px 5px; border-radius: 3px; margin-bottom: 3px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- grabador ---------- */
.rec-list { display: grid; gap: 12px; max-width: 780px; }
.rec-card { padding: 14px 16px; }
.rec-card .t { font-size: 15px; font-weight: 650; margin-bottom: 3px; }
.shot-summary { display: flex; gap: 16px; padding: 10px 12px; background: var(--bg-input); border-radius: var(--r); margin: 11px 0; }
.shot-summary .it .n { font-size: 15px; font-weight: 700; font-family: var(--mono); }
.shot-summary .it .l { font-size: 10px; color: var(--txt-faint); text-transform: uppercase; }

/* ---------- idea ---------- */
.idea-wrap { max-width: 720px; margin: 24px auto; }
.idea-box {
  background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px;
}
.idea-input {
  width: 100%; background: transparent; border: none; outline: none;
  font-size: 19px; font-weight: 500; padding: 6px 2px; color: var(--txt);
}
.idea-input::placeholder { color: var(--txt-faint); font-weight: 400; }
.idea-opts { display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.idea-opts .select { width: auto; min-width: 120px; }

.run-steps { display: flex; flex-direction: column; gap: 2px; margin-top: 16px; }
.run-step { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r); font-size: 12.5px; color: var(--txt-faint); }
.run-step.active { background: var(--amber-ghost); color: var(--amber); }
.run-step.done { color: var(--txt-dim); }
.run-step .mk { width: 15px; text-align: center; }
.run-step .detail { margin-left: auto; font-size: 11px; font-family: var(--mono); opacity: .8; }

.suggest { display: grid; grid-template-columns: repeat(auto-fill,minmax(215px,1fr)); gap: 9px; margin-top: 8px; }
.suggest button {
  text-align: left; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--bg-panel); font-size: 12px;
}
.suggest button:hover { border-color: var(--amber-dim); background: var(--bg-panel-2); }
.suggest .why { font-size: 10.5px; color: var(--txt-faint); margin-top: 3px; }

/* ---------- dossier ---------- */
.dossier { display: grid; grid-template-columns: 1fr 288px; gap: 18px; align-items: start; }
.ent-head { display: flex; gap: 16px; padding: 16px; margin-bottom: 16px; }
.ent-img {
  width: 148px; height: 92px; border-radius: var(--r); flex-shrink: 0;
  background: linear-gradient(135deg, #1e2532, #2a3344);
  display: grid; place-items: center; font-size: 32px;
  border: 1px solid var(--line);
}
.ent-head h2 { font-size: 21px; font-weight: 700; letter-spacing: -.4px; }

.sect { margin-bottom: 8px; }
.sect-hd {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 13px; background: var(--bg-panel-2);
  border: 1px solid var(--line); border-radius: var(--r);
  font-size: 12.5px; font-weight: 650; text-align: left;
}
.sect-hd .caret { color: var(--txt-faint); font-size: 10px; transition: transform .15s; }
.sect-hd.closed .caret { transform: rotate(-90deg); }
.sect-hd .n { margin-left: auto; font-size: 10.5px; color: var(--txt-faint); font-family: var(--mono); font-weight: 400; }
.sect-bd { border: 1px solid var(--line); border-top: none; border-radius: 0 0 var(--r) var(--r); }

.fact {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 13px; border-bottom: 1px solid var(--line-soft);
  background: var(--bg-panel);
}
.fact:last-child { border-bottom: none; border-radius: 0 0 var(--r) var(--r); }
.fact:hover { background: var(--bg-panel-2); }
.fact.warn { background: rgba(255,204,51,.05); border-left: 2px solid var(--yellow); }
.fact input[type=checkbox] { margin-top: 3px; accent-color: var(--amber); width: 14px; height: 14px; cursor: pointer; flex-shrink: 0; }
.fact .body { flex: 1; min-width: 0; }
.fact .txt { font-size: 12.5px; line-height: 1.5; }
.fact .txt b { color: var(--amber); font-weight: 650; }
.fact .meta { display: flex; align-items: center; gap: 7px; margin-top: 5px; flex-wrap: wrap; }
.src-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; padding: 1px 6px; border-radius: 3px;
  background: var(--bg-hover); color: var(--txt-dim);
  border: 1px solid var(--line);
}
.src-chip:hover { border-color: var(--amber-dim); color: var(--amber); }
.conflict {
  margin-top: 7px; padding: 8px 10px; background: var(--bg-input);
  border-radius: var(--r); border: 1px solid rgba(255,204,51,.25); font-size: 11.5px;
}
.conflict .v { display: flex; gap: 8px; padding: 3px 0; }
.conflict .v .lbl { color: var(--yellow); font-family: var(--mono); font-size: 10.5px; min-width: 78px; }

.side-stat { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.side-stat:last-of-type { border-bottom: none; }
.side-stat .v { font-family: var(--mono); font-weight: 650; }

/* ---------- cerebro / grafo ---------- */
.brain { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.ask-bar { display: flex; gap: 8px; margin-bottom: 6px; }
.ask-bar .input { font-size: 14px; padding: 10px 13px; }

.finding {
  display: flex; gap: 13px; padding: 13px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--bg-panel); margin-bottom: 10px;
}
.finding .num {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--amber-ghost); color: var(--amber);
  display: grid; place-items: center; font-weight: 700; font-size: 12px;
  font-family: var(--mono);
}
.finding .thumb {
  width: 86px; height: 58px; border-radius: var(--r); flex-shrink: 0;
  background: linear-gradient(135deg,#1c2330,#28303f);
  display: grid; place-items: center; font-size: 22px; border: 1px solid var(--line);
}
.finding h4 { font-size: 13.5px; font-weight: 650; margin-bottom: 4px; }
.trace {
  margin-top: 8px; padding: 8px 10px; background: var(--bg-input);
  border-radius: var(--r); border-left: 2px solid var(--violet); font-size: 11.5px;
}
.trace .lbl { color: var(--violet); font-size: 10px; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; margin-bottom: 3px; }

.graph-box { background: var(--bg-input); border-radius: var(--r); overflow: hidden; }
.graph-box svg { display: block; width: 100%; height: auto; }
.gnode { cursor: pointer; }
.gnode:hover circle { stroke: var(--amber); stroke-width: 2; }

.confidence { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.conf-dots { display: flex; gap: 2px; }
.conf-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--line); }
.conf-dots i.on { background: var(--green); }
.conf-dots.low i.on { background: var(--yellow); }

/* ---------- editor de guion ---------- */
.editor { display: grid; grid-template-columns: 1fr 330px; gap: 0; height: 100%; }
.ed-main { overflow-y: auto; padding: 18px 22px; }
.ed-side { border-left: 1px solid var(--line); background: var(--bg-panel); overflow-y: auto; }

.block { margin-bottom: 14px; }
.block-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.block-hd .tag {
  font-size: 10px; text-transform: uppercase; letter-spacing: .6px;
  font-weight: 700; padding: 2px 7px; border-radius: 3px;
}
.block-hd .stats { margin-left: auto; font-size: 10.5px; font-family: var(--mono); color: var(--txt-faint); }
.block-txt {
  width: 100%; background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 11px 13px; font-size: 14px;
  line-height: 1.7; resize: vertical; outline: none; min-height: 68px;
}
.block-txt:focus { border-color: var(--amber-dim); }
.block.sel .block-txt { border-color: var(--amber-dim); box-shadow: 0 0 0 1px var(--amber-ghost); }

.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; padding: 9px; font-size: 11.5px; color: var(--txt-dim); border-bottom: 2px solid transparent; font-weight: 500; }
.tabs button.on { color: var(--amber); border-bottom-color: var(--amber); }

.broll { display: flex; gap: 9px; padding: 10px 13px; border-bottom: 1px solid var(--line-soft); }
.broll .tc { font-family: var(--mono); font-size: 10.5px; color: var(--amber); flex-shrink: 0; padding-top: 1px; }

/* ---------- catálogo ---------- */
.catalog { display: grid; grid-template-columns: 190px 1fr; gap: 18px; align-items: start; }
.facet { margin-bottom: 16px; }
.facet h4 { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--txt-faint); margin-bottom: 7px; font-weight: 600; }
.facet label { display: flex; align-items: center; gap: 7px; padding: 3px 0; font-size: 12px; color: var(--txt-dim); cursor: pointer; }
.facet label:hover { color: var(--txt); }
.facet input { accent-color: var(--amber); width: 13px; height: 13px; }
.facet label .n { margin-left: auto; font-size: 10px; font-family: var(--mono); color: var(--txt-faint); }

.ent-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(172px,1fr)); gap: 11px; }
.ent-card { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-panel); overflow: hidden; cursor: pointer; text-align: left; width: 100%; }
.ent-card:hover { border-color: var(--amber-dim); }
.ent-card .thumb { height: 74px; background: linear-gradient(135deg,#1c2330,#28303f); display: grid; place-items: center; font-size: 25px; }
.ent-card .bd { padding: 9px 10px; }
.ent-card .nm { font-size: 12.5px; font-weight: 650; margin-bottom: 5px; line-height: 1.3; }
.ent-card .ft { display: flex; gap: 9px; font-size: 10px; color: var(--txt-faint); font-family: var(--mono); margin-top: 6px; }
.fresh-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

/* ---------- ingesta ---------- */
.ingest-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(255px,1fr)); gap: 13px; margin-bottom: 20px; }
.drop {
  border: 1.5px dashed var(--line); border-radius: var(--r);
  padding: 22px; text-align: center; color: var(--txt-faint);
  font-size: 12px; transition: border-color .12s;
}
.drop.over { border-color: var(--amber); background: var(--amber-ghost); color: var(--amber); }

table.jobs { width: 100%; border-collapse: collapse; font-size: 12px; }
table.jobs th {
  text-align: left; padding: 8px 11px; font-size: 10px; text-transform: uppercase;
  letter-spacing: .5px; color: var(--txt-faint); border-bottom: 1px solid var(--line); font-weight: 600;
}
table.jobs td { padding: 9px 11px; border-bottom: 1px solid var(--line-soft); }
table.jobs tr:hover td { background: var(--bg-panel-2); }
.prog { width: 74px; height: 4px; background: var(--bg-input); border-radius: 2px; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--amber); transition: width .3s; }

/* ---------- teleprompter ---------- */
.tp { position: fixed; inset: 0; background: #07080b; z-index: 60; display: flex; flex-direction: column; }
.tp-bar { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--bg-panel); }
.tp-body { flex: 1; display: flex; min-height: 0; }
.tp-text { flex: 1; overflow-y: auto; padding: 60px 8vw; font-size: 30px; line-height: 1.85; font-weight: 500; }
.tp-text .blk { margin-bottom: 34px; }
.tp-text .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--amber); margin-bottom: 10px; font-weight: 700; }
.tp-shots { width: 285px; border-left: 1px solid var(--line); background: var(--bg-panel); overflow-y: auto; padding: 14px; }
.tp-shot { padding: 10px; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px; font-size: 12px; }
.tp-shot .n { font-family: var(--mono); color: var(--amber); font-size: 10.5px; margin-bottom: 3px; }

/* ---------- modal / toast ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(5,6,9,.72);
  display: grid; place-items: center; z-index: 70; padding: 20px;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); width: 100%; max-width: 480px;
  max-height: 85vh; display: flex; flex-direction: column;
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
}
.modal.wide { max-width: 720px; }
.modal-hd { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 10px; }
.modal-hd h3 { font-size: 14px; font-weight: 650; }
.modal-bd { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 13px; }
.modal-ft { padding: 12px 16px; border-top: 1px solid var(--line-soft); display: flex; gap: 8px; justify-content: flex-end; }

.pick { max-height: 300px; overflow-y: auto; }
.pick button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 9px; border-radius: var(--r); text-align: left; }
.pick button:hover { background: var(--bg-hover); }
.pick .load { margin-left: auto; font-size: 10px; font-family: var(--mono); color: var(--txt-faint); }

#toast-root { position: fixed; bottom: 18px; right: 18px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--bg-panel-2); border: 1px solid var(--line);
  border-left: 3px solid var(--amber); border-radius: var(--r);
  padding: 10px 14px; font-size: 12.5px; min-width: 230px;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  animation: slidein .18s ease;
}
.toast.ok  { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
@keyframes slidein { from { opacity: 0; transform: translateX(18px); } }

/* ---------- login ---------- */
.login { height: 100vh; display: grid; place-items: center; }
.login .box { width: 330px; }
.login .logo { font-size: 26px; font-weight: 800; text-align: center; margin-bottom: 6px; letter-spacing: -.6px; }
.login .logo span { color: var(--amber); }
.login .tag { text-align: center; color: var(--txt-faint); font-size: 12px; margin-bottom: 22px; }

.banner {
  display: flex; align-items: center; gap: 9px; padding: 8px 18px;
  background: rgba(255,204,51,.09); border-bottom: 1px solid rgba(255,204,51,.2);
  font-size: 11.5px; color: var(--yellow);
}

@media (max-width: 1080px) {
  .dossier, .brain, .editor, .catalog { grid-template-columns: 1fr; }
  .ed-side { border-left: none; border-top: 1px solid var(--line); }
}

/* Leonidas Wiki */
.sb-logo { font-size: 18px; white-space: nowrap; }
.sb-logo span,.login .logo span,.boot-logo span { margin-left: 5px; }
.login { min-height:100dvh;height:auto;padding:32px 20px;overflow:auto; }
.login .box { width:100%;max-width:380px; }
.avatar.empty { padding:0; min-width:20px; min-height:20px; }
@media(max-width:700px){
 .shell { display:flex;flex-direction:column;height:100dvh; }
 .sidebar { width:100%;min-width:0;flex:0 0 auto;max-height:185px;border-right:0;border-bottom:1px solid var(--line); }
 .sb-logo { padding:12px 16px; }.sb-nav { display:flex;overflow-x:auto;flex:initial;gap:4px;padding:4px 10px; }.sb-section{display:none;}.sb-item{width:auto;white-space:nowrap;flex-shrink:0;}.sb-foot{padding:6px 12px;}.sb-user .who{display:none;}
 .main{min-height:0;flex:1;}.topbar{padding:12px;flex-wrap:wrap;height:auto;min-height:55px;}.topbar .sub{display:none;}.content{padding:14px;overflow:auto;}.content.flush{padding:0;}
 .grid-cards,.kpis,.dash-grid,.ingest-grid{grid-template-columns:1fr!important;}.tp-shots{display:none;}.tp-text{padding:24px;font-size:24px;}
}

.google-login { background:#fff;color:#1f1f1f;border:1px solid #dadce0;justify-content:center;font-weight:600;min-height:46px; }
.google-login:hover { background:#f0f4f9; }
.google-login:disabled { opacity:.65;cursor:wait; }
.login-status { color:var(--txt-dim);font-size:12px;line-height:1.5;text-align:center; }
.login-status:empty { display:none; }
