/* =============================================================
   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: #0b5ea8; --warn-bg: #e2f2ff; --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(56,168,255,.38); }

/* ---------- 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: #38a8ff; color: #fff; 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: #38a8ff; box-shadow: 0 0 0 3px rgba(56,168,255,.22); } .stat-alert b { color: #0b5ea8; }
.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(56,168,255,.38); }
.stat-alert::before, .stat-warn::before { background: linear-gradient(90deg, #7cc6ff, #2f8fff); }
.stat-alert .stat-ico, .stat-warn .stat-ico { background: linear-gradient(145deg, #6cc0ff, #1e7ff0); box-shadow: 0 12px 22px -12px rgba(30,127,240,.8); }
.stat-alert b, .stat-warn b { color: #0b5ea8; }
@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: #38a8ff; color: #fff; }
.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: #f0f8ff; }
.tab-new { border-color: #38a8ff; box-shadow: 0 0 0 3px rgba(56,168,255,.22); }
.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: #e2f2ff; color: #0b5ea8; }
.btn-ready { background: linear-gradient(145deg, #6cc0ff, #1e7ff0); color: #fff; font-weight: 800; box-shadow: 0 12px 24px -12px rgba(30,127,240,.8); }
.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, #6cc0ff, #1e7ff0); color: #fff; box-shadow: 0 0 0 5px rgba(56,168,255,.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: #e2f2ff; color: #0b5ea8; }
.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: #a9d8ff; box-shadow: 0 0 14px 3px rgba(169,216,255,.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: #a9d8ff; color: #0a1f66; 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: #f0f8ff; border-color: rgba(56,168,255,.45); }
.notif-list .is-unread b::before { content: "● "; color: #2f8fff; }
.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: #f0f8ff; border: 1px solid rgba(56,168,255,.45); color: #0b5ea8; 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 #a9d8ff;
  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; }
.id-doc-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: .5rem; }
.id-doc-row select, .id-doc-row input { 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: #a9d8ff; border-color: #a9d8ff; color: #0a1f66; box-shadow: 0 6px 16px -8px rgba(110,190,255,.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: #0b5ea8; } .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: #e2f2ff; color: #0b5ea8; }
.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: #0b5ea8; }
.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: #a9d8ff; color: #0a1f66; } .doc-flag.no a { color: #0a1f66; }
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: #ffb8b0; }
.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: #a9d8ff; 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: #cfe8ff; 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; } }

/* ---------- usuarios del equipo: secciones en "solo lectura" (el servidor igual rechaza cualquier cambio) ---------- */
.ro-banner { display: flex; align-items: center; gap: .6rem; margin: 0 0 1rem; padding: .7rem 1rem; border-radius: 12px; background: #eef3ff; border: 1px solid #cfdcff; color: var(--blue-700); font-size: .9rem; }
.ro-banner svg { width: 18px; height: 18px; flex-shrink: 0; }
.is-readonly form[method="post"] button:not([type="button"]), .is-readonly form[method="post"] [type="submit"],
.is-readonly .danger-zone, .is-readonly [data-edit], .is-readonly .photo-tools, .is-readonly .photo-add, .is-readonly [data-sku-gen] { display: none !important; }
.is-readonly form[method="post"] input, .is-readonly form[method="post"] select, .is-readonly form[method="post"] textarea { background: #f6f8fd; color: var(--ink-soft); }

/* ---------- Ventas en tiempo real (admin + usuarios del equipo) ---------- */
.kpis.kpis-ventas { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1180px) { .kpis.kpis-ventas { grid-template-columns: 1.6fr repeat(3, 1fr); } }
.sales-filters.sales-filters-6 { margin-bottom: 0; }
@media (min-width: 900px) { .sales-filters.sales-filters-6 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1180px) { .sales-filters.sales-filters-6 { grid-template-columns: repeat(6, 1fr); } }
.live-badge { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .9rem; border-radius: 999px; background: rgba(255,255,255,.16); color: #fff; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.live-badge i { width: 8px; height: 8px; border-radius: 50%; background: #3ee08a; box-shadow: 0 0 0 0 rgba(62,224,138,.7); animation: livePulse 1.8s infinite; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 8px rgba(62,224,138,0); } 100% { box-shadow: 0 0 0 0 rgba(62,224,138,0); } }
.day-chart { display: flex; align-items: flex-end; gap: 3px; height: 180px; padding: 6px 0 22px; position: relative; }
.dc-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.dc-col i { display: block; width: 100%; max-width: 26px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #4d7bff, var(--blue-700)); }
.dc-col i.is-today { background: linear-gradient(180deg, #7cc6ff, #2f8fff); }
.dc-col span { position: absolute; bottom: -20px; font-size: .68rem; color: var(--ink-mute); white-space: nowrap; }
.dc-col:hover i { filter: brightness(1.15); }
@media (prefers-reduced-motion: reduce) { .live-badge i { animation: none; } }

/* ---------- Accesos del equipo ---------- */
.acc-h { margin: 1.4rem 0 .6rem; font-size: 1.05rem; }
.acc-presets { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-bottom: .8rem; }
.chip-btn { padding: .38rem .8rem; border-radius: 999px; border: 1.5px solid #cfdcff; background: #fff; color: var(--blue-700); font-size: .82rem; font-weight: 700; cursor: pointer; }
.chip-btn:hover { border-color: var(--blue); background: #eef3ff; }
.acc-perms { display: grid; gap: .6rem; }
.acc-row { display: grid; grid-template-columns: 1fr; gap: .7rem; align-items: center; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: #fbfcff; }
@media (min-width: 900px) { .acc-row { grid-template-columns: 1fr auto; } }
.acc-info { display: grid; gap: .2rem; } .acc-info > b { font-size: .98rem; } .acc-info span { font-size: .84rem; color: var(--ink-mute); line-height: 1.45; }
.acc-seg { display: inline-flex; border: 1.5px solid #d6e0f5; border-radius: 12px; overflow: hidden; background: #fff; justify-self: start; }
.acc-seg label { position: relative; cursor: pointer; }
.acc-seg input { position: absolute; opacity: 0; pointer-events: none; }
.acc-seg label span { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .85rem; font-size: .84rem; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.acc-seg label + label span { border-left: 1.5px solid #d6e0f5; }
.acc-seg svg { width: 15px; height: 15px; }
.acc-seg input:checked + span { background: var(--blue); color: #fff; }
.acc-seg input[value=""]:checked + span { background: #5b6584; }
.acc-seg input[value="editar"]:checked + span { background: #0e7a43; }
.acc-seg label.is-na span { opacity: .35; cursor: not-allowed; }
.acc-seg input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: -2px; }
.acc-prods { margin: -.2rem 0 .4rem 1rem; padding: .8rem 1rem; border-left: 3px solid #cfdcff; display: grid; gap: .35rem; }
.acc-prod-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .25rem .8rem; margin-left: 1.6rem; }
.acc-prod-list.is-off { opacity: .45; pointer-events: none; }
.acc-locked { background: #f4f5f9; } .acc-lock { display: inline-flex; gap: .35rem; align-items: center; padding: .5rem .85rem; font-size: .84rem; font-weight: 700; color: #5b6584; } .acc-lock svg { width: 15px; height: 15px; }
.acc-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.acc-chip { font-size: .74rem; font-weight: 700; padding: .22rem .55rem; border-radius: 999px; background: #eef3ff; color: var(--blue-700); }
.acc-chip.is-edit { background: #e5f6ec; color: #0e7a43; }
.kpis-ventas .kpi > b { font-size: clamp(1.7rem, 2.4vw, 2.2rem); }
.kpis-ventas .kpi-tile svg { width: 24px; height: 24px; color: #fff; }
.chip-btn.is-strong { border-color: var(--blue); }
.chip-btn.is-on, .chip-btn.is-on:hover { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 6px 14px -8px rgba(30,80,224,.8); }
/* Accesos: tarjeta "Administrador/a" */
.acc-admin { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding: 1rem 1.1rem; margin-bottom: .9rem;
  border: 2px solid #cfdcff; border-radius: 16px; background: #fff; cursor: pointer; transition: border-color .2s, background .2s; }
.acc-admin input { position: absolute; opacity: 0; pointer-events: none; }
.acc-admin.is-on { border-color: var(--blue); background: linear-gradient(135deg, #f1f5ff, #e6eeff); }
.acc-admin-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #3d6cf3, var(--blue-900)); }
.acc-admin-ico svg { width: 24px; height: 24px; }
.acc-admin-txt { display: grid; gap: .25rem; } .acc-admin-txt > b { font-size: 1.02rem; } .acc-admin-txt span { font-size: .85rem; color: var(--ink-mute); line-height: 1.5; }
.acc-switch { width: 50px; height: 28px; border-radius: 999px; background: #cdd5ea; position: relative; transition: background .2s; flex-shrink: 0; }
.acc-switch i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .2s; }
.acc-admin.is-on .acc-switch { background: var(--blue); } .acc-admin.is-on .acc-switch i { transform: translateX(22px); }
.acc-admin input:focus-visible ~ .acc-switch { outline: 2px solid var(--blue); outline-offset: 2px; }
[data-acc-sections].is-off { opacity: .4; pointer-events: none; filter: grayscale(.4); }
.acc-chip.is-admin { background: var(--blue); color: #fff; }

/* Insignias de confianza (con datos reales de pedidos) */
.trust-rib { position: absolute; left: .7rem; top: .7rem; z-index: 3; display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .7rem; border-radius: 999px;
  background: linear-gradient(135deg, #2a5de8, #123bbf); color: #fff; font-size: .76rem; font-weight: 800; letter-spacing: .01em; box-shadow: 0 8px 16px -8px rgba(18,59,191,.85); pointer-events: none; }
.trust-rib .ico { width: 19px; height: 19px; margin: -2px 0 -2px -3px; }
.trust { display: flex; flex-wrap: wrap; gap: .4rem; margin: .1rem 0 .55rem; }
.trust-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .65rem; border-radius: 999px; background: #eef2fb; color: #123bbf;
  border: 1px solid #d6e0f7; font-size: .78rem; font-weight: 700; line-height: 1.2; }
.trust-chip .ico { width: 14px; height: 14px; }
.pill-top .ico { width: 15px; height: 15px; vertical-align: -3px; margin-right: .15rem; }

.demo-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin: 0 0 1rem; padding: .6rem .95rem; border-radius: 14px; background: #e2f2ff; color: #0b5ea8;
  border: 1px solid rgba(56,168,255,.38); font-size: .9rem; font-weight: 600; }
.demo-bar .ico { width: 18px; height: 18px; flex: none; } .demo-bar span { flex: 1; min-width: 200px; } .demo-bar.is-on { background: #123bbf; color: #fff; border-color: #123bbf; }
.demo-bar.is-on .link { color: #fff; text-decoration: underline; }

/* ---------- valoraciones con estrellas ---------- */
.rv-big { color: #1e50e0; font-size: 2.3rem; letter-spacing: 5px; line-height: 1; margin-bottom: .8rem; }
.rv-item { display: flex; gap: .9rem; align-items: flex-start; border: 1px solid #e1e9f8; border-radius: 18px; padding: .8rem .9rem; margin: 0 0 .8rem; background: #fbfdff; min-width: 0; }
.rv-item > img { width: 76px; height: 76px; object-fit: contain; border-radius: 14px; background: #fff; border: 1px solid #edf1fa; flex: none; }
.rv-item > div { flex: 1; min-width: 0; }
.rv-item legend::before { content: none; }
.rv-item legend { display: block; float: left; width: 100%; padding: 0; font-weight: 700; letter-spacing: 0; color: var(--ink); line-height: 1.25; margin-bottom: .2rem; }
.rv-stars { clear: both; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: .1rem; margin: .1rem 0 .45rem; }
.rv-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rv-stars label { font-size: 2.1rem; line-height: 1; color: #c9d8f5; cursor: pointer; padding: 0 .08rem; transition: color .15s, transform .15s; }
.rv-stars label:hover, .rv-stars label:hover ~ label, .rv-stars input:checked ~ label { color: #1e50e0; }
.rv-stars label:active { transform: scale(.88); }
.rv-stars input:focus-visible + label { outline: 2px solid #1e50e0; outline-offset: 2px; border-radius: 6px; }
.rv-item textarea { width: 100%; min-height: 0; font-size: .92rem; }
.rv-note { margin-top: 1rem; }
.rv-thanks { text-align: center; }
.stars { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; color: var(--ink-mute); margin: .1rem 0 .45rem; }
.stars-bg { position: relative; display: inline-block; color: #c9d8f5; letter-spacing: 1px; font-size: 1rem; line-height: 1; }
.stars-fg { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: #1e50e0; }
.stars b { color: var(--ink); font-weight: 800; } .stars em { font-style: normal; }
.rv-admin-row { display: grid; gap: .25rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.rv-admin-row.is-hidden { opacity: .55; }
.rv-admin-row .rv-meta { font-size: .82rem; color: var(--ink-mute); }
.rv-admin-row .rv-s { color: #1e50e0; letter-spacing: 1px; }

/* ---------- Accesos: tarjetas del equipo (referencia aprobada: avatar, nombre, interruptor, editar y borrar) ---------- */
.team-add { margin: .2rem 0 1rem; gap: .45rem; }
.team-add .ico { width: 18px; height: 18px; }
.team-grid { display: grid; grid-template-columns: 1fr; gap: .9rem; }
@media (min-width: 760px) { .team-grid { grid-template-columns: 1fr 1fr; } }
.team-card { display: flex; align-items: center; gap: .95rem; min-height: 96px; padding: 1rem 1.1rem; border: 1px solid #e1e9f8; border-radius: 18px; background: #fff;
  box-shadow: 0 10px 26px -24px rgba(13, 42, 143, .6); transition: border-color .2s, box-shadow .2s; }
.team-card:hover { border-color: #c9d8f5; box-shadow: 0 14px 30px -22px rgba(13, 42, 143, .55); }
.team-av { width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; letter-spacing: .02em;
  color: #123bbf; background: #dbe8ff; }
.team-card.is-owner .team-av { color: #fff; background: linear-gradient(135deg, #3b82f6, #123bbf); }
.team-card.is-off .team-av { color: #8a93b3; background: #eef1f7; }
.team-main { flex: 1; min-width: 0; display: grid; gap: .45rem; }
.team-name { font-size: 1.02rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-card.is-off .team-name { color: #6b769b; }
.team-badge { flex: none; font-size: .8rem; font-weight: 800; color: #fff; padding: .45rem .9rem; border-radius: 10px; background: linear-gradient(135deg, #2f8fff, #1e50e0); }
.team-switch-f { margin: 0; }
.team-switch { display: inline-flex; align-items: center; gap: .55rem; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-size: .92rem; color: var(--ink-soft); }
.team-switch i { position: relative; width: 36px; height: 20px; border-radius: 999px; background: #d3d9e6; transition: background .2s; flex: none; }
.team-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.team-switch[aria-checked="true"] i { background: #1e50e0; }
.team-switch[aria-checked="true"] i::after { transform: translateX(16px); }
.team-switch:focus-visible { outline: 2px solid #1e50e0; outline-offset: 3px; border-radius: 999px; }
.team-tools { display: flex; gap: .35rem; align-self: flex-start; flex: none; }
.team-tools form { margin: 0; }
.team-ico { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 0; background: none; cursor: pointer; color: #1e50e0; transition: background .15s; }
.team-ico:hover { background: #eef4ff; }
.team-ico .ico { width: 21px; height: 21px; }
.team-ico.is-del { color: #e5484d; }
.team-ico.is-del:hover { background: #fff0f0; }

/* ventana de permisos (lápiz) */
.team-dlg { margin: auto; inset: 0; width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 22px; background: #fff; color: var(--ink-soft);
  box-shadow: 0 40px 80px -30px rgba(13, 27, 61, .55); }
.team-dlg::backdrop { background: rgba(10, 20, 50, .45); backdrop-filter: blur(3px); }
.team-dlg-f { padding: 1.1rem 1.1rem 1.2rem; display: grid; gap: .8rem; }
.team-dlg-h { display: flex; align-items: center; gap: .8rem; }
.team-dlg-h > div { flex: 1; min-width: 0; display: grid; } .team-dlg-h b { color: var(--ink); font-size: 1.05rem; } .team-dlg-h > div span { font-size: .82rem; color: var(--ink-mute); }
.team-dlg-h .team-av { width: 44px; height: 44px; font-size: .95rem; }
.team-dlg-h .team-ico { color: #6b769b; font-size: 1.05rem; }
.team-adm { position: relative; display: flex; align-items: center; gap: .75rem; padding: .75rem .85rem; border-radius: 14px; background: #f3f7ff; border: 1px solid #dbe6fb; cursor: pointer; }
.team-adm input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.team-adm > span:last-child { display: grid; } .team-adm b { color: var(--ink); font-size: .95rem; } .team-adm em { font-style: normal; font-size: .8rem; color: var(--ink-mute); }
.team-adm input:checked + .team-switch i { background: #1e50e0; } .team-adm input:checked + .team-switch i::after { transform: translateX(16px); }
.team-adm input:focus-visible + .team-switch i { outline: 2px solid #1e50e0; outline-offset: 2px; }
.team-perms { display: grid; gap: .2rem; transition: opacity .2s; }
.team-perms.is-off { opacity: .35; pointer-events: none; }
.team-perm { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .5rem .2rem; border-bottom: 1px solid #eef2f9; }
.team-perm b { font-size: .9rem; color: var(--ink); line-height: 1.25; }
.team-seg { display: inline-flex; flex: none; padding: 3px; border-radius: 11px; background: #eef2fb; }
.team-seg label { position: relative; cursor: pointer; }
.team-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.team-seg span { display: block; min-width: 52px; text-align: center; padding: .38rem .6rem; border-radius: 8px; font-size: .8rem; font-weight: 700; color: #56628c; transition: background .15s, color .15s; }
.team-seg input:checked + span { background: #fff; color: #123bbf; box-shadow: 0 2px 6px -2px rgba(13, 42, 143, .35); }
.team-seg input[value="editar"]:checked + span { background: #1e50e0; color: #fff; }
.team-seg input:focus-visible + span { outline: 2px solid #1e50e0; outline-offset: 1px; }
.team-legend { font-size: .78rem; color: var(--ink-mute); margin: 0; }
.team-dlg-a { display: flex; gap: .6rem; } .team-dlg-a .btn { flex: 1; }
.team-more { justify-self: center; text-align: center; }

/* ---------- Accesos: propuesta A "Credencial" (aprobada) ---------- */
.team-card { position: relative; overflow: hidden; align-items: center; padding: 1rem 1rem 1rem 1.3rem; border-color: #dbe6fb; background: linear-gradient(135deg, #ffffff 0%, #f5f9ff 100%); }
.team-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(180deg, #38a8ff, #1e50e0); }
.team-card.is-off::before { background: #c9d1e3; }
.team-av { position: relative; border-radius: 16px; width: 54px; height: 54px; color: #fff; background: linear-gradient(135deg, #1e50e0, #0d2a8f); box-shadow: 0 8px 18px -10px rgba(30, 80, 224, .8); }
.team-av::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 15px; height: 15px; border-radius: 50%; background: #22c55e; border: 3px solid #fff; }
.team-card.is-owner .team-av::after { display: none; }
.team-card.is-off .team-av { color: #fff; background: #c9d1e3; box-shadow: none; }
.team-card.is-off .team-av::after { background: #a3adc8; }
.team-main { gap: .1rem; }
.team-user { font-size: .8rem; color: var(--ink-mute); }
.team-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
.team-tag { font-size: .74rem; font-weight: 700; padding: .25rem .55rem; border-radius: 8px; background: #eaf2ff; color: #123bbf; white-space: nowrap; }
.team-card.is-off .team-tag { background: #f0f2f7; color: #8a93b3; }
.team-side { display: grid; gap: .55rem; justify-items: end; flex: none; }
.team-state { display: inline-flex; padding: 3px; border: 0; border-radius: 10px; background: #eef2fb; cursor: pointer; font: inherit; }
.team-state span { padding: .3rem .65rem; border-radius: 8px; font-size: .76rem; font-weight: 800; color: #8a93b3; transition: background .15s, color .15s; }
.team-state[aria-checked="true"] span.on { background: #1e50e0; color: #fff; box-shadow: 0 4px 10px -6px rgba(30, 80, 224, .9); }
.team-state[aria-checked="false"] span.on { background: #fff; color: #56628c; box-shadow: 0 2px 6px -3px rgba(0, 0, 0, .25); }
.team-state:focus-visible { outline: 2px solid #1e50e0; outline-offset: 2px; }
.team-tools { align-self: auto; gap: .4rem; }
.team-perm-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .42rem .7rem; border-radius: 10px; border: 1px solid #cfdcf5; background: #fff; color: #1e50e0; font-size: .8rem; font-weight: 800; text-decoration: none; transition: background .15s, border-color .15s; }
.team-perm-btn:hover { background: #eef4ff; border-color: #b9cdf3; }
.team-perm-btn .ico { width: 16px; height: 16px; }
.team-del { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid #f6d0d2; background: #fff; color: #d9343b; cursor: pointer; transition: background .15s; }
.team-del:hover { background: #fff0f0; }
.team-del .ico { width: 17px; height: 17px; }
@media (max-width: 420px) {
  .team-card { flex-wrap: wrap; }
  .team-side { width: 100%; grid-auto-flow: column; justify-content: space-between; align-items: center; padding-top: .7rem; border-top: 1px dashed #dbe4f6; }
}
@media (max-width: 420px) {
  .team-side { display: flex; gap: .4rem; }
  .team-state span { padding: .32rem .5rem; }
  .team-perm-btn { padding: .4rem .55rem; gap: .3rem; }
  .team-tools { gap: .3rem; }
}

/* ---------- Gastos mensuales ---------- */
.exp-month { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.exp-kpis { display: grid; gap: .8rem; grid-template-columns: 1fr; margin-bottom: 1.2rem; }
@media (min-width: 720px) { .exp-kpis { grid-template-columns: repeat(3, 1fr); } }
.exp-kpi { display: grid; gap: .2rem; padding: 1rem 1.1rem; border-radius: 18px; background: #fff; border: 1px solid #dbe6fb; box-shadow: 0 10px 26px -20px rgba(30, 80, 224, .5); }
.exp-kpi span { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); }
.exp-kpi b { font-size: 1.65rem; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.exp-kpi em { font-style: normal; font-size: .8rem; color: var(--ink-mute); }
.exp-kpi.is-spent b { color: #d9343b; }
.exp-kpi.is-profit { color: #fff; border: 0; background: linear-gradient(135deg, #1e50e0, #0d2a8f); }
.exp-kpi.is-profit span, .exp-kpi.is-profit em { color: rgba(255, 255, 255, .8); }
.exp-kpi.is-profit b { color: #fff; }
.exp-kpi.is-profit.is-down { background: linear-gradient(135deg, #e5484d, #a3202a); }
.exp-list { display: grid; }
.exp-row { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-top: 1px solid #eef2fb; }
.exp-row:first-child { border-top: 0; }
.exp-date { flex: none; width: 46px; height: 46px; border-radius: 12px; background: #eef4ff; color: #1e50e0; display: grid; place-content: center; text-align: center; line-height: 1; }
.exp-date b { font-size: 1.05rem; } .exp-date span { font-size: .66rem; font-weight: 800; text-transform: uppercase; margin-top: 2px; }
.exp-info { flex: 1; min-width: 0; display: grid; gap: .2rem; }
.exp-info > b { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp-info > span { font-size: .8rem; color: var(--ink-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp-cat { display: inline-block; font-size: .72rem; font-weight: 700; padding: .12rem .45rem; border-radius: 6px; background: #eaf2ff; color: #123bbf; }
.exp-cat.is-fixed { background: #e6f7ee; color: #127a43; }
.exp-amt { flex: none; color: var(--ink); font-variant-numeric: tabular-nums; }
.exp-acts { flex: none; display: flex; }
.exp-acts .team-ico { width: 34px; height: 34px; } .exp-acts .team-ico .ico { width: 18px; height: 18px; }
.exp-fixed { display: flex; align-items: center; gap: .7rem; padding: .65rem 0; border-top: 1px solid #eef2fb; }
.exp-fixed:first-of-type { border-top: 0; }
.exp-fixed > div { flex: 1; min-width: 0; display: grid; gap: .15rem; }
.exp-fixed > div b { color: var(--ink); font-size: .92rem; } .exp-fixed > div span { font-size: .78rem; color: var(--ink-mute); }
.exp-chip { flex: none; padding: .42rem .7rem; border-radius: 10px; border: 1px solid #cfdcf5; background: #fff; color: #1e50e0; font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer; white-space: nowrap; }
.exp-chip:hover { background: #eef4ff; }
.exp-chip.is-paid { border-color: transparent; background: #e6f7ee; color: #127a43; }
.exp-chip[disabled] { cursor: default; }
span.exp-chip { cursor: default; color: #8a93b3; border-color: #e3e8f4; }
.exp-fixed.is-paid > div b { color: var(--ink-mute); }
.exp-bar { display: grid; gap: .35rem; padding: .5rem 0; }
.exp-bar > div { display: flex; justify-content: space-between; gap: .6rem; font-size: .86rem; }
.exp-bar > div b { color: var(--ink); } .exp-bar > div span { color: var(--ink-mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
.exp-bar i { display: block; height: 8px; border-radius: 99px; background: linear-gradient(90deg, #38a8ff, #1e50e0); min-width: 4px; }
.exp-legend { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--ink-mute); }
.exp-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: .4rem; }
.exp-legend i.v, .exp-bars i.v { background: #1e50e0; } .exp-legend i.g, .exp-bars i.g { background: #9fc3ff; }
.exp-chart { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; align-items: end; margin: .4rem 0 .8rem; }
.exp-col { display: grid; justify-items: center; gap: .3rem; padding: .5rem .2rem; border-radius: 12px; text-decoration: none; color: var(--ink-mute); font-size: .76rem; }
.exp-col:hover { background: #f4f8ff; }
.exp-col.is-on { background: #eef4ff; color: #1e50e0; font-weight: 800; }
.exp-bars { height: 120px; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.exp-bars i { width: min(18px, 38%); border-radius: 5px 5px 2px 2px; min-height: 2px; }
.exp-col b { font-size: .72rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.exp-col b.up { color: #127a43; } .exp-col b.down { color: #d9343b; }
.exp-form .field em { font-style: normal; color: var(--ink-mute); font-weight: 500; }
.exp-fixed-new { margin-top: .4rem; padding-top: .9rem; border-top: 1px dashed #dbe4f6; display: grid; gap: .7rem; }
.exp-cat-add { display: flex; gap: .5rem; }
.exp-cat-add input, .exp-cat-row input { flex: 1; min-width: 0; padding: .55rem .7rem; border: 1px solid #d5def0; border-radius: 10px; font: inherit; }
.exp-cat-row { display: flex; align-items: center; gap: .4rem; }
.exp-cat-row form:first-child { flex: 1; display: flex; gap: .4rem; min-width: 0; }
@media (max-width: 420px) { .exp-chart { gap: .2rem; } .exp-col b { font-size: .62rem; } .exp-row { gap: .55rem; } }
button.link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer; }
@media (max-width: 719px) {
  .exp-kpis { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .exp-kpi { padding: .8rem .9rem; border-radius: 16px; }
  .exp-kpi b { font-size: 1.25rem; }
  .exp-kpi span { font-size: .68rem; }
  .exp-kpi em { font-size: .72rem; }
  .exp-kpi.is-profit { grid-column: 1 / -1; order: -1; }
  .exp-kpi.is-profit b { font-size: 1.7rem; }
}

/* ---------- Bancos ---------- */
.bank-total { display: flex; flex-wrap: wrap; align-items: stretch; gap: 1rem; margin-bottom: 1.2rem; padding: 1.3rem 1.4rem; border-radius: 22px; color: #fff;
  background: radial-gradient(600px 300px at 90% 0%, rgba(56, 168, 255, .35), transparent 70%), linear-gradient(135deg, #1e50e0, #0d2a8f); box-shadow: 0 18px 40px -26px rgba(13, 42, 143, .9); }
.bank-total > div { display: grid; gap: .15rem; }
.bank-total > div:first-child { flex: 1 1 260px; }
.bank-total span { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: rgba(255, 255, 255, .78); }
.bank-total b { font-size: 2.2rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bank-total em { font-style: normal; font-size: .82rem; color: rgba(255, 255, 255, .8); }
.bank-rate { flex: 0 1 220px; padding: .8rem 1rem; border-radius: 16px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); }
.bank-rate b { font-size: 1.25rem; }
.bank-rate .link { justify-self: start; color: #fff; text-decoration: underline; text-underline-offset: 3px; font-size: .85rem; }
.bank-grid { display: grid; gap: .9rem; grid-template-columns: 1fr; margin-bottom: 1.2rem; }
@media (min-width: 560px) { .bank-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .bank-grid { grid-template-columns: repeat(3, 1fr); } }
.bank-card { display: grid; gap: .35rem; padding: 1rem 1.1rem; border-radius: 20px; background: #fff; border: 1px solid #dbe6fb; box-shadow: 0 10px 26px -22px rgba(30, 80, 224, .6); text-align: left; font: inherit; color: inherit; }
.bank-card.is-on { border-color: #1e50e0; box-shadow: 0 0 0 2px rgba(30, 80, 224, .18); }
.bank-card-h { display: flex; align-items: center; gap: .7rem; }
.bank-card-h > div { display: grid; min-width: 0; } .bank-card-h b { color: var(--ink); } .bank-card-h span { font-size: .78rem; color: var(--ink-mute); }
.bank-ico { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #1e50e0, #0d2a8f); }
.bank-ico .ico { width: 22px; height: 22px; }
.bank-card.k-cripto .bank-ico { background: linear-gradient(135deg, #38a8ff, #1e50e0); }
.bank-card.k-bolivares .bank-ico { background: linear-gradient(135deg, #2f6df6, #123bbf); }
.bank-card.k-efectivo .bank-ico { background: linear-gradient(135deg, #22a565, #127a43); }
.bank-bal { margin-top: .35rem; font-size: 1.55rem; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bank-bal.is-neg { color: #d9343b; }
.bank-usd { font-size: .82rem; color: var(--ink-mute); }
.bank-acts { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; padding-top: .7rem; border-top: 1px solid #eef2fb; }
.bank-act { display: inline-flex; align-items: center; gap: .3rem; padding: .4rem .65rem; border-radius: 10px; border: 1px solid #cfdcf5; background: #fff; color: #1e50e0; font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer; text-decoration: none; }
.bank-act:hover { background: #eef4ff; }
.bank-act .ico { width: 16px; height: 16px; }
.bank-act.is-link { margin-left: auto; border-color: transparent; }
.bank-card.is-add { place-content: center; justify-items: center; text-align: center; border-style: dashed; background: #f7faff; color: #1e50e0; cursor: pointer; min-height: 150px; }
.bank-card.is-add .ico { width: 26px; height: 26px; } .bank-card.is-add span { font-size: .8rem; color: var(--ink-mute); }
.bank-month { margin: 0; align-items: center; } .bank-month span { font-size: .85rem; color: var(--ink-mute); padding: 0 .3rem; }
.exp-amt.is-in { color: #127a43; } .exp-amt.is-out { color: #d9343b; }
.exp-cat.is-swap { background: #eef2fb; color: #56628c; }
a.exp-cat { text-decoration: none; }
.bank-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: #eef2fb; }
.bank-seg input { position: absolute; opacity: 0; pointer-events: none; }
.bank-seg span { display: block; text-align: center; padding: .55rem; border-radius: 9px; font-weight: 800; font-size: .88rem; color: #6b769b; cursor: pointer; }
.bank-seg input:checked + span { background: #fff; color: #1e50e0; box-shadow: 0 2px 8px -4px rgba(0, 0, 0, .3); }
.bank-seg input[value="out"]:checked + span { color: #d9343b; }
.bank-seg input:focus-visible + span { outline: 2px solid #1e50e0; outline-offset: 1px; }
.bank-acc-edit { border-top: 1px solid #eef2fb; padding: .55rem 0; }
.bank-acc-edit summary { display: flex; justify-content: space-between; gap: .6rem; cursor: pointer; list-style: none; padding: .2rem 0; }
.bank-acc-edit summary::-webkit-details-marker { display: none; }
.bank-acc-edit summary b { color: var(--ink); } .bank-acc-edit summary span { font-size: .8rem; color: var(--ink-mute); text-align: right; }
.bank-acc-edit.is-off summary b { color: var(--ink-mute); }
.bank-acc-edit form.exp-form { display: grid; gap: .6rem; margin: .5rem 0 .3rem; }
.exp-acc { background: #eef4ff; color: #1e50e0; }
.bank-ico .ico { stroke-width: 2; }
.bank-card.k-cripto .bank-ico { background: linear-gradient(135deg, #2f8cf5, #1741c4); }
.bank-moves .exp-info > b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
@media (max-width: 559px) {
  .bank-card { padding: .85rem .95rem; gap: .2rem; }
  .bank-bal { font-size: 1.35rem; margin-top: .2rem; }
  .bank-acts { margin-top: .3rem; padding-top: .55rem; }
  .bank-card.is-add { min-height: 0; padding: .9rem; grid-auto-flow: column; gap: .5rem; align-items: center; }
  .bank-card.is-add span { display: none; }
  .bank-rate { flex-basis: 100%; }
  .bank-moves .exp-row { gap: .55rem; }
  .bank-moves .exp-amt { font-size: .88rem; }
  .bank-moves .exp-acts .team-ico { width: 30px; height: 30px; }
}
.bank-ico .ico { stroke: #fff; color: #fff; opacity: 1; }
.bank-head-btns { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 559px) { .bank-acts .bank-act { padding: .4rem .55rem; } .bank-act.is-link { margin-left: 0; } }

/* Botones del PDF del pedido (compartir por WhatsApp + descargar) */
.doc-btns { display: flex; flex-wrap: wrap; gap: .6rem; }
.doc-btns .btn svg { width: 18px; height: 18px; }
@media (max-width: 600px) { .doc-btns { width: 100%; } .doc-btns .btn { flex: 1 1 auto; justify-content: center; } }

/* Lista de pedidos del admin en el teléfono: una fila horizontal por pedido (toda la fila abre el detalle) */
.ord-list { display: none; }
@media (max-width: 760px) {
  .ord-table { display: none; }
  .ord-head .sub { display: none; }
  .tabs-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -16px 1rem; padding: 0 16px 2px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent); }
  .tabs-scroll::-webkit-scrollbar { display: none; }
  .tabs-scroll .tab { flex: 0 0 auto; white-space: nowrap; }
  .ord-list { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
    box-shadow: 0 18px 40px -28px rgba(13,42,143,.45); }
  .ord-row { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto 14px; align-items: center; gap: .75rem;
    padding: .9rem .85rem .9rem .9rem; color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background .15s; }
  .ord-row + .ord-row { border-top: 1px solid var(--line); }
  .ord-row:active { background: #f1f5ff; }
  .ord-row.is-new { background: linear-gradient(90deg, rgba(30,80,224,.07), transparent 60%); }
  .ord-row.is-new::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--blue); }
  .ord-ava { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; color: #fff;
    background: linear-gradient(140deg, #3b6cf0, var(--blue-900)); box-shadow: 0 8px 18px -10px rgba(13,42,143,.7); }
  .ord-main, .ord-side { display: flex; flex-direction: column; min-width: 0; gap: .12rem; }
  .ord-co { font-weight: 700; font-size: .98rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ord-meta { font-size: .8rem; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ord-meta b { color: var(--blue-700); font-weight: 700; letter-spacing: .01em; }
  .ord-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; }
  .ord-tags .badge-s { font-size: .68rem; padding: .16rem .5rem; }
  .ord-side { align-items: flex-end; text-align: right; }
  .ord-total { font-weight: 800; font-size: 1rem; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
  .ord-units { font-size: .78rem; color: var(--ink-soft); font-weight: 600; }
  .ord-date { font-size: .72rem; color: var(--ink-mute); white-space: nowrap; }
  .ord-chev { color: #9aa6c8; display: grid; place-items: center; }
  .ord-tags { flex-wrap: nowrap; overflow: hidden; }
  .ord-tags .badge-s { display: inline-block; white-space: nowrap; flex: 0 0 auto; }
  .ord-row { grid-template-columns: 38px minmax(0, 1fr) auto 12px; gap: .7rem; }
  .ord-ava { width: 38px; height: 38px; border-radius: 12px; font-size: .95rem; }
  .ord-head { padding: 1.3rem 1.3rem 1.4rem; margin-bottom: 1rem; }
  .ord-head h1 { font-size: 1.7rem; }
}
.table td.td-wide { overflow-wrap: anywhere; }

/* Menú abierto (teléfono): flecha arriba para volver a la pantalla inicial */
.topnav .nav-back { display: none; }
.topbar.is-open .topnav .nav-back { display: inline-flex; align-items: center; gap: .55rem; justify-self: start; margin: .25rem 0 .35rem; padding: .6rem 1rem .6rem .8rem;
  border: 0; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font-weight: 700; }
.topbar.is-open .topnav .nav-back:active { background: rgba(255,255,255,.24); }

.share-note { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; width: min(92vw, 420px);
  padding: .8rem 1rem; border-radius: 14px; background: var(--blue-ink); color: #fff; font-size: .88rem; line-height: 1.4; text-align: center;
  box-shadow: 0 18px 40px -16px rgba(10,31,102,.7); transition: opacity .35s, transform .35s; }
.share-note.is-out { opacity: 0; transform: translateX(-50%) translateY(10px); }

/* Días de crédito de la nota de despacho */
.credit-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.credit-chips .chip { padding: .45rem .85rem; border-radius: 999px; border: 1.5px solid #d6deef; background: #fff; font: inherit; font-size: .86rem; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.credit-chips .chip.is-on { background: var(--blue); border-color: var(--blue); color: #fff; }
.credit-row { display: grid; grid-template-columns: 1fr 1.3fr; gap: .6rem; }
.credit-due { margin: .2rem 0 .9rem; padding: .7rem .9rem; border-radius: 12px; background: #eef3ff; color: var(--blue-ink); font-size: .92rem; }
.credit-due b { color: var(--blue-700); }

@media (max-width: 760px) { .cli-head { padding: 1.3rem 1.3rem 1.4rem; margin-bottom: 1rem; } .cli-head h1 { font-size: 1.7rem; } .cli-head .actions { width: 100%; display: flex; gap: .5rem; flex-wrap: wrap; } }
@media (max-width: 760px) { .cli-head .actions .btn { padding: .5rem .9rem; font-size: .85rem; min-height: 0; } }

/* Importar clientes */
.imp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .7rem; margin-bottom: 1.2rem; }
.imp-stat { padding: 1rem 1.1rem; border-radius: 16px; background: #f4f7fe; border: 1px solid var(--line); display: flex; flex-direction: column; gap: .2rem; }
.imp-stat b { font-size: 1.8rem; line-height: 1; color: var(--ink); }
.imp-stat span { font-size: .86rem; color: var(--ink-mute); }
.imp-stat.is-ok { background: #eaf1ff; border-color: rgba(30,80,224,.25); } .imp-stat.is-ok b { color: var(--blue-700); }
.imp-stat.is-bad b { color: #c0392b; }
.imp-confirm { max-width: 480px; }
.imp-table td { vertical-align: top; }

/* Cerrar el pedido que se está tomando */
.topnav .nav-taking-x { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font-size: 1.15rem; line-height: 1; text-decoration: none; margin-left: -.25rem; }
.topnav .nav-taking-x:hover { background: rgba(255,255,255,.26); }
.topnav .nav-taking-x .ntx-t { display: none; }
.topbar.is-open .topnav .nav-taking-x { justify-self: start; width: auto; height: auto; gap: .45rem; display: inline-flex; align-items: center; margin: .1rem 0 0; padding: .5rem .95rem .5rem .75rem; border: 1px solid rgba(255,255,255,.28); background: transparent; font-size: .9rem; font-weight: 600; }
.topbar.is-open .topnav .nav-taking-x .ntx-i { font-size: 1.15rem; line-height: 1; }
.topbar.is-open .topnav .nav-taking-x .ntx-t { display: inline; }

/* Gastos: 4 indicadores (ventas, costo de lo vendido, gastos, ganancia neta real) */
@media (min-width: 720px) { .exp-kpis.exp-kpis-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .exp-kpis.exp-kpis-4 { grid-template-columns: repeat(4, 1fr); } }
a.exp-kpi { text-decoration: none; color: inherit; } a.exp-kpi:hover { border-color: #b9cdf6; }

/* Compras de mercancía */
.buy-lines { display: grid; gap: .5rem; margin: .4rem 0 .7rem; }
.buy-line { display: grid; grid-template-columns: minmax(0, 1fr) 90px 130px 38px; gap: .5rem; align-items: center; }
.buy-line select, .buy-line input { width: 100%; min-width: 0; padding: .65rem .7rem; border: 1px solid var(--line); border-radius: 12px; font: inherit; background: #fff; }
.buy-head span { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute); }
@media (max-width: 640px) {
  .buy-head { display: none; }
  .buy-line { grid-template-columns: 1fr 1fr 38px; padding: .6rem; border: 1px solid #e3eaf8; border-radius: 14px; background: #f8faff; }
  .buy-line select { grid-column: 1 / -1; }
}
.buy-total { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .9rem 1rem; margin: .4rem 0 1rem; border-radius: 14px; background: #eef4ff; }
.buy-total span { font-weight: 700; color: var(--ink-mute); } .buy-total b { font-size: 1.4rem; color: #1e50e0; font-variant-numeric: tabular-nums; }
.buy-card { padding: .9rem 0; border-top: 1px solid #eef2fb; } .buy-card:first-of-type { border-top: 0; }
.buy-card-h { display: flex; align-items: center; gap: .8rem; margin-bottom: .5rem; }
.buy-card-h > div { flex: 1; min-width: 0; display: grid; gap: .15rem; }
.buy-table td.num, .buy-table th.num, .mg-table td.num, .mg-table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.buy-cost-in { width: 110px; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; text-align: right; }
/* Margen real */
.mg-warn { padding: .9rem 1.1rem; border-radius: 14px; background: #fff6e0; border: 1px solid #f3d58a; color: #6b4e00; margin-bottom: 1.1rem; font-size: .92rem; }
.mg-flow { display: grid; gap: .6rem; grid-template-columns: 1fr; margin-bottom: 1.2rem; }
@media (min-width: 720px) { .mg-flow { grid-template-columns: repeat(5, 1fr); } }
.mg-step { display: grid; gap: .2rem; padding: .95rem 1rem; border-radius: 18px; background: #fff; border: 1px solid #dbe6fb; }
.mg-step span { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute); }
.mg-step b { font-size: 1.35rem; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.mg-step em { font-style: normal; font-size: .78rem; color: var(--ink-mute); }
.mg-step.is-minus b { color: #d9343b; }
.mg-step.is-sub { background: #eef4ff; border-color: #cddcfb; }
.mg-step.is-total { color: #fff; border: 0; background: linear-gradient(135deg, #1e50e0, #0d2a8f); }
.mg-step.is-total span, .mg-step.is-total em { color: rgba(255,255,255,.82); } .mg-step.is-total b { color: #fff; }
.mg-step.is-total.is-down { background: linear-gradient(135deg, #e5484d, #a3202a); }
.mg-table tfoot td { border-top: 2px solid #dbe6fb; }
.mg-up { color: #127a43; } .mg-down { color: #d9343b; }

/* Panel: ganancia real del mes en vivo */
.mp { display: grid; gap: 1.1rem; margin: 0 0 1.4rem; padding: 1.3rem 1.4rem; border-radius: 22px; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, #1e50e0, #0d2a8f); box-shadow: 0 18px 40px -26px rgba(13, 42, 143, .8); }
.mp.is-down { background: linear-gradient(135deg, #e5484d, #a3202a); }
@media (min-width: 900px) { .mp { grid-template-columns: 1.1fr 1fr; align-items: center; } .mp-warn { grid-column: 1 / -1; } }
.mp-main { display: grid; gap: .35rem; min-width: 0; }
.mp-top { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.mp .kpi-chip { background: rgba(255,255,255,.18); color: #fff; }
.mp-when { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.85); }
.mp-net { font-size: clamp(2.1rem, 6vw, 2.9rem); line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.mp-sub { font-size: .86rem; color: rgba(255,255,255,.86); }
.mp-bar { display: block; height: 6px; border-radius: 99px; background: rgba(255,255,255,.2); margin-top: .35rem; overflow: hidden; }
.mp-bar i { display: block; height: 100%; border-radius: inherit; background: #fff; }
.mp-flow { display: grid; gap: .1rem; padding: .8rem 1rem; border-radius: 16px; background: rgba(255,255,255,.12); }
.mp-flow > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .35rem 0; font-size: .9rem; color: rgba(255,255,255,.88); }
.mp-flow > div b { color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mp-flow > div.is-minus b { color: #ffd2d4; }
.mp.is-down .mp-flow > div.is-minus b { color: #fff; }
.mp-flow .mp-fixed { border-top: 1px solid rgba(255,255,255,.2); margin-top: .2rem; padding-top: .55rem; font-size: .82rem; }
.mp-flow .mp-fixed span b { color: #fff; }
.mp-warn { font-size: .84rem; padding: .6rem .85rem; border-radius: 12px; background: #fff6e0; color: #6b4e00; }
.mp.flash { animation: mpflash .9s ease; } @keyframes mpflash { 0% { transform: scale(1); } 40% { transform: scale(1.01); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .mp.flash { animation: none; } }

/* Menú del celular: se desplaza aunque tenga muchas opciones (no se queda congelado) */
.topbar.is-open .topnav { max-height: var(--menu-max, calc(100dvh - 70px)); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
body.menu-lock { overflow: hidden; }
/* "Tomar pedido" de primero y resaltado */
.topnav .nav-order { display: inline-flex; align-items: center; gap: .4rem; }
.topnav .nav-order .ico { width: 16px; height: 16px; }
.topbar.is-open .topnav .nav-order { justify-self: stretch; justify-content: center; margin: .2rem 0 .5rem; padding: .8rem 1rem; border: 0; border-radius: 14px;
  background: #fff; color: var(--blue-700, #123bbf); font-weight: 800; box-shadow: 0 8px 20px -12px rgba(0,0,0,.45); }
.topbar.is-open .topnav .nav-order .ico { width: 18px; height: 18px; }
/* "Tomar pedido" más grande y llamativo en el menú */
.topbar.is-open .topnav .nav-order { padding: 1.05rem 1.2rem; margin: .35rem 0 .7rem; font-size: 1.12rem; letter-spacing: .01em; border-radius: 16px;
  box-shadow: 0 0 0 3px rgba(255,255,255,.28), 0 12px 28px -12px rgba(0,0,0,.55); }
.topbar.is-open .topnav .nav-order .ico { width: 22px; height: 22px; stroke-width: 2.6; }
.topbar.is-open .topnav .nav-order:active { transform: scale(.98); }

/* Ficha del cliente: editar datos */
.edit-data { margin: 0 0 1rem; }
.edit-data > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: .45rem; }
.edit-data > summary::-webkit-details-marker { display: none; }
.edit-data > summary .ico { width: 18px; height: 18px; }
.edit-data[open] > summary { background: #eef4ff; color: #1e50e0; box-shadow: none; }
.edit-data-f { margin-top: 1rem; padding: 1rem; border-radius: 16px; background: #f6f9ff; border: 1px solid #dbe6fb; }
.cli-new-f { max-width: 720px; }
.btn-new-client { font-weight: 800; padding-inline: 1.3rem; } .btn-new-client .ico { width: 18px; height: 18px; }

/* Clientes activos / inactivos */
.act-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin: 0 0 1rem; }
.act-card { display: grid; gap: .15rem; padding: 1rem 1.1rem; border-radius: 18px; background: #fff; border: 1px solid #dbe6fb; text-decoration: none; color: var(--ink); }
.act-card span { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute); }
.act-card b { font-size: 2rem; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.act-card em { font-style: normal; font-size: .78rem; color: var(--ink-mute); }
.act-card.act-ok b { color: #127a43; } .act-card.act-off b { color: #6b769b; }
.act-card:hover { border-color: #b9cdf6; }
.act-card.is-on-1 { border: 2px solid #1e50e0; box-shadow: 0 10px 24px -18px rgba(30,80,224,.8); }
.act-bar { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: #e3e8f4; overflow: hidden; }
.act-bar i { display: block; height: 100%; background: linear-gradient(90deg, #27b26b, #127a43); border-radius: inherit; min-width: 4px; }
.act-filter { margin: -.3rem 0 .8rem; font-size: .9rem; color: var(--ink-mute); }
.badge-s.b-idle { background: #eef0f5; color: #6b769b; }
.ord-meta.act-last { font-size: .76rem; }
.act-idle { display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; font-weight: 700; color: #b4232a; }
.act-idle .ico { width: 14px; height: 14px; }

/* Teléfono + su tipo */
.phone-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem; align-items: start; }
.phone-row .ptype { display: grid; gap: .4rem; }
.phone-row select, .phone-row input { width: 100%; min-width: 0; }
@media (max-width: 520px) { .phone-row { grid-template-columns: 1fr; } }
.ptype-tag { display: inline-block; margin-left: .35rem; font-size: .72rem; font-weight: 700; padding: .12rem .45rem; border-radius: 6px; background: #eaf2ff; color: #123bbf; }

/* Ficha: actividad del cliente + activar a mano */
.act-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1rem; margin: 0 0 1.2rem; padding: .9rem 1.1rem; border-radius: 18px; background: #fff; border: 1px solid #dbe6fb; }
.act-strip.is-act { border-color: #bfe6cf; background: #f3fbf6; }
.act-strip-t { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; font-size: .9rem; color: var(--ink-mute); min-width: 0; flex: 1 1 260px; }
.act-strip .badge-s { font-size: .8rem; padding: .3rem .65rem; }
.act-strip .btn .ico { width: 18px; height: 18px; }
@media (max-width: 520px) { .act-strip form, .act-strip .btn { width: 100%; } }
.act-manual { display: block; font-size: .74rem; font-weight: 700; color: #127a43; }

/* Varios teléfonos y correos (+) */
.extra-list { display: grid; gap: .5rem; }
.extra-list:not(:empty) { margin-top: .5rem; }
.phone-row.extra-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; }
.email-row.extra-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: .5rem; align-items: start; }
.email-row input { width: 100%; min-width: 0; }
.x-row { height: 44px; border-radius: 12px; border: 1px solid #dbe6fb; background: #fff; color: #6b769b; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.x-row:hover { color: #c0392b; border-color: #f0c4be; background: #fff6f5; }
.add-row { justify-self: start; margin-top: .5rem; display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem .45rem .5rem; border-radius: 99px; border: 1px dashed #9db8f2; background: #f4f8ff; color: #1e50e0; font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; }
.add-row b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #1e50e0; color: #fff; font-size: 1.05rem; line-height: 1; }
.add-row:hover { background: #e9f1ff; border-style: solid; }
.field > .add-row { width: max-content; }
@media (max-width: 520px) {
  .phone-row.extra-row { grid-template-columns: minmax(0, 1fr) 44px; }
  .phone-row.extra-row .ptype { grid-column: 1 / 2; }
  .phone-row.extra-row .x-row { grid-column: 2; grid-row: 1; }
}

/* Aviso en el centro: faltan datos obligatorios */
.miss-modal { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 16px; background: rgba(8, 20, 60, .45); backdrop-filter: blur(3px); animation: missFade .18s ease-out; }
.miss-card { width: min(420px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 22px; padding: 1.5rem 1.4rem 1.3rem; box-shadow: 0 30px 70px -20px rgba(8, 20, 60, .55); text-align: center; animation: missPop .22s cubic-bezier(.2, .9, .3, 1.2); }
.miss-ico { width: 54px; height: 54px; margin: 0 auto .7rem; border-radius: 50%; display: grid; place-items: center; background: #fdecea; color: #c0392b; font-size: 1.7rem; font-weight: 900; }
.miss-card h3 { margin: 0 0 .3rem; font-size: 1.25rem; color: var(--ink); }
.miss-sub { margin: 0 0 .8rem; color: var(--ink-mute); font-size: .92rem; }
.miss-card ul { list-style: none; margin: 0 0 1.1rem; padding: 0; display: grid; gap: .4rem; text-align: left; }
.miss-card li { position: relative; padding: .55rem .8rem .55rem 2rem; border-radius: 12px; background: #fff6f5; border: 1px solid #f6d3ce; color: #8e2a1f; font-weight: 600; font-size: .92rem; }
.miss-card li::before { content: "•"; position: absolute; left: .85rem; top: .5rem; color: #c0392b; font-weight: 900; }
body.miss-open { overflow: hidden; }
.is-missing { border-color: #e0574a !important; box-shadow: 0 0 0 3px rgba(224, 87, 74, .15) !important; }
@keyframes missFade { from { opacity: 0; } }
@keyframes missPop { from { opacity: 0; transform: scale(.94) translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .miss-modal, .miss-card { animation: none; } }

/* Datos para entrar al portal: usuario (correo) + contraseña temporal */
.login-data { display: grid; gap: .55rem; margin: .8rem 0 .2rem; }
.login-data > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: .3rem 1rem; }
.login-data dt { font-size: .82rem; font-weight: 800; color: var(--ink-mute); }
.login-data dt em { font-style: normal; font-weight: 600; }
.login-data dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-weight: 700; font-size: 1.05rem; color: var(--ink); }
@media (max-width: 520px) { .login-data > div { grid-template-columns: 1fr; } }

/* Notas de despacho: empresa arriba, encargado debajo (más aire) */
.td-client b { display: block; line-height: 1.25; }
.td-client .td-contact { display: flex; align-items: center; gap: .3rem; margin-top: .22rem; font-size: .8rem; font-weight: 500; color: var(--ink-mute); line-height: 1.2; }
.td-client .td-contact .ico { width: 13px; height: 13px; flex: none; opacity: .7; }

/* Cuadro principal: ventas de hoy (izquierda) y ventas del mes (derecha) */
.kpi-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: .3rem; }
.ks-col { display: grid; align-content: start; gap: .2rem; min-width: 0; }
.ks-col + .ks-col { padding-left: 1.1rem; margin-left: 1.1rem; border-left: 1px solid rgba(255, 255, 255, .25); }
.kpi-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ks-lbl { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.ks-col b { font-size: 2.1rem; line-height: 1.05; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ks-sub { font-size: .76rem; opacity: .85; line-height: 1.35; }
.ks-sub em { font-style: normal; font-weight: 700; } .ks-sub em.up { color: #9df5c0; } .ks-sub em.down { color: #ffb8b0; }
.kpi-today.flash .ks-col b { animation: todayflash 1.2s ease; }
@media (max-width: 520px) { .ks-col b { font-size: 1.55rem; } .ks-col + .ks-col { padding-left: .8rem; margin-left: .8rem; } }
@media (prefers-reduced-motion: reduce) { .kpi-today.flash .ks-col b { animation: none; } }
.kpi-today { container-type: inline-size; }
.ks-col b { white-space: nowrap; font-size: clamp(1.25rem, 7.4cqi, 2.2rem); }
.ks-lbl { white-space: nowrap; }

/* armonía: las dos columnas con la misma estructura (etiqueta · cifra · 2 líneas cortas) */
.kpi-split { margin-top: .9rem; align-items: stretch; }
.ks-col { gap: .3rem; }
.ks-col + .ks-col { padding-left: clamp(.9rem, 4cqi, 1.6rem); margin-left: clamp(.9rem, 4cqi, 1.6rem); border-left: 1px solid rgba(255, 255, 255, .22); }
.ks-lbl { font-size: .7rem; letter-spacing: .1em; opacity: .78; }
.ks-sub { display: grid; gap: .1rem; margin-top: .15rem; }
.ks-l1 { font-size: .8rem; font-weight: 700; opacity: .95; white-space: nowrap; }
.ks-l2 { font-size: .76rem; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-today .kpi-split { margin-top: auto; padding-top: .9rem; }
/* "← Volver al Panel" */
.back-panel { margin: 0 0 .7rem; }
.back-panel .link { display: inline-flex; align-items: center; gap: .3rem; padding: .35rem 0; font-weight: 700; }

/* Menú del celular: botones grandes con ícono (2 columnas) */
.topnav .nav-grid { display: contents; }
.topnav .nav-i { display: none; }
.topbar.is-open .topnav .nav-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin: .15rem 0 .4rem; }
.topbar.is-open .topnav .nav-grid > a { position: relative; display: flex; align-items: center; gap: .65rem; min-height: 58px; padding: .7rem .75rem; border: 1px solid rgba(255, 255, 255, .16); border-radius: 16px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05)); color: #fff; font-size: .98rem; font-weight: 700; line-height: 1.15; text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); transition: background .15s ease, transform .1s ease; -webkit-tap-highlight-color: transparent; }
.topbar.is-open .topnav .nav-grid > a:active { transform: scale(.97); background: rgba(255, 255, 255, .22); }
.topbar.is-open .topnav .nav-grid > a.on { background: #fff; color: #123bbf; border-color: #fff; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .5); }
.topbar.is-open .topnav .nav-i { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: rgba(255, 255, 255, .16); }
.topbar.is-open .topnav .nav-i .ico { width: 19px; height: 19px; }
.topbar.is-open .topnav .nav-grid > a.on .nav-i { background: #e8efff; color: #1e50e0; }
.topbar.is-open .topnav .nav-grid > a .badge { position: absolute; top: -6px; right: -4px; margin: 0; }
@media (max-width: 340px) { .topbar.is-open .topnav .nav-grid { grid-template-columns: 1fr; } }
.topbar.is-open .topnav .who { margin-top: .5rem; font-size: .85rem; opacity: .75; }
.topbar.is-open .topnav .out { justify-self: stretch; display: flex; align-items: center; justify-content: center; min-height: 52px; margin-top: .4rem; padding: .8rem 1rem; border: 1px solid rgba(255, 255, 255, .35); border-radius: 16px; background: transparent; color: #fff; font-size: 1rem; font-weight: 700; }
.topbar.is-open .topnav .out:active { background: rgba(255, 255, 255, .15); }

/* Cuentas por cobrar + pago de la nota + comisiones */
.badge-s.b-paid { background: #e3f6ec; color: #127a43; }
.badge-s.b-due { background: #fff1e6; color: #b4530d; }
.pay-panel.is-paid { border-color: #bfe6cf; background: #f3fbf6; }
.pay-ok { display: flex; align-items: center; gap: .45rem; color: #127a43; font-size: 1.02rem; margin: 0 0 .4rem; }
.pay-ok .ico { width: 20px; height: 20px; }
.exp-kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .exp-kpis-3 { grid-template-columns: 1fr; } }
.cxc-list { display: grid; gap: .9rem; }
.cxc-client.has-over { border-left: 4px solid #e0574a; }
.cxc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .5rem 1rem; margin-bottom: .6rem; }
.cxc-who { display: grid; gap: .15rem; min-width: 0; }
.cxc-name { font-size: 1.1rem; font-weight: 800; color: var(--ink); text-decoration: none; }
.cxc-total { display: grid; justify-items: end; gap: .2rem; }
.cxc-total b { font-size: 1.4rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cxc-over { font-size: .78rem; font-weight: 800; color: #c0392b; background: #fdecea; padding: .15rem .55rem; border-radius: 99px; }
.cxc-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.cxc-note { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .5rem .9rem; padding: .7rem .8rem; border: 1px solid #e3eaf8; border-radius: 14px; background: #fbfcff; }
.cxc-n-main { display: grid; gap: .1rem; min-width: 0; }
.cxc-amt { font-variant-numeric: tabular-nums; }
.cxc-when { font-size: .76rem; font-weight: 800; padding: .2rem .6rem; border-radius: 99px; white-space: nowrap; }
.cxc-when.is-over { background: #fdecea; color: #c0392b; } .cxc-when.is-today { background: #fff1e6; color: #b4530d; }
.cxc-when.is-soon { background: #fff7e0; color: #8a6100; } .cxc-when.is-ok { background: #eaf2ff; color: #123bbf; }
.cxc-pay { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: flex-end; }
.cxc-pay input, .cxc-pay select { width: auto; min-height: 38px; padding: .3rem .6rem; }
@media (max-width: 560px) { .cxc-note { grid-template-columns: minmax(0, 1fr) auto; } .cxc-when { grid-column: 1; justify-self: start; } .cxc-amt { grid-row: 1; grid-column: 2; } .cxc-pay { justify-content: stretch; } .cxc-pay > * { flex: 1 1 auto; } }
.com-note { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0 0 1rem; padding: .7rem .9rem; border-radius: 14px; background: #fff7e0; color: #6b4b00; font-size: .9rem; }
.com-note .ico { width: 18px; height: 18px; }
.com-sellers { display: grid; gap: .7rem; }
.com-seller { padding: .9rem; border: 1px solid #e3eaf8; border-radius: 16px; background: #fbfcff; display: grid; gap: .6rem; }
.com-s-top { display: flex; align-items: center; gap: .7rem; }
.com-s-top div { display: grid; } .com-s-top span { font-size: .82rem; color: var(--ink-mute); }
.com-av { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #1e50e0, #0d2a8f); color: #fff; font-style: normal; font-weight: 800; }
.com-s-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 0; }
.com-s-nums dt { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute); }
.com-s-nums dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; } .com-s-nums dd.is-due { color: #b4530d; }
.com-pay summary { list-style: none; display: inline-flex; cursor: pointer; } .com-pay summary::-webkit-details-marker { display: none; }
.com-pay[open] summary { margin-bottom: .6rem; }
.com-h3 { margin: 1.1rem 0 .5rem; font-size: .95rem; }
.com-payouts { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.com-payouts li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .5rem .7rem; border-radius: 12px; background: #f4f7fd; font-size: .9rem; }
.com-team { display: grid; gap: .7rem; }
.com-team-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: .5rem .7rem; align-items: end; padding: .8rem; border: 1px solid #e3eaf8; border-radius: 16px; }
.com-team-row.is-off { opacity: .6; }
.com-team-row .field { margin: 0; }
.com-pct-in { display: flex; align-items: center; gap: .3rem; } .com-pct-in input { width: 100%; } .com-pct-in i { font-style: normal; font-weight: 800; color: var(--ink-mute); }
.com-team-act { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .4rem; }
.com-add { margin-top: .8rem; } .com-add summary { list-style: none; cursor: pointer; } .com-add summary::-webkit-details-marker { display: none; }
.com-add[open] summary { margin-bottom: .6rem; }
.com-help { margin-top: .8rem; }
a.mg-step { text-decoration: none; color: inherit; }
.cxc-list { grid-template-columns: minmax(0, 1fr); }
.cxc-list > *, .cxc-note > *, .cxc-head > * { min-width: 0; }
.cxc-n-main span { overflow-wrap: anywhere; }
.cxc-who { flex: 1 1 200px; }
.cxc-who, .cxc-who * { white-space: normal; overflow-wrap: anywhere; }

/* Cuentas por cobrar: editar fechas */
.cxc-edit-btn { grid-column: 1; grid-row: 2; justify-self: start; align-self: center; }
.cxc-note .cxc-pay { grid-column: 2 / -1; grid-row: 2; }
.cxc-dates { display: none; grid-column: 1 / -1; grid-row: 3; flex-wrap: wrap; gap: .6rem; align-items: flex-end; padding: .75rem; margin-top: .2rem; border-radius: 12px; background: #eef3ff; border: 1px dashed #b9c9f3; }
.cxc-note.is-editing .cxc-dates { display: flex; }
.cxc-note.is-editing .cxc-edit-btn { background: #e3ebff; color: #123bbf; }
.cxc-dates .field { display: grid; gap: .2rem; margin: 0; flex: 1 1 150px; }
.cxc-dates .field span { font-size: .74rem; font-weight: 700; color: #4a5a7a; }
.cxc-dates input, .cxc-dates select { min-height: 38px; padding: .3rem .6rem; width: 100%; }
.cxc-dates .cxc-days { display: none; } .cxc-dates.is-credit .cxc-days { display: grid; }
.cxc-dates .btn { flex: 0 0 auto; min-height: 38px; }
@media (max-width: 560px) { .cxc-note .cxc-when { grid-row: 2; } .cxc-note .cxc-pay { grid-column: 1 / -1; grid-row: 3; } .cxc-edit-btn { grid-row: 4; grid-column: 1 / -1; justify-self: stretch; } .cxc-dates { grid-row: 5; } .cxc-dates .btn { flex: 1 1 100%; } }

/* Comisiones: generadas desde la venta, listas para pagar cuando el cliente pagó */
.com-ready { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin: 0 0 1rem; padding: .9rem 1rem; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #1e50e0, #0d2a8f); box-shadow: 0 10px 26px -14px rgba(13, 42, 143, .7); }
.com-ready > div { display: grid; gap: .15rem; flex: 1 1 240px; min-width: 0; }
.com-ready b { font-size: 1.02rem; } .com-ready span { font-size: .86rem; color: rgba(255, 255, 255, .85); }
.com-ready-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #1e50e0; flex: 0 0 auto; font-style: normal; }
.com-ready-ico .ico { width: 22px; height: 22px; }
.com-ready-btn { background: #fff; color: #0d2a8f; font-weight: 800; }
.com-seller.is-ready { border-color: #9db6f5; box-shadow: 0 0 0 3px #e3ebff; }
.com-s-nums dd.is-ready { color: #1e50e0; } .com-s-nums dd.is-wait { color: var(--ink-mute); }
.com-s-paid { margin: 0; }
.com-wait-msg { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: .84rem; color: var(--ink-mute); } .com-wait-msg .ico { width: 16px; height: 16px; flex: 0 0 auto; }
.com-st { display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; font-weight: 800; padding: .2rem .6rem; border-radius: 99px; white-space: nowrap; }
.com-st .ico { width: 14px; height: 14px; }
.com-st.is-ready { background: #e3ebff; color: #123bbf; } .com-st.is-wait { background: #f1f3f8; color: #5a6782; }
.dash-com { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin: 1rem 0; padding: .85rem 1rem; border-radius: 16px; text-decoration: none; color: #fff; background: linear-gradient(135deg, #1e50e0, #0d2a8f); }
.dash-com > div { display: grid; gap: .1rem; flex: 1 1 220px; min-width: 0; } .dash-com span { font-size: .85rem; color: rgba(255, 255, 255, .85); }
.dash-com em { font-style: normal; font-weight: 800; background: #fff; color: #0d2a8f; padding: .45rem .9rem; border-radius: 99px; font-size: .85rem; }
@media (max-width: 560px) { .com-s-nums { grid-template-columns: 1fr 1fr; } .com-st { white-space: normal; } .com-ready-btn, .dash-com em { flex: 1 1 100%; text-align: center; } }
.com-st-d { display: block; margin-top: .2rem; font-size: .72rem; color: var(--ink-mute); }
.com-cols + .panel td:first-child { white-space: nowrap; }
/* Accesos: en celular los 3 botones de permiso caben en el ancho */
@media (max-width: 600px) {
  .acc-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; justify-self: stretch; }
  .acc-seg label span { justify-content: center; padding: .55rem .3rem; font-size: .78rem; gap: .25rem; white-space: normal; text-align: center; line-height: 1.15; min-height: 44px; }
  .acc-seg svg { width: 14px; height: 14px; flex: 0 0 auto; }
  .acc-seg label { display: flex; min-width: 0; }
  .acc-seg label span { flex: 1 1 auto; width: 100%; }
}

/* Sin señal: aviso en tiempo real y bandeja de salida */
.net { position: fixed; left: 50%; top: 74px; transform: translateX(-50%); z-index: 9998; display: flex; align-items: center; gap: .55rem; width: max-content; max-width: calc(100vw - 24px);
  padding: .6rem 1rem; border-radius: 999px; font-size: .86rem; line-height: 1.3; color: #fff; box-shadow: 0 12px 30px -12px rgba(11, 27, 77, .55); transition: opacity .3s, transform .3s; }
.net.is-out { opacity: 0; transform: translateX(-50%) translateY(-8px); }
.net.is-off { background: #1d2740; } .net.is-on { background: linear-gradient(135deg, #16a34a, #15803d); } .net.is-warn { background: #0d2a8f; }
.net a { color: #fff; font-weight: 800; text-decoration: underline; }
.net-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.net.is-off .net-dot { background: #ff5a5f; box-shadow: 0 0 0 0 rgba(255, 90, 95, .7); animation: netPulse 1.6s infinite; }
@keyframes netPulse { 70% { box-shadow: 0 0 0 9px rgba(255, 90, 95, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 95, 0); } }
.net-pend { position: fixed; left: 12px; bottom: 14px; z-index: 9997; display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .9rem; border: 0; border-radius: 999px;
  background: #0d2a8f; color: #fff; font: inherit; font-size: .82rem; font-weight: 700; box-shadow: 0 10px 24px -10px rgba(13, 42, 143, .7); cursor: pointer; }
.net-spin { width: 12px; height: 12px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: netSpin 1s linear infinite; }
@keyframes netSpin { to { transform: rotate(360deg); } }
.net-list { position: fixed; left: 12px; bottom: 62px; z-index: 9997; width: min(360px, calc(100vw - 24px)); max-height: 50vh; overflow: auto; padding: .9rem 1rem; border-radius: 16px;
  background: #fff; color: var(--ink, #0b1b4d); box-shadow: 0 18px 40px -16px rgba(11, 27, 77, .45); font-size: .86rem; }
.net-list b { display: block; } .net-list > span { display: block; color: #5a6782; font-size: .8rem; margin: .15rem 0 .5rem; }
.net-list ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .35rem; }
.net-list li { padding: .45rem .6rem; border-radius: 10px; background: #f1f5ff; } .net-list em { color: #5a6782; font-style: normal; font-size: .76rem; }
.net-list small { display: block; color: #b42318; }
@media (prefers-reduced-motion: reduce) { .net-dot, .net-spin { animation: none !important; } }

/* Botones que no se deben confundir: Despachado (verde, camión) y Pagada (azul marino, billete) */
.btn-ship { background: linear-gradient(145deg, #34d27b, #15803d); color: #fff; font-weight: 800; box-shadow: 0 12px 24px -12px rgba(21,128,61,.85); }
.btn-ship:hover { filter: brightness(1.06); }
.btn-paid { background: linear-gradient(145deg, #1b2f6e, #0a1640); color: #fff; font-weight: 800; box-shadow: 0 12px 24px -12px rgba(10,22,64,.85); }
.btn-paid:hover { filter: brightness(1.18); }
.btn-ship .ico, .btn-paid .ico { width: 20px; height: 20px; }

/* Notas de despacho (celular): ícono de persona junto al encargado, como en la versión de escritorio */
@media (max-width: 760px) {
  .ord-meta { display: flex; align-items: center; gap: .45rem; min-width: 0; }
  .ord-meta > b { flex: none; }
  .ord-sep { flex: none; width: 3px; height: 3px; border-radius: 50%; background: #b7c2da; }
  .ord-who { display: inline-flex; align-items: center; gap: .28rem; min-width: 0; color: var(--ink-mute); font-weight: 500; }
  .ord-who .ico { width: 13px; height: 13px; flex: none; opacity: .7; }
  .ord-who span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Notas de despacho en el celular: flujo del pedido + atajos (en la computadora siguen las pestañas) */
.of-nav { display: none; }
@media (max-width: 760px) {
  .tabs.ord-tabs-desk { display: none; }
  .of-nav { display: block; margin: 0 0 1rem; }
  .of-flow { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: .85rem .5rem .7rem; margin-bottom: .55rem; box-shadow: 0 10px 24px -20px rgba(13,42,143,.5); }
  .of-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; }
  .of-steps::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 21px; height: 3px; border-radius: 3px; background: #dfe7fb; }
  .of-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; color: var(--ink-soft); text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .of-step i { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 2px solid #cfdaf6; color: var(--blue); font-style: normal; transition: transform .15s; }
  .of-step i .ico { width: 20px; height: 20px; }
  .of-step em { position: absolute; top: -7px; right: -9px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 99px; background: #0b1b4d; color: #fff; font-style: normal; font-size: .7rem; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }
  .of-step small { font-size: .7rem; font-weight: 700; text-align: center; line-height: 1.15; }
  .of-step:active i { transform: scale(.94); }
  .of-step.is-on i { background: linear-gradient(145deg, #2f6bff, #1238c4); border-color: transparent; color: #fff; box-shadow: 0 0 0 5px #e3ebff; }
  .of-step.is-on small { color: var(--blue-700); }
  .of-more { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
  .of-more a { display: flex; justify-content: center; align-items: center; gap: .25rem; min-height: 40px; padding: .4rem .15rem; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: .7rem; font-weight: 700; color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
  .of-more a span { color: var(--ink-mute); font-weight: 600; }
  .of-more a.is-on { background: var(--blue); border-color: var(--blue); color: #fff; } .of-more a.is-on span { color: rgba(255,255,255,.8); }
  .of-more a.is-new:not(.is-on) { border-color: #9db6f5; color: var(--blue-700); }
}
@media (max-width: 360px) { .of-more a { font-size: .68rem; } .of-step small { font-size: .64rem; } }

/* Datos del cliente: se ven en MAYÚSCULAS mientras se escriben (el servidor también los guarda así) */
input[name="company"],input[name="full_name"]:not(.no-upper),input[name="first_name"],input[name="last_name"],textarea[name="address"]{text-transform:uppercase}
input[name="company"]::placeholder,input[name="full_name"]::placeholder,input[name="first_name"]::placeholder,input[name="last_name"]::placeholder,textarea[name="address"]::placeholder{text-transform:none}

/* Panel: cuadro "Cuentas por cobrar" (dinero en la calle) */
.kpi > b.kpi-money { white-space: nowrap; align-self: flex-start; display: inline-block; max-width: 100%; }
.kpi > b.kpi-money small { font-size: .5em; font-weight: 800; letter-spacing: -.02em; opacity: .85; margin-left: .04em; }
.kpi-label .kpi-sub { display: block; margin: .25rem 0 0; font-size: .74rem; font-weight: 700; opacity: .85; white-space: nowrap; }

/* Ventas de hoy / del mes: cifras al mismo tamaño que los otros números del Panel */
.ks-col b.kpi-money { font-size: 2.5rem; letter-spacing: -.04em; line-height: 1; overflow-wrap: normal; justify-self: start; max-width: 100%; }
@media (max-width: 520px) { .ks-col b.kpi-money { font-size: 2.1rem; } }
@media (min-width: 1180px) { .kpis { grid-template-columns: 2fr repeat(4, 1fr); } .kpis .kpi-top { gap: .35rem; } .kpis .kpi-chip { font-size: .68rem; padding: .26rem .5rem; } .kpi-today .ks-col + .ks-col { padding-left: 1rem; margin-left: 1rem; } }

/* ===== Ventas por producto: filtros ordenados (período · vendedor/estado/ciudad · pedidos/ver por) ===== */
.sf-head p { margin: .2rem 0 0; }
.sf { display: grid; gap: .9rem; margin: 0 0 1rem; padding: 1rem; border-radius: 20px; background: linear-gradient(180deg, #f6f8ff, #fbfcff); border: 1px solid #e3eaf8; }
.sf-block { display: grid; gap: .45rem; min-width: 0; }
.sf-lbl { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #5a6782; }
.sf-lbl .ico { width: 15px; height: 15px; color: #1e50e0; }
.seg { display: grid; gap: 4px; padding: 4px; border-radius: 14px; background: #e9eefb; }
.seg-5 { grid-template-columns: repeat(5, 1fr); }
.seg-2 { grid-template-columns: repeat(2, 1fr); }
.seg-o { position: relative; margin: 0; cursor: pointer; }
.seg-o input { position: absolute; opacity: 0; pointer-events: none; }
.seg-o span { display: grid; place-items: center; min-height: 38px; padding: .3rem .35rem; border-radius: 10px; font-size: .82rem; font-weight: 700; color: #3d4a6b; text-align: center; line-height: 1.1; transition: background .15s, color .15s, box-shadow .15s; }
.seg-o:hover span { color: #0b1b4d; background: rgba(255, 255, 255, .6); }
.seg-o input:checked + span { background: linear-gradient(145deg, #2f6bff, #1238c4); color: #fff; box-shadow: 0 8px 16px -10px rgba(18, 56, 196, .9); }
.seg-o input:focus-visible + span { outline: 2px solid #1e50e0; outline-offset: 2px; }
.sf-selects { display: grid; gap: .55rem; grid-template-columns: 1fr; }
.sf-sel { position: relative; display: flex; align-items: center; gap: .65rem; margin: 0; padding: .5rem .8rem .5rem .55rem; border-radius: 14px; background: #fff; border: 1.5px solid #dfe6f6; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.sf-sel:hover { border-color: #b9c9f2; }
.sf-sel:focus-within { border-color: #1e50e0; box-shadow: 0 0 0 4px rgba(30, 80, 224, .12); }
.sf-sel.is-on { border-color: #1e50e0; background: #f3f6ff; }
.sf-sel > i { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: #eef3ff; color: #1e50e0; }
.sf-sel.is-on > i { background: linear-gradient(145deg, #2f6bff, #1238c4); color: #fff; }
.sf-sel > i .ico { width: 18px; height: 18px; }
.sf-sel > span { display: grid; flex: 1; min-width: 0; }
.sf-sel small { font-size: .68rem; font-weight: 700; color: #6b7896; text-transform: uppercase; letter-spacing: .05em; }
.sf-sel select { appearance: none; -webkit-appearance: none; width: 100%; border: 0; background: transparent; padding: .05rem 1.4rem .05rem 0; font: inherit; font-size: .95rem; font-weight: 700; color: #0b1b4d; cursor: pointer; box-shadow: none; outline: none; min-height: 0; }
.sf-sel::after { content: ""; position: absolute; right: .9rem; top: 50%; width: 8px; height: 8px; border-right: 2.2px solid #1238c4; border-bottom: 2.2px solid #1238c4; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.sf-toggles { display: grid; gap: .9rem; grid-template-columns: 1fr 1fr; }
.sf-active { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding-top: .8rem; border-top: 1px dashed #d6deef; }
.sf-act-lbl { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 700; color: #5a6782; }
.sf-act-lbl .ico { width: 15px; height: 15px; }
.sf-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .4rem .3rem .6rem; border-radius: 999px; background: #1e50e0; color: #fff; font-size: .78rem; font-weight: 700; text-decoration: none; }
.sf-chip .ico { width: 14px; height: 14px; }
.sf-chip b { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(255, 255, 255, .22); font-size: .85rem; line-height: 1; }
.sf-chip:hover b { background: rgba(255, 255, 255, .4); }
.sf-clear { margin-left: auto; font-size: .78rem; font-weight: 700; color: #1238c4; text-decoration: none; }
.sf-clear:hover { text-decoration: underline; }
.sf-note { display: flex; gap: .55rem; align-items: flex-start; margin: 0 0 1rem; padding: .7rem .85rem; border-radius: 14px; background: #eef4ff; border: 1px solid #d5e2fd; color: #3d4a6b; font-size: .82rem; line-height: 1.45; }
.sf-note .ico { flex: none; width: 18px; height: 18px; color: #1e50e0; margin-top: .05rem; }
.sf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; margin: 0 0 1.1rem; }
.sf-stats div { display: grid; gap: .2rem; padding: .75rem .85rem; border-radius: 16px; background: #fff; border: 1px solid #e3eaf8; box-shadow: 0 10px 24px -22px rgba(13, 42, 143, .6); min-width: 0; }
.sf-stats span { font-size: .7rem; font-weight: 700; color: #6b7896; line-height: 1.2; }
.sf-stats b { font-size: 1.25rem; font-weight: 800; color: #0b1b4d; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-stats b small { font-size: .72rem; font-weight: 700; color: #8a96b3; }
@media (min-width: 760px) {
  .sf { grid-template-columns: 1.15fr 1fr; align-items: end; padding: 1.1rem 1.2rem; }
  .sf-period { grid-column: 1; }
  .sf-toggles { grid-column: 2; }
  .sf-selects { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); grid-row: 2; }
  .sf-active { grid-column: 1 / -1; }
  .sf-stats b { font-size: 1.5rem; }
}
@media (max-width: 400px) { .seg-o span { font-size: .76rem; padding: .3rem .2rem; } .sf-stats b { font-size: 1.1rem; } .sf { padding: .85rem; } }

/* ===== Donas: tarjetas más limpias, leyenda con barras ===== */
.donut-card { background: #fff; border: 1px solid #e3eaf8; border-radius: 22px; padding: 1.15rem 1.15rem 1.25rem; box-shadow: 0 18px 36px -30px rgba(13, 42, 143, .55); gap: 1.1rem; }
.donut-card h3 { display: flex; align-items: center; gap: .6rem; margin: 0; font-size: 1.05rem; }
.donut-card h3 > span { display: grid; }
.donut-card h3 small { margin: 0; }
.dc-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(145deg, #2f6bff, #1238c4); color: #fff; flex: none; }
.dc-ico .ico { width: 18px; height: 18px; }
.dc-ico-low { background: #eef3ff; color: #1e50e0; }
.donut { filter: drop-shadow(0 12px 18px rgba(18, 56, 196, .18)); }
.legend { gap: .7rem; }
.legend li { grid-template-columns: 12px 1fr auto; row-gap: .3rem; padding: .6rem .7rem; border-radius: 14px; background: #f6f8fe; align-items: center; }
.legend i { border-radius: 50%; width: 10px; height: 10px; }
.legend .lg-name { white-space: nowrap; font-size: .88rem; }
.legend b { font-size: .9rem; }
.legend em { margin-top: 0; }
.legend .lg-bar { grid-column: 1 / -1; display: block; height: 6px; border-radius: 6px; background: #e3e9f8; overflow: hidden; }
.legend .lg-bar i { display: block; height: 100%; border-radius: 6px; width: 0; }
.no-sales { padding: .6rem .75rem; border-radius: 12px; background: #f6f8fe; }
@media (max-width: 759px) {
  .sf-toggles { grid-template-columns: 1fr; gap: .8rem; }
  .sf-stats { grid-template-columns: 1fr 1fr; }
  .sf-stats div:nth-child(2) { grid-column: 1 / -1; order: -1; background: linear-gradient(145deg, #2f6bff, #1238c4); border-color: transparent; }
  .sf-stats div:nth-child(2) span { color: rgba(255, 255, 255, .8); }
  .sf-stats div:nth-child(2) b { color: #fff; font-size: 1.6rem; }
}
@media (min-width: 760px) { .sf-stats div:nth-child(2) b { color: #1238c4; } }
.sf-stats .sf-ctx { font-style: normal; font-size: .72rem; font-weight: 700; color: #6b7896; }
@media (max-width: 759px) { .sf-stats div:nth-child(2) .sf-ctx { color: rgba(255, 255, 255, .85); } }
.seg-6 { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 560px) { .seg-6 { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 760px) { .sf-selects { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .sf-selects { grid-template-columns: repeat(4, 1fr); } }
.sf-sel select { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }

/* Señal débil: botón que se está guardando (se nota que el toque llegó) y botón «Actualizar» en el aviso */
button.is-busy { position: relative; pointer-events: none; opacity: .85; }
button.is-busy::after { content: ""; width: 14px; height: 14px; margin-left: .5rem; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; vertical-align: -2px; animation: busyspin .7s linear infinite; }
@keyframes busyspin { to { transform: rotate(360deg); } }
.net-btn { margin-left: .5rem; padding: .3rem .8rem; border-radius: 999px; border: 0; background: #fff; color: #15803d; font: inherit; font-weight: 800; font-size: .78rem; cursor: pointer; }

/* Nota de despacho (pago / días de crédito): en el iPhone la fecha y el vendedor se montaban y salían del recuadro */
.credit-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
.credit-row .field, .cxc-dates .field { min-width: 0; }
.credit-row input, .credit-row select, .cxc-dates input, .cxc-dates select { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
.credit-row select, .cxc-dates select { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; padding-right: 2rem; }
input[type="date"] { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; display: block; text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
@media (max-width: 520px) { .credit-row { grid-template-columns: 1fr; } }
.panel p.small.muted + form .credit-row { margin-top: .7rem; }

/* Gráficos de los cuadros del Panel: nunca tocan el texto.
   Computadora: van en su propia franja al pie del cuadro, debajo del texto.
   Teléfono: suben a la esquina de arriba, al lado del icono (ahí no hay nada). */
.kpi .kpi-spark { position: static; display: block; flex-shrink: 0; align-self: flex-end; margin-top: auto; padding-top: .55rem; box-sizing: content-box; }
@media (max-width: 520px) {
  .kpi .kpi-spark { position: absolute; top: calc(1rem + 9px); right: 1rem; bottom: auto; margin: 0; padding: 0; width: 78px; height: 28px; opacity: .8; }
}
@media (max-width: 380px) { .kpi .kpi-spark { width: 58px; height: 22px; top: calc(1rem + 12px); right: .8rem; } }

/* v129 · Panel: Cuentas por cobrar en rojo metalizado (glassy) y Ganancia con rayado diagonal */
/* Cuentas por cobrar: rojo metalizado con el mismo efecto glassy */
.kpi.kpi-cxc { background:
    linear-gradient(135deg, #ff7b7b 0%, #e5323c 22%, #b3121f 52%, #7d0a14 78%, #a3172a 100%) !important;
  box-shadow: 0 22px 44px -22px rgba(125,10,20,.85), inset 0 1px 0 rgba(255,255,255,.35), inset 0 -1px 0 rgba(0,0,0,.25); }
.kpi.kpi-cxc:hover { box-shadow: 0 26px 48px -22px rgba(125,10,20,.9), inset 0 1px 0 rgba(255,255,255,.4); }
.kpi.kpi-cxc .kpi-chip.is-warn { background: #fff; border-color: #fff; color: #9b111e; box-shadow: 0 6px 16px -8px rgba(0,0,0,.4); }

/* Ganancia: el mismo azul, con textura de rayado diagonal fino */
.mp.is-up { background: radial-gradient(60% 120% at 100% 0%, rgba(120,190,255,.35), transparent 60%), linear-gradient(135deg, #1e50e0, #0d2a8f); position: relative; overflow: hidden; isolation: isolate; }
.mp.is-up::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.11) 0 1px, transparent 1px 8px);
  -webkit-mask-image: linear-gradient(100deg, rgba(0,0,0,.6), #000 45%); mask-image: linear-gradient(100deg, rgba(0,0,0,.6), #000 45%); }

/* v130 · Ventas de hoy / del mes: encabezado con la fecha, raya divisoria en el centro exacto y pie con promedios (sin huecos vacíos) */
.kt-id { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.kt-head { display: grid; gap: .1rem; min-width: 0; }
.kt-head b { font-size: 1.02rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.kt-head small { font-size: .76rem; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-today .kpi-split { margin-top: auto; padding-top: 1rem; }
.kpi-today .ks-col { padding-right: clamp(.9rem, 4cqi, 1.6rem); }
.kpi-today .ks-col + .ks-col, .kpis .kpi-today .ks-col + .ks-col { margin-left: 0; padding-left: clamp(.9rem, 4cqi, 1.6rem); padding-right: 0; }
.kt-foot { display: grid; grid-template-columns: 1fr 1fr; margin-top: 1rem; border-radius: 14px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); }
.kt-foot > span { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding: .55rem clamp(.7rem, 3.5cqi, 1rem); min-width: 0; }
.kt-foot > span + span { border-left: 1px solid rgba(255,255,255,.16); }
.kt-foot small { font-size: .72rem; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kt-foot b { font-size: .86rem; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kt-foot > span { display: grid; gap: .1rem; }

/* v131 · Reporte de ventas (admin/reporte.php): pasos numerados, casillas tipo tarjeta y botones grandes */
.rp { display: grid; gap: 1rem; max-width: 860px; }
.rp-step { display: grid; gap: .9rem; }
.rp-head { display: flex; align-items: flex-start; gap: .8rem; flex-wrap: wrap; }
.rp-head > div:first-of-type { flex: 1; min-width: 200px; }
.rp-head h2 { margin: 0; font-size: 1.08rem; }
.rp-head p { margin: .15rem 0 0; }
.rp-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-weight: 800; font-size: .9rem; color: #fff; background: linear-gradient(145deg, #2f6bff, #1238c4); box-shadow: 0 8px 16px -10px rgba(18,56,196,.9); }
.rp-all { display: flex; gap: .4rem; }
.seg-3 { grid-template-columns: repeat(3, 1fr); }
.rp-dates { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.rp-dates input[type=date] { -webkit-appearance: none; appearance: none; min-width: 0; width: 100%; }
.rp-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .55rem; }
.rp-check { position: relative; display: flex; align-items: center; gap: .65rem; padding: .7rem .85rem; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; font-size: .9rem; color: #22305a; transition: border-color .15s, background .15s; }
.rp-check input { position: absolute; opacity: 0; pointer-events: none; }
.rp-check i { width: 20px; height: 20px; border-radius: 6px; border: 2px solid #b9c6e8; flex-shrink: 0; display: grid; place-items: center; transition: background .15s, border-color .15s; }
.rp-check input:checked ~ i { background: #1e50e0; border-color: #1e50e0; }
.rp-check input:checked ~ i::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.rp-check:has(input:checked) { border-color: #9db7ff; background: #f3f7ff; }
.rp-check input:focus-visible ~ i { outline: 2px solid #1e50e0; outline-offset: 2px; }
.rp-check span { display: grid; gap: .1rem; }
.rp-check small { font-weight: 500; color: var(--ink-mute); font-size: .8rem; }
.rp-fixed { margin: 0; display: flex; gap: .5rem; align-items: flex-start; font-size: .86rem; color: #234; padding: .7rem .85rem; border-radius: 12px; background: #eaf4ff; }
.rp-fixed svg { width: 18px; height: 18px; flex-shrink: 0; color: #1e50e0; margin-top: 1px; }
.rp-topn { max-width: 220px; }
.rp-actions { display: flex; flex-wrap: wrap; gap: .7rem; padding: .2rem 0 1rem; }
.rp-actions .btn { flex: 1 1 200px; justify-content: center; padding: .85rem 1.2rem; font-size: 1rem; }
.rp-actions .btn svg { width: 18px; height: 18px; }
@media (max-width: 520px) { .seg-5 { grid-template-columns: repeat(2, 1fr); } .seg-5 .seg-o:last-child { grid-column: 1 / -1; } .seg-3 { grid-template-columns: 1fr; } .rp-checks { grid-template-columns: 1fr; } }

/* Panel: botón «Descargar reporte de ventas» junto al saludo */
.page-head .ph-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.btn-report svg { width: 18px; height: 18px; }

/* v132 · Inventario: «Stock actual» con seguro. Bloqueado (gris, candado) hasta tocar el lápiz */
.stk { display: inline-flex; align-items: center; gap: .4rem; justify-content: flex-end; }
.stk input[readonly] { background: #f2f5fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a97b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") no-repeat 10px center / 14px 14px;
  padding-left: 30px; color: #55628a; border-color: #dfe5f2; cursor: default; box-shadow: none; }
.stk input[readonly]:focus { outline: none; }
.stk.is-open input { border-color: #1e50e0; background: #fff; box-shadow: 0 0 0 3px rgba(30,80,224,.16); color: var(--ink); }
.stk-btn { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; border: 1px solid #cfdcff; background: #eef3ff; color: #1e50e0; cursor: pointer; transition: background .15s, color .15s, transform .15s; }
.stk-btn svg { width: 16px; height: 16px; }
.stk-btn:hover { background: #dfe8ff; }
.stk.is-open .stk-btn { background: #1e50e0; border-color: #1e50e0; color: #fff; }
.stk.is-hint .stk-btn { animation: stkhint .6s ease; }
@keyframes stkhint { 25% { transform: scale(1.18); background: #1e50e0; color: #fff; } 60% { transform: scale(.95); } }
@media (prefers-reduced-motion: reduce) { .stk.is-hint .stk-btn { animation: none; } }
.table-inv .stk .in-price { width: 132px; max-width: none; }

/* v133/v138 · Inventario: cada producto es una tarjeta (celular y computadora, como pidió); en pantallas anchas van en columnas */
@media all {
 .table-inv thead { display: none; }
 .table-inv, .table-inv tbody { display: block; width: 100%; }
 .table-wrap:has(.table-inv) { overflow: visible; background: none; box-shadow: none; border: 0; padding: 0; }
 .table-inv td { border: 0 !important; padding: 0 !important; min-width: 0 !important; width: auto !important; }
}
@media all {
 .table-inv tr { position: relative; display: grid; grid-template-columns: 1.25fr 1fr 1fr; grid-template-areas: "name name name" "st st st" "stk add low" "his his his";
   gap: .55rem .5rem; padding: .9rem; margin-bottom: .75rem; background: #fff; border-radius: 18px; border: 1px solid #e3e9f6; box-shadow: 0 10px 24px -20px rgba(13,42,143,.5); }
 .table-inv td.thumb { position: absolute; left: .9rem; top: .9rem; }
 .table-inv .thumb img { width: 58px !important; height: 58px !important; padding: 4px !important; border-radius: 12px !important; }
 .table-inv td:nth-child(2) { grid-area: name; padding-left: 70px !important; min-height: 30px; }
 .table-inv td:nth-child(2) b { font-size: .98rem; line-height: 1.2; }
 .table-inv td:nth-child(3) { grid-area: st; padding-left: 70px !important; }
 .table-inv td:nth-child(4) { grid-area: stk; } .table-inv td:nth-child(5) { grid-area: add; } .table-inv td:nth-child(6) { grid-area: low; }
 .table-inv td:nth-child(7) { grid-area: his; }
 .table-inv td:nth-child(4), .table-inv td:nth-child(5), .table-inv td:nth-child(6) { display: grid; gap: .25rem; text-align: left; padding-top: .55rem !important; border-top: 1px solid #eef2fa !important; }
 .table-inv td:nth-child(4)::before { content: "Stock actual"; } .table-inv td:nth-child(5)::before { content: "+ Entró"; } .table-inv td:nth-child(6)::before { content: "Avisar con"; }
 .table-inv td:nth-child(4)::before, .table-inv td:nth-child(5)::before, .table-inv td:nth-child(6)::before { font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #5b6b99; }
 .table-inv .in-price { width: 100% !important; max-width: none !important; min-width: 0; height: 40px; text-align: center; }
 .table-inv .stk { display: flex; gap: .3rem; } .table-inv .stk input { flex: 1; padding-left: 24px !important; background-position: 7px center !important; } .table-inv .stk-btn { width: 34px; height: 40px; }
 .table-inv td:nth-child(7) .btn { width: 100%; justify-content: center; }
 .table-inv .inv-acts { min-width: 0; } .table-inv .so-out { width: 100%; }
}

/* v134 · Celular (admin): barra de accesos abajo con «Tomar pedido» grande en el centro */
.tabbar { display: none; }
@media (max-width: 820px) {
  .tabbar { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 70; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    padding: .45rem .3rem .5rem; border-radius: 24px; background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border: 1px solid rgba(220,228,245,.95); box-shadow: 0 18px 40px -16px rgba(13,42,143,.55); }
  .tabbar a { position: relative; display: grid; justify-items: center; gap: .2rem; padding-top: .2rem; color: #6a7698; font-size: .66rem; font-weight: 700; text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.on { color: #1e50e0; }
  .tabbar a:active { transform: scale(.94); }
  .tb-badge { position: absolute; top: -3px; left: 54%; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #e5484d; color: #fff; font-size: .65rem; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
  .tabbar .tb-main { margin-top: -30px; color: #1238c4; }
  .tabbar .tb-main i { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #3b74ff, #1238c4); box-shadow: 0 14px 26px -10px rgba(18,56,196,.8), 0 0 0 5px #fff; }
  .tabbar .tb-main svg { width: 28px; height: 28px; stroke-width: 2.6; }
  body:has(.tabbar) main { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  body:has(.tabbar) .sticky-save { position: fixed; left: 12px; right: 12px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 69; padding: 0; background: none; pointer-events: none; }
  body:has(.tabbar) .sticky-save .btn { pointer-events: auto; box-shadow: 0 14px 28px -12px rgba(18,56,196,.7); }
  body:has(.tabbar) .toast, body:has(.tabbar) .share-note { bottom: calc(100px + env(safe-area-inset-bottom)); }
  body:has(.tabbar) .net-pend { bottom: calc(96px + env(safe-area-inset-bottom)); }
  body:has(.tabbar) .net-list { bottom: calc(144px + env(safe-area-inset-bottom)); }
}
@media print { .tabbar { display: none !important; } }

/* v135: flecha «Volver al Panel» en Tomar pedido / Mi pedido */
.back-top .link { gap: .45rem; padding: .5rem .95rem .5rem .75rem; border-radius: 999px; background: rgba(30,80,224,.08); color: #1e50e0; text-decoration: none; }
.back-top .link svg { width: 18px; height: 18px; }
.back-top .link:hover, .back-top .link:active { background: rgba(30,80,224,.16); }

/* v136: notas internas (Propuesta B) — tarjeta protegida, el lápiz la abre para escribir */
.note-lock { display: grid; gap: .45rem; }
.note-lock .nl-label { font-weight: 700; font-size: .92rem; }
.note-lock .nl-label em { font-weight: 500; }
.note-lock [hidden] { display: none !important; }
.nb { position: relative; padding: 1rem 3.6rem 1rem 1.15rem; border-radius: 16px; background: linear-gradient(180deg, #f4f7ff, #eef3ff); border: 1px solid #d9e3fb; box-shadow: inset 4px 0 0 #1e50e0; }
.nb-top { display: flex; align-items: center; gap: .5rem; margin-bottom: .55rem; }
.nb-lk { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #1e50e0; color: #fff; }
.nb-lk svg { width: 14px; height: 14px; }
.nb-top small { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #5b6b99; }
.nb-pen { position: absolute; top: .7rem; right: .7rem; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; padding: 0; background: #fff; color: #1e50e0; border: 1px solid #cfdcff; box-shadow: 0 6px 14px -8px rgba(13,42,143,.6); cursor: pointer; transition: transform .15s, background .15s; }
.nb-pen svg { width: 18px; height: 18px; }
.nb-pen:hover { background: #f4f7ff; }
.nb-pen:active { transform: scale(.94); }
.nb-txt { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .95rem; line-height: 1.55; color: #0d1f59; margin-right: -2.4rem; }
.nb-txt b { display: block; font-size: 1rem; font-weight: 800; margin: 0 2.4rem .15rem 0; }
.nb-meta { margin-top: .7rem; margin-right: -2.4rem; padding-top: .55rem; border-top: 1px dashed #cdd9f6; font-size: .75rem; color: #6a7698; }
.nb.is-hint .nb-pen { animation: nbhint .6s ease; }
@keyframes nbhint { 30% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(30,80,224,.18); } 60% { transform: scale(.95); } }
.nb-edit { display: grid; gap: .45rem; }
.nb-edit textarea { min-height: 96px; overflow: hidden; resize: none; line-height: 1.5; }
.nb-done { justify-self: end; display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .85rem; border-radius: 999px; border: 1px solid #cfdcff; background: #eef3ff; color: #1e50e0; font: inherit; font-size: .82rem; font-weight: 800; cursor: pointer; }
.nb-done svg { width: 14px; height: 14px; }

/* v137: salidas de inventario (Propuesta B) — «− Sacar» en cada producto, hoja desde abajo y pestaña «Salidas» */
.inv-acts { display: grid; gap: .4rem; justify-items: stretch; min-width: 150px; }
.inv-acts .btn { justify-content: center; }
.so-out { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; padding: .45rem .8rem; border-radius: 999px; border: 1px solid #f0c9c5; background: #fff6f5; color: #c0392b; font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer; white-space: nowrap; transition: background .15s, transform .15s; }
.so-out svg { width: 14px; height: 14px; }
.so-out span { font-weight: 700; }
.so-out:hover { background: #ffecea; }
.so-out:active { transform: scale(.97); }
.so-out:disabled { opacity: .45; cursor: not-allowed; }
.inv-acts { min-width: 210px; }
.inv-acts .so-out { width: 100%; padding: .55rem .9rem; }
.so-veil { position: fixed; inset: 0; z-index: 94; background: rgba(8,20,60,.45); }
.so-veil[hidden], .so-sheet[hidden], .so-newmot[hidden] { display: none !important; }
.so-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; display: grid; gap: .55rem; max-height: 92vh; overflow-y: auto; padding: .7rem 1.1rem calc(1.2rem + env(safe-area-inset-bottom));
  background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -20px 40px -20px rgba(8,20,60,.5); animation: soUp .25s cubic-bezier(.2,.8,.2,1); }
@keyframes soUp { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 700px) { .so-sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 460px; transform: translate(-50%, -50%); border-radius: 24px; animation: none; } .so-grab { display: none !important; } }
.so-grab { display: block; width: 44px; height: 5px; border-radius: 9px; background: #d6deef; margin: 0 auto .3rem; }
.so-x { position: absolute; top: .6rem; right: .7rem; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #eef3ff; color: #1e50e0; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.so-prod { display: grid; grid-template-columns: 52px 1fr; gap: .75rem; align-items: center; padding-right: 2.6rem; }
.so-prod img { width: 52px; height: 52px; object-fit: contain; border-radius: 12px; background: #f4f7ff; padding: 3px; }
.so-prod b { display: block; font-size: 1.02rem; color: #0d1f59; }
.so-prod small { color: #6a7698; font-size: .82rem; }
.so-l { margin: .35rem 0 0; font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #5b6b99; }
.so-qty { display: grid; grid-template-columns: 56px 1fr 56px; height: 54px; border-radius: 16px; border: 1px solid #d6e0f5; overflow: hidden; background: #fff; }
.so-qty button { border: 0; background: #eef3ff; color: #1e50e0; font-size: 1.6rem; font-weight: 700; cursor: pointer; }
.so-qty button:active { background: #dfe8ff; }
.so-qty input { border: 0 !important; border-radius: 0 !important; text-align: center; font-weight: 800; font-size: 1.4rem; padding: 0 !important; box-shadow: none !important; color: #0d1f59; -moz-appearance: textfield; }
.so-qty input::-webkit-inner-spin-button, .so-qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.so-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.so-chip { position: relative; margin: 0; cursor: pointer; }
.so-chip input { position: absolute; opacity: 0; pointer-events: none; }
.so-chip span { display: inline-flex; align-items: center; gap: .3rem; padding: .5rem .85rem; border-radius: 999px; border: 1px solid #d6e0f5; background: #fff; font-size: .84rem; font-weight: 700; color: #3d4a6b; transition: background .15s, color .15s; }
.so-chip span svg { width: 14px; height: 14px; }
.so-chip input:checked + span { background: linear-gradient(145deg, #2f6bff, #1238c4); border-color: transparent; color: #fff; box-shadow: 0 8px 16px -10px rgba(18,56,196,.9); }
.so-chip input:focus-visible + span { outline: 2px solid #1e50e0; outline-offset: 2px; }
.so-chip-new span { border-style: dashed; color: #1e50e0; }
.so-sheet .field { margin: 0; }
.so-sheet .field em { font-style: normal; font-weight: 500; color: #6a7698; }
.so-grid { display: grid; grid-template-columns: 1fr 150px; gap: .6rem; margin-top: .2rem; }
@media (max-width: 520px) { .so-grid { grid-template-columns: 1fr; } .so-grid .field:last-child { max-width: 220px; } }
.so-go { margin-top: .4rem; }
.so-month { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: .5rem; }
.so-month h2 { margin: 0; text-align: center; font-size: 1.15rem; }
.so-nav { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #eef3ff; color: #1e50e0; font-size: 1.3rem; font-weight: 700; text-decoration: none; }
.so-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .9rem 0 .6rem; }
.so-stats div { padding: .8rem .9rem; border-radius: 16px; background: linear-gradient(180deg, #f4f7ff, #eef3ff); border: 1px solid #d9e3fb; }
.so-stats b { display: block; font-size: 1.4rem; color: #0d1f59; letter-spacing: -.02em; }
.so-stats span { font-size: .78rem; color: #5b6b99; font-weight: 700; }
.so-bymot { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .4rem; }
.so-bymot span { padding: .3rem .7rem; border-radius: 999px; background: #eef3ff; color: #1e50e0; font-size: .78rem; font-weight: 700; }
.so-tl { display: grid; gap: .75rem; margin: .8rem 0 0 .45rem; padding-left: 1.15rem; border-left: 2px solid #d9e3fb; }
.so-day { margin: .3rem 0 -.3rem -1.15rem; padding-left: .2rem; font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #5b6b99; background: #fff; }
.so-item { position: relative; display: grid; gap: .3rem; padding: .75rem .85rem; border-radius: 16px; border: 1px solid #e3e9f6; background: #fff; }
.so-item::before { content: ""; position: absolute; left: calc(-1.15rem - 7px); top: 1rem; width: 12px; height: 12px; border-radius: 50%; background: #1e50e0; box-shadow: 0 0 0 4px #e9effd; }
.so-t { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; }
.so-t b { font-size: .95rem; color: #0d1f59; line-height: 1.25; }
.so-t em { font-style: normal; font-weight: 800; font-size: 1.15rem; color: #c0392b; }
.so-tags { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.so-mot { padding: .14rem .55rem; border-radius: 999px; background: #1e50e0; color: #fff; font-size: .72rem; font-weight: 800; }
.so-det { font-size: .84rem; color: #26365f; }
.so-item small { color: #6a7698; font-size: .77rem; }
.so-item small:empty { display: none; }
.so-item form { justify-self: end; margin-top: -1.4rem; }
.so-undo { border: 0; background: none; padding: 0; font: inherit; font-size: .76rem; font-weight: 700; color: #6a7698; text-decoration: underline; cursor: pointer; }
.so-item.is-off { opacity: .6; }
.so-item.is-off::before { background: #aab6d6; }
.so-item.is-off .so-t em { text-decoration: line-through; color: #6a7698; }
.so-undone { color: #1e50e0 !important; font-weight: 700; }
body.so-lock { overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* v138: «Sacar» igual en computadora; botón grande en la pestaña Salidas con selector de producto */
.so-out-big { width: 100%; margin: 0 0 1rem; padding: .85rem 1rem; font-size: .95rem; border-radius: 16px; }
.so-out-big svg { width: 16px; height: 16px; }
@media (min-width: 700px) { .so-out-big { width: auto; } }
.so-pick[hidden] { display: none !important; }
.so-sheet.is-pick .so-prod small:empty::before { content: "Elige el producto abajo"; }
@media (min-width: 641px) {
 .table-inv tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: .9rem; }
 .table-inv tr { margin-bottom: 0; }
}

/* v140: Precios (Propuesta A) — tarjetas en computadora y celular, resumen arriba, precios con seguro (lápiz por producto) */
.pr-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin: 0 0 1rem; }
.pr-sum div { padding: .9rem 1rem; border-radius: 18px; background: #fff; border: 1px solid #e3e9f6; box-shadow: 0 12px 26px -22px rgba(13,42,143,.6); }
.pr-sum b { display: block; font-size: 1.5rem; color: #0d1f59; letter-spacing: -.02em; }
.pr-sum span { font-size: .78rem; font-weight: 700; color: #5b6b99; }
.pr-sum .is-warn b { color: #1e50e0; }
@media (max-width: 640px) { .pr-sum { grid-template-columns: 1fr 1fr; gap: .55rem; } .pr-sum b { font-size: 1.25rem; } }
.table-pr thead { display: none; }
.table-pr, .table-pr tbody { display: block; width: 100%; }
.table-wrap:has(.table-pr) { overflow: visible; background: none; box-shadow: none; border: 0; padding: 0; }
.table-pr tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
@media (max-width: 640px) { .table-pr tbody { grid-template-columns: 1fr; gap: .75rem; } }
.table-pr tr { position: relative; display: grid; grid-template-columns: repeat(var(--tiers, 3), minmax(0, 1fr)); grid-auto-flow: row dense; gap: .6rem; padding: 1rem; align-content: start;
  background: #fff; border-radius: 20px; border: 1px solid #e3e9f6; box-shadow: 0 14px 30px -24px rgba(13,42,143,.6); transition: border-color .15s, box-shadow .15s; }
.table-pr tr.is-open { border-color: #9fb8ff; box-shadow: 0 0 0 3px rgba(30,80,224,.12), 0 14px 30px -24px rgba(13,42,143,.6); }
.table-pr td { border: 0 !important; padding: 0 !important; min-width: 0 !important; width: auto !important; background: none !important; }
.table-pr td.thumb { position: absolute; left: 1rem; top: 1rem; }
.table-pr .thumb img { width: 74px !important; height: 74px !important; padding: 5px !important; border-radius: 14px !important; }
.table-pr tr:hover .thumb img { transform: none; }
.table-pr .pr-name { grid-column: 1 / -1; padding: 0 3rem 0 88px !important; min-height: 78px; }
.table-pr .pr-name b { font-size: 1.02rem; line-height: 1.25; }
.pr-pen { position: absolute; right: 1rem; top: 1rem; width: 40px; height: 40px; border-radius: 12px; border: 1px solid #cfdcff; background: #eef3ff; color: #1e50e0; display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s, transform .15s; }
.pr-pen svg { width: 17px; height: 17px; }
.pr-pen:active { transform: scale(.94); }
.table-pr tr.is-open .pr-pen { background: #1e50e0; border-color: #1e50e0; color: #fff; }
.table-pr tr.is-hint .pr-pen { animation: stkhint .6s ease; }
.table-pr .pr-tier { display: grid; gap: .3rem; align-content: end; text-align: left; padding-top: .7rem !important; border-top: 1px solid #eef2fa !important; }
.table-pr .pr-tier::before { content: attr(data-label); font-size: .64rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #5b6b99; line-height: 1.2; }
.pr-in { position: relative; display: block; }
.pr-in i { position: absolute; left: 30px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: .85rem; font-weight: 800; color: #8a97b8; pointer-events: none; }
.table-pr .in-price { width: 100% !important; max-width: none !important; height: 44px; padding: 0 .7rem 0 2.6rem !important; text-align: right; font-weight: 800; font-size: 1.02rem; color: #0d1f59; border-radius: 12px; }
.table-pr .in-price[readonly] { background: #f2f5fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3afcc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") no-repeat 11px center / 13px 13px;
  border-color: #e6ebf6; cursor: default; }
.table-pr .in-price[readonly]:focus { box-shadow: none; border-color: #e6ebf6; }
.table-pr .pr-min, .table-pr tr > td:nth-last-child(2), .table-pr tr > td:last-child { align-self: center; border-top: 1px solid #eef2fa !important; padding-top: .7rem !important; }
.table-pr .pr-min { text-align: left; font-size: .82rem; color: #5b6b99; }
.table-pr .pr-min b { color: #0d1f59; }
.table-pr tr > td:nth-last-child(2) { text-align: center; }
.table-pr tr > td:last-child { text-align: right; }
.table-pr tr.is-off td { opacity: 1; }
.table-pr tr.is-off { background: #fafbfe; }
.table-pr tr.is-off .thumb img, .table-pr tr.is-off .pr-name b { opacity: .6; }

/* v140: buscador de productos (Precios e Inventario) */
.pr-search { position: relative; margin: 0 0 1rem; }
.pr-search svg { position: absolute; left: 1.05rem; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: #1e50e0; pointer-events: none; }
.pr-search input { width: 100%; height: 54px; padding: 0 3rem 0 3.1rem !important; border-radius: 18px !important; border: 1px solid #d6e0f5; background: #fff; font-size: 1rem;
  box-shadow: 0 12px 26px -22px rgba(13,42,143,.6); -webkit-appearance: none; appearance: none; }
.pr-search input::-webkit-search-cancel-button { display: none; }
.pr-search button { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 0; background: #eef3ff; color: #1e50e0; font-size: 1.35rem; line-height: 1; cursor: pointer; }
.pr-search button[hidden] { display: none; }
.pr-noresult { margin: 0 0 1rem; padding: 1.1rem; border-radius: 16px; background: #fff; border: 1px dashed #cdd9f6; text-align: center; color: #5b6b99; }
.pr-noresult[hidden] { display: none; }
.table-pr tr.is-hidden, .table-inv tr.is-hidden { display: none !important; }

/* v141: Panel — «Tomar pedido nuevo» junto al reporte, los dos en vidrio con borde blanco (Opción 1) */
.page-head .btn-glass { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: 999px; color: #fff; text-decoration: none; font-weight: 700;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.4); box-shadow: none; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background .15s, transform .15s; }
.page-head .btn-glass:hover { background: rgba(255,255,255,.2); color: #fff; }
.page-head .btn-glass:active { transform: scale(.97); }
.page-head .btn-take { padding: .8rem 1.4rem .8rem .85rem; font-size: 1.05rem; font-weight: 800; }
.page-head .btn-take i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.22); }
.page-head .btn-take svg { width: 18px; height: 18px; stroke-width: 2.8; }
@media (max-width: 820px) { .page-head .btn-take { display: none; } }

/* v142: catálogo — descripción corta en la tarjeta (3 líneas) y precio alineado abajo; la completa sale al abrir el producto */
.grid-products .pcard .desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.desc-more { align-self: flex-start; margin: -.1rem 0 .2rem; padding: 0; border: 0; background: none; font: inherit; font-size: .82rem; font-weight: 700; color: #1e50e0; cursor: pointer; }
.desc-more:hover { text-decoration: underline; }
.pmodal-body .desc-more, .pmodal-body span.desc-more { display: none; }
.grid-products .pcard .price-row { margin-top: auto; padding-top: .35rem; }

/* v144 · Tomar pedido: precio unitario con candado + lápiz (solo este pedido) */
.cp { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; margin-top: .35rem; }
.cp [hidden] { display: none !important; }
.cp-view { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; padding: .3rem .35rem .3rem .65rem; border-radius: 999px; border: 1px solid #d6e0f5; background: #f5f8ff; color: var(--ink); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.cp-view:hover { border-color: #9db7ff; background: #eef3ff; }
.cp-view > svg { width: 13px; height: 13px; color: #8a97b8; flex: none; }
.cp-view b { font-size: .98rem; font-weight: 800; }
.cp-und { font-size: .8rem; color: var(--muted, #6b769b); }
.cp-pen { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #1e50e0; color: #fff; margin-left: .15rem; }
.cp-pen svg { width: 14px; height: 14px; }
.cp.is-special .cp-view { border-color: #1e50e0; background: #e8efff; box-shadow: 0 0 0 3px rgba(30, 80, 224, .1); }
.cp.is-special .cp-view b { color: #1238c4; }
.cp-edit { display: inline-flex; align-items: center; gap: .4rem; }
.cp-in { position: relative; display: inline-flex; align-items: center; }
.cp-in span { position: absolute; left: .75rem; font-weight: 800; color: #1238c4; pointer-events: none; }
.cp-in input { width: 118px; height: 40px; padding: 0 .7rem 0 1.6rem; border: 1.5px solid #1e50e0; border-radius: 12px; font-weight: 800; font-size: 1rem; box-shadow: 0 0 0 4px rgba(30, 80, 224, .12); }
.cp-ok { display: inline-flex; align-items: center; gap: .35rem; height: 40px; padding: 0 .9rem; border: 0; border-radius: 12px; background: #1e50e0; color: #fff; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; }
.cp-ok svg { width: 14px; height: 14px; }
.cp-note { flex-basis: 100%; font-size: .8rem; color: #1238c4; font-weight: 600; }
.cp-note s { color: var(--muted, #6b769b); font-weight: 500; }
.cp-note .link { border: 0; background: none; padding: 0; margin-left: .3rem; font: inherit; font-weight: 700; color: #1e50e0; text-decoration: underline; cursor: pointer; }

/* v145 · ¿A qué cuenta entró el dinero? (marcar nota pagada) */
.acc-pick { border: 0; margin: .2rem 0 .7rem; padding: 0; min-width: 0; }
.acc-pick legend { font-weight: 700; font-size: .92rem; margin-bottom: .45rem; padding: 0; }
.acc-pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.acc-opt { position: relative; display: block; cursor: pointer; }
.acc-opt input { position: absolute; opacity: 0; pointer-events: none; }
.acc-opt span { display: grid; gap: .1rem; padding: .65rem .75rem .65rem 2.1rem; border: 1.5px solid #d6e0f5; border-radius: 14px; background: #fff; transition: border-color .15s, background .15s, box-shadow .15s; position: relative; min-height: 100%; }
.acc-opt span::before { content: ""; position: absolute; left: .7rem; top: .85rem; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #b8c6e6; background: #fff; transition: border .15s; }
.acc-opt b { font-size: .95rem; line-height: 1.2; overflow-wrap: anywhere; }
.acc-opt small { font-size: .75rem; color: var(--muted, #6b769b); }
.acc-opt:hover span { border-color: #9db7ff; }
.acc-opt input:checked + span { border-color: #1e50e0; background: #eef3ff; box-shadow: 0 0 0 3px rgba(30, 80, 224, .12); }
.acc-opt input:checked + span::before { border: 5px solid #1e50e0; }
.acc-opt input:focus-visible + span { outline: 2px solid #1e50e0; outline-offset: 2px; }
.pay-acc { margin: .3rem 0 .8rem; }
.pay-acc-now { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 .5rem; font-size: .95rem; }
.pay-acc-now svg { width: 18px; height: 18px; color: #1e50e0; }
.pay-acc-now .link { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: #1e50e0; text-decoration: underline; cursor: pointer; margin-left: auto; }
.pay-acc .pay-acc-form { display: none; }
.pay-acc.is-nocta, .pay-acc.is-editing { padding: .8rem; border-radius: 16px; background: #f3f7ff; border: 1.5px dashed #9db7ff; }
.pay-acc.is-nocta .pay-acc-form, .pay-acc.is-editing .pay-acc-form { display: block; }
.pay-acc.is-nocta .pay-acc-now { color: #0d2a8f; }
