/* Diseño responsivo (1.10). Se carga al final de todos los diseños de página.
   Computadora (≥1024 px): diseño completo con menú lateral.
   Tablet (641–1023 px): menú lateral plegado en el botón «Menú» y contenido a todo lo ancho.
   Celular (≤640 px): todo en una columna, tablas como tarjetas y controles cómodos para el dedo. */

/* ---------- Todos los tamaños ---------- */
fieldset{min-width:0}
img{max-width:100%;height:auto}
video,iframe,embed,object{max-width:100%}
input,select,textarea{max-width:100%}
.esc-row>*,.form-grid>*{min-width:0}

/* ---------- Tablet y menor: menú lateral plegable ---------- */
@media (max-width:1023px){
  .admin-reference .admin-frame,.admin-frame{display:block}
  .admin-reference .admin-menu-toggle,.admin-menu-toggle{display:block;background:#4f3522;border:1px solid #627b61;color:#fff6dd;border-radius:10px;font-size:.85rem;padding:9px 14px;min-height:42px;cursor:pointer}
  body[data-nav-ready] .admin-sidebar{display:none}
  body[data-nav-open] .admin-sidebar{display:block}
  .admin-reference .admin-sidebar{border-right:0;border-bottom:1px solid #e3ddcb;padding:18px 16px 14px}
  .admin-reference .sidebar-art,.admin-sidebar .sidebar-art{display:none}
  .admin-reference .admin-footer,.admin-footer{margin-left:24px;margin-right:24px}
  .gob-barra-enlaces{gap:6px 20px}
  .admin-table td{overflow-wrap:break-word;word-break:normal}
}
@media (min-width:641px) and (max-width:1023px){
  /* Menú abierto en tablet: opciones en dos columnas para no empujar tanto el contenido. */
  .admin-sidebar nav{display:grid;grid-template-columns:1fr 1fr;gap:4px 12px}
  .admin-sidebar nav .admin-content-subnav{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:2px 10px;padding-left:12px}
  .admin-reference .admin-main{padding:28px 24px}
}
@media (max-width:900px){.gob-autoridad{display:none}}

/* ---------- Celular ---------- */
@media screen and (max-width:640px){
  /* Tablas como tarjetas: cada renglón es un bloque y cada dato lleva su encabezado. */
  .rt-wrap{overflow:visible;border:0;background:transparent;border-radius:0}
  table.rt-stack{min-width:0!important;width:100%;border-collapse:separate;background:transparent}
  table.rt-stack thead{display:none}
  table.rt-stack caption{display:block;border-radius:10px;margin-bottom:10px}
  table.rt-stack tbody,table.rt-stack tr{display:block;width:100%}
  table.rt-stack tbody tr{border:1px solid #e6d6c1;border-radius:14px;margin:0 0 12px;padding:6px 14px;background:#fffdf8!important;box-shadow:0 1px 3px #33261c0d}
  table.rt-stack tbody th{display:block;padding:10px 0 6px;text-align:left;background:none;border:0}
  table.rt-stack td{display:grid;grid-template-columns:minmax(92px,36%) minmax(0,1fr);gap:4px 12px;align-items:center;padding:9px 0!important;border:0;border-top:1px dashed #eadfcd;text-align:left!important;width:auto!important;white-space:normal;font-weight:400}
  table.rt-stack td:first-child,table.rt-stack th+td{border-top:0}
  table.rt-stack td:first-child{font-weight:600}
  table.rt-stack td::before{content:attr(data-label);font-size:.76rem;font-weight:650;color:#7a6556;line-height:1.3}
  table.rt-stack td:not([data-label]),table.rt-stack td.rt-full{display:block}
  table.rt-stack td:not([data-label])::before,table.rt-stack td.rt-full::before{content:none}
  table.rt-stack td>*{min-width:0}
  table.rt-stack td input:not([type=checkbox]):not([type=radio]),table.rt-stack td select,table.rt-stack td textarea{width:100%!important;margin:0}
  table.rt-stack td form{margin:0}
  table.rt-stack td small,table.rt-stack td time{white-space:normal}

  /* Formularios en una columna */
  .esc-row,.form-grid{grid-template-columns:1fr}
  .admin-reference .admin-main{padding:22px 16px}
}
/* ---------- Tablet y celular: textos legibles y controles para el dedo ---------- */
@media screen and (max-width:1023px){
  /* Textos mínimos legibles */
  .admin-reference .admin-brand small,.admin-brand small{font-size:.66rem!important;letter-spacing:.1em!important}
  .admin-reference .admin-brand strong,.admin-brand strong{font-size:.8rem!important}
  .admin-reference .admin-menu-toggle{font-size:.82rem}
  .brand small{font-size:.7rem!important}
  .eyebrow,p.eyebrow{font-size:.72rem!important}
  .state-tag,.summary-status,.aula-tag,.dash-post-type,.summary-event-date,.summary-label,.summary-count{font-size:.74rem!important}
  .admin-main small,.aula-main small,.admin-main time,.aula-main time,.admin-table small,small.perm-parent,.inv-fields label small{font-size:.75rem!important}
  .footer-bottom small,.footer-bottom a,.admin-footer,.admin-footer span{font-size:.76rem!important}

  /* Controles cómodos para el dedo (mínimo ~40 px de alto) */
  .gob-pie li a{display:inline-block;padding:8px 0}
  .footer-bottom nav a{display:inline-block;padding:11px 6px}
  .text-button{display:inline-flex;align-items:center;min-height:40px;padding:6px 4px}
  summary{min-height:40px}
  .role-detail>summary,.perm-advanced>summary,.contact-ref-history>summary,.gob-admin-logo>summary{padding-block:10px}
  .aula-crumbs a{display:inline-block;padding-block:11px}
  .pagination a,.public-pagination a{display:inline-block;padding:10px 8px}
  .password-field button{min-height:40px}

}
@media screen and (max-width:420px){
  .esc-row{grid-template-columns:1fr}
}
