/* DICAMAT v2.5 — Design system UX/UI (visual only) */
:root{
  --blue:#1a6fdb;
  --blue-hover:#155fc0;
  --navy:#0f2744;
  --navy2:#163556;
  --navy-active:#1e4a73;
  --orange:#e85d04;
  --bg:#eef1f5;
  --card:#ffffff;
  --line:#e2e8f0;
  --ink:#1e293b;
  --muted:#64748b;
  --green:#0f8a5f;
  --red:#dc3b4a;
  --amber:#c47a12;
  --purple:#7c3aed;
  --shadow:0 2px 10px rgba(15,39,68,.07);
  --shadow-lg:0 8px 28px rgba(15,39,68,.12);
  --radius:10px;
  --radius-sm:8px;
  --space:8px;
  --touch:44px;
  --font:Inter,"Segoe UI",system-ui,-apple-system,sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font:14px/1.45 var(--font);
  background:var(--bg);
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
}
button,.btn{
  border:0;border-radius:var(--radius-sm);
  background:var(--blue);color:#fff;
  padding:10px 16px;cursor:pointer;
  text-decoration:none;display:inline-flex;
  align-items:center;justify-content:center;gap:6px;
  font-weight:600;font-family:inherit;font-size:14px;
  min-height:40px;transition:filter .15s,box-shadow .15s,background .15s;
  box-shadow:0 1px 2px rgba(15,39,68,.08);
}
button:hover,.btn:hover{filter:brightness(.96)}
button:focus-visible,.btn:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:2px solid var(--blue);outline-offset:2px;
}
button.secondary{
  background:#fff;color:#334155;border:1px solid var(--line);
  box-shadow:none;
}
button.danger{
  background:#fff;color:var(--red);border:1px solid #fecaca;
  box-shadow:none;
}
button.danger:hover{background:#fef2f2}
button.ghost{background:transparent;color:var(--muted);box-shadow:none;border:0}
input,select,textarea{
  width:100%;padding:11px 12px;
  border:1px solid #cbd5e1;border-radius:var(--radius-sm);
  background:#fff;color:var(--ink);font:inherit;
  transition:border-color .15s,box-shadow .15s;
}
input:focus,select:focus,textarea:focus{
  border-color:var(--blue);box-shadow:0 0 0 3px rgba(26,111,219,.15);outline:0;
}
textarea{min-height:84px;resize:vertical}
label{display:grid;gap:6px;color:#475569;font-size:12px;font-weight:700}

/* —— Login —— */
.login{
  min-height:100vh;display:grid;place-items:center;
  background:
    radial-gradient(ellipse at 20% 20%,rgba(26,111,219,.08),transparent 50%),
    radial-gradient(ellipse at 80% 80%,rgba(232,93,4,.06),transparent 45%),
    linear-gradient(160deg,#e8eef5,#f4f6f9 60%);
  padding:24px 16px;
}
.login .card{
  width:min(420px,94vw);
  padding:32px 28px;
  border-radius:14px;
  border:1px solid #e8edf3;
  box-shadow:var(--shadow-lg);
  background:var(--card);
}
.login form{display:grid;gap:14px}
.login .field{
  display:grid;grid-template-columns:40px 1fr;align-items:center;
  border:1px solid #cbd5e1;border-radius:var(--radius-sm);
  background:#fff;overflow:hidden;min-height:48px;
  transition:border-color .15s,box-shadow .15s;
}
.login .field:focus-within{
  border-color:var(--blue);box-shadow:0 0 0 3px rgba(26,111,219,.15);
}
.login .field .field-ico{
  display:grid;place-items:center;height:100%;color:var(--muted);
  background:#f8fafc;border-right:1px solid var(--line);
}
.login .field input{
  border:0;box-shadow:none;border-radius:0;min-height:48px;padding:12px 14px;
}
.login .field input:focus{box-shadow:none;outline:0}
.login button[type="submit"],.login form>button{
  width:100%;min-height:48px;font-size:15px;margin-top:4px;border-radius:var(--radius-sm);
}
.login p{color:var(--muted);text-align:center;margin:0 0 8px}
.login .error{color:var(--red);text-align:left;min-height:1.2em;margin:0}

/* —— Shell / Sidebar —— */
.shell{display:grid;grid-template-columns:248px 1fr;min-height:100vh}
.side{
  background:linear-gradient(180deg,var(--navy),#0c1f36);
  color:#fff;padding:16px 10px;
  position:sticky;top:0;height:100vh;overflow:auto;
  display:flex;flex-direction:column;
}
.brand{padding:4px 10px 18px}
.brand strong{display:block;font-size:22px;letter-spacing:.5px}
.brand small{display:block;color:#93a9c0;font-size:11px;line-height:1.35}
.side-nav{display:flex;flex-direction:column;gap:2px;flex:1}
.side button{
  display:flex;width:100%;text-align:left;
  background:transparent;margin:0;border-radius:8px;
  color:#d5e3f0;justify-content:flex-start;align-items:center;
  gap:10px;padding:10px 12px;min-height:40px;
  box-shadow:none;font-weight:500;
}
.side button:hover{background:rgba(255,255,255,.06)}
.side button.active{
  background:var(--navy-active);color:#fff;
  box-shadow:inset 3px 0 0 var(--orange);
  font-weight:600;
}
.side .exit{
  margin-top:16px;border-top:1px solid rgba(255,255,255,.12);
  border-radius:0;padding-top:14px;color:#fca5a5;
}
.side .exit:hover{background:rgba(220,59,74,.12);color:#fecaca}
.nav-ico{
  width:18px;height:18px;flex-shrink:0;opacity:.9;
  display:inline-block;
  background:currentColor;
  mask-size:contain;mask-repeat:no-repeat;mask-position:center;
  -webkit-mask-size:contain;-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;
}
.nav-ico[data-ico="dashboard"]{mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E")}
.nav-ico[data-ico="quotes"]{mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E")}
.nav-ico[data-ico="orders"]{mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3C/svg%3E")}
.nav-ico[data-ico="delivery"]{mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='1' y='3' width='15' height='13'/%3E%3Cpolygon points='16 8 20 8 23 11 23 16 16 16 16 8'/%3E%3Ccircle cx='5.5' cy='18.5' r='2.5'/%3E%3Ccircle cx='18.5' cy='18.5' r='2.5'/%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='1' y='3' width='15' height='13'/%3E%3Cpolygon points='16 8 20 8 23 11 23 16 16 16 16 8'/%3E%3Ccircle cx='5.5' cy='18.5' r='2.5'/%3E%3Ccircle cx='18.5' cy='18.5' r='2.5'/%3E%3C/svg%3E")}
.nav-ico[data-ico="clients"]{mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E")}
.nav-ico[data-ico="stock"]{mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpolyline points='3.27 6.96 12 12.01 20.73 6.96'/%3E%3Cline x1='12' y1='22.08' x2='12' y2='12'/%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpolyline points='3.27 6.96 12 12.01 20.73 6.96'/%3E%3Cline x1='12' y1='22.08' x2='12' y2='12'/%3E%3C/svg%3E")}
.nav-ico[data-ico="products"]{mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z'/%3E%3Cline x1='7' y1='7' x2='7.01' y2='7'/%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z'/%3E%3Cline x1='7' y1='7' x2='7.01' y2='7'/%3E%3C/svg%3E")}
.nav-ico[data-ico="compare"]{mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cline x1='18' y1='20' x2='18' y2='10'/%3E%3Cline x1='12' y1='20' x2='12' y2='4'/%3E%3Cline x1='6' y1='20' x2='6' y2='14'/%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cline x1='18' y1='20' x2='18' y2='10'/%3E%3Cline x1='12' y1='20' x2='12' y2='4'/%3E%3Cline x1='6' y1='20' x2='6' y2='14'/%3E%3C/svg%3E")}
.nav-ico[data-ico="movements"]{mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpolyline points='17 1 21 5 17 9'/%3E%3Cpath d='M3 11V9a4 4 0 0 1 4-4h14'/%3E%3Cpolyline points='7 23 3 19 7 15'/%3E%3Cpath d='M21 13v2a4 4 0 0 1-4 4H3'/%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpolyline points='17 1 21 5 17 9'/%3E%3Cpath d='M3 11V9a4 4 0 0 1 4-4h14'/%3E%3Cpolyline points='7 23 3 19 7 15'/%3E%3Cpath d='M21 13v2a4 4 0 0 1-4 4H3'/%3E%3C/svg%3E")}
.nav-ico[data-ico="suppliers"]{mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M5 21V7l8-4v18'/%3E%3Cpath d='M19 21V11l-6-4'/%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M5 21V7l8-4v18'/%3E%3Cpath d='M19 21V11l-6-4'/%3E%3C/svg%3E")}
.nav-ico[data-ico="users"]{mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4'/%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4'/%3E%3C/svg%3E")}

.main{padding:20px 24px 32px;min-width:0;background:var(--bg)}
.top{
  display:flex;justify-content:space-between;align-items:center;
  margin-bottom:18px;gap:12px;flex-wrap:wrap;
}
.top h1{font-size:22px;margin:0;font-weight:700;color:var(--navy);letter-spacing:-.02em}
.top-bar-right{display:flex;align-items:center;gap:10px;margin-left:auto}
.global-search{
  display:flex;align-items:center;gap:8px;
  background:#fff;border:1px solid var(--line);border-radius:999px;
  padding:0 14px;min-height:40px;min-width:min(320px,40vw);
  box-shadow:0 1px 2px rgba(15,39,68,.04);
}
.global-search input{
  border:0;box-shadow:none;padding:8px 0;min-height:0;background:transparent;
}
.global-search input:focus{box-shadow:none;outline:0}
.global-search .gs-ico{color:var(--muted);flex-shrink:0;font-size:14px}
.top-actions{display:flex;align-items:center;gap:8px}
.icon-btn{
  width:40px;height:40px;min-height:40px;padding:0;border-radius:999px;
  background:#fff;border:1px solid var(--line);color:var(--muted);
  box-shadow:none;
}
.user-chip{
  display:flex;align-items:center;gap:8px;
  background:#fff;border:1px solid var(--line);border-radius:999px;
  padding:4px 12px 4px 4px;min-height:40px;
}
.user-avatar{
  width:32px;height:32px;border-radius:999px;
  background:var(--blue);color:#fff;
  display:grid;place-items:center;font-size:11px;font-weight:700;
}
.user-chip .top-user{color:var(--muted);font-size:13px;white-space:nowrap}

/* —— Cards / KPIs —— */
.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.card{
  background:var(--card);border:1px solid var(--line);
  border-radius:var(--radius);padding:16px 18px;
  box-shadow:var(--shadow);
}
.metric{position:relative;display:grid;gap:6px;min-height:96px}
.metric .metric-ico{
  width:36px;height:36px;border-radius:10px;
  display:grid;place-items:center;font-size:16px;font-weight:700;
  background:#e8f1fc;color:var(--blue);
}
.metric .metric-ico.green{background:#e6f7ef;color:var(--green)}
.metric .metric-ico.orange{background:#fff1e6;color:var(--orange)}
.metric .metric-ico.red{background:#fde8eb;color:var(--red)}
.metric .metric-ico.amber{background:#fff6e5;color:var(--amber)}
.metric span{color:var(--muted);font-size:12px;font-weight:600}
.metric b{font-size:26px;display:block;margin-top:2px;letter-spacing:-.02em;color:var(--navy)}
.metric.warn{border-color:#fecaca;background:linear-gradient(180deg,#fff,#fff5f5)}
.metric.warn b{color:var(--red)}
.stock-summary{margin-bottom:12px}
.stock-summary .metric b{font-size:22px}

/* —— Toolbar / filters / chips —— */
.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:12px 0}
.toolbar input{flex:1;min-width:200px}
.toolbar select{width:auto;min-width:140px}
.status-chips{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 12px}
.chip{
  display:inline-flex;align-items:center;gap:6px;
  padding:7px 12px;border-radius:999px;border:1px solid var(--line);
  background:#fff;color:#475569;font-size:12px;font-weight:600;
  cursor:pointer;min-height:34px;box-shadow:none;
}
.chip:hover{border-color:#94a3b8}
.chip.active,.chip.todos.active{background:var(--blue);color:#fff;border-color:var(--blue)}
.chip.borrador{background:#f1f5f9;color:#475569}
.chip.enviado{background:#e0f2fe;color:#0369a1}
.chip.convertido{background:#dcfce7;color:#166534}
.chip.pendiente{background:#ffedd5;color:#c2410c}
.chip.preparacion{background:#dbeafe;color:#1d4ed8}
.chip.listo{background:#e0f2fe;color:#0284c7}
.chip.parcial{background:#ede9fe;color:#6d28d9}
.chip.entregado{background:#dcfce7;color:#166534}
.chip.cancelado{background:#fee2e2;color:#b91c1c}
.chip.active.borrador,.chip.active.enviado,.chip.active.convertido,
.chip.active.pendiente,.chip.active.preparacion,.chip.active.listo,
.chip.active.parcial,.chip.active.entregado,.chip.active.cancelado{
  filter:brightness(.95);box-shadow:inset 0 0 0 1px currentColor;
}

/* —— Tables —— */
.tablewrap{
  overflow:auto;background:#fff;border-radius:var(--radius);
  border:1px solid var(--line);box-shadow:var(--shadow);
}
table{width:100%;border-collapse:collapse}
th,td{padding:11px 12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}
th{
  background:#f8fafc;font-size:11px;text-transform:uppercase;
  letter-spacing:.04em;color:#64748b;white-space:nowrap;font-weight:700;
}
td.desc{white-space:normal;min-width:240px}
tr.selected td{background:#eff6ff!important}
tbody tr:hover td{background:#f8fafc}
.money{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.stock-negative,.neg{color:var(--red)!important;font-weight:700}

/* —— Pills / status —— */
.pill{
  display:inline-block;padding:4px 10px;border-radius:999px;
  background:#e8f2fa;color:#175f94;font-size:12px;font-weight:600;
  text-transform:capitalize;
}
.pill.borrador{background:#f1f5f9;color:#475569}
.pill.enviado{background:#e0f2fe;color:#0369a1}
.pill.convertido{background:#dcfce7;color:#166534}
.pill.pendiente{background:#ffedd5;color:#c2410c}
.pill.preparacion{background:#dbeafe;color:#1d4ed8}
.pill.listo{background:#e0f2fe;color:#0284c7}
.pill.parcial{background:#ede9fe;color:#6d28d9}
.pill.entregado{background:#dcfce7;color:#166534}
.pill.cancelado{background:#fee2e2;color:#b91c1c}

.row-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.menu-wrap{position:relative;display:inline-block}
.menu-btn{
  width:36px;height:36px;min-height:36px;padding:0;border-radius:8px;
  background:#fff;border:1px solid var(--line);color:#64748b;box-shadow:none;
}
.menu-pop{
  position:absolute;right:0;top:110%;z-index:20;
  background:#fff;border:1px solid var(--line);border-radius:10px;
  box-shadow:var(--shadow-lg);min-width:160px;padding:6px;display:none;
}
.menu-wrap.open .menu-pop{display:grid;gap:2px}
.menu-pop button{
  width:100%;justify-content:flex-start;background:transparent;
  color:var(--ink);box-shadow:none;font-weight:500;min-height:36px;
}
.menu-pop button:hover{background:#f1f5f9}
.menu-pop button.danger{color:var(--red)}

.cheap{color:var(--green);font-weight:700}
.empty{
  padding:48px 24px;text-align:center;color:var(--muted);
  display:grid;gap:12px;justify-items:center;
}
.empty .empty-ico{
  width:56px;height:56px;border-radius:16px;background:#e8f1fc;
  display:grid;place-items:center;font-size:24px;color:var(--blue);
}
.notice{
  padding:12px 14px;border-radius:var(--radius-sm);
  background:#eef6fd;border:1px solid #cfe5f5;margin:12px 0;
  color:#1e4a73;font-size:13px;
}
.notice.alert{background:#fff1f2;border-color:#fecaca;color:#9f1239}
.muted{color:var(--muted)}
.right{text-align:right}
.error{color:var(--red)}
.loading{padding:40px;color:var(--muted)}

/* —— Modals / forms —— */
.modal{
  position:fixed;inset:0;background:rgba(15,24,36,.55);
  display:grid;place-items:center;padding:16px;z-index:50;
  backdrop-filter:blur(2px);
}
.modal>.card{
  width:min(1060px,98vw);max-height:94vh;overflow:auto;
  border-radius:14px;padding:20px 22px;box-shadow:var(--shadow-lg);
}
.formgrid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.span2{grid-column:1/-1}
.actions{display:flex;gap:8px;justify-content:flex-end;margin-top:16px}

/* Quote editor v25 */
.quote-editor{display:grid;grid-template-columns:1fr 280px;gap:16px;align-items:start}
.quote-editor-main{min-width:0}
.quote-stepper{
  display:flex;gap:8px;margin:0 0 16px;flex-wrap:wrap;
}
.quote-stepper .step{
  flex:1;min-width:140px;padding:10px 12px;border-radius:10px;
  background:#f1f5f9;border:1px solid transparent;color:#64748b;
  font-size:12px;font-weight:600;display:flex;align-items:center;gap:8px;
  cursor:pointer;box-shadow:none;min-height:44px;
}
.quote-stepper .step .n{
  width:24px;height:24px;border-radius:999px;background:#cbd5e1;color:#fff;
  display:grid;place-items:center;font-size:12px;
}
.quote-stepper .step.active{
  background:#e8f1fc;border-color:#bfdbfe;color:var(--navy);
}
.quote-stepper .step.active .n{background:var(--blue)}
.quote-stepper .step.done .n{background:var(--green)}
.quote-panel[hidden]{display:none!important}
.quote-summary{
  position:sticky;top:12px;
  background:#fff;border:1px solid var(--line);border-radius:12px;
  padding:16px;box-shadow:var(--shadow);
}
.quote-summary h3{margin:0 0 12px;font-size:14px;color:var(--navy)}
.quote-summary .totals{width:100%;margin:0}
.quote-footer-bar{
  position:sticky;bottom:0;z-index:5;
  display:flex;gap:8px;justify-content:flex-end;align-items:center;
  background:rgba(255,255,255,.96);border-top:1px solid var(--line);
  padding:12px 0 4px;margin-top:16px;backdrop-filter:blur(6px);
}
.quote-footer-bar .grow{margin-right:auto}

/* Compare supplier cards */
.compare-grid{display:grid;gap:12px;margin-top:12px}
.compare-card{
  background:#fff;border:1px solid var(--line);border-radius:12px;
  padding:16px;box-shadow:var(--shadow);position:relative;
}
.compare-card.best{border-color:#86efac;background:linear-gradient(180deg,#fff,#f0fdf4)}
.best-badge{
  display:inline-flex;padding:4px 10px;border-radius:999px;
  background:#16a34a;color:#fff;font-size:11px;font-weight:700;
  margin-bottom:8px;
}
.provider-avatar{
  width:36px;height:36px;border-radius:999px;
  background:#e2e8f0;color:var(--navy);display:inline-grid;place-items:center;
  font-size:11px;font-weight:700;margin-right:8px;
}

/* Product tabs / selection */
.price-tabs button{border-radius:8px}
.selection-bar{
  background:#eff6ff;border:1px solid #bfdbfe;border-radius:10px;
  padding:10px 12px;
}
.product-filters{display:grid;grid-template-columns:2fr 1fr 1fr;gap:9px;margin:0 0 10px}

/* Totals / docs keep readable */
.totals{
  margin:15px 0 0 auto;width:min(360px,100%);
  display:grid;grid-template-columns:1fr auto;gap:7px 16px;font-size:14px;
}
.totals b{font-size:18px;border-top:1px solid var(--line);padding-top:8px}
.quote-sheet{
  width:210mm;min-height:297mm;margin:0 auto;background:#fff;
  padding:16mm;box-shadow:0 2px 18px rgba(16,32,48,.12);border-radius:4px;
}
.doc-head{display:flex;justify-content:space-between;border-bottom:3px solid var(--blue);padding-bottom:12px}
.doc-logo strong{display:block;color:var(--navy);font-size:27px;letter-spacing:1px}
.doc-logo small{color:var(--muted)}
.doc-meta{text-align:right}
.doc-client{margin:20px 0;display:grid;grid-template-columns:1fr 1fr;gap:5px 20px}
.doc-notes{margin-top:25px;display:grid;grid-template-columns:1fr 1fr;gap:20px}

/* Mobile card lists (shared hooks) */
.m-card-list{display:none;gap:10px}
.m-card{
  background:#fff;border:1px solid var(--line);border-radius:12px;
  padding:14px;box-shadow:var(--shadow);display:grid;gap:8px;
  cursor:pointer;
}
.m-card-head{display:flex;justify-content:space-between;align-items:center;gap:8px}
.m-card-head b{color:var(--navy);font-size:14px}
.m-card-meta{display:grid;gap:4px;color:var(--muted);font-size:13px}
.m-card-foot{display:flex;justify-content:space-between;align-items:center;gap:8px}
.m-card-foot .money-em{color:var(--green);font-weight:700;font-size:15px}

@media(max-width:1100px){
  .cards{grid-template-columns:repeat(2,1fr)}
  .quote-editor{grid-template-columns:1fr}
  .quote-summary{position:static}
}
@media(max-width:850px){
  .shell{grid-template-columns:1fr}
  .main{padding:12px}
  .cards{grid-template-columns:repeat(2,1fr)}
  .formgrid{grid-template-columns:1fr}
  .span2{grid-column:auto}
  .global-search{display:none}
  .user-chip .top-user{display:none}
  .quote-sheet{width:100%;min-height:0;padding:16px}
  .doc-client,.doc-notes{grid-template-columns:1fr}
}
@media(max-width:430px){
  .cards{grid-template-columns:1fr}
  .metric b{font-size:22px}
}
@media print{
  body{background:#fff}
  .shell,.modal>*:not(.quote-sheet){display:none!important}
  .modal{position:static;background:#fff;padding:0;display:block}
  .modal>.quote-sheet{display:block!important}
  .quote-sheet{box-shadow:none;width:100%;min-height:0;margin:0;padding:8mm}
  .no-print{display:none!important}
  @page{size:A4 portrait;margin:0}
}

.quote-disc-bar{flex-direction:column;align-items:stretch}
.quote-disc-bar .disc-free{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}
.quote-disc-bar .disc-free input{width:88px;min-height:40px;font-size:16px}
.quote-summary .toolbar button{width:100%}
