:root{
  --bg:#0a0d16;
  --card:#121826;
  --muted:#8b9bb4;
  --text:#f1f5f9;
  --line:rgba(255,255,255,.08);
  --primary:#f59e0b;
  --primary-strong:#f97316;
  --danger:#ff4d4d;
  --success:#34d399;
  --warn:#fbbf24;
  --white:#ffffff;
  --font-sans:"Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono:"JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: var(--font-sans);
  background:
    radial-gradient(1000px 500px at 8% -10%, rgba(245,158,11,.12) 0%, transparent 55%),
    radial-gradient(900px 480px at 90% 0%, rgba(56,189,248,.08) 0%, transparent 50%),
    var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
}
a{color:inherit}

.container{max-width:1200px;margin:0 auto;padding:0 16px}
.page{padding:22px 0 40px}

.topbar{
  position:sticky;top:0;z-index:10;
  background: rgba(10,13,22,.9);
  backdrop-filter: blur(14px);
  border-bottom:1px solid rgba(255,255,255,.06);
}
.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 0;
}
.topbar__brand-block{display:flex;align-items:center;gap:10px;min-width:0}
.brand{
  display:inline-flex;align-items:center;gap:8px;
  font-weight:800;text-decoration:none;letter-spacing:.2px;white-space:nowrap;
}
.brand__icon{color:var(--primary);font-size:18px}
.role-badge{
  display:inline-flex;align-items:center;
  padding:3px 8px;border-radius:999px;
  background:rgba(52,211,153,.14);
  border:1px solid rgba(52,211,153,.35);
  color:var(--success);
  font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;
}
.role-badge--admin{
  background:rgba(245,158,11,.14);
  border-color:rgba(245,158,11,.4);
  color:var(--primary);
}
.topbar__actions{display:flex;align-items:center;gap:10px;margin-left:auto}
.topbar__user{display:flex;align-items:center;gap:8px}
.topbar__username{
  display:inline-flex;align-items:center;gap:6px;
  color:var(--muted);font-size:13px;font-weight:600;
}
.topbar__logout{white-space:nowrap}
.buyer-tabs{display:flex;gap:6px;align-items:center}
.buyer-tab{
  display:inline-flex;align-items:center;gap:6px;
  padding:8px 12px;border-radius:999px;
  text-decoration:none;color:var(--muted);
  border:1px solid transparent;font-size:13px;font-weight:600;
}
.buyer-tab.is-active{
  background:var(--primary);
  color:#1a1205;
  border-color:rgba(255,255,255,.2);
}
.buyer-tab:not(.is-active):hover{background:rgba(255,255,255,.06);color:var(--text)}
.nav{display:flex;gap:10px;align-items:center}
.nav__link{text-decoration:none;padding:8px 10px;border-radius:10px;color:var(--muted)}
.nav__link:hover{background:rgba(255,255,255,.05);color:var(--text)}
.nav__form{margin:0}
.nav-toggle{display:none}
.nav-toggle__icon{
  width:18px;height:12px;display:inline-block;position:relative;
}
.nav-toggle__icon:before,
.nav-toggle__icon:after,
.nav-toggle__icon{
  border-top:2px solid rgba(232,240,255,.9);
}
.nav-toggle__icon:before,
.nav-toggle__icon:after{
  content:"";position:absolute;left:0;right:0;
}
.nav-toggle__icon:before{top:4px}
.nav-toggle__icon:after{top:8px}
.nav-backdrop{display:none}

@media (max-width: 900px){
  .buyer-tabs--desktop,
  .topbar__user--desktop{display:none}
  .role-badge{font-size:9px;padding:2px 6px}

  body.role-buyer .nav-toggle{display:inline-flex}
  body.role-buyer .nav--buyer{
    position:fixed;
    top:56px; right:12px;
    width:min(320px, calc(100vw - 24px));
    padding:12px;
    flex-direction:column;
    align-items:stretch;
    gap:6px;
    border-radius:14px;
    background: rgba(10,18,34,.96);
    border:1px solid rgba(255,255,255,.10);
    box-shadow: 0 18px 50px rgba(0,0,0,.45);
    transform: translateY(-8px);
    opacity:0;
    pointer-events:none;
    transition: opacity .15s ease, transform .15s ease;
    z-index: 50;
    display:flex;
  }
  body.role-buyer .nav__link{color:var(--text)}
  body.role-buyer .nav__link.is-active{
    background:rgba(245,158,11,.18);
    color:var(--primary);
  }
  body.role-buyer .nav__user{
    display:flex;align-items:center;gap:8px;
    padding:10px 10px 6px;
    color:var(--muted);font-size:13px;font-weight:600;
    border-top:1px solid rgba(255,255,255,.08);
    margin-top:4px;
  }
  body.role-buyer.nav-open .nav--buyer{
    opacity:1;
    transform: translateY(0);
    pointer-events:auto;
  }
  body.role-buyer .nav-backdrop{
    display:block;
    position:fixed;
    inset:0;
    background: rgba(0,0,0,.35);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
  }
  body.role-buyer.nav-open .nav-backdrop{
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 820px){
  body.role-admin .nav-toggle{display:inline-flex}
  body.role-admin .nav{
    position:fixed;
    top:56px; right:12px;
    width:min(320px, calc(100vw - 24px));
    padding:12px;
    flex-direction:column;
    align-items:stretch;
    gap:6px;
    border-radius:14px;
    background: rgba(10,18,34,.96);
    border:1px solid rgba(255,255,255,.10);
    box-shadow: 0 18px 50px rgba(0,0,0,.45);
    transform: translateY(-8px);
    opacity:0;
    pointer-events:none;
    transition: opacity .15s ease, transform .15s ease;
    z-index: 50;
  }
  body.role-admin .nav__link{color:var(--text)}
  body.role-admin.nav-open .nav{
    opacity:1;
    transform: translateY(0);
    pointer-events:auto;
  }
  body.role-admin .nav-backdrop{
    display:block;
    position:fixed;
    inset:0;
    background: rgba(0,0,0,.35);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
  }
  body.role-admin.nav-open .nav-backdrop{
    opacity: 1;
    pointer-events: auto;
  }
}

/* Mobile table fixes: avoid sticky overlap */
@media (max-width: 600px){
  .page{padding:14px 0 26px}
  .pagehead{flex-direction:column;align-items:stretch}
  .pagehead__actions{justify-content:flex-start}

  .table{min-width:0}
  .table th,.table td{padding:8px 8px}

  .matrix{min-width:900px}
  .matrix th{position:static}
  .sticky-col,.sticky-col-desc,.sticky-col2{
    position:static;
    background:transparent;
    z-index:auto;
    min-width:auto;
    max-width:none;
  }
}

.card{
  background: rgba(18,24,38,.92);
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  padding:16px;
  box-shadow: 0 12px 36px rgba(0,0,0,.28);
}

.h1{margin:0 0 8px;font-size:22px;letter-spacing:-.02em}
.h2{margin:0 0 10px;font-size:16px}
.muted{color:var(--muted)}

.pagehead{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}
.pagehead__actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.inline{display:flex;gap:8px;align-items:center;margin:0}

.grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media (max-width: 980px){.grid2{grid-template-columns:1fr}}

.form{display:flex;flex-direction:column;gap:12px}
.label{display:flex;flex-direction:column;gap:6px;color:var(--muted);font-size:13px}
.input{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.28);
  color:var(--text);
  outline:none;
  font-family:var(--font-mono);
}
.input:focus{border-color:rgba(245,158,11,.7); box-shadow:0 0 0 3px rgba(245,158,11,.18)}
.input--sm{padding:8px 10px;border-radius:10px}
.input[readonly]{
  opacity:.72;
  cursor:default;
  color:rgba(241,245,249,.78);
  background:rgba(0,0,0,.18);
}

.btn{
  display:inline-flex;align-items:center;gap:8px;
  padding:10px 12px;border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color:var(--text);
  cursor:pointer;
  font-family:var(--font-sans);
  font-weight:600;
}
.btn:hover{background: rgba(255,255,255,.09)}
.btn--primary{
  /*background: linear-gradient(180deg, rgba(249,115,22,.95), rgba(245,158,11,.9));*/
  background: #FE9A00;
  border-color: rgba(255, 255, 255,.55);
  color:#1a1205;
}
.btn--primary:hover{filter:brightness(1.05)}
.btn--ghost{background:transparent}
.btn--sm{padding:8px 10px;border-radius:10px;font-size:13px}

.alert{padding:12px 14px;border-radius:12px;margin-bottom:14px;border:1px solid rgba(255,255,255,.10)}
.alert--danger{background: rgba(255,77,77,.12); border-color: rgba(255,77,77,.35)}
.alert--success{background: rgba(38,209,139,.10); border-color: rgba(38,209,139,.35)}
.alert--warning{background: rgba(255,200,87,.10); border-color: rgba(255,200,87,.35)}

.table-scroll{overflow:auto;border-radius:12px;border:1px solid rgba(255,255,255,.06)}
.table{width:100%;border-collapse:collapse;min-width:760px;background:rgba(0,0,0,.15)}
.table th,.table td{padding:10px 10px;border-bottom:1px solid rgba(255,255,255,.06);vertical-align:middle}
.table th{color:var(--muted);font-weight:700;text-transform:uppercase;font-size:11px;letter-spacing:.6px}
.table tr:hover td{background:rgba(255,255,255,.03)}
.right{text-align:right}
.pill{display:inline-block;padding:4px 8px;border-radius:999px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.08);font-size:12px;color:var(--muted)}
.cat-row td{background:rgba(38,209,139,.10);color:var(--text);font-weight:800}
.matrix .cat-row .sticky-col{background:rgba(20,40,36,.98)}

.actions{display:flex;gap:10px;justify-content:flex-end;margin-top:12px;flex-wrap:wrap}
.actions--sticky{
  position:sticky;top:58px;z-index:5;
  margin:0 0 14px;padding:10px 12px;
  justify-content:flex-start;
  background:rgba(10,18,34,.92);
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  backdrop-filter:blur(8px);
}
.table-actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.table-actions .inline{margin:0}
.qty-input{text-align:right}

/* Admin matrix */
.matrix{width:100%;border-collapse:collapse;min-width:1200px;background:rgba(0,0,0,.15)}
.matrix th,.matrix td{
  padding:10px 12px;
  border-bottom:1px solid rgba(255,255,255,.06);
  border-right:1px solid rgba(255,255,255,.05);
  white-space:nowrap;
  font-size:13px;
  line-height:1.35;
}
.matrix th{
  position:sticky;top:0;
  background:rgba(10,13,22,.96);
  z-index:2;
  color:var(--muted);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.55px;
  font-weight:700;
}
.matrix--pwa td{vertical-align:middle}
.sticky-col{
  position:sticky;left:0;z-index:3;
  background:rgba(10,13,22,.96);
  min-width:78px;
}
.sticky-col-desc{
  position:sticky;left:78px;z-index:3;
  background:rgba(10,13,22,.96);
  min-width:240px;
  max-width:320px;
  white-space:normal;
}
.sticky-col2{position:sticky;left:280px;z-index:3;background:rgba(10,13,22,.96);min-width:60px;text-align:center}
.matrix-col-code{min-width:78px}
.matrix-col-desc{min-width:240px}
.matrix-col-cat{min-width:100px;text-align:center}
.matrix-col-unit{min-width:72px;text-align:center;color:var(--muted);font-weight:600;letter-spacing:.02em}
.price-col{min-width:120px;text-align:right}
.client-col{
  min-width:100px;
  background:rgba(255,200,87,.08);
}
.matrix thead .client-col{background:rgba(255,200,87,.12)}
.qty-cell{text-align:center;color:rgba(255,255,255,.65);background:rgba(255,200,87,.05)}
.qty-cell--has{background: rgba(255,200,87,.14); color: var(--text); font-weight:700}

.matrix-code{
  font-family:var(--font-mono);
  color:var(--primary);
  font-weight:700;
  font-size:13px;
}
.matrix-desc{
  font-weight:700;
  color:var(--text);
  font-size:13px;
  letter-spacing:.01em;
}
.matrix-cat{
  display:inline-block;
  padding:3px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.10);
  color:var(--muted);
  font-size:11px;
  font-weight:600;
}
.matrix-price-wrap{
  display:inline-flex;
  align-items:center;
  gap:6px;
  justify-content:flex-end;
  width:100%;
}
.matrix-price-prefix{
  color:var(--muted);
  font-size:12px;
  font-weight:600;
}
.matrix--pwa .price-input{
  width:88px;
  max-width:88px;
  text-align:right;
  font-size:13px;
  font-weight:600;
}

@media (max-width: 600px){
  .sticky-col,.sticky-col-desc,.sticky-col2{
    position:static;
    background:transparent;
    z-index:auto;
    min-width:auto;
    max-width:none;
  }
}

.auth{display:flex;align-items:center;justify-content:center;min-height:65vh}
.auth__card{width:100%;max-width:420px}

/* Buscador de productos */
.search-bar{margin-bottom:12px}
.search-bar__hint{margin-top:8px;font-size:13px}

/* Badge producto manual */
.badge-manual{
  display:inline-block;
  padding:2px 6px;
  border-radius:6px;
  background:rgba(255,200,87,.18);
  border:1px solid rgba(255,200,87,.35);
  color:var(--warn);
  font-size:11px;
  font-weight:700;
  margin-right:6px;
}

/* Pills de estado */
.pill--success{background:rgba(38,209,139,.12);border-color:rgba(38,209,139,.35);color:var(--success)}
.pill--danger{background:rgba(255,77,77,.12);border-color:rgba(255,77,77,.35);color:var(--danger)}
.pill--warn{background:rgba(255,200,87,.12);border-color:rgba(255,200,87,.35);color:var(--warn)}

/* Modales */
.modal{
  position:fixed;inset:0;z-index:100;
  display:flex;align-items:center;justify-content:center;
  padding:16px;
  opacity:0;pointer-events:none;
  transition:opacity .15s ease;
}
.modal--open{opacity:1;pointer-events:auto}
.modal__backdrop{
  position:absolute;inset:0;
  background:rgba(0,0,0,.55);
}
.modal__dialog{
  position:relative;z-index:1;
  width:100%;max-width:520px;
  background:var(--card);
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  box-shadow:0 20px 60px rgba(0,0,0,.45);
  max-height:90vh;overflow:auto;
}
.modal__header{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 16px 0;
}
.modal__body{padding:12px 16px}
.modal__footer{
  display:flex;flex-wrap:wrap;gap:8px;
  padding:12px 16px 16px;
  justify-content:flex-end;
}
.modal__action-form{display:inline;margin:0}
body.modal-open{overflow:hidden}

.btn--loading{opacity:.75;cursor:wait}
.btn:disabled{opacity:.6;cursor:not-allowed}

textarea.input{resize:vertical;min-height:80px;font-family:inherit}

.label--checkbox{
  flex-direction:row;
  align-items:center;
  gap:10px;
  color:var(--text);
  cursor:pointer;
}
.label--checkbox input[type="checkbox"]{
  width:18px;height:18px;accent-color:var(--primary);
}

/* ===== Admin pedidos (estilo PWA) ===== */
.orders-admin__eyebrow{
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--primary);
  font-weight:700;
  margin-bottom:4px;
}
.orders-admin__date{align-items:flex-end}
.orders-admin__empty{padding:28px;text-align:center}
.order-card{margin-bottom:16px}
.order-card__head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:12px;
  flex-wrap:wrap;
}
.order-card__title{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  font-size:16px;
  font-weight:700;
  margin-bottom:4px;
}
.order-card__number{
  font-family:var(--font-mono);
  color:var(--primary);
}
.order-card__code{
  font-family:var(--font-mono);
  color:var(--primary);
  margin-left:4px;
}
.order-card__table{min-width:860px}
.order-card__field{max-width:130px;margin-left:auto}
.order-card__line-total{
  font-family:var(--font-mono);
  font-weight:600;
}
.order-card__total-row td{
  border-bottom:none;
  padding-top:14px;
}
.order-card__actions{justify-content:flex-end}
.order-card__hint{margin:10px 0 0;font-size:13px}
.order-card.is-editing .order-card__field{
  opacity:1;
  color:var(--primary);
  border-color:rgba(245,158,11,.45);
  background:rgba(245,158,11,.08);
}
.order-card.is-editing [data-edit-hint]{display:none}

/* ===== Comprador PWA ===== */
.page--buyer{padding-bottom:110px}
.buyer-app{width:100%}
.btn-label-short{display:none}
.nav--buyer{display:none}
.nav__user{display:none}

.buyer-hero{
  display:flex;justify-content:space-between;gap:16px;align-items:stretch;
  margin-bottom:12px;flex-wrap:wrap;
}
.buyer-hero__main{flex:1;min-width:240px}
.buyer-hero__title-row{display:flex;gap:12px;align-items:flex-start}
.buyer-hero__icon{
  width:40px;height:40px;border-radius:12px;
  display:inline-flex;align-items:center;justify-content:center;
  background:rgba(245,158,11,.14);color:var(--primary);font-size:18px;flex:0 0 auto;
}
.buyer-hero__title{margin:0 0 4px;font-size:20px}
.buyer-hero__sub{margin:0;font-size:13px;max-width:52ch}
.buyer-hero__meta{margin-top:12px;display:flex;flex-direction:column;gap:4px}
.buyer-meta-line{color:var(--muted);font-size:13px}
.buyer-meta-line b{color:var(--text)}
.buyer-meta-code,.buyer-order-number{font-family:var(--font-mono);color:var(--primary);font-weight:700}
.buyer-meta-sep{margin:0 4px;opacity:.6}
.buyer-date-box{
  min-width:210px;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.22);
  display:flex;flex-direction:column;gap:8px;justify-content:center;
}
.buyer-date-box__label{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:700}
.buyer-date-box__row{display:flex;gap:8px;align-items:center}

.buyer-toolbar{margin-bottom:12px}
.buyer-chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.buyer-chip{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  color:var(--muted);
  border-radius:999px;
  padding:8px 12px;
  font-size:12px;font-weight:700;
  cursor:pointer;
}
.buyer-chip.is-active{
  background:var(--primary);color:#1a1205;border-color:transparent;
}
.buyer-chip--action{
  border-color:rgba(245,158,11,.45);
  color:var(--primary);
  background:rgba(245,158,11,.08);
}
.buyer-chip__count{opacity:.8;font-weight:600}
.buyer-search{position:relative;margin:0}
.buyer-search__icon{
  position:absolute;left:12px;top:50%;transform:translateY(-50%);
  color:var(--muted);pointer-events:none;
}
.buyer-search .input{padding-left:38px}

.buyer-table-card{overflow:hidden}
.buyer-table-scroll{border:0;border-radius:12px;overflow-x:auto}
.buyer-table{
  min-width:920px;
  width:100%;
  font-size:13px;
  background:transparent;
}
.buyer-table th,
.buyer-table td{
  padding:12px 10px;
  vertical-align:middle;
}
.buyer-table th{
  font-size:11px;
  letter-spacing:.05em;
  text-align:center;
}
.buyer-table .buyer-col-code{text-align:center;width:90px}
.buyer-table .buyer-col-desc{text-align:left}
.buyer-table .buyer-col-cat,
.buyer-table .buyer-col-unit,
.buyer-table .buyer-col-price,
.buyer-table .buyer-col-qty{text-align:center}
.buyer-table .matrix-desc{
  display:inline-block;
  max-width:100%;
  text-align:left;
  line-height:1.35;
  white-space:normal;
}
.buyer-table .matrix-cat{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.buyer-unit{
  color:var(--muted);
  font-weight:600;
  letter-spacing:.04em;
}
.buyer-price{
  font-family:var(--font-mono);
  font-weight:600;
}
.buyer-table tr.has-qty td{background:rgba(245,158,11,.05)}
.buyer-table .cat-row td{text-align:left;padding-left:14px}
.buyer-manuals{margin-top:16px}
.buyer-empty{text-align:center;padding:36px 16px}
.buyer-empty__icon{font-size:34px;color:var(--muted);display:block;margin-bottom:8px}

.qty-stepper{
  display:inline-flex;align-items:center;justify-content:center;gap:4px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.25);
  border-radius:12px;padding:3px;
}
.qty-stepper__btn{
  width:32px;height:32px;border:0;border-radius:9px;
  background:rgba(255,255,255,.06);color:var(--text);
  font-size:18px;font-weight:700;cursor:pointer;line-height:1;
}
.qty-stepper__btn:hover{background:rgba(245,158,11,.2);color:var(--primary)}
.qty-stepper__input,
.buyer-table .qty-input.qty-stepper__input{
  width:56px;text-align:center;border:0;background:transparent;
  color:var(--primary);font-weight:700;padding:6px 4px;
}
.buyer-qty-readonly{font-family:var(--font-mono);font-weight:700;color:var(--primary)}

/* Footer: barra centrada al ancho del container (no full-bleed) */
.buyer-footer{
  position:fixed;
  left:50%;
  bottom:0;
  z-index:20;
  transform:translateX(-50%);
  width:min(1200px, calc(100% - 24px));
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  padding:12px 16px calc(12px + env(safe-area-inset-bottom));
  background:rgba(10,13,22,.94);
  border:1px solid rgba(255,255,255,.08);
  border-bottom:0;
  border-radius:16px 16px 0 0;
  backdrop-filter:blur(12px);
  box-sizing:border-box;
}
.buyer-footer__status{
  display:inline-flex;align-items:center;gap:8px;
  color:var(--muted);font-size:13px;
}
.buyer-footer__dot{
  width:8px;height:8px;border-radius:50%;
  background:var(--warn);box-shadow:0 0 0 4px rgba(251,191,36,.15);
}
.buyer-footer__actions{display:flex;gap:8px;flex-wrap:nowrap;margin-left:auto}

@media (max-width: 820px){
  .buyer-hero{flex-direction:column}
  .buyer-date-box{width:100%;min-width:0}
  .buyer-hero__title{font-size:18px}
  .buyer-hero__sub{display:none}

  /* Ocultar Categoría y Unidad en celular */
  .buyer-table .buyer-col-cat,
  .buyer-table .buyer-col-unit{display:none}
  .buyer-table{min-width:0;table-layout:fixed}
  .buyer-table .buyer-col-code{width:18%}
  .buyer-table .buyer-col-desc{width:34%}
  .buyer-table .buyer-col-price{width:20%}
  .buyer-table .buyer-col-qty{width:28%}
  .buyer-table .cat-row td{padding-left:10px}

  /* Footer móvil: status arriba, botones abajo sin solape */
  .buyer-footer{
    width:calc(100% - 12px);
    left:50%;
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    padding:10px 12px calc(10px + env(safe-area-inset-bottom));
    border-radius:14px 14px 0 0;
  }
  .buyer-footer__status{
    justify-content:center;
    width:100%;
    margin:0;
    font-size:12px;
  }
  .buyer-footer__actions{
    width:100%;
    margin:0;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
  }
  .buyer-footer__actions .btn{
    width:100%;
    justify-content:center;
    padding:10px 8px;
    font-size:13px;
    white-space:nowrap;
  }
  .btn-label-full{display:none}
  .btn-label-short{display:inline}
  .page--buyer{padding-bottom:130px}
  .qty-stepper__btn{width:30px;height:30px}
  .qty-stepper__input,
  .buyer-table .qty-input.qty-stepper__input{width:48px;padding:4px 2px}
}

