:root{
  --bg: #0b1220;
  --panel: #0f1a2e;
  --card: #0f1a2e;
  --line: rgba(255,255,255,.08);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.62);

  --accent: #4f8cff;     /* acento principal */
  --accent-2: #22c55e;   /* success */
  --warn: #f59e0b;
  --danger: #ef4444;

  --radius: 14px;
  --shadow: 0 12px 30px rgba(0,0,0,.35);
}

*{ box-sizing: border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: radial-gradient(1200px 700px at 20% 0%, rgba(79,140,255,.18), transparent 60%),
              radial-gradient(900px 600px at 80% 10%, rgba(34,197,94,.10), transparent 60%),
              var(--bg);
  color: var(--text);
}

a{ color: inherit; text-decoration: none; }

.muted{ color: var(--muted); }
.pill{
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

/* Shell */
.app-shell{
  display:flex;
  min-height: 100vh;
}

.app-main{
  flex:1;
  display:flex;
  flex-direction: column;
  min-width: 0;
}

.app-content{
    padding: 14px 18px 20px;
}

/* Sidebar */
.sidebar{
  width: 270px;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  backdrop-filter: blur(10px);
  position: sticky;
  top:0;
  height: 100vh;
  
  display:flex;
  flex-direction:column;
}


.sidebar__copyright{
  padding: 16px;
  font-size: 12px;
  opacity: .6;
  border-top: 1px solid rgba(255,255,255,.08);
}

.sidebar__brand{
  display:flex;
  gap:12px;
  align-items:center;
  padding: 10px 10px 14px;
}
.brand-mark{
  width: 38px; height: 38px;
  border-radius: 12px;
  background: rgba(79,140,255,.18);
  display:flex; align-items:center; justify-content:center;
  border: 1px solid var(--line);
}
.brand-title{ font-weight: 800; letter-spacing: .2px; }
.brand-sub{ font-size: 12px; color: var(--muted); margin-top: 2px; }

.sidebar__nav{
  flex: 1;
  margin-top: 6px;
  display:flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item{
  display:flex; align-items:center; gap:10px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: rgba(255,255,255,.85);
}
.nav-item:hover{
  background: rgba(255,255,255,.04);
  border-color: var(--line);
}
.nav-item.is-active{
  background: rgba(79,140,255,.14);
  border-color: rgba(79,140,255,.28);
  color: #fff;
}
.nav-icon{ width: 22px; text-align:center; opacity:.95; }
.sidebar__divider{ height:1px; background: var(--line); margin: 10px 6px; }
.sidebar__foot{
  margin-top: auto;
  padding: 10px;
  border-top: 1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content: space-between;
}

/* Topbar */
.topbar{
  height: 48px;
  padding: 0 14px;
  display:flex;
  align-items:center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  backdrop-filter: blur(10px);
  position: sticky;
  top:0;
  z-index: 10;
}
.topbar__spacer{ flex:1; }

.icon-btn{
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  cursor:pointer;
}
.icon-btn:hover{ background: rgba(255,255,255,.05); }

/* Cards */
.card{
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card__hd{
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display:flex; align-items:center; justify-content: space-between;
  gap:12px;
}
.card__bd{ padding: 14px 16px; }
.card__title{ font-weight: 800; }
.card__sub{ color: var(--muted); font-size: 13px; margin-top: 3px; }

/* Buttons */
.btn{
  display:inline-flex; align-items:center; gap:8px;
  border-radius: 12px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  cursor:pointer;
  font-weight: 650;
  font-size: 14px;
}
.btn:hover{ background: rgba(255,255,255,.06); }
.btn--primary{
  background: rgba(79,140,255,.20);
  border-color: rgba(79,140,255,.35);
}
.btn--danger{
  background: rgba(239,68,68,.18);
  border-color: rgba(239,68,68,.35);
}
.btn--ghost{
  background: transparent;
}

/* Alerts / Flash */
.alert{
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
  display:flex; align-items:flex-start; gap:10px;
}
.alert--ok{ border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.10); }
.alert--warn{ border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.10); }
.alert--error{ border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.10); }
.alert__title{ font-weight: 800; margin-bottom: 2px; }

/* Badges & dots */
.badge{

  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  font-weight: 750;
  letter-spacing: .2px;
}
.dot{ width: 9px; height: 9px; border-radius: 99px; background: rgba(255,255,255,.35); }
.dot--ok{ background: var(--accent-2); }
.dot--warn{ background: var(--warn); }
.dot--danger{ background: var(--danger); }
.dot--accent{ background: var(--accent); }

/* Tables */
.table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow:hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.02);
}
.table th, .table td{
  border-bottom: 1px solid var(--line);
  text-align:left;
  padding: 6px 10px !important;
  line-height: 1.15 !important;
  font-size: 13px;
  
}


.table th, .table td{

  
  vertical-align: middle;
}

.table td .btn{
  padding: 6px 10px;              /* botones dentro de tabla más compactos */
  border-radius: 10px;
  font-size: 13px;
}

.badge{
  padding: 3px 9px;               /* badge más bajito */
  font-size: 11px;
    
}

.table th{
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .4px;
  text-transform: uppercase;
  background: rgba(255,255,255,.03);
}
.table tr:hover td{ background: rgba(255,255,255,.03); }
.table tr:last-child td{ border-bottom: 0; }

/* Breadcrumbs */
.breadcrumbs{
  display:flex;
  gap: 8px;
  align-items:center;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}
.breadcrumbs a{ color: rgba(255,255,255,.72); }
.breadcrumbs .sep{ opacity:.45; }


.sidebar.is-collapsed { width: 78px; }
.sidebar.is-collapsed .nav-label,
.sidebar.is-collapsed .brand-text,
.sidebar.is-collapsed .sidebar__foot .muted { display:none; }

input, select {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  padding: 9px 10px;
  border-radius: 12px;
  outline: none;
}
input::placeholder { color: rgba(255,255,255,.45); }

input:focus, select:focus {
  border-color: rgba(79,140,255,.40);
  box-shadow: 0 0 0 3px rgba(79,140,255,.12);
}


input, select, textarea {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  padding: 9px 10px;
  border-radius: 12px;
  outline: none;
}

textarea { min-height: 90px; }
input::placeholder, textarea::placeholder { color: rgba(255,255,255,.45); }
input:focus, select:focus, textarea:focus {
  border-color: rgba(79,140,255,.40);
  box-shadow: 0 0 0 3px rgba(79,140,255,.12);
}

.alert { transition: opacity .3s ease, transform .3s ease; }


/* Page Header (standard) */
.page-hd{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
}

.page-hd{ margin-bottom: 10px; }

.page-hd__row1{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.page-hd__title{
  font-weight:900;
  font-size:18px;
  letter-spacing:.2px;
}

.page-hd__actions{
  display:flex;
  gap:10px;
  flex: 0 0 auto;
}


.page-hd__left{
  max-width:70%;
}


.page-hd__sub{
  margin-top:4px;
  color:var(--muted);
  font-size:13px;
}

.page-hd__right{
  display:flex;
  align-items:center;
  justify-content:flex-end;
}


.page-card{
  background: linear-gradient(
    120deg,
    rgba(79,140,255,.12),
    rgba(34,197,94,.06)
  );
  border: 1px solid rgba(255,255,255,.08);
}
.page-card{
  padding: 6px;
}
.page-card .card__bd{
  padding: 18px 20px;
}

.topbar__h1{
  font-weight: 900;
  font-size: 16px;
  line-height: 1.1;
}

.topbar__crumbs .breadcrumbs{
  margin: 4px 0 0 0;   /* quita el margen grande */
  font-size: 12px;
}



.topbar__left{
  display:flex;
  flex-direction:column;
  justify-content:center;   /* ← centra verticalmente */
  gap:2px;
  min-width:0;
}

.topbar{
  display:flex;
  align-items:center;
  gap:14px;
}



.topbar__title{
  font-weight: 800;
  font-size: 16px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__crumbs .breadcrumbs{
  margin: 0;           /* quita espacio extra */
  font-size: 12px;
}

.topbar__actions-left{
  display:flex;
  align-items:center;
}


.topbar__actions-left .icon-btn i{ transition: transform .25s ease; }
.topbar__actions-left .icon-btn:hover i{ transform: rotate(90deg); }

.icon-btn--ghost{
  background: transparent;
  border: 1px solid rgba(255,255,255,.15);
  width: 34px;
  height: 34px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 8px;
  transition: all .2s ease;
}

.icon-btn--ghost:hover{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.25);
}

select{
  appearance: none;
  background-color: rgba(255,255,255,.03);
}

select option{
  background: #0f1a2e;
  color: rgba(255,255,255,.92);
}

/* Pager (paginación reutilizable) */
.pager{
  margin-top: 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.pager__nav{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}

.pager__pages{
  display:flex;
  align-items:center;
  gap:8px;
}

.pager__num{
  min-width: 38px;
  justify-content:center;
  padding-left: 0;
  padding-right: 0;
}

.pager__dots{
  padding: 0 4px;
}

.btn.is-disabled{
  opacity:.45;
  pointer-events:none;
}

/* Pagination / Pager */
.pager{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:nowrap;          /* <-- clave: no saltar a otra fila */
  margin-top: 12px;
}

.pager__left{
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.pager__right{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap: 8px;
  flex-wrap: nowrap;           /* ✅ fuerza 1 sola fila */
}

.pager__nums{
  display:flex;
  align-items:center;
  gap: 6px;
  flex-wrap: nowrap;           /* ✅ números en 1 fila */
}

.pager .btn{
  white-space: nowrap;         /* ✅ evita “Ultimo” raro */
}

/* Botón número (más compacto) */
.btn--page{
  padding: 8px 10px;
  border-radius: 12px;
  min-width: 40px;
  justify-content:center;
}

.btn--page.is-active{
  background: rgba(79,140,255,.20);
  border-color: rgba(79,140,255,.35);
}

/* En pantallas pequeñas sí dejamos que se acomode */
@media (max-width: 720px){
  .pager{ flex-wrap: wrap; }
  .pager__right{ flex-wrap: wrap; }
  .pager__nums{ flex-wrap: wrap; }
}


/* Pagination (reusable) */
.pager{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:nowrap;          /* <-- clave: no saltar a otra fila */
  margin-top: 12px;
}

.pager__meta{
  white-space:nowrap;
}

.pager__nav{
  display:flex;
  align-items:center;
  gap:8px;
  flex: 0 0 auto;
  flex-wrap:nowrap;          /* <-- clave */
  white-space:nowrap;        /* <-- clave */
}

/* Los números */
.pager__pages{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:nowrap;          /* <-- clave */
}

/* Si NO cabe, en vez de bajar de fila: scroll horizontal */
.pager__nav{
  overflow-x:auto;
  max-width: 70vw;           /* ajusta si quieres */
  padding-bottom: 2px;
}
.pager__nav::-webkit-scrollbar{ height: 6px; }
.pager__nav::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.12);
  border-radius: 8px;
}

/* Botones de paginación un poco más compactos */
.pager .btn{
  padding: 7px 10px;
  font-size: 13px;
  border-radius: 10px;
}

.pager__dots{ padding: 0 2px; }

.btn.is-disabled{
  opacity: .45;
  pointer-events: none;
  cursor: not-allowed;
}

.filters{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:12px;
}

.filters__left{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.filters__right{
  display:flex;
  align-items:center;
  gap:10px;
}

/* Compactar altura */
.filters select,
.filters input{
  padding:7px 10px;
}

.filters .btn{
  padding: 7px 14px;
}

/* Filters layout helpers */
.filters{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.filters__spacer{
  flex: 1 1 auto;
  min-width: 10px;
}

/* Responsive button: en pantallas pequeñas deja solo icono */
.btn--responsive .btn__text{ display:inline; }

@media (max-width: 900px){
  .btn--responsive{
    padding: 9px 10px; /* más compacto */
  }
  .btn--responsive .btn__text{
    display:none;
  }
}

.nav-badge{
  margin-left:auto;
  min-width: 22px;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(245,158,11,.18); /* warn */
  color: rgba(255,255,255,.95);
  font-weight: 800;
}

.progress{
  margin-top:6px;
  height:8px;
  border-radius:999px;
  background: rgba(255,255,255,.08);
  overflow:hidden;
}
.progress > span{
  display:block;
  height:100%;
  width:0;
  background: rgba(34,197,94,.95); /* verde */
}
.progress--warn > span{ background: rgba(245,158,11,.95); } /* amarillo */
.progress--bad  > span{ background: rgba(239,68,68,.95); }  /* rojo */



/* =========================================
   DIRECTORIO DE SOLICITUDES
========================================= */

.dash-chips{
  display:flex !important;
  flex-wrap:wrap;
  gap:6px;
}

.kpi-chip{
  display:inline-flex !important;
  align-items:center !important;
  gap:5px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.02);
  font-size:11px;
  line-height:1;
  white-space:nowrap;
}

.kpi-chip__label{
  font-weight:600;
  text-transform:uppercase;
  opacity:.8;
}

.kpi-chip__value{
  font-weight:700;
}

.dot{
  width:6px;
  height:6px;
  border-radius:50%;
  display:inline-block;
}

.badge-btn{
  background:transparent;
  border:0;
  padding:0;
  margin:0;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
}

.badge-btn:hover{
  transform:translateY(-1px);
  filter:brightness(1.05);
}

.badge-btn:focus{
  outline:none;
}


/* =========================================================
   DESIGN SYSTEM / DASH COMPONENTS
========================================================= */

/* ===== FIX CHIPS DIRECTORIO (FORZADO) ===== */

.ds-chips{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:6px !important;
}

.ds-chip{
  display:inline-flex !important;
  align-items:center !important;
  gap:5px !important;
  padding:4px 8px !important;
  border-radius:999px !important;
  border:1px solid rgba(255,255,255,.08) !important;
  background:rgba(255,255,255,.02) !important;
  font-size:11px !important;
  line-height:1 !important;
  white-space:nowrap !important;
}

.ds-chip__dot{
  width:6px !important;
  height:6px !important;
  border-radius:50% !important;
  display:inline-block !important;
}

.ds-chip__label{
  font-weight:600 !important;
  text-transform:uppercase !important;
  opacity:.85 !important;
}

.ds-chip__value{
  font-weight:700 !important;
}

/* Variante compacta */
.ds-chip--sm{
  gap:5px;
  padding:4px 8px;
  font-size:11px;
}

/* Variante ultra compacta */
.ds-chip--xs{
  gap:4px;
  padding:3px 7px;
  font-size:10px;
}

/* Variante suave */
.ds-chip--muted{
  background:rgba(255,255,255,.02);
  border-color:rgba(255,255,255,.06);
}





/* ===== FIX BADGES ESTADO ===== */

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.02em;
  border:1px solid transparent;
  white-space:nowrap;
}

/* APROBADA */
.badge--aprobada{
  background:rgba(34,197,94,.12);
  color:#22c55e;
  border-color:rgba(34,197,94,.25);
}

/* PENDIENTE */
.badge--pendiente{
  background:rgba(245,158,11,.12);
  color:#f59e0b;
  border-color:rgba(245,158,11,.25);
}

/* RECHAZADA */
.badge--rechazada{
  background:rgba(239,68,68,.12);
  color:#ef4444;
  border-color:rgba(239,68,68,.25);
}

/* ERROR */
.badge--error{
  background:rgba(148,163,184,.12);
  color:#94a3b8;
  border-color:rgba(148,163,184,.25);
}

.badge--duplicate{
  background: rgba(245,158,11,.15);
  color: #fbbf24;
  border: 1px solid rgba(245,158,11,.3);
}


.badge-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 6px;
  margin-left:8px;
  border-radius:999px;
  background:rgba(245,158,11,.16);
  color:#fbbf24;
  border:1px solid rgba(245,158,11,.28);
  font-size:12px;
  font-weight:700;
  line-height:1;
}


/* =========================================
   RESPONSIVE BASE / MOBILE FIRST SAFE LAYER
========================================= */

/* Evita desbordes horizontales accidentales */
html, body{
  overflow-x: hidden;
}

img, svg, canvas{
  max-width: 100%;
  height: auto;
}

/* Wrappers genéricos para tablas */
.table-wrap{
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
}

.table-wrap > .table{
  min-width: 780px; /* base segura para iPhone */
}

/* Topbar */
.topbar__menu-btn{
  flex: 0 0 auto;
}

.topbar__user{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}

.topbar__user-name{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

/* Cards / contenedores */
.card,
.page-card{
  min-width: 0;
}

.card__hd,
.page-hd,
.page-hd__row1{
  flex-wrap: wrap;
}

.page-hd__left,
.page-hd__right{
  min-width: 0;
}

/* Inputs y botones más seguros */
input,
select,
textarea{
  max-width: 100%;
}

.btn{
  white-space: nowrap;
}

/* Tablas */
.table{
  min-width: 100%;
}

.table th,
.table td{
  white-space: nowrap;
}

/* Responsive general */
@media (max-width: 1100px){
  .app-content{
    padding: 12px 14px 18px;
  }

  .page-hd{
    gap: 14px;
  }

  .page-hd__left{
    max-width: 100%;
  }
}

@media (max-width: 900px){
  .topbar{
    height: auto;
    min-height: 56px;
    padding: 10px 12px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .topbar__left{
    flex: 1 1 220px;
    min-width: 0;
  }

  .topbar__actions-left{
    order: 4;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  .topbar__spacer{
    display: none;
  }

  .topbar__user{
    margin-left: auto;
    max-width: 45%;
  }

  .page-hd{
    flex-direction: column;
    align-items: stretch;
  }

  .page-hd__row1{
    flex-direction: column;
    align-items: flex-start;
  }

  .page-hd__actions{
    width: 100%;
    flex-wrap: wrap;
  }

  .page-hd__actions .btn{
    justify-content: center;
  }

  .filters{
    align-items: stretch;
  }

  .filters__left,
  .filters__right{
    width: 100%;
  }

  .filters__left > *,
  .filters__right > *{
    flex: 1 1 auto;
  }

  .filters input,
  .filters select,
  .filters .btn{
    width: 100%;
  }
}

@media (max-width: 640px){
  .app-content{
    padding: 10px 10px 16px;
  }

  .topbar{
    padding: 10px;
  }

  .topbar__title{
    font-size: 15px;
  }

  .topbar__crumbs{
    display: none;
  }

  .topbar__hello{
    display: none;
  }

  .topbar__user{
    max-width: 140px;
  }

  .topbar__user-name{
    max-width: 140px;
    font-size: 13px;
  }

  .card__hd,
  .card__bd{
    padding-left: 12px;
    padding-right: 12px;
  }

  .page-card .card__bd{
    padding: 14px 12px;
  }

  .btn{
    min-height: 40px;
  }

  .icon-btn{
    width: 38px;
    height: 38px;
  }

  .table-wrap > .table{
    min-width: 680px;
  }

  .pager{
    gap: 10px;
  }

  .pager__meta{
    width: 100%;
    white-space: normal;
  }

  .pager__nav{
    max-width: 100%;
  }
}

@media (max-width: 420px){
  .topbar__user{
    display: none;
  }

  .topbar__left{
    flex: 1 1 100%;
  }

  .topbar__actions-left{
    width: 100%;
  }

  .card__hd{
    gap: 10px;
  }

  .table-wrap > .table{
    min-width: 620px;
  }
}

/* =========================================
   INSCRIPCIONES / DIRECTORIO SOLICITUDES
========================================= */

.table--inscripciones{
  min-width: 920px;
}

.table--inscripciones th:nth-child(1),
.table--inscripciones td:nth-child(1){
  width: 72px;
}

.table--inscripciones th:nth-child(2),
.table--inscripciones td:nth-child(2){
  min-width: 155px;
}

.table--inscripciones th:nth-child(3),
.table--inscripciones td:nth-child(3){
  min-width: 180px;
}

.table--inscripciones th:nth-child(4),
.table--inscripciones td:nth-child(4){
  min-width: 180px;
}

.table--inscripciones th:nth-child(5),
.table--inscripciones td:nth-child(5){
  min-width: 140px;
}

.table--inscripciones th:nth-child(6),
.table--inscripciones td:nth-child(6){
  min-width: 170px;
}

.table--inscripciones th:nth-child(7),
.table--inscripciones td:nth-child(7){
  min-width: 110px;
}

/* Botón compacto para móvil */
.btn--sm-mobile{
  gap: 6px;
}

@media (max-width: 640px){
  .btn--sm-mobile{
    padding: 7px 10px;
    font-size: 13px;
    border-radius: 10px;
  }

  .btn--sm-mobile span{
    display: none;
  }
}

/* =========================================
   APP SHELL / SIDEBAR MOBILE
========================================= */

.app-overlay{
  position: fixed;
  inset: 0;
  background: rgba(4, 10, 20, .62);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
  z-index: 39;
  border: 0;
  padding: 0;
  margin: 0;
}

@media (max-width: 900px){
  .app-shell{
    position: relative;
  }

  .sidebar{
    position: fixed;
    top: 0;
    left: 0;
    width: min(270px, 86vw);
    height: 100vh;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform .24s ease;
    box-shadow: 0 18px 40px rgba(0,0,0,.42);
    border-right: 1px solid var(--line);
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .app-main{
    width: 100%;
    min-width: 0;
  }

  .app-shell.is-sidebar-open .sidebar{
    transform: translateX(0);
  }

  .app-shell.is-sidebar-open .app-overlay{
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.is-mobile-nav-open{
    overflow: hidden;
  }

  .sidebar.is-collapsed{
    width: min(270px, 86vw);
  }

  .sidebar.is-collapsed .nav-label,
  .sidebar.is-collapsed .brand-text,
  .sidebar.is-collapsed .sidebar__foot .muted{
    display: initial;
  }
}

@media (min-width: 901px){
  .app-overlay{
    display: none;
  }
}

/* =========================================
   SIDEBAR DETAIL POLISH
========================================= */

.sidebar__brand{
  min-width: 0;
}

.brand-text{
  min-width: 0;
  flex: 1 1 auto;
}

.brand-title,
.brand-sub,
.nav-label,
.sidebar__foot-brand,
.sidebar__foot-user{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__foot{
  gap: 10px;
}

.sidebar__foot-meta{
  min-width: 0;
  flex: 1 1 auto;
}

.sidebar__foot-brand{
  font-weight: 800;
  font-size: 13px;
}

.sidebar__foot-user{
  font-size: 12px;
}

@media (max-width: 900px){
  .sidebar{
    padding: 12px;
  }

  .sidebar__brand{
    padding: 8px 8px 12px;
  }

  .sidebar__nav{
    gap: 4px;
  }

  .nav-item{
    min-height: 44px;
    padding: 10px 12px;
  }

  .nav-icon{
    width: 24px;
    flex: 0 0 24px;
  }

  .nav-label{
    font-size: 14px;
  }

  .sidebar__foot{
    padding: 12px 10px 10px;
  }

  .sidebar__copyright{
    padding: 12px 10px 10px;
    font-size: 11px;
  }
}


/* =========================================
   SIDEBAR DETAIL POLISH
========================================= */

.sidebar__brand{
  min-width: 0;
}

.brand-text{
  min-width: 0;
  flex: 1 1 auto;
}

.brand-title,
.brand-sub,
.nav-label,
.sidebar__foot-brand,
.sidebar__foot-user{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__foot{
  gap: 10px;
}

.sidebar__foot-meta{
  min-width: 0;
  flex: 1 1 auto;
}

.sidebar__foot-brand{
  font-weight: 800;
  font-size: 13px;
}

.sidebar__foot-user{
  font-size: 12px;
}

@media (max-width: 900px){
  .sidebar{
    padding: 12px;
  }

  .sidebar__brand{
    padding: 8px 8px 12px;
  }

  .sidebar__nav{
    gap: 4px;
  }

  .nav-item{
    min-height: 44px;
    padding: 10px 12px;
  }

  .nav-icon{
    width: 24px;
    flex: 0 0 24px;
  }

  .nav-label{
    font-size: 14px;
  }

  .sidebar__foot{
    padding: 12px 10px 10px;
  }

  .sidebar__copyright{
    padding: 12px 10px 10px;
    font-size: 11px;
  }
}

/* =========================================
   ATENCIONES
========================================= */

.field-id-sm{
  max-width: 72px;
}

.table--atenciones{
  min-width: 1280px;
}

.table--atenciones th:nth-child(1),
.table--atenciones td:nth-child(1){
  width: 72px;
}

.table--atenciones th:nth-child(2),
.table--atenciones td:nth-child(2){
  min-width: 180px;
}

.table--atenciones th:nth-child(3),
.table--atenciones td:nth-child(3){
  min-width: 130px;
}

.table--atenciones th:nth-child(4),
.table--atenciones td:nth-child(4){
  min-width: 135px;
}

.table--atenciones th:nth-child(5),
.table--atenciones td:nth-child(5){
  min-width: 160px;
}

.table--atenciones th:nth-child(6),
.table--atenciones td:nth-child(6),
.table--atenciones th:nth-child(7),
.table--atenciones td:nth-child(7),
.table--atenciones th:nth-child(9),
.table--atenciones td:nth-child(9){
  min-width: 155px;
}

.table--atenciones th:nth-child(8),
.table--atenciones td:nth-child(8){
  min-width: 90px;
}

.table--atenciones th:nth-child(10),
.table--atenciones td:nth-child(10){
  min-width: 140px;
}

.table--atenciones th:nth-child(11),
.table--atenciones td:nth-child(11){
  min-width: 220px;
}

.table-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  min-width: 0;
}

.table-progress-wrap{
  display:flex;
  align-items:center;
  gap:8px;
  min-width: 0;
}

.table-progress-wrap .progress{
  width: 90px;
  height: 6px;
  margin-top: 0;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.10);
  flex: 0 0 auto;
}

.table-progress-text{
  font-size: 12px;
  min-width: 36px;
}

@media (max-width: 640px){
  .field-id-sm{
    max-width: 100%;
  }

  .table--atenciones{
    min-width: 1180px;
  }

  .table-actions .badge,
  .table-actions .muted{
    white-space: nowrap;
  }
}


/* =========================================
   USUARIOS
========================================= */

.users-search-input{
  min-width: 220px;
}

.table--usuarios{
  min-width: 1120px;
}

.table--usuarios th,
.table--usuarios td{
  padding: 4px 8px !important;
  line-height: 1.05 !important;
}

.table--usuarios td{
  vertical-align: middle !important;
}

.table--usuarios th:nth-child(1),
.table--usuarios td:nth-child(1){
  width: 70px;
}

.table--usuarios th:nth-child(2),
.table--usuarios td:nth-child(2){
  min-width: 220px;
}

.table--usuarios th:nth-child(3),
.table--usuarios td:nth-child(3){
  min-width: 110px;
}

.table--usuarios th:nth-child(4),
.table--usuarios td:nth-child(4){
  min-width: 170px;
}

.table--usuarios th:nth-child(5),
.table--usuarios td:nth-child(5){
  min-width: 110px;
}

.table--usuarios th:nth-child(6),
.table--usuarios td:nth-child(6){
  min-width: 130px;
}

.table--usuarios th:nth-child(7),
.table--usuarios td:nth-child(7){
  min-width: 360px;
}

.user-col__name{
  font-weight: 800;
  color: var(--text);
  display: block;
  font-size: 13px;
  line-height: 1.1;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-col__email{
  font-weight: 600;
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.1;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
}

.table td.actions-cell{
  width: 360px;
}

.users-actions{
  display:flex;
  align-items:center;
  gap:18px;
  flex-wrap:nowrap;
}

.users-actions__row{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin:0;
  white-space: nowrap;
  padding-right: 2px;
}

.users-actions .btn{
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 10px;
}

.users-actions .btn i{
  font-size: 14px;
}

.users-actions .btn,
.users-actions select{
  cursor: pointer;
}

.users-actions select,
.users-actions input[type="password"]{
  min-height: 32px;
  padding: 6px 9px;
  border-radius: 10px;
  font-size: 13px;
}

.users-actions select{
  min-width: 84px;
}

.users-actions input[type="password"]{
  min-width: 150px;
  max-width: 160px;
}

.table--usuarios .badge{
  white-space: nowrap;
}

@media (max-width: 1200px){
  .table td.actions-cell{
    width: 320px;
  }

  .users-actions input[type="password"]{
    min-width: 130px;
    max-width: 140px;
  }
}

@media (max-width: 900px){
  .users-actions{
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .users-actions__row{
    width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 640px){
  .users-search-input{
    min-width: 100%;
  }

  .table--usuarios{
    min-width: 1040px;
  }

  .users-actions input[type="password"]{
    min-width: 120px;
    max-width: 100%;
  }
}

/* =========================================
   EMPRESAS
========================================= */

.table--empresas{
  min-width: 980px;
}

.table--empresas th:nth-child(1),
.table--empresas td:nth-child(1){
  width: 72px;
}

.table--empresas th:nth-child(2),
.table--empresas td:nth-child(2){
  min-width: 220px;
}

.table--empresas th:nth-child(3),
.table--empresas td:nth-child(3){
  min-width: 160px;
}

.table--empresas th:nth-child(4),
.table--empresas td:nth-child(4),
.table--empresas th:nth-child(5),
.table--empresas td:nth-child(5){
  min-width: 170px;
}

.table--empresas th:nth-child(6),
.table--empresas td:nth-child(6){
  min-width: 120px;
}

.table--empresas th:nth-child(7),
.table--empresas td:nth-child(7){
  min-width: 220px;
}

.empresa-col__name{
  display:block;
  font-weight:800;
  color:var(--text);
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empresa-usage{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.table-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.table-actions__form{
  display:inline-flex;
  margin:0;
}

@media (max-width: 640px){
  .table--empresas{
    min-width: 920px;
  }

  .empresa-usage{
    align-items:flex-start;
  }
}

/* =========================================
   DASHBOARD RESPONSIVE
========================================= */

.dash-hero,
.dash-health,
.dash-section,
.dash-chart,
.dash-team,
.dash-sla{
  min-width: 0;
}

.dash-health__chips,
.dash-actions,
.dash-legend,
.dash-bars,
.dash-list{
  min-width: 0;
}

.dash-chart__wrap{
  overflow: hidden;
}

.dash-chart__svg{
  max-width: 100%;
  height: auto;
}

.table--dashboard-last{
  min-width: 860px;
}

.table--dashboard-last th:nth-child(1),
.table--dashboard-last td:nth-child(1){
  width: 80px;
}

.table--dashboard-last th:nth-child(2),
.table--dashboard-last td:nth-child(2){
  min-width: 220px;
}

.table--dashboard-last th:nth-child(3),
.table--dashboard-last td:nth-child(3){
  min-width: 160px;
}

.table--dashboard-last th:nth-child(4),
.table--dashboard-last td:nth-child(4){
  min-width: 150px;
}

.table--dashboard-last th:nth-child(5),
.table--dashboard-last td:nth-child(5){
  min-width: 120px;
}

.table--dashboard-last th:nth-child(6),
.table--dashboard-last td:nth-child(6){
  min-width: 180px;
}

/* Ajuste general dashboard tablet */
@media (max-width: 1100px){
  .dash-three{
    grid-template-columns: 1fr;
  }

  .dash-donut-wrap{
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .dash-donut{
    width: 170px;
    height: 170px;
  }

  .dash-actions{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Ajuste móvil */
@media (max-width: 700px){
  .dash-health .card__bd,
  .dash-hero .card__bd,
  .dash-chart .card__bd,
  .dash-section .card__bd,
  .dash-team .card__bd,
  .dash-sla .card__bd{
    padding: 14px 12px;
  }

  .dash-health__chips{
    gap: 8px;
  }

  .dash-health__chip{
    width: 100%;
    justify-content: flex-start;
  }

  .dash-hero__title{
    font-size: 22px;
  }

  .dash-health__title{
    font-size: 24px;
  }

  .dash-kpis-compact{
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .kpi-chip{
    min-height: 56px;
    padding: 10px;
  }

  .kpi-chip__value{
    font-size: 17px;
  }

  .dash-actions{
    grid-template-columns: 1fr;
  }

  .dash-action{
    min-height: 58px;
    padding: 12px;
  }

  .dash-action__title{
    font-size: 13px;
  }

  .dash-action__sub{
    font-size: 11px;
  }

  .dash-donut{
    width: 156px;
    height: 156px;
  }

  .dash-donut__total{
    font-size: 24px;
  }

  .dash-legend__row{
    padding: 9px 10px;
  }

  .dash-list__row{
    padding: 9px 10px;
  }

  .dash-funnel__card,
  .dash-sla-main,
  .dash-sla-card{
    padding: 12px;
  }

  .dash-funnel__value,
  .dash-sla-card__value{
    font-size: 22px;
  }

  .dash-chart__wrap{
    padding: 10px;
  }

  .dash-chart__labels{
    grid-template-columns: repeat(7, minmax(60px, 1fr));
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dash-chart__label{
    font-size: 11px;
    white-space: nowrap;
  }

  .dash-bar{
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: stretch;
  }

  .dash-bar__value{
    text-align: right;
  }
}

/* iPhone angosto */
@media (max-width: 480px){
  .dash-kpis-compact{
    grid-template-columns: 1fr;
  }

  .dash-health__chips{
    flex-direction: column;
  }

  .dash-health__chip{
    width: 100%;
  }

  .dash-donut{
    width: 146px;
    height: 146px;
  }

  .dash-donut__total{
    font-size: 22px;
  }

  .table--dashboard-last{
    min-width: 760px;
  }
}


/* =========================================
   BACKUPS
========================================= */

.page-hd--compact{
  margin-bottom: 0;
}

.table--backups{
  min-width: 900px;
}

.table--backups th:nth-child(1),
.table--backups td:nth-child(1){
  min-width: 160px;
}

.table--backups th:nth-child(2),
.table--backups td:nth-child(2){
  min-width: 90px;
}

.table--backups th:nth-child(3),
.table--backups td:nth-child(3){
  min-width: 240px;
}

.table--backups th:nth-child(4),
.table--backups td:nth-child(4){
  min-width: 110px;
}

.table--backups th:nth-child(5),
.table--backups td:nth-child(5){
  min-width: 110px;
}

.table--backups th:nth-child(6),
.table--backups td:nth-child(6){
  min-width: 220px;
}

.backup-file-cell,
.backup-note-cell{
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px){
  .table--backups{
    min-width: 820px;
  }

  .backup-file-cell,
  .backup-note-cell{
    max-width: 220px;
  }
}


/* =========================================
   ACTIVITY LOGS
========================================= */

.filters--activity-logs{
  align-items: center;
}

.activity-filter-sm{
  width: 150px;
}

.activity-search-input{
  width: 240px;
}

.activity-stats-chips{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.table--activity-logs{
  min-width: 980px;
}

.table--activity-logs th:nth-child(1),
.table--activity-logs td:nth-child(1){
  min-width: 160px;
}

.table--activity-logs th:nth-child(2),
.table--activity-logs td:nth-child(2){
  min-width: 180px;
}

.table--activity-logs th:nth-child(3),
.table--activity-logs td:nth-child(3),
.table--activity-logs th:nth-child(4),
.table--activity-logs td:nth-child(4){
  min-width: 130px;
}

.table--activity-logs th:nth-child(5),
.table--activity-logs td:nth-child(5){
  min-width: 280px;
}

.table--activity-logs th:nth-child(6),
.table--activity-logs td:nth-child(6){
  min-width: 160px;
}

.activity-desc-cell{
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-entity-cell{
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px){
  .activity-filter-sm,
  .activity-search-input{
    width: 100%;
  }

  .activity-stats-chips{
    width: 100%;
  }
}

@media (max-width: 640px){
  .table--activity-logs{
    min-width: 900px;
  }

  .activity-desc-cell{
    max-width: 240px;
  }
}



/* =========================================
   EMAIL LOGS
========================================= */

.filters--email-logs{
  align-items: center;
}

.email-filter-sm{
  width: 150px;
}

.email-search-input{
  width: 240px;
}

.email-stats-chips{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.table--email-logs{
  min-width: 980px;
}

.table--email-logs th:nth-child(1),
.table--email-logs td:nth-child(1){
  min-width: 160px;
}

.table--email-logs th:nth-child(2),
.table--email-logs td:nth-child(2){
  min-width: 180px;
}

.table--email-logs th:nth-child(3),
.table--email-logs td:nth-child(3){
  min-width: 240px;
}

.table--email-logs th:nth-child(4),
.table--email-logs td:nth-child(4){
  min-width: 150px;
}

.table--email-logs th:nth-child(5),
.table--email-logs td:nth-child(5){
  min-width: 110px;
}

.table--email-logs th:nth-child(6),
.table--email-logs td:nth-child(6){
  min-width: 240px;
}

.email-subject-cell,
.email-error-cell{
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-template-cell{
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px){
  .email-filter-sm,
  .email-search-input{
    width: 100%;
  }

  .email-stats-chips{
    width: 100%;
  }
}

@media (max-width: 640px){
  .table--email-logs{
    min-width: 900px;
  }

  .email-subject-cell,
  .email-error-cell{
    max-width: 240px;
  }
}


/* =========================================
   INSCRIPCIONES / DUPLICADOS
========================================= */

.dup-section{
  margin-bottom: 18px;
}

.dup-section__title{
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 10px;
}

.dup-group-card{
  margin-bottom: 16px;
}

.dup-group-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:12px;
}

.dup-group-head__main{
  min-width: 0;
}

.dup-group-head__value{
  font-weight: 800;
  font-size: 16px;
  word-break: break-word;
}

.dup-group-head__sub{
  margin-top: 4px;
}

.dup-group-actions{
  margin-top: 12px;
}

.dup-original-badge{
  margin-top: 6px;
}

.table--duplicados{
  min-width: 980px;
}

.table--duplicados th,
.table--duplicados td{
  vertical-align: middle;
}

.dup-col-check{
  width: 40px;
}

.dup-col-id{
  width: 80px;
}

.dup-col-status{
  width: 140px;
}

.dup-col-date{
  width: 180px;
}

.dup-col-action{
  width: 120px;
}

.dup-email-cell,
.dup-phone-cell{
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px){
  .table--duplicados{
    min-width: 920px;
  }

  .dup-group-head__value{
    font-size: 15px;
  }

  .dup-email-cell,
  .dup-phone-cell{
    max-width: 180px;
  }
}


/* =========================================
   DIRECTORIO / DUPLICADOS
========================================= */

.table--dir-duplicados{
  min-width: 980px;
}

.table--dir-duplicados th,
.table--dir-duplicados td{
  vertical-align: middle;
}

.dir-dup-col-usage{
  width: 180px;
}

.dir-dup-col-action{
  width: 220px;
}

.dir-dup-usage-meta{
  margin-top: 6px;
  font-size: 12px;
}

@media (max-width: 640px){
  .table--dir-duplicados{
    min-width: 920px;
  }

  .dir-dup-usage-meta{
    font-size: 11px;
  }
}


/* =========================================
   ATENCIONES SHOW
========================================= */

.atencion-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:16px;
}

.atencion-actions{
  margin-top:14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.atencion-step-card{
  box-shadow:none;
  background: rgba(255,255,255,.02);
  margin-bottom:12px;
}

.card--soft{
  box-shadow:none;
  background: rgba(255,255,255,.02);
}

.atencion-duration-box{
  max-width: 620px;
}

.atencion-dual-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap:12px;
  margin-top:12px;
}

/* tabla invites */
.table--atencion-show{
  min-width: 880px;
}

.table--atencion-show th:nth-child(1),
.table--atencion-show td:nth-child(1){
  min-width: 160px;
}

.table--atencion-show th:nth-child(2),
.table--atencion-show td:nth-child(2){
  min-width: 200px;
}

.table--atencion-show th:nth-child(3),
.table--atencion-show td:nth-child(3){
  min-width: 140px;
}

/* =====================
   RESPONSIVE
===================== */

@media (max-width: 900px){

  .atencion-grid{
    grid-template-columns: 1fr;
  }

  .atencion-dual-grid{
    grid-template-columns: 1fr;
  }

  .atencion-duration-box{
    max-width: 100%;
  }

}

@media (max-width: 640px){

  .atencion-actions{
    flex-direction: column;
    align-items: stretch;
  }

  .atencion-actions .btn{
    width: 100%;
    justify-content: center;
  }

  .table--atencion-show{
    min-width: 820px;
  }

}

/* =========================================
   ATENCIONES DIFUNDIR
========================================= */

.difundir-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.difundir-filters{
  align-items:center;
  gap:10px;
}

/* TABLA PRINCIPAL */
.table--difundir{
  min-width: 1050px;
}

.table--difundir th:nth-child(1),
.table--difundir td:nth-child(1){
  width: 60px;
}

.table--difundir th:nth-child(2),
.table--difundir td:nth-child(2){
  width: 60px;
}

.table--difundir th:nth-child(3),
.table--difundir td:nth-child(3){
  width: 80px;
}

.table--difundir th:nth-child(4),
.table--difundir td:nth-child(4){
  min-width: 180px;
}

.table--difundir th:nth-child(5),
.table--difundir td:nth-child(5){
  min-width: 200px;
}

.table--difundir th:nth-child(6),
.table--difundir td:nth-child(6){
  min-width: 160px;
}

.table--difundir th:nth-child(7),
.table--difundir td:nth-child(7){
  min-width: 200px;
}

.table--difundir th:nth-child(8),
.table--difundir td:nth-child(8){
  min-width: 140px;
}

/* TABLA INVITACIONES */
.table--difundir-invites{
  min-width: 880px;
}

/* =====================
   RESPONSIVE
===================== */

@media (max-width: 900px){

    .difundir-head{
      display:flex;
      align-items:flex-start;
      justify-content:space-between;
      gap:12px;
    }
    
    .difundir-head__left{
      flex:1;
      min-width: 0;
    }
    
    .difundir-head__right{
      flex-shrink:0;
      display:flex;
      align-items:flex-start;
    }
    
    /* MOBILE */
    @media (max-width: 640px){
    
    .difundir-head{
        flex-direction: column;
        align-items: stretch;
    }
    
    .difundir-head__right{
        margin-top: 8px;
    }

}

@media (max-width: 640px){

  .difundir-filters{
    flex-direction: column;
    align-items: stretch;
  }

  .difundir-filters .btn{
    width: 100%;
    justify-content: center;
  }

  .table--difundir{
    min-width: 980px;
  }

  .table--difundir-invites{
    min-width: 820px;
  }

}

/* =========================================
   FORMULARIOS / USUARIOS CREATE
========================================= */

.user-form-wrap{
  max-width: 720px;
}

.form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.form-grid .col-span-2{
  grid-column:1 / -1;
}

.form-control label{
  display:block;
  margin-bottom:8px;
  font-weight:600;
  color:#e5e7eb;
}

.form-control input,
.form-control select,
.form-control textarea{
  width:100%;
  min-height:44px;
}

.form-hint{
  margin-top:6px;
  font-size:12px;
  color:#94a3b8;
  line-height:1.4;
}

.alert-error{
  margin-bottom:16px;
  padding:12px 14px;
  border-radius:12px;
  background:rgba(239, 68, 68, .10);
  border:1px solid rgba(239, 68, 68, .25);
  color:#fecaca;
}

.form-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}

@media (max-width: 768px){
  .user-form-wrap{
    max-width: 100%;
  }

  .form-grid{
    grid-template-columns:1fr;
    gap:14px;
  }

  .form-grid .col-span-2{
    grid-column:auto;
  }

  .form-actions{
    flex-direction:column;
    align-items:stretch;
  }

  .form-actions .btn{
    width:100%;
    justify-content:center;
  }
}

/* =========================================
   EMPRESAS CREATE
========================================= */

.empresa-form-wrap{
  max-width: 640px;
}

.form-grid--single{
  grid-template-columns: 1fr;
}

@media (max-width: 768px){

  .empresa-form-wrap{
    max-width: 100%;
  }

}

/* =========================================
   INSCRIPCIONES SHOW
========================================= */

.sol-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}

.sol-actions{
  margin-top:12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.sol-input-wide{
  min-width:260px;
}

/* duplicados */
.dup-list{
  display:grid;
  gap:10px;
}

.dup-item{
  padding:12px 14px;
  border-radius:14px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.06);
}

/* cards suaves */
.card--soft{
  box-shadow:none;
  background: rgba(255,255,255,.02);
}

/* =====================
   RESPONSIVE
===================== */

@media (max-width: 900px){

  .sol-grid{
    grid-template-columns: 1fr;
  }

}

@media (max-width: 640px){

  .sol-actions{
    flex-direction: column;
    align-items: stretch;
  }

  .sol-actions .btn{
    width:100%;
    justify-content:center;
  }

  .sol-input-wide{
    width:100%;
    min-width:0;
  }

}

/* =========================================================
   THEME TOKENS
========================================================= */

:root{
  --bg: #0b1220;
  --panel: #0f1a2e;
  --card: #0f1a2e;
  --line: rgba(255,255,255,.08);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.62);
  --accent: #4f8cff;
  --accent-2: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 14px;
  --shadow: 0 12px 30px rgba(0,0,0,.35);

  --topbar-bg: rgba(11,18,32,.72);
  --sidebar-bg: #0b1220;
  --input-bg: #111827;
  --soft-bg: rgba(255,255,255,.03);
  --hover-bg: rgba(255,255,255,.05);
}

body[data-theme="light"]{
  --bg: #f3f6fb;
  --panel: #ffffff;
  --card: #ffffff;
  --line: rgba(15,23,42,.10);
  --text: #0f172a;
  --muted: rgba(15,23,42,.62);
  --accent: #2563eb;
  --accent-2: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --shadow: 0 10px 26px rgba(15,23,42,.08);

  --topbar-bg: rgba(255,255,255,.88);
  --sidebar-bg: #eaf0f7;
  --input-bg: #ffffff;
  --soft-bg: rgba(15,23,42,.03);
  --hover-bg: rgba(15,23,42,.05);
}

/* =========================================================
   GLOBAL THEME APPLICATION
========================================================= */

body{
  background:
    radial-gradient(1200px 700px at 20% 0%, rgba(79,140,255,.18), transparent 60%),
    radial-gradient(900px 600px at 80% 10%, rgba(34,197,94,.10), transparent 60%),
    var(--bg);
  color: var(--text);
}

body[data-theme="light"] .app-shell,
body[data-theme="light"] .app-main,
body[data-theme="light"] .app-content{
  color: var(--text);
}

body[data-theme="light"] .sidebar{
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
}

body[data-theme="light"] .topbar{
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

body[data-theme="light"] .card,
body[data-theme="light"] .c-card{
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

body[data-theme="light"] .card--soft,
body[data-theme="light"] .c-card--soft{
  background: var(--soft-bg);
}

body[data-theme="light"] .table th{
  color: var(--muted);
}

body[data-theme="light"] .table td{
  color: var(--text);
}

body[data-theme="light"] .table tr{
  border-color: var(--line);
}

body[data-theme="light"] .muted{
  color: var(--muted) !important;
}

body[data-theme="light"] input,
body[data-theme="light"] select,
body[data-theme="light"] textarea,
body[data-theme="light"] .c-input,
body[data-theme="light"] .c-select,
body[data-theme="light"] .c-textarea{
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--line);
}

body[data-theme="light"] input::placeholder,
body[data-theme="light"] textarea::placeholder{
  color: rgba(15,23,42,.45);
}

body[data-theme="light"] .icon-btn{
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

body[data-theme="light"] .icon-btn:hover{
  background: var(--hover-bg);
}

body[data-theme="light"] .btn,
body[data-theme="light"] .c-btn--ghost{
  border-color: var(--line);
}

body[data-theme="light"] .badge{
  background: rgba(15,23,42,.05);
  color: var(--text);
  border: 1px solid var(--line);
}

body[data-theme="light"] .progress{
  background: rgba(15,23,42,.08);
}

body[data-theme="light"] .progress span{
  background: var(--accent);
}

body[data-theme="light"] .alert,
body[data-theme="light"] .c-alert{
  border-width: 1px;
}

/* =========================================================
   TOPBAR RIGHT
========================================================= */

.topbar__right{
  display:flex;
  align-items:center;
  gap:12px;
}

@media (max-width: 640px){
  .topbar__right{
    gap:8px;
  }
}