/* =============================================================
   Wired B2B — estilos del portal (misma identidad que la web)
   ============================================================= */
:root {
  --blue: #1e50e0; --blue-600: #1741c4; --blue-700: #123bbf; --blue-900: #0d2a8f; --blue-ink: #0a1f66;
  --bg: #eef2fb; --bg-2: #e4eaf7; --paper: #fff;
  --ink: #0f1b3d; --ink-soft: #33406a; --ink-mute: #6b769b; --line: rgba(15,27,61,.10);
  --ok: #0f7a34; --ok-bg: rgba(37,211,102,.12); --bad: #b3261e; --bad-bg: rgba(220,53,69,.10);
  --warn: #8a5a00; --warn-bg: rgba(255,193,7,.16); --wa: #25D366;
  --radius: 18px; --shadow: 0 18px 44px -24px rgba(13,42,143,.35); --shadow-soft: 0 8px 24px -14px rgba(13,42,143,.25);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.16,1,.3,1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; min-height: 100vh; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

.muted { color: var(--ink-mute); } .small { font-size: .85rem; } .req { color: #e24b3b; font-style: normal; }
.link { color: var(--blue); font-weight: 600; } .link:hover { text-decoration: underline; }
.eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); margin-bottom: .35rem; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .78rem 1.25rem; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: .95rem; line-height: 1.1; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, border-color .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 10px 22px -12px rgba(30,80,224,.8); }
.btn-primary:hover { background: var(--blue-600); }
.btn-ghost { background: #fff; color: var(--blue); border-color: rgba(30,80,224,.3); }
.btn-ghost:hover { border-color: var(--blue); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 10px 22px -12px rgba(37,211,102,.8); }
.btn-block { width: 100%; }
.btn-sm { padding: .45rem .85rem; font-size: .84rem; }

/* ---------- formularios ---------- */
.form { display: grid; gap: .95rem; }
fieldset { border: 0; padding: 0; display: grid; gap: .9rem; margin: 0 0 .4rem; }
legend { font-weight: 700; font-size: 1rem; margin-bottom: .6rem; padding-top: .3rem; color: var(--ink); }
.field { display: grid; gap: .35rem; align-content: start; }
.field > span { font-size: .86rem; font-weight: 600; color: var(--ink-soft); }
.field em { font-style: normal; font-weight: 500; color: var(--ink-mute); }
input[type=text], input[type=email], input[type=url], input[type=password], input[type=tel], input[type=number], input[type=search], input[type=date], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1.5px solid #d6deef; border-radius: 12px;
  padding: .72rem .9rem; transition: border-color .2s, box-shadow .2s; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(30,80,224,.12); }
.hint { font-size: .78rem; color: var(--ink-mute); }
.field-error { font-size: .8rem; font-weight: 600; color: var(--bad); }
.has-error input, .has-error select, .has-error textarea { border-color: #e98b84; background: #fff7f6; }
.grid-2 { display: grid; gap: .9rem; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: .9rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; font-size: .92rem; cursor: pointer; }
.row-between { display: flex; justify-content: flex-end; }
.inline-form { display: flex; gap: .6rem; flex-wrap: wrap; } .inline-form input { flex: 1; min-width: 200px; }

/* chips de productos de interés */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips.has-error { outline: 1.5px solid #e98b84; outline-offset: 5px; border-radius: 12px; }
.chip { position: relative; display: inline-flex; align-items: center; padding: .5rem .85rem; border-radius: 999px; cursor: pointer;
  font-size: .84rem; font-weight: 600; color: var(--ink-soft); background: #fff; border: 1.5px solid #d6deef; transition: all .2s; user-select: none; }
.chip:hover { border-color: var(--blue); }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip.is-checked { background: var(--blue); color: #fff; border-color: var(--blue); }
.chip-all { border-style: dashed; background: var(--bg); }
.chip-all.is-active { background: var(--blue-900); color: #fff; border-style: solid; }

/* mensajes */
.flash { padding: .8rem 1rem; border-radius: 12px; font-size: .92rem; font-weight: 500; margin-bottom: 1rem; border: 1px solid transparent; }
.flash-ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(37,211,102,.35); }
.flash-error { background: var(--bad-bg); color: var(--bad); border-color: rgba(220,53,69,.25); }
.flash-warn { background: var(--warn-bg); color: var(--warn); border-color: rgba(255,193,7,.4); }

/* ---------- pantallas de acceso (split) ---------- */
.layout-auth main.auth { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
@media (min-width: 960px) { .layout-auth main.auth { grid-template-columns: minmax(360px, .85fr) 1.15fr; } }
.auth-aside { position: relative; overflow: hidden; color: #fff; padding: 1.6rem 1.4rem 1.8rem; display: flex; flex-direction: column; gap: 1.4rem;
  background: radial-gradient(circle at 1px 1px, rgba(255,255,255,.16) 1px, transparent 1.7px) 0 0 / 24px 24px,
              radial-gradient(110% 80% at 10% 10%, #3966f0 0%, transparent 55%),
              linear-gradient(160deg, var(--blue-600), var(--blue-900) 65%, var(--blue-ink)); }
.auth-logo img { height: 34px; width: auto; }
.auth-aside .eyebrow { color: rgba(255,255,255,.8); }
.auth-aside h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.auth-aside .lead { margin-top: .7rem; color: rgba(255,255,255,.85); max-width: 38ch; }
.checks { list-style: none; padding: 0; margin-top: 1.2rem; display: grid; gap: .55rem; }
.checks li { padding-left: 1.6rem; position: relative; color: rgba(255,255,255,.92); font-size: .95rem; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; font-weight: 700; color: #bcd0ff; }
.back-site { margin-top: auto; font-size: .88rem; color: rgba(255,255,255,.75); }
.back-site:hover { color: #fff; }
/* en computadora la columna azul queda fija a la altura de la pantalla mientras se baja por el formulario
   (sin espacio vacío abajo y con la W siempre completa) */
@media (min-width: 960px) {
  .auth-aside { padding: 2.6rem 2.8rem; justify-content: space-between; position: sticky; top: 0; height: 100vh; align-self: start; }
  .auth-aside > div { margin-top: 0; }
}
@media (max-width: 959px) { .auth-aside .checks, .auth-aside .back-site { display: none; } }
.auth-main { display: grid; place-items: start center; padding: 1.6rem 1rem 3rem; }
@media (min-width: 960px) { .auth-main { place-items: center; padding: 3rem 2rem; } }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 1.6rem 1.3rem; }
.auth-card-wide { max-width: 760px; }
@media (min-width: 640px) { .auth-card { padding: 2.2rem 2.2rem; } }
.auth-card h2 { font-size: 1.55rem; margin-bottom: .35rem; }
.auth-card > .muted { margin-bottom: 1.2rem; }
.switch { margin-top: 1.2rem; text-align: center; font-size: .92rem; color: var(--ink-mute); }

/* ---------- app (con sesión) ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: linear-gradient(180deg, rgba(18,59,191,.97), rgba(18,59,191,.9));
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; box-shadow: 0 10px 26px -18px rgba(0,0,0,.6); }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: .7rem 1rem; display: flex; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; }
.brand img { height: 28px; width: auto; }
.brand-tag { font-size: .7rem; font-weight: 700; letter-spacing: .1em; background: rgba(255,255,255,.18); padding: .2rem .5rem; border-radius: 999px; }
.menu-btn { margin-left: auto; display: inline-flex; flex-direction: column; justify-content: center; gap: 4px; background: none; border: 0; padding: 12px 10px; min-width: 44px; min-height: 44px; margin-right: -10px; }
.menu-btn span { width: 22px; height: 2px; background: #fff; border-radius: 2px; }
.topnav { display: none; }
.topnav a { color: rgba(255,255,255,.9); font-weight: 500; font-size: .93rem; padding: .35rem .2rem; }
.topnav a:hover { color: #fff; }
.topnav .who { font-size: .84rem; color: rgba(255,255,255,.7); max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topnav .out { background: #fff; color: var(--blue-700); padding: .4rem .9rem; border-radius: 999px; font-weight: 600; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 .35rem; border-radius: 999px; background: #ffcc00; color: #1a1a1a; font-size: .74rem; font-weight: 800; }
.topbar.is-open .topnav { display: grid; position: absolute; top: 100%; left: 0; right: 0; background: var(--blue-700); padding: .5rem 1rem 1rem; gap: .2rem; }
.topbar.is-open .topnav a { padding: .7rem .2rem; border-top: 1px solid rgba(255,255,255,.1); }
.topbar.is-open .topnav .out { justify-self: start; margin-top: .6rem; border-top: 0; }
@media (min-width: 900px) {
  .menu-btn { display: none; }
  .topnav { display: flex; align-items: center; gap: 1.3rem; margin-left: auto; }
}
main.wrap { max-width: 1200px; margin: 0 auto; padding: 1.6rem 1rem 4rem; }
@media (min-width: 720px) { main.wrap { padding: 2.4rem 1.5rem 5rem; } }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.page-head h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.page-head .muted { margin-top: .3rem; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 1.3rem 1.2rem; margin-bottom: 1.2rem; }
@media (min-width: 720px) { .panel { padding: 1.6rem 1.6rem; } }
.panel h2 { font-size: 1.12rem; margin-bottom: 1rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .8rem; }
.panel-head h2 { margin: 0; }
.cols { display: grid; gap: 1.2rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .cols { grid-template-columns: 1.15fr .85fr; } }
.cols > .panel { margin-bottom: 0; }
.cols > *, .cart-layout > * { min-width: 0; }      /* evita que una tabla ancha estire la columna fuera de la pantalla */
.actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.summary { display: grid; gap: .1rem; }
.summary > div { display: grid; grid-template-columns: 11rem 1fr; gap: .8rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.summary > div:last-child { border-bottom: 0; }
.summary dt { color: var(--ink-mute); } .summary dd { font-weight: 500; word-break: break-word; }
@media (max-width: 520px) { .summary > div { grid-template-columns: 1fr; gap: .1rem; } }
.empty { padding: 2rem 1rem; text-align: center; color: var(--ink-mute); }
.note { margin-top: 2rem; text-align: center; color: var(--ink-mute); font-size: .92rem; }

/* estadísticas del panel */
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); margin-bottom: 1.4rem; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-soft); transition: transform .25s var(--ease); }
.stat:hover { transform: translateY(-3px); }
.stat b { display: block; font-size: 2rem; letter-spacing: -.03em; color: var(--blue-700); }
.stat span { font-size: .86rem; color: var(--ink-mute); }
.stat-alert { border-color: #ffcc00; box-shadow: 0 0 0 3px rgba(255,204,0,.25); } .stat-alert b { color: #b58100; }
.stat-warn b { color: var(--warn); }

/* pestañas y tablas */
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tab { padding: .5rem .95rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .88rem; font-weight: 600; color: var(--ink-soft); }
.tab span { color: var(--ink-mute); font-weight: 500; margin-left: .2rem; }
.tab.is-on { background: var(--blue); color: #fff; border-color: var(--blue); } .tab.is-on span { color: rgba(255,255,255,.8); }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); margin-bottom: 1rem; }
.panel .table-wrap { box-shadow: none; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); padding: .8rem .9rem; background: #f6f8fd; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }
.table input[type=text], .table input[type=number] { padding: .5rem .6rem; font-size: 15px; }
.in-price { width: 110px; text-align: right; }
.table-prices tr.is-off td { opacity: .55; }
.thumb img { width: 46px; height: 46px; object-fit: contain; background: #f6f8fd; border-radius: 10px; }
.badge-s { display: inline-block; font-size: .74rem; font-weight: 700; padding: .22rem .6rem; border-radius: 999px; white-space: nowrap; }
.b-pending { background: var(--warn-bg); color: var(--warn); } .b-ok { background: var(--ok-bg); color: var(--ok); }
.b-bad { background: var(--bad-bg); color: var(--bad); } .b-off { background: #eceff5; color: var(--ink-mute); }
.sticky-save { position: sticky; bottom: 0; padding: .8rem 0; display: flex; justify-content: flex-end; background: linear-gradient(transparent, var(--bg) 35%); }
.img-preview { background: #f6f8fd; border-radius: 14px; padding: .8rem; display: grid; place-items: center; }
.img-preview img { max-height: 200px; object-fit: contain; }

/* ---------- catálogo ---------- */
.tier-preview label { font-size: .88rem; font-weight: 600; color: var(--ink-soft); display: grid; gap: .3rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-bottom: 1.3rem; }
.search { flex: 1; min-width: 220px; max-width: 420px; }
.cat-filter { display: flex; gap: .4rem; flex-wrap: wrap; }
.pill { padding: .45rem .9rem; border-radius: 999px; background: #fff; border: 1.5px solid #d6deef; font-size: .86rem; font-weight: 600; color: var(--ink-soft); }
.pill.is-on { background: var(--blue); color: #fff; border-color: var(--blue); }
.grid-products { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid-products { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-products { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .grid-products { grid-template-columns: repeat(4, 1fr); } }
.pcard { position: relative; display: flex; flex-direction: column; background: #fff; border: 1.5px solid rgba(30,80,224,.16); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-soft); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.pcard::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--blue), #4d7bff); z-index: 1; }
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pcard-media { position: relative; aspect-ratio: 4 / 3; background: #fff; overflow: hidden; border-bottom: 2px solid rgba(30,80,224,.12); }
.pcard-media img { position: absolute; inset: .8rem; width: calc(100% - 1.6rem); height: calc(100% - 1.6rem); object-fit: contain; }
.pcard-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.pcat { align-self: flex-start; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--blue); padding: .22rem .55rem; border-radius: 999px; }
.pcard h3 { font-size: 1.05rem; margin-top: .25rem; }
.sku { font-size: .78rem; color: var(--ink-mute); }
.desc { font-size: .87rem; color: var(--ink-mute); }
.price-row { margin-top: .5rem; display: flex; align-items: baseline; gap: .35rem; }
.price { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; color: var(--blue-700); }
.price-ask { font-size: 1.05rem; color: var(--ink-soft); font-weight: 700; }
.per { font-size: .82rem; color: var(--ink-mute); }
.facts { list-style: none; padding: 0; margin: .3rem 0 .9rem; display: flex; flex-wrap: wrap; gap: .35rem; font-size: .78rem; }
.facts li { background: var(--bg); padding: .25rem .55rem; border-radius: 999px; color: var(--ink-soft); }
.facts li.in { background: var(--ok-bg); color: var(--ok); font-weight: 700; }
.facts li.out { background: var(--bad-bg); color: var(--bad); font-weight: 700; }
.pcard .btn-wa { margin-top: auto; }

/* ---------- estado de cuenta ---------- */
.status-card { max-width: 620px; margin: 2rem auto; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 2rem 1.4rem; text-align: center; }
@media (min-width: 640px) { .status-card { padding: 2.6rem 2.4rem; } }
.status-ico { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.8rem; font-weight: 800; background: var(--warn-bg); color: var(--warn); }
.is-rejected .status-ico { background: var(--bad-bg); color: var(--bad); }
.status-card h1 { font-size: 1.6rem; } .status-card > p { margin-top: .7rem; color: var(--ink-mute); }
.status-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin: 1.4rem 0 1.6rem; }
.status-card .summary { text-align: left; }

/* =============================================================
   Toque de marca (propuesta A aprobada): Inter extra negrita,
   banda azul con textura de puntos y logo W, pastillas e íconos.
   ============================================================= */
:root { --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.035em; }
.ico { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* rótulos tipo pastilla */
.eyebrow { display: inline-block; width: fit-content; padding: .48rem 1rem; border-radius: 999px; background: var(--blue); color: #fff;
  font-size: .76rem; letter-spacing: .12em; line-height: 1; margin-bottom: .95rem; box-shadow: 0 10px 22px -12px rgba(30,80,224,.75); }

/* menú: sección activa subrayada */
.topnav a.on { color: #fff; font-weight: 600; }
@media (min-width: 900px) { .topnav a.on { box-shadow: inset 0 -2px 0 #fff; } }

/* encabezado de cada pantalla: banda azul de marca */
.page-head { position: relative; overflow: hidden; color: #fff; border-radius: 26px; padding: 1.7rem 1.4rem 1.9rem; margin-bottom: 1.4rem; align-items: center;
  background: radial-gradient(circle at 1px 1px, rgba(255,255,255,.17) 1px, transparent 1.7px) 0 0 / 22px 22px,
              radial-gradient(90% 120% at 0% 0%, #3d6cf3 0%, transparent 60%),
              linear-gradient(140deg, var(--blue-600), var(--blue-900) 70%, var(--blue-ink));
  box-shadow: 0 26px 60px -30px rgba(13,42,143,.7); }
@media (min-width: 720px) { .page-head { padding: 2.2rem 2.4rem 2.4rem; } }
.page-head::after { content: ""; position: absolute; right: -50px; top: 50%; width: 280px; height: 280px; transform: translateY(-50%);
  background: url(mark-white.webp) center / contain no-repeat; opacity: .1; pointer-events: none; }
.page-head > * { position: relative; z-index: 1; }
.page-head .eyebrow { background: #fff; color: var(--blue-700); box-shadow: 0 10px 24px -12px rgba(0,0,0,.45); }
.page-head h1 { font-size: clamp(1.8rem, 4.4vw, 3rem); color: #fff; }
.page-head h1 em { font-style: normal; color: #bcd0ff; }
.page-head .sub, .page-head .muted { margin-top: .55rem; color: rgba(255,255,255,.84); font-weight: 500; max-width: 60ch; }
.page-head .sub b, .page-head .muted b { color: #fff; }
.page-head .btn-primary { background: #fff; color: var(--blue-700); box-shadow: 0 14px 30px -14px rgba(0,0,0,.5); }
.page-head .btn-primary:hover { background: #eef3ff; }
.page-head .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.page-head .tier-preview label { color: rgba(255,255,255,.9); }
.page-head h1 .badge-s { background: #fff; font-size: .82rem; letter-spacing: 0; padding: .4rem .85rem; box-shadow: 0 8px 20px -10px rgba(0,0,0,.45); }
.page-head .tier-preview select { border-color: transparent; }

/* tarjetas de números con ícono y franja azul */
.stats { gap: 1.1rem; }
.stat { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .95rem; align-items: center;
  padding: 1.25rem 1.2rem; border: 1px solid rgba(30,80,224,.12); }
.stat::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--blue), #4d7bff); }
.stat .stat-ico { grid-row: 1 / 3; width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, #3d6cf3, var(--blue-700)); box-shadow: 0 12px 22px -12px rgba(30,80,224,.9); }
.stat b { font-size: 2.15rem; line-height: 1; font-weight: 800; letter-spacing: -.04em; color: var(--ink); }
.stat span { font-weight: 500; margin-top: .3rem; }
.stat:hover { box-shadow: 0 18px 40px -22px rgba(30,80,224,.55); }
.stat-alert, .stat-warn { box-shadow: var(--shadow-soft); border-color: rgba(229,148,0,.25); }
.stat-alert::before, .stat-warn::before { background: linear-gradient(90deg, #f5a400, #ffcc00); }
.stat-alert .stat-ico, .stat-warn .stat-ico { background: linear-gradient(145deg, #ffc23d, #e59400); box-shadow: 0 12px 22px -12px rgba(229,148,0,.9); }
.stat-alert b, .stat-warn b { color: #b06f00; }
@media (max-width: 520px) { .stat { grid-template-columns: 1fr; row-gap: .6rem; } .stat .stat-ico { grid-row: auto; width: 42px; height: 42px; } }

/* paneles: título con barra azul */
.panel { border-color: rgba(30,80,224,.10); }
.panel h2 { display: flex; align-items: center; gap: .6rem; font-size: 1.2rem; }
.panel h2::before { content: ""; width: 5px; height: 22px; border-radius: 3px; background: linear-gradient(180deg, var(--blue), #4d7bff); flex-shrink: 0; }

/* estado vacío y avisos con ícono */
.empty { display: grid; justify-items: center; gap: .7rem; font-weight: 500; }
.empty .e-ico { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: rgba(30,80,224,.08); color: var(--blue); }
.flash { display: flex; align-items: center; gap: .65rem; }
.flash-warn { font-weight: 600; }
/* en las pantallas de acceso el aviso flota arriba sin descuadrar el diseño */
.layout-auth main.auth > .flash { position: fixed; z-index: 80; top: 18px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px);
  margin: 0; background: #fff; box-shadow: 0 18px 40px -18px rgba(13,42,143,.45); animation: toast-out .4s ease 5s forwards; }
@keyframes toast-out { to { opacity: 0; visibility: hidden; transform: translate(-50%, -10px); } }

/* tablas y pestañas con el azul de marca */
.table th { color: var(--blue-700); background: #f1f5ff; }
.tab.is-on { box-shadow: 0 10px 22px -12px rgba(30,80,224,.75); }

/* pantallas de acceso: pastilla blanca, W de fondo y franja en la tarjeta */
.auth-aside::after { content: ""; position: absolute; right: -70px; bottom: -70px; width: min(380px, 70%); aspect-ratio: 1; background: url(mark-white.webp) center / contain no-repeat; opacity: .09; pointer-events: none; }
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside .eyebrow { background: #fff; color: var(--blue-700); box-shadow: 0 10px 24px -12px rgba(0,0,0,.45); }
.auth-aside h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); line-height: 1.05; }
.auth-card { position: relative; overflow: hidden; border-color: rgba(30,80,224,.12); }
.auth-card::before, .status-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--blue), #4d7bff); }
.auth-card h2 { font-size: clamp(1.5rem, 3vw, 1.85rem); }
legend { font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: .5rem; }
legend::before { content: ""; width: 4px; height: 18px; border-radius: 3px; background: var(--blue); }
.status-card { position: relative; overflow: hidden; }

/* =============================================================
   Pedidos: cantidades, barra del pedido, Mi pedido, estados y avisos
   ============================================================= */
.stats { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.badge { margin-left: .3rem; }
.badge-blue { background: #fff; color: var(--blue-700); }
.btn-light { background: #fff; color: var(--blue-700); box-shadow: 0 10px 22px -12px rgba(0,0,0,.45); }
.btn-link { background: none; color: var(--bad); font-weight: 600; padding: .5rem; }
.btn-link:hover { text-decoration: underline; transform: none; }

/* selector de cantidad */
.qty { display: inline-grid; grid-template-columns: 42px 1fr 42px; align-items: center; height: 46px; border: 1.5px solid #d6deef; border-radius: 999px; background: #fff; overflow: hidden; }
.qty button { height: 100%; border: 0; background: #f1f5ff; color: var(--blue-700); font-size: 1.3rem; font-weight: 700; line-height: 1; transition: background .2s; }
.qty button:hover { background: #e2eaff; }
.qty input[type=number] { border: 0; border-radius: 0; text-align: center; font-weight: 800; font-size: 1.05rem; padding: 0; height: 100%; min-width: 0; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus { box-shadow: none; }
.qty:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(30,80,224,.12); }
.add-form { margin-top: auto; display: grid; gap: .6rem; padding-top: .3rem; }
.add-form .qty { width: 100%; }
.in-cart { display: flex; align-items: center; justify-content: center; gap: .35rem; font-size: .84rem; color: var(--ok); font-weight: 600; }
.in-cart .ico { width: 16px; height: 16px; }
.admin-preview { margin-top: auto; font-size: .8rem; color: var(--ink-mute); background: var(--bg); padding: .6rem .8rem; border-radius: 12px; text-align: center; }

/* barra flotante "Tu pedido" en el catálogo */
.cartbar { position: fixed; z-index: 45; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(720px, calc(100% - 24px)); }
.cartbar-inner { display: flex; align-items: center; gap: .9rem; padding: .7rem .75rem .7rem 1rem; border-radius: 22px; color: #fff;
  background: radial-gradient(circle at 1px 1px, rgba(255,255,255,.15) 1px, transparent 1.7px) 0 0 / 20px 20px, linear-gradient(140deg, var(--blue-600), var(--blue-900));
  box-shadow: 0 24px 50px -20px rgba(13,42,143,.75); }
.cartbar-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: rgba(255,255,255,.16); flex-shrink: 0; }
.cartbar-text { display: grid; line-height: 1.3; min-width: 0; }
.cartbar-text > b { font-size: .98rem; }
.cartbar-text span { font-size: .86rem; color: rgba(255,255,255,.85); }
.cartbar-text span b { color: #fff; }
.cartbar .btn { margin-left: auto; }
.cartbar.pop .cartbar-inner { animation: pop .45s var(--ease); }
@keyframes pop { 40% { transform: scale(1.03); } }
.layout-app main.wrap:has(.cartbar:not([hidden])) { padding-bottom: 7rem; }
@media (max-width: 520px) { .cartbar-ico { display: none; } .cartbar .btn { padding: .65rem .9rem; } }

/* Mi pedido */
.cart-layout { display: grid; gap: 1.2rem; align-items: start; }
@media (min-width: 960px) { .cart-layout { grid-template-columns: 1fr 340px; } .cart-summary { position: sticky; top: 90px; } }
.cart-layout > .panel { margin-bottom: 0; }
.cart-list { display: grid; }
.cart-row { display: grid; grid-template-columns: 56px 1fr auto; grid-template-areas: "img info del" "img qty line"; gap: .4rem .9rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.cart-row:last-child { border-bottom: 0; }
.cart-row img { grid-area: img; width: 56px; height: 56px; object-fit: contain; background: #f6f8fd; border-radius: 12px; }
.cart-info { grid-area: info; display: grid; min-width: 0; }
.cart-row .qty { grid-area: qty; width: 150px; height: 40px; }
.cart-line { grid-area: line; font-weight: 800; color: var(--ink); text-align: right; }
.cart-del { grid-area: del; justify-self: end; width: 30px; height: 30px; border-radius: 50%; border: 0; background: #f1f3f8; color: var(--ink-mute); font-size: 1.2rem; line-height: 1; }
.cart-del:hover { background: var(--bad-bg); color: var(--bad); }
@media (min-width: 720px) {
  .cart-row { grid-template-columns: 56px 1fr 150px 110px 30px; grid-template-areas: "img info qty line del"; }
}
.cart-summary .form, .cart-summary .field { margin-top: .4rem; }
.cart-summary .btn { margin-top: .6rem; }
.cart-total { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1rem 0 .4rem; padding: .95rem 1.1rem; border-radius: 16px; color: #fff;
  background: linear-gradient(140deg, var(--blue-600), var(--blue-900)); box-shadow: 0 16px 30px -18px rgba(13,42,143,.8); }
.cart-total span { font-weight: 700; font-size: .9rem; letter-spacing: .04em; }
.cart-total small { font-weight: 500; opacity: .85; }
.cart-total b { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; }

/* estados de pedido */
.b-quote { background: #e8eefc; color: var(--blue-700); }
.b-proc { background: rgba(77,123,255,.14); color: var(--blue-700); }
.b-new { background: #ffcc00; color: #1a1a1a; }
.b-wa { background: rgba(37,211,102,.14); color: var(--ok); }
.page-head h1 .badge-s.b-quote { color: var(--blue-700); }
.table tr.is-new td { background: #fffbea; }
.tab-new { border-color: #ffcc00; box-shadow: 0 0 0 3px rgba(255,204,0,.25); }
.order-steps .form { gap: .6rem; }
.sent-ok { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1rem; border-radius: 14px; background: var(--ok-bg); color: var(--ok); }
.sent-ok div { display: grid; } .sent-ok span { font-size: .86rem; color: var(--ink-soft); }
.cols > aside > .panel { margin-bottom: 1.2rem; }

/* seguimiento del pedido: Nota recibida -> En preparación -> Pedido armado -> Despachado */
.b-ready { background: rgba(255,170,0,.16); color: #9a5c00; }
.btn-ready { background: linear-gradient(145deg, #ffc23d, #e59400); color: #3b2500; font-weight: 800; box-shadow: 0 12px 24px -12px rgba(229,148,0,.9); }
.btn-ready .ico { width: 20px; height: 20px; }
.btn-ready:hover { filter: brightness(1.05); }
.tracker { list-style: none; padding: 1.2rem 1.1rem; margin: 0 0 1.2rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem;
  background: #fff; border: 1px solid rgba(30,80,224,.12); border-radius: var(--radius); box-shadow: var(--shadow-soft); counter-reset: s; }
.tracker li { position: relative; display: grid; justify-items: center; text-align: center; gap: .25rem; padding: 0 .2rem; }
.tracker li::before { content: ""; position: absolute; top: 19px; left: -50%; width: 100%; height: 4px; border-radius: 4px; background: #e3e9f7; z-index: 0; }
.tracker li:first-child::before { display: none; }
.tracker li.done::before, .tracker li.now::before { background: linear-gradient(90deg, var(--blue), #4d7bff); }
.tracker i { position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800;
  background: #eef2fb; color: var(--ink-mute); border: 3px solid #fff; box-shadow: 0 0 0 2px #e3e9f7; }
.tracker .done i { background: var(--blue); color: #fff; box-shadow: 0 0 0 2px rgba(30,80,224,.25); }
.tracker .now i { background: linear-gradient(145deg, #3d6cf3, var(--blue-700)); color: #fff; box-shadow: 0 0 0 5px rgba(30,80,224,.18); animation: pulse-step 2s infinite; }
.tracker[data-status="ready"] .now i { background: linear-gradient(145deg, #ffc23d, #e59400); color: #3b2500; box-shadow: 0 0 0 5px rgba(255,170,0,.22); }
.tracker[data-status="shipped"] .now i { background: var(--ok); animation: none; box-shadow: 0 0 0 5px rgba(37,211,102,.2); }
.tracker b { font-size: .9rem; color: var(--ink); }
.tracker .next b { color: var(--ink-mute); font-weight: 600; }
.tracker span { font-size: .76rem; color: var(--ink-mute); }
@keyframes pulse-step { 50% { box-shadow: 0 0 0 9px rgba(30,80,224,.08); } }
@media (max-width: 560px) { .tracker { padding: 1rem .5rem; } .tracker b { font-size: .74rem; } .tracker span { font-size: .66rem; } .tracker i { width: 34px; height: 34px; } .tracker li::before { top: 16px; } }
.tracker-off { display: flex; gap: .8rem; align-items: center; padding: 1rem 1.2rem; margin-bottom: 1.2rem; border-radius: var(--radius); background: #eceff5; color: var(--ink-mute); }
.stage-processing { background: rgba(77,123,255,.12); color: var(--blue-700); }
.stage-ready { background: rgba(255,170,0,.14); color: #9a5c00; }
.stage-cancelled { background: #eceff5; color: var(--ink-mute); }

/* tarjeta clicable + ficha del producto */
button.pcard-media { display: block; width: 100%; padding: 0; border: 0; border-bottom: 2px solid rgba(30,80,224,.12); cursor: zoom-in; font: inherit; }
.zoom-hint { position: absolute; left: 50%; bottom: 10px; transform: translate(-50%, 6px); opacity: 0; padding: .35rem .8rem; border-radius: 999px; font-size: .76rem; font-weight: 700;
  color: #fff; background: rgba(13,42,143,.85); transition: all .25s var(--ease); pointer-events: none; white-space: nowrap; }
.pcard:hover .zoom-hint, button.pcard-media:focus-visible .zoom-hint { opacity: 1; transform: translate(-50%, 0); }
@media (hover: none) { .zoom-hint { opacity: 1; transform: translate(-50%, 0); font-size: .7rem; } }
.pname { all: unset; cursor: pointer; } .pname:hover { color: var(--blue); }
.pname:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.no-scroll { overflow: hidden; }
.pmodal { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; background: rgba(10,20,60,.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade .25s; }
.pmodal[hidden] { display: none !important; }
@keyframes fade { from { opacity: 0; } }
.pmodal-card { position: relative; width: min(920px, 100%); max-height: calc(100vh - 32px); overflow: auto; display: grid; grid-template-columns: 1fr; background: #fff; border-radius: 24px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); animation: pop .35s var(--ease); }
@media (min-width: 760px) { .pmodal-card { grid-template-columns: 1.05fr .95fr; } }
.pmodal-media { background: #f6f8fd; display: grid; place-items: center; padding: 1.4rem; min-height: 260px; }
.pmodal-media { align-content: center; }
.pg { position: relative; width: 100%; display: grid; gap: .8rem; }
.pg-stage { position: relative; aspect-ratio: 4 / 3; max-height: 440px; touch-action: pan-y; }
.pg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; animation: fade .25s; }
.pg-nav { position: absolute; top: calc(50% - 46px); z-index: 1; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; color: var(--blue-700); font-size: 1.7rem; line-height: 1;
  cursor: pointer; box-shadow: 0 8px 20px -8px rgba(10,30,90,.45); transition: transform .2s var(--ease); }
.pg-nav:hover { transform: scale(1.08); } .pg-prev { left: -4px; } .pg-next { right: -4px; }
.pg-count { position: absolute; top: 0; left: 0; padding: .25rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 700; color: var(--blue-700); background: rgba(255,255,255,.9); }
.pg-thumbs { display: flex; gap: .5rem; overflow-x: auto; justify-content: safe center; padding: 2px; scrollbar-width: thin; }
.pg-thumbs button { flex: 0 0 64px; height: 64px; padding: 4px; border-radius: 12px; border: 2px solid transparent; background: #fff; cursor: pointer; box-shadow: 0 4px 12px -8px rgba(10,30,90,.4); }
.pg-thumbs button.is-on { border-color: var(--blue); }
.pg-thumbs img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pcount { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: .3rem; padding: .28rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 700;
  color: var(--blue-700); background: rgba(255,255,255,.92); box-shadow: 0 4px 12px -6px rgba(10,30,90,.35); }
.pcount svg { width: 14px; height: 14px; }
.pmodal-body .pcard-body { padding: 1.6rem 1.5rem; gap: .45rem; height: 100%; }
.pmodal-body h3 { font-size: 1.5rem; }
.pmodal-body .desc { font-size: .95rem; white-space: pre-line; }   /* en la ficha se ven los párrafos tal como se escribieron */
.pmodal-body .price { font-size: 2rem; }
.pmodal-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); font-size: 1.5rem; line-height: 1;
  box-shadow: 0 8px 20px -8px rgba(0,0,0,.4); }

/* admin: tomar pedido para un cliente */
.take-order { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1rem; padding: 1rem 1.1rem; margin-bottom: 1.2rem; border-radius: var(--radius);
  background: #fff; border: 1.5px dashed rgba(30,80,224,.35); box-shadow: var(--shadow-soft); }
.take-order.is-on { border-style: solid; border-color: transparent; color: #fff; background: linear-gradient(140deg, var(--blue-600), var(--blue-900)); }
.take-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #3d6cf3, var(--blue-700)); flex-shrink: 0; }
.take-order.is-on .take-ico { background: rgba(255,255,255,.16); }
.take-text { display: grid; flex: 1; min-width: 220px; line-height: 1.35; }
.take-text span { font-size: .88rem; color: var(--ink-mute); }
.take-order.is-on .take-text span { color: rgba(255,255,255,.85); }
.take-order select { width: auto; min-width: 260px; flex: 1; max-width: 420px; }
.btn-ghost-w { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost-w:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.topnav .nav-taking { background: rgba(255,255,255,.14); padding: .35rem .75rem; border-radius: 999px; }

/* cuenta en revisión: sello animado con la W (anillo que gira, punto dorado en órbita, W flotando) */
.page-head-seal::after { display: none; }                       /* el sello reemplaza la W de fondo */
.page-head-seal > div { width: 100%; }
.seal { position: relative; float: right; width: 84px; height: 84px; margin: -.3rem -.4rem .9rem .6rem; display: grid; place-items: center; }
.seal-ring { position: absolute; inset: 0; border-radius: 50%; border: 2.5px dashed rgba(255,255,255,.5); animation: seal-spin 16s linear infinite; }
.seal-ring2 { position: absolute; inset: 11%; border-radius: 50%; border: 2px solid rgba(255,255,255,.16); }
.seal-orbit { position: absolute; inset: 0; animation: seal-spin 4.5s linear infinite; }
.seal-orbit::before { content: ""; position: absolute; top: -5px; left: 50%; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%;
  background: #ffcc00; box-shadow: 0 0 14px 3px rgba(255,204,0,.75); }
.seal-core { width: 66%; height: 66%; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.28), 0 18px 40px -18px rgba(0,0,0,.6), 0 0 0 0 rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: seal-float 3.6s ease-in-out infinite, seal-glow 3.6s ease-in-out infinite; }
.seal-core img { width: 66%; height: auto; }
.seal-tag { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .62rem; font-weight: 800; letter-spacing: .1em;
  background: #ffcc00; color: #3b2500; padding: .3rem .6rem; border-radius: 999px; box-shadow: 0 8px 18px -8px rgba(0,0,0,.5); }
@keyframes seal-spin { to { transform: rotate(360deg); } }
@keyframes seal-float { 50% { transform: translateY(-5px); } }
@keyframes seal-glow { 50% { box-shadow: inset 0 0 0 2px rgba(255,255,255,.35), 0 18px 40px -18px rgba(0,0,0,.6), 0 0 0 10px rgba(255,255,255,.06); } }
@media (min-width: 720px) {
  .page-head-seal { min-height: 240px; }
  .page-head-seal > div { padding-right: 230px; }
  .seal { float: none; position: absolute; right: 2.6rem; top: 50%; width: 172px; height: 172px; margin: -86px 0 0; }
  .seal-tag { font-size: .7rem; padding: .38rem .75rem; }
  .seal-orbit::before { width: 13px; height: 13px; margin-left: -6.5px; top: -6px; }
}
@media (prefers-reduced-motion: reduce) { .seal-ring, .seal-orbit, .seal-core { animation: none; } }

/* cuenta en revisión */
.tracker-off { align-items: flex-start; border: 1px solid rgba(220,53,69,.18); background: var(--bad-bg); color: var(--bad); }
.tracker-off div { display: grid; gap: .15rem; } .tracker-off span { color: var(--ink-soft); font-size: .9rem; }
.account-cols { margin-top: .2rem; }
.next-steps { list-style: none; padding: 0; display: grid; gap: .9rem; }
.next-steps li { display: flex; gap: .9rem; align-items: flex-start; }
.ns-ico { width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, #3d6cf3, var(--blue-700)); box-shadow: 0 12px 22px -12px rgba(30,80,224,.9); }
.next-steps div { display: grid; gap: .15rem; } .next-steps b { color: var(--ink); } .next-steps span { font-size: .9rem; color: var(--ink-mute); }
.soon-title { margin: 1.6rem 0 .8rem; font-size: 1rem; letter-spacing: -.01em; color: var(--blue-700); }
.soon-grid { list-style: none; padding: 0; display: grid; gap: .6rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .soon-grid { grid-template-columns: 1fr 1fr; } }
.soon-grid li { display: flex; align-items: center; gap: .6rem; padding: .75rem .85rem; border-radius: 14px; background: #f1f5ff; font-size: .9rem; font-weight: 600; color: var(--ink-soft); }
.soon-grid .ico { color: var(--blue); width: 20px; height: 20px; }
.live-note { display: flex; align-items: center; gap: .55rem; margin-top: 1.3rem; font-size: .84rem; color: var(--ink-mute); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 0 0 rgba(37,211,102,.6); animation: live 2s infinite; flex-shrink: 0; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(37,211,102,0); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); } }
.account-actions { display: grid; gap: .6rem; margin-top: 1.2rem; }

/* avisos del cliente */
.notif-list { list-style: none; padding: 0; display: grid; gap: .5rem; }
.notif-list a { display: grid; gap: .15rem; padding: .8rem 1rem; border-radius: 14px; background: #f6f8fd; border: 1px solid transparent; transition: border-color .2s; }
.notif-list a:hover { border-color: rgba(30,80,224,.3); }
.notif-list b { color: var(--ink); } .notif-list span { font-size: .9rem; color: var(--ink-soft); } .notif-list small { color: var(--ink-mute); font-size: .78rem; }
.notif-list .is-unread a { background: #fffbea; border-color: rgba(255,204,0,.55); }
.notif-list .is-unread b::before { content: "● "; color: #e59400; }
.notif-banner { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; padding: .85rem 1.1rem; margin-bottom: 1.2rem; border-radius: 16px;
  background: #fffbea; border: 1px solid rgba(255,204,0,.6); color: #6b4a00; box-shadow: var(--shadow-soft); }
.notif-banner span { color: var(--blue-700); font-weight: 600; margin-left: auto; }

/* edición de presupuestos / notas */
.qty-sm { height: 38px; grid-template-columns: 34px 54px 34px; }
.qty-sm button { font-size: 1.1rem; }
.order-table td { vertical-align: middle; }
.order-table .in-price { width: 110px; }
.add-line { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .9rem; }
.add-line select { flex: 1; min-width: 220px; }
.add-line input { width: 90px; }
.edit-actions { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin-top: .4rem; }
.edited-by { margin-top: .6rem; }

/* ===== celular: tablas convertidas en tarjetas (sin deslizar de lado) ===== */
@media (max-width: 640px) {
  /* productos de un pedido (cliente y admin) */
  .order-table thead { display: none; }
  .order-table, .order-table tbody { display: block; width: 100%; }
  .order-table tr { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .55rem .8rem; padding: .9rem .9rem; border-bottom: 1px solid var(--line); }
  .order-table tr:last-child { border-bottom: 0; }
  .order-table td { display: block; padding: 0; border: 0; text-align: left; }
  .order-table td:nth-child(1) { grid-column: 1 / -1; padding-right: 2.6rem; }
  .order-table td:nth-child(2) { grid-column: 1; }
  .order-table td:nth-child(3) { grid-column: 2; font-size: .86rem; color: var(--ink-mute); }
  .order-table td:nth-child(4) { grid-column: 3; text-align: right; font-size: 1.02rem; }
  .order-table td:nth-child(5) { position: absolute; top: .75rem; right: .7rem; }
  .order-table .in-price { width: 100%; max-width: 120px; }
  .table-wrap:has(.order-table) { overflow: visible; }

  /* listas (mis pedidos, pedidos, clientes): cada fila es una tarjeta con etiquetas */
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody { display: block; width: 100%; }
  .table-cards tr { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1rem; padding: 1rem; border-bottom: 1px solid var(--line); }
  .table-cards tr:last-child { border-bottom: 0; }
  .table-cards td { display: grid; gap: .1rem; padding: 0; border: 0; text-align: left !important; font-size: .9rem; }
  .table-cards td[data-label]::before { content: attr(data-label); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute); }
  .table-cards td.td-main { grid-column: 1 / -1; font-size: 1rem; }
  .table-cards td.td-actions { grid-column: 1 / -1; display: flex; gap: .5rem; flex-wrap: wrap; }
  .table-cards td.td-actions .btn { flex: 1; min-height: 42px; }
  .table-wrap:has(.table-cards) { overflow: visible; }

  /* botones cómodos para el dedo */
  .cart-del { width: 38px; height: 38px; font-size: 1.35rem; }
  .panel-head .link { padding: .45rem 0; }
}

/* aviso flotante de nueva nota (admin) */
.toast { position: fixed; z-index: 90; right: 18px; bottom: 18px; display: grid; gap: .2rem; max-width: 340px; padding: 1rem 1.2rem; border-radius: 18px; color: #fff;
  background: linear-gradient(140deg, var(--blue-600), var(--blue-900)); box-shadow: 0 26px 50px -18px rgba(13,42,143,.8); border-left: 5px solid #ffcc00;
  animation: toast-in .45s var(--ease); }
.toast span { font-size: .88rem; color: rgba(255,255,255,.88); }
.toast.out { opacity: 0; transform: translateY(10px); transition: all .5s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px); } }
@media (min-width: 900px) and (max-width: 1180px) { .topnav .who { display: none; } }

/* ---------- Sitio web y blog editables (v4) ---------- */
form.inline { display: inline; }
.as-btn { border: 0; cursor: pointer; font-family: inherit; }
.as-btn:hover { filter: brightness(.95); }
.order-btns { white-space: nowrap; }
.order-btns .btn { padding: .35rem .7rem; min-width: 38px; }
.order-btns .btn[disabled] { opacity: .35; cursor: default; }
.site-table tr.is-off td { opacity: .55; }
.site-table tr.is-off td:has(.as-btn) { opacity: 1; }
.btn-danger { background: #fff; color: var(--bad); border-color: rgba(200,40,40,.35); }
.btn-danger:hover { background: var(--bad-bg); border-color: var(--bad); }
.danger-zone { margin: .4rem 0 2rem; padding: 1rem 1.2rem; border: 1px dashed rgba(200,40,40,.3); border-radius: var(--radius); display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; }
.body-editor { font-family: inherit; line-height: 1.55; min-height: 320px; }
.format-help { margin-top: -.3rem; line-height: 1.7; }
.format-help code { background: #f1f4fb; padding: .1rem .4rem; border-radius: 6px; font-size: .92em; color: var(--ink); }
.photo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .7rem; }
.photo-tile { position: relative; margin: 0; border-radius: 14px; overflow: hidden; background: #f6f8fd; border: 1.5px solid var(--line); aspect-ratio: 1; }
.photo-tile img { width: 100%; height: 100%; object-fit: contain; display: block; }
.photo-main { display: none; position: absolute; top: 6px; left: 6px; background: var(--blue); color: #fff; font-size: .68rem; font-weight: 700; padding: .18rem .5rem; border-radius: 999px; }
.photo-list > .photo-tile:first-child { border-color: var(--blue); }
.photo-list > .photo-tile:first-child .photo-main { display: block; }
.photo-tools { position: absolute; inset: auto 0 0 0; display: flex; justify-content: center; gap: .3rem; padding: .35rem; background: linear-gradient(transparent, rgba(10,25,70,.55)); }
.photo-tools button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); font-size: 1.05rem; font-weight: 700; cursor: pointer; line-height: 1; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.photo-tools button.danger { color: var(--bad); }
.photo-new .photo-tile { border-style: dashed; border-color: var(--blue); }
.photo-new .photo-main { display: block; background: #1e9e5a; }
.photo-add { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: .8rem; padding: .9rem; border: 2px dashed rgba(30,80,224,.35); border-radius: 14px; color: var(--blue); font-weight: 700; cursor: pointer; background: rgba(30,80,224,.04); }
.photo-add:hover { background: rgba(30,80,224,.08); }
.photo-add input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-add .ico { width: 20px; height: 20px; }
.photo-mgr > .muted { margin-top: .7rem; }
.photo-new:not([hidden]) { margin-top: .8rem; }
.panel-head { flex-wrap: wrap; }

/* ---------- Correos editables (v5) ---------- */
.mail-cols { align-items: start; }
.mail-preview { width: 100%; height: 760px; border: 1px solid var(--line); border-radius: 16px; background: #eef2fb; display: block; }
.mail-subject { margin: 0 0 .7rem; font-size: .92rem; }
.mail-test { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .4rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.mail-test input { flex: 1; min-width: 200px; }
.format-help code[title] { cursor: help; }
.smtp-adv { margin: .2rem 0 .4rem; } .smtp-adv summary { cursor: pointer; margin-bottom: .6rem; }

/* Vista previa de la foto del producto = igual que la tarjeta del catálogo (4:3, fondo blanco) */
.img-preview { aspect-ratio: 4 / 3; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .8rem; display: block; position: relative; }
.img-preview img { position: absolute; inset: .8rem; width: calc(100% - 1.6rem); height: calc(100% - 1.6rem); max-height: none; object-fit: contain; }
/* Guía de medidas de foto */
.size-tip { display: flex; gap: .8rem; align-items: flex-start; margin-top: .9rem; padding: .9rem 1rem; border-radius: 14px; background: rgba(30,80,224,.06); border: 1px solid rgba(30,80,224,.18); }
.size-tip > .ico { flex-shrink: 0; width: 22px; height: 22px; color: var(--blue); margin-top: .1rem; }
.size-title { margin: 0 0 .35rem; font-weight: 700; font-size: .9rem; color: var(--ink); }
.size-row { display: flex; flex-wrap: wrap; gap: .25rem .6rem; align-items: baseline; font-size: .88rem; margin-bottom: .2rem; }
.size-row b { color: var(--blue); font-size: .95rem; }
.size-row span { color: var(--ink-soft); font-weight: 600; }
.size-row em { color: var(--ink-mute); font-style: normal; }
.size-tip .muted.small { margin: .35rem 0 0; }

/* Títulos de las secciones (Sitio web) */
.heads-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .heads-grid { grid-template-columns: 1fr 1fr; } }
.head-card { border: 1px solid var(--line); border-radius: 16px; padding: 1rem; display: grid; gap: .7rem; background: #fbfcff; }
.head-card-top { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.head-preview { display: grid; gap: .45rem; justify-items: start; padding: 1rem; border-radius: 12px; background: #eef2fb; }
.hp-eyebrow { background: var(--blue); color: #fff; font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: .38rem .8rem; border-radius: 999px; }
.hp-title { font-size: 1.35rem; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; color: var(--ink); }
.hp-title em { font-style: normal; color: var(--blue); }
.hp-sub { font-size: .85rem; color: #56628c; font-weight: 500; }
.hp-btn { justify-self: start; margin-top: .3rem; padding: .45rem 1.1rem; border-radius: 999px; font-size: .82rem; font-weight: 700; color: #fff; background: var(--blue); box-shadow: 0 8px 16px -10px rgba(30,80,224,.8); }
.head-card .actions { margin-top: .1rem; }
.hp-eyebrow:empty { display: none; }
/* Registro: nombre y apellido por separado, juntos en la celda de la derecha */
.name-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.name-pair .field { min-width: 0; }

/* Ojito para ver la contraseña (mantener presionado) */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 3.1rem; width: 100%; }
.pw-eye { position: absolute; top: 50%; right: .45rem; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: transparent; color: var(--ink-mute); cursor: pointer; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.pw-eye:hover { color: var(--blue); background: rgba(30,80,224,.08); }
.pw-eye.is-on { color: var(--blue); background: rgba(30,80,224,.12); }
.pw-eye svg { pointer-events: none; }
input::-ms-reveal, input::-ms-clear { display: none; }   /* Edge trae su propio ojito: dejamos solo el nuestro */

/* Menú de arriba: cada botón en UNA línea y del mismo tamaño, aunque el nombre de la tienda sea largo.
   Si no cabe: 1) se oculta tu nombre, 2) se juntan un poco los botones, 3) pasa al menú ☰ (lo decide portal.js). */
.brand, .brand img, .brand-tag { flex-shrink: 0; }
.brand-tag { white-space: nowrap; }
.topnav a { white-space: nowrap; flex-shrink: 0; }
.topnav .nav-taking { display: inline-flex; align-items: center; gap: .35rem; max-width: 12rem; }
.topbar-inner { max-width: 1320px; }   /* el menú del admin tiene muchos botones: usa un poco más de ancho que el contenido */
.topnav .nav-taking .nt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.topnav .nav-taking .badge { flex-shrink: 0; }
.topbar.nav-s1 .topnav .who { display: none; }
@media (min-width: 900px) { .topbar.nav-s2 .topnav { gap: .85rem; } .topbar.nav-s2 .topnav a { font-size: .88rem; } }
.topbar.is-compact .menu-btn { display: inline-flex; }
.topbar.is-compact .topnav { display: none; }
.topbar.is-compact.is-open .topnav { display: grid; }
.topbar.is-compact .topnav a.on { box-shadow: none; }
.topbar.is-open .topnav .nav-taking { max-width: none; justify-self: start; }

/* Ficha del cliente → Acceso del cliente (contraseña temporal) */
.access-panel { margin-top: 1.2rem; }
.temp-pw { padding: 1rem 1.1rem; border-radius: 14px; background: rgba(30,80,224,.06); border: 1px solid rgba(30,80,224,.2); margin-bottom: 1rem; }
.temp-pw p { margin: 0; }
.temp-pw-row { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin: .7rem 0; }
.temp-pw code { font-size: 1.35rem; font-weight: 800; letter-spacing: .06em; color: var(--blue-700); background: #fff; padding: .45rem .9rem; border-radius: 10px; border: 1.5px dashed rgba(30,80,224,.4); user-select: all; }

/* ---------- Panel: tarjetas de resumen (propuesta C en colores de la marca) ----------
   Cuatro tonos de la familia azul Wired (de claro a navy). El ámbar de la marca solo marca lo que requiere atención. */
.kpis { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); margin-bottom: 1.4rem; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 178px; padding: 1.15rem 1.2rem 1.1rem; border-radius: 20px; color: #fff;
  box-shadow: 0 18px 38px -22px rgba(13,42,143,.6), inset 0 1px 0 rgba(255,255,255,.22); transition: transform .25s var(--ease), box-shadow .25s var(--ease); isolation: isolate; }
.kpi:hover { transform: translateY(-3px); box-shadow: 0 24px 44px -22px rgba(13,42,143,.75), inset 0 1px 0 rgba(255,255,255,.22); }
.kpi::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.26), transparent 55%), radial-gradient(90% 80% at 0% 100%, rgba(5,15,60,.28), transparent 60%); }
.kpi::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,.17) 1px, transparent 1px);
  background-size: 14px 14px; -webkit-mask-image: linear-gradient(200deg, #000, transparent 65%); mask-image: linear-gradient(200deg, #000, transparent 65%); }
.kpi.k1 { background: linear-gradient(135deg, #5b8cff 0%, #2f62f0 50%, #1e50e0 100%); }
.kpi.k2 { background: linear-gradient(135deg, #3b6cff 0%, #1e50e0 50%, #1741c4 100%); }
.kpi.k3 { background: linear-gradient(135deg, #2357e8 0%, #1741c4 50%, #0d2a8f 100%); }
.kpi.k4 { background: linear-gradient(135deg, #1741c4 0%, #0d2a8f 55%, #0a1f66 100%); }
.kpi-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.kpi-tile { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ico-duo { width: 26px; height: 26px; }
.ico-duo .duo { fill: currentColor; stroke: none; opacity: .3; }
.kpi-chip { font-size: .72rem; font-weight: 700; padding: .28rem .6rem; border-radius: 999px; white-space: nowrap;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.32); }
.kpi-chip.is-warn { background: #ffcc00; border-color: #ffcc00; color: #1a1a1a; box-shadow: 0 6px 16px -8px rgba(255,204,0,.9); }
.kpi > b { font-size: 2.5rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; margin-top: 1.05rem; }
.kpi-label { font-size: .88rem; font-weight: 600; opacity: .92; margin-top: .4rem; max-width: 62%; line-height: 1.3; }
.kpi-spark { position: absolute; right: 14px; bottom: 14px; width: 110px; height: 38px; opacity: .95; }
@media (max-width: 520px) {
  .kpi { min-height: 160px; padding: 1rem; }
  .kpi > b { font-size: 2.1rem; }
  .kpi-chip { display: none; }
  .kpi-label { max-width: none; font-size: .82rem; }
  .kpi-spark { width: 78px; height: 28px; right: 10px; bottom: 10px; opacity: .55; }
}

/* Fotos de producto en las listas del panel: más grandes, fondo blanco y borde fino (como la tarjeta del catálogo) */
.table-prices td.thumb { width: 140px; min-width: 140px; } .site-table td.thumb { width: 78px; min-width: 78px; }
.table-prices .thumb img, .site-table .thumb img { max-width: none; display: block; }
.table-prices .thumb img { width: 124px; height: 124px; padding: 8px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 6px 16px -12px rgba(13,42,143,.45); transition: transform .2s; }
.table-prices tr:hover .thumb img { transform: scale(1.06); }
.site-table .thumb img { width: 64px; height: 64px; padding: 4px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
@media (max-width: 640px) { .table-prices .thumb img { width: 96px; height: 96px; } }

/* ---------- Inventario, SKU y ventas por producto (v8) ---------- */
.view-switch { display: inline-flex; gap: .25rem; padding: .25rem; margin-bottom: 1rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.view-switch .vs { padding: .5rem 1.15rem; border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--ink-soft); display: inline-flex; align-items: center; gap: .4rem; }
.view-switch .vs.is-on { background: var(--blue); color: #fff; box-shadow: 0 8px 18px -10px rgba(30,80,224,.8); }
.view-switch .vs .badge { height: 18px; min-width: 18px; font-size: .7rem; }
.inv-summary { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.inv-chip { padding: .45rem .9rem; border-radius: 999px; font-size: .86rem; font-weight: 600; background: #fff; border: 1px solid var(--line); color: var(--ink-soft); }
.inv-chip b { font-size: 1rem; margin-right: .2rem; }
.inv-chip.st-out b, .inv-badge.st-out { color: #b3261e; } .inv-chip.st-low b { color: #b06f00; } .inv-chip.st-ok b { color: #0f7a34; }
.inv-badge { display: inline-block; padding: .22rem .65rem; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.inv-badge.st-ok { background: var(--ok-bg); color: var(--ok); } .inv-badge.st-low { background: #fff3cd; color: #8a5a00; }
.inv-badge.st-out { background: var(--bad-bg); } .inv-badge.st-none { background: #eceff5; color: var(--ink-mute); }
.table-inv .in-price { max-width: 110px; } .table-inv .in-add { border-color: rgba(30,80,224,.4); background: rgba(30,80,224,.04); }
.table-inv td.thumb { width: 108px; min-width: 108px; } .table-inv .thumb img { width: 84px; height: 84px; }
.inv-help { margin: .8rem 0 5rem; line-height: 1.6; }
.mv-in { color: var(--ok); } .mv-out { color: var(--bad); }
.sku-row { display: flex; gap: .5rem; } .sku-row input { flex: 1; min-width: 0; }
.btn-soldout { background: #eceff5; color: var(--ink-mute); border-color: transparent; cursor: not-allowed; }
.stock-note { margin: .35rem 0 0; font-size: .82rem; font-weight: 600; color: #b06f00; }
.low-stock-note { margin-bottom: 1.2rem; }

.sales .panel-head { flex-wrap: wrap; }
.sales-filters { display: grid; gap: .8rem; grid-template-columns: repeat(2, 1fr); margin-bottom: 1.2rem; }
@media (min-width: 900px) { .sales-filters { grid-template-columns: repeat(5, 1fr); } }
.sales-filters select { padding: .6rem .7rem; font-size: .92rem; }
.sales-note { margin: -.4rem 0 1rem; }
.donuts { display: grid; gap: 1.2rem; grid-template-columns: 1fr; margin-bottom: 1.4rem; }
@media (min-width: 900px) { .donuts { grid-template-columns: 1fr 1fr; } }
.donut-card { border: 1px solid var(--line); border-radius: 18px; padding: 1.2rem; background: #fbfcff; display: grid; gap: 1rem; grid-template-columns: 1fr; justify-items: center; }
@media (min-width: 560px) { .donut-card { grid-template-columns: 170px 1fr; justify-items: stretch; align-items: center; } .donut-card h3, .donut-card .no-sales { grid-column: 1 / -1; } }
.donut-card h3 { font-size: 1.05rem; font-weight: 800; color: var(--ink); justify-self: start; } .donut-card h3 small { font-weight: 500; color: var(--ink-mute); font-size: .78rem; margin-left: .4rem; }
.donut { width: 170px; height: 170px; justify-self: center; } .donut circle { transition: stroke-width .2s; } .donut circle:hover { stroke-width: 26; }
.donut-big { font-size: 19px; font-weight: 800; fill: var(--ink); letter-spacing: -.03em; } .donut-small { font-size: 9.5px; fill: var(--ink-mute); font-weight: 600; }
.legend { list-style: none; padding: 0; display: grid; gap: .5rem; width: 100%; }
.legend li { display: grid; grid-template-columns: 12px 1fr auto; column-gap: .6rem; align-items: baseline; font-size: .88rem; }
.legend i { width: 12px; height: 12px; border-radius: 4px; align-self: center; } .legend .lg-name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.legend b { color: var(--blue-700); } .legend em { grid-column: 2 / -1; font-style: normal; font-size: .76rem; color: var(--ink-mute); margin-top: -.15rem; }
.no-sales { font-size: .84rem; color: var(--ink-mute); margin: 0; }
.pct-bar { display: inline-block; vertical-align: middle; width: 90px; height: 7px; border-radius: 99px; background: #e8edf9; margin-right: .6rem; overflow: hidden; } .pct-bar i { display: block; height: 100%; background: linear-gradient(90deg, #4d7bff, #1e50e0); border-radius: 99px; }
.sales-table td.num b { display: inline-block; min-width: 3.4rem; }
.donut-card { align-content: start; }

/* Importar/exportar inventario, ubicaciones y documentación (v9) */
.inv-tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .9rem; }
.next-steps.compact li { padding: .55rem 0; }
.loc-list { display: grid; gap: .9rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .loc-list { grid-template-columns: 1fr 1fr; } }
.loc-state { border: 1px solid var(--line); border-radius: 14px; padding: .8rem .9rem; background: #fbfcff; }
.loc-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; } .loc-head .muted { margin-left: auto; }
.loc-cities { display: flex; flex-wrap: wrap; gap: .35rem; }
.loc-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .25rem .6rem; border-radius: 999px; background: #eef2fb; font-size: .8rem; color: var(--ink-soft); }
.loc-chip em { font-style: normal; font-weight: 700; color: var(--blue-700); font-size: .72rem; }
.loc-chip.is-custom { background: rgba(30,80,224,.12); color: var(--blue-700); font-weight: 600; }
.chip-x { border: 0; background: none; color: inherit; cursor: pointer; font-size: .75rem; padding: 0 0 0 .15rem; opacity: .7; } .chip-x:hover { opacity: 1; color: var(--bad); }
.loc-fields select + input { margin-top: .5rem; }
.doc-block { margin: 1.2rem 0 .6rem; } .doc-block h3 { font-size: 1rem; font-weight: 800; margin-bottom: .6rem; }
.doc-card { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1rem; padding: .9rem 1rem; border: 1.5px dashed rgba(30,80,224,.3); border-radius: 14px; background: rgba(30,80,224,.03); }
.doc-card.has-doc { border-style: solid; border-color: rgba(15,122,52,.3); background: rgba(37,211,102,.05); }
.doc-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--blue); border: 1px solid var(--line); flex-shrink: 0; }
.doc-card.has-doc .doc-ico { color: var(--ok); }
.doc-info { flex: 1; min-width: 180px; display: grid; gap: .15rem; } .doc-info b { color: var(--ink); }
.doc-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; } .doc-upload { display: inline; } .doc-upload label { cursor: pointer; margin: 0; }
.doc-flag { display: inline-flex; align-items: center; gap: .35rem; margin-top: .5rem; font-size: .85rem; font-weight: 600; padding: .3rem .75rem; border-radius: 999px; background: rgba(255,255,255,.16); color: #fff; }
.doc-flag .ico { width: 16px; height: 16px; } .doc-flag a { color: #fff; text-decoration: underline; }
.doc-flag.no { background: #ffcc00; color: #1a1a1a; } .doc-flag.no a { color: #1a1a1a; }
input[type=file] { font-size: .9rem; color: var(--ink-mute); max-width: 100%; }
input[type=file]::file-selector-button { margin-right: .8rem; padding: .5rem 1rem; border: 1.5px solid rgba(30,80,224,.35); border-radius: 999px; background: #fff; color: var(--blue); font-weight: 600; cursor: pointer; font-family: inherit; }
input[type=file]::file-selector-button:hover { border-color: var(--blue); background: rgba(30,80,224,.06); }

/* Ventas de hoy (en vivo): primera tarjeta del Panel */
.kpi.kpi-today { background: linear-gradient(135deg, #0d2a8f 0%, #123bbf 45%, #1e50e0 100%); }
.kpi-today > b { font-size: 2.3rem; letter-spacing: -.035em; }
.kpi-label small { font-weight: 700; opacity: .7; font-size: .72rem; margin-left: .2rem; }
.kpi-sub { font-size: .76rem; opacity: .85; margin-top: .35rem; max-width: 62%; line-height: 1.35; }
.kpi-sub em { font-style: normal; font-weight: 700; } .kpi-sub em.up { color: #9df5c0; } .kpi-sub em.down { color: #ffd166; }
.kpi-live { display: inline-flex; align-items: center; gap: .35rem; }
.kpi-live i { width: 7px; height: 7px; border-radius: 50%; background: #3ee08a; box-shadow: 0 0 0 0 rgba(62,224,138,.7); animation: livepulse 1.8s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(62,224,138,.7); } 70% { box-shadow: 0 0 0 7px rgba(62,224,138,0); } 100% { box-shadow: 0 0 0 0 rgba(62,224,138,0); } }
.kpi-today.flash > b { animation: todayflash 1.2s ease; } @keyframes todayflash { 30% { color: #ffcc00; transform: scale(1.04); } }
.kpis .kpi-today { grid-column: 1 / -1; }
@media (min-width: 1180px) { .kpis { grid-template-columns: 1.7fr repeat(4, 1fr); } .kpis .kpi-today { grid-column: auto; } .kpi-label { max-width: 70%; } }
@media (prefers-reduced-motion: reduce) { .kpi-live i, .kpi-today.flash > b { animation: none; } }

/* Tomar pedido para…: buscador de clientes */
.client-pick { position: relative; flex: 1; min-width: 260px; max-width: 460px; }
.client-pick input { width: 100%; padding-left: 2.6rem; }
.cp-ico { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--blue); pointer-events: none; display: grid; } .cp-ico .ico { width: 18px; height: 18px; }
.cp-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); max-height: 340px; overflow-y: auto; list-style: none; margin: 0; padding: .35rem;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px -16px rgba(13,42,143,.35); }
.cp-list li { padding: .55rem .7rem; border-radius: 10px; cursor: pointer; display: grid; gap: .1rem; }
.cp-list li b { color: var(--ink); font-size: .92rem; } .cp-list li span { color: var(--ink-mute); font-size: .78rem; }
.cp-list li.is-active, .cp-list li:hover { background: rgba(30,80,224,.08); }
.cp-list li mark { background: #fff3a8; color: inherit; border-radius: 3px; padding: 0 1px; }
.cp-list .cp-empty { cursor: default; color: var(--ink-mute); font-size: .86rem; } .cp-list .cp-empty:hover { background: none; }

/* ---------- Campañas de correo ---------- */
.camp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.camp-stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.1rem; box-shadow: var(--shadow-soft); display: grid; gap: .15rem; }
.camp-stat b { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; color: var(--blue-700); }
.camp-stat span { font-size: .82rem; color: var(--ink-mute); font-weight: 600; }
.camp-stats-sm { margin: 1rem 0; }
.camp-stats-sm .camp-stat { box-shadow: none; background: #f6f8fd; }
.camp-bar { height: 12px; border-radius: 999px; background: #e7ecf7; overflow: hidden; }
.camp-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--blue-700)); transition: width .6s ease; }
.camp-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; }
.camp-prod { position: relative; display: grid; gap: .35rem; padding: .55rem; border-radius: 14px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-size: .78rem; font-weight: 600; line-height: 1.25; color: var(--ink-soft); }
.camp-prod input { position: absolute; top: .45rem; left: .45rem; width: 18px; height: 18px; accent-color: var(--blue); }
.camp-prod img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #f6f8fd; border-radius: 10px; }
.camp-prod.is-on { border-color: var(--blue); box-shadow: 0 8px 18px -12px rgba(30,80,224,.7); }
.camp-aud { display: grid; gap: .5rem; }
.camp-go { margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px dashed var(--line); }
.camp-go .muted { margin-top: .5rem; text-align: center; }
.camp-intro { min-height: 150px !important; }
@media (min-width: 900px) { .camp-sticky { position: sticky; top: 84px; } }
