/* Shared phone layout. Fiscal editors and document tables keep their own layout. */
@media (max-width:600px) {
  .shell .main {padding:10px 10px 115px!important}
  #app .mobile-nav {display:grid!important;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);align-items:stretch;gap:4px;padding:6px 8px max(8px,env(safe-area-inset-bottom))!important}
  #app .mobile-nav button {display:flex!important;flex-direction:column;align-items:center;justify-content:center;width:100%;min-width:0;min-height:64px!important;gap:4px;padding:7px 3px!important;border-radius:12px;font-size:12px!important;font-weight:650;line-height:1.1;white-space:nowrap}
  #app .mobile-nav button .ico {display:flex;align-items:center;justify-content:center;width:26px;height:26px}
  #app .mobile-nav button .ico svg {width:24px!important;height:24px!important}
  #app .mobile-nav button.active {background:var(--soft);color:var(--appearance-accent-text,var(--red))}
  .company-support96 {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px;padding:6px 10px;font-size:11px}
  .company-support96 span {overflow-wrap:anywhere;line-height:1.3}
  .company-support96 small {font-size:10px;line-height:1.3}
  .company-support96 button {width:auto;min-height:34px;max-width:112px;padding:5px 8px;font-size:0;line-height:1.2}
  .company-support96 button::after {content:'Administración';font-size:10px}
  #content .page-header5:not(.dashboard-welcome) {display:grid!important;grid-template-columns:minmax(0,1fr);align-items:center!important;gap:6px!important;margin:0 0 9px!important;min-height:0!important;padding:2px 0!important}
  #content .page-header5:not(.dashboard-welcome) .page-header5__identity {display:block!important;min-width:0}
  #content .page-header5:not(.dashboard-welcome) :is(.page-header5__icon,.page-header5__eyebrow,.page-header5__accent,.page-header5__subtitle) {display:none!important}
  #content .page-header5:not(.dashboard-welcome) .page-header5__title {font-size:18px!important;line-height:1.25!important;letter-spacing:-.25px!important}
  #content .page-header5:not(.dashboard-welcome) .page-header5__actions {width:100%!important;max-width:100%!important;min-width:0;margin:0!important;display:flex!important;flex-wrap:nowrap!important;justify-content:flex-start!important;gap:6px!important;overflow-x:auto;scrollbar-width:thin}
  #content .page-header5:not(.dashboard-welcome) .page-header5__actions>button {flex:0 0 auto;min-height:36px!important;padding:7px 10px!important;font-size:11px!important;white-space:nowrap}
  #content .page-header5:not(.dashboard-welcome):has(.page-header5__actions>button:only-child) {grid-template-columns:minmax(0,1fr) auto}
  #content .page-header5:not(.dashboard-welcome):has(.page-header5__actions>button:only-child) .page-header5__actions {width:auto!important;max-width:min(60vw,220px)!important}
  body #content .card {margin-bottom:10px}
  body #content .card-head {padding:9px 12px!important}
  body #content .card-head h2 {font-size:14px;line-height:1.3}
  body #content .card-body {padding:11px 12px!important}
  #content .module-tabs {margin-bottom:9px;gap:3px;padding:3px}
  #content .module-tabs button {min-height:34px;padding:6px 9px;font-size:11px}
  #content #list-filter {display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center!important;gap:6px!important;padding:8px 10px!important}
  #content #list-filter .filter-search {width:100%;min-width:0;min-height:36px;flex-basis:auto}
  #content #list-filter .filter-search input {min-height:34px!important}
  #content #list-filter>button {min-height:36px;padding:6px 9px}
  #content :is(.kpis,.company-stats95) {gap:7px!important;margin-bottom:10px!important}
  #content .kpis>.kpi {min-height:76px!important;padding:9px 10px!important}
  #content .kpis>.kpi .kpi-icon {display:none!important}
  #content .kpis>.kpi strong {font-size:17px!important;line-height:1.2!important}
  #content .kpis>.kpi :is(small,.caption) {font-size:10px!important;line-height:1.25!important}
  #content .invoice-filters5 {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px!important;padding:9px 10px!important}
  #content .invoice-filters5>label:first-child,#content .invoice-filters5>.invoice-filter-more5,#content .invoice-filters5>.actions {grid-column:1/-1}
  #content .invoice-filters5>label {min-width:0!important;font-size:10px;line-height:1.25}
  #content .invoice-filters5 input {min-height:36px!important}
  #content .invoice-filter-more5>summary {min-height:28px}
  #content .notes-category-tabs5 {scrollbar-width:none}
  #content .notes-category-tabs5::-webkit-scrollbar {display:none}
  #content .table-wrap.pr-table82:has(td[colspan]) {overflow:visible!important}
  #content .table-wrap.pr-table82:has(td[colspan]) table {min-width:0!important;width:100%!important}
  #content .table-wrap.pr-table82:has(td[colspan]) thead {display:none!important}
  #content .table-wrap.pr-table82:has(td[colspan]) :is(tbody,tr,td[colspan]) {display:block!important;width:100%!important;min-width:0!important}
  #content .table-wrap.pr-table82:has(td[colspan]) td[colspan] {padding:0!important;border:0!important}
  #content .table-wrap.pr-table82:has(td[colspan]) td[colspan]::before {display:none!important}
  #content .table-wrap.pr-table82:has(td[colspan]) .empty {padding:20px 12px!important}
  /* dataTable() labels its cells; other tables retain their horizontal scroll. */
  #content .table-wrap:not(.keep-table):has(tbody td[data-label]) {overflow:visible!important}
  #content .table-wrap:not(.keep-table):has(tbody td[data-label]) :is(table,tbody,tr,td) {display:block!important;width:100%!important;min-width:0!important;max-width:100%!important}
  #content .table-wrap:not(.keep-table):has(tbody td[data-label]) thead {display:none!important}
  #content .table-wrap:not(.keep-table):has(tbody td[data-label]) tr {padding:9px 12px!important;border-bottom:1px solid var(--border)}
  #content .table-wrap:not(.keep-table):has(tbody td[data-label]) td {display:grid!important;grid-template-columns:minmax(78px,31%) minmax(0,1fr);align-items:start;gap:8px;padding:3px 0!important;border:0!important;text-align:left!important;white-space:normal!important;overflow-wrap:anywhere;font-size:11px;line-height:1.35}
  #content .table-wrap:not(.keep-table):has(tbody td[data-label]) td::before {content:attr(data-label);display:block;padding:0;font-size:10px;color:var(--muted);text-align:left;overflow-wrap:anywhere}
  #content .table-wrap:not(.keep-table):has(tbody td[data-label]) td:first-child {display:block!important;padding-bottom:6px!important;font-weight:700}
  #content .table-wrap:not(.keep-table):has(tbody td[data-label]) td:first-child::before {display:none}
  #content .table-wrap:not(.keep-table):has(tbody td[data-label]) td:has(>button) {display:flex!important;flex-wrap:wrap;gap:5px}
  #content .table-wrap:not(.keep-table):has(tbody td[data-label]) td:has(>button)::before {flex:0 0 31%}
  #content .table-wrap:not(.keep-table):has(tbody td[data-label]) td:has(>button) button {min-height:32px;padding:5px 8px;font-size:10px}
  #aidron-chat38 {right:10px;bottom:94px}
  #aidron-chat38 .aidron-launch38 {width:48px;height:48px;padding:2px;border-radius:50%;overflow:hidden;justify-content:center}
  #aidron-chat38 .aidron-launch38 img {width:40px;height:40px}
  #aidron-chat38 .aidron-launch38 span {display:none}
  #aidron-chat38 .aidron-chat-panel38 {bottom:56px}
  .platform-shell .topbar .platform-user {display:none!important}
  .platform-shell #content .kpis {grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .platform-shell #content #platform-search {display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:6px;padding:7px 10px!important}
  .platform-shell #content #platform-search>label {min-width:0;max-width:none;margin:0;font-size:10px;line-height:1.25}
  .platform-shell #content #platform-search input {min-height:34px!important;margin-top:3px}
  .platform-shell #content #platform-search>button {min-height:34px;padding:6px 9px}
  .platform-shell #content .company-stats95 {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  .platform-shell #content .company-stats95 .card {display:block;min-height:72px;padding:9px 10px!important;margin:0}
  .platform-shell #content .company-stats95 .card>span {display:none}
  .platform-shell #content .company-stats95 strong {font-size:17px!important}
  .platform-shell #content .company-stats95 small {font-size:10px;line-height:1.25;margin-top:3px}
  .platform-shell #content .company-filters95 {gap:7px;padding:9px 10px!important}
  .platform-shell #content .company-filters95 label {font-size:10px}
  .platform-shell #content .company-filters95 :is(input,select,button) {min-height:35px;font-size:11px}
  .platform-shell #content .company-filters95 button:last-child {grid-column:auto}
  .platform-shell #content .company-filter-more130 {grid-column:1;min-width:0;align-self:stretch;border:1px solid var(--border);border-radius:8px;background:var(--card)}
  .platform-shell #content .company-filter-more130>summary {display:flex;align-items:center;min-height:35px;padding:6px 9px;cursor:pointer;list-style:none;font-size:11px;font-weight:650}
  .platform-shell #content .company-filter-more130>summary::-webkit-details-marker {display:none}
  .platform-shell #content .company-filter-more130[open] {grid-column:1/-1}
  .platform-shell #content .company-filter-more130>div {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:8px}
  .platform-shell #content .company-filter-more130>div>label:first-child {grid-column:1/-1}
  .platform-shell #content .company-filter-more130>div>button {grid-column:1/-1}
  .platform-shell #content .company-directory95 .table-wrap {overflow:visible!important}
  .platform-shell #content .company-directory95 table {display:block;width:100%!important;min-width:0!important}
  .platform-shell #content .company-directory95 thead {display:none!important}
  .platform-shell #content .company-directory95 tbody {display:block;width:100%}
  .platform-shell #content .company-directory95 tr {display:block;width:100%;padding:9px 11px;border-bottom:1px solid var(--border)}
  .platform-shell #content .company-directory95 td:not([colspan]) {display:grid;width:100%;min-width:0;max-width:100%;grid-template-columns:minmax(75px,32%) minmax(0,1fr);gap:7px;padding:3px 0!important;border:0!important;text-align:left!important;white-space:normal!important;overflow-wrap:anywhere;font-size:11px!important;line-height:1.3}
  .platform-shell #content .company-directory95 td:not([colspan])::before {font-size:10px;color:var(--muted)}
  .platform-shell #content .company-directory95 td:first-child:not([colspan]) {display:block;padding-bottom:7px!important}
  .platform-shell #content .company-directory95 td:nth-child(2)::before {content:'Empresa'}
  .platform-shell #content .company-directory95 td:nth-child(3)::before {content:'Rol'}
  .platform-shell #content .company-directory95 td:nth-child(4)::before {content:'Estado'}
  .platform-shell #content .company-directory95 td:nth-child(5)::before {content:'Último acceso'}
  .platform-shell #content .company-directory95 td:nth-child(6)::before {content:'Acciones'}
  .platform-shell #content .company-directory95 td:not([colspan]) small {grid-column:2;font-size:10px;line-height:1.25;margin:0}
  .platform-shell #content .company-directory95 .company-person95 {min-width:0;align-items:start}
  .platform-shell #content .company-directory95 .company-avatar95 {display:none}
  .platform-shell #content .company-directory95 .company-role95,.platform-shell #content .company-directory95 .company-status95 {white-space:normal;font-size:10px;padding:3px 6px}
  .platform-shell #content .company-directory95 td[colspan] {display:block!important;width:100%!important;min-width:0!important;padding:16px!important}
}
@media (min-width:601px) {
  .platform-shell #content .company-filter-more130 {min-width:0;align-self:end}
  .platform-shell #content .company-filter-more130>summary {display:none}
  .platform-shell #content .company-filter-more130>div {display:grid;align-items:end;gap:10px}
  .platform-shell #content .company-filter-more130>div>label {min-width:0}
  .platform-shell #content .company-filter-more130>div>button {white-space:nowrap}
}
@media (min-width:1201px) {
  .platform-shell #content .company-filter-more130 {grid-column:span 4}
  .platform-shell #content .company-filter-more130>div {grid-template-columns:minmax(180px,1fr) minmax(140px,1fr) minmax(140px,1fr) auto}
}
@media (min-width:721px) and (max-width:1200px) {
  .platform-shell #content .company-filter-more130 {grid-column:span 2}
  .platform-shell #content .company-filter-more130>div {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:601px) and (max-width:720px) {
  .platform-shell #content .company-filter-more130 {grid-column:1/-1}
  .platform-shell #content .company-filter-more130>div {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:360px) {
  .shell .topbar {display:flex!important;flex-wrap:nowrap!important;height:56px!important;min-height:56px!important;padding:0 6px!important;gap:4px!important}
  .shell .topbar .left {flex:0 0 30px!important;width:30px!important;min-width:30px!important}
  .shell .topbar .right {display:flex!important;flex:1 1 auto!important;flex-wrap:nowrap!important;justify-content:flex-end!important;gap:4px!important;min-width:0!important}
  .shell .topbar .company-wrap5 {flex:0 1 96px!important;width:96px!important;min-width:0!important}
  .shell .topbar .company-menu5 {width:96px!important;max-width:96px!important;min-width:0!important;padding:5px!important}
  .shell .topbar .right>button,.shell .topbar .administration-trigger5 {width:31px!important;min-width:31px!important;padding:5px!important}
  .shell .topbar .administration-wrap5 {flex:0 0 31px!important;width:31px!important}
  .shell .topbar .profile-wrap5 {flex:0 0 36px!important;width:36px!important}
  .shell .topbar .profile-button5 {width:36px!important;min-width:36px!important;padding:3px!important}
  .shell .topbar .profile-button5>small {display:none!important}
}
