/* Ajustes compartidos de tamaño. Los colores, componentes y orden de cada módulo se conservan. */
.table-wrap{min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.table-scroll-note{display:none}
.table-wrap:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.mobile-menu-toggle{display:none}
@media(max-width:740px){
  body[data-theme] .app-shell,body[data-theme] .workspace,body[data-theme] main,
  body[data-theme] .card,body[data-theme] form,body[data-theme] .editor{min-width:0}
  body[data-theme] .workspace{padding:14px}
  body[data-theme] .workspace>.editor{padding:0}
  body[data-theme] .editor,body[data-theme] .report-editor{padding:16px}
  body[data-theme] .correction-main,body[data-theme] .journey-main{width:100%}
  body[data-theme] .fields,body[data-theme] .attendance-filters,body[data-theme] .absence-filters{grid-template-columns:minmax(0,1fr);gap:16px}
  body[data-theme] .fields>*,body[data-theme] .attendance-filters>*,body[data-theme] .absence-filters>*{min-width:0}
  body[data-theme] .search-worker{grid-column:auto}
  body[data-theme] .fields input:not([type=checkbox]):not([type=radio]),
  body[data-theme] .field input,body[data-theme] select,body[data-theme] textarea,
  body[data-theme] input[type=date],body[data-theme] input[type=time],body[data-theme] input[type=datetime-local],
  body[data-theme] .attendance-filters input,body[data-theme] .absence-filters input,
  body[data-theme] .load-folio input{min-width:0;max-width:100%;width:100%;font-size:16px;min-height:44px}
  body[data-theme] textarea{resize:vertical}
  body[data-theme] select{background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:7px;padding:11px}
  body[data-theme] input[type=file]{padding:8px;overflow:hidden}
  body[data-theme] input[type=checkbox],body[data-theme] input[type=radio]{width:20px;height:20px;vertical-align:middle;flex-shrink:0}
  body[data-theme] input[type=checkbox]+label,body[data-theme] input[type=radio]+label{line-height:1.7;cursor:pointer}
  body[data-theme] .days{display:grid;grid-template-columns:24px minmax(0,1fr);align-items:center;gap:6px}
  body[data-theme] .days br{display:none}
  body[data-theme] .days label{margin:0;min-height:44px;display:flex;align-items:center}
  body[data-theme] .btn{min-height:44px;max-width:100%;font-size:12px;white-space:normal}
  body[data-theme] a.btn,body[data-theme] button.btn{display:inline-flex;align-items:center;justify-content:center;text-align:center}
  body[data-theme] .session-toolbar .btn{white-space:nowrap}
  body[data-theme] .sidebar nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;overflow:visible}
  body[data-theme] .sidebar .mobile-menu-toggle{display:flex;width:100%;justify-content:space-between;align-items:center;margin-top:12px;padding:10px 12px;font-size:13px;min-height:44px;cursor:pointer}
  body[data-theme] .mobile-menu-toggle::after{content:"⌄";font-size:20px;line-height:1}
  body[data-theme] .mobile-menu-toggle[aria-expanded=true]::after{content:"⌃"}
  body[data-theme] .sidebar[data-mobile-menu=collapsed] nav{display:none}
  body[data-theme] .sidebar[data-mobile-menu=expanded] nav{margin-top:12px!important}
  body[data-theme] .sidebar a.item{min-width:0;min-height:44px;display:flex;align-items:center;padding:10px;font-size:12px;white-space:normal;overflow-wrap:anywhere}
  body[data-theme] .correction-nav,body[data-theme] .journey-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  body[data-theme] .card-head,body[data-theme] .page-title,body[data-theme] .downloads,
  body[data-theme] .report-actions,body[data-theme] .company-filter{flex-wrap:wrap;min-width:0;gap:12px}
  body[data-theme] .card-head{padding:16px}
  body[data-theme] .card-head>*,body[data-theme] .page-title>*,body[data-theme] .header-actions{min-width:0;max-width:100%}
  body[data-theme] .card-head h2,body[data-theme] .card-head h3{margin:0}
  body[data-theme] .card-head select{max-width:100%;flex:1 1 160px}
  body[data-theme] .report-editor select{min-width:0;width:100%}
  body[data-theme] .report-editor .downloads>*{flex:1 1 120px}
  body[data-theme] .report-actions>div{display:flex;flex-wrap:wrap;gap:8px}
  body[data-theme] .notice>.btn{margin-top:8px;margin-right:6px}
  body[data-theme] .pager,body[data-theme] .attendance-pages{flex-wrap:wrap;gap:12px}
  body[data-theme] .help,body[data-theme] .feedback,body[data-theme] .receipt-title,
  body[data-theme] .card p,body[data-theme] .card h2,body[data-theme] .card h3,
  body[data-theme] .concept h1,body[data-theme] .concept p{overflow-wrap:anywhere}
  body[data-theme] .company-identity{min-width:0;max-width:100%;flex-wrap:wrap}
  body[data-theme] .company-identity span{min-width:0}
  body[data-theme] .studio>b{display:block;margin-top:10px}
  body[data-theme] .table-scroll-note:not([hidden]){display:block;margin:0;padding:8px 16px;color:var(--muted);font-size:12px;line-height:1.5}
  body[data-theme] .table-scroll-note::before{content:"↔ ";color:var(--accent);font-weight:700}
  body[data-theme] .table-wrap td,body[data-theme] .table-wrap th{font-size:12px}
  body[data-theme] .table-wrap tr:only-child td:only-child{white-space:normal;overflow-wrap:anywhere}
  /* Evitar columnas comprimidas a unas pocas letras; mantener el desplazamiento dentro de la tabla. */
  body[data-theme] .table-wrap table:has(tr>:nth-child(3)) th,
  body[data-theme] .table-wrap table:has(tr>:nth-child(3)) td{min-width:144px;vertical-align:top}
  body[data-theme] .table-wrap a.btn{min-height:44px}
  body[data-theme] .table-wrap a:not(.btn){color:var(--accent);text-underline-offset:3px;display:inline-flex;align-items:center;min-height:44px;max-width:100%}
}
@media(max-width:380px){
  body[data-theme] .app-shell{margin-left:8px;margin-right:8px}
  body[data-theme] .workspace{padding:10px}
  body[data-theme] .editor,body[data-theme] .report-editor{padding:12px}
  body[data-theme] .workspace>.editor{padding:0}
}
