/* Módulo Tesis — estilos adicionales (no modifica styles.css) */

.tesis-act__entrega,
.tesis-card-cta {
  margin-top: .45rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  align-items: flex-start;
  width: 100%;
}

.tesis-card-cta {
  margin-top: .55rem;
  padding-top: .5rem;
  border-top: 1px dashed rgba(46, 70, 151, .2);
}

.tesis-card-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .85rem;
  border: none;
  border-radius: 8px;
  background: #2E4697;
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  transition: background .15s;
}

.tesis-card-btn:hover { background: #243a7a; color: #fff; }

.tesis-card-btn--outline {
  background: #fff;
  color: #2E4697;
  border: 1.5px solid #2E4697;
}

.tesis-card-btn--outline:hover { background: #eef2fb; }

.tesis-card-btn--sm {
  width: auto;
  flex-shrink: 0;
  padding: .32rem .8rem;
  font-size: .72rem;
  border-radius: 999px;
  min-height: 1.85rem;
}

.tesis-card-aviso {
  margin-top: .5rem;
  font-size: .74rem;
  color: #8a4b12;
  line-height: 1.35;
}

.cc-tesis-act .tesis-link-btn {
  margin-top: .35rem;
}

.tesis-entrega-ok {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  color: #1a7f4b;
  font-weight: 600;
}

/* ── Tarjeta curso: bloque de actividad tesis ─────────────────── */

.cc-tesis-act--entregado,
.cc-tesis-act--pendiente,
.cc-tesis-act--incumplimiento,
.cc-tesis-act--urgente,
.cc-tesis-act:has(.cc-tesis-act__head) {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: .65rem .8rem;
}

.cc-tesis-act__head {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
}

.cc-tesis-act__head .tact-badge {
  margin-top: .12rem;
}

.cc-tesis-act__head .tact-name {
  flex: 1;
  line-height: 1.4;
  font-size: .78rem;
  min-width: 0;
}

.cc-tesis-act__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  margin-top: .55rem;
  padding-top: .5rem;
  border-top: 1px solid rgba(46, 70, 151, .12);
}

.cc-tesis-act__meta--stack {
  flex-direction: column;
  align-items: stretch;
}

.cc-tesis-act__meta--stack .tesis-card-cta {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  width: 100%;
}

.cc-tesis-act--entregado .cc-tesis-act__meta {
  border-top-color: rgba(22, 101, 52, .18);
}

.cc-tesis-act--pendiente .cc-tesis-act__meta {
  border-top-color: rgba(100, 116, 139, .2);
}

.cc-tesis-act--urgente .cc-tesis-act__meta {
  border-top-color: rgba(180, 83, 9, .2);
}

.tact-entrega-fecha {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  font-weight: 600;
  color: #166534;
  line-height: 1.3;
  min-width: 0;
}

.tact-entrega-fecha i {
  font-size: .85rem;
  flex-shrink: 0;
  opacity: .85;
}

.tesis-entrega-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  flex-wrap: wrap;
  width: 100%;
  margin-top: .35rem;
  padding: .45rem .55rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
}

.tesis-entrega-meta .tesis-link-btn {
  margin-top: 0;
  flex-shrink: 0;
  padding: .28rem .7rem;
  font-size: .72rem;
  border-radius: 999px;
  border: 1.5px solid #2E4697;
  background: #fff;
  color: #2E4697;
}

.tesis-entrega-meta .tesis-link-btn:hover {
  background: #eef2fb;
}

.tesis-entrega-block {
  font-size: .76rem;
  color: #8a4b12;
  line-height: 1.35;
  max-width: 100%;
}

.cc-tesis-act--incumplimiento {
  background: #fff4f0;
  border: 1px solid #f5c4b8;
}
.tact-badge--alert {
  background: #c0392b !important;
  color: #fff !important;
}
.cc-tesis-act--incumplimiento .tact-name {
  color: #8b2e22;
  font-weight: 600;
}

.cc-tesis-act--pendiente {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.tact-badge--pendiente {
  background: #64748b !important;
  color: #fff !important;
}
.tact-dias--pendiente {
  color: #475569;
  background: #e2e8f0;
}

.cc-tesis-act--entregado {
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf3 100%);
  border: 1px solid #86efac;
  box-shadow: 0 1px 3px rgba(22, 101, 52, .06);
}
.tact-badge--ok {
  background: #15803d !important;
  color: #fff !important;
  box-shadow: 0 1px 2px rgba(21, 128, 61, .25);
}
.tact-dias--ok {
  color: #1a7f4b;
  background: #d4f0df;
  font-weight: 600;
}
.cc-tesis-act--entregado .tact-name {
  color: #14532d;
  font-weight: 600;
}

#tesis-archivos-overlay .tesis-entrega-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
}

#tesis-archivos-overlay .tesis-entrega-foot .d-none {
  display: none !important;
}

#tesis-archivos-overlay .tesis-archivos-etiqueta {
  font-size: .68rem;
  color: #64748b;
  font-weight: 500;
}

/* ── Modal alerta actualizar archivo ───────────────────────────── */

.tesis-alerta-overlay {
  position: fixed;
  inset: 0;
  z-index: 12500;
  background: rgba(15, 23, 42, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
  font-family: 'Inter', system-ui, sans-serif;
}

.tesis-alerta-modal {
  background: #fff;
  border-radius: 16px;
  width: min(420px, 100%);
  overflow: hidden;
  box-shadow:
    0 24px 56px rgba(127, 29, 29, .28),
    0 0 0 1px rgba(220, 38, 38, .12);
  animation: tesisModalIn .22s ease-out;
}

.tesis-alerta-modal__head {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: 1.1rem 1.15rem 1rem;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 55%, #991b1b 100%);
  color: #fff;
}

.tesis-alerta-modal__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .28);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.tesis-alerta-modal__head h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  line-height: 1.25;
}

.tesis-alerta-modal__lead {
  margin: .2rem 0 0;
  font-size: .75rem;
  opacity: .9;
  font-weight: 500;
}

.tesis-alerta-modal__body {
  padding: 1rem 1.15rem .85rem;
  background: #fffbfb;
}

.tesis-alerta-modal__body p {
  margin: 0;
  font-size: .84rem;
  color: #475569;
  line-height: 1.5;
}

.tesis-alerta-modal__pregunta {
  margin-top: .65rem !important;
  font-weight: 700 !important;
  color: #991b1b !important;
}

.tesis-alerta-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  padding: .75rem 1.15rem 1rem;
  border-top: 1px solid #fecaca;
  background: #fff;
}

.tesis-alerta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border-radius: 9px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, transform .12s, box-shadow .15s;
}

.tesis-alerta-btn--ghost {
  background: #fff;
  color: #64748b;
  border: 1.5px solid #e2e8f0;
}

.tesis-alerta-btn--ghost:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.tesis-alerta-btn--danger {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(220, 38, 38, .35);
}

.tesis-alerta-btn--danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(220, 38, 38, .42);
}

/* ── Modal éxito (carga / actualización de archivos) ───────────── */

.tesis-exito-overlay {
  position: fixed;
  inset: 0;
  z-index: 12600;
  background: rgba(15, 23, 42, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
  font-family: 'Inter', system-ui, sans-serif;
}

.tesis-exito-modal {
  background: #fff;
  border-radius: 16px;
  width: min(420px, 100%);
  overflow: hidden;
  box-shadow:
    0 24px 56px rgba(22, 101, 52, .22),
    0 0 0 1px rgba(34, 197, 94, .15);
  animation: tesisModalIn .22s ease-out;
}

.tesis-exito-modal__head {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: 1.1rem 1.15rem 1rem;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 55%, #166534 100%);
  color: #fff;
  position: relative;
}

.tesis-exito-modal__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .3);
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  flex-shrink: 0;
}

.tesis-exito-modal__head h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  line-height: 1.25;
  padding-right: 1.5rem;
}

.tesis-exito-modal__timer {
  margin: .25rem 0 0;
  font-size: .72rem;
  opacity: .9;
  font-weight: 500;
}

.tesis-exito-countdown {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.tesis-exito-close {
  position: absolute;
  top: .85rem;
  right: .85rem;
  border: none;
  background: rgba(255, 255, 255, .18);
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: .9rem;
  transition: background .15s;
}

.tesis-exito-close:hover {
  background: rgba(255, 255, 255, .32);
}

.tesis-exito-modal__body {
  padding: 1rem 1.15rem 1.1rem;
  background: #f0fdf4;
}

.tesis-exito-modal__body p {
  margin: 0;
  font-size: .86rem;
  color: #166534;
  line-height: 1.5;
  font-weight: 500;
}

.tesis-exito-modal__bar {
  height: 4px;
  background: #dcfce7;
}

.tesis-exito-modal__bar-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  transform-origin: left center;
  animation: tesisExitoBarShrink linear forwards;
}

@keyframes tesisExitoBarShrink {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

#tesis-form-overlay,
#tesis-archivos-overlay .tesis-input--locked {
  background: #f1f5f9;
  border-color: #d8e0ec;
  color: #475569;
  cursor: not-allowed;
}
#tesis-form-overlay,
#tesis-archivos-overlay .tesis-input--locked:focus {
  outline: none;
  box-shadow: none;
  border-color: #d8e0ec;
}

/* ── Modal de entrega (scoped para vencer a Bootstrap) ─────────── */

#tesis-form-overlay,
#tesis-archivos-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(15, 23, 42, .65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .75rem;
  backdrop-filter: blur(4px);
  font-family: 'Inter', system-ui, sans-serif;
}

#tesis-form-overlay *,
#tesis-archivos-overlay *{
  box-sizing: border-box;
}

#tesis-form-overlay .tesis-form-modal,
#tesis-archivos-overlay .tesis-form-modal{
  background: #fff;
  border-radius: 16px;
  width: min(560px, 100%);
  max-height: calc(100vh - 1.5rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 28px 64px rgba(15, 23, 42, .32), 0 0 0 1px rgba(46, 70, 151, .08);
  animation: tesisModalIn .22s ease-out;
}

@keyframes tesisModalIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

#tesis-form-overlay .tesis-form,
#tesis-archivos-overlay .tesis-form{
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  margin: 0;
}

#tesis-form-overlay .tesis-form-modal__head,
#tesis-archivos-overlay .tesis-form-modal__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1.1rem .85rem;
  border-bottom: 1px solid #e2e8f4;
  background: linear-gradient(135deg, #2E4697 0%, #3a5ab8 55%, #4a6fd4 100%);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

#tesis-form-overlay .tesis-form-modal__head::after,
#tesis-archivos-overlay .tesis-form-modal__head::after{
  content: '';
  position: absolute;
  right: -30px;
  top: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  pointer-events: none;
}

#tesis-form-overlay .tesis-form-modal__brand,
#tesis-archivos-overlay .tesis-form-modal__brand{
  display: flex;
  align-items: center;
  gap: .7rem;
  min-width: 0;
  flex: 1;
  position: relative;
  z-index: 1;
}

#tesis-form-overlay .tesis-form-modal__icon,
#tesis-archivos-overlay .tesis-form-modal__icon{
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}

#tesis-form-overlay .tesis-form-modal__titles,
#tesis-archivos-overlay .tesis-form-modal__titles{ min-width: 0; }

#tesis-form-overlay .tesis-form-modal__head h4,
#tesis-archivos-overlay .tesis-form-modal__head h4{
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

#tesis-form-overlay .tesis-form-sub,
#tesis-archivos-overlay .tesis-form-sub{
  font-size: .73rem;
  color: rgba(255,255,255,.82);
  margin: .15rem 0 0;
  line-height: 1.35;
}

#tesis-form-overlay .tesis-form-close,
#tesis-archivos-overlay .tesis-form-close{
  border: none;
  background: rgba(255,255,255,.15);
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 10px;
  font-size: .95rem;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: background .15s;
  position: relative;
  z-index: 1;
}
#tesis-form-overlay .tesis-form-close:hover,
#tesis-archivos-overlay .tesis-form-close:hover{ background: rgba(255,255,255,.28); }

#tesis-form-overlay .tesis-form-modal__body,
#tesis-archivos-overlay .tesis-form-modal__body{
  padding: .75rem 1rem .6rem;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  background: #f4f6fb;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

#tesis-form-overlay .tesis-form-card,
#tesis-archivos-overlay .tesis-form-card{
  background: #fff;
  border: 1px solid #e2e8f4;
  border-radius: 12px;
  padding: .65rem .75rem .7rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
}

#tesis-form-overlay .tesis-form-section,
#tesis-archivos-overlay .tesis-form-section{ margin: 0; }

#tesis-form-overlay .tesis-form-section__title,
#tesis-archivos-overlay .tesis-form-section__title{
  margin: 0 0 .45rem;
  font-size: .7rem;
  font-weight: 700;
  color: #2E4697;
  text-transform: uppercase;
  letter-spacing: .05em;
  display: flex;
  align-items: center;
  gap: .4rem;
}
#tesis-form-overlay .tesis-form-section__title i,
#tesis-archivos-overlay .tesis-form-section__title i{
  font-size: .85rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 6px;
  background: #eef2ff;
  display: grid;
  place-items: center;
}

#tesis-form-overlay .tesis-form-grid,
#tesis-archivos-overlay .tesis-form-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .45rem .6rem;
}

#tesis-form-overlay .tesis-field,
#tesis-archivos-overlay .tesis-field{
  display: flex;
  flex-direction: column;
  gap: .18rem;
  min-width: 0;
}
#tesis-form-overlay .tesis-field--full,
#tesis-archivos-overlay .tesis-field--full{ grid-column: 1 / -1; }
#tesis-form-overlay .tesis-field--half,
#tesis-archivos-overlay .tesis-field--half{ grid-column: span 1; }

#tesis-form-overlay .tesis-label,
#tesis-archivos-overlay .tesis-label{
  font-size: .71rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.2;
}

#tesis-form-overlay .tesis-hint,
#tesis-archivos-overlay .tesis-hint{
  font-size: .65rem;
  color: #94a3b8;
  line-height: 1.25;
}
#tesis-form-overlay .tesis-hint--block,
#tesis-archivos-overlay .tesis-hint--block{
  margin: -.2rem 0 .4rem;
}

#tesis-form-overlay .tesis-input,
#tesis-archivos-overlay .tesis-input{
  width: 100%;
  border: 1.5px solid #dde3ef;
  border-radius: 9px;
  padding: .42rem .6rem;
  font-size: .8rem;
  color: #1e293b;
  background: #fafbfd;
  transition: border-color .15s, box-shadow .15s, background .15s;
  appearance: none;
  -webkit-appearance: none;
}
#tesis-form-overlay .tesis-input::placeholder,
#tesis-archivos-overlay .tesis-input::placeholder{ color: #b0bac9; }
#tesis-form-overlay .tesis-input:focus,
#tesis-archivos-overlay .tesis-input:focus{
  outline: none;
  border-color: #2E4697;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(46, 70, 151, .14);
}
#tesis-form-overlay .tesis-upper,
#tesis-archivos-overlay .tesis-upper{ text-transform: uppercase; }

#tesis-form-overlay .tesis-select,
#tesis-archivos-overlay .tesis-select{
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23475569' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .65rem center;
  padding-right: 2rem;
  cursor: pointer;
}
#tesis-form-overlay .tesis-select:disabled,
#tesis-archivos-overlay .tesis-select:disabled{
  cursor: not-allowed;
}

/* Ocultar input nativo de archivo por completo */
#tesis-form-overlay .tesis-file-input,
#tesis-archivos-overlay .tesis-file-input{
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  position: absolute !important;
  pointer-events: none !important;
}

#tesis-form-overlay .tesis-file-drop,
#tesis-archivos-overlay .tesis-file-drop{
  display: block;
  position: relative;
  cursor: pointer;
  margin: 0;
}

#tesis-form-overlay .tesis-file-drop__inner,
#tesis-archivos-overlay .tesis-file-drop__inner{
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .65rem;
  border: 2px dashed #c8d2e6;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8faff 0%, #f1f5fd 100%);
  transition: border-color .18s, background .18s, box-shadow .18s;
}

#tesis-form-overlay .tesis-file-drop:hover .tesis-file-drop__inner,
#tesis-archivos-overlay .tesis-file-drop:hover .tesis-file-drop__inner,
#tesis-form-overlay .tesis-file-drop--ready .tesis-file-drop__inner,
#tesis-archivos-overlay .tesis-file-drop--ready .tesis-file-drop__inner{
  border-color: #2E4697;
  background: #eef3ff;
  box-shadow: 0 0 0 3px rgba(46, 70, 151, .1);
}

#tesis-form-overlay .tesis-file-drop__ico,
#tesis-archivos-overlay .tesis-file-drop__ico{
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #2E4697, #4a6fd4);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(46, 70, 151, .28);
}

#tesis-form-overlay .tesis-file-drop__meta,
#tesis-archivos-overlay .tesis-file-drop__meta{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

#tesis-form-overlay .tesis-file-drop__txt,
#tesis-archivos-overlay .tesis-file-drop__txt{
  font-size: .76rem;
  font-weight: 600;
  color: #2E4697;
}

#tesis-form-overlay .tesis-file-drop__name,
#tesis-archivos-overlay .tesis-file-drop__name{
  font-size: .68rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#tesis-form-overlay .tesis-file-drop--ready .tesis-file-drop__name,
#tesis-archivos-overlay .tesis-file-drop--ready .tesis-file-drop__name{
  color: #15803d;
  font-weight: 600;
}

#tesis-form-overlay .tesis-file-drop__action,
#tesis-archivos-overlay .tesis-file-drop__action{
  flex-shrink: 0;
  font-size: .72rem;
  font-weight: 700;
  color: #2E4697;
  background: #fff;
  border: 1.5px solid #c5d0e6;
  border-radius: 8px;
  padding: .35rem .65rem;
  transition: background .15s, border-color .15s;
}

#tesis-form-overlay .tesis-file-drop:hover .tesis-file-drop__action,
#tesis-archivos-overlay .tesis-file-drop:hover .tesis-file-drop__action{
  background: #2E4697;
  border-color: #2E4697;
  color: #fff;
}

#tesis-form-overlay .tesis-prefill-aviso,
#tesis-archivos-overlay .tesis-prefill-aviso{
  margin: 0 0 .5rem;
  padding: .45rem .6rem;
  font-size: .72rem;
  color: #1e4a8a;
  background: #e8f0ff;
  border: 1px solid #c5d8f5;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: .4rem;
  line-height: 1.35;
}
#tesis-form-overlay .tesis-prefill-aviso i,
#tesis-archivos-overlay .tesis-prefill-aviso i{
  flex-shrink: 0;
  margin-top: .1rem;
}

#tesis-form-overlay .tesis-form-modal__foot,
#tesis-archivos-overlay .tesis-form-modal__foot{
  padding: .65rem 1rem .9rem;
  border-top: 1px solid #e2e8f4;
  background: #fff;
  flex-shrink: 0;
}

#tesis-form-overlay .tesis-form-msg,
#tesis-archivos-overlay .tesis-form-msg{
  font-size: .75rem;
  margin: 0 0 .5rem;
  min-height: 1em;
  text-align: center;
  padding: .3rem .5rem;
  border-radius: 6px;
}
#tesis-form-overlay .tesis-form-msg--ok,
#tesis-archivos-overlay .tesis-form-msg--ok{
  color: #15803d;
  font-weight: 600;
  background: #ecfdf3;
}
#tesis-form-overlay .tesis-form-msg--err,
#tesis-archivos-overlay .tesis-form-msg--err{
  color: #b42318;
  background: #fef3f2;
}

#tesis-form-overlay .tesis-form-actions,
#tesis-archivos-overlay .tesis-form-actions{
  display: flex;
  justify-content: flex-end;
  gap: .55rem;
}

#tesis-form-overlay .tesis-btn,
#tesis-archivos-overlay .tesis-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .5rem 1.1rem;
  border-radius: 9px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s, box-shadow .15s, background .15s;
  line-height: 1.2;
  font-family: inherit;
}

#tesis-form-overlay .tesis-btn--ghost,
#tesis-archivos-overlay .tesis-btn--ghost{
  background: #fff;
  color: #475569;
  border: 1.5px solid #d4dce8;
  box-shadow: none;
}
#tesis-form-overlay .tesis-btn--ghost:hover,
#tesis-archivos-overlay .tesis-btn--ghost:hover{
  background: #f8fafc;
  border-color: #94a3b8;
}

#tesis-form-overlay .tesis-btn--primary,
#tesis-archivos-overlay .tesis-btn--primary{
  background: linear-gradient(135deg, #2E4697 0%, #3d5bb5 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(46, 70, 151, .38);
}
#tesis-form-overlay .tesis-btn--primary:hover,
#tesis-archivos-overlay .tesis-btn--primary:hover{
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(46, 70, 151, .45);
}
#tesis-form-overlay .tesis-btn--primary:active,
#tesis-archivos-overlay .tesis-btn--primary:active{ transform: translateY(0); }
#tesis-form-overlay .tesis-btn--primary:disabled,
#tesis-archivos-overlay .tesis-btn--primary:disabled{
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 520px) {
  #tesis-form-overlay .tesis-form-grid,
#tesis-archivos-overlay .tesis-form-grid{ grid-template-columns: 1fr; }
  #tesis-form-overlay .tesis-field--half,
#tesis-archivos-overlay .tesis-field--half{ grid-column: 1 / -1; }
  #tesis-form-overlay .tesis-form-modal__head,
#tesis-archivos-overlay .tesis-form-modal__head{ padding: .85rem .9rem .75rem; }
  #tesis-form-overlay .tesis-form-modal__body,
#tesis-archivos-overlay .tesis-form-modal__body{ padding: .65rem .85rem .5rem; }
  #tesis-form-overlay .tesis-form-modal__foot,
#tesis-archivos-overlay .tesis-form-modal__foot{ padding: .55rem .85rem .8rem; }
  #tesis-form-overlay .tesis-form-actions,
#tesis-archivos-overlay .tesis-form-actions{ flex-direction: column-reverse; }
  #tesis-form-overlay .tesis-btn,
#tesis-archivos-overlay .tesis-btn{ width: 100%; }
  #tesis-form-overlay .tesis-file-drop__action,
#tesis-archivos-overlay .tesis-file-drop__action{ display: none; }
}

@media (max-height: 640px) {
  #tesis-form-overlay,
#tesis-archivos-overlay { align-items: flex-start; padding-top: .5rem; }
  #tesis-form-overlay .tesis-form-modal,
#tesis-archivos-overlay .tesis-form-modal{ max-height: calc(100vh - 1rem); }
  #tesis-form-overlay .tesis-form-modal__body,
#tesis-archivos-overlay .tesis-form-modal__body{ overflow-y: auto; }
}


#tesis-archivos-overlay .tesis-archivos-modal { width: min(640px, 100%); }
#tesis-archivos-overlay .tesis-archivos-loading,
#tesis-archivos-overlay .tesis-archivos-empty {
  font-size: .8rem;
  color: #64748b;
  text-align: center;
  padding: 1rem .5rem;
}
#tesis-archivos-overlay .tesis-archivos-ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-height: 50vh;
  overflow-y: auto;
}
#tesis-archivos-overlay .tesis-archivos-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem .65rem;
  background: #fff;
  border: 1px solid #e2e8f4;
  border-radius: 10px;
}
#tesis-archivos-overlay .tesis-archivos-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
#tesis-archivos-overlay .tesis-archivos-meta strong {
  font-size: .78rem;
  color: #1e293b;
  word-break: break-word;
}
#tesis-archivos-overlay .tesis-archivos-meta small {
  font-size: .68rem;
  color: #94a3b8;
}
#tesis-archivos-overlay .tesis-archivos-carpeta {
  font-size: .68rem;
  color: #2E4697;
  font-weight: 600;
}
#tesis-archivos-overlay .tesis-btn--sm {
  padding: .35rem .75rem;
  font-size: .72rem;
  flex-shrink: 0;
}

.tesis-api-aviso {
  font-size: .82rem;
  padding: .5rem .65rem;
  background: #fff8e6;
  border-radius: 8px;
  margin-bottom: .75rem;
}

/* Admin entregas */
.tesis-adm-table { font-size: .8rem; }
.tesis-adm-badge {
  display: inline-block;
  padding: .15rem .45rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
}
.tesis-adm-badge--open { background: #d7f0df; color: #1a7f4b; }
.tesis-adm-badge--closed { background: #fbd9d6; color: #b42318; }
.tesis-adm-badge--auto { background: #e8edf8; color: #2E4697; }

.tesis-override-btns { display: flex; flex-wrap: wrap; gap: .35rem; }
