/* EMPREENDERTHZ TV — Station Studio Pro · Broadcast Control Center */
:root {
  --bg: #0D1117; --panel: #171D26; --panel-2: #1C2430; --panel-3: #222C3A; --line: #2A3442; --line-2: #354152;
  --blue: #168BFF; --cyan: #00D4E8; --red: #FF304F; --green: #22C55E; --amber: #F59E0B; --violet: #A78BFA;
  --text: #F1F5F9; --muted: #94A3B8; --dim: #64748B;
  --radius: 12px; --radius-sm: 8px; --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; --mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
  --side: 248px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
.ic { flex: none; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 12px; }
.right { text-align: right; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .row.between { justify-content: space-between; } .grow { flex: 1; }
.stack > * + * { margin-top: 14px; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { background: #0A0E14; border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.brand-logo { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, var(--blue), var(--cyan)); display: grid; place-items: center; font-weight: 800; color: #04121f; font-size: 14px; letter-spacing: -.04em; box-shadow: 0 0 18px rgba(0, 212, 232, .35); }
.brand b { display: block; font-size: 14px; letter-spacing: .02em; } .brand small { color: var(--muted); font-size: 11px; }
.nav { padding: 8px 10px 20px; flex: 1; }
.nav-group { margin-top: 14px; }
.nav-group > span { display: block; font-size: 10.5px; letter-spacing: .14em; color: var(--dim); font-weight: 700; padding: 0 10px 6px; }
.nav a { display: flex; gap: 10px; align-items: center; color: var(--muted); padding: 7px 10px; border-radius: 8px; font-size: 13.5px; position: relative; }
.nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.nav a.active { background: linear-gradient(90deg, rgba(22, 139, 255, .18), rgba(22, 139, 255, .04)); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--blue); }
.nav a .n { margin-left: auto; font-size: 10px; color: var(--dim); }
.side-foot { padding: 12px 18px; border-top: 1px solid var(--line); font-size: 11px; color: var(--dim); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 10px 24px; background: rgba(13, 17, 23, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .menu-btn { display: none; }
.top-clock { font-family: var(--mono); font-size: 20px; font-weight: 600; letter-spacing: .04em; }
.top-clock small { display: block; font: 10.5px var(--font); color: var(--muted); letter-spacing: .08em; }
.station-select { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 7px 10px; font: inherit; max-width: 240px; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #1d4ed8, #0891b2); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.user-chip b { font-size: 12.5px; display: block; line-height: 1.1; } .user-chip small { font-size: 10.5px; color: var(--muted); }
.content { padding: 22px 24px 40px; max-width: 1600px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; display: flex; gap: 10px; align-items: center; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

/* ---------- on air ---------- */
.onair { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 6px; font-weight: 800; font-size: 11.5px; letter-spacing: .14em; background: #3a0c15; color: #ffb3c0; border: 1px solid #6b1424; }
.onair i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: blink 1.4s infinite; }
.onair.off { background: var(--panel); color: var(--muted); border-color: var(--line); } .onair.off i { background: var(--dim); box-shadow: none; animation: none; }
.onair.cont { background: #3b2a06; color: #fcd34d; border-color: #6b4d0c; } .onair.cont i { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
@keyframes blink { 50% { opacity: .35; } }

/* ---------- cards ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 0 rgba(255, 255, 255, .02) inset; min-width: 0; }
.card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -2px 0 12px; }
.card > header h3 { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.card > header h3 .ic { color: var(--cyan); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px; position: relative; overflow: hidden; }
.kpi span { font-size: 11.5px; color: var(--muted); display: block; padding-right: 74px; min-height: 34px; }
.kpi b { font-size: 22px; font-weight: 700; display: block; margin-top: 3px; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; font-size: 9.5px; letter-spacing: .08em; font-weight: 700; position: absolute; top: 10px; right: 10px; padding: 2px 6px; border-radius: 4px; }
.kpi em.real { background: rgba(34, 197, 94, .14); color: #86efac; } .kpi em.est { background: rgba(22, 139, 255, .16); color: #93c5fd; } .kpi em.sim { background: rgba(245, 158, 11, .16); color: #fcd34d; }
.kpi::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--blue), transparent); opacity: .6; }

/* ---------- monitor ---------- */
.monitor { position: relative; background: #000; border-radius: 10px; overflow: hidden; aspect-ratio: 16/9; border: 1px solid var(--line-2); }
.monitor .label { position: absolute; top: 10px; left: 10px; z-index: 5; font-size: 10.5px; letter-spacing: .14em; font-weight: 800; padding: 3px 8px; border-radius: 4px; background: rgba(0, 0, 0, .65); }
.monitor.pgm { border-color: #7a1626; box-shadow: 0 0 0 1px #7a1626, 0 0 24px rgba(255, 48, 79, .15); }
.monitor.pgm .label { background: var(--red); color: #fff; } .monitor.pvw { border-color: #14532d; box-shadow: 0 0 0 1px #14532d; } .monitor.pvw .label { background: var(--green); color: #052e16; }
.monitor video { width: 100%; height: 100%; object-fit: contain; display: block; }
.sp-box { position: relative; width: 100%; height: 100%; background: #000; }
.sp-v { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .25s; background: #000; }
.sp-v.sp-active { opacity: 1; z-index: 1; }
.sp-slate { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #1b2433, #05070a); background-size: cover; background-position: center; text-align: center; padding: 20px; }
.sp-slate.sp-black { background: #000; }
.sp-slate-title { font-weight: 800; letter-spacing: .18em; font-size: clamp(14px, 3vw, 26px); }
.sp-slate-msg { color: var(--muted); margin-top: 8px; font-size: clamp(11px, 1.6vw, 15px); }
.progress { height: 6px; background: var(--panel-3); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); border-radius: 99px; transition: width .25s linear; }
.np-title { font-size: 19px; font-weight: 700; margin: 4px 0 2px; }
.meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.meta div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.meta span { font-size: 10.5px; color: var(--muted); display: block; letter-spacing: .03em; } .meta b { font-family: var(--mono); font-size: 14px; font-weight: 600; }
.thumb { width: 96px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; background: var(--panel-3); border: 1px solid var(--line); flex: none; }
.thumb-sm { width: 64px; }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); border-radius: 8px; padding: 8px 13px; font: 600 13px var(--font); cursor: pointer; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: var(--panel-3); border-color: #44526a; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; } .btn-primary:hover { background: #0f7ae6; border-color: #0f7ae6; }
.btn-danger { background: #9f1239; border-color: #be123c; color: #fff; } .btn-danger:hover { background: #be123c; }
.btn-success { background: #15803d; border-color: #16a34a; color: #fff; } .btn-success:hover { background: #16a34a; }
.btn-warn { background: #92400e; border-color: #b45309; color: #fff; } .btn-warn:hover { background: #b45309; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); } .btn-ghost:hover { background: var(--panel-2); color: var(--text); }
.btn-sm { padding: 5px 9px; font-size: 12px; }
.btn-lg { padding: 12px 18px; font-size: 14px; }
.icon-btn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 6px; display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- formulários ---------- */
input, select, textarea { background: #0F141B; border: 1px solid var(--line-2); color: var(--text); border-radius: 8px; padding: 8px 10px; font: inherit; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(22, 139, 255, .18); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--blue); }
input[type=range] { padding: 0; accent-color: var(--cyan); }
input.invalid, select.invalid, textarea.invalid { border-color: var(--red); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12px; color: var(--muted); font-weight: 600; }
.field small { font-size: 11.5px; color: var(--dim); } .field .field-error { color: #fda4af; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 13px; padding: 6px 0; }
.days { display: flex; gap: 4px; flex-wrap: wrap; }
.day input { display: none; } .day span { display: inline-block; padding: 5px 9px; border-radius: 6px; border: 1px solid var(--line-2); font-size: 12px; cursor: pointer; color: var(--muted); }
.day input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input:not([type=checkbox]), .toolbar select { width: auto; min-width: 140px; }
.toolbar .search { min-width: 240px; flex: 1; max-width: 380px; }
.segmented { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.segmented button { background: none; border: 0; color: var(--muted); padding: 6px 11px; border-radius: 6px; font: 600 12.5px var(--font); cursor: pointer; }
.segmented button.on { background: var(--panel-3); color: #fff; }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 650; letter-spacing: .04em; text-transform: uppercase; padding: 9px 12px; background: var(--panel-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, .02); }
.tbl tr.is-now { background: rgba(255, 48, 79, .08); } .tbl tr.is-now td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.tbl tr.is-gap td { color: #fcd34d; }
.tbl .actions { text-align: right; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 650; border: 1px solid transparent; white-space: nowrap; }
.badge-muted { background: var(--panel-3); color: var(--muted); } .badge-blue { background: rgba(22, 139, 255, .15); color: #93c5fd; } .badge-cyan { background: rgba(0, 212, 232, .12); color: #67e8f9; }
.badge-green { background: rgba(34, 197, 94, .14); color: #86efac; } .badge-red { background: rgba(255, 48, 79, .15); color: #fda4af; } .badge-amber { background: rgba(245, 158, 11, .15); color: #fcd34d; } .badge-violet { background: rgba(167, 139, 250, .15); color: #c4b5fd; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot-operational { background: var(--green); box-shadow: 0 0 8px var(--green); } .dot-attention { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.dot-unavailable { background: var(--red); box-shadow: 0 0 8px var(--red); } .dot-not_configured { background: var(--dim); }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); } .empty .ic { color: var(--dim); } .empty p { margin: 8px 0 0; }
.list { display: flex; flex-direction: column; gap: 8px; }
.li { display: flex; gap: 12px; align-items: center; padding: 9px 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; }
.li .t { font-weight: 600; } .li .s { font-size: 12px; color: var(--muted); }
.li.now { border-color: #6b1424; background: rgba(255, 48, 79, .06); }
.li.dragging { opacity: .5; } .li.over { border-color: var(--cyan); }
.handle { cursor: grab; color: var(--dim); }

/* ---------- biblioteca ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.mcard { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.mcard:hover { border-color: var(--line-2); transform: translateY(-1px); }
.mcard .cover { position: relative; aspect-ratio: 16/9; background: var(--panel-3) center/cover; cursor: pointer; }
.mcard .cover .dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0, 0, 0, .75); padding: 1px 6px; border-radius: 4px; font: 600 11px var(--mono); }
.mcard .cover .fav { position: absolute; top: 6px; right: 6px; color: #fcd34d; }
.mcard .cover .kind { position: absolute; top: 6px; left: 6px; }
.mcard .body { padding: 10px 11px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.mcard .body b { font-size: 13px; line-height: 1.3; }
.mcard .foot { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 8px; }
.dropzone { border: 2px dashed var(--line-2); border-radius: 12px; padding: 26px; text-align: center; color: var(--muted); transition: border-color .15s, background .15s; cursor: pointer; }
.dropzone.over { border-color: var(--cyan); background: rgba(0, 212, 232, .05); }
.upload-row { display: grid; grid-template-columns: 1fr 160px 90px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }

/* ---------- grade ---------- */
.timeline { position: relative; height: 74px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.timeline .seg { position: absolute; top: 18px; bottom: 6px; border-radius: 4px; padding: 3px 5px; font-size: 10.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #fff; border: 1px solid rgba(255, 255, 255, .08); cursor: pointer; }
.timeline .seg.gap { background: repeating-linear-gradient(45deg, #3b2a06, #3b2a06 6px, #2a1f07 6px, #2a1f07 12px) !important; color: #fcd34d; }
.timeline .hours { position: absolute; top: 0; left: 0; right: 0; height: 16px; font-size: 9.5px; color: var(--dim); }
.timeline .hours span { position: absolute; transform: translateX(-50%); top: 2px; }
.timeline .nowline { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); box-shadow: 0 0 8px var(--red); z-index: 3; }
.week { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.week .col { position: relative; border-left: 1px solid var(--line); height: 960px; }
.week .head { text-align: center; padding: 6px; font-size: 12px; font-weight: 650; border-bottom: 1px solid var(--line); background: var(--panel); border-left: 1px solid var(--line); }
.week .head.today { color: var(--cyan); }
.week .hcol { position: relative; height: 960px; font-size: 10px; color: var(--dim); }
.week .hcol span { position: absolute; right: 6px; transform: translateY(-50%); }
.week .ev { position: absolute; left: 2px; right: 2px; border-radius: 4px; font-size: 10.5px; padding: 1px 4px; overflow: hidden; color: #fff; border: 1px solid rgba(255, 255, 255, .08); line-height: 1.25; }
.week .ev.gap { background: repeating-linear-gradient(45deg, #3b2a06, #3b2a06 5px, #2a1f07 5px, #2a1f07 10px); color: #fcd34d; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.month .d { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; min-height: 88px; font-size: 12px; cursor: pointer; }
.month .d.out { opacity: .35; } .month .d.today { border-color: var(--cyan); }
.month .d b { font-size: 14px; }
.month .dh { text-align: center; font-size: 11px; color: var(--muted); font-weight: 650; }
.issue { display: flex; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; align-items: flex-start; }
.issue.error { background: rgba(255, 48, 79, .1); color: #fecdd3; } .issue.warning { background: rgba(245, 158, 11, .1); color: #fde68a; } .issue.info { background: rgba(22, 139, 255, .08); color: #bfdbfe; }

/* ---------- estúdio ---------- */
.studio { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.switcher { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.sw { height: 74px; border-radius: 10px; border: 1px solid var(--line-2); background: linear-gradient(180deg, #222c3a, #161d27); color: var(--text); font: 800 13px var(--font); letter-spacing: .1em; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; box-shadow: 0 3px 0 #0a0e14; transition: transform .05s, box-shadow .05s; }
.sw small { font: 500 9.5px var(--font); letter-spacing: .02em; color: var(--muted); }
.sw:active { transform: translateY(2px); box-shadow: 0 1px 0 #0a0e14; }
.sw.take { background: linear-gradient(180deg, #b91c1c, #7f1d1d); border-color: #ef4444; }
.sw.cut { background: linear-gradient(180deg, #c2410c, #7c2d12); border-color: #f97316; }
.sw.auto { background: linear-gradient(180deg, #1d4ed8, #1e3a8a); border-color: #3b82f6; }
.sw.emerg { background: linear-gradient(180deg, #a16207, #713f12); border-color: #f59e0b; }
.sw.on { box-shadow: 0 0 0 2px var(--cyan), 0 0 18px rgba(0, 212, 232, .4); }
.sw:disabled { opacity: .4; cursor: not-allowed; }
.bigclock { font: 700 42px var(--mono); letter-spacing: .04em; text-align: center; }
.countdown { font: 700 26px var(--mono); color: var(--amber); text-align: center; }
.cmdlog { font: 12px var(--mono); max-height: 260px; overflow: auto; }
.cmdlog div { padding: 3px 0; border-bottom: 1px dashed var(--line); }

/* ---------- modal / toast ---------- */
.modal-wrap { position: fixed; inset: 0; background: rgba(2, 6, 12, .72); backdrop-filter: blur(3px); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; width: min(620px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow); animation: pop .18s; }
.modal-wide { width: min(1040px, 100%); }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal header h3 { font-size: 16px; }
.modal-body { padding: 16px 18px; overflow: auto; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: scale(.97); opacity: 0; } }
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--panel-2); border: 1px solid var(--line-2); border-left: 3px solid var(--blue); padding: 11px 14px; border-radius: 9px; box-shadow: var(--shadow); font-size: 13px; animation: pop .2s; transition: opacity .3s, transform .3s; }
.toast-error { border-left-color: var(--red); } .toast-success { border-left-color: var(--green); } .toast-warn { border-left-color: var(--amber); }
.toast.out { opacity: 0; transform: translateX(20px); }
.sim-banner { background: repeating-linear-gradient(45deg, rgba(245, 158, 11, .14), rgba(245, 158, 11, .14) 10px, rgba(245, 158, 11, .08) 10px, rgba(245, 158, 11, .08) 20px); border: 1px solid #6b4d0c; color: #fde68a; padding: 9px 14px; border-radius: 9px; font-weight: 700; letter-spacing: .06em; font-size: 12.5px; }
.note { background: rgba(22, 139, 255, .07); border: 1px solid rgba(22, 139, 255, .25); color: #bfdbfe; padding: 10px 13px; border-radius: 9px; font-size: 12.5px; }
.note.warn { background: rgba(245, 158, 11, .07); border-color: rgba(245, 158, 11, .3); color: #fde68a; }
.chart { width: 100%; height: 160px; display: block; }
.chart-labels { display: flex; font-size: 9.5px; color: var(--dim); } .chart-labels span { text-align: center; overflow: hidden; }
.bars .b { display: grid; grid-template-columns: 120px 1fr 60px; gap: 10px; align-items: center; font-size: 12.5px; margin: 6px 0; }
.bars .b i { display: block; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; }
code, .code { font-family: var(--mono); font-size: 12px; background: #0A0E14; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
pre.code { padding: 10px 12px; overflow: auto; white-space: pre-wrap; word-break: break-all; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line-2); border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- login ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 20% -10%, rgba(22, 139, 255, .18), transparent), radial-gradient(900px 500px at 110% 110%, rgba(0, 212, 232, .12), transparent), var(--bg); }
.auth-card { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.auth-card .brand { border: 0; padding: 0 0 18px; }
.auth-card .stack > * + * { margin-top: 12px; }

/* ---------- responsivo ---------- */
@media (max-width: 1200px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main { grid-template-columns: 1fr; } }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; left: 0; top: 0; width: 270px; transform: translateX(-100%); transition: transform .2s; }
  .app.nav-open .side { transform: none; box-shadow: var(--shadow); }
  .app.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 40; }
  .topbar .menu-btn { display: inline-grid; }
  .g2, .g3, .studio { grid-template-columns: 1fr; }
  .content { padding: 16px 14px 40px; }
  .topbar { padding: 8px 12px; gap: 8px; }
  .top-clock { font-size: 16px; }
  .user-chip b, .user-chip small { display: none; }
  .week { grid-template-columns: 40px repeat(7, minmax(80px, 1fr)); overflow-x: auto; }
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .switcher { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tbl.responsive thead { display: none; }
  .tbl.responsive tr { display: block; border-bottom: 1px solid var(--line); padding: 6px 0; }
  .tbl.responsive td { display: flex; justify-content: space-between; gap: 10px; border: 0; padding: 4px 12px; }
  .tbl.responsive td::before { content: attr(data-label); color: var(--muted); font-size: 11px; }
  .station-select { max-width: 130px; }
  .upload-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
