/* Estudio de Video Educativo — hoja de estilos común
   Paleta oscura (estándar en editores de video: no compite con la imagen)
   con acentos institucionales UNACHI (Pantone 364C verde / 187C rojo). */
:root {
  --bg: #121417;
  --panel: #1a1d21;
  --panel-2: #22262b;
  --panel-3: #2a2f35;
  --line: #31373e;
  --line-2: #3d444c;
  --text: #e7eaed;
  --muted: #929ba4;
  --faint: #6b747d;
  --green: #4A7729;          /* Pantone 364C */
  --green-hi: #7fb069;
  --green-soft: rgba(127, 176, 105, .16);
  --red: #A6192E;            /* Pantone 187C */
  --red-hi: #e0475d;
  --amber: #e2a54a;
  --blue: #5b9bd5;
  --violet: #a487d6;
  --radius: 8px;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--sans); }
a { color: var(--green-hi); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.row { display: flex; gap: 8px; align-items: center; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line-2);
  background: var(--panel-2); cursor: pointer; white-space: nowrap; font-weight: 520;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--panel-3); border-color: #4a525b; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--green-hi); outline-offset: 1px;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--green); border-color: #5d8f3a; color: #fff; }
.btn.primary:hover { background: #568a30; }
.btn.danger { background: transparent; border-color: #6b2a34; color: #f08a98; }
.btn.danger:hover { background: rgba(166, 25, 46, .2); }
.btn.rec { background: var(--red); border-color: #c4334a; color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.sm { height: 26px; padding: 0 8px; font-size: 12.5px; }
.btn.icon { width: 32px; padding: 0; }
.btn.sm.icon { width: 26px; }
.btn.active { background: var(--green-soft); border-color: var(--green-hi); color: var(--green-hi); }

/* Formularios */
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
label.f > span { font-weight: 560; }
input[type=text], input[type=password], input[type=number], input[type=search], input[type=url],
select, textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line-2); border-radius: 6px;
  padding: 6px 8px; min-height: 32px; color: var(--text);
}
textarea { resize: vertical; min-height: 64px; line-height: 1.4; }
input[type=color] { width: 40px; height: 30px; padding: 2px; background: var(--bg);
  border: 1px solid var(--line-2); border-radius: 6px; }
input[type=range] { width: 100%; accent-color: var(--green-hi); }
input[type=checkbox] { accent-color: var(--green-hi); width: 15px; height: 15px; }
label.chk { display: flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

/* Tarjetas y diálogos */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
dialog {
  background: var(--panel); color: var(--text); border: 1px solid var(--line-2);
  border-radius: 12px; padding: 0; width: min(560px, calc(100vw - 32px));
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
}
dialog::backdrop { background: rgba(5, 7, 9, .65); }
dialog .dlg-h { padding: 16px 18px 6px; display: flex; align-items: center; gap: 8px; }
dialog .dlg-b { padding: 10px 18px 16px; display: flex; flex-direction: column; gap: 12px; }
dialog .dlg-f { padding: 12px 18px 16px; display: flex; justify-content: flex-end; gap: 8px;
  border-top: 1px solid var(--line); }

/* Avisos */
#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column;
  gap: 8px; z-index: 1000; }
.toast { background: var(--panel-3); border: 1px solid var(--line-2); border-left: 3px solid var(--green-hi);
  padding: 10px 14px; border-radius: 8px; max-width: 380px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
  animation: tin .18s ease-out; }
.toast.err { border-left-color: var(--red-hi); }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }

.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 10px;
  font-size: 11px; font-weight: 600; background: var(--panel-3); color: var(--muted); }
.badge.ok { background: var(--green-soft); color: var(--green-hi); }
.badge.warn { background: rgba(226, 165, 74, .15); color: var(--amber); }
.badge.err { background: rgba(224, 71, 93, .15); color: var(--red-hi); }

.brandmark { display: flex; align-items: center; gap: 10px; }
.brandmark .logo { width: 30px; height: 30px; border-radius: 7px; position: relative; overflow: hidden;
  background: var(--green); flex: none; }
.brandmark .logo::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 34%;
  background: var(--red); }
.brandmark .logo::before { content: ""; position: absolute; left: 7px; top: 9px; border-style: solid;
  border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #fff; z-index: 1; }
.brandmark b { font-size: 15px; letter-spacing: -.01em; }
.brandmark small { display: block; color: var(--muted); font-size: 11.5px; margin-top: -2px; }

.progress { height: 6px; background: var(--panel-3); border-radius: 3px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--green-hi); width: 0; transition: width .4s; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #3a4148; border-radius: 6px; border: 2px solid var(--panel); }
::-webkit-scrollbar-track { background: transparent; }
