/* ── La Secretaria — tema oscuro académico ──────────────────────────────────── */
:root {
  --bg: #0d1017;
  --bg-soft: #12161f;
  --panel: #161b26;
  --panel-2: #1c2230;
  --line: #262d3b;
  --line-2: #333c4d;
  --txt: #e8edf5;
  --muted: #93a0b4;
  --faint: #6b7688;
  --accent: #9b2242;        /* guinda UAGRM */
  --accent-2: #c8a24a;      /* dorado */
  --ok: #3fb950;
  --shadow: 0 12px 40px rgba(0,0,0,.45);
  --r: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(155,34,66,.14), transparent 55%),
    radial-gradient(900px 500px at -10% 10%, rgba(200,162,74,.08), transparent 50%),
    var(--bg);
  color: var(--txt);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px; border-bottom: 1px solid var(--line);
  background: rgba(13,16,23,.7); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(160deg, var(--accent), #6d1730);
  font-family: 'Fraunces', serif; font-size: 26px; color: #fff; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), var(--shadow);
}
.brand-name { font-family: 'Fraunces', serif; font-weight: 600; font-size: 20px; letter-spacing: .2px; }
.brand-tag { font-size: 12.5px; color: var(--muted); margin-top: 1px; }

/* Layout */
.wrap { max-width: 920px; margin: 34px auto 80px; padding: 0 22px; display: flex; flex-direction: column; gap: 22px; }

.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 26px 26px 24px; box-shadow: var(--shadow);
}
.card-head h1 { font-family: 'Fraunces', serif; font-weight: 600; font-size: 26px; margin: 0 0 4px; }
.card-head h2 { font-family: 'Fraunces', serif; font-weight: 600; font-size: 21px; margin: 0 0 3px; }
.card-head.row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.muted { color: var(--muted); font-size: 14px; margin: 0; }
.opt { color: var(--faint); font-weight: 400; font-size: 12px; }

/* Form grid */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 22px 0 6px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-wide { grid-column: 1 / -1; }
.field > span { font-size: 13px; color: var(--muted); font-weight: 500; }
select, input[type="text"], input[type="date"], input[type="time"] {
  width: 100%; padding: 12px 13px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--txt);
  font-family: inherit; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s;
}
select:focus, input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(155,34,66,.18); }
select:disabled { opacity: .5; cursor: not-allowed; }
input::placeholder { color: var(--faint); }
/* forzar iconos de date/time legibles en dark */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(.75); cursor: pointer; }

/* Buttons */
.actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.actions.end { justify-content: flex-end; }
.primary-btn {
  background: linear-gradient(160deg, var(--accent), #7d1a34); color: #fff;
  border: none; border-radius: 11px; padding: 13px 22px; font-size: 15px; font-weight: 600;
  cursor: pointer; font-family: inherit; box-shadow: 0 6px 18px rgba(155,34,66,.35);
  transition: transform .08s, filter .15s;
}
.primary-btn:hover { filter: brightness(1.08); }
.primary-btn:active { transform: translateY(1px); }
.primary-btn:disabled { opacity: .55; cursor: default; filter: none; box-shadow: none; }
.ghost-btn {
  background: transparent; color: var(--txt); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 10px 16px; font-size: 14px; font-weight: 500;
  cursor: pointer; font-family: inherit; text-decoration: none; display: inline-block; white-space: nowrap;
  transition: border-color .15s, background .15s;
}
.ghost-btn:hover { border-color: var(--accent-2); background: rgba(200,162,74,.08); }
.hint { color: var(--faint); font-size: 13px; }

/* Asientos del tribunal */
.asientos { display: flex; flex-direction: column; gap: 12px; margin: 20px 0 4px; }
.asiento {
  display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 14px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px;
}
.asiento .rol {
  font-weight: 600; font-size: 14px;
  display: flex; flex-direction: column; gap: 3px;
}
.asiento .rol .area { font-weight: 400; font-size: 12px; color: var(--muted); }
.asiento .rol .badge-fijo {
  display: inline-block; margin-top: 3px; width: fit-content; font-size: 10.5px; font-weight: 600;
  color: var(--accent-2); border: 1px solid rgba(200,162,74,.4); border-radius: 20px; padding: 1px 8px;
}
.asiento .doc-input { position: relative; }
.asiento input.doc {
  width: 100%; padding: 10px 12px; font-size: 14.5px;
  background: var(--bg-soft); border: 1px solid var(--line-2); border-radius: 9px; color: var(--txt);
}
.asiento input.doc.vacio { border-color: #6d3a12; }
.mini-btn {
  background: transparent; border: 1px solid var(--line-2); color: var(--muted);
  border-radius: 8px; width: 38px; height: 38px; cursor: pointer; font-size: 16px;
  transition: border-color .15s, color .15s;
}
.mini-btn:hover { border-color: var(--accent-2); color: var(--accent-2); }
.mini-btn:disabled { opacity: .3; cursor: default; }

.aviso {
  background: rgba(200,162,74,.08); border: 1px solid rgba(200,162,74,.3);
  color: var(--accent-2); border-radius: 10px; padding: 14px 16px; font-size: 14px; margin: 18px 0 4px;
}

/* Toast */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--txt);
  padding: 13px 20px; border-radius: 10px; box-shadow: var(--shadow); font-size: 14px; z-index: 50;
}
.toast.err { border-color: var(--accent); }

.hidden { display: none !important; }

@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  .asiento { grid-template-columns: 1fr; align-items: stretch; }
  .asiento .mini-btn { justify-self: end; }
}
