/* ==========================================================================
   Fundación A+ · Sistema de diseño AMAS
   Paleta extraída del logotipo institucional
   ========================================================================== */

:root {
  /* Marca */
  --violet: #6B3FB5;
  --violet-600: #5A33A0;
  --violet-100: #EDE6F9;
  --teal: #5FD1C4;
  --teal-600: #3FB6A8;
  --teal-100: #E3F7F4;
  --orange: #F5A65A;
  --orange-600: #E08F3E;
  --orange-100: #FDEFE0;
  --ochre: #A66A35;
  --ochre-100: #F4EBE2;
  --coral: #E85A75;
  --coral-600: #D2445F;
  --coral-100: #FCE6EB;

  /* Neutros */
  --ink: #1E1B2E;
  --ink-2: #3D3955;
  --ink-3: #6E6A85;
  --ink-4: #A29EB5;
  --line: #E6E3EF;
  --surface: #FFFFFF;
  --surface-2: #F7F6FB;
  --bg: #F1EFF7;

  /* Tokens semánticos */
  --primary: var(--violet);
  --primary-hover: var(--violet-600);
  --accent: var(--teal);
  --danger: var(--coral);
  --warning: var(--orange);
  --success: var(--teal-600);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(30, 27, 46, .05), 0 1px 3px rgba(30, 27, 46, .06);
  --shadow: 0 6px 20px -6px rgba(30, 27, 46, .12), 0 2px 6px rgba(30, 27, 46, .04);
  --shadow-lg: 0 24px 60px -20px rgba(107, 63, 181, .35), 0 8px 24px -8px rgba(30, 27, 46, .12);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sidebar-w: 268px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
button, input { font: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
:focus-visible { outline: 3px solid rgba(107, 63, 181, .35); outline-offset: 2px; }

/* --------------------------------------------------------------------------
   Utilidades
   -------------------------------------------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; cursor: pointer; transition: .18s ease;
  white-space: nowrap;
}
.btn-primary {
  color: #fff; background: linear-gradient(135deg, var(--violet) 0%, #7E52CC 100%);
  box-shadow: 0 8px 18px -8px rgba(107, 63, 181, .7);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -8px rgba(107, 63, 181, .8); color: #fff; }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }

/* Alertas */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 10px; font-size: 14px; border: 1px solid;
  margin-bottom: 18px;
}
.alert svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.alert-error { background: var(--coral-100); color: #9F2B43; border-color: #F6C3CE; }
.alert-success { background: var(--teal-100); color: #1E6F66; border-color: #B8E9E2; }
.alert-info { background: var(--violet-100); color: #4C2C87; border-color: #D8CBF0; }

/* Badges por rol */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .01em;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-administrador { background: var(--violet-100); color: var(--violet-600); }
.badge-docente { background: var(--teal-100); color: #1E6F66; }
.badge-gestion { background: var(--orange-100); color: #9A5A1A; }
.badge-estudiante { background: var(--coral-100); color: var(--coral-600); }
.badge-ok { background: var(--teal-100); color: #1E6F66; }
.badge-off { background: var(--surface-2); color: var(--ink-3); }

/* ==========================================================================
   LOGIN
   ========================================================================== */
.login-page {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr;
}
.login-brand {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 600px at -10% -10%, rgba(95, 209, 196, .45), transparent 60%),
              radial-gradient(900px 500px at 110% 110%, rgba(232, 90, 117, .45), transparent 60%),
              linear-gradient(160deg, #4E2B8F 0%, var(--violet) 55%, #7E52CC 100%);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px 56px;
}
.login-brand .orb {
  position: absolute; border-radius: 50%; filter: blur(2px); opacity: .9;
  animation: float 12s ease-in-out infinite;
}
.orb-1 { width: 220px; height: 220px; background: var(--teal); top: 12%; right: -60px; opacity: .55; animation-delay: -2s; }
.orb-2 { width: 140px; height: 140px; background: var(--orange); bottom: 26%; left: -40px; opacity: .6; animation-delay: -6s; }
.orb-3 { width: 90px; height: 90px; background: var(--coral); top: 58%; right: 18%; opacity: .7; animation-delay: -4s; }
.orb-4 { width: 60px; height: 60px; background: var(--ochre); top: 32%; left: 22%; opacity: .55; animation-delay: -8s; }
@keyframes float { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-18px) } }

.login-brand .logo-wrap {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 14px;
}
.login-brand .logo-wrap img {
  width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 14px; padding: 6px;
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.45);
}
.login-brand .logo-wrap strong { font-size: 18px; letter-spacing: -.01em; display: block; }
.login-brand .logo-wrap span { font-size: 12px; opacity: .8; text-transform: uppercase; letter-spacing: .12em; }

.login-brand .hero { position: relative; z-index: 1; max-width: 520px; }
.login-brand .hero h1 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; }
.login-brand .hero h1 em { font-style: normal; color: var(--teal); }
.login-brand .hero p { margin: 18px 0 0; font-size: 16px; opacity: .88; line-height: 1.65; }
.login-brand .pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.login-brand .pill {
  padding: 7px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(6px);
  display: inline-flex; align-items: center; gap: 7px;
}
.login-brand .pill i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.login-brand .foot { position: relative; z-index: 1; font-size: 12.5px; opacity: .7; }

.login-panel {
  display: flex; align-items: center; justify-content: center; padding: 40px 24px;
  background: var(--bg);
}
.login-card {
  width: 100%; max-width: 440px; background: var(--surface); border-radius: var(--radius-lg);
  padding: 44px 40px; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.7);
  animation: rise .5s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }
.login-card .mobile-logo { display: none; margin: 0 auto 20px; width: 72px; }
.login-card h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.login-card .lead { margin: 6px 0 28px; color: var(--ink-3); font-size: 14.5px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.control { position: relative; }
.control > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-4); pointer-events: none; }
.control input {
  width: 100%; height: 48px; padding: 0 44px 0 44px; border-radius: 11px;
  border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink);
  transition: .18s ease;
}
.control input::placeholder { color: var(--ink-4); }
.control input:focus { outline: none; border-color: var(--violet); background: #fff; box-shadow: 0 0 0 4px rgba(107,63,181,.12); }
.control input.is-invalid { border-color: var(--coral); }
.control .toggle-pw {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; color: var(--ink-4);
  display: inline-flex; align-items: center; justify-content: center;
}
.control .toggle-pw:hover { background: var(--violet-100); color: var(--violet); }
.control .toggle-pw svg { width: 18px; height: 18px; }
.field .help { font-size: 12.5px; color: var(--coral-600); margin-top: 6px; }

.form-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 22px; font-size: 13.5px; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); cursor: pointer; }
.checkbox input { accent-color: var(--violet); width: 16px; height: 16px; }

.login-note {
  margin-top: 26px; padding: 12px 14px; border-radius: 10px; font-size: 12.5px; color: var(--ink-3);
  background: var(--surface-2); border: 1px dashed var(--line); display: flex; gap: 10px; align-items: flex-start;
}
.login-note svg { flex: none; width: 16px; height: 16px; color: var(--violet); margin-top: 1px; }

@media (max-width: 960px) {
  .login-page { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-card .mobile-logo { display: block; }
  .login-panel { padding: 24px 16px; min-height: 100vh; background:
    radial-gradient(600px 300px at 0% 0%, rgba(95,209,196,.25), transparent 60%),
    radial-gradient(600px 300px at 100% 100%, rgba(232,90,117,.22), transparent 60%), var(--bg); }
}
@media (max-width: 480px) { .login-card { padding: 32px 22px; } }

/* ==========================================================================
   DASHBOARD
   ========================================================================== */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, #2A1A55 0%, #3E2680 60%, #4E2B8F 100%);
  color: #fff; display: flex; flex-direction: column; padding: 22px 16px;
}
.sidebar .brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar .brand img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 12px; padding: 5px; }
.sidebar .brand strong { display: block; font-size: 15.5px; line-height: 1.2; }
.sidebar .brand span { font-size: 11px; opacity: .7; letter-spacing: .1em; text-transform: uppercase; }

.nav-section { margin-top: 22px; }
.nav-section .nav-title { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .5; padding: 0 12px; margin-bottom: 8px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: rgba(255,255,255,.78); font-weight: 500; font-size: 14.5px; transition: .15s ease; margin-bottom: 2px;
}
.nav a svg { width: 19px; height: 19px; flex: none; opacity: .9; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.active { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 3px 0 0 var(--teal); }
.nav a .count { margin-left: auto; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--coral); color: #fff; font-weight: 700; }

.sidebar .user-card {
  margin-top: auto; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 12px;
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #fff; flex: none;
  background: linear-gradient(135deg, var(--teal) 0%, var(--violet) 100%);
}
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.user-card .info { min-width: 0; flex: 1; }
.user-card .info strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card .info span { font-size: 12px; opacity: .7; }
.user-card form { margin: 0; }
.user-card button {
  width: 34px; height: 34px; border-radius: 9px; border: 0; background: rgba(255,255,255,.1); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.user-card button:hover { background: var(--coral); }
.user-card button svg { width: 17px; height: 17px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 10; height: 68px; display: flex; align-items: center; gap: 16px;
  padding: 0 28px; background: rgba(247,246,251,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar .menu-btn { display: none; }
.topbar .search { flex: 1; max-width: 420px; position: relative; }
.topbar .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink-4); }
.topbar .search input { width: 100%; height: 40px; padding: 0 12px 0 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.topbar .search input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(107,63,181,.12); }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); border: 2px solid #fff; }
.topbar .who { display: flex; align-items: center; gap: 10px; }
.topbar .who .avatar { width: 36px; height: 36px; font-size: 13px; }
.topbar .who .meta { line-height: 1.15; }
.topbar .who .meta strong { display: block; font-size: 13.5px; }
.topbar .who .meta span { font-size: 12px; color: var(--ink-3); }

.content { padding: 28px; display: grid; gap: 22px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.page-head p { margin: 4px 0 0; color: var(--ink-3); }
.page-head .actions { display: flex; gap: 10px; }

/* Bienvenida */
.welcome {
  border-radius: var(--radius-lg); padding: 26px 28px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(700px 300px at 100% 0%, rgba(95,209,196,.5), transparent 60%),
              radial-gradient(500px 300px at 0% 100%, rgba(245,166,90,.45), transparent 60%),
              linear-gradient(135deg, #4E2B8F 0%, var(--violet) 100%);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.welcome h2 { font-size: 22px; font-weight: 800; }
.welcome p { margin: 6px 0 0; opacity: .88; max-width: 560px; }
.welcome .role-chip svg { width: 16px; height: 16px; }
.welcome .role-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 13px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(6px);
}
.welcome .deco { position: absolute; right: -30px; bottom: -60px; width: 220px; opacity: .12; transform: rotate(-12deg); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow-sm); display: flex; gap: 14px; align-items: flex-start; transition: .18s ease;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat .ico { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.stat .ico svg { width: 22px; height: 22px; }
.stat.tone-violet .ico { background: var(--violet-100); color: var(--violet); }
.stat.tone-teal .ico { background: var(--teal-100); color: var(--teal-600); }
.stat.tone-orange .ico { background: var(--orange-100); color: var(--orange-600); }
.stat.tone-coral .ico { background: var(--coral-100); color: var(--coral-600); }
.stat .label { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.stat .value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 2px 0; }
.stat .hint { font-size: 12px; color: var(--ink-4); }

/* Cards */
.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-head h3 { font-size: 15.5px; }
.card-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-3); }
.card-body { padding: 20px 22px; }

/* Tabla */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; padding: 12px 22px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.table td { padding: 13px 22px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #FBFAFE; }
.table .person { display: flex; align-items: center; gap: 12px; }
.table .person .avatar { width: 34px; height: 34px; font-size: 12px; }
.table .person strong { display: block; font-size: 14px; }
.table .person span { font-size: 12.5px; color: var(--ink-3); }

/* Roles bars */
.role-bars { display: grid; gap: 14px; }
.role-bar .top { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 6px; }
.role-bar .top strong { font-weight: 600; }
.role-bar .track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.role-bar .fill { height: 100%; border-radius: 999px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.fill-administrador { background: var(--violet); }
.fill-docente { background: var(--teal); }
.fill-gestion { background: var(--orange); }
.fill-estudiante { background: var(--coral); }

/* Timeline */
.timeline { display: grid; gap: 0; }
.timeline .item { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.timeline .item:last-child { border-bottom: 0; }
.timeline .mark { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.timeline .mark svg { width: 14px; height: 14px; }
.timeline .mark.ok { background: var(--teal-100); color: var(--teal-600); }
.timeline .mark.fail { background: var(--coral-100); color: var(--coral-600); }
.timeline .txt strong { font-size: 13.5px; display: block; }
.timeline .txt span { font-size: 12px; color: var(--ink-3); }
.timeline time { font-size: 12px; color: var(--ink-4); white-space: nowrap; }

.empty { text-align: center; padding: 28px 12px; color: var(--ink-3); font-size: 14px; }

/* Quick actions */
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.quick a {
  display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); transition: .15s ease;
}
.quick a:hover { border-color: var(--violet); background: var(--violet-100); }
.quick a .ico { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--violet); border: 1px solid var(--line); }
.quick a .ico svg { width: 18px; height: 18px; }
.quick a strong { display: block; font-size: 13.5px; }
.quick a span { font-size: 12px; color: var(--ink-3); }

.footer { padding: 18px 28px; font-size: 12.5px; color: var(--ink-4); border-top: 1px solid var(--line); margin-top: auto; }

/* Toast */
.toast {
  position: fixed; right: 22px; bottom: 22px; z-index: 50; min-width: 280px; max-width: 380px;
  padding: 14px 16px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg);
  display: flex; gap: 10px; align-items: center; animation: rise .4s both;
}
.toast svg { width: 18px; height: 18px; color: var(--teal); flex: none; }
.toast.error svg { color: var(--coral); }

/* Responsive */
@media (max-width: 1200px) { .stats { grid-template-columns: repeat(2, 1fr); } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 40; width: var(--sidebar-w); transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(30,27,46,.45); }
  .topbar .menu-btn { display: inline-flex; }
  .topbar .search { display: none; }
  .content { padding: 18px; }
  .topbar { padding: 0 18px; }
  .topbar .who .meta { display: none; }
}
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } .quick { grid-template-columns: 1fr; } }

/* ==========================================================================
   MÓDULO RRHH · formularios, tabs, modales, paginación
   ========================================================================== */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--violet); }
.breadcrumb svg { width: 14px; height: 14px; }

.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px 18px; }
.col-12 { grid-column: span 12; } .col-8 { grid-column: span 8; } .col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; } .col-3 { grid-column: span 3; } .col-9 { grid-column: span 9; }
.form-grid .field { margin-bottom: 0; }
.field label .req { color: var(--coral); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--surface-2); color: var(--ink); transition: .18s ease; font: inherit;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.select { appearance: none; -webkit-appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E6A85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--violet); background: #fff; box-shadow: 0 0 0 4px rgba(107,63,181,.12); }
.input.is-invalid, .select.is-invalid { border-color: var(--coral); }
.input[type="date"] { min-height: 44px; }
.input-money { position: relative; }
.input-money::before { content: "$"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-4); font-weight: 600; }
.input-money .input { padding-left: 30px; }

.file-drop {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px;
  border: 1.5px dashed var(--line); background: var(--surface-2); cursor: pointer; transition: .18s ease; position: relative;
}
.file-drop:hover { border-color: var(--violet); background: var(--violet-100); }
.file-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-drop .ico { width: 42px; height: 42px; border-radius: 10px; background: #fff; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--violet); flex: none; }
.file-drop .ico svg { width: 20px; height: 20px; }
.file-drop strong { display: block; font-size: 13.5px; }
.file-drop span { font-size: 12.5px; color: var(--ink-3); }
.file-drop .fname { color: var(--violet); font-weight: 600; }
.file-current { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }
.file-current svg { width: 15px; height: 15px; }

.form-section { margin-bottom: 22px; }
.form-section .card-head { background: var(--surface-2); }
.form-section .card-head .num { width: 28px; height: 28px; border-radius: 8px; background: var(--violet); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; margin-right: 10px; }
.form-section .card-head h3 { display: flex; align-items: center; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 5; }
.btn-danger { background: var(--coral-100); color: var(--coral-600); border-color: #F6C3CE; }
.btn-danger:hover { background: var(--coral); color: #fff; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 8px; }
.btn-icon svg { width: 16px; height: 16px; }

/* Toolbar listado */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.toolbar .search { position: relative; flex: 1; min-width: 240px; max-width: 420px; }
.toolbar .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink-4); }
.toolbar .search input { width: 100%; height: 42px; padding: 0 12px 0 38px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; }
.toolbar .search input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(107,63,181,.12); }
.toolbar .select { width: auto; min-width: 190px; min-height: 42px; background-color: #fff; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; color: var(--ink-2); }
.chip:hover { border-color: var(--violet); color: var(--violet); }
.chip.active { background: var(--violet); border-color: var(--violet); color: #fff; }
.chip b { font-weight: 700; }

.badge-activo { background: var(--teal-100); color: #1E6F66; }
.badge-inactivo { background: var(--surface-2); color: var(--ink-3); }
.badge-proceso { background: var(--orange-100); color: #9A5A1A; }
.badge-sin_antecedentes { background: var(--teal-100); color: #1E6F66; }
.badge-con_antecedentes { background: var(--coral-100); color: var(--coral-600); }
.badge-pendiente { background: var(--orange-100); color: #9A5A1A; }
.badge-vencido { background: var(--coral-100); color: var(--coral-600); }
.badge-neutral { background: var(--violet-100); color: var(--violet-600); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.table .actions form { margin: 0; }

.avatar-img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar-img.lg { width: 88px; height: 88px; border-radius: 22px; }
.avatar.xl { width: 88px; height: 88px; border-radius: 22px; font-size: 30px; }

/* Paginación */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.pagination ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.pagination a, .pagination span.cur { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-weight: 500; }
.pagination a:hover { border-color: var(--violet); color: var(--violet); }
.pagination span.cur { background: var(--violet); border-color: var(--violet); color: #fff; }

/* Ficha */
.profile-head { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.profile-head .meta { flex: 1; min-width: 240px; }
.profile-head h1 { font-size: 24px; }
.profile-head .sub { color: var(--ink-3); font-size: 14px; margin-top: 2px; }
.profile-head .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.profile-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-head .actions form { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.kpi .l { font-size: 12px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.kpi .v { font-size: 20px; font-weight: 800; margin-top: 2px; }
.kpi .v small { font-size: 12px; font-weight: 500; color: var(--ink-3); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 22px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 14px 14px; font: inherit; font-weight: 600; font-size: 14px; color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.tabs button svg { width: 16px; height: 16px; }
.tabs button .n { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink-3); }
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--violet); border-bottom-color: var(--violet); }
.tabs button.active .n { background: var(--violet-100); color: var(--violet); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 22px; }
.dl > div { min-width: 0; }
.dl dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-4); font-weight: 700; margin-bottom: 3px; }
.dl dd { margin: 0; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.dl dd.empty { color: var(--ink-4); text-align: left; }
.dl > div { text-align: left; }
.subhead { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--violet); margin: 22px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.subhead:first-child { margin-top: 0; }

/* Timeline de experiencia / formación */
.xp { display: grid; gap: 0; }
.xp .item { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.xp .item:last-child { border-bottom: 0; }
.xp .ico { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--violet-100); color: var(--violet); }
.xp .ico.teal { background: var(--teal-100); color: var(--teal-600); }
.xp .ico svg { width: 20px; height: 20px; }
.xp .body strong { font-size: 15px; display: block; }
.xp .body .org { color: var(--ink-2); font-size: 14px; }
.xp .body .dates { color: var(--ink-3); font-size: 13px; margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.xp .body p { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-2); white-space: pre-line; }
.xp .body .extra { margin-top: 8px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.xp .side { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.xp .side form { margin: 0; }
.link-file { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.link-file svg { width: 15px; height: 15px; }

/* Modal */
dialog.modal { border: 0; padding: 0; border-radius: var(--radius-lg); width: min(760px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); background: var(--surface); color: var(--ink); }
dialog.modal::backdrop { background: rgba(30,27,46,.55); backdrop-filter: blur(3px); }
dialog.modal .m-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--line); }
dialog.modal .m-head h3 { font-size: 17px; }
dialog.modal .m-body { padding: 22px 24px; max-height: 70vh; overflow-y: auto; }
dialog.modal .m-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--surface-2); }
dialog.modal form { margin: 0; }
.m-errors { margin-bottom: 16px; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--ink-3); }
.empty-state .ico { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 12px; background: var(--violet-100); color: var(--violet); display: inline-flex; align-items: center; justify-content: center; }
.empty-state .ico svg { width: 26px; height: 26px; }
.empty-state strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

@media (max-width: 900px) {
  .col-8, .col-6, .col-4, .col-3, .col-9 { grid-column: span 12; }
  .col-6.sm-6 { grid-column: span 6; }
  .dl { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .xp .item { grid-template-columns: 1fr; }
  .xp .ico { display: none; }
  .xp .side { flex-direction: row; align-items: center; }
}
@media (max-width: 560px) { .dl { grid-template-columns: 1fr; } .kpis { grid-template-columns: 1fr; } }
.i-inline { width: 13px; height: 13px; vertical-align: -2px; }
.xp .extra svg { width: 13px; height: 13px; vertical-align: -2px; }

/* Documentos y credenciales temporales */
.docs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.doc { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; border: 1.5px dashed var(--line); background: var(--surface-2); }
.doc.has { border-style: solid; background: #fff; }
.doc .ico { width: 42px; height: 42px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--violet-100); color: var(--violet); flex: none; }
.doc.has .ico { background: var(--teal-100); color: var(--teal-600); }
.doc .ico svg { width: 20px; height: 20px; }
.doc .txt { flex: 1; min-width: 0; }
.doc .txt strong { display: block; font-size: 14px; }
.doc .txt span { font-size: 12.5px; color: var(--ink-3); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.temp-pass { background: var(--violet-100); border-color: #D8CBF0; color: #3D2A6E; }
.temp-pass .creds { display: flex; gap: 18px; flex-wrap: wrap; margin: 8px 0; font-size: 14px; }
.temp-pass code, .dl code, .empty-state code { background: #fff; border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; font-size: 13.5px; font-weight: 700; color: var(--violet-600); }
.input[readonly] { background: #F0EEF6; color: var(--ink-3); cursor: not-allowed; }
@media (max-width: 700px) { .docs { grid-template-columns: 1fr; } }
.chip-info { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; color: var(--ink-2); }
.chip-info .badge { align-self: flex-start; }
.badge-permiso { background: var(--orange-100); color: #9A5A1A; }
.badge-fuerza_mayor { background: var(--violet-100); color: var(--violet-600); }
.badge-ausente { background: var(--coral-100); color: var(--coral-600); }
.badge-tardanza { background: var(--orange-100); color: #9A5A1A; }
.badge-presente { background: var(--teal-100); color: #1E6F66; }
.nov-table td { padding: 8px 10px; }
.novedades-btn { white-space: nowrap; }
.aus-list { margin: 4px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--ink-3); }
.aus-list li { display: flex; gap: 6px; align-items: center; }
.aus-list i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: var(--coral); }
.aus-list i.ok { background: var(--violet); }
/* Cuentas de cobro */
.check-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; font-size: 14px; color: var(--ink-3); }
.check-list li { display: flex; gap: 8px; align-items: center; }
.check-list li svg { width: 16px; height: 16px; color: var(--coral-600); }
.check-list li.ok { color: var(--ink); }
.check-list li.ok svg { color: var(--teal-600); }
.firma-preview { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: repeating-conic-gradient(#f3f2f8 0 25%, #fff 0 50%) 0 0/16px 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.firma-preview img { max-height: 80px; max-width: 100%; }
dialog.modal.confirm { width: min(460px, calc(100vw - 32px)); }

/* ==========================================================================
   HORARIOS · cuadrícula semanal
   ========================================================================== */
.c-violet { --c: var(--violet); --c-bg: var(--violet-100); --c-tx: var(--violet-600); }
.c-teal   { --c: var(--teal-600); --c-bg: var(--teal-100); --c-tx: #1E6F66; }
.c-orange { --c: var(--orange-600); --c-bg: var(--orange-100); --c-tx: #9A5A1A; }
.c-coral  { --c: var(--coral); --c-bg: var(--coral-100); --c-tx: var(--coral-600); }
.c-ochre  { --c: var(--ochre); --c-bg: var(--ochre-100); --c-tx: #6E4520; }
.c-indigo { --c: #4F46E5; --c-bg: #E0E7FF; --c-tx: #3730A3; }
.c-green  { --c: #16A34A; --c-bg: #DCFCE7; --c-tx: #166534; }
.c-slate  { --c: #64748B; --c-bg: #E2E8F0; --c-tx: #334155; }
.badge-color { background: var(--c-bg); color: var(--c-tx); }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; }

.tt-wrap { overflow-x: auto; padding: 18px 22px 22px; }
.tt { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(150px, 1fr)); grid-template-rows: 34px var(--h); gap: 0 6px; min-width: 700px; }
.tt-corner { grid-row: 1; }
.tt-day { grid-row: 1; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); text-align: center; padding-top: 8px; }
.tt-hours { grid-row: 2; grid-column: 1; position: relative; }
.tt-hour { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--ink-4); }
.tt-col { grid-row: 2; position: relative; background: var(--surface-2); border-radius: 10px; border: 1px solid var(--line); }
.tt-line { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line); }
.tt-block { position: absolute; left: 4px; right: 4px; border-radius: 8px; padding: 6px 8px; background: var(--c-bg); border-left: 4px solid var(--c); color: var(--c-tx); overflow: hidden; box-shadow: var(--shadow-sm); transition: .15s ease; }
.tt-block[data-open] { cursor: pointer; }
.tt-block[data-open]:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.tt-block.mine { outline: 2px solid var(--c); }
.tt-block.dim { opacity: .45; }
.tt-time { font-size: 10.5px; font-weight: 700; opacity: .85; }
.tt-title { font-size: 12.5px; font-weight: 700; line-height: 1.25; margin-top: 2px; color: var(--ink); }
.tt-doc { font-size: 11px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.print-only { display: none; }
@media print {
  .sidebar, .topbar, .footer, .page-head .actions, .toast, dialog { display: none !important; }
  .app { display: block; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 0; }
  .tt-wrap { padding: 0; overflow: visible; }
  .print-only { display: block; margin-top: 16px; }
}
.tt-editable .tt-block { touch-action: none; user-select: none; cursor: grab; }
.tt-editable .tt-block.dragging { cursor: grabbing; opacity: .85; box-shadow: var(--shadow-lg); z-index: 5; }
.tt-editable .tt-block.saving { opacity: .6; }
.tt-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; cursor: ns-resize; }
.tt-resize::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 28px; height: 3px; margin-left: -14px; border-radius: 2px; background: var(--c); opacity: .5; }

/* Notificaciones */
.noti-wrap { position: relative; }
.noti-count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--coral); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.noti-panel { position: absolute; right: 0; top: 48px; width: 360px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 60; overflow: hidden; }
.noti-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.noti-head form { margin: 0; }
.noti { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; position: relative; }
.noti:hover { background: var(--surface-2); color: var(--ink); }
.noti.unread { background: #FBFAFE; }
.noti-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--violet-100); color: var(--violet); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.noti-ico svg { width: 17px; height: 17px; }
.noti-body { flex: 1; min-width: 0; }
.noti-title { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.noti.unread .noti-title { color: var(--violet-600); }
.noti-msg { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.noti-meta { font-size: 11.5px; color: var(--ink-4); margin-top: 3px; }
.noti-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); flex: none; margin-top: 6px; }
.noti-all { display: block; text-align: center; padding: 11px; font-size: 13px; font-weight: 600; }
.noti-list .noti { padding: 14px 22px; }
.noti-list .noti:last-child { border-bottom: 0; }

/* Calendario académico */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 14px 18px 18px; }
.cal-dow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); text-align: center; padding: 6px 0; }
.cal-day { min-height: 96px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #fff; display: flex; flex-direction: column; gap: 3px; }
.cal-day.out { opacity: .45; background: var(--surface-2); }
.cal-day.weekend { background: var(--surface-2); }
.cal-day.nolab { background: var(--coral-100); border-color: #F6C3CE; }
.cal-day.today { outline: 2px solid var(--violet); outline-offset: -2px; }
.cal-num { font-size: 12px; font-weight: 700; color: var(--ink-3); margin-bottom: 2px; }
.cal-day.today .cal-num { color: var(--violet); }
.cal-ev { display: block; width: 100%; text-align: left; font: inherit; font-size: 11.5px; line-height: 1.25; padding: 3px 6px; border-radius: 6px; border: 0; border-left: 3px solid var(--c); background: var(--c-bg); color: var(--c-tx); cursor: default; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.cal-ev { cursor: pointer; }
button.cal-ev:hover { filter: brightness(.96); }
.cal-more { font-size: 11px; color: var(--ink-4); padding-left: 4px; }
@media (max-width: 900px) { .cal { grid-template-columns: repeat(7, minmax(80px, 1fr)); overflow-x: auto; } .cal-day { min-height: 70px; } }

/* Mensajería */
.msg-list .msg-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 22px; border-bottom: 1px solid var(--line); color: var(--ink); }
.msg-row:hover { background: var(--surface-2); color: var(--ink); }
.msg-row.unread { background: #FBFAFE; }
.msg-row:last-child { border-bottom: 0; }
.msg-body { flex: 1; min-width: 0; }
.msg-top { display: flex; gap: 10px; align-items: center; }
.msg-top time { margin-left: auto; font-size: 12px; color: var(--ink-4); white-space: nowrap; }
.msg-subject { font-size: 13.5px; font-weight: 600; color: var(--violet-600); margin-top: 2px; }
.msg-preview { font-size: 13.5px; color: var(--ink-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-row.unread .msg-preview { color: var(--ink); font-weight: 500; }
.msg-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--coral); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; align-self: center; }
.rec-list { max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.rec-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 8px 12px 4px; background: var(--surface-2); position: sticky; top: 0; }
.rec-item { display: flex; gap: 10px; align-items: center; padding: 8px 12px; font-size: 14px; cursor: pointer; border-top: 1px solid var(--line); }
.rec-item:hover { background: var(--surface-2); }
.rec-item input { accent-color: var(--violet); width: 16px; height: 16px; }
.chat { padding: 22px; display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; background: var(--surface-2); }
.chat-day { text-align: center; margin: 8px 0; }
.chat-day span { font-size: 11.5px; font-weight: 600; color: var(--ink-3); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.bubble { max-width: 72%; background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 10px 14px; align-self: flex-start; box-shadow: var(--shadow-sm); }
.bubble.mine { align-self: flex-end; background: var(--violet-100); border-color: #D8CBF0; border-radius: 14px 14px 4px 14px; }
.bubble-author { font-size: 12px; font-weight: 700; color: var(--violet); margin-bottom: 3px; }
.bubble-text { font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.bubble-file { display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.bubble-file svg { width: 15px; height: 15px; }
.bubble-time { font-size: 11px; color: var(--ink-4); text-align: right; margin-top: 4px; }
.chat-form { display: flex; gap: 10px; align-items: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); }
.chat-form .textarea { flex: 1; min-height: 52px; }
/* No repudio */
body.codigo-grande .codigo-dia { position: fixed; inset: 0; z-index: 100; background: var(--violet) !important; display: flex !important; flex-direction: column; justify-content: center; align-items: center; gap: 24px; }
body.codigo-grande .codigo-dia .codigo-num { font-size: 22vw !important; color: #fff !important; }
body.codigo-grande .codigo-dia .small, body.codigo-grande .codigo-dia .codigo-txt { color: rgba(255,255,255,.85) !important; text-align: center; max-width: 60ch; }
body.codigo-grande .codigo-dia .btn { background: #fff; }
