/* Panel administrativo adaptable. La navegación deja de ser una fila
   desplazable y se convierte en menú compacto en teléfonos. */
.admin-mobile-bar{display:flex;flex-direction:column;gap:.75rem}
.admin-mobile-bar .brand{min-width:0}
.admin-current-section,.admin-menu-toggle{display:none}
.admin-nav{display:flex;flex-direction:column;gap:.3rem}
.admin-nav .text-link{width:100%;margin-top:.3rem;text-align:left}

@media(max-width:760px){
  body.admin-mode{overflow-x:hidden}
  body.admin-mode main{width:100%;min-width:0}
  body.admin-mode .admin{display:block;width:100%;min-width:0;overflow:visible}
  body.admin-mode .admin>aside{position:sticky;top:0;z-index:40;display:block!important;width:100%;padding:.6rem .75rem;background:#061d31;border-bottom:1px solid #315e7e;box-shadow:0 8px 22px rgba(1,21,35,.2);overflow:visible;white-space:normal}
  body.admin-mode .admin-mobile-bar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.65rem}
  body.admin-mode .admin-mobile-bar .brand{display:flex;margin:0;gap:.45rem}
  body.admin-mode .admin-mobile-bar .brand-logo{width:38px;height:38px}
  body.admin-mode .admin-mobile-bar .brand>span{display:none}
  body.admin-mode .admin-current-section{display:block;min-width:0;color:#fff;font-size:.9rem;font-weight:800;line-height:1.15;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  body.admin-mode .admin-menu-toggle{display:inline-flex;align-items:center;justify-content:center;gap:.38rem;min-height:42px;padding:.55rem .7rem;border:1px solid #5d8cab;border-radius:10px;background:#0d3b59;color:#fff;font:inherit;font-size:.86rem;font-weight:800;cursor:pointer}
  body.admin-mode .admin-menu-toggle>span:first-child{font-size:1.2rem;line-height:1}
  body.admin-mode .admin-nav{display:none;grid-template-columns:1fr;gap:.35rem;max-height:calc(100dvh - 68px);padding:.7rem 0 .15rem;overflow-y:auto;overscroll-behavior:contain}
  body.admin-mode .admin-menu-open .admin-nav{display:grid}
  body.admin-mode .admin-nav a,body.admin-mode .admin-nav button{display:block;width:100%;min-height:44px;padding:.7rem .8rem;border:1px solid transparent;border-radius:9px;color:#e4f3fc;background:transparent;font:inherit;font-size:.92rem;text-align:left;text-decoration:none;white-space:normal}
  body.admin-mode .admin-nav a.selected{border-color:#4b86ac;background:#124d70;color:#fff}
  body.admin-mode .admin-nav .text-link{margin:0;border-color:#805257;color:#ffd9dc;background:#3b2028}

  body.admin-mode .admin>main,body.admin-mode .admin-main{width:100%;max-width:100%;min-width:0;padding:1rem .8rem 2rem;margin:0}
  body.admin-mode .admin-heading{margin-bottom:1rem}
  body.admin-mode .admin h1,body.admin-mode .admin-main h1{max-width:100%;margin:.15rem 0 1rem;font-size:clamp(1.75rem,8vw,2.15rem);line-height:1.08;letter-spacing:-.035em;overflow-wrap:anywhere}
  body.admin-mode .admin h2,body.admin-mode .admin-main h2{font-size:clamp(1.25rem,6vw,1.65rem);line-height:1.15;overflow-wrap:anywhere}
  body.admin-mode .admin h3,body.admin-mode .admin-main h3{font-size:1.05rem;overflow-wrap:anywhere}
  body.admin-mode .eyebrow{font-size:.7rem;letter-spacing:.09em}
  body.admin-mode .admin-heading>p,body.admin-mode p{overflow-wrap:anywhere}

  body.admin-mode .stat-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem;margin-bottom:1rem}
  body.admin-mode .stat-grid>div{min-width:0;padding:.8rem .65rem;border-radius:12px}
  body.admin-mode .stat-grid strong{font-size:1.55rem;line-height:1}
  body.admin-mode .stat-grid span{display:block;margin-top:.45rem;font-size:.72rem;line-height:1.2;overflow-wrap:anywhere}

  body.admin-mode .admin-panel,body.admin-mode .admin-card,body.admin-mode .form-card{width:100%;max-width:100%;min-width:0;padding:.9rem;border-radius:14px}
  body.admin-mode .admin-panel{margin-bottom:.85rem}
  body.admin-mode .section-head{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:.55rem;margin-bottom:1rem}
  body.admin-mode .section-head>*{min-width:0}
  body.admin-mode .section-head .buttons,body.admin-mode .section-head .row-actions{margin-top:0}
  body.admin-mode .idea{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem}
  body.admin-mode .idea aside{padding:1rem}
  body.admin-mode .options,body.admin-mode .admin-form-grid{grid-template-columns:minmax(0,1fr);gap:.75rem}
  body.admin-mode .field.full{grid-column:auto}

  body.admin-mode .filters,body.admin-mode #request-filters{display:grid;grid-template-columns:minmax(0,1fr);gap:.65rem;width:100%;padding:.8rem;margin:1rem 0}
  body.admin-mode .filters input,body.admin-mode .filters select,body.admin-mode .filters label,body.admin-mode #request-filters input,body.admin-mode #request-filters select,body.admin-mode #request-filters label{width:100%;min-width:0}
  body.admin-mode .filters label,body.admin-mode #request-filters label{display:grid;gap:.25rem}

  body.admin-mode .proposal-row{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:.7rem;width:100%;padding:.85rem}
  body.admin-mode .proposal-row>img{width:72px;height:72px}
  body.admin-mode .proposal-row>div,body.admin-mode .proposal-row>.row-actions{width:100%;min-width:0}
  body.admin-mode .proposal-row>.text-link,body.admin-mode .proposal-row>.button{width:100%;text-align:center}
  body.admin-mode .proposal-row>.row-actions{display:grid;grid-template-columns:1fr}
  body.admin-mode .proposal-row>.row-actions button,body.admin-mode .proposal-row form button{width:100%}
  body.admin-mode .proposal-row form{display:grid;grid-template-columns:minmax(0,1fr);width:100%}
  body.admin-mode .proposal-row form input,body.admin-mode .proposal-row form select{width:100%;max-width:100%}

  body.admin-mode .buttons,body.admin-mode .row-actions,body.admin-mode .order-actions,body.admin-mode .quote-history-actions{gap:.5rem}
  body.admin-mode .buttons .button,body.admin-mode .buttons button,body.admin-mode .row-actions button{flex:1 1 100%;width:100%;margin:0;text-align:center}
  body.admin-mode button,body.admin-mode .button{max-width:100%;white-space:normal}
  body.admin-mode table{min-width:620px}
  body.admin-mode .table-wrap,body.admin-mode .admin-table-wrap,body.admin-mode .responsive-table{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  body.admin-mode pre,body.admin-mode code{white-space:pre-wrap;overflow-wrap:anywhere}

  body.admin-mode .admin-list>div{grid-template-columns:minmax(0,1fr);align-items:start;gap:.45rem;padding:.75rem 0}
  body.admin-mode .admin-list small{grid-column:auto}
  body.admin-mode .printer-profile-card,body.admin-mode .material-color-row{align-items:flex-start;flex-direction:column}
  body.admin-mode .printer-profile-card .row-actions,body.admin-mode .material-color-row .row-actions{width:100%}
}

@media(max-width:390px){
  body.admin-mode .stat-grid{grid-template-columns:1fr}
  body.admin-mode .stat-grid>div{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:.75rem}
  body.admin-mode .stat-grid span{margin:0;font-size:.8rem}
}
