.card {
  border: 1px solid rgba(220, 232, 246, .95);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
}
.card__head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .8rem; }
.card__head h3 { margin: 0; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: .68rem .95rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition: transform var(--speed), box-shadow var(--speed), background var(--speed), border-color var(--speed);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--gi-blue-700), var(--gi-sky-500));
  box-shadow: 0 12px 24px rgba(15,104,191,.2);
}
.btn-primary:hover { box-shadow: 0 18px 28px rgba(15,104,191,.25); }
.btn-soft { color: var(--gi-blue-800); background: var(--gi-blue-100); border-color: #cce3ff; }
.btn-ghost { color: var(--gi-blue-900); background: #fff; border-color: var(--gi-line); }
.btn-danger-soft { color: var(--gi-danger); background: var(--gi-danger-soft); border-color: #ffd2ca; }
.btn-large { min-height: 50px; padding-inline: 1.25rem; }
.file-button { cursor: pointer; }
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  border-radius: var(--radius-pill);
  padding: .35rem .6rem;
  font-size: .78rem;
  font-weight: 900;
}
.badge-blue { color: var(--gi-blue-800); background: var(--gi-blue-100); }
.badge-sky { color: var(--gi-blue-900); background: var(--gi-sky-100); }
.badge-success { color: var(--gi-success); background: var(--gi-success-soft); }
.badge-warning { color: var(--gi-warning); background: var(--gi-warning-soft); }
.badge-danger { color: var(--gi-danger); background: var(--gi-danger-soft); }
.kpi-card { position: relative; overflow: hidden; min-height: 150px; }
.kpi-card::after {
  content: "";
  position: absolute;
  right: -44px;
  top: -44px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(36, 182, 238, .14);
}
.kpi-label { color: var(--gi-muted); font-weight: 750; margin-bottom: .4rem; }
.kpi-value { font-size: clamp(1.5rem, 3vw, 2.25rem); color: var(--gi-blue-950); font-weight: 950; margin: 0; }
.kpi-sub { margin: .55rem 0 0; color: var(--gi-muted); }
.form-section { border: 1px solid var(--gi-line); border-radius: 18px; padding: 1rem; min-width: 0; }
.form-section legend { color: var(--gi-blue-900); font-weight: 900; padding: 0 .4rem; }
.field { display: grid; gap: .35rem; min-width: 0; }
.field span { color: var(--gi-blue-950); font-size: .86rem; }
.field.compact input, .field.compact select { min-height: 40px; padding-block: .62rem; }
.inline-control { display: flex; gap: .55rem; }
.inline-control input { flex: 1; min-width: 0; }
.email-box { margin-top: .95rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .65rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: var(--radius-pill);
  background: var(--gi-blue-50);
  border: 1px solid #cfe3fb;
  color: var(--gi-blue-900);
  padding: .42rem .65rem;
  font-weight: 750;
}
.chip button { border: 0; background: transparent; color: var(--gi-danger); font-weight: 900; padding: .1rem; }
.payment-preview { margin-top: .85rem; display: grid; gap: .55rem; }
.preview-line {
  display: flex;
  justify-content: space-between;
  gap: .7rem;
  padding: .58rem .7rem;
  border-radius: 12px;
  background: var(--gi-blue-50);
  border: 1px dashed #c8e3fb;
}
.toggle-line { display: flex; align-items: center; gap: .6rem; padding: .5rem 0 .9rem; }
.toggle-line input { width: 18px; height: 18px; }
.shipping-fields { display: grid; gap: .9rem; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .7rem; }
.stack-list { display: grid; gap: .65rem; }
.stack-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .4rem;
  padding: .78rem;
  border: 1px solid var(--gi-line);
  border-radius: 14px;
  background: var(--gi-surface-2);
}
.stack-item strong { color: var(--gi-blue-950); }
.stack-item small { display: block; margin-top: .2rem; }
.bar-list { display: grid; gap: .7rem; }
.bar-row { display: grid; gap: .35rem; }
.bar-row__meta { display:flex; justify-content:space-between; gap:.7rem; font-weight:800; color:var(--gi-blue-900); }
.bar-track { height: 12px; border-radius: var(--radius-pill); background: var(--gi-blue-100); overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gi-blue-700), var(--gi-sky-400)); min-width: 4px; }
.timeline { display: grid; gap: .75rem; padding-left: 1.2rem; margin: 0; }
.timeline li { padding-left: .35rem; }
.report-output textarea { width: 100%; min-height: 320px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; line-height: 1.45; }
.debt-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.debt-card { display: grid; gap: .7rem; }
.debt-card .button-row { justify-content: flex-start; }
.mini-table { display: grid; gap: .45rem; }
.mini-row { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: .7rem; align-items: center; padding: .6rem; border-radius: 12px; background: var(--gi-blue-50); border: 1px solid #d5e8fb; }
.mini-row.four { grid-template-columns: 1fr .7fr .7fr .8fr; }
.app-dialog { border: 0; border-radius: 22px; box-shadow: var(--shadow-md); padding: 0; max-width: min(720px, 94vw); }
.app-dialog::backdrop { background: rgba(6,35,74,.32); backdrop-filter: blur(4px); }
.app-dialog form { position: relative; padding: 1.3rem; }
.dialog-close { position: absolute; top: .65rem; right: .75rem; border:0; border-radius: 50%; width: 34px; height:34px; background: var(--gi-blue-50); font-size: 1.25rem; }
.toast-region { position: fixed; right: 1rem; bottom: 1rem; display:grid; gap:.5rem; z-index: 99; }
.toast { padding:.8rem 1rem; border-radius: 14px; background: var(--gi-blue-950); color:white; box-shadow: var(--shadow-md); animation: toastIn .25s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.status-pill { display:inline-flex; align-items:center; gap:.3rem; border-radius:999px; padding:.28rem .48rem; font-size:.76rem; font-weight:900; white-space:nowrap; }
.status-paid { color: var(--gi-success); background: var(--gi-success-soft); }
.status-pending { color: var(--gi-warning); background: var(--gi-warning-soft); }
.status-overdue { color: var(--gi-danger); background: var(--gi-danger-soft); }
.status-partial { color: var(--gi-blue-800); background: var(--gi-blue-100); }

.icon, .icon-svg { display: inline-grid; place-items: center; width: 1.08em; height: 1.08em; flex: 0 0 auto; vertical-align: -.16em; }
.icon-svg { width: 100%; height: 100%; }
h3 .icon, legend .icon, .btn .icon, .nav-tab .icon, .kpi-label .icon { color: currentColor; }
.btn-small { min-height: 34px; padding: .5rem .68rem; border-radius: 11px; font-size: .82rem; }
.program-card-grid, .group-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.mini-card {
  display: grid;
  gap: .7rem;
  border: 1px solid var(--gi-line);
  border-radius: 18px;
  padding: .9rem;
  background: linear-gradient(180deg, #fff, var(--gi-blue-50));
}
.mini-card__head { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.mini-card p { margin: 0; color: var(--gi-muted); }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
.meta-grid span { display: flex; align-items: flex-start; gap: .35rem; font-size: .82rem; color: var(--gi-blue-900); }
.inline-fieldset { border: 1px dashed var(--gi-line); border-radius: 14px; padding: .7rem .8rem; display: flex; flex-wrap: wrap; gap: .65rem .9rem; margin: .9rem 0; }
.inline-fieldset legend { padding: 0 .35rem; font-weight: 850; color: var(--gi-blue-900); }
.inline-fieldset label { display: inline-flex; align-items: center; gap: .35rem; font-size: .88rem; color: var(--gi-ink); }
.inline-fieldset input { width: 16px; height: 16px; padding: 0; }
.calendar-preview { border: 1px solid var(--gi-line); border-radius: 12px; padding: .55rem .7rem; background: #fff; }
.calendar-preview summary { cursor: pointer; font-weight: 800; color: var(--gi-blue-800); }
.calendar-preview p { margin: .5rem 0 0; font-size: .86rem; }
.report-html-card { margin-top: 1rem; }
.report-html { overflow: auto; border: 1px solid var(--gi-line); border-radius: 16px; background: #fff; padding: 1rem; max-height: 560px; }
.report-document header { border-bottom: 1px solid var(--gi-line); margin-bottom: 1rem; padding-bottom: .6rem; }
.report-document footer { color: var(--gi-muted); font-size: .84rem; border-top: 1px solid var(--gi-line); margin-top: 1rem; padding-top: .8rem; }
.report-summary-grid { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: .65rem; margin: 1rem 0; }
.report-summary-grid div { border: 1px solid #d5e8fb; border-radius: 14px; background: var(--gi-blue-50); padding: .75rem; }
.report-summary-grid small { display: block; margin-bottom: .25rem; }
.report-summary-grid strong { color: var(--gi-blue-950); font-size: 1.15rem; }
.report-table { width: 100%; border-collapse: collapse; min-width: 760px; margin: .7rem 0 1rem; font-size: .84rem; }
.report-table th, .report-table td { border: 1px solid var(--gi-line); padding: .55rem; text-align: left; vertical-align: top; }
.report-table th { background: var(--gi-blue-100); color: var(--gi-blue-900); }
.report-group-block { margin: 1rem 0; break-inside: avoid; }
.report-group-block h4 { margin: 0 0 .25rem; color: var(--gi-blue-900); }
.compact-report-table { min-width: 680px; }
.crm-panel, .crm-message-card { min-height: 360px; }
.crm-message-card textarea, #crmMessage { width: 100%; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; line-height: 1.45; }
.compact-list { margin: .75rem 0; }
.muted-cell { color: var(--gi-muted); text-align: center; }
.mini-row.four { grid-template-columns: minmax(130px, 1fr) .7fr .7fr .8fr auto; }
.dialog-close { display: inline-grid; place-items: center; }
.dialog-close .icon { width: 18px; height: 18px; }
.status-pill + small { display: block; margin-top: .22rem; }

/* FIX v0.2.1: iconos SVG con tamano fijo.
   La version anterior hidrataba <span data-icon> sin clase .icon; el SVG tenia width:100%,
   y algunos navegadores lo escalaban al tamano completo del boton/tarjeta al abrir index.html. */
[data-icon] {
  display: inline-grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  min-width: 1.15rem;
  max-width: 1.15rem;
  min-height: 1.15rem;
  max-height: 1.15rem;
  flex: 0 0 1.15rem;
  line-height: 1;
  vertical-align: -0.16em;
  color: currentColor;
}
[data-icon] > .icon-svg,
.icon > .icon-svg,
.icon-svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  max-width: 1.15rem;
  max-height: 1.15rem;
  overflow: visible;
}
.nav-tab [data-icon],
.nav-tab [data-icon] > .icon-svg {
  width: 1.35rem;
  height: 1.35rem;
  min-width: 1.35rem;
  max-width: 1.35rem;
  min-height: 1.35rem;
  max-height: 1.35rem;
  flex-basis: 1.35rem;
}
.brand [data-icon],
.brand [data-icon] > .icon-svg,
.icon-btn [data-icon],
.icon-btn [data-icon] > .icon-svg {
  width: 1.1rem;
  height: 1.1rem;
  min-width: 1.1rem;
  max-width: 1.1rem;
  min-height: 1.1rem;
  max-height: 1.1rem;
  flex-basis: 1.1rem;
}
.global-search [data-icon],
.global-search [data-icon] > .icon-svg {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  max-width: 1rem;
  min-height: 1rem;
  max-height: 1rem;
}

/* v0.3: subpestañas internas para listas/nuevo y hojas separadas */
.subtab-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: .2rem 0 1rem;
  padding: .35rem;
  border: 1px solid var(--gi-line);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
}
.subtab {
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--gi-blue-900);
  font-weight: 900;
  padding: .68rem .95rem;
  cursor: pointer;
}
.subtab:hover { background: var(--gi-blue-50); }
.subtab.is-active {
  background: linear-gradient(135deg, var(--gi-blue-700), var(--gi-sky-500));
  color: #fff;
  box-shadow: 0 10px 20px rgba(15,104,191,.16);
}
.program-subview, .group-subview, .turn-subview { display: none; }
.program-subview.is-active, .group-subview.is-active, .turn-subview.is-active { display: block; }
.dashboard-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: .85rem;
  margin-bottom: 1rem;
}
@media (max-width: 780px) {
  .dashboard-filters { grid-template-columns: 1fr; }
  .subtab { flex: 1 1 100%; }
}

/* v0.4 refinements */
.module-builder{
  margin-top:18px;
  border:1px solid var(--border);
  background:linear-gradient(180deg,#f8fbff,#fff);
  border-radius:18px;
  padding:16px;
}
.module-builder__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:12px;
}
.module-builder h4,.conditional-fields h4{margin:0 0 4px;color:var(--ink)}
.module-rows{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}
.module-row{background:#fff;border:1px solid var(--border);border-radius:14px;padding:10px}
.module-row small{color:var(--muted)}
.module-total{margin-top:12px;display:flex;align-items:center;justify-content:flex-end;gap:12px;color:var(--muted)}
.module-total strong{font-size:1.35rem;color:var(--primary)}
.is-course-mode .module-count-field{opacity:.65}
.conditional-fields{margin-top:14px;border:1px solid var(--border);border-radius:16px;background:#f8fbff;padding:14px}
.phone-control{display:flex;align-items:center;border:1px solid var(--border);border-radius:14px;background:#fff;overflow:hidden}
.phone-control span{padding:0 12px;font-weight:800;color:var(--primary);border-right:1px solid var(--border);background:#eff6ff;align-self:stretch;display:grid;place-items:center}
.phone-control input{border:0!important;box-shadow:none!important;min-width:0;flex:1}
.registro-subview{display:none}
.registro-subview.is-active{display:grid}
article.registro-subview.is-active{display:block}
.compact-toolbar{margin-bottom:16px}
.status-select.status-paid{background:#dcfce7;color:#166534;border-color:#86efac}
.status-select.status-partial{background:#e0f2fe;color:#075985;border-color:#7dd3fc}
.status-select.status-pending{background:#fef3c7;color:#92400e;border-color:#fcd34d}
.status-select.status-overdue{background:#fee2e2;color:#991b1b;border-color:#fca5a5}
.status-line{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}
.report-layout-single{grid-template-columns:minmax(240px,300px) 1fr}
.report-cover{border-bottom:3px solid var(--sky);padding-bottom:14px;margin-bottom:16px}
.report-summary-grid .icon{width:20px;height:20px;margin-bottom:8px;color:var(--primary)}
.wa-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 12px;padding:10px;border:1px solid var(--border);border-radius:14px;background:#f8fbff}
.strike-sample{text-decoration:line-through;font-weight:800}
.crm-message-card .field{margin-bottom:10px}


/* v0.5: limpieza de cabecera, busquedas internas, programa destacado, CRM preview y estados de envio */
.icon-only { width: 38px; min-width: 38px; padding-inline: 0; }
.brand__mark { font-size: .72rem; letter-spacing: .02em; }
.list-toolbar { display: grid; grid-template-columns: minmax(240px, 420px); margin: .75rem 0 1rem; }
.input-icon { position: relative; display: flex; align-items: center; }
.input-icon [data-icon] { position: absolute; left: .75rem; color: var(--gi-muted); pointer-events: none; }
.input-icon input { width: 100%; padding-left: 2.35rem; }
.program-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  width: max-content;
  border-radius: 999px;
  padding: .25rem .55rem;
  font-size: .72rem;
  font-weight: 950;
  color: var(--program-accent);
  background: var(--program-bg);
  border: 1px solid color-mix(in srgb, var(--program-accent), #fff 68%);
  text-transform: capitalize;
  margin-bottom: .22rem;
}
.program-card-accent { border-left: 5px solid var(--program-accent); background: linear-gradient(90deg, var(--program-bg), #fff 36%); }
.whatsapp-preview-card { margin-top: .85rem; border: 1px solid var(--gi-line); border-radius: 16px; background: #fff; padding: .85rem; }
.whatsapp-preview {
  min-height: 160px;
  padding: .85rem;
  border-radius: 14px;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  line-height: 1.55;
  white-space: normal;
  color: var(--gi-ink);
}
.whatsapp-preview code { display:inline-block; padding:.08rem .28rem; border-radius:6px; background:#e5e7eb; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; }
.whatsapp-preview .muted { color: var(--gi-muted); }
.status-muted { color:#4b5563; background:#f3f4f6; }
.status-pending-payment { color:#92400e; background:#fef3c7; }
.status-shipping-paid { color:#1d4ed8; background:#dbeafe; }
.status-prepared { color:#6d28d9; background:#ede9fe; }
.status-sent { color:#0369a1; background:#e0f2fe; }
.status-delivered { color:#166534; background:#dcfce7; }
.status-incident { color:#991b1b; background:#fee2e2; }
.status-select.status-muted{background:#f3f4f6;color:#4b5563;border-color:#d1d5db}
.status-select.status-pending-payment{background:#fef3c7;color:#92400e;border-color:#fcd34d}
.status-select.status-shipping-paid{background:#dbeafe;color:#1d4ed8;border-color:#93c5fd}
.status-select.status-prepared{background:#ede9fe;color:#6d28d9;border-color:#c4b5fd}
.status-select.status-sent{background:#e0f2fe;color:#0369a1;border-color:#7dd3fc}
.status-select.status-delivered{background:#dcfce7;color:#166534;border-color:#86efac}
.status-select.status-incident{background:#fee2e2;color:#991b1b;border-color:#fca5a5}
.shipping-toolbar { grid-template-columns: minmax(220px,1.2fr) repeat(3,minmax(160px,.8fr)); }

/* v0.6-v0.7: dashboard por colores, reportes con columnas, notas, docentes y editor visual WhatsApp */
.kpi-card { border-left: 6px solid var(--kpi-accent, var(--gi-blue-700)); background: linear-gradient(135deg, var(--kpi-bg, #fff), #fff 62%); }
.kpi-card::after { background: color-mix(in srgb, var(--kpi-accent, var(--gi-sky-500)), transparent 84%); }
.kpi-card .kpi-label .icon { color: var(--kpi-accent, var(--gi-blue-700)); }
.kpi-docentes { --kpi-accent:#2563eb; --kpi-bg:#eff6ff; }
.kpi-cobrado { --kpi-accent:#059669; --kpi-bg:#ecfdf5; }
.kpi-pendiente { --kpi-accent:#d97706; --kpi-bg:#fffbeb; }
.kpi-vencido { --kpi-accent:#dc2626; --kpi-bg:#fef2f2; }
.kpi-deuda-cuota { --kpi-accent:#7c3aed; --kpi-bg:#f5f3ff; }
.kpi-deuda-certificado { --kpi-accent:#0891b2; --kpi-bg:#ecfeff; }
.column-picker { margin: .85rem 0; border:1px solid var(--gi-line); border-radius:14px; padding:.75rem; background:#fff; }
.column-picker summary { cursor:pointer; font-weight:900; color:var(--gi-blue-900); display:flex; align-items:center; gap:.4rem; }
.check-grid { display:grid; grid-template-columns:1fr; gap:.35rem; margin-top:.65rem; max-height:230px; overflow:auto; padding-right:.3rem; }
.check-grid label { display:flex; align-items:center; gap:.45rem; font-size:.86rem; color:var(--gi-ink); }
.check-grid input { width:16px; height:16px; padding:0; }
.report-kpi { border-left:4px solid var(--kpi-accent, var(--gi-blue-700))!important; background: var(--kpi-bg, var(--gi-blue-50))!important; }
.report-kpi-docentes { --kpi-accent:#2563eb; --kpi-bg:#eff6ff; }
.report-kpi-cobrado { --kpi-accent:#059669; --kpi-bg:#ecfdf5; }
.report-kpi-deuda { --kpi-accent:#d97706; --kpi-bg:#fffbeb; }
.report-kpi-vencido { --kpi-accent:#dc2626; --kpi-bg:#fef2f2; }
.report-kpi-apto { --kpi-accent:#16a34a; --kpi-bg:#f0fdf4; }
.report-kpi-pagos { --kpi-accent:#7c3aed; --kpi-bg:#f5f3ff; }
.report-kpi-total { --kpi-accent:#0891b2; --kpi-bg:#ecfeff; }
.report-document .icon, .report-document .icon-svg { width:1rem!important; height:1rem!important; max-width:1rem!important; max-height:1rem!important; }
.whatsapp-editor-card { margin-top: .65rem; }
.whatsapp-editor { min-height: 260px; outline: 0; white-space: pre-wrap; }
.whatsapp-editor:focus { border-color: var(--gi-sky-500); box-shadow: 0 0 0 4px rgba(14,165,233,.12); }
.raw-wa-field { margin-top: .85rem; }
.raw-wa-field textarea { font-family: ui-monospace,SFMono-Regular,Consolas,monospace; background:#f8fafc; }
.grade-config-box { margin-top: 1rem; border:1px solid var(--gi-line); background:linear-gradient(180deg,#f8fbff,#fff); border-radius:18px; padding:1rem; }
.grade-config-columns { display:grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap:1rem; margin-top:1rem; }
.grade-config-columns h5 { margin:.1rem 0 .55rem; color:var(--gi-blue-900); }
.grade-builder-list { display:grid; gap:.65rem; }
.grade-builder-row { display:grid; grid-template-columns:1fr .55fr; gap:.55rem; border:1px solid var(--gi-line); border-radius:14px; padding:.65rem; background:#fff; }
.grade-builder-row.activity-row { grid-template-columns: .75fr .55fr 1.2fr; }
.grade-weight-row { margin-top:.75rem; }
.module-total strong.is-warning { color:#d97706; }
.notes-layout { display:grid; grid-template-columns:minmax(230px,300px) minmax(0,1fr); gap:1rem; }
.notes-panel { align-self:start; position:sticky; top:1rem; }
.notes-table-card { min-width:0; }
.grade-legend { display:grid; gap:.45rem; margin:.85rem 0; }
.grade-legend-card { display:flex; justify-content:space-between; gap:.7rem; align-items:center; border:1px solid var(--gi-line); border-radius:12px; padding:.55rem .65rem; background:#f8fbff; font-size:.86rem; }
.grade-legend-card strong { color:var(--gi-blue-900); }
.grade-legend-card.ok { background:#ecfdf5; border-color:#bbf7d0; }
.grade-legend-card.warn { background:#fffbeb; border-color:#fde68a; }
.grade-input { min-width:72px; width:84px; padding:.45rem .5rem; border-radius:10px; text-align:center; font-weight:850; }
.notes-sheet th { white-space:nowrap; }
.notes-sheet td { vertical-align:middle; }
@media (max-width: 920px) {
  .grade-config-columns, .notes-layout { grid-template-columns: 1fr; }
  .notes-panel { position:static; }
  .grade-builder-row, .grade-builder-row.activity-row { grid-template-columns:1fr; }
}


/* v0.7 docentes, sesiones y notas simplificadas */
.teacher-subview { display: none; }
.teacher-subview.is-active { display: block; }
.account-builder { margin-top: 1rem; border: 1px dashed var(--gi-line); border-radius: 16px; padding: .85rem; background: #fbfdff; }
.account-rows { display: grid; gap: .65rem; }
.account-row { display: grid; grid-template-columns: 1.1fr .8fr .8fr 1fr 1fr auto; gap: .55rem; align-items: end; padding: .65rem; border: 1px solid var(--gi-line); border-radius: 14px; background: #fff; }
.teacher-contact-list { display: grid; gap: .35rem; font-size: .84rem; color: var(--gi-muted); }
.teacher-banks { display: flex; flex-wrap: wrap; gap: .35rem; }
.teacher-banks .badge { font-size: .74rem; }
.session-total-pill { display: grid; gap: .15rem; text-align: right; color: var(--gi-blue-900); }
.session-total-pill strong { font-size: 1.6rem; }
.grade-proposal-card { margin: .75rem 0; border: 1px solid #bfdbfe; background: #eff6ff; border-radius: 14px; padding: .75rem .85rem; color: var(--gi-blue-900); line-height: 1.45; }
.grade-config-columns.single { grid-template-columns: 1fr; }
.grade-builder-row.activity-row { grid-template-columns: minmax(220px, 1fr) minmax(190px, .8fr); }
.notes-formula { display: grid; gap: .45rem; font-size: .82rem; color: var(--gi-muted); }
.notes-formula strong { color: var(--gi-blue-900); }
.spreadsheet tbody td { text-align: center; vertical-align: middle; }
.spreadsheet tbody td.cell-long, .spreadsheet tbody td.cell-note { text-align: left; }
@media (max-width: 1180px) { .account-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 780px) { .account-row { grid-template-columns: 1fr; } }

/* v0.8 sesiones y reporte docente */
.sessions-toolbar { grid-template-columns: repeat(5, minmax(150px, 1fr)); }
.sessions-help-card { margin-bottom: 1rem; color: var(--gi-blue-900); background: #f8fbff; }
.sessions-sheet { min-width: 1880px; }
.sessions-sheet input[type="date"], .sessions-sheet input[type="time"], .sessions-sheet select { min-width: 128px; }
.sessions-sheet .session-date-input { min-width: 142px; }
.teacher-report-toolbar { grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(140px, .7fr)); }
.teacher-report-html { max-height: 620px; }
.teacher-report-table { min-width: 1100px; }
.account-row { grid-template-columns: minmax(180px, 1.1fr) minmax(170px, 1fr) minmax(170px, 1fr) auto; }
.account-row .icon-btn { align-self: end; }
@media (max-width: 1100px) {
  .sessions-toolbar, .teacher-report-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .sessions-toolbar, .teacher-report-toolbar, .account-row { grid-template-columns: 1fr; }
}

/* v0.9: filtros compactos, Zoom y asistencia docente */
.zoom-subview { display: none; }
.zoom-subview.is-active { display: block; }
.zoom-turn-list { display: grid; gap: .35rem; margin: .25rem 0 0; padding-left: 1.05rem; color: var(--gi-muted); }
.zoom-turn-list li { line-height: 1.35; }
.zoom-turn-list small { display: block; margin-top: .12rem; }
.zoom-conflict-card { border-color: #fca5a5; background: linear-gradient(180deg, #fff7f7, #fff); }
.sessions-toolbar,
.teacher-attendance-toolbar,
.teacher-report-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sessions-toolbar select,
.teacher-attendance-toolbar select,
.teacher-report-toolbar select { max-width: 100%; }
.compact-help { margin: 0 0 1rem; padding: .85rem; }
.teacher-attendance-sheet { min-width: 1480px; }
.teacher-attendance-sheet input[type="number"],
.sessions-sheet .connected-input { min-width: 92px; width: 96px; text-align: center; }
.teacher-summary-table { min-width: 980px; }
.badge-muted { color:#4b5563; background:#f3f4f6; }
@media (max-width: 720px) {
  .sessions-toolbar,
  .teacher-attendance-toolbar,
  .teacher-report-toolbar { grid-template-columns: 1fr; }
}

/* v1.0: colores por programa, induccion con fechas, servicios y filtros estables */
input[type="color"] { min-height: 40px; padding: .25rem; cursor: pointer; }
.induction-date-box { margin-top: .85rem; border: 1px dashed var(--gi-line); background: #fff; border-radius: 16px; padding: .8rem; }
.induction-date-box .card__head { margin-bottom: .65rem; }
.induction-date-rows { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)); gap: .65rem; }
.induction-date-row { border: 1px solid #dbeafe; background: #f8fbff; padding: .65rem; border-radius: 14px; }
.grade-config-modern { background: linear-gradient(135deg, #f8fbff, #fff 58%, #eef7ff); }
.activity-card-modern { grid-template-columns: 54px minmax(190px, 1fr) minmax(240px, 1.2fr) !important; align-items: end; background: linear-gradient(90deg, #fff, #f8fbff); }
.activity-index-pill { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: var(--gi-blue-800); background: var(--gi-blue-100); border: 1px solid #bfdbfe; font-weight: 950; }
.requirement-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.requirement-pills { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .25rem; }
.service-subview { display: none; }
.service-subview.is-active { display: block; }
.service-toolbar, .service-report-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.services-sheet { min-width: 1180px; }
.services-sheet td { vertical-align: middle; }
.compact-actions { gap: .35rem; justify-content: center; }
.sessions-sheet { min-width: 2350px; }
.sessions-sheet .link-input { min-width: 190px; width: 220px; font-size: .82rem; }
.sessions-toolbar,
.teacher-attendance-toolbar,
.teacher-report-toolbar,
.shipping-toolbar,
.dashboard-filters,
.sheet-toolbar { align-items: end; }
.sheet-toolbar .field,
.dashboard-filters .field { min-width: 0; }
.sheet-toolbar select,
.dashboard-filters select,
.sheet-toolbar input,
.dashboard-filters input { width: 100%; min-width: 0; text-overflow: ellipsis; }
@media (max-width: 1100px) {
  .induction-date-rows, .requirement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activity-card-modern { grid-template-columns: 1fr !important; }
}
@media (max-width: 720px) {
  .induction-date-rows, .requirement-grid, .service-toolbar, .service-report-toolbar { grid-template-columns: 1fr; }
}

/* v1.0 final: barras de filtros responsivas sin superposicion */
.dashboard-filters,
.sheet-toolbar,
.shipping-toolbar,
.sessions-toolbar,
.teacher-attendance-toolbar,
.teacher-report-toolbar,
.service-toolbar,
.service-report-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .85rem;
}
.dashboard-filters .field,
.sheet-toolbar .field,
.shipping-toolbar .field,
.sessions-toolbar .field,
.teacher-attendance-toolbar .field,
.teacher-report-toolbar .field,
.service-toolbar .field,
.service-report-toolbar .field { min-width: 0; }
.dashboard-filters select,
.sheet-toolbar select,
.shipping-toolbar select,
.sessions-toolbar select,
.teacher-attendance-toolbar select,
.teacher-report-toolbar select,
.service-toolbar select,
.service-report-toolbar select,
.dashboard-filters input,
.sheet-toolbar input,
.shipping-toolbar input,
.sessions-toolbar input,
.teacher-attendance-toolbar input,
.teacher-report-toolbar input,
.service-toolbar input,
.service-report-toolbar input { width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 520px) {
  .dashboard-filters,
  .sheet-toolbar,
  .shipping-toolbar,
  .sessions-toolbar,
  .teacher-attendance-toolbar,
  .teacher-report-toolbar,
  .service-toolbar,
  .service-report-toolbar { grid-template-columns: 1fr; }
}
.requirement-cell { min-width: 170px; }
.requirement-cell label { display: inline-flex; align-items: center; gap: .25rem; margin: .12rem .35rem .12rem 0; font-size: .78rem; font-weight: 800; color: var(--gi-blue-900); }
.requirement-cell input { min-height: auto; }


/* v1.1 refinements */
.dashboard-kpi-section { grid-column: 1 / -1; display:block; }
.dashboard-kpi-section h3 { display:flex; gap:.45rem; align-items:center; margin:.25rem 0 .75rem; color:var(--gi-blue-950); }
.kpi-grid-inner { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:1rem; }
.dashboard-kpi-section-wide .kpi-grid-inner { grid-template-columns: repeat(4, minmax(0,1fr)); }
.list-toolbar.two-cols { grid-template-columns: minmax(190px,.7fr) minmax(260px,1.3fr); }
.list-toolbar.three-cols { grid-template-columns: minmax(170px,.7fr) minmax(140px,.5fr) minmax(240px,1.2fr); }
select option { padding:.5rem; }
.field select option[style] { font-weight:700; }
.program-chip { border:1px solid color-mix(in srgb, var(--program-accent), transparent 70%); color:var(--program-accent); background:var(--program-bg); }
.crm-layout { align-items:start; }
.crm-report-card { grid-column: 1 / -1; }
.crm-email-box { margin-top:1rem; border:1px solid var(--gi-line); border-radius:16px; padding:.8rem; background:#f8fbff; }
.crm-email-box summary { cursor:pointer; font-weight:800; color:var(--gi-blue-900); }
.kpi-total { --kpi-accent:#0f766e; --kpi-bg:#f0fdfa; }
@media (max-width: 1100px) { .kpi-grid-inner, .dashboard-kpi-section-wide .kpi-grid-inner { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 700px) { .kpi-grid-inner, .dashboard-kpi-section-wide .kpi-grid-inner, .list-toolbar.two-cols, .list-toolbar.three-cols { grid-template-columns:1fr; } }

/* v1.2 visual polish */
.field > span,
.inline-fieldset legend,
.card__head h3,
.form-section h3 {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
}
.field > span::before {
  content: '';
  width: .62rem;
  height: .62rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gi-sky-500), var(--gi-blue-700));
  box-shadow: 0 0 0 3px rgba(14,165,233,.12);
  flex: 0 0 auto;
}
.field.search-field > span::before { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
.field:has(input[type="url"]) > span::before { background: linear-gradient(135deg, #10b981, #059669); }
.field:has(input[type="date"]) > span::before,
.field:has(input[type="time"]) > span::before { background: linear-gradient(135deg, #f59e0b, #d97706); }
.field:has(select) > span::before { background: linear-gradient(135deg, #7c3aed, #2563eb); }
select.select-accented {
  border-left: 6px solid var(--select-accent) !important;
  background: linear-gradient(90deg, var(--select-bg), #fff 44%) !important;
  font-weight: 700;
}
.list-toolbar, .sheet-toolbar, .dashboard-filters, .compact-toolbar {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  align-items: end;
}
.list-toolbar .field, .sheet-toolbar .field, .dashboard-filters .field { min-width: 0; }
.list-toolbar select, .sheet-toolbar select, .dashboard-filters select,
.list-toolbar input, .sheet-toolbar input, .dashboard-filters input { width: 100%; min-width: 0; }
.brochure-view, .ai-subview { display: none; }
.brochure-view.is-active, .ai-subview.is-active { display: grid; }
.brochure-layout {
  grid-template-columns: minmax(260px, .55fr) minmax(0, 1.45fr);
  gap: 1rem;
  align-items: start;
}
.brochure-panel { position: sticky; top: 1rem; }
.brochure-builder { display: grid; gap: 1rem; }
.brochure-title-box { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .9rem; margin-bottom: .6rem; }
.brochure-module {
  border: 1px solid rgba(14,165,233,.22);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 1rem;
  box-shadow: 0 12px 28px rgba(6,35,74,.06);
}
.brochure-module__head { display:flex; align-items:center; justify-content:space-between; margin-bottom:.75rem; }
.module-index-pill, .session-index-pill {
  display:inline-grid; place-items:center; min-width:38px; height:30px; padding:0 .55rem;
  border-radius:999px; color:#fff; background:linear-gradient(135deg, var(--gi-blue-700), var(--gi-sky-500)); font-weight:900;
}
.brochure-session-list { display:grid; gap:.7rem; margin:.85rem 0; }
.brochure-session {
  display:grid; grid-template-columns:auto minmax(160px, .7fr) minmax(220px,1.3fr) auto;
  gap:.7rem; align-items:start; padding:.75rem; border-radius:16px;
  background:#fff; border:1px solid var(--gi-line);
}
.vertical-actions { flex-direction: column; gap:.25rem; }
.ai-tool-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(270px,1fr)); gap:1rem; }
.ai-tool-card {
  border:1px solid rgba(14,165,233,.20);
  border-left:6px solid var(--tool-accent);
  border-radius:18px;
  background:linear-gradient(180deg, var(--tool-bg), #fff 52%);
  padding:1rem;
  box-shadow:0 12px 30px rgba(6,35,74,.07);
  display:grid; gap:.75rem;
}
.ai-tool-card__head { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:.75rem; align-items:center; }
.ai-tool-card__head small { display:block; color:var(--gi-muted); margin-top:.15rem; }
.ai-tool-icon {
  width:48px; height:48px; border-radius:16px; background:#fff; display:inline-grid; place-items:center;
  box-shadow:0 8px 18px rgba(6,35,74,.10); overflow:hidden; color:var(--tool-accent);
}
.ai-tool-icon img { width:30px; height:30px; object-fit:contain; }
.ai-tool-icon .icon { display:inline-flex; }
.ai-tool-card p { margin:0; color:var(--gi-blue-950); line-height:1.45; }
.tool-actions { border-top:1px solid rgba(15,76,129,.10); padding-top:.65rem; }
.category-row { border-left:5px solid var(--category-accent); background:linear-gradient(90deg, var(--category-bg), #fff); }
.category-dot { display:inline-block; width:.7rem; height:.7rem; border-radius:999px; background:var(--category-accent); margin-right:.45rem; box-shadow:0 0 0 3px var(--category-bg); }
@media (max-width: 900px) {
  .brochure-layout { grid-template-columns: 1fr; }
  .brochure-panel { position: static; }
  .brochure-title-box, .brochure-session { grid-template-columns: 1fr; }
}

/* v1.3: desplegables compactos, color persistente, scroll visible, brochures + asistencias */
.field select,
.field input,
.field textarea {
  max-width: 100%;
}
.field select {
  min-width: 0;
  width: 100%;
  line-height: 1.25;
  white-space: normal;
  text-overflow: ellipsis;
}
select.select-accented {
  color: var(--select-accent) !important;
  border-color: color-mix(in srgb, var(--select-accent), #fff 55%) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--select-accent), #fff 76%), 0 0 0 3px color-mix(in srgb, var(--select-accent), transparent 88%);
}
select.select-accented:focus {
  outline: 3px solid color-mix(in srgb, var(--select-accent), transparent 76%);
  outline-offset: 1px;
}
.brochure-panel select,
.brochure-panel input {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.compact-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
  gap: .8rem;
  align-items: end;
}
@keyframes emtelScrollCue {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(14,165,233,.18), 0 0 0 rgba(14,165,233,0); filter: saturate(1); }
  50% { box-shadow: inset 0 0 0 1px rgba(14,165,233,.34), 0 0 0 5px rgba(14,165,233,.08); filter: saturate(1.2); }
}
@keyframes emtelScrollFlow {
  from { background-position: 0 0; }
  to { background-position: 80px 0; }
}
.table-top-scrollbar,
.sheet-top-scrollbar {
  position: relative;
  animation: emtelScrollCue 2.6s ease-in-out infinite;
  background-image: repeating-linear-gradient(90deg, rgba(14,165,233,.18) 0 18px, rgba(37,99,235,.08) 18px 36px) !important;
  background-size: 80px 100%;
}
.table-top-scrollbar:hover,
.sheet-top-scrollbar:hover {
  animation: emtelScrollCue 1.3s ease-in-out infinite, emtelScrollFlow 2s linear infinite;
}
.spreadsheet-shell::-webkit-scrollbar-thumb,
.table-top-scrollbar::-webkit-scrollbar-thumb,
.sheet-top-scrollbar::-webkit-scrollbar-thumb {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.9), 0 0 10px rgba(14,165,233,.28);
}
.brochure-session {
  grid-template-columns: auto minmax(160px, .65fr) minmax(220px, 1fr) minmax(210px, .85fr) auto;
}
.brochure-tools-box {
  display: grid;
  gap: .45rem;
  min-width: 0;
}
.brochure-tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
  min-height: 34px;
}
.tool-icon-chip {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  background: #fff;
  color: var(--gi-blue-800);
  cursor: pointer;
  box-shadow: 0 7px 14px rgba(6,35,74,.08);
  position: relative;
}
.tool-icon-chip:hover { transform: translateY(-1px); border-color: var(--gi-sky-500); }
.tool-icon-chip img { width: 22px; height: 22px; object-fit: contain; border-radius: 6px; }
.tool-icon-chip span {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--gi-blue-950);
  color: #fff;
  border-radius: 8px;
  padding: .28rem .45rem;
  font-size: .72rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
  z-index: 10;
}
.tool-icon-chip:hover span { opacity: 1; }
.print-tool-chip img { width: 16px; height: 16px; object-fit: contain; }
.brochure-print-document .report-cover {
  border-bottom-color: var(--program-accent, var(--gi-sky-500));
}
.brochure-print-table { min-width: 720px; }
.attendance-view { display: none; }
.attendance-view.is-active { display: block; }
.attendance-portal-grid {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr);
  gap: 1rem;
  align-items: start;
}
.attendance-panel { min-width: 0; }
.attendance-search-results {
  display: grid;
  gap: .55rem;
  margin-top: .75rem;
}
.attendance-result {
  width: 100%;
  text-align: left;
  border: 1px solid var(--gi-line);
  border-radius: 14px;
  padding: .75rem .85rem;
  background: #fff;
  cursor: pointer;
}
.attendance-result:hover,
.attendance-result.is-selected {
  border-color: var(--gi-sky-500);
  background: #eff6ff;
  box-shadow: 0 10px 22px rgba(6,35,74,.08);
}
.attendance-result small { display: block; margin-top: .18rem; color: var(--gi-muted); }
.session-readonly-card {
  border: 1px solid color-mix(in srgb, var(--program-accent, #0ea5e9), #fff 65%);
  border-radius: 16px;
  padding: 1rem;
  background: linear-gradient(90deg, var(--program-bg, #eff6ff), #fff 48%);
  text-align: left;
}
.session-readonly-card h3 { margin: .25rem 0 .55rem; color: var(--gi-blue-950); }
.session-readonly-card p { margin: .3rem 0; }
.mark-card {
  margin-top: 1rem;
  border: 1px solid var(--gi-line);
  border-radius: 18px;
  padding: 1rem;
  background: linear-gradient(180deg, #f8fbff, #fff);
  display: grid;
  gap: .55rem;
}
.mark-card.is-marked { border-color: #86efac; background: linear-gradient(180deg, #ecfdf5, #fff); }
.checkline { display: inline-flex; align-items: center; gap: .45rem; font-weight: 800; color: var(--gi-blue-900); }
.checkline input { width: 18px; height: 18px; padding: 0; }
.attendance-big-button {
  width: 100%;
  min-height: 58px;
  font-size: 1.02rem;
  animation: emtelAttention 2.2s ease-in-out infinite;
}
.attendance-big-button:disabled { animation: none; opacity: .66; cursor: not-allowed; }
@keyframes emtelAttention {
  0%, 100% { transform: translateY(0); box-shadow: 0 10px 20px rgba(14,165,233,.18); }
  50% { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(14,165,233,.28); }
}
.support-box {
  margin-top: 1rem;
  border: 1px dashed #bfdbfe;
  border-radius: 16px;
  padding: .85rem;
  background: #f8fbff;
}
.attendance-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.copy-link-input {
  width: 100%;
  border: 1px solid var(--gi-line);
  border-radius: 12px;
  background: #f8fafc;
  padding: .55rem .65rem;
  font-size: .8rem;
}
.attendance-sheet { min-width: 1580px; }
@media (max-width: 980px) {
  .attendance-portal-grid { grid-template-columns: 1fr; }
  .brochure-session { grid-template-columns: 1fr; }
}
@media print {
  .brochure-builder .button-row,
  .brochure-builder .icon-btn,
  .brochure-builder .btn,
  .brochure-panel,
  .subtab-strip { display: none !important; }
}

/* v1.4: microinteracciones, portal publico y seleccion con color persistente */
@keyframes emtelScrollPulseStrong {
  0%, 100% { opacity: .92; filter: saturate(1); box-shadow: 0 0 0 rgba(14,165,233,0), inset 0 0 0 1px rgba(255,255,255,.92); }
  50% { opacity: 1; filter: saturate(1.35); box-shadow: 0 0 14px rgba(14,165,233,.42), inset 0 0 0 1px rgba(255,255,255,.96); }
}
@keyframes emtelScrollTrackBlink {
  0%, 100% { background-position: 0 0; }
  50% { background-position: 34px 0; }
}
.spreadsheet-shell,
.table-top-scrollbar,
.sheet-top-scrollbar {
  animation: emtelScrollPulseStrong 3.1s ease-in-out infinite;
}
.table-top-scrollbar::before,
.sheet-top-scrollbar::before {
  content: 'Desliza horizontalmente';
  position: absolute;
  right: .65rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .68rem;
  font-weight: 850;
  color: var(--gi-blue-800);
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(14,165,233,.18);
  border-radius: 999px;
  padding: .08rem .46rem;
  pointer-events: none;
  opacity: .72;
}
.spreadsheet-shell:hover,
.table-top-scrollbar:hover,
.sheet-top-scrollbar:hover {
  animation: emtelScrollPulseStrong 1.25s ease-in-out infinite;
}
.spreadsheet-shell::-webkit-scrollbar-thumb,
.table-top-scrollbar::-webkit-scrollbar-thumb,
.sheet-top-scrollbar::-webkit-scrollbar-thumb {
  animation: emtelScrollPulseStrong 2.1s ease-in-out infinite;
}
.spreadsheet-shell::-webkit-scrollbar-track,
.table-top-scrollbar::-webkit-scrollbar-track,
.sheet-top-scrollbar::-webkit-scrollbar-track {
  background-image: repeating-linear-gradient(90deg, #eaf4ff 0 18px, #dbeafe 18px 36px);
  animation: emtelScrollTrackBlink 2.8s linear infinite;
}
select.select-accented {
  background: linear-gradient(90deg, var(--select-bg, #eff6ff), #fff 76%) !important;
}
select.select-accented option:checked {
  background: var(--select-bg, #eff6ff) !important;
  color: var(--select-accent, var(--gi-blue-800)) !important;
  font-weight: 800;
}
.brochure-panel .field,
.attendance-panel .field,
.list-toolbar .field,
.sheet-toolbar .field {
  min-width: 0;
}
.brochure-panel select,
.attendance-panel select,
.list-toolbar select,
.sheet-toolbar select {
  min-height: 44px;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}
.public-attendance-page {
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(14,165,233,.16), transparent 32%), linear-gradient(180deg, #f8fbff, #eef7ff);
  padding: clamp(1rem, 3vw, 2.4rem);
}
.public-attendance-shell {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}
.public-attendance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--gi-blue-950), var(--gi-blue-800));
  color: #fff;
  box-shadow: var(--shadow-md);
}
.public-attendance-logo {
  width: 44px;
  height: 62px;
  object-fit: contain;
}
.public-session-list {
  display: grid;
  gap: .55rem;
}
.public-session-button {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--program-accent, #0ea5e9), #fff 65%);
  background: linear-gradient(90deg, var(--program-bg, #eff6ff), #fff 74%);
  border-radius: 14px;
  padding: .72rem .85rem;
  text-align: left;
  cursor: pointer;
}
.public-session-button.is-active,
.public-session-button:hover {
  box-shadow: inset 4px 0 0 var(--program-accent, #0ea5e9), 0 10px 18px rgba(6,35,74,.08);
}
.public-session-button.today { border-color: var(--gi-sky-500); }
.portal-note {
  border-left: 4px solid var(--gi-sky-500);
  background: #eff6ff;
  border-radius: 14px;
  padding: .85rem;
  color: var(--gi-blue-900);
}
.empty-state-card { text-align: left; }
@page { size: A4 portrait; margin: 12mm; }
@media print {
  .brochure-print-document {
    width: 100%;
    max-width: 186mm;
    margin: 0 auto;
    box-shadow: none !important;
    border: 0 !important;
  }
  .brochure-print-table {
    width: 100%;
    min-width: 0 !important;
    table-layout: fixed;
    font-size: 10.5px;
  }
  .brochure-print-table th,
  .brochure-print-table td {
    padding: 5px 6px;
    word-break: break-word;
  }
  .print-brochure-module { page-break-inside: avoid; }
}

/* v1.5: integracion Gemini/Sheets para asistencias y scroll mas visible */
@keyframes emtelScrollAttention {
  0%, 100% { transform: translateZ(0); filter: brightness(1) saturate(1); box-shadow: 0 0 0 rgba(37,99,235,0), inset 0 0 0 1px rgba(255,255,255,.95); }
  35% { filter: brightness(1.04) saturate(1.28); box-shadow: 0 0 0 4px rgba(14,165,233,.08), 0 0 18px rgba(37,99,235,.22), inset 0 0 0 1px rgba(255,255,255,.95); }
  70% { filter: brightness(1.01) saturate(1.15); box-shadow: 0 0 0 2px rgba(14,165,233,.05), 0 0 12px rgba(14,165,233,.16), inset 0 0 0 1px rgba(255,255,255,.95); }
}
.spreadsheet-shell,
.table-top-scrollbar,
.sheet-top-scrollbar {
  animation: emtelScrollAttention 2.7s ease-in-out infinite !important;
}
.table-top-scrollbar::after,
.sheet-top-scrollbar::after {
  content: '⇄';
  position: absolute;
  left: .65rem;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 18px;
  display: grid;
  place-items: center;
  font-size: .82rem;
  font-weight: 950;
  color: #fff;
  background: linear-gradient(135deg, var(--gi-sky-500), var(--gi-blue-700));
  border-radius: 999px;
  animation: emtelScrollAttention 1.45s ease-in-out infinite;
  pointer-events: none;
}
.integration-note-card { border-left: 5px solid var(--gi-sky-500); }
.steps-list { margin: .3rem 0 0; padding-left: 1.2rem; color: var(--gi-blue-950); }
.steps-list li { margin: .35rem 0; }
.import-drop-zone {
  display: grid;
  gap: .6rem;
  border: 1px dashed rgba(14,165,233,.55);
  border-radius: 18px;
  background: linear-gradient(135deg, #f0f9ff, #fff);
  padding: 1rem;
}
.import-drop-zone input[type="file"] { width: 100%; }
.integration-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: .65rem;
  margin-top: .9rem;
}
.integration-summary.empty-state { display: block; }
.metric-mini {
  border: 1px solid rgba(14,165,233,.18);
  border-radius: 16px;
  background: #fff;
  padding: .85rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.metric-mini strong { display:block; font-size:1.35rem; color:var(--gi-blue-900); }
.metric-mini span { color:var(--gi-muted); font-size:.78rem; font-weight:850; text-transform:uppercase; letter-spacing:.04em; }
.attendance-sheet select[data-list-status] { min-width: 120px; margin-right: .35rem; }

/* v1.5.1: scrollbars tipo medidor con porcentaje, inspirados en scrollbar personalizada */
@keyframes emtelThumbPulse {
  0%, 100% { box-shadow: 0 8px 18px rgba(14, 165, 233, .22), inset 0 0 0 1px rgba(255,255,255,.70); filter: brightness(1); }
  45% { box-shadow: 0 8px 22px rgba(14, 165, 233, .35), 0 0 0 5px rgba(36, 182, 238, .10), inset 0 0 0 1px rgba(255,255,255,.85); filter: brightness(1.08); }
}
@keyframes emtelTrackShimmer {
  0% { background-position: 0 0; }
  100% { background-position: 42px 0; }
}
.spreadsheet-shell,
.table-top-scrollbar,
.sheet-top-scrollbar {
  animation: none !important;
}
.emtel-scroll-meter {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(190px, 1fr);
  align-items: center;
  gap: .75rem;
  min-height: 38px;
  padding: .45rem .65rem;
  margin: .8rem 0 .35rem;
  border: 1px solid rgba(36,182,238,.22);
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffff, #f0f9ff);
  box-shadow: 0 8px 20px rgba(6,35,74,.06), inset 0 0 0 1px rgba(255,255,255,.85);
}
.emtel-scroll-meter__label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-width: max-content;
  color: var(--gi-blue-900);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.emtel-scroll-meter__label .icon-svg { width: 18px; height: 18px; }
.emtel-scroll-meter__track {
  position: relative;
  height: 22px;
  border-radius: 999px;
  cursor: pointer;
  outline: 0;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.58) 0 8px, rgba(255,255,255,.20) 8px 16px),
    linear-gradient(90deg, rgba(36,182,238,.28), rgba(15,104,191,.18));
  background-size: 42px 100%, 100% 100%;
  animation: emtelTrackShimmer 1.8s linear infinite;
  box-shadow: inset 0 0 0 1px rgba(15,104,191,.16);
}
.emtel-scroll-meter__track:focus-visible {
  box-shadow: 0 0 0 4px rgba(36,182,238,.22), inset 0 0 0 1px rgba(15,104,191,.22);
}
.emtel-scroll-meter__thumb {
  position: absolute;
  inset: 3px auto 3px 3px;
  min-width: 76px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--gi-sky-500), var(--gi-blue-700) 55%, var(--gi-blue-900));
  display: grid;
  place-items: center;
  font-size: .74rem;
  font-weight: 950;
  letter-spacing: .02em;
  user-select: none;
  will-change: transform, width;
  animation: emtelThumbPulse 1.65s ease-in-out infinite;
}
.emtel-scroll-meter__thumb span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: .05rem .45rem;
  border-radius: 999px;
  background: rgba(6,35,74,.18);
}
.emtel-scroll-meter.is-not-scrollable {
  opacity: .58;
}
.emtel-scroll-meter.is-not-scrollable .emtel-scroll-meter__track,
.emtel-scroll-meter.is-not-scrollable .emtel-scroll-meter__thumb {
  animation: none;
}
.emtel-scroll-meter.is-not-scrollable .emtel-scroll-meter__label span:last-child::after {
  content: ' completo';
  font-weight: 800;
  color: var(--gi-muted);
  text-transform: none;
  letter-spacing: 0;
}
.table-top-scrollbar,
.sheet-top-scrollbar {
  position: relative;
  min-height: 26px !important;
  height: 26px !important;
  margin: .2rem 0 .55rem !important;
  padding: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #e0f5ff, #ecf5ff) !important;
  border: 1px solid rgba(36,182,238,.28) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.82), 0 6px 16px rgba(6,35,74,.05) !important;
  scrollbar-width: auto !important;
  scrollbar-color: var(--gi-blue-700) #e0f5ff !important;
}
.spreadsheet-shell {
  scrollbar-width: auto !important;
  scrollbar-color: var(--gi-blue-700) #e0f5ff !important;
}
.spreadsheet-shell::-webkit-scrollbar,
.table-top-scrollbar::-webkit-scrollbar,
.sheet-top-scrollbar::-webkit-scrollbar {
  height: 18px !important;
  width: 18px !important;
}
.spreadsheet-shell::-webkit-scrollbar-track,
.table-top-scrollbar::-webkit-scrollbar-track,
.sheet-top-scrollbar::-webkit-scrollbar-track {
  background: #e0f5ff !important;
  border-radius: 999px !important;
  border: 2px solid #f8fcff !important;
}
.spreadsheet-shell::-webkit-scrollbar-thumb,
.table-top-scrollbar::-webkit-scrollbar-thumb,
.sheet-top-scrollbar::-webkit-scrollbar-thumb {
  min-width: 70px;
  background: linear-gradient(135deg, var(--gi-sky-500), var(--gi-blue-700), var(--gi-blue-900)) !important;
  border-radius: 999px !important;
  border: 3px solid #e0f5ff !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,.6) inset !important;
}
.spreadsheet-shell::-webkit-scrollbar-thumb:hover,
.table-top-scrollbar::-webkit-scrollbar-thumb:hover,
.sheet-top-scrollbar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--gi-blue-600), var(--gi-blue-900)) !important;
}
.table-top-scrollbar::after,
.sheet-top-scrollbar::after {
  display: none !important;
}
@media (max-width: 720px) {
  .emtel-scroll-meter {
    grid-template-columns: 1fr;
    border-radius: 18px;
    gap: .45rem;
  }
  .emtel-scroll-meter__label { justify-content: center; }
}

/* v1.6: scroll superior integrado, listas compactas y calendario */
.emtel-scroll-meter { display: none !important; }
.table-top-scrollbar,
.sheet-top-scrollbar {
  height: 28px !important;
  min-height: 28px !important;
  margin: .35rem 0 .65rem !important;
  border: 1px solid rgba(37, 99, 235, .24) !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, rgba(14, 165, 233, .16), rgba(37, 99, 235, .10)) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.75), 0 6px 18px rgba(37,99,235,.08) !important;
  position: relative !important;
  overflow-x: auto !important;
  scrollbar-color: var(--gi-blue-600) #dff3ff;
  scrollbar-width: auto;
}
.table-top-scrollbar::after,
.sheet-top-scrollbar::after {
  content: attr(data-pct);
  position: sticky;
  left: calc((100% - 74px) * var(--scroll-pct, 0));
  top: 2px;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 70px;
  height: 22px;
  border-radius: 999px;
  color: #fff;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .02em;
  background: linear-gradient(135deg, var(--gi-blue-700), var(--gi-sky-500));
  box-shadow: 0 8px 18px rgba(37,99,235,.24);
  animation: scrollbarPulse 1.9s ease-in-out infinite;
  pointer-events: none;
}
.table-top-scrollbar::-webkit-scrollbar,
.sheet-top-scrollbar::-webkit-scrollbar { height: 20px !important; }
.table-top-scrollbar::-webkit-scrollbar-thumb,
.sheet-top-scrollbar::-webkit-scrollbar-thumb {
  border-radius: 999px !important;
  border: 4px solid #eaf7ff !important;
  background: linear-gradient(135deg, var(--gi-blue-700), var(--gi-sky-500)) !important;
}
@keyframes scrollbarPulse {
  0%, 100% { transform: scale(1); opacity: .94; }
  50% { transform: scale(1.04); opacity: 1; }
}
.sessions-sheet-card .spreadsheet-shell,
#view-sesiones .spreadsheet-shell {
  min-height: 560px;
  max-height: calc(100vh - 260px);
}
.shipping-view { display: none; }
.shipping-view.is-active { display: block; }
.detail-card {
  overflow: hidden;
  border-left: 6px solid var(--program-accent, var(--gi-blue-500));
  background: linear-gradient(90deg, var(--program-bg, rgba(14,165,233,.08)), #fff 35%);
}
.detail-card > summary {
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(70px, .55fr) minmax(0, 2.2fr) auto;
  gap: .85rem;
  align-items: center;
  padding: .95rem 1rem;
  list-style: none;
}
.detail-card > summary::-webkit-details-marker { display: none; }
.detail-card > summary strong { color: var(--program-accent, var(--gi-blue-800)); font-size: 1rem; }
.detail-card > summary span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; color: var(--gi-blue-950); }
.detail-card > summary em { font-style: normal; border-radius: 999px; padding: .24rem .55rem; background: var(--program-bg, #eaf7ff); color: var(--program-accent, var(--gi-blue-700)); font-weight: 900; }
.detail-card__body { padding: 0 1rem 1rem; border-top: 1px dashed rgba(37,99,235,.16); }
.calendar-toolbar { display: grid; grid-template-columns: auto auto repeat(3, minmax(145px, 1fr)); gap: .8rem; align-items: end; margin-bottom: 1rem; }
.calendar-card { min-height: 620px; }
.calendar-grid { display: grid; gap: .7rem; }
.calendar-grid.is-week { grid-template-columns: repeat(7, minmax(150px, 1fr)); }
.calendar-grid.is-month { grid-template-columns: repeat(7, minmax(120px, 1fr)); }
.calendar-day { min-height: 210px; padding: .75rem; border: 1px solid rgba(37,99,235,.14); border-radius: 1rem; background: #fff; box-shadow: 0 10px 24px rgba(15,23,42,.05); }
.calendar-grid.is-month .calendar-day { min-height: 150px; }
.calendar-day.is-today { outline: 3px solid rgba(14,165,233,.25); background: #f5fbff; }
.calendar-day header { display:flex; justify-content:space-between; gap:.5rem; align-items:flex-start; padding-bottom:.45rem; border-bottom:1px solid rgba(37,99,235,.10); margin-bottom:.5rem; }
.calendar-day header span { color: var(--gi-muted); font-size: .78rem; }
.calendar-events { display: grid; gap: .45rem; }
.calendar-event { text-align:left; border:1px solid rgba(37,99,235,.12); border-left:4px solid var(--program-accent, var(--gi-blue-500)); background: linear-gradient(90deg, var(--program-bg, #eef8ff), #fff); border-radius:.75rem; padding:.5rem; cursor:pointer; display:grid; gap:.18rem; color: var(--gi-blue-950); }
.calendar-event strong { font-size:.86rem; }
.calendar-event span, .calendar-event small { font-size:.76rem; color: var(--gi-muted); }
.payment-event { border-left-color: #f59e0b; }
.copy-block { display:grid; gap:.45rem; margin-top:1rem; }
.copy-block textarea { width:100%; border-radius:.8rem; border:1px solid rgba(37,99,235,.16); padding:.75rem; }
.dialog-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:.4rem .8rem; }
.brochure-registry-card { margin-bottom: 1rem; }
@media (max-width: 1100px) {
  .calendar-toolbar { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .calendar-grid.is-week, .calendar-grid.is-month { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .calendar-toolbar { grid-template-columns: 1fr; }
  .calendar-grid.is-week, .calendar-grid.is-month { grid-template-columns: 1fr; }
  .detail-card > summary { grid-template-columns: 1fr; gap: .35rem; }
}

/* v1.7: dashboard con pestanas internas y matriculados mas util */
.dashboard-tabs {
  display: grid;
  gap: .85rem;
  margin-top: 1rem;
}
.dashboard-tab-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid rgba(37,99,235,.12);
}
.dashboard-tab-strip .subtab {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
}
.dashboard-tab-strip .icon-svg { width: 17px; height: 17px; }
.dashboard-tab-body { min-height: 150px; }
.dashboard-tab-body .dashboard-kpi-section { display: none; }
.dashboard-tab-body .dashboard-kpi-section.is-active { display: block; }
.dashboard-tab-body .dashboard-kpi-section h3 { margin-top: 0; }
#view-hoja .spreadsheet-shell {
  min-height: min(680px, calc(100vh - 255px));
  max-height: calc(100vh - 220px);
}
#view-hoja .spreadsheet tbody td {
  padding: .36rem .48rem;
  vertical-align: middle;
  line-height: 1.2;
}
#view-hoja .spreadsheet thead th {
  padding: .55rem .55rem;
  vertical-align: middle;
}
#view-hoja .spreadsheet select,
#view-hoja .spreadsheet input {
  min-height: 28px;
  padding: .22rem .38rem;
}
#view-hoja .spreadsheet td small {
  margin-top: .05rem;
  line-height: 1.1;
}
#view-hoja .requirement-cell label {
  margin: .04rem .25rem .04rem 0;
}
@media (max-height: 760px) {
  #view-hoja .spreadsheet-shell {
    min-height: 520px;
    max-height: calc(100vh - 190px);
  }
}


/* v1.8 - bonos docentes y servicios con entregables */
.compact-toggle { justify-content: center; gap: .35rem; white-space: nowrap; }
.service-detail-box { border: 1px dashed rgba(37, 99, 235, .25); background: linear-gradient(135deg, rgba(239,246,255,.75), rgba(255,255,255,.95)); border-radius: 18px; padding: 14px; }
.compact-head { margin-bottom: 10px; }
.service-detail-rows { display: grid; gap: 10px; }
.service-detail-row { display: grid; grid-template-columns: 150px minmax(220px, 1.2fr) 170px minmax(220px, 1fr) minmax(220px, 1fr) auto; gap: 10px; align-items: end; padding: 10px; border: 1px solid rgba(148,163,184,.25); border-radius: 16px; background: rgba(255,255,255,.9); }
.services-review-sheet { min-width: 1180px; }
.service-report-detail-list { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.service-report-detail-list li { border-left: 3px solid var(--primary, #2563eb); padding-left: 8px; display: grid; gap: 2px; }
.service-report-detail-list span, .service-report-detail-list em { color: #64748b; font-size: 11px; }
.service-report-detail-list a { font-size: 11px; font-weight: 700; color: #2563eb; }
@media (max-width: 1100px) { .service-detail-row { grid-template-columns: 1fr 1fr; } .service-detail-row .icon-btn { justify-self: end; } }
@media (max-width: 720px) { .service-detail-row { grid-template-columns: 1fr; } }

/* v1.9 login y roles */
.login-page {
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, .18), transparent 30%), linear-gradient(135deg, #f8fbff 0%, #eef6ff 55%, #ffffff 100%);
  display: grid;
  place-items: center;
  padding: 28px;
}
.login-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(300px, 420px);
  gap: 22px;
  align-items: stretch;
}
.login-card, .login-side { padding: 28px; }
.login-brand { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.login-logo { width: 78px; height: 78px; border-radius: 22px; padding: 14px; background: linear-gradient(145deg, var(--blue-700, #1d4ed8), var(--sky-500, #0ea5e9)); box-shadow: 0 18px 45px rgba(37, 99, 235, .25); }
.login-brand h1 { margin: 0 0 6px; font-size: clamp(2rem, 5vw, 3.2rem); }
.form-message { min-height: 22px; color: #b91c1c; font-weight: 700; }
.login-continue { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border, #dbeafe); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.demo-users { display: grid; gap: 10px; margin: 16px 0 20px; }
.demo-user { text-align: left; border: 1px solid var(--border, #dbeafe); border-radius: 16px; padding: 12px 14px; background: #fff; cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.demo-user:hover { transform: translateY(-1px); border-color: var(--primary, #2563eb); box-shadow: 0 14px 28px rgba(37,99,235,.12); }
.demo-user strong { display: block; color: var(--ink, #0f172a); }
.demo-user span { display: block; color: var(--muted, #64748b); font-size: .86rem; }
.login-note { margin-top: 18px; padding: 14px; border-radius: 16px; background: #eff6ff; color: #1e3a8a; }
.login-note code { display: inline-block; margin-left: 6px; padding: 4px 8px; border-radius: 8px; background: #fff; }
.role-switch-card { margin: 0 12px 12px; padding: 10px; border: 1px solid rgba(255,255,255,.24); border-radius: 18px; background: rgba(255,255,255,.10); color: #fff; }
.role-switch-card label { display: block; font-size: .72rem; opacity: .82; margin-bottom: 6px; }
.role-view-select { width: 100%; border: 1px solid rgba(255,255,255,.26); border-radius: 12px; padding: 8px 10px; background: rgba(255,255,255,.94); color: #0f172a; font-weight: 800; }
.role-session { margin-top: 8px; display: grid; grid-template-columns: 1fr auto; gap: 2px 6px; align-items: center; }
.role-session span { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 800; }
.role-session small { color: rgba(255,255,255,.78); }
.role-session .icon-btn { grid-row: span 2; color: #fff; border-color: rgba(255,255,255,.25); }
.role-banner { margin-bottom: 16px; display: flex; justify-content: space-between; gap: 12px; align-items: center; border-left: 5px solid var(--primary, #2563eb); background: linear-gradient(90deg, #eff6ff, #ffffff); }
.role-banner strong { display: inline-flex; gap: 8px; align-items: center; color: #1e3a8a; }
.role-banner span { color: var(--muted, #64748b); font-size: .92rem; }
.users-view { display: none; }
.users-view.is-active { display: block; }
.users-row { grid-template-columns: minmax(190px, 1.5fr) minmax(130px, .9fr) minmax(160px, 1fr) auto auto; }
.role-map-card { display: grid; gap: 10px; padding: 14px; border-bottom: 1px solid var(--border, #e2e8f0); }
.role-map-card:last-child { border-bottom: 0; }
.compact-timeline { margin-top: 10px; }
@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-card, .login-side { padding: 20px; }
  .role-banner { display: block; }
  .users-row { grid-template-columns: 1fr; }
}
body.sidebar-collapsed .role-switch-card { padding: 8px; }
body.sidebar-collapsed .role-switch-card label,
body.sidebar-collapsed .role-switch-card .role-view-select,
body.sidebar-collapsed .role-session small { display: none; }

/* v2.0.1: se elimina selector de vista; queda solo sesion/cerrar sesion */
.role-switch-card.logout-card label,
.role-switch-card.logout-card .role-view-select { display: none !important; }
body.sidebar-collapsed .role-switch-card.logout-card .role-session small,
body.sidebar-collapsed .role-switch-card.logout-card .role-session span { display: none !important; }
body.sidebar-collapsed .role-switch-card.logout-card .role-session .icon-btn { grid-row: auto; }

/* v2.1.3: calculadoras temporales */
.calculator-view { display: none; }
.calculator-view.is-active { display: block; }
.calculator-output { display: grid; gap: 1rem; }
.calc-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.calc-kpi-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calc-table { margin-top: .85rem; }
.calc-row.is-current { outline: 2px solid var(--gi-sky-400); background: linear-gradient(90deg, var(--gi-blue-50), #fff); }
.status-note { border-radius: 14px; padding: .75rem .9rem; font-weight: 850; margin-bottom: .8rem; }
.status-note.status-warning { color: #92400e; background: #fef3c7; border: 1px solid #fcd34d; }
.calc-days-fieldset { margin-top: 1rem; }
@media (max-width: 980px) {
  .calc-kpi-grid, .calc-kpi-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .calc-kpi-grid, .calc-kpi-grid.two { grid-template-columns: 1fr; }
}

/* v2.1.4: compatibilidad con sidebar limpio */
.role-switch-card.logout-card label,
.role-switch-card.logout-card .role-view-select { display: none !important; }
.role-switch-card.logout-card .role-session { grid-template-columns: 1fr; }
body.sidebar-collapsed .role-switch-card.logout-card .role-session__meta,
body.sidebar-collapsed .role-switch-card.logout-card .role-session small { display: none !important; }
body.sidebar-collapsed .role-switch-card.logout-card .logout-button { grid-row: auto; }

body.sidebar-collapsed .role-switch-card.logout-card .role-session .logout-button span.icon,
body.sidebar-collapsed .role-switch-card.logout-card .role-session .logout-button span[data-icon] {
  display: inline-grid !important;
}
body.sidebar-collapsed .role-switch-card.logout-card .role-session .logout-button svg {
  display: block !important;
}

/* v2.1.5: roles con iconografia y creacion de usuarios docente-segura */
.role-badge,
.role-map-title {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
}
.role-badge .icon,
.role-map-title .icon,
.role-session__value .icon {
  width: 1rem;
  height: 1rem;
}
.field.is-disabled {
  opacity: .62;
}
.field.is-disabled select {
  cursor: not-allowed;
}
body.sidebar-collapsed .role-switch-card.logout-card .role-session__value,
body.sidebar-collapsed .role-switch-card.logout-card .role-session__line {
  display: none !important;
}
body.sidebar-collapsed .role-switch-card.logout-card .logout-button span[data-icon],
body.sidebar-collapsed .role-switch-card.logout-card .logout-button .icon {
  display: inline-grid !important;
}

/* v2.1.6: subpestanas internas de finanzas y deudas */
.dashboard-scope-tabs { display: flex; flex-wrap: wrap; gap: .45rem; margin: .65rem 0 1rem; }
.dashboard-scope-pane { display: none; }
.dashboard-scope-pane.is-active { display: block; }

/* v2.1.7: override final sidebar usuario/cierre */
.role-switch-card.session-card,
.role-switch-card.logout-card {
  display: none !important;
}
.logout-action-card {
  display: block !important;
  flex: 0 0 auto;
  margin: auto 12px .85rem !important;
  padding: .85rem 0 0 !important;
  border-top: 1px solid rgba(255,255,255,.18) !important;
  background: transparent !important;
}
.logout-action-card .logout-button {
  display: inline-flex !important;
  width: 100% !important;
  min-height: 42px !important;
  justify-content: center !important;
  align-items: center !important;
  gap: .5rem !important;
  white-space: nowrap !important;
  color: #fff !important;
  border-color: rgba(255,255,255,.22) !important;
  background: rgba(255,255,255,.12) !important;
}
body.sidebar-collapsed .brand {
  gap: 2rem !important;
  padding-bottom: 1.35rem !important;
}
body.sidebar-collapsed .sidebar-toggle {
  margin-top: 1.3rem !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
}
body.sidebar-collapsed .logout-action-card {
  width: 44px !important;
  margin: auto 0 .75rem !important;
  padding-top: .65rem !important;
  border-top-color: rgba(255,255,255,.10) !important;
}
body.sidebar-collapsed .logout-action-card .logout-button {
  width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  border-radius: 14px !important;
}
body.sidebar-collapsed .logout-action-card .nav-label {
  display: none !important;
}
body.sidebar-collapsed .logout-action-card .icon,
body.sidebar-collapsed .logout-action-card [data-icon],
body.sidebar-collapsed .logout-action-card svg {
  display: inline-grid !important;
}



/* v2.2.5: experiencia visual docente sin tocar sidebar */
.profile-groups-card,
.profile-sessions-card { overflow: hidden; }
.profile-group-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .9rem; }
.profile-group-card { border: 1px solid rgba(37,99,235,.14); border-left: 5px solid var(--program-accent, var(--gi-blue-600)); border-radius: 20px; padding: 1rem; background: linear-gradient(145deg, var(--program-bg, #f4f9ff), #fff 72%); box-shadow: 0 12px 26px rgba(6,35,74,.07); display: grid; gap: .65rem; }
.profile-group-card__head { display: flex; justify-content: space-between; align-items: center; gap: .7rem; }
.profile-group-card h3 { margin: 0; color: var(--gi-blue-950); font-size: 1.25rem; }
.profile-group-card p { margin: 0; color: var(--gi-muted); line-height: 1.35; }
.profile-group-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.profile-group-stats span { border: 1px solid rgba(37,99,235,.12); border-radius: 14px; background: rgba(255,255,255,.75); padding: .6rem; display: grid; gap: .15rem; }
.profile-group-stats strong { color: var(--gi-blue-900); font-size: 1.15rem; }
.profile-group-stats small { color: var(--gi-muted); font-size: .75rem; }
.profile-group-turns { display: grid; gap: .35rem; font-size: .82rem; color: var(--gi-blue-900); }
.profile-group-turns span { display: inline-flex; align-items: center; gap: .35rem; }
.profile-session-timeline { position: relative; display: grid; gap: .8rem; }
.profile-session-timeline::before { content: ''; position: absolute; left: 20px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--gi-blue-100), var(--gi-sky-400), var(--gi-blue-100)); }
.profile-session-item { position: relative; display: grid; grid-template-columns: 44px minmax(120px, .45fr) minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .85rem; border: 1px solid rgba(37,99,235,.12); border-radius: 18px; background: linear-gradient(90deg, var(--program-bg, #f4f9ff), #fff 64%); box-shadow: 0 8px 22px rgba(6,35,74,.06); }
.profile-session-marker { position: relative; z-index: 1; display: grid; place-items: center; }
.profile-session-marker span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 14px; color: var(--gi-blue-900); background: #fff; border: 2px solid var(--program-accent, var(--gi-sky-500)); font-weight: 950; }
.profile-session-date { display: grid; gap: .16rem; }
.profile-session-date strong { color: var(--gi-blue-950); }
.profile-session-date small { color: var(--gi-muted); }
.profile-session-body { min-width: 0; display: grid; gap: .25rem; }
.profile-session-title { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.profile-session-title strong { color: var(--gi-ink); }
.profile-session-body p { margin: 0; color: var(--gi-muted); }
.profile-session-meta { display: flex; flex-wrap: wrap; gap: .4rem .75rem; color: var(--gi-blue-900); font-size: .82rem; }
.profile-session-meta span { display: inline-flex; align-items: center; gap: .3rem; }

.teacher-sessions-shell { overflow: visible; padding: 0; background: transparent; border: 0; box-shadow: none; }
.teacher-session-list { display: grid; gap: .95rem; }
.teacher-session-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.teacher-session-overview article { border: 1px solid rgba(37,99,235,.14); border-radius: 18px; padding: .85rem; background: #fff; box-shadow: 0 10px 24px rgba(6,35,74,.06); display: grid; gap: .2rem; }
.teacher-session-overview small { color: var(--gi-muted); font-weight: 750; }
.teacher-session-overview strong { color: var(--gi-blue-950); font-size: 1.35rem; }
.teacher-session-card { display: grid; grid-template-columns: minmax(150px, .45fr) minmax(0, 1fr) minmax(210px, .38fr); gap: 1rem; border: 1px solid rgba(37,99,235,.14); border-left: 6px solid var(--program-accent, var(--gi-blue-600)); border-radius: 22px; padding: 1rem; background: linear-gradient(135deg, var(--program-bg, #f4f9ff), #fff 70%); box-shadow: 0 14px 32px rgba(6,35,74,.08); }
.teacher-session-date { border-radius: 18px; padding: .85rem; background: rgba(255,255,255,.72); border: 1px solid rgba(37,99,235,.12); display: grid; align-content: start; gap: .2rem; }
.teacher-session-date span { color: var(--gi-muted); font-size: .83rem; font-weight: 750; }
.teacher-session-date strong { color: var(--gi-blue-950); font-size: 1.05rem; }
.teacher-session-date small { color: var(--gi-muted); }
.teacher-session-main { min-width: 0; display: grid; gap: .5rem; }
.teacher-session-titleline { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.teacher-session-titleline h3 { margin: 0; color: var(--gi-blue-950); font-size: 1.05rem; }
.teacher-session-main p { margin: 0; color: var(--gi-muted); }
.teacher-session-meta,
.teacher-session-links { display: flex; flex-wrap: wrap; gap: .45rem .75rem; align-items: center; }
.teacher-session-meta span { display: inline-flex; align-items: center; gap: .3rem; color: var(--gi-blue-900); font-size: .83rem; }
.teacher-session-links { margin-top: .1rem; }
.session-link-muted { display: inline-flex; align-items: center; min-height: 30px; padding: .32rem .55rem; border-radius: 999px; color: var(--gi-muted); background: #f8fafc; border: 1px dashed var(--gi-line); font-size: .78rem; font-weight: 800; }
.teacher-session-actions { display: grid; gap: .45rem; align-content: start; justify-items: start; }
.teacher-session-actions strong { color: var(--gi-blue-950); font-size: 1.25rem; }
.teacher-session-actions small { color: var(--gi-muted); }
.teacher-session-actions .toggle-line { margin: 0; }
.session-marked { display: inline-flex; align-items: center; gap: .35rem; color: var(--gi-success); font-weight: 900; }
.session-state-completed { --state-accent: var(--gi-success); }
.session-state-rescheduled { --state-accent: var(--gi-warning); }
.session-state-cancelled { --state-accent: var(--gi-danger); }
.session-state-scheduled { --state-accent: var(--gi-blue-700); }
.teacher-session-card::before,
.calendar-session-event::before { background: var(--state-accent, var(--program-accent, var(--gi-blue-600))); }

.calendar-toolbar.is-teacher-calendar { grid-template-columns: auto auto repeat(2, minmax(170px, 1fr)); background: linear-gradient(135deg, #fff, var(--gi-blue-50)); }
.teacher-calendar-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: .9rem; }
.teacher-calendar-summary article { border: 1px solid rgba(37,99,235,.14); border-radius: 18px; padding: .8rem; background: #fff; box-shadow: 0 10px 22px rgba(6,35,74,.06); display: grid; gap: .2rem; }
.teacher-calendar-summary small { color: var(--gi-muted); font-weight: 760; }
.teacher-calendar-summary strong { color: var(--gi-blue-950); font-size: 1.35rem; }
.teacher-calendar-grid .calendar-day { background: linear-gradient(180deg, #fff, #f8fbff); }
.teacher-calendar-grid .calendar-day.has-events { border-color: rgba(14,165,233,.35); }
.calendar-session-event { position: relative; overflow: hidden; padding: .6rem .65rem .6rem .78rem; }
.calendar-session-event::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; }
.calendar-event-top { display: flex; justify-content: space-between; gap: .45rem; align-items: flex-start; }
.calendar-event-top .status-pill { font-size: .64rem; padding: .12rem .35rem; white-space: nowrap; }
.calendar-session-event span,
.calendar-session-event small { display: inline-flex; align-items: center; gap: .28rem; }

.notes-layout { grid-template-columns: 1fr; }
.notes-panel { position: static; display: grid; grid-template-columns: minmax(180px, .7fr) minmax(180px, .7fr) minmax(280px, 1.6fr); gap: .8rem; align-items: end; }
.notes-panel h3,
.notes-panel > .hint { grid-column: 1 / -1; margin: 0; }
.notes-panel h3 { margin-bottom: -.2rem; }
.grade-legend { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: .1rem 0 0; }
.notes-table-card .spreadsheet-shell { max-height: calc(100vh - 300px); }

#view-calculadora .subtab-strip { margin-bottom: 1rem; }
#view-calculadora .config-grid { align-items: start; }
#view-calculadora .card { border-color: rgba(37,99,235,.13); }
#view-calculadora .calculator-view > .config-grid > .card:first-child { background: linear-gradient(145deg, #fff, var(--gi-blue-50)); }
#view-calculadora .inline-fieldset { border: 1px solid rgba(37,99,235,.16); border-radius: 16px; padding: .85rem; background: rgba(255,255,255,.72); }
#view-calculadora .inline-fieldset legend { color: var(--gi-blue-900); font-weight: 900; padding: 0 .35rem; }
#view-calculadora .inline-fieldset label { border: 1px solid var(--gi-line); background: #fff; border-radius: 999px; padding: .45rem .7rem; }
.calc-kpi-grid .kpi-card { min-height: 118px; }
.calc-table .mini-row { border-radius: 14px; }

@media (max-width: 1120px) {
  .profile-session-item,
  .teacher-session-card { grid-template-columns: 1fr; }
  .teacher-session-overview,
  .teacher-calendar-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-toolbar.is-teacher-calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notes-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .profile-group-grid,
  .teacher-session-overview,
  .teacher-calendar-summary,
  .notes-panel { grid-template-columns: 1fr; }
  .profile-session-timeline::before { display: none; }
  .profile-session-item { gap: .55rem; }
}

/* v2.2.6: refresh visual moderno del contenido principal; no modifica la barra lateral */
@keyframes modernFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modernModalPop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

.main {
  background: linear-gradient(180deg, rgba(248,250,252,.94), rgba(241,245,249,.82));
}
.main .view.is-active { animation: modernFadeIn .28s ease both; }
.main .section-heading {
  align-items: center;
  padding: .9rem 1rem;
  margin: .15rem 0 1rem;
  border: 1px solid rgba(226,232,240,.9);
  border-radius: 26px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 18px 44px rgba(15,23,42,.08);
  backdrop-filter: blur(18px);
}
.main .section-heading .eyebrow { color: #2563eb; letter-spacing: .1em; }
.main .section-heading h2 { color: #0f172a; letter-spacing: -.035em; }
.main .card {
  border-color: rgba(226,232,240,.94);
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 14px 40px rgba(15,23,42,.08);
}
.main .card:hover { box-shadow: 0 20px 48px rgba(15,23,42,.1); }
.main .card__head h3 { color: #0f172a; letter-spacing: -.015em; }
.main .btn {
  border-radius: 14px;
  min-height: 42px;
  box-shadow: none;
}
.main .btn-primary { background: #2563eb; box-shadow: 0 12px 26px rgba(37,99,235,.22); }
.main .btn-primary:hover { background: #1d4ed8; box-shadow: 0 18px 32px rgba(37,99,235,.25); }
.main .btn-soft { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.main .btn-ghost { background: #fff; border-color: #e2e8f0; color: #334155; }
.main input, .main select, .main textarea {
  border-color: #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  color: #0f172a;
}
.main input:hover, .main select:hover, .main textarea:hover { background: #fff; border-color: #cbd5e1; }
.main input:focus, .main select:focus, .main textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59,130,246,.13);
  background: #fff;
}
.main .subtab-strip {
  display: flex;
  gap: .45rem;
  overflow-x: auto;
  margin: .85rem 0 1rem;
  padding: .42rem;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: rgba(241,245,249,.86);
  box-shadow: inset 0 1px 3px rgba(15,23,42,.04);
}
.main .subtab {
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #64748b;
  padding: .72rem 1rem;
  font-weight: 850;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.main .subtab:hover { background: #f8fafc; color: #334155; }
.main .subtab.is-active {
  background: #fff;
  color: #2563eb;
  border-color: #e2e8f0;
  box-shadow: 0 6px 16px rgba(15,23,42,.08);
}
.main .sheet-toolbar,
.main .compact-toolbar,
.main .dashboard-filters,
.main .service-report-toolbar,
.main .service-review-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .75rem;
  padding: .85rem;
  border-radius: 22px;
}
.main .sheet-toolbar .field,
.main .compact-toolbar .field { flex: 1 1 170px; }
.main .sheet-toolbar .field:first-child,
.main .compact-toolbar .field:first-child { flex: 2 1 260px; }
.main .field > span,
.main .field label > span { color: #334155; font-weight: 850; }
.main .form-section {
  border-color: #e2e8f0;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.main .form-section legend { color: #1e3a8a; }
.main .status-pill,
.main .badge,
.main .program-chip,
.main .chip { box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.main .program-card-accent,
.main .mini-card,
.main .debt-card {
  border-color: #e2e8f0;
  border-radius: 22px;
}
.main .debt-card-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.modern-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.modern-modal[hidden] { display: none !important; }
.modern-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.42);
  backdrop-filter: blur(8px);
}
.modern-modal__panel {
  position: relative;
  z-index: 1;
  width: min(920px, 96vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 32px 80px rgba(15,23,42,.26);
  overflow: hidden;
  animation: modernModalPop .22s ease both;
}
.modern-modal__head,
.modern-modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.modern-modal__foot { border-top: 1px solid #e2e8f0; border-bottom: 0; justify-content: flex-end; }
.modern-modal__head h3 { margin: 0; color: #0f172a; font-size: 1.2rem; }
.modern-modal__body { padding: 1.15rem; overflow: auto; }
.modern-modal-grid { display: grid; grid-template-columns: 1fr 1.45fr; gap: 1rem; }
.modern-modal fieldset {
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 1rem;
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.modern-modal legend { color: #1e3a8a; font-weight: 900; padding: 0 .35rem; }
.finance-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin: .35rem 0 .75rem;
  padding: .75rem;
  border: 1px solid #bbf7d0;
  border-radius: 18px;
  background: #ecfdf5;
}
.finance-summary div { display: grid; gap: .15rem; border-radius: 12px; background: rgba(255,255,255,.72); padding: .55rem; }
.finance-summary span, .finance-summary small { color: #047857; font-size: .74rem; font-weight: 800; }
.finance-summary strong { color: #064e3b; }

@media (max-width: 840px) {
  .main .section-heading { align-items: flex-start; flex-direction: column; }
  .modern-modal-grid { grid-template-columns: 1fr; }
}


/* v2.2.7 Docente: accesos rapidos de sesiones */
.session-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
}
.session-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .38rem;
  min-height: 36px;
  padding: .46rem .7rem;
  border: 1px solid rgba(37,99,235,.16);
  border-radius: 12px;
  background: #fff;
  color: var(--gi-blue-900);
  font-weight: 850;
  font-size: .78rem;
  box-shadow: 0 8px 18px rgba(6,35,74,.06);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.session-copy-btn:hover,
.session-copy-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(37,99,235,.36);
  box-shadow: 0 12px 26px rgba(6,35,74,.10);
  outline: none;
}
.session-copy-btn .icon { width: 18px; height: 18px; }
.session-copy-attendance { color: #0f766e; background: #f0fdfa; border-color: #99f6e4; }
.session-copy-video { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.session-copy-slides { color: #7c3aed; background: #f5f3ff; border-color: #ddd6fe; }
.session-copy-folder { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.session-quick-actions.is-compact .session-copy-btn {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 12px;
}
.session-quick-actions.is-compact .session-copy-btn span:not(.icon) { display: none; }
.profile-session-actions { margin-top: .45rem; }
.teacher-session-copybar { margin-top: .12rem; }
.session-dialog-actions {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(37,99,235,.14);
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fafc, #fff 70%);
}
.session-dialog-actions h3 {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0 0 .35rem;
  color: var(--gi-blue-950);
}
.dialog-session-copybar { margin-top: .8rem; }
@media (max-width: 740px) {
  .session-quick-actions:not(.is-compact) .session-copy-btn { flex: 1 1 150px; }
}

/* v2.2.8 Docente: sesiones con conectados Zoom y notas filtradas */
.session-connected-field {
  display: grid;
  gap: .28rem;
  width: 100%;
  max-width: 178px;
  padding: .55rem .65rem;
  border: 1px solid rgba(37,99,235,.14);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
}
.session-connected-field span {
  color: var(--gi-muted);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.session-connected-field input {
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid var(--gi-line);
  padding: .35rem .5rem;
  font-weight: 900;
  color: var(--gi-blue-950);
  background: #fff;
}
.teacher-session-card {
  grid-template-columns: minmax(140px, .38fr) minmax(0, 1fr) minmax(230px, .42fr);
  align-items: stretch;
}
.teacher-session-actions {
  border-left: 1px solid rgba(37,99,235,.12);
  padding-left: .85rem;
}
.notes-search-actions {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-wrap: wrap;
}
.notes-search-actions small { color: var(--gi-muted); font-weight: 750; }
.notes-config-empty {
  display: grid;
  gap: .25rem;
  padding: .85rem;
  border: 1px dashed rgba(37,99,235,.22);
  border-radius: 16px;
  background: #f8fbff;
  color: var(--gi-muted);
}
.notes-config-empty strong { color: var(--gi-blue-950); }
.notes-grade-editor {
  display: grid;
  gap: .8rem;
  grid-column: 1 / -1;
  padding: 1rem;
  border: 1px solid rgba(37,99,235,.16);
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fbff, #fff 70%);
}
.notes-grade-editor-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
  flex-wrap: wrap;
}
.notes-grade-editor-head strong { color: var(--gi-blue-950); font-size: 1rem; }
.notes-weight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: .75rem;
}
.notes-activity-rule-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .65rem;
}
.activity-rule-row select { min-width: 0; }
.notes-preview-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  border: 1px solid rgba(14,165,233,.18);
  border-radius: 14px;
  background: #f0f9ff;
  padding: .75rem .85rem;
  color: var(--gi-blue-900);
}
.notes-preview-box span { color: var(--gi-muted); }
.notes-preview-box b { color: var(--gi-blue-950); }
.notes-formula {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  border: 1px solid rgba(37,99,235,.14);
  border-radius: 14px;
  padding: .7rem .8rem;
  background: #f8fbff;
}
.notes-formula span { color: var(--gi-muted); }
#view-notas .notes-table-card .spreadsheet-shell {
  max-height: calc(100vh - 225px);
  min-height: 430px;
}
.notes-sheet {
  min-width: 1460px;
}
.notes-sheet th,
.notes-sheet td {
  white-space: normal;
}
.notes-sheet .notes-col-dni {
  left: 0;
  min-width: 106px;
  width: 106px;
}
.notes-sheet .frozen-2 {
  position: sticky;
  left: 106px;
  z-index: 4;
  min-width: 230px;
  width: 230px;
  box-shadow: 5px 0 12px rgba(6,35,74,.06);
}
.notes-sheet thead .frozen-2 {
  z-index: 8;
}
.notes-sheet .notes-col-contact {
  min-width: 94px;
  width: 94px;
  text-align: center;
}
.notes-sheet .notes-col-program {
  min-width: 150px;
  width: 150px;
  max-width: 165px;
}
.notes-sheet .notes-col-program small {
  display: block;
  margin-top: .25rem;
  line-height: 1.22;
  max-width: 145px;
}
.notes-sheet .activity-col {
  min-width: 112px;
}
.notes-sheet tbody tr.notes-row:nth-child(4n+1) td { background: linear-gradient(90deg, var(--program-bg), #ffffff 18%); }
.notes-sheet tbody tr.notes-row:nth-child(4n+2) td { background: linear-gradient(90deg, var(--program-bg), #f6faff 18%); }
.notes-sheet tbody tr.notes-row:nth-child(4n+3) td { background: linear-gradient(90deg, var(--program-bg), #f8fafc 18%); }
.notes-sheet tbody tr.notes-row:nth-child(4n) td { background: linear-gradient(90deg, var(--program-bg), #f0f9ff 18%); }
.notes-sheet tbody tr.notes-row:hover td { background: linear-gradient(90deg, var(--program-bg), #eaf6ff 18%) !important; }
.notes-sheet td.frozen,
.notes-sheet td.frozen-2 { background-clip: padding-box; }
.notes-contact-actions {
  display: inline-flex;
  justify-content: center;
  gap: .35rem;
}
.note-contact-btn {
  width: 32px;
  height: 32px;
  color: var(--gi-blue-800);
}
.note-contact-btn:first-child { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.attendance-grade-cell {
  display: grid;
  gap: .25rem;
  justify-items: center;
}
.attendance-grade-cell small {
  color: #94a3b8;
  font-size: .72rem;
  line-height: 1.15;
  text-align: center;
  max-width: 116px;
}
.notes-average strong {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 38px;
  padding: .3rem .5rem;
  border-radius: 12px;
  color: var(--gi-blue-950);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  font-size: 1.2rem;
}
.note-observation-btn { width: 34px; height: 34px; }
.note-observation-dot {
  display: block;
  margin-top: .25rem;
  color: var(--gi-muted);
  font-size: .7rem;
  text-align: center;
}
.badge-warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}
@media (max-width: 980px) {
  .teacher-session-card { grid-template-columns: 1fr; }
  .teacher-session-actions { border-left: 0; padding-left: 0; border-top: 1px solid rgba(37,99,235,.12); padding-top: .75rem; }
  .notes-weight-grid { grid-template-columns: 1fr; }
}

/* v2.2.9 coordinador academico */
.dashboard-filters.card {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.program-card-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.25;
  white-space: normal;
}
.program-admin-card summary,
.group-admin-card summary,
.turn-admin-card summary {
  align-items: flex-start;
  gap: 12px;
}
.group-turn-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.turn-admin-card summary strong {
  max-width: 460px;
  white-space: normal;
  line-height: 1.25;
}
.turn-admin-card summary span,
.turn-admin-card summary em {
  font-weight: 600;
}
.turn-meta-grid span {
  font-weight: 500;
}
.day-check-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}
.day-check-filter label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  cursor: pointer;
}
.day-check-filter input {
  accent-color: #2563eb;
}
.session-link-cell {
  display: grid;
  grid-template-columns: minmax(118px, 1fr) 34px;
  align-items: center;
  gap: 6px;
  min-width: 160px;
}
.session-link-cell .link-input {
  min-width: 0;
}
.session-copy-mini {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}
.session-admin-row.is-alt td {
  background: rgba(248, 250, 252, 0.76);
}
.session-admin-row.is-main td {
  background: rgba(255, 255, 255, 0.96);
}
.sessions-search-empty {
  min-height: 180px;
  padding: 48px !important;
  text-align: center !important;
  color: #64748b;
  font-weight: 700;
}
.compact-program-cell {
  min-width: 260px;
  max-width: 340px;
}
.compact-program-cell strong {
  display: block;
  white-space: normal;
  line-height: 1.2;
  font-size: 12.5px;
  margin-top: 4px;
}
.sessions-sheet th,
.sessions-sheet td {
  border-right: 1px solid rgba(226, 232, 240, 0.86);
}
.sessions-sheet tbody tr:hover td {
  background: #eef6ff !important;
}

/* v2.2.10: coordinador - docentes como agenda academica de contacto */
.teacher-card-modern > summary {
  grid-template-columns: minmax(220px, 1.25fr) minmax(260px, 1.75fr);
}
.teacher-card-title {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
}
.teacher-card-title strong {
  color: var(--gi-blue-950) !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.teacher-card-title .status-pill { flex: 0 0 auto; }
.teacher-card-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .35rem;
}
.teacher-card-metrics span {
  width: auto;
  min-width: auto !important;
  max-width: none;
  padding: .28rem .55rem;
  border: 1px solid rgba(37,99,235,.13);
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  color: var(--gi-blue-800) !important;
  font-size: .76rem;
  font-weight: 900;
}
.teacher-detail-body {
  display: grid;
  gap: .85rem;
  padding-top: .9rem;
}
.teacher-contact-actions {
  display: grid;
  gap: .65rem;
  padding: .75rem;
  border: 1px solid rgba(37,99,235,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.76);
}
.teacher-contact-line,
.teacher-email-list {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
}
.teacher-whatsapp-btn {
  color: #047857;
  border-color: #bbf7d0;
  background: #ecfdf5;
}
.teacher-email-pill {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #f8fbff;
  padding: .2rem .25rem .2rem .55rem;
  font-size: .78rem;
  font-weight: 850;
}
.teacher-email-pill a {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  color: var(--gi-blue-800);
  text-decoration: none;
}
.teacher-email-pill .icon-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
}
.teacher-assignment-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: .6rem;
}
.teacher-metric-card {
  border: 1px solid rgba(37,99,235,.12);
  border-radius: 16px;
  padding: .65rem .75rem;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  display: grid;
  gap: .1rem;
}
.teacher-metric-card strong {
  color: var(--gi-blue-950);
  font-size: 1.35rem;
  line-height: 1;
}
.teacher-metric-card small {
  color: var(--gi-muted);
  font-weight: 800;
}
.teacher-turn-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}
.teacher-turn-pill {
  border: 1px solid rgba(37,99,235,.12);
  border-left: 4px solid var(--program-accent, var(--gi-blue-500));
  border-radius: 14px;
  background: linear-gradient(90deg, var(--program-bg, #eff6ff), #fff 54%);
  padding: .55rem .65rem;
  display: grid;
  gap: .12rem;
}
.teacher-turn-pill strong { color: var(--program-accent, var(--gi-blue-800)); }
.teacher-turn-pill small { color: var(--gi-blue-950); font-weight: 850; }
.teacher-turn-pill em {
  font-style: normal;
  color: var(--gi-muted);
  font-size: .75rem;
  line-height: 1.25;
}
.teacher-system-row {
  color: var(--gi-muted);
  font-size: .84rem;
  font-weight: 800;
}
@media (max-width: 980px) {
  .teacher-card-modern > summary,
  .teacher-assignment-summary,
  .teacher-turn-list { grid-template-columns: 1fr; }
  .teacher-card-metrics { justify-content: flex-start; }
}

/* v2.2.11: refinamientos docente + coordinador */
.profile-kpi-money strong { color: #b45309; }
.profile-kpi-money.paid strong { color: #047857; }

.teacher-session-card {
  grid-template-columns: minmax(145px, .36fr) minmax(0, 1fr) minmax(170px, .28fr) !important;
  gap: .75rem !important;
  padding: .78rem !important;
  border-radius: 18px !important;
}
.teacher-session-date { padding: .68rem !important; border-radius: 15px !important; gap: .26rem !important; }
.teacher-session-date strong { font-size: .96rem !important; }
.teacher-session-titleline h3 { font-size: .98rem !important; line-height: 1.15; }
.teacher-session-main { gap: .38rem !important; }
.teacher-session-main p { font-size: .82rem; line-height: 1.25; }
.teacher-session-meta { gap: .35rem .55rem !important; }
.teacher-session-amount { color: #047857 !important; font-weight: 950; }
.teacher-session-actions { gap: .36rem !important; padding-left: .65rem !important; }
.teacher-session-statusline { display: flex; flex-wrap: wrap; gap: .35rem; }
.teacher-session-actions small { font-size: .76rem; }
.teacher-session-actions .btn-small { min-height: 32px; padding: .38rem .55rem; font-size: .76rem; }
.teacher-session-actions .toggle-line { min-height: 28px; padding: .25rem .45rem; font-size: .76rem; }
.teacher-session-links .session-quick-actions { flex-wrap: nowrap; }
.teacher-session-links .session-copy-btn { width: 32px !important; height: 32px !important; min-height: 32px !important; border-radius: 10px !important; }
.session-connected-field { max-width: 150px !important; padding: .42rem .5rem !important; border-radius: 12px !important; }
.session-connected-field input { min-height: 30px !important; }
.session-connected-field span { font-size: .65rem !important; }

.session-calendar-dialog .entity-dialog-head { margin-bottom: .9rem; }
.session-dialog-actions { margin-top: .85rem !important; }
.session-dialog-actions h3 { margin-bottom: .75rem !important; font-size: 1rem; }
.dialog-session-copybar .session-copy-btn span { font-size: .78rem; }

.session-link-cell.is-copy-only {
  min-width: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
}
.session-link-cell.is-copy-only small {
  display: none;
}
.session-link-cell.is-copy-only .session-copy-mini {
  width: 34px;
  height: 34px;
  min-width: 34px;
  color: var(--gi-blue-800);
  background: #eff6ff;
  border-color: #bfdbfe;
}
.session-link-cell.is-copy-only.is-empty .session-copy-mini {
  opacity: .58;
  filter: grayscale(.15);
}
.sessions-sheet tbody tr.session-admin-row:nth-child(4n+1) td { background: #ffffff !important; }
.sessions-sheet tbody tr.session-admin-row:nth-child(4n+2) td { background: #f8fbff !important; }
.sessions-sheet tbody tr.session-admin-row:nth-child(4n+3) td { background: #f8fafc !important; }
.sessions-sheet tbody tr.session-admin-row:nth-child(4n) td { background: #f0f9ff !important; }
.sessions-sheet tbody tr.session-admin-row:hover td { background: #eaf6ff !important; }
.bonus-toggle span { font-size: .76rem; }
.sessions-toolbar { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.sessions-toolbar #btnSessionsSearch { align-self: end; }

.academic-structure-card {
  border-radius: 20px !important;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(6,35,74,.07);
}
.academic-structure-card > summary {
  display: grid !important;
  grid-template-columns: minmax(110px, .4fr) minmax(0, 1.35fr) minmax(120px, auto) !important;
  align-items: center !important;
  min-height: 82px;
  background: linear-gradient(135deg, var(--program-bg, #f8fbff), #fff 76%);
}
.program-summary-code {
  display: grid;
  gap: .35rem;
  align-content: center;
}
.program-summary-code strong {
  font-size: 1.15rem;
  color: var(--program-accent, var(--gi-blue-800));
}
.academic-structure-card .program-card-name,
.turn-card-program {
  line-height: 1.22;
  color: var(--gi-blue-950);
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.academic-structure-card summary em {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .35rem;
  font-style: normal;
  color: var(--gi-muted);
  font-weight: 800 !important;
  white-space: nowrap;
}
.turn-card-line {
  display: flex !important;
  gap: .45rem;
  align-items: center;
  color: var(--gi-blue-900) !important;
}
.turn-card-line strong {
  color: var(--program-accent, var(--gi-blue-700)) !important;
  font-size: .95rem !important;
}
.turn-card-line span {
  color: var(--gi-blue-950) !important;
  font-weight: 850 !important;
}

.entity-dialog { display: grid; gap: 1rem; }
.entity-dialog-head {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-wrap: wrap;
  padding: .85rem;
  border: 1px solid rgba(37,99,235,.13);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--program-bg, #f8fbff), #fff 72%);
}
.entity-dialog-head h2 { margin: 0; color: var(--gi-blue-950); font-size: 1.25rem; line-height: 1.18; flex: 1 1 260px; }
.entity-dialog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .65rem; }
.entity-dialog-grid p {
  margin: 0;
  display: grid;
  gap: .22rem;
  padding: .75rem;
  border: 1px solid rgba(37,99,235,.12);
  border-radius: 14px;
  background: #fff;
}
.entity-dialog-grid strong { color: var(--gi-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .035em; }
.entity-dialog-grid span { color: var(--gi-blue-950); font-weight: 850; line-height: 1.25; }
.entity-mini-table .mini-row { border-radius: 14px; }
.teacher-avatar-mini { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 14px; background: #eff6ff; color: var(--gi-blue-700); }
.teacher-dialog-contact { margin-top: -.25rem; }

.teacher-card-modern > summary {
  grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr) !important;
  min-height: 76px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
}
.teacher-card-title strong { white-space: normal !important; line-height: 1.18; }
.teacher-card-metrics span { background: #fff !important; }
.teacher-contact-actions { background: linear-gradient(135deg, #ffffff, #f8fbff) !important; }
.teacher-assignment-summary { grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)) !important; }
.teacher-metric-card { text-align: center; }
.teacher-metric-card strong { font-size: 1.2rem !important; }

.notes-weight-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important; }
.notes-activity-rule-list select,
.notes-weight-grid input,
.notes-panel select { font-weight: 650 !important; font-size: .88rem; }
.notes-activity-rule-list .field span,
.notes-weight-grid .field span { font-size: .76rem; }

@media (max-width: 920px) {
  .academic-structure-card > summary,
  .teacher-session-card,
  .teacher-card-modern > summary { grid-template-columns: 1fr !important; }
  .academic-structure-card summary em { justify-content: flex-start; }
}

/* v2.2.12 Docente: pulido visual perfil, calendario, notas y calculadoras */
body[data-role="docente"] .profile-summary-pane .profile-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
}
body[data-role="docente"] .profile-summary-pane .profile-kpi-money {
  background: linear-gradient(145deg, #f8fafc, #fff);
  border-color: rgba(37, 99, 235, .18);
}
body[data-role="docente"] .profile-summary-pane .profile-kpi-money strong {
  font-size: 1.12rem;
  letter-spacing: -.02em;
}
body[data-role="docente"] .profile-summary-pane .profile-kpi-money.paid {
  background: linear-gradient(145deg, #ecfdf5, #fff);
  border-color: rgba(16,185,129,.24);
}

.clean-session-dialog { display: grid; gap: 1rem; }
.session-dialog-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .8rem;
  align-items: center;
  padding: .75rem;
  border: 1px solid rgba(37,99,235,.12);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--program-bg, #f8fbff), #fff 78%);
}
.session-dialog-hero h2 {
  margin: 0;
  color: var(--gi-blue-950);
  font-size: 1.08rem;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.session-dialog-hero p { margin: .15rem 0 0; color: var(--gi-muted); font-size: .86rem; line-height: 1.35; }
.session-dialog-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}
.session-dialog-facts p {
  margin: 0;
  padding: .72rem .78rem;
  border: 1px solid rgba(37,99,235,.12);
  border-radius: 15px;
  background: #fff;
  display: grid;
  gap: .18rem;
}
.session-dialog-facts span { display: inline-flex; align-items: center; gap: .32rem; color: var(--gi-muted); font-size: .76rem; font-weight: 720; }
.session-dialog-facts b { color: var(--gi-ink); font-size: .9rem; font-weight: 650; line-height: 1.3; }
.clean-copy-actions { padding: .85rem; margin-top: 0; }
.clean-copy-actions h3 { font-size: .92rem; font-weight: 760; color: var(--gi-blue-900); }
.clean-copy-actions .dialog-session-copybar { margin-top: .55rem; gap: .5rem; }
.clean-copy-actions .session-copy-btn { box-shadow: none; }

.notes-preview-box {
  align-items: stretch;
  border-color: rgba(37,99,235,.16);
  background: linear-gradient(145deg, #f8fbff, #fff 72%);
}
.notes-preview-box > strong { color: var(--gi-blue-950); font-size: .92rem; }
.notes-preview-scoreline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem;
  margin-top: .65rem;
}
.notes-preview-scoreline span,
.notes-preview-activities span {
  display: grid;
  gap: .18rem;
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 14px;
  background: #fff;
  padding: .55rem .65rem;
}
.notes-preview-scoreline em,
.notes-preview-activities em { font-style: normal; color: var(--gi-muted); font-size: .72rem; font-weight: 720; }
.notes-preview-scoreline b,
.notes-preview-activities b { color: var(--gi-blue-950); font-size: 1.05rem; }
.notes-preview-scoreline small,
.notes-preview-activities small { color: #64748b; font-size: .7rem; line-height: 1.25; }
.notes-preview-scoreline .is-result { border-color: rgba(37,99,235,.28); background: linear-gradient(145deg, var(--gi-blue-50), #fff); }
.notes-preview-scoreline .is-result b { font-size: 1.22rem; }
.notes-preview-activities {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: .45rem;
  margin-top: .55rem;
}
.notes-activity-rule-list .field select,
.notes-weight-grid .field input { font-weight: 650; }
.notes-activity-rule-list .field span,
.notes-weight-grid .field span { font-size: .75rem; font-weight: 720; color: var(--gi-muted); }

#view-calculadora .section-head {
  border: 1px solid rgba(37,99,235,.12);
  border-radius: 22px;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, var(--gi-blue-50), #fff 62%);
  box-shadow: 0 12px 28px rgba(6,35,74,.06);
}
#view-calculadora .subtab-strip {
  padding: .35rem;
  border: 1px solid rgba(37,99,235,.12);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(6,35,74,.05);
}
#view-calculadora .subtab { border-radius: 14px; font-weight: 760; }
#view-calculadora .calculator-view > .config-grid {
  grid-template-columns: minmax(280px, .8fr) minmax(360px, 1.2fr);
  gap: 1rem;
}
#view-calculadora .calculator-view > .config-grid > .card {
  border-radius: 24px;
  box-shadow: 0 14px 32px rgba(6,35,74,.07);
}
#view-calculadora .calculator-view > .config-grid > .card:first-child {
  background: linear-gradient(145deg, #fff, #f8fbff 78%);
}
#view-calculadora .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
#view-calculadora .field.compact {
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 16px;
  background: #fff;
  padding: .65rem;
}
#view-calculadora .field.compact span {
  font-size: .74rem;
  color: var(--gi-muted);
  font-weight: 740;
}
#view-calculadora .field.compact input {
  border-radius: 12px;
  min-height: 38px;
  font-weight: 700;
}
#view-calculadora .inline-fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
#view-calculadora .inline-fieldset label {
  display: inline-flex;
  align-items: center;
  gap: .36rem;
  font-weight: 720;
  color: var(--gi-blue-900);
}
#view-calculadora .calculator-output { gap: .8rem; }
#view-calculadora .calc-kpi-grid { gap: .75rem; }
#view-calculadora .calc-kpi-grid .kpi-card {
  min-height: 104px;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(6,35,74,.06);
}
#view-calculadora .calc-kpi-grid .kpi-value { font-size: 1.22rem; }
#view-calculadora .calc-table {
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 18px;
  padding: .35rem;
  background: #f8fafc;
  max-height: 360px;
  overflow: auto;
}
#view-calculadora .calc-table .mini-row {
  background: #fff;
  border-color: transparent;
  box-shadow: none;
}

@media (max-width: 1120px) {
  body[data-role="docente"] .profile-summary-pane .profile-kpis,
  .notes-preview-scoreline,
  #view-calculadora .calculator-view > .config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  body[data-role="docente"] .profile-summary-pane .profile-kpis,
  .session-dialog-hero,
  .session-dialog-facts,
  .notes-preview-scoreline,
  #view-calculadora .calculator-view > .config-grid,
  #view-calculadora .form-grid { grid-template-columns: 1fr; }
}


/* v2.2.13 Coordinador: limpieza UX de dashboard, estructura, sesiones y brochures */
body[data-role="gestor_academico"] .dashboard-filters.card {
  display: grid;
  grid-template-columns: minmax(240px, 1.45fr) minmax(135px, .72fr) minmax(130px, .58fr) minmax(135px, .72fr);
  gap: .6rem;
  padding: .72rem;
  align-items: end;
}
body[data-role="gestor_academico"] .dashboard-filters .field span,
body[data-role="gestor_academico"] .list-toolbar .field span,
body[data-role="gestor_academico"] .sessions-toolbar .field span {
  font-weight: 650;
  font-size: .7rem;
  color: #64748b;
}
body[data-role="gestor_academico"] .dashboard-filters select,
body[data-role="gestor_academico"] .list-toolbar select,
body[data-role="gestor_academico"] .sessions-toolbar select,
body[data-role="gestor_academico"] .sessions-toolbar input {
  min-height: 38px;
  font-size: .82rem;
  font-weight: 520;
  white-space: normal;
}
body[data-role="gestor_academico"] .dashboard-filters select:disabled { opacity: .68; background: #f8fafc; }

body[data-role="gestor_academico"] .program-card-grid,
body[data-role="gestor_academico"] .group-card-grid {
  align-items: stretch;
}
body[data-role="gestor_academico"] #turnList.group-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}
.academic-structure-card {
  border: 1px solid rgba(148,163,184,.20) !important;
  box-shadow: 0 10px 24px rgba(15,23,42,.055) !important;
}
.academic-structure-card > summary {
  grid-template-columns: 1fr !important;
  gap: .55rem !important;
  min-height: auto !important;
  padding: .9rem !important;
  align-items: start !important;
}
.structure-card-top,
.structure-meta-row,
.turn-main-line,
.turn-time-line,
.turn-teacher-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .42rem;
}
.program-code-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: .25rem .55rem;
  border-radius: 999px;
  background: var(--program-bg, #eff6ff);
  color: var(--program-accent, #2563eb);
  border: 1px solid rgba(37,99,235,.14);
  font-size: .78rem;
  font-weight: 760;
}
.structure-titleblock { display: grid; gap: .18rem; min-width: 0; }
.structure-title {
  color: var(--gi-blue-950);
  font-size: .94rem;
  font-weight: 640 !important;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.structure-titleblock small,
.turn-teacher-line {
  color: #64748b;
  font-size: .78rem;
  line-height: 1.28;
  font-weight: 520 !important;
}
.structure-meta-row span,
.turn-time-line {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  border: 1px solid rgba(148,163,184,.20);
  background: rgba(255,255,255,.75);
  border-radius: 999px;
  padding: .28rem .5rem;
  color: #475569;
  font-size: .76rem;
  font-weight: 560 !important;
}
.turn-program-line {
  color: var(--gi-blue-950);
  font-size: .9rem;
  font-weight: 620;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.turn-main-line span:not(.program-code-pill) { font-weight: 620; color: #334155; }
.day-check-filter {
  gap: .4rem !important;
  padding: .48rem !important;
  background: linear-gradient(145deg, #f8fbff, #fff) !important;
  border-radius: 18px !important;
}
.day-check-filter label {
  min-height: 34px !important;
  padding: .36rem .56rem !important;
  border-radius: 999px !important;
  font-weight: 560 !important;
  box-shadow: 0 6px 14px rgba(15,23,42,.04);
}
.day-check-filter input:checked + span { color: var(--gi-blue-700); }

.entity-dialog-head,
.session-dialog-hero {
  box-shadow: none !important;
}
.entity-dialog-head h2,
.session-dialog-hero h2 {
  font-size: 1.04rem !important;
  font-weight: 640 !important;
}
.entity-dialog-grid strong,
.dialog-grid strong,
.session-dialog-facts span {
  font-weight: 560 !important;
}
.entity-dialog-grid span,
.session-dialog-facts b {
  font-weight: 520 !important;
}
.entity-mini-table .mini-row strong {
  font-weight: 620 !important;
}

.teacher-contact-card > summary {
  grid-template-columns: minmax(260px, 1.1fr) minmax(280px, 1fr) !important;
  gap: .65rem;
  padding: .85rem !important;
  border-radius: 20px;
}
.teacher-name-block { display: grid; gap: .12rem; min-width: 0; }
.teacher-name-block strong { font-weight: 640 !important; font-size: .95rem; line-height: 1.2; }
.teacher-name-block small { color: #64748b; font-size: .74rem; font-weight: 520; }
.teacher-card-metrics span { font-weight: 560 !important; color: #475569 !important; }
.teacher-contact-actions { box-shadow: none !important; }
.teacher-metric-card strong { font-weight: 640 !important; }
.teacher-metric-card small { font-weight: 520 !important; }

body[data-role="gestor_academico"] .sessions-toolbar {
  grid-template-columns: minmax(230px, 1.2fr) minmax(90px,.45fr) minmax(105px,.5fr) minmax(160px,.8fr) minmax(95px,.45fr) minmax(90px,.38fr) minmax(92px,.38fr) auto;
  gap: .55rem;
  padding: .72rem;
}
body[data-role="gestor_academico"] .sessions-sheet tbody tr.session-admin-row:nth-child(odd) td { background: #ffffff !important; }
body[data-role="gestor_academico"] .sessions-sheet tbody tr.session-admin-row:nth-child(even) td { background: #eef7ff !important; }
body[data-role="gestor_academico"] .sessions-sheet tbody tr.session-admin-row:hover td { background: #dff0ff !important; }
body[data-role="gestor_academico"] .session-link-cell.is-copy-only small { display: none !important; }
body[data-role="gestor_academico"] .session-link-cell.is-copy-only { min-width: 46px; }
body[data-role="gestor_academico"] .session-link-cell.is-copy-only .session-copy-mini { width: 32px; height: 32px; min-width: 32px; }
body[data-role="gestor_academico"] .bonus-toggle span { font-size: 0; }
body[data-role="gestor_academico"] .bonus-toggle span::before { content: 'Bono'; font-size: .74rem; }
body[data-role="gestor_academico"] .bonus-toggle input:checked + span { font-size: .74rem; }
body[data-role="gestor_academico"] .bonus-toggle input:checked + span::before { content: ''; }

.brochure-layout {
  grid-template-columns: minmax(250px, .72fr) minmax(0, 1.28fr) !important;
}
.brochure-builder { display: grid; gap: .9rem; }
.brochure-title-box { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.brochure-module {
  border-radius: 22px !important;
  box-shadow: 0 10px 24px rgba(15,23,42,.055);
}
.brochure-module-grid { grid-template-columns: minmax(220px,.7fr) minmax(0,1.3fr) !important; }
.brochure-session-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
}
.brochure-session {
  grid-template-columns: auto minmax(0,1fr) !important;
  align-items: start !important;
  gap: .5rem !important;
  padding: .7rem !important;
  border-radius: 18px !important;
}
.brochure-session .field:nth-of-type(2),
.brochure-session .brochure-tools-box,
.brochure-session .vertical-actions { grid-column: 1 / -1; }
.brochure-session textarea { min-height: 58px; }
.brochure-session .vertical-actions { flex-direction: row !important; justify-content: flex-end; }
.brochure-tools-box { gap: .45rem !important; }
@media (max-width: 1180px) {
  body[data-role="gestor_academico"] .dashboard-filters.card,
  body[data-role="gestor_academico"] .sessions-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-role="gestor_academico"] #turnList.group-card-grid,
  .brochure-session-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body[data-role="gestor_academico"] .dashboard-filters.card,
  body[data-role="gestor_academico"] .sessions-toolbar,
  body[data-role="gestor_academico"] #turnList.group-card-grid,
  .brochure-layout,
  .brochure-title-box,
  .brochure-module-grid,
  .brochure-session-list,
  .teacher-contact-card > summary { grid-template-columns: 1fr !important; }
}

/* v2.2.14 Refinamiento UI: notas compactas y estructura academica con cards tipo ficha */
.notes-preview-box-inline {
  display: grid !important;
  grid-template-columns: 170px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: .65rem !important;
  padding: .7rem !important;
  overflow: hidden;
}
.notes-preview-top {
  display: grid;
  gap: .18rem;
  padding-right: .55rem;
  border-right: 1px solid rgba(148,163,184,.22);
}
.notes-preview-top span {
  color: var(--gi-muted);
  font-size: .72rem;
  font-weight: 540;
  letter-spacing: .01em;
}
.notes-preview-top output {
  color: var(--gi-blue-950);
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.1;
}
.notes-preview-box-inline #notesPreviewBreakdown {
  display: flex;
  min-width: 0;
  gap: .45rem;
  overflow-x: auto;
  padding-bottom: .08rem;
}
.notes-preview-box-inline .notes-preview-scoreline,
.notes-preview-box-inline .notes-preview-activities {
  display: contents !important;
  margin: 0 !important;
}
.notes-preview-box-inline .notes-preview-scoreline span,
.notes-preview-box-inline .notes-preview-activities span {
  min-width: 94px;
  padding: .48rem .56rem !important;
  border-radius: 12px !important;
  gap: .12rem !important;
  box-shadow: none !important;
}
.notes-preview-box-inline .notes-preview-scoreline em,
.notes-preview-box-inline .notes-preview-activities em {
  font-weight: 520 !important;
  font-size: .68rem !important;
  text-transform: none !important;
}
.notes-preview-box-inline .notes-preview-scoreline b,
.notes-preview-box-inline .notes-preview-activities b {
  font-size: .92rem !important;
  font-weight: 650 !important;
}
.notes-preview-box-inline .notes-preview-scoreline small,
.notes-preview-box-inline .notes-preview-activities small {
  font-size: .66rem !important;
}
body[data-role="gestor_academico"] .dashboard-filters.card {
  grid-template-columns: minmax(180px, 1.25fr) minmax(112px, .7fr) minmax(96px, .48fr) minmax(118px, .68fr) !important;
  gap: .45rem !important;
  padding: .58rem !important;
  align-items: end;
}
body[data-role="gestor_academico"] .dashboard-filters .field {
  gap: .22rem;
  padding: .42rem .48rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(148,163,184,.18);
}
body[data-role="gestor_academico"] .dashboard-filters .field span {
  line-height: 1.1;
  white-space: normal;
}
body[data-role="gestor_academico"] .dashboard-filters select {
  min-height: 33px !important;
  padding: .34rem .55rem !important;
  border-radius: 11px !important;
  line-height: 1.15;
}
body[data-role="gestor_academico"] .list-toolbar,
body[data-role="gestor_academico"] .sessions-toolbar {
  border-radius: 18px;
}
body[data-role="gestor_academico"] .program-card-grid,
body[data-role="gestor_academico"] .group-card-grid,
body[data-role="gestor_academico"] #turnList.group-card-grid,
body[data-role="gestor_academico"] #teacherList {
  gap: .9rem;
}
.structure-card-modern {
  position: relative;
  overflow: hidden;
  border-radius: 24px !important;
  background: linear-gradient(145deg, #ffffff, #f8fbff 82%) !important;
  border: 1px solid rgba(148,163,184,.22) !important;
  box-shadow: 0 14px 32px rgba(15,23,42,.065) !important;
}
.structure-card-modern::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--program-accent, #2563eb);
  opacity: .72;
}
.structure-card-modern > summary {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: .75rem !important;
  align-items: center !important;
  padding: 1rem 1rem 1rem 1.08rem !important;
  cursor: pointer;
  list-style: none;
}
.structure-card-modern > summary::-webkit-details-marker { display: none; }
.structure-identity,
.teacher-card-title {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: .72rem !important;
  min-width: 0;
}
.structure-avatar,
.dialog-avatar {
  min-width: 48px;
  height: 48px;
  padding: 0 .62rem;
  border-radius: 17px;
  display: inline-grid;
  place-items: center;
  color: var(--program-accent, var(--gi-blue-700));
  background: var(--program-bg, #eff6ff);
  border: 1px solid rgba(37,99,235,.16);
  font-size: .82rem;
  font-weight: 670;
  letter-spacing: -.01em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.structure-titleblock,
.turn-titleblock,
.teacher-name-block {
  display: grid;
  gap: .24rem;
  min-width: 0;
}
.structure-kicker,
.teacher-name-block small,
.dialog-titleblock small {
  color: #64748b;
  font-size: .72rem;
  font-weight: 520 !important;
  line-height: 1.2;
}
.structure-title {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  color: var(--gi-blue-950) !important;
  font-size: .98rem !important;
  line-height: 1.22 !important;
  font-weight: 610 !important;
  letter-spacing: -.01em;
  white-space: normal !important;
}
.structure-chipline,
.turn-chipline,
.teacher-card-metrics {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end;
  gap: .38rem !important;
  max-width: 330px;
}
.structure-chipline > span,
.turn-chipline > span,
.teacher-card-metrics > span:not(.status-pill),
.structure-quick-grid > span {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.22);
  background: #fff;
  padding: .34rem .55rem;
  color: #475569;
  font-size: .74rem;
  line-height: 1.1;
  font-weight: 520 !important;
  box-shadow: 0 6px 16px rgba(15,23,42,.04);
}
.structure-card-modern .status-pill {
  font-weight: 610 !important;
  font-size: .72rem !important;
  padding: .33rem .54rem !important;
}
.structure-quick-grid {
  display: flex !important;
  flex-wrap: wrap;
  gap: .45rem !important;
  margin-bottom: .75rem;
}
.structure-card-modern .detail-card__body {
  padding: .85rem 1rem 1rem 1.08rem !important;
  border-top: 1px solid rgba(148,163,184,.16);
  background: rgba(255,255,255,.72);
}
.turn-route-line {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  color: var(--gi-blue-950);
  font-weight: 610 !important;
  line-height: 1.2;
}
.turn-route-line .structure-avatar {
  min-width: 40px;
  height: 38px;
  border-radius: 14px;
}
.turn-chipline { justify-content: flex-start; max-width: 420px; }
.teacher-card-modern > summary {
  grid-template-columns: minmax(0, 1fr) auto !important;
  background: transparent !important;
}
.teacher-avatar-mini.dialog-avatar,
.teacher-avatar-mini {
  width: 48px !important;
  height: 48px !important;
  border-radius: 17px !important;
}
.teacher-name-block strong {
  color: var(--gi-blue-950);
  font-size: .98rem !important;
  font-weight: 610 !important;
}
.teacher-card-metrics { max-width: 420px; }
.teacher-contact-card > summary { grid-template-columns: minmax(0, 1fr) auto !important; }
.teacher-detail-body .teacher-contact-actions {
  border-radius: 18px !important;
  border: 1px solid rgba(148,163,184,.18);
  background: #fff !important;
}
.app-dialog { max-width: min(820px, 94vw); border-radius: 28px; }
.app-dialog form { padding: 1rem; }
.entity-dialog-modern {
  gap: .85rem !important;
}
.entity-dialog-modern .entity-dialog-head {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  gap: .8rem !important;
  align-items: center !important;
  border-radius: 22px !important;
  padding: .95rem 1rem !important;
  background: linear-gradient(145deg, var(--program-bg, #f8fbff), #fff 74%) !important;
  border-color: rgba(148,163,184,.18) !important;
}
.dialog-titleblock { display: grid; gap: .16rem; min-width: 0; }
.entity-dialog-modern .entity-dialog-head h2 {
  font-size: 1.04rem !important;
  font-weight: 610 !important;
  letter-spacing: -.01em;
  line-height: 1.2;
  margin: 0;
  overflow-wrap: anywhere;
}
.entity-dialog-modern .entity-dialog-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  gap: .55rem !important;
}
.entity-dialog-modern .entity-dialog-grid p {
  border-radius: 16px !important;
  padding: .66rem .72rem !important;
  background: #fff !important;
  border-color: rgba(148,163,184,.18) !important;
}
.entity-dialog-modern .entity-dialog-grid strong {
  font-size: .68rem !important;
  font-weight: 520 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: #64748b !important;
}
.entity-dialog-modern .entity-dialog-grid span {
  font-size: .88rem !important;
  font-weight: 540 !important;
  color: var(--gi-blue-950) !important;
}
.entity-dialog-modern h3 {
  margin: .25rem 0 0;
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  color: var(--gi-blue-900);
  font-size: .9rem;
  font-weight: 610;
}
.entity-dialog-modern .mini-table {
  padding: .25rem;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(148,163,184,.18);
}
.entity-dialog-modern .mini-row {
  background: #fff !important;
  border-color: rgba(148,163,184,.16) !important;
  border-radius: 14px !important;
  font-size: .82rem;
}
.entity-dialog-modern .mini-row strong {
  font-weight: 610 !important;
}
.entity-dialog-modern .mini-row span {
  color: #475569;
  font-weight: 500;
}
@media (max-width: 1180px) {
  body[data-role="gestor_academico"] .dashboard-filters.card { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .structure-card-modern > summary,
  .teacher-contact-card > summary { grid-template-columns: 1fr !important; }
  .structure-chipline,
  .turn-chipline,
  .teacher-card-metrics { justify-content: flex-start; max-width: none; }
}
@media (max-width: 760px) {
  .notes-preview-box-inline { grid-template-columns: 1fr !important; }
  .notes-preview-top { border-right: 0; border-bottom: 1px solid rgba(148,163,184,.22); padding-right: 0; padding-bottom: .5rem; }
  body[data-role="gestor_academico"] .dashboard-filters.card { grid-template-columns: 1fr !important; }
  .entity-dialog-modern .entity-dialog-head { grid-template-columns: 1fr !important; }
}

/* v2.2.15 - UI/UX refinado para formularios Nuevo/Editar y brochures */
:root {
  --editor-soft-bg: #f8fbff;
  --editor-border: rgba(148, 163, 184, .22);
  --editor-label: #64748b;
  --editor-ink: #0f172a;
}

.structure-title {
  -webkit-line-clamp: 3 !important;
  font-size: .96rem !important;
  line-height: 1.24 !important;
  font-weight: 590 !important;
}
.structure-card-modern > summary {
  min-height: 92px;
}
.structure-card-modern .detail-card__body .button-row .btn {
  font-weight: 590 !important;
}

:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) {
  padding: 0 !important;
  overflow: hidden;
  border-radius: 28px !important;
  border: 1px solid var(--editor-border) !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .07) !important;
}
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) > h3 {
  display: flex;
  align-items: center;
  gap: .62rem;
  margin: 0 !important;
  padding: 1rem 1.15rem !important;
  border-bottom: 1px solid rgba(148, 163, 184, .18);
  background: linear-gradient(135deg, #f8fbff, #ffffff 72%);
  color: var(--editor-ink) !important;
  font-size: 1rem !important;
  font-weight: 610 !important;
  letter-spacing: -.01em;
}
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) > h3::after {
  content: 'Completa solo los datos necesarios y guarda los cambios.';
  margin-left: auto;
  max-width: 310px;
  color: var(--editor-label);
  font-size: .76rem;
  font-weight: 450;
  line-height: 1.25;
  text-align: right;
}
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) > .field-grid,
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) > .email-box,
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) > .account-builder,
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) > .inline-fieldset,
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) > .conditional-fields,
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) > .grade-config-box,
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) > .module-builder {
  margin: .95rem 1.05rem 0 !important;
}
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) > .button-row {
  margin-top: 1rem !important;
  padding: .95rem 1.1rem !important;
  border-top: 1px solid rgba(148, 163, 184, .18);
  background: rgba(248, 250, 252, .78);
  justify-content: flex-end;
}
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) .field-grid {
  gap: .72rem !important;
}
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) .field {
  gap: .32rem !important;
}
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) .field > span,
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) legend {
  color: var(--editor-label) !important;
  font-size: .73rem !important;
  font-weight: 520 !important;
  letter-spacing: .012em !important;
  text-transform: none !important;
}
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) input,
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) select,
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) textarea {
  border-radius: 14px !important;
  border-color: rgba(148, 163, 184, .32) !important;
  background: #ffffff !important;
  color: #1e293b !important;
  font-size: .87rem !important;
  font-weight: 480 !important;
  line-height: 1.25 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) input:focus,
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) select:focus,
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) textarea:focus {
  border-color: rgba(37, 99, 235, .55) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .10) !important;
}
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) textarea {
  min-height: 86px;
  resize: vertical;
}
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) .conditional-fields,
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) .grade-config-box,
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) .module-builder,
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) .email-box,
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) .account-builder {
  border-radius: 22px !important;
  border: 1px solid rgba(148, 163, 184, .18) !important;
  background: rgba(255,255,255,.72) !important;
  padding: .95rem !important;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .045);
}
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) h4,
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) h5,
.brochure-panel h3,
.brochure-editor-card .card__head h3,
.brochure-module__head,
.brochure-builder h4,
.brochure-builder h5 {
  color: #1e293b !important;
  font-weight: 590 !important;
  line-height: 1.25 !important;
}
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) .hint,
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) small {
  color: #64748b !important;
  font-weight: 420 !important;
  line-height: 1.35;
}
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) .module-total,
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) .session-total-pill {
  border-radius: 16px !important;
  background: #f8fafc !important;
  border: 1px solid rgba(148, 163, 184, .18) !important;
}
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) .module-total strong,
:is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) .session-total-pill strong {
  font-weight: 650 !important;
}
:is(#groupForm, #turnForm) .inline-fieldset {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .45rem !important;
  padding: .85rem !important;
  border: 1px solid rgba(148,163,184,.20) !important;
  background: rgba(248,250,252,.76) !important;
}
:is(#groupForm, #turnForm) .inline-fieldset label {
  padding: .43rem .66rem;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.22);
  background: #fff;
  color: #475569;
  font-size: .8rem;
  font-weight: 480 !important;
}
:is(#groupForm, #turnForm) .inline-fieldset input:checked + span,
:is(#groupForm, #turnForm) .inline-fieldset label:has(input:checked) {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: rgba(37,99,235,.24);
}

/* Brochures: panel superior compacto + editor amplio con sesiones en tres columnas */
.brochure-registry-card,
.brochure-panel,
.brochure-editor-card {
  border-radius: 26px !important;
  border: 1px solid rgba(148,163,184,.20) !important;
  box-shadow: 0 14px 34px rgba(15,23,42,.055) !important;
}
.brochure-layout {
  grid-template-columns: 1fr !important;
  gap: 1rem !important;
}
.brochure-panel {
  display: grid !important;
  grid-template-columns: minmax(180px, .65fr) minmax(220px, .8fr) minmax(360px, 1.2fr) minmax(220px, .75fr) !important;
  align-items: end;
  gap: .8rem !important;
  padding: 1rem !important;
}
.brochure-panel h3 {
  margin: 0 !important;
  align-self: center;
  font-size: .98rem !important;
}
.brochure-panel .field { margin: 0 !important; }
.brochure-panel .button-row { margin: 0 !important; justify-content: flex-start; gap: .45rem; }
.brochure-panel .hint {
  margin: 0 !important;
  color: #64748b !important;
  font-size: .78rem !important;
  line-height: 1.35;
  font-weight: 420 !important;
}
.brochure-editor-card { padding: 0 !important; overflow: hidden; }
.brochure-editor-card > .card__head {
  padding: 1rem 1.1rem !important;
  border-bottom: 1px solid rgba(148,163,184,.18);
  background: linear-gradient(135deg, #f8fbff, #ffffff 75%);
}
.brochure-builder { padding: 1rem !important; }
.brochure-title-box {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: .8rem !important;
  padding: .9rem;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid rgba(148,163,184,.18);
}
.brochure-module {
  padding: .95rem !important;
  border: 1px solid rgba(148,163,184,.20) !important;
  background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
  box-shadow: 0 12px 30px rgba(15,23,42,.055) !important;
}
.brochure-module__head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: .7rem !important;
}
.module-index-pill,
.session-index-pill {
  font-weight: 620 !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid rgba(37,99,235,.18) !important;
}
.brochure-module-grid {
  grid-template-columns: minmax(180px, .6fr) minmax(0, 1.4fr) !important;
  margin-bottom: .85rem;
}
.brochure-session-list {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: .8rem !important;
}
.brochure-session {
  background: #fff !important;
  border: 1px solid rgba(148,163,184,.18) !important;
  box-shadow: 0 8px 20px rgba(15,23,42,.04) !important;
}
.brochure-session .field span,
.brochure-title-box .field span,
.brochure-module .field span {
  color: #64748b !important;
  font-size: .72rem !important;
  font-weight: 500 !important;
}
.brochure-session input,
.brochure-session select,
.brochure-session textarea,
.brochure-title-box input,
.brochure-module input,
.brochure-module textarea {
  font-size: .84rem !important;
  font-weight: 470 !important;
  border-radius: 13px !important;
}
.brochure-tools-box {
  border-radius: 16px !important;
  background: #f8fafc !important;
  border: 1px solid rgba(148,163,184,.16) !important;
  padding: .55rem !important;
}
.tool-icon-chip {
  font-weight: 500 !important;
  border-radius: 999px !important;
}
.brochure-registry-card #brochureRegistryList {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* Mejoras generales de listados/cards */
body[data-role="gestor_academico"] .list-toolbar .field > span,
body[data-role="gestor_academico"] .dashboard-filters .field > span,
body[data-role="gestor_academico"] .sessions-toolbar .field > span {
  font-size: .7rem !important;
  font-weight: 500 !important;
  color: #64748b !important;
}
body[data-role="gestor_academico"] .list-toolbar select,
body[data-role="gestor_academico"] .dashboard-filters select,
body[data-role="gestor_academico"] .sessions-toolbar select,
body[data-role="gestor_academico"] .sessions-toolbar input {
  font-weight: 480 !important;
  font-size: .84rem !important;
}

@media (max-width: 1180px) {
  .brochure-panel { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .brochure-session-list,
  .brochure-registry-card #brochureRegistryList { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  :is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) > h3::after { display: none; }
}
@media (max-width: 760px) {
  .brochure-panel,
  .brochure-title-box,
  .brochure-module-grid,
  .brochure-session-list,
  .brochure-registry-card #brochureRegistryList { grid-template-columns: 1fr !important; }
  :is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) > .field-grid.cols-2,
  :is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) > .field-grid.cols-4,
  :is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) .field-grid.cols-2,
  :is(#programForm, #groupForm, #turnForm, #zoomForm, #teacherForm, #aiToolForm, #serviceForm) .field-grid.cols-4 { grid-template-columns: 1fr !important; }
}

/* v2.2.15 - tarjetas de herramientas y registro de brochures */
.ai-tool-card {
  border-radius: 24px !important;
  border: 1px solid rgba(148,163,184,.20) !important;
  background: linear-gradient(145deg, #fff, #f8fbff 82%) !important;
  box-shadow: 0 12px 30px rgba(15,23,42,.055) !important;
}
.ai-tool-card__head strong { font-weight: 610 !important; color: #0f172a !important; }
.ai-tool-card__head small,
.ai-tool-card p { font-weight: 420 !important; color: #64748b !important; }
.ai-tool-icon { border-radius: 17px !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.75); }

.brochure-registry-card #brochureRegistryList details {
  border-radius: 20px !important;
  border: 1px solid rgba(148,163,184,.20) !important;
  background: linear-gradient(145deg, #ffffff, #f8fbff 86%) !important;
  box-shadow: 0 10px 24px rgba(15,23,42,.045) !important;
  overflow: hidden;
}
.brochure-registry-card #brochureRegistryList summary {
  display: grid !important;
  grid-template-columns: auto minmax(0,1fr) auto !important;
  align-items: center !important;
  gap: .55rem !important;
  padding: .85rem !important;
}
.brochure-registry-card #brochureRegistryList summary strong {
  font-weight: 600 !important;
  font-size: .75rem !important;
  color: #1d4ed8 !important;
  background: #eff6ff;
  border: 1px solid rgba(37,99,235,.16);
  border-radius: 999px;
  padding: .28rem .5rem;
}
.brochure-registry-card #brochureRegistryList summary span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal !important;
  font-weight: 560 !important;
  color: #0f172a !important;
  line-height: 1.2;
}
.brochure-registry-card #brochureRegistryList summary em {
  font-style: normal;
  font-weight: 520 !important;
  color: #64748b;
  font-size: .76rem;
}
.brochure-registry-card #brochureRegistryList .detail-card__body { padding: .8rem !important; }
.brochure-registry-card #brochureRegistryList .detail-card__body p { color: #64748b; font-size: .84rem; font-weight: 420; margin: 0 0 .55rem; }

/* v2.2.16 - Informe mensual docente A4 */
.teacher-monthly-layout {
  display: grid;
  grid-template-columns: minmax(230px, 320px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.teacher-monthly-controls {
  position: sticky;
  top: 1rem;
  gap: .8rem;
}
.teacher-monthly-controls h3 {
  margin: 0 0 .25rem;
  font-size: .98rem;
  font-weight: 650;
  color: var(--text-900, #0f172a);
}
.teacher-monthly-filter-grid {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: .65rem;
}
.teacher-monthly-preview-card {
  overflow: auto;
  background: #f8fafc;
  padding: 1rem;
}
.teacher-monthly-preview {
  max-height: none;
  border: 0;
  background: transparent;
  padding: 0;
}
.teacher-monthly-document {
  max-width: 794px;
  min-height: 1123px;
  margin: 0 auto;
  padding: 32px 40px;
  background: #fff;
  color: #111827;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, .08);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  line-height: 1.4;
}
.monthly-letter-head {
  text-align: center;
  margin-bottom: 1rem;
}
.monthly-letter-head h1 {
  margin: 0;
  font-size: .96rem;
  letter-spacing: .05em;
  color: #0f172a;
  font-weight: 700;
}
.monthly-memo-grid {
  display: grid;
  gap: .35rem;
  margin-bottom: 1rem;
}
.monthly-memo-grid div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: .75rem;
}
.monthly-memo-grid span,
.monthly-section h2,
.monthly-two-cols span {
  font-weight: 700;
  color: #0f172a;
}
.monthly-memo-grid p,
.monthly-two-cols p,
.monthly-bank-block p {
  margin: 0;
}
.monthly-memo-grid small {
  display: block;
  color: #475569;
  font-size: .72rem;
  margin-top: .1rem;
}
.monthly-intro {
  margin: .9rem 0 1rem;
  text-align: justify;
  color: #334155;
}
.monthly-section {
  margin-bottom: 1rem;
}
.monthly-section h2 {
  margin: 0 0 .45rem;
  font-size: .78rem;
  letter-spacing: .02em;
}
.monthly-section table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.monthly-section th,
.monthly-section td {
  border: 1px solid #cbd5e1;
  padding: .42rem .48rem;
  vertical-align: top;
  text-align: left;
}
.monthly-section th {
  background: #f1f5f9;
  color: #334155;
  font-size: .68rem;
  font-weight: 700;
}
.monthly-section td {
  color: #1f2937;
  font-size: .72rem;
}
.monthly-section .total-row td {
  background: #f8fafc;
  font-weight: 700;
}
.monthly-bank-block {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
  margin-top: .65rem;
}
.monthly-bank-block p,
.monthly-two-cols p {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: .6rem .7rem;
  background: #fbfdff;
}
.monthly-bank-block span {
  font-weight: 650;
}
.monthly-two-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
  margin-top: .7rem;
}
.monthly-close {
  margin: 1rem 0 .75rem;
}
.monthly-signature {
  text-align: center;
  margin-top: 1.4rem;
}
.teacher-signature-img {
  height: 48px;
  max-width: 180px;
  object-fit: contain;
  margin: .25rem auto .45rem;
  display: block;
}
.signature-spacer {
  height: 48px;
}
.signature-line {
  width: 230px;
  border-top: 1px solid #111827;
  margin: .55rem auto .35rem;
}
@media (max-width: 980px) {
  .teacher-monthly-layout { grid-template-columns: 1fr; }
  .teacher-monthly-controls { position: static; }
  .teacher-monthly-document { padding: 24px; border-radius: 14px; }
  .monthly-bank-block,
  .monthly-two-cols { grid-template-columns: 1fr; }
}

/* v2.2.17 - Reporte docente y brochures en flujo Lista/Nuevo */
.monthly-remuneration-section {
  break-before: page;
  page-break-before: always;
}

.brochure-view {
  gap: .85rem;
}
.brochure-mode-tabs {
  width: fit-content;
  max-width: 100%;
  background: rgba(241,245,249,.78) !important;
  border: 1px solid rgba(148,163,184,.18);
  padding: .28rem !important;
  border-radius: 16px !important;
}
.brochure-mode-tabs .subtab {
  min-height: 34px !important;
  padding: .42rem .78rem !important;
  font-size: .8rem !important;
  font-weight: 520 !important;
}
.brochure-pane { display: none; }
.brochure-pane.is-active { display: block; }
.brochure-registry-card--scoped {
  padding: 1rem !important;
}
.brochure-registry-card--scoped > .card__head {
  margin-bottom: .75rem !important;
  align-items: flex-start !important;
}
.brochure-registry-card--scoped .card__head h3 {
  margin: 0 !important;
  font-size: .96rem !important;
  font-weight: 590 !important;
}
.card-subtitle {
  margin: .18rem 0 0;
  color: #64748b;
  font-size: .82rem;
  font-weight: 420;
  line-height: 1.35;
}
.brochure-list-card summary span {
  -webkit-line-clamp: 3 !important;
  font-weight: 540 !important;
}
.brochure-list-card summary strong {
  font-weight: 560 !important;
}
.brochure-layout .brochure-panel {
  position: static !important;
}
@media print {
  .monthly-remuneration-section {
    break-before: page;
    page-break-before: always;
  }
}

/* v2.2.18 - Ajustes UX para rol Atencion y pagos */
body.role-cobranzas .role-banner {
  border-color: rgba(16, 185, 129, .18);
  background: linear-gradient(135deg, rgba(236,253,245,.95), rgba(239,246,255,.92));
}
body.role-cobranzas #view-dashboard .section-heading,
body.role-cobranzas #view-reportes .section-heading,
body.role-cobranzas #view-servicios .section-heading {
  align-items: flex-start;
}
body.role-cobranzas .dashboard-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: .7rem;
  padding: .85rem;
}
body.role-cobranzas .dashboard-filters .field span,
body.role-cobranzas .sheet-toolbar .field span,
body.role-cobranzas .service-toolbar .field span,
body.role-cobranzas .report-filters .field span {
  font-size: .68rem;
  letter-spacing: .03em;
  color: var(--muted);
  font-weight: 600;
}
body.role-cobranzas .dashboard-filters select,
body.role-cobranzas .sheet-toolbar select,
body.role-cobranzas .sheet-toolbar input,
body.role-cobranzas .service-toolbar input,
body.role-cobranzas .service-toolbar select {
  min-height: 2.25rem;
  font-size: .86rem;
  font-weight: 500;
}
body.role-cobranzas .dashboard-grid .card h3,
body.role-cobranzas .report-layout h3,
body.role-cobranzas .service-subview h3 {
  font-weight: 650;
}
body.role-cobranzas .calendar-toolbar {
  grid-template-columns: auto auto minmax(160px, 1fr) minmax(120px, 1fr);
  gap: .75rem;
}
body.role-cobranzas .calendar-toolbar .segmented {
  background: #eef6ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: .25rem;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .04);
}
body.role-cobranzas .calendar-toolbar .seg-btn {
  border-radius: 999px;
  min-height: 2.25rem;
  padding-inline: 1rem;
  font-weight: 600;
}
body.role-cobranzas .calendar-toolbar .seg-btn.is-active {
  background: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .12);
}
body.role-cobranzas .service-subview[data-service-subview="form"],
body.role-cobranzas .registro-subview[data-registro-subview="form"] {
  border: 1px solid rgba(191, 219, 254, .9);
  background: linear-gradient(180deg, #fff, #f8fbff);
  box-shadow: 0 18px 36px rgba(15,23,42,.08);
}
body.role-cobranzas .service-subview[data-service-subview="form"] > h3,
body.role-cobranzas .registro-subview[data-registro-subview="form"] legend {
  font-size: 1rem;
  color: #0f172a;
  font-weight: 650;
}
body.role-cobranzas .service-detail-row,
body.role-cobranzas .form-section {
  border-radius: 1.15rem;
  border-color: #e5edf8;
  background: rgba(255,255,255,.86);
}
body.role-cobranzas .service-proof-actions {
  display: inline-flex;
  gap: .35rem;
  align-items: center;
  justify-content: center;
  min-width: 5rem;
}
body.role-cobranzas .service-proof-actions .icon-btn {
  width: 2rem;
  height: 2rem;
  border-radius: .75rem;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #dbeafe;
}
body.role-cobranzas .service-proof-actions .icon-btn:hover {
  color: #fff;
  background: #2563eb;
}
body.role-cobranzas .service-proof-actions .icon-btn.is-static {
  color: #64748b;
  background: #f8fafc;
}
body.role-cobranzas #view-reportes .report-layout-single {
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 1rem;
}
body.role-cobranzas #view-reportes .report-filters {
  position: sticky;
  top: 1rem;
  align-self: start;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}
body.role-cobranzas #view-reportes .report-html-card {
  min-height: 68vh;
}
body.role-cobranzas .report-summary-grid {
  gap: .7rem;
}
body.role-cobranzas .report-kpi {
  border-radius: 1rem;
  box-shadow: 0 10px 22px rgba(15,23,42,.05);
}
body.role-cobranzas .report-table tbody tr:nth-child(odd),
body.role-cobranzas .services-sheet tbody tr:nth-child(odd),
body.role-cobranzas .shipping-view table tbody tr:nth-child(odd) {
  background: #ffffff;
}
body.role-cobranzas .report-table tbody tr:nth-child(even),
body.role-cobranzas .services-sheet tbody tr:nth-child(even),
body.role-cobranzas .shipping-view table tbody tr:nth-child(even) {
  background: #f8fbff;
}
body.role-cobranzas #view-envios .section-heading + .subtab-strip {
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  padding: .35rem;
}
body.role-cobranzas #view-calculadora,
body.role-cobranzas #view-crm {
  display: none !important;
}
@media (max-width: 1100px) {
  body.role-cobranzas .dashboard-filters { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  body.role-cobranzas #view-reportes .report-layout-single { grid-template-columns: 1fr; }
  body.role-cobranzas #view-reportes .report-filters { position: static; }
}
@media (max-width: 720px) {
  body.role-cobranzas .dashboard-filters { grid-template-columns: 1fr; }
  body.role-cobranzas .calendar-toolbar { grid-template-columns: 1fr; }
}

/* v2.2.19 - Cobranzas: formularios de matricula y finanzas */
.folder-url-grid { align-items: end; margin-top: .75rem; }
.finance-form-card { background: linear-gradient(135deg, rgba(248,250,252,.98), rgba(255,255,255,.95)); }
.finance-form-card > legend,
.requirements-section > legend { font-weight: 600; letter-spacing: -.01em; }
.detail-link-row,
.quick-contact-strip,
.compact-icon-row { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
.mini-link-btn { display:inline-flex; align-items:center; justify-content:center; min-height: 1.85rem; padding: .25rem .55rem; border: 1px solid var(--border); border-radius: .65rem; background: var(--surface); color: var(--text); font-size: .78rem; text-decoration:none; }
.mini-link-btn:hover { border-color: rgba(37,99,235,.35); color: var(--primary); background: rgba(37,99,235,.06); }
.quick-contact-strip { margin-top: .45rem; }
.registration-detail-grid .detail-readonly-box strong { font-weight: 600; }
body.role-cobranzas #view-registro .form-grid { grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); align-items:start; }
body.role-cobranzas #view-registro .form-section { border-radius: 1.15rem; }
body.role-cobranzas #view-registro .form-section > legend { font-size: .9rem; font-weight: 600; }
body.role-cobranzas #view-registro .shipping-fields.is-hidden::before { content: 'Activa el certificado fisico solo cuando corresponda. La matricula puede guardarse sin completar datos de envio.'; display:block; color: var(--muted); font-size:.84rem; line-height:1.35; padding:.85rem; border:1px dashed var(--border); border-radius:.9rem; background:rgba(248,250,252,.8); }
@media (max-width: 900px) { body.role-cobranzas #view-registro .form-grid { grid-template-columns: 1fr; } }

/* v2.2.20 - Cobranzas: correccion Pagos > Nueva matricula y formulario responsivo */
body.role-cobranzas #view-hoja .section-heading .button-row {
  align-items: center;
  flex-wrap: wrap;
}
body.role-cobranzas #btnNewEnrollmentFromPayments {
  box-shadow: 0 12px 24px rgba(37,99,235,.16);
}
body.role-cobranzas #view-registro .subtab-strip .subtab[data-registro-subtab="form"] {
  min-width: 9.5rem;
}
body.role-cobranzas #studentForm.enrollment-form-modern {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}
body.role-cobranzas #studentForm.enrollment-form-modern .form-section {
  margin: 0;
  padding: .95rem;
  background: rgba(255,255,255,.94);
  border: 1px solid #dbeafe;
  box-shadow: 0 10px 22px rgba(15,23,42,.045);
}
body.role-cobranzas #studentForm.enrollment-form-modern .form-section legend {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: #f8fbff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: -.01em;
}
body.role-cobranzas #studentForm.enrollment-form-modern .student-data-section {
  grid-column: 1 / -1;
}
body.role-cobranzas #studentForm.enrollment-form-modern .enrollment-program-section,
body.role-cobranzas #studentForm.enrollment-form-modern .requirements-section {
  align-self: stretch;
}
body.role-cobranzas #studentForm.enrollment-form-modern .shipping-section,
body.role-cobranzas #studentForm.enrollment-form-modern .field.span-2,
body.role-cobranzas #studentForm.enrollment-form-modern .form-actions {
  grid-column: 1 / -1;
}
body.role-cobranzas #studentForm.enrollment-form-modern .field-grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
body.role-cobranzas #studentForm.enrollment-form-modern .field-grid.cols-3,
body.role-cobranzas #studentForm.enrollment-form-modern .folder-url-grid {
  grid-template-columns: 1fr;
}
body.role-cobranzas #studentForm.enrollment-form-modern .requirements-section .requirement-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .55rem;
}
body.role-cobranzas #studentForm.enrollment-form-modern .toggle-line {
  min-height: 2.65rem;
  border: 1px solid #e2e8f0;
  border-radius: .9rem;
  background: #fff;
  padding: .55rem .7rem;
}
body.role-cobranzas #studentForm.enrollment-form-modern .payment-preview {
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  padding: .75rem;
  background: #f8fbff;
}
body.role-cobranzas #studentForm.enrollment-form-modern .payment-preview .preview-line {
  box-shadow: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: .55rem .65rem;
}
body.role-cobranzas #studentForm.enrollment-form-modern .payment-preview .preview-line strong {
  font-weight: 650;
}
body.role-cobranzas #studentForm.enrollment-form-modern .form-actions {
  justify-content: flex-end;
  border-top: 1px solid #e2e8f0;
  padding-top: .85rem;
}
body.role-cobranzas #registrationListCount::before {
  content: 'Matriculados: ';
  font-weight: 500;
}
@media (max-width: 1180px) {
  body.role-cobranzas #studentForm.enrollment-form-modern .field-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  body.role-cobranzas #studentForm.enrollment-form-modern { grid-template-columns: 1fr; }
  body.role-cobranzas #studentForm.enrollment-form-modern .field-grid.cols-2,
  body.role-cobranzas #studentForm.enrollment-form-modern .field-grid.cols-4 { grid-template-columns: 1fr; }
}
body.role-cobranzas #studentForm.enrollment-form-modern {
  grid-template-areas:
    "student student"
    "enroll req"
    "ship ship"
    "notes notes"
    "actions actions";
}
body.role-cobranzas #studentForm.enrollment-form-modern .student-data-section { grid-area: student; }
body.role-cobranzas #studentForm.enrollment-form-modern .enrollment-program-section { grid-area: enroll; }
body.role-cobranzas #studentForm.enrollment-form-modern .requirements-section { grid-area: req; }
body.role-cobranzas #studentForm.enrollment-form-modern .shipping-section { grid-area: ship; }
body.role-cobranzas #studentForm.enrollment-form-modern > .field.span-2 { grid-area: notes; }
body.role-cobranzas #studentForm.enrollment-form-modern > .form-actions { grid-area: actions; }
@media (max-width: 980px) {
  body.role-cobranzas #studentForm.enrollment-form-modern {
    grid-template-areas:
      "student"
      "enroll"
      "req"
      "ship"
      "notes"
      "actions";
  }
}

/* v2.2.21 - Cobranzas: Pagos independiente y Nueva matricula mas equilibrada */
body.role-cobranzas #view-registro .section-heading {
  align-items: flex-start;
  gap: .8rem;
}
body.role-cobranzas #view-registro .section-heading .btn {
  flex-shrink: 0;
}
body.role-cobranzas #studentForm.enrollment-form-modern {
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
  grid-template-areas:
    "student student"
    "enroll req"
    "ship ship"
    "notes notes"
    "actions actions";
  gap: .9rem;
  padding: .9rem;
  align-items: stretch;
}
body.role-cobranzas #studentForm.enrollment-form-modern .form-section {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  min-width: 0;
}
body.role-cobranzas #studentForm.enrollment-form-modern .field-grid,
body.role-cobranzas #studentForm.enrollment-form-modern .field-grid.cols-2,
body.role-cobranzas #studentForm.enrollment-form-modern .field-grid.cols-3,
body.role-cobranzas #studentForm.enrollment-form-modern .field-grid.cols-4,
body.role-cobranzas #studentForm.enrollment-form-modern .folder-url-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: .7rem;
}
body.role-cobranzas #studentForm.enrollment-form-modern .student-data-section .field-grid.cols-4 {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
body.role-cobranzas #studentForm.enrollment-form-modern .requirements-section .folder-url-grid {
  grid-template-columns: 1fr;
}
body.role-cobranzas #studentForm.enrollment-form-modern .email-box {
  display: grid;
  gap: .45rem;
}
body.role-cobranzas #studentForm.enrollment-form-modern .inline-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem;
}
body.role-cobranzas #studentForm.enrollment-form-modern .shipping-fields {
  display: grid;
  gap: .75rem;
}
body.role-cobranzas #studentForm.enrollment-form-modern .shipping-fields.is-hidden {
  display: block;
}
body.role-cobranzas #studentForm.enrollment-form-modern .form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
body.role-cobranzas #view-hoja .sheet-toolbar.card {
  align-items: end;
}
body.role-cobranzas #view-hoja .section-heading {
  align-items: flex-start;
}
@media (max-width: 820px) {
  body.role-cobranzas #studentForm.enrollment-form-modern {
    grid-template-columns: 1fr;
    grid-template-areas:
      "student"
      "enroll"
      "req"
      "ship"
      "notes"
      "actions";
  }
  body.role-cobranzas #studentForm.enrollment-form-modern .inline-control {
    grid-template-columns: 1fr;
  }
}

/* v2.2.22 - Cobranzas: cobros independientes y egresos */
.role-cobranzas .cobranzas-cobros-view .section-heading h2 { letter-spacing: -0.02em; }
.role-cobranzas .cobranzas-cobros-view .sheet-toolbar { grid-template-columns: minmax(220px, 1.35fr) repeat(6, minmax(145px, .85fr)); align-items: end; }
.role-cobranzas .cobranzas-cobros-view .spreadsheet-shell { min-height: 520px; border-color: #dbeafe; box-shadow: 0 18px 45px rgba(15, 23, 42, .08); }
.role-cobranzas .cobranzas-cobros-view #paymentSheet { min-width: 1500px; }
.finance-payment-layout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.finance-summary-card { padding: 16px; display: grid; gap: 5px; border-radius: 22px; background: linear-gradient(145deg, #ffffff, #f8fafc); }
.finance-summary-card small { color: #64748b; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.finance-summary-card strong { font-size: 1.55rem; color: #0f172a; font-weight: 750; letter-spacing: -0.03em; }
.finance-summary-card span { color: #64748b; font-size: .86rem; line-height: 1.35; }
.compact-finance-toolbar { grid-template-columns: repeat(3, minmax(160px, 1fr)); margin-bottom: 14px; }
.modern-payroll-table .mini-row { grid-template-columns: 1.4fr .7fr .8fr 1.2fr .75fr .75fr; align-items: center; }
.modern-payroll-table .mini-row:nth-child(even) { background: #f8fafc; }
.modern-payroll-table mark.status-pill { border: 0; padding: 5px 9px; border-radius: 999px; font-size: .76rem; }
.role-cobranzas [data-view-panel="pago-docentes"] .card__head h3,
.role-cobranzas [data-view-panel="pago-personal"] .card__head h3 { font-weight: 650; }
@media (max-width: 980px) {
  .finance-payment-layout { grid-template-columns: 1fr; }
  .role-cobranzas .cobranzas-cobros-view .sheet-toolbar,
  .compact-finance-toolbar { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .role-cobranzas .cobranzas-cobros-view .sheet-toolbar,
  .compact-finance-toolbar { grid-template-columns: 1fr; }
}

/* v2.2.23 Finanzas/RR.HH. - primera base de reestructuracion */
.finance-workflow-grid,
.finance-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}
.finance-card-grid.compact { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.finance-action-card,
.config-tile,
.worker-card {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  min-height: 120px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.9));
}
.finance-action-card > .icon,
.config-tile > .icon {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  color: #2563eb;
  background: #eff6ff;
  border-radius: 0.9rem;
  flex: 0 0 auto;
}
.finance-action-card small,
.config-tile small,
.finance-summary-card small {
  display: block;
  margin-bottom: 0.2rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.finance-action-card strong,
.config-tile h3,
.worker-card h3 {
  display: block;
  margin: 0;
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.25;
}
.finance-action-card p,
.config-tile p,
.worker-card p {
  margin: 0.25rem 0 0;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.45;
}
.finance-table-card .mini-table {
  overflow-x: auto;
}
.finance-zebra-table .mini-row:not(.head):nth-child(odd) { background: #ffffff; }
.finance-zebra-table .mini-row:not(.head):nth-child(even) { background: #f8fafc; }
.finance-zebra-table .mini-row {
  grid-template-columns: minmax(160px, 1.4fr) repeat(6, minmax(90px, 1fr)) minmax(120px, auto);
  gap: 0.75rem;
  align-items: center;
}
.worker-card {
  align-items: center;
  min-height: 96px;
}
.worker-card .icon-btn { margin-left: auto; }
.worker-avatar {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #1d4ed8;
  background: #dbeafe;
  flex: 0 0 auto;
}
.compact-finance-toolbar {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: end;
}
.cobranzas-cobros-view .sheet-toolbar {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.cobranzas-cobros-view .spreadsheet-shell {
  min-height: 520px;
}
@media (max-width: 980px) {
  .finance-workflow-grid,
  .finance-card-grid { grid-template-columns: 1fr; }
  .finance-zebra-table .mini-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* v2.2.25 - Finanzas: egresos reales y navegacion robusta */
.finance-page-heading .section-subtitle {
  margin: .35rem 0 0;
  color: var(--muted, #64748b);
  font-size: .92rem;
  max-width: 760px;
  line-height: 1.45;
}
.finance-summary-row {
  margin-bottom: 14px;
}
.finance-egress-grid {
  display: grid;
  grid-template-columns: minmax(300px, .95fr) minmax(520px, 1.4fr);
  gap: 16px;
  align-items: start;
}
.finance-egress-grid.providers {
  grid-template-columns: minmax(320px, .9fr) minmax(560px, 1.45fr);
}
.finance-form-card,
.finance-table-card {
  border: 1px solid rgba(148, 163, 184, .22);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
}
.finance-form-card .card__head.compact,
.finance-table-card .card__head.compact {
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.finance-form-card .card__head.compact h3,
.finance-table-card .card__head.compact h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .98rem;
  font-weight: 650;
  margin: 0;
}
.finance-form-grid {
  gap: 10px;
}
.finance-form-grid .field span {
  font-size: .74rem;
  font-weight: 560;
  letter-spacing: .01em;
}
.finance-egress-table {
  min-width: 920px;
  overflow-x: auto;
}
.finance-egress-table .mini-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.4fr) minmax(110px, .9fr) minmax(85px, .7fr) minmax(82px, .7fr) minmax(82px, .7fr) minmax(140px, 1.1fr) minmax(98px, .8fr) minmax(95px, .8fr) minmax(92px, .75fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
}
.finance-egress-table .mini-row.head {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #64748b;
  background: #f8fafc;
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .04em;
}
.finance-egress-table .mini-row:nth-child(odd):not(.head) { background: #ffffff; }
.finance-egress-table .mini-row:nth-child(even):not(.head) { background: #f8fafc; }
.finance-egress-table .mini-row > span {
  min-width: 0;
  color: #334155;
  font-size: .83rem;
}
.finance-egress-table .mini-row strong {
  display: block;
  font-size: .88rem;
  font-weight: 620;
  color: #0f172a;
  line-height: 1.2;
}
.finance-egress-table .mini-row small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: .72rem;
}
@media (max-width: 1160px) {
  .finance-egress-grid,
  .finance-egress-grid.providers {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .finance-egress-table { min-width: 860px; }
  .finance-page-heading .section-subtitle { font-size: .86rem; }
}

/* v2.2.26 - Cobros lectura + ficha de alumno + RR.HH. */
.readonly-cobros-row td { vertical-align: top; }
.readonly-cobros-row .table-main-text { display: block; font-weight: 500; color: var(--text, #1e293b); }
.readonly-payment-cell { min-width: 132px; }
.readonly-payment-cell .voucher-flag { color: #047857; font-weight: 500; }
.readonly-req-summary { display: grid; gap: 4px; justify-items: center; }
.readonly-req-summary small { color: #64748b; font-size: 11px; line-height: 1.2; }
.ficha-btn { width: 36px; height: 36px; border-radius: 12px; background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.student-payment-toolbar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.payment-filter-field { min-width: 220px; max-width: 280px; }
.student-payment-subtabs { display: inline-flex; gap: 6px; padding: 5px; border-radius: 14px; background: #f1f5f9; border: 1px solid #e2e8f0; }
.student-payment-subtabs button { border: 0; background: transparent; color: #64748b; padding: 8px 12px; border-radius: 10px; font-weight: 500; cursor: pointer; }
.student-payment-subtabs button.is-active { background: #ffffff; color: #2563eb; box-shadow: 0 1px 4px rgba(15,23,42,.12); }
.payment-resume-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 10px; }
.student-payment-card.compact { box-shadow: none; border: 1px solid #e2e8f0; }
.student-payment-card.compact header span { font-weight: 600; }
.student-payment-actions { margin: 10px 0; }
.student-payment-actions .btn { padding: 7px 10px; font-size: 12px; }
.voucher-list { display: grid; gap: 10px; }
.voucher-mini-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #e2e8f0; background: #fff; border-radius: 14px; padding: 12px 14px; }
.voucher-mini-card strong { display: block; font-weight: 600; color: #1e293b; }
.voucher-mini-card small { color: #64748b; }
.worker-hr-layout, .roles-config-layout { display: grid; grid-template-columns: minmax(320px, .9fr) minmax(420px, 1.25fr); gap: 16px; align-items: start; }
.soft-section-title { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.soft-section-title > span { width: 34px; height: 34px; border-radius: 12px; background: #eff6ff; color: #2563eb; display: inline-flex; align-items: center; justify-content: center; }
.soft-section-title h3 { margin: 0 0 2px; font-size: 15px; font-weight: 650; color: #1e293b; }
.soft-section-title p { margin: 0; color: #64748b; font-size: 13px; }
.worker-list { display: grid; gap: 10px; }
.worker-card.refined { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px; border-radius: 18px; }
.worker-main h3, .config-tile.refined h3 { margin: 0 0 3px; font-size: 15px; font-weight: 650; color: #1e293b; }
.worker-main p, .config-tile.refined p { margin: 0 0 8px; color: #64748b; font-size: 13px; line-height: 1.35; }
.refined-role-grid .config-tile { min-height: 150px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 980px) {
  .worker-hr-layout, .roles-config-layout { grid-template-columns: 1fr; }
  .payment-resume-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .student-payment-toolbar { align-items: stretch; }
  .student-payment-subtabs, .payment-filter-field { width: 100%; }
  .student-payment-subtabs { justify-content: space-between; }
  .payment-resume-grid { grid-template-columns: 1fr; }
  .worker-card.refined { grid-template-columns: auto 1fr; }
  .worker-card.refined .compact-icon-row { grid-column: 1 / -1; justify-content: flex-end; }
}

/* v2.2.27 - matricula tabulada, cobros lectura y exportacion contable */
body.role-cobranzas #studentForm.enrollment-tabbed-form {
  grid-template-columns: 1fr;
  gap: 1rem;
}
body.role-cobranzas #studentForm.enrollment-tabbed-form .span-2,
body.role-cobranzas #studentForm.enrollment-tabbed-form .form-actions {
  grid-column: 1 / -1;
}
.enrollment-contact-hero {
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(239,246,255,.82));
  border: 1px solid rgba(191,219,254,.9);
}
.enrollment-inner-tabs {
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  padding:.55rem;
  border:1px solid var(--border);
  border-radius:1rem;
  background:rgba(248,250,252,.92);
}
.enrollment-inner-tabs button {
  border:1px solid transparent;
  background:transparent;
  color:var(--muted);
  border-radius:.8rem;
  padding:.55rem .8rem;
  font-weight:600;
  font-size:.84rem;
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  cursor:pointer;
}
.enrollment-inner-tabs button:hover { background:#fff; color:var(--text); border-color:var(--border); }
.enrollment-inner-tabs button.is-active { background:#fff; color:var(--primary); border-color:#bfdbfe; box-shadow:var(--shadow-sm); }
.enrollment-tab-panels { min-height: 290px; }
.enrollment-tab-panel { animation: fadeIn .22s ease-out; }
.enrollment-tab-panel[hidden] { display:none !important; }
.enrollment-tab-panel .form-section { margin:0; }
.enrollment-payments-section .payment-preview { margin-top:0; }
.folders-section .folder-url-grid input[readonly] { color:var(--muted); background:#f8fafc; }
body.role-cobranzas #studentForm.enrollment-tabbed-form .form-actions {
  justify-content:flex-end;
  padding-top:.25rem;
}
.name-with-action { display:flex; align-items:center; gap:.65rem; min-width: 210px; }
.ficha-inline-btn { width:2rem; height:2rem; flex:0 0 auto; background:#eff6ff; border-color:#bfdbfe; color:#2563eb; }
.ficha-inline-btn:hover { background:#2563eb; color:#fff; }
.wa-only-btn { width:2rem; height:2rem; color:#059669; background:#ecfdf5; border-color:#bbf7d0; }
.email-chip-list { display:flex; flex-direction:column; gap:.3rem; max-width:210px; }
.email-copy-chip { border:1px solid #dbeafe; background:#eff6ff; color:#1d4ed8; border-radius:.55rem; padding:.25rem .45rem; font-size:.74rem; text-align:left; cursor:pointer; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.email-copy-chip:hover { background:#dbeafe; }
.cell-program-wide { min-width:250px; max-width:310px; }
.cell-program-wide .table-main-text { margin-top:.25rem; }
.wrap-3 { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; white-space:normal; }
.platform-copy-btn { cursor:pointer; border:1px solid var(--border); text-align:left; }
.platform-copy-btn:hover { border-color:#93c5fd; background:#eff6ff; }
.table-status-select { min-width:112px; font-size:.75rem; padding:.35rem .55rem; }
.editable-note { min-width:180px; outline:none; border:1px solid transparent; border-radius:.6rem; }
.editable-note:focus { border-color:#60a5fa; background:#fff; box-shadow:0 0 0 3px rgba(59,130,246,.12); }
.debt-inline { color:#dc2626; font-weight:600; }
.accounting-layout { display:grid; grid-template-columns:minmax(0,2fr) minmax(260px,.75fr); gap:1rem; align-items:start; }
.accounting-table th, .accounting-table td { white-space:nowrap; }
.accounting-table tbody tr:nth-child(even) { background:#f8fafc; }
.accounting-checklist .list-card { border:1px solid var(--border); border-radius:1rem; padding:.8rem; display:flex; justify-content:space-between; gap:.75rem; align-items:center; margin-bottom:.65rem; background:#fff; }
.accounting-checklist .list-card.warning { border-color:#fde68a; background:#fffbeb; }
.accounting-checklist .list-card.success { border-color:#bbf7d0; background:#f0fdf4; }
.accounting-summary .payments-overview-card { min-height:118px; }
@media (max-width: 980px) {
  .accounting-layout { grid-template-columns:1fr; }
  .cell-program-wide { min-width:210px; }
}
@media (max-width: 760px) {
  .enrollment-inner-tabs { overflow-x:auto; flex-wrap:nowrap; }
  .enrollment-inner-tabs button { white-space:nowrap; }
  .name-with-action { min-width:180px; }
}
/* compatibility: pages use data-role, not always role-* class */
body[data-role="cobranzas"] #studentForm.enrollment-tabbed-form {
  grid-template-columns: 1fr;
  gap: 1rem;
}
body[data-role="cobranzas"] #studentForm.enrollment-tabbed-form .span-2,
body[data-role="cobranzas"] #studentForm.enrollment-tabbed-form .form-actions { grid-column: 1 / -1; }
body[data-role="cobranzas"] #studentForm.enrollment-tabbed-form .form-actions { justify-content:flex-end; padding-top:.25rem; }

/* v2.2.28 - cobros/matriculas refinados */
.registration-table-shell { overflow:auto; padding:0; }
.registration-read-table { width:100%; border-collapse:separate; border-spacing:0; font-size:.86rem; min-width:980px; }
.registration-read-table th { position:sticky; top:0; z-index:2; background:var(--surface-muted,#f8fafc); color:var(--muted,#64748b); text-align:left; font-size:.72rem; letter-spacing:.04em; text-transform:uppercase; font-weight:600; padding:.75rem .8rem; border-bottom:1px solid var(--border,#e2e8f0); }
.registration-read-table td { padding:.75rem .8rem; border-bottom:1px solid rgba(148,163,184,.18); vertical-align:middle; }
.registration-read-table tbody tr:nth-child(even) td { background:rgba(248,250,252,.7); }
.registration-read-table tbody tr:hover td { background:rgba(219,234,254,.35); }
.registration-read-table td strong { display:block; font-weight:600; color:var(--text,#0f172a); }
.registration-read-table td small { display:block; color:var(--muted,#64748b); margin-top:.2rem; line-height:1.35; }
.registration-view-btn { min-height:2.1rem; padding-inline:.85rem; }
.payment-plan-preview-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:.65rem; margin:.75rem 0; }
.payment-plan-preview-card { display:grid; grid-template-columns:1fr auto; gap:.45rem .75rem; align-items:center; padding:.75rem; border:1px solid var(--border,#e2e8f0); border-radius:1rem; background:linear-gradient(180deg,#fff,#f8fafc); }
.payment-plan-preview-card span { font-weight:500; color:var(--text,#0f172a); }
.payment-plan-preview-card small { color:var(--muted,#64748b); }
.payment-plan-preview-card strong { font-size:.95rem; font-weight:650; }
.total-line { border-top:1px solid var(--border,#e2e8f0); margin-top:.5rem; padding-top:.65rem; }
.wa-only-btn { color:#047857!important; background:#ecfdf5!important; border-color:#bbf7d0!important; }
.wa-only-btn:hover { color:#fff!important; background:#059669!important; }
.quota-tab-layout { display:grid; grid-template-columns:minmax(170px,220px) 1fr; gap:1rem; align-items:start; }
.quota-tab-list { display:flex; flex-direction:column; gap:.5rem; }
.quota-tab { border:1px solid var(--border,#e2e8f0); background:#fff; color:var(--text,#0f172a); border-radius:.9rem; padding:.65rem .75rem; text-align:left; cursor:pointer; transition:.18s ease; }
.quota-tab:hover { border-color:#93c5fd; background:#eff6ff; }
.quota-tab.is-active { border-color:#2563eb; background:#eff6ff; box-shadow:0 10px 25px rgba(37,99,235,.12); }
.quota-tab span { display:block; font-weight:650; font-size:.86rem; }
.quota-tab small { display:block; color:var(--muted,#64748b); font-size:.75rem; margin-top:.15rem; }
.quota-tab-panels { min-width:0; }
.enrollment-switch-field { min-width:min(100%,260px); }
.finance-report-tabs { display:flex; flex-wrap:wrap; gap:.55rem; margin-bottom:1rem; }
.finance-report-tabs .subtab { border:1px solid var(--border,#e2e8f0); }
@media (max-width: 860px) { .quota-tab-layout { grid-template-columns:1fr; } .quota-tab-list { flex-direction:row; overflow:auto; padding-bottom:.25rem; } .quota-tab { min-width:150px; } }

/* v2.2.29 - Matriculas: detalle mejorado y accesos a cobros */
.registration-view-shell { display:grid; gap:1rem; }
.registration-view-head { align-items:flex-start; }
.registration-view-head .dialog-titleblock p { margin:.18rem 0 0; color:var(--muted,#64748b); font-size:.84rem; line-height:1.35; }
.registration-view-actions { display:flex; align-items:center; gap:.45rem; margin-left:auto; flex-wrap:wrap; justify-content:flex-end; }
.registration-view-summary { margin-bottom:.15rem; }
.registration-view-tabs { margin-bottom:.2rem; }
.registration-detail-panels { border:1px solid var(--border,#e2e8f0); border-radius:1.15rem; background:linear-gradient(180deg,#fff,#f8fafc); padding:.9rem; }
.registration-detail-panel[hidden] { display:none!important; }
.registration-detail-panel .detail-readonly-box { background:#fff; border:1px solid rgba(148,163,184,.22); border-radius:1rem; padding:.8rem; }
.registration-payment-mini { display:grid; gap:.45rem; }
.registration-payment-mini .mini-row { background:#fff; border:1px solid rgba(148,163,184,.20); border-radius:.8rem; padding:.45rem .55rem; }
.registration-read-table .wa-only-btn[title*="WhatsApp"] { position:relative; }
.registration-read-table .compact-icon-row .icon-btn[title*="pago"] { color:#92400e; background:#fffbeb; border-color:#fde68a; }
.registration-read-table .compact-icon-row .icon-btn[title*="pago"]:hover { color:#fff; background:#d97706; }
.student-modal-head-actions { display:flex; align-items:center; gap:.45rem; margin-left:auto; }
.finance-quota-tabs .quota-tab { position:relative; overflow:hidden; }
.finance-quota-tabs .quota-tab::before { content:""; position:absolute; inset:0 auto 0 0; width:4px; background:#94a3b8; }
.finance-quota-tabs .quota-status-paid::before { background:#16a34a; }
.finance-quota-tabs .quota-status-partial::before { background:#f59e0b; }
.finance-quota-tabs .quota-status-pending::before { background:#64748b; }
.finance-quota-tabs .quota-status-overdue::before { background:#dc2626; }
.finance-quota-tabs .quota-tab span { font-weight:600; }
.student-payment-card.compact { border-color:rgba(148,163,184,.26); background:linear-gradient(180deg,#fff,#fbfdff); }
.student-payment-card.compact header span { font-weight:650; }
@media (max-width: 760px) {
  .registration-view-head { grid-template-columns:1fr!important; }
  .registration-view-actions, .student-modal-head-actions { width:100%; justify-content:flex-start; }
}

/* v2.2.30 - Pagar docentes: control mensual con ficha por docente */
.role-cobranzas [data-view-panel="pago-docentes"] .finance-page-heading h2,
.role-pagos_docentes [data-view-panel="pago-docentes"] .finance-page-heading h2 {
  letter-spacing: -0.02em;
}
.teacher-pay-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .24);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .07);
}
.teacher-pay-toolbar {
  display: grid;
  grid-template-columns: minmax(160px, .55fr) minmax(150px, .5fr) minmax(240px, 1fr);
  gap: .75rem;
  align-items: end;
  padding: 1rem;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border-bottom: 1px solid #e2e8f0;
}
.teacher-pay-table-wrap {
  overflow: auto;
  max-height: 62vh;
}
.teacher-pay-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .84rem;
}
.teacher-pay-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: .82rem .75rem;
  text-align: left;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: .72rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .045em;
}
.teacher-pay-table td {
  padding: .78rem .75rem;
  vertical-align: middle;
  border-bottom: 1px solid #eef2f7;
  color: #334155;
}
.teacher-pay-table tbody tr:nth-child(even) td { background: #f8fafc; }
.teacher-pay-table tbody tr:hover td { background: #eff6ff; }
.teacher-pay-name strong {
  display: block;
  color: #0f172a;
  font-size: .9rem;
  font-weight: 620;
  line-height: 1.22;
}
.teacher-pay-name small,
.teacher-pay-table td small {
  display: block;
  margin-top: .12rem;
  color: #64748b;
  font-size: .74rem;
}
.soft-chip {
  display: inline-flex;
  align-items: center;
  padding: .34rem .55rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: .76rem;
  font-weight: 560;
}
.teacher-pay-checks {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.check-pill {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  border-radius: 999px;
  padding: .3rem .5rem;
  font-size: .72rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background: #fff;
}
.check-pill::before {
  content: '';
  width: .45rem;
  height: .45rem;
  border-radius: 999px;
  background: #94a3b8;
}
.check-pill.is-ok { color: #166534; border-color: #bbf7d0; background: #f0fdf4; }
.check-pill.is-ok::before { background: #22c55e; }
.check-pill.is-missing { color: #92400e; border-color: #fde68a; background: #fffbeb; }
.check-pill.is-missing::before { background: #f59e0b; }
.teacher-pay-modal[hidden] { display: none !important; }
.teacher-pay-modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.teacher-pay-modal .modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(8px);
}
.teacher-pay-modal-panel {
  position: relative;
  z-index: 1;
  width: min(980px, 96vw);
  max-height: 92vh;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 32px 88px rgba(15, 23, 42, .28);
  padding: 1.15rem;
}
.teacher-pay-modal .modal__close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
}
.teacher-pay-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem .35rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}
.teacher-pay-detail-head h3 {
  margin: .1rem 0 .2rem;
  color: #0f172a;
  font-size: 1.28rem;
  font-weight: 660;
}
.teacher-pay-detail-head p { margin: 0; color: #64748b; }
.teacher-pay-detail-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin: 1rem 0;
}
.teacher-pay-detail-kpis div {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: .8rem;
  background: #f8fafc;
}
.teacher-pay-detail-kpis small { display: block; color: #64748b; font-size: .75rem; }
.teacher-pay-detail-kpis strong { display: block; color: #0f172a; font-size: 1.2rem; font-weight: 650; margin-top: .15rem; }
.teacher-pay-tabs {
  display: flex;
  gap: .4rem;
  padding: .35rem;
  margin: .5rem 0 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f1f5f9;
  overflow-x: auto;
}
.teacher-pay-tabs .subtab {
  white-space: nowrap;
  font-size: .84rem;
  font-weight: 560;
}
.teacher-pay-tab-panel { display: none; }
.teacher-pay-tab-panel.is-active { display: block; }
.support-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}
.modern-check {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .78rem .9rem;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
  color: #334155;
  font-size: .88rem;
}
.modern-check input { width: 18px; height: 18px; accent-color: #2563eb; }
.contact-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}
.teacher-pay-actions {
  display: flex;
  justify-content: flex-end;
  gap: .65rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}
@media (max-width: 860px) {
  .teacher-pay-toolbar,
  .teacher-pay-detail-kpis,
  .support-check-grid,
  .contact-action-grid { grid-template-columns: 1fr; }
  .teacher-pay-detail-head { flex-direction: column; }
}

/* v2.2.31 - UX/UI refinado para Pagar docentes */
.role-cobranzas [data-view-panel="pago-docentes"],
.role-pagos_docentes [data-view-panel="pago-docentes"] {
  --teacher-blue:#2563eb;
  --teacher-slate:#0f172a;
  --teacher-muted:#64748b;
  --teacher-line:#e2e8f0;
  --teacher-soft:#f8fafc;
}
.teacher-pay-hero {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:1rem;
  align-items:center;
  margin-bottom:1rem;
  padding:1rem 1.1rem;
  border:1px solid rgba(37,99,235,.16);
  border-radius:26px;
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.12), transparent 34%),
    linear-gradient(135deg,#ffffff 0%,#f8fbff 55%,#eef6ff 100%);
  box-shadow:0 18px 48px rgba(15,23,42,.07);
}
.teacher-pay-hero h2 {
  margin:.08rem 0 .25rem;
  font-size:clamp(1.35rem, 2vw, 2rem);
  letter-spacing:-.035em;
  color:#0f172a;
  font-weight:670;
}
.teacher-pay-hero .section-subtitle { max-width:760px; color:#64748b; }
.teacher-pay-hero__actions { display:flex; gap:.6rem; flex-wrap:wrap; justify-content:flex-end; }
.teacher-pay-insight-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.85rem;
  margin-bottom:1rem;
}
.teacher-insight-card {
  position:relative;
  min-height:120px;
  padding:1rem;
  border:1px solid #e2e8f0;
  border-radius:24px;
  background:#fff;
  box-shadow:0 14px 36px rgba(15,23,42,.055);
  overflow:hidden;
}
.teacher-insight-card::after {
  content:'';
  position:absolute;
  inset:auto -20px -36px auto;
  width:112px;
  height:112px;
  border-radius:999px;
  background:var(--insight-glow, rgba(37,99,235,.12));
}
.teacher-insight-card > span {
  display:inline-flex;
  width:38px;
  height:38px;
  align-items:center;
  justify-content:center;
  margin-bottom:.75rem;
  border-radius:14px;
  color:var(--insight-color, #2563eb);
  background:var(--insight-bg, #eff6ff);
}
.teacher-insight-card small,
.teacher-insight-card em {
  display:block;
  color:#64748b;
  font-style:normal;
  font-size:.78rem;
}
.teacher-insight-card strong {
  display:block;
  margin:.1rem 0 .15rem;
  color:#0f172a;
  font-size:1.45rem;
  letter-spacing:-.04em;
  font-weight:680;
}
.teacher-insight-card.is-warning { --insight-color:#d97706; --insight-bg:#fffbeb; --insight-glow:rgba(245,158,11,.14); }
.teacher-insight-card.is-success { --insight-color:#16a34a; --insight-bg:#f0fdf4; --insight-glow:rgba(34,197,94,.14); }
.teacher-insight-card.is-info { --insight-color:#2563eb; --insight-bg:#eff6ff; --insight-glow:rgba(37,99,235,.14); }
.teacher-pay-shell {
  border:1px solid rgba(148,163,184,.24);
  border-radius:26px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 22px 54px rgba(15,23,42,.075);
}
.teacher-pay-toolbar.refined-toolbar {
  grid-template-columns:minmax(150px,.46fr) minmax(150px,.42fr) minmax(260px,1fr);
  padding:.85rem;
  gap:.7rem;
  background:#fff;
}
.teacher-pay-toolbar.refined-toolbar .field {
  margin:0;
  padding:.6rem .7rem;
  border:1px solid #e2e8f0;
  border-radius:18px;
  background:#f8fafc;
}
.teacher-pay-toolbar.refined-toolbar .field span {
  margin-bottom:.25rem;
  color:#64748b;
  font-size:.69rem;
  font-weight:560;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.teacher-pay-toolbar.refined-toolbar input,
.teacher-pay-toolbar.refined-toolbar select {
  min-height:34px;
  border:none;
  background:transparent;
  box-shadow:none;
  padding:0;
  font-weight:520;
  color:#0f172a;
}
.teacher-pay-table-v2 { min-width:1080px; }
.teacher-pay-table-v2 th {
  padding:.72rem .8rem;
  background:#f8fafc;
  color:#64748b;
  font-size:.68rem;
  font-weight:620;
  letter-spacing:.055em;
}
.teacher-pay-table-v2 td {
  padding:.78rem .8rem;
  color:#334155;
}
.teacher-pay-table-v2 tbody tr:nth-child(even) td { background:#fbfdff; }
.teacher-pay-table-v2 tbody tr:hover td { background:#f0f7ff; }
.teacher-pay-person {
  display:flex;
  gap:.7rem;
  align-items:center;
  min-width:245px;
}
.teacher-avatar {
  display:inline-flex;
  flex:0 0 auto;
  width:38px;
  height:38px;
  align-items:center;
  justify-content:center;
  border-radius:15px;
  color:#1d4ed8;
  background:linear-gradient(135deg,#dbeafe,#eff6ff);
  border:1px solid #bfdbfe;
  font-size:.78rem;
  font-weight:680;
  letter-spacing:.02em;
}
.teacher-avatar.large { width:52px; height:52px; border-radius:18px; font-size:.95rem; }
.teacher-pay-person strong,
.teacher-pay-name strong {
  font-weight:620;
  line-height:1.25;
}
.period-chip {
  display:inline-flex;
  border-radius:999px;
  padding:.32rem .58rem;
  background:#eef2ff;
  color:#3730a3;
  font-size:.75rem;
  font-weight:560;
}
.teacher-amount-cell strong {
  display:block;
  color:#0f172a;
  font-size:.96rem;
  font-weight:680;
}
.teacher-progress-cell { min-width:190px; }
.teacher-progress {
  width:100%;
  height:8px;
  border-radius:999px;
  background:#e2e8f0;
  overflow:hidden;
  margin-bottom:.25rem;
}
.teacher-progress span {
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#38bdf8,#2563eb);
}
.teacher-pay-table-v2 .teacher-pay-checks { margin-top:.35rem; }
.teacher-detail-btn {
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  min-width:72px;
  justify-content:center;
  padding:.48rem .65rem;
  border:1px solid #bfdbfe;
  border-radius:13px;
  color:#1d4ed8;
  background:#eff6ff;
  cursor:pointer;
  font-size:.78rem;
  font-weight:590;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.teacher-detail-btn:hover { background:#dbeafe; transform:translateY(-1px); box-shadow:0 10px 18px rgba(37,99,235,.15); }
.teacher-pay-modal-panel {
  width:min(1040px,96vw);
  border-radius:30px;
  padding:0;
  overflow:hidden;
}
.teacher-pay-modal .modal__close {
  position:absolute;
  top:16px;
  right:16px;
  float:none;
  border-radius:14px;
  z-index:5;
}
.teacher-payment-dossier {
  padding:1.15rem;
  background:#fff;
}
.teacher-pay-detail-head.modern-dossier-head {
  align-items:flex-start;
  padding:1rem 3.4rem 1rem 1rem;
  border:1px solid #e2e8f0;
  border-radius:24px;
  background:linear-gradient(135deg,#ffffff,#f8fbff);
}
.teacher-dossier-title { display:flex; gap:.85rem; align-items:center; }
.teacher-pay-detail-head.modern-dossier-head h3 {
  margin:.1rem 0 .2rem;
  font-weight:660;
  letter-spacing:-.025em;
}
.dossier-kpis {
  grid-template-columns:repeat(4,minmax(0,1fr));
  margin:.9rem 0;
}
.dossier-kpis div {
  border-radius:18px;
  background:#f8fafc;
}
.teacher-doc-status-strip {
  display:flex;
  flex-wrap:wrap;
  gap:.45rem;
  padding:.3rem 0 .85rem;
}
.teacher-pay-tabs {
  position:sticky;
  top:0;
  z-index:2;
  background:#f1f5f9;
}
.dossier-section-card {
  padding:1rem;
  border:1px solid #e2e8f0;
  border-radius:24px;
  background:#fff;
  box-shadow:0 12px 34px rgba(15,23,42,.05);
}
.dossier-section-title {
  display:flex;
  gap:.75rem;
  align-items:flex-start;
  margin-bottom:.9rem;
}
.dossier-section-title > span {
  display:inline-flex;
  width:36px;
  height:36px;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  color:#2563eb;
  background:#eff6ff;
}
.dossier-section-title h4 {
  margin:0 0 .1rem;
  color:#0f172a;
  font-size:1rem;
  font-weight:630;
}
.dossier-section-title p { margin:0; color:#64748b; font-size:.86rem; }
.teacher-payment-dossier .field span,
.teacher-payment-dossier .modern-check span {
  font-weight:520;
}
.teacher-payment-dossier input,
.teacher-payment-dossier select {
  font-weight:500;
}
@media (max-width: 920px) {
  .teacher-pay-hero,
  .teacher-pay-toolbar.refined-toolbar,
  .teacher-pay-insight-grid,
  .dossier-kpis { grid-template-columns:1fr; }
  .teacher-pay-hero__actions { justify-content:flex-start; }
  .teacher-pay-detail-head.modern-dossier-head { padding-right:3.4rem; }
}

/* v2.2.33 - pagos docentes: tabs, scroll interno y reportes */
.teacher-pay-page-tabs {
  display:flex;
  gap:.55rem;
  align-items:center;
  padding:.45rem;
  margin:0 0 1rem;
  border:1px solid #e2e8f0;
  border-radius:18px;
  background:#f8fafc;
  width:max-content;
  max-width:100%;
  overflow:auto;
}
.teacher-pay-page-tabs button {
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  border:0;
  border-radius:14px;
  padding:.65rem .9rem;
  background:transparent;
  color:#64748b;
  font-size:.86rem;
  font-weight:560;
  cursor:pointer;
  white-space:nowrap;
}
.teacher-pay-page-tabs button.is-active {
  color:#1d4ed8;
  background:#fff;
  box-shadow:0 10px 24px rgba(37,99,235,.12);
}
.teacher-pay-section { display:none; }
.teacher-pay-section.is-active { display:block; }
.teacher-pay-modal-panel {
  max-height:min(92vh,860px);
  display:flex;
  flex-direction:column;
}
.teacher-payment-dossier {
  max-height:min(90vh,840px);
  display:flex;
  flex-direction:column;
  gap:.75rem;
}
.teacher-pay-modal-scroll {
  overflow-y:auto;
  padding-right:.35rem;
  scrollbar-width:thin;
  scrollbar-color:#93c5fd #eff6ff;
}
.teacher-pay-modal-scroll::-webkit-scrollbar { width:9px; }
.teacher-pay-modal-scroll::-webkit-scrollbar-track { background:#eff6ff; border-radius:999px; }
.teacher-pay-modal-scroll::-webkit-scrollbar-thumb { background:#93c5fd; border-radius:999px; border:2px solid #eff6ff; }
.teacher-pay-modal-scroll::-webkit-scrollbar-thumb:hover { background:#60a5fa; }
.teacher-pay-tab-panel {
  padding-top:.8rem;
}
.bank-copy-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.7rem;
  margin-bottom:.9rem;
}
.bank-copy-grid article {
  display:grid;
  grid-template-columns:1fr auto;
  gap:.25rem .5rem;
  align-items:center;
  border:1px solid #dbeafe;
  border-radius:18px;
  padding:.75rem .85rem;
  background:#f8fbff;
}
.bank-copy-grid small { color:#64748b; font-size:.72rem; }
.bank-copy-grid strong { color:#0f172a; font-size:.92rem; font-weight:610; overflow:hidden; text-overflow:ellipsis; }
.teacher-pay-report-builder {
  border:1px solid #e2e8f0;
  border-radius:28px;
  padding:1rem;
  background:#fff;
  box-shadow:0 16px 42px rgba(15,23,42,.06);
}
.teacher-report-controls {
  margin:.8rem 0 1rem;
  padding:.85rem;
  border:1px solid #e2e8f0;
  border-radius:20px;
  background:#f8fafc;
}
.teacher-report-preview {
  display:flex;
  justify-content:center;
  padding:1rem;
  border-radius:22px;
  background:#f1f5f9;
  overflow:auto;
}
.teacher-report-a4-demo {
  width:min(100%,760px);
  min-height:760px;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:18px;
  padding:1.4rem;
  box-shadow:0 18px 42px rgba(15,23,42,.12);
  color:#0f172a;
}
.teacher-report-a4-demo header {
  display:flex;
  justify-content:space-between;
  gap:1rem;
  border-bottom:1px solid #e2e8f0;
  padding-bottom:.8rem;
  margin-bottom:.9rem;
}
.teacher-report-a4-demo header p { margin:0; font-size:.95rem; font-weight:620; letter-spacing:.02em; }
.teacher-report-a4-demo header span { color:#64748b; font-size:.85rem; }
.teacher-report-a4-demo .report-line {
  display:grid;
  grid-template-columns:52px 1fr;
  gap:.75rem;
  padding:.4rem 0;
  border-bottom:1px dashed #e2e8f0;
}
.teacher-report-a4-demo .report-line small { color:#64748b; font-size:.76rem; }
.teacher-report-a4-demo .report-line strong { font-weight:600; }
.teacher-report-a4-demo .report-line span { grid-column:2; color:#64748b; font-size:.82rem; }
.teacher-report-a4-demo section { margin-top:1rem; }
.teacher-report-a4-demo h4 { margin:0 0 .55rem; font-size:.9rem; font-weight:620; color:#1e293b; }
.teacher-report-total {
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-radius:16px;
  padding:.8rem 1rem;
  background:#eff6ff;
  color:#1d4ed8;
}
.teacher-report-total strong { font-size:1.1rem; }
.teacher-report-a4-demo footer {
  margin-top:3rem;
  text-align:center;
  color:#334155;
}
.teacher-report-a4-demo footer span,
.teacher-report-a4-demo footer strong,
.teacher-report-a4-demo footer small { display:block; }
@media (max-width: 760px) {
  .teacher-pay-page-tabs,
  .bank-copy-grid { width:100%; grid-template-columns:1fr; }
  .teacher-pay-page-tabs { display:flex; }
  .teacher-pay-page-tabs button { flex:1; justify-content:center; }
}

/* v2.2.35 - Reporte docente estable desde Finanzas */
.teacher-report-inner-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  margin: 12px 0;
}
.teacher-report-inner-tabs button {
  border: 0;
  background: transparent;
  color: #64748b;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.teacher-report-inner-tabs button.is-active {
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 8px 18px rgba(15,23,42,.08);
}
.teacher-report-tab-panel[hidden] { display: none !important; }
.teacher-report-preview,
.teacher-sessions-preview {
  max-height: 68vh;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  padding: 18px;
}
.teacher-report-preview::-webkit-scrollbar,
.teacher-sessions-preview::-webkit-scrollbar { width: 10px; height: 10px; }
.teacher-report-preview::-webkit-scrollbar-track,
.teacher-sessions-preview::-webkit-scrollbar-track { background: #f8fafc; border-radius: 12px; }
.teacher-report-preview::-webkit-scrollbar-thumb,
.teacher-sessions-preview::-webkit-scrollbar-thumb { background: #bfdbfe; border: 2px solid #f8fafc; border-radius: 12px; }
.teacher-monthly-document {
  max-width: 820px;
  margin: 0 auto;
  color: #111827;
  font-size: 12px;
  line-height: 1.42;
}
.monthly-letter-head { text-align: center; margin-bottom: 14px; }
.monthly-letter-head h1 { font-size: 16px; letter-spacing: .04em; margin: 0; font-weight: 700; }
.monthly-memo-grid { display: grid; gap: 6px; margin-bottom: 14px; }
.monthly-memo-grid div { display: grid; grid-template-columns: 82px 1fr; gap: 10px; align-items: start; }
.monthly-memo-grid span,
.monthly-section h2,
.monthly-two-cols span { font-weight: 700; }
.monthly-memo-grid p { margin: 0; }
.monthly-memo-grid small { color: #64748b; font-size: 11px; }
.monthly-intro { margin: 12px 0 16px; text-align: justify; color: #334155; }
.monthly-section { margin: 0 0 16px; }
.monthly-section h2 { font-size: 13px; margin: 0 0 8px; }
.monthly-section table { width: 100%; border-collapse: collapse; }
.monthly-section th,
.monthly-section td { border: 1px solid #cbd5e1; padding: 7px 8px; text-align: left; vertical-align: top; }
.monthly-section th { background: #f8fafc; color: #475569; font-size: 11px; }
.monthly-section td { font-size: 11.5px; }
.monthly-section .total-row td { background: #f8fafc; font-weight: 700; }
.monthly-remuneration-section { break-before: page; page-break-before: always; }
.monthly-bank-block { display: grid; grid-template-columns: minmax(220px, 1fr); gap: 10px; margin-top: 10px; }
.monthly-bank-block p { border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px; margin: 0; background: #f8fafc; }
.monthly-bank-block span { font-weight: 700; }
.monthly-two-cols { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 12px; }
.monthly-two-cols p { border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px; margin: 0; }
.monthly-close { margin: 16px 0; }
.monthly-signature { text-align: center; margin-top: 24px; }
.teacher-signature-img { display: block; height: 48px; max-width: 180px; object-fit: contain; margin: 0 auto 7px; }
.signature-line { width: 250px; border-top: 1px solid #111827; margin: 8px auto 5px; }
.monthly-signature small { display: block; color: #64748b; margin-top: 3px; }
.teacher-session-audit-card .table-scroll { max-height: 54vh; overflow: auto; }
@media print {
  .monthly-remuneration-section { break-before: page; page-break-before: always; }
  .teacher-monthly-document { max-width: none; font-size: 10px; }
}


/* v2.2.36 demo realista y pagos homologados */
.finance-generic-payment-view .teacher-pay-table-v2 { min-width: 980px; }
.finance-pay-hero { background: radial-gradient(circle at top right, rgba(14,165,233,.12), transparent 34%), linear-gradient(135deg,#fff,#f8fbff 60%,#eef6ff); }
.finance-payment-dossier .teacher-pay-tabs { margin-top: .75rem; }
.session-audit-head { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; margin-bottom:1rem; padding:1rem; border:1px solid #e2e8f0; border-radius:22px; background:linear-gradient(135deg,#fff,#f8fbff); }
.session-audit-head h3 { margin:.12rem 0 .2rem; font-size:1.12rem; font-weight:640; color:#0f172a; }
.session-audit-head p { margin:0; color:#64748b; font-size:.9rem; }
.session-audit-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; }
.session-audit-item { display:grid; grid-template-columns:62px minmax(0,1fr); gap:.75rem; padding:.85rem; border:1px solid #e2e8f0; border-radius:20px; background:#fff; box-shadow:0 10px 26px rgba(15,23,42,.045); }
.session-audit-item.warn { border-color:#fde68a; background:#fffbeb; }
.session-audit-date { display:flex; flex-direction:column; align-items:center; justify-content:center; border-radius:16px; color:#1d4ed8; background:#eff6ff; border:1px solid #bfdbfe; }
.session-audit-date strong { font-size:1.2rem; font-weight:680; }
.session-audit-date small { color:#64748b; font-size:.7rem; }
.session-audit-main h4 { margin:0 0 .18rem; font-size:.94rem; color:#0f172a; font-weight:620; }
.session-audit-main p { margin:0 0 .55rem; color:#64748b; font-size:.82rem; }
@media (max-width: 800px) { .session-audit-grid { grid-template-columns:1fr; } .session-audit-head { flex-direction:column; } }

/* v2.2.37 demo: RR.HH. y Envios refinados */
.field-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-grid .span-3 { grid-column: 1 / -1; }
.hr-module-view .teacher-pay-hero,
.shipping-new-card { margin-bottom: 1rem; }
.hr-toolbar,
.shipping-toolbar { align-items: end; }
.hr-list-shell .teacher-pay-table-wrap { overflow-x: auto; }
.hr-table { min-width: 980px; }
.hr-table td > small,
.hr-table td small { display:block; color:#64748b; margin-top:2px; }
.hr-role-card-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.hr-role-card[hidden] { display:none !important; }
.teacher-pay-table tr[hidden] { display:none !important; }
.shipping-new-card .button-row { display:flex; justify-content:flex-end; gap:.75rem; flex-wrap:wrap; }
.shipping-new-form textarea { min-height: 74px; }
.btn-mini { padding:.45rem .65rem; font-size:.78rem; }
@media (max-width: 980px) {
  .field-grid.cols-3,
  .hr-responsive-grid,
  .shipping-new-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .field-grid.cols-3,
  .hr-responsive-grid,
  .shipping-new-form,
  .shipping-toolbar,
  .hr-toolbar { grid-template-columns: 1fr !important; }
  .teacher-pay-hero__actions { width:100%; justify-content:stretch; }
  .teacher-pay-hero__actions .btn { flex:1; justify-content:center; }
}


.demo-user { display: grid; grid-template-columns: 40px 1fr; align-items: start; gap: 12px; }
.demo-user__icon { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: rgba(37,99,235,.08); color: var(--primary, #2563eb); border: 1px solid rgba(37,99,235,.14); }
.demo-user__icon .icon-svg { width: 1.1rem; height: 1.1rem; }
.demo-user__content { display: grid; gap: 2px; min-width: 0; }
.demo-user__meta { display: block; color: var(--muted, #64748b); font-size: .86rem; }
.demo-user__credentials { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 3px; color: var(--ink, #0f172a); font-size: .85rem; }
.demo-user__credentials .icon { color: var(--primary, #2563eb); }
.demo-user__credentials code { background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; border-radius: 8px; padding: 2px 6px; font-size: .78rem; }
.demo-user__separator { color: var(--muted, #64748b); }
.login-role-chip { display: inline-flex; align-items: center; gap: 6px; }
.login-role-chip .icon { color: var(--primary, #2563eb); }

