@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@600;700&family=Nunito:wght@400;600;700&family=Pacifico&display=swap');

/* Las Más Fresas · liquid glass en rosado y blanco
   Superficies translúcidas con desenfoque sobre un fondo rosado suave. */

:root {
  /* Color */
  --white: #ffffff;
  --red-fresa: #e43141;
  --pink-50: #fff5f8;
  --pink-100: #fae2e8;
  --pink-200: #f0c0c8;
  --pink-300: #fc90c0;
  --pink-500: #c72a63;
  --pink-600: #9f1f4e;
  --pink-700: #7b173b;
  --ink-1: #3a1226;
  --ink-2: #7a4a60;
  --ok: #5a987d;
  --ok-bg: rgba(90, 152, 125, 0.16);
  --danger: #c4162a;
  --danger-bg: rgba(255, 224, 228, 0.8);

  /* Roles */
  --text: var(--ink-1);
  --text-muted: var(--ink-2);
  --accent: var(--pink-600);
  --border: rgba(159, 31, 78, 0.12);

  /* Vidrio */
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-soft: rgba(255, 255, 255, 0.35);
  --glass-edge: rgba(255, 255, 255, 0.85);
  --glass-blur: blur(22px) saturate(170%);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 30px rgba(199, 42, 99, 0.12);
  --glass-shadow-sm: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 3px 10px rgba(199, 42, 99, 0.1);
  --glass-highlight: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.30) 42%, rgba(255, 227, 236, 0.24));
  --glass-shadow-float: inset 0 1px 0 rgba(255, 255, 255, 0.92), inset 0 -1px 0 rgba(159, 31, 78, 0.05), 0 18px 45px rgba(159, 31, 78, 0.14), 0 2px 8px rgba(159, 31, 78, 0.06);

  /* Espaciado (base 4px) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 36px;
  --space-7: 48px;

  /* Radios */
  --radius-sm: 24px;
  --radius-md: 30px;

  /* Tipografía */
  --font: "Nunito", "Segoe UI", Arial, sans-serif;
  --font-display: "Fredoka", "Nunito", sans-serif;
  --font-script: "Pacifico", cursive;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-lg: 16px;
  --text-xl: 24px;
  --text-2xl: 30px;
  --w-regular: 400;
  --w-medium: 600;

  /* Movimiento */
  --t-fast: 0.15s;
  --t-base: 0.25s;
}

/* Recetas, arqueo y estado de sincronización */
.recipe-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-height:48vh;overflow:auto;padding:2px}
.cash-close-summary .stats{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:16px}
html[data-cloud="pending"] .account-link::after{content:"";width:8px;height:8px;border-radius:50%;background:#f59e0b;box-shadow:0 0 0 3px #fef3c7;position:absolute;right:8px;top:8px}
@media(max-width:640px){.recipe-grid{grid-template-columns:1fr}}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  position: relative; min-height: 100vh; overflow-x: hidden;
  margin: 0; font-family: var(--font); font-size: var(--text-base); font-weight: var(--w-regular);
  color: var(--text); line-height: 1.5;
  background:
    radial-gradient(60vw 50vh at 8% 0%, var(--pink-200), transparent 70%),
    radial-gradient(50vw 45vh at 100% 12%, var(--pink-300), transparent 65%),
    radial-gradient(55vw 50vh at 70% 100%, var(--pink-200), transparent 70%),
    radial-gradient(40vw 40vh at 0% 90%, var(--pink-100), transparent 70%),
    var(--pink-50);
  background-attachment: fixed;
}
body::before, body::after {
  content: ""; position: fixed; z-index: 0; pointer-events: none; border-radius: 50%; filter: blur(10px); opacity: 0.62;
  will-change: transform;
}
body::before {
  width: 34vw; height: 34vw; min-width: 340px; min-height: 340px; left: -10vw; top: 16vh;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.88), rgba(255,159,190,.52) 42%, rgba(224,69,126,.10) 70%);
  animation: ambientFloat 18s ease-in-out infinite alternate;
}
body::after {
  width: 30vw; height: 30vw; min-width: 300px; min-height: 300px; right: -8vw; bottom: -5vh;
  background: radial-gradient(circle at 40% 40%, rgba(255,255,255,.78), rgba(255,201,218,.58) 44%, rgba(199,42,99,.10) 72%);
  animation: ambientFloat 22s ease-in-out -7s infinite alternate-reverse;
}
.app { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* ---------- Acceso ---------- */
.login-screen { position: relative; z-index: 10; min-height: 100vh; display: grid; place-items: center; overflow: hidden; padding: 24px; }
.login-screen::before { content: ""; position: absolute; inset: 0; background: linear-gradient(145deg, rgba(255,245,248,.34), rgba(255,201,218,.22)); backdrop-filter: blur(3px); }
.login-orb { position: absolute; border-radius: 50%; filter: blur(3px); pointer-events: none; }
.login-orb-one { width: 330px; height: 330px; top: -90px; right: 8%; background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.9), rgba(255,159,190,.48) 45%, transparent 72%); animation: ambientFloat 12s ease-in-out infinite alternate; }
.login-orb-two { width: 280px; height: 280px; bottom: -70px; left: 6%; background: radial-gradient(circle at 45% 40%, rgba(255,255,255,.86), rgba(224,69,126,.22) 48%, transparent 72%); animation: ambientFloat 15s ease-in-out -4s infinite alternate-reverse; }
.login-card { position: relative; width: min(440px, 100%); padding: 36px; border: 1px solid rgba(255,255,255,.94); border-radius: 36px; background: linear-gradient(145deg, rgba(255,255,255,.76), rgba(255,232,241,.54)); box-shadow: inset 0 1px 0 #fff, 0 30px 80px rgba(126,28,67,.2), 0 4px 18px rgba(199,42,99,.1); backdrop-filter: blur(30px) saturate(175%); -webkit-backdrop-filter: blur(30px) saturate(175%); animation: loginReveal .55s cubic-bezier(.2,.8,.2,1) both; }
.login-card::before { content: ""; position: absolute; inset: 1px 12% auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.95), transparent); }
.login-brand { display: flex; justify-content: center; margin-bottom: 20px; }
.login-logo-shell { width: 78px; height: 78px; display: grid; place-items: center; border-radius: 25px; background: rgba(255,255,255,.58); border: 1px solid rgba(255,255,255,.9); box-shadow: var(--glass-shadow-float); backdrop-filter: blur(18px); }
.login-logo-shell img { width: 62px; height: 62px; object-fit: contain; }
.login-heading { text-align: center; margin-bottom: 26px; }
.login-eyebrow { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.login-heading h1 { margin: 5px 0 4px; font-size: 28px; letter-spacing: -.03em; }
.login-heading p { margin: 0; color: var(--text-muted); font-size: 13px; }
.login-field { display: block; margin-top: 15px; color: var(--text); font-size: 12px; font-weight: 600; }
.login-control { display: flex; align-items: center; gap: 10px; margin-top: 7px; padding: 0 14px; min-height: 52px; border: 1px solid rgba(159,31,78,.13); border-radius: 18px; background: rgba(255,255,255,.62); box-shadow: inset 0 1px 2px rgba(159,31,78,.04), 0 1px 0 rgba(255,255,255,.9); transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast); }
.login-control:focus-within { border-color: rgba(224,69,126,.6); background: rgba(255,255,255,.82); box-shadow: 0 0 0 4px rgba(224,69,126,.11), inset 0 1px 0 #fff; }
.login-control > svg, .password-toggle svg { width: 19px; height: 19px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-control input { width: 100%; padding: 0; border: 0; border-radius: 0; outline: 0; background: transparent; box-shadow: none; color: var(--text); font: inherit; font-size: 14px; appearance: none; }
.password-toggle { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.password-toggle:hover { background: rgba(224,69,126,.09); }
.login-error { margin: 12px 0 0; padding: 9px 12px; color: var(--danger); text-align: center; font-size: 12px; border-radius: 12px; background: var(--danger-bg); }
.login-submit { width: 100%; min-height: 52px; margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff; font: inherit; font-weight: 700; border: 1px solid rgba(255,255,255,.42); border-radius: 18px; background: linear-gradient(145deg, var(--pink-500), var(--pink-600)); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 12px 26px rgba(199,42,99,.3); cursor: pointer; transition: transform var(--t-fast), box-shadow var(--t-fast); }
.login-submit:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 16px 32px rgba(199,42,99,.34); }
.login-submit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.login-security { margin: 17px 0 0; color: var(--text-muted); text-align: center; font-size: 11px; }
.login-security span { color: var(--ok); }
@keyframes loginReveal { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.admin-users { display: grid; gap: 10px; padding: 14px; }
.admin-user { display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid rgba(255,255,255,.82); border-radius: 18px; background: rgba(255,255,255,.45); box-shadow: inset 0 1px 0 rgba(255,255,255,.9); }
.admin-user > span:nth-child(2) { display: flex; flex: 1; min-width: 0; flex-direction: column; }
.admin-user strong { font-size: 13px; }
.admin-user small { color: var(--text-muted); font-size: 11px; }
.permissions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.permission-option { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--glass-soft); cursor: pointer; }
.permission-option input { width: 18px; height: 18px; accent-color: var(--pink-500); }
.permission-option:has(input:checked) { color: var(--pink-600); border-color: var(--pink-300); background: var(--pink-100); }

/* Superficies de vidrio */
.topbar, .stat, .card, .tile, dialog {
  position: relative; isolation: isolate; background: var(--glass-highlight); border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow-float);
}
.topbar::before, .stat::before, .card::before, .tile::before, dialog::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none; inset: 1px; border-radius: inherit;
  background: linear-gradient(115deg, rgba(255,255,255,.42), transparent 30%, transparent 72%, rgba(255,255,255,.20));
  opacity: .72;
}

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: var(--space-3); z-index: 20; width: calc(100% - var(--space-5) * 2); max-width: none;
  margin: var(--space-3) auto 0; border-radius: var(--radius-md);
  display: flex; align-items: center; gap: var(--space-5); padding: var(--space-2) var(--space-5) var(--space-2) var(--space-3);
  background: transparent; border-color: transparent; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  transition: box-shadow var(--t-base), transform var(--t-base), background var(--t-base);
}
.topbar::before { display: none; }
.topbar:hover { box-shadow: none; }
.brand { display: flex; gap: var(--space-3); align-items: center; flex-shrink: 0; color: var(--text); text-decoration: none; border-radius: var(--radius-md); }
.brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.brand-logo { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; display: block; box-shadow: 0 2px 8px rgba(199, 42, 99, 0.25); }
.brand-name { font-weight: var(--w-medium); font-size: var(--text-lg); display: flex; flex-direction: column; line-height: 1.2; white-space: nowrap; }
.brand-name small { font-weight: var(--w-regular); font-size: var(--text-xs); color: var(--text-muted); }
.topbar nav { flex: 1; min-width: 0; display: flex; justify-content: safe center; gap: var(--space-1); overflow-x: auto; scrollbar-width: none; padding: var(--space-1); }
.topbar nav::-webkit-scrollbar { display: none; }
.topbar nav a {
  padding: var(--space-2) var(--space-4); color: var(--text-muted); text-decoration: none; white-space: nowrap;
  font-size: var(--text-base); font-weight: var(--w-medium); border-radius: var(--radius-md); border: 1px solid transparent;
  position: relative; overflow: hidden; transition: color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.topbar nav a { display: inline-flex; align-items: center; gap: var(--space-2); }
.ico { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lbl-corto { display: none; }
.topbar nav a:hover { color: var(--accent); background: var(--glass-soft); transform: translateY(-1px); }
.topbar nav a.active { color: var(--accent); background: var(--glass-strong); border-color: var(--glass-edge); box-shadow: var(--glass-shadow-sm); }
.topbar nav a.active::after {
  content: ""; position: absolute; left: 22%; right: 22%; bottom: 3px; height: 2px; border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--pink-500), transparent); box-shadow: 0 0 10px rgba(224,69,126,.55);
}
.topbar nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.topbar-right { display: flex; align-items: center; gap: var(--space-4); flex-shrink: 0; }
.clock { color: var(--text-muted); font-size: var(--text-sm); }
.user { display: flex; align-items: center; gap: var(--space-2); font-weight: var(--w-medium); white-space: nowrap; }
.account-menu { position: relative; }
.account-link { color: var(--text); font: inherit; border: 1px solid rgba(255,255,255,.78); background: linear-gradient(135deg, rgba(255,255,255,.62), rgba(255,232,241,.35)); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 7px 18px rgba(159,31,78,.1); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); cursor: pointer; padding: 5px 9px 5px 5px; border-radius: var(--radius-md); transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast); }
.account-link:hover { background: rgba(255,255,255,.72); transform: translateY(-1px); box-shadow: inset 0 1px 0 #fff, 0 10px 24px rgba(159,31,78,.14); }
.account-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.account-copy { display: flex; flex-direction: column; line-height: 1.15; }
.account-copy strong { font-size: var(--text-sm); }
.account-copy small { color: var(--text-muted); font-size: 11px; font-weight: var(--w-regular); }
.account-chevron { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform var(--t-fast); }
.account-link[aria-expanded="true"] .account-chevron { transform: rotate(180deg); }
.account-dropdown {
  position: absolute; top: calc(100% + 12px); right: 0; z-index: 80;
  width: min(320px, calc(100vw - 24px)); padding: 8px; border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.82), rgba(255,232,241,.72));
  border: 1px solid rgba(255,255,255,.92);
  box-shadow: 0 22px 60px rgba(117,31,66,.22), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(24px) saturate(145%); -webkit-backdrop-filter: blur(24px) saturate(145%);
  animation: accountMenuReveal .2s cubic-bezier(.2,.8,.2,1) both;
}
.account-dropdown-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; }
.account-dropdown-head > span:last-child { display: flex; flex-direction: column; }
.account-dropdown-head strong { font-size: 14px; }
.account-dropdown-head small, .account-dropdown a small, .account-dropdown button small { display: block; margin-top: 2px; color: var(--text-muted); font-size: 11px; font-weight: var(--w-regular); }
.account-dropdown-divider { height: 1px; margin: 0 6px 6px; background: rgba(159,72,105,.14); }
.account-dropdown a, .account-dropdown > button {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 10px;
  color: var(--text); text-align: left; text-decoration: none; font: inherit; border: 0;
  border-radius: 16px; background: transparent; cursor: pointer; transition: background var(--t-fast), transform var(--t-fast);
}
.account-dropdown a:hover, .account-dropdown > button:hover { background: rgba(255,255,255,.68); transform: translateX(2px); }
.account-dropdown a:focus-visible, .account-dropdown > button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.account-dropdown svg { flex: 0 0 20px; width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.account-dropdown strong { font-size: 13px; }
.account-dropdown .account-logout, .account-dropdown .account-logout svg { color: var(--danger); stroke: var(--danger); }
@keyframes accountMenuReveal { from { opacity: 0; transform: translateY(-8px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; color: var(--white);
  background: linear-gradient(160deg, var(--pink-500), var(--pink-600));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 2px 8px rgba(199, 42, 99, 0.3);
  display: grid; place-items: center; font-size: var(--text-xs); font-weight: var(--w-medium);
}

/* ---------- Estructura ---------- */
.content { flex: 1; width: 100%; max-width: none; margin: 0 auto; padding: var(--space-6) var(--space-5) var(--space-7); }
.content h1 { color: var(--red-fresa); font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 600; margin: 0 0 var(--space-5); line-height: 1.2; letter-spacing: -0.02em; text-shadow: 0 1px 0 rgba(255,255,255,.9); }
.view { display: flex; flex-direction: column; gap: var(--space-5); animation: viewReveal .42s cubic-bezier(.2,.8,.2,1) both; }

/* ---------- Indicadores ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-3); }
.stat { overflow: hidden; border-radius: var(--radius-sm); padding: var(--space-4) var(--space-5); transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base); }
.stat::after {
  content: ""; position: absolute; width: 92px; height: 92px; right: -34px; top: -38px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,159,190,.34), rgba(255,255,255,0) 70%); transition: transform .35s ease, opacity .35s ease;
}
.stat:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.98); box-shadow: inset 0 1px 0 #fff, 0 24px 55px rgba(159,31,78,.18); }
.stat:hover::after { transform: scale(1.32) translate(-6px, 6px); }
.stat .label { color: var(--text-muted); font-size: var(--text-sm); font-weight: var(--w-medium); }
.stat .value { font-size: var(--text-2xl); font-weight: var(--w-medium); line-height: 1.2; margin-top: var(--space-1); letter-spacing: -0.02em; }

/* ---------- Pestañas y barra de herramientas ---------- */
.tabs {
  display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; padding: var(--space-2);
  border: 1px solid rgba(255,255,255,.76); border-radius: var(--radius-md); background: rgba(255,255,255,.28);
  -webkit-backdrop-filter: blur(18px) saturate(165%); backdrop-filter: blur(18px) saturate(165%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 8px 24px rgba(159,31,78,.08);
}
.tab {
  border: 1px solid transparent; background: transparent; padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md); cursor: pointer; font: inherit; font-weight: var(--w-medium); color: var(--text-muted);
  transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}
.tab:hover { color: var(--accent); background: var(--glass-soft); }
.tab.active { color: var(--accent); background: var(--glass-strong); border-color: var(--glass-edge); box-shadow: var(--glass-shadow-sm); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.spacer { flex: 1; }
.page-title { font-size: var(--text-lg); font-weight: var(--w-medium); }

input, select, textarea {
  width: 100%; padding: var(--space-2) var(--space-4); font: inherit; color: var(--text);
  background: var(--glass-strong); border: 1px solid var(--glass-edge); border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 3px rgba(159, 31, 78, 0.12);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
input::placeholder { color: var(--text-muted); }
input:hover, select:hover, textarea:hover { border-color: var(--pink-300); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; border-color: rgba(224,69,126,.66); background: rgba(255,255,255,.90);
  box-shadow: inset 0 1px 3px rgba(159, 31, 78, 0.10), 0 0 0 4px rgba(224, 69, 126, 0.16), 0 8px 24px rgba(159,31,78,.09);
}
input:disabled, select:disabled { background: var(--glass-soft); color: var(--text-muted); cursor: not-allowed; }
.tabs input[type=search] { width: 240px; }
select {
  -webkit-appearance: none; appearance: none; padding-right: var(--space-7); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239f1f4e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right var(--space-4) center; background-size: 16px;
}
input.grande { font-size: var(--text-xl); font-weight: var(--w-medium); letter-spacing: -0.01em; }
.fila2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-3); }
.fila2 input { height: var(--space-7); }

/* ---------- Subir comprobante ---------- */
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); text-align: center;
  padding: var(--space-5); margin-bottom: var(--space-3); cursor: pointer;
  border: 2px dashed var(--pink-300); border-radius: var(--radius-sm); background: var(--glass-soft);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.dropzone:hover { background: var(--glass-strong); border-color: var(--accent); }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; opacity: 0; cursor: pointer; }
.dropzone-texto { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.dropzone-icono {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; margin-bottom: var(--space-2); color: var(--white);
  background: linear-gradient(180deg, var(--pink-500), var(--pink-600));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 6px 16px rgba(199, 42, 99, 0.32);
}
.dropzone strong { font-size: var(--text-lg); font-weight: var(--w-medium); overflow-wrap: anywhere; }
.dropzone small { color: var(--text-muted); font-size: var(--text-sm); }
.dropzone img { width: 72px; height: 72px; flex-shrink: 0; object-fit: cover; border-radius: var(--space-4); box-shadow: var(--glass-shadow-sm); }
.dropzone.con-imagen { flex-direction: row; text-align: left; padding: var(--space-3); border-style: solid; border-color: var(--glass-edge); background: var(--glass-strong); }
.dropzone.con-imagen .dropzone-texto { align-items: flex-start; }
.dropzone.con-imagen .dropzone-icono { display: none; }
#lector-barra { margin-bottom: var(--space-3); }
.lector-resumen {
  background: var(--glass-strong); border: 1px solid var(--glass-edge); border-radius: var(--radius-sm);
  box-shadow: var(--glass-shadow-sm); padding: var(--space-4); margin-bottom: var(--space-4);
}
.lector-resumen > strong { font-weight: var(--w-medium); }
.lector-resumen dl { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-4); margin: var(--space-3) 0; }
.lector-resumen dt { color: var(--text-muted); font-size: var(--text-sm); }
.lector-resumen dd { margin: 0; text-align: right; font-weight: var(--w-medium); overflow-wrap: anywhere; }
.lector-resumen dd.valor { font-size: var(--text-xl); line-height: 1.1; }
.lector-resumen .falta { color: var(--text-muted); font-weight: var(--w-regular); font-style: italic; }
.lector-resumen summary { cursor: pointer; color: var(--accent); font-size: var(--text-sm); font-weight: var(--w-medium); border-radius: var(--space-1); }
.lector-resumen summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lector-resumen pre {
  margin: var(--space-2) 0 0; padding: var(--space-3); max-height: 160px; overflow: auto; white-space: pre-wrap;
  font-size: var(--text-xs); background: var(--glass-soft); border-radius: var(--space-3);
}
#lector-barra i { transition: width var(--t-base); }

/* ---------- Opciones en píldoras ---------- */
.segmento { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.segmento label { position: relative; display: inline-block; margin: 0; font-size: var(--text-base); }
.segmento input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; opacity: 0; cursor: pointer; }
.segmento span {
  display: inline-block; padding: var(--space-2) var(--space-5); border-radius: var(--radius-md); color: var(--text-muted);
  background: var(--glass-strong); border: 1px solid var(--glass-edge); box-shadow: var(--glass-shadow-sm); font-weight: var(--w-medium);
  transition: background var(--t-fast), color var(--t-fast);
}
.segmento label:hover span { color: var(--accent); }
.segmento input:checked + span {
  color: var(--white); border-color: rgba(255, 255, 255, 0.35); background: linear-gradient(180deg, var(--pink-500), var(--pink-600));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 6px 16px rgba(199, 42, 99, 0.32);
}
.segmento.compacto { gap: var(--space-1); }
.segmento.compacto span { padding: var(--space-1) var(--space-3); font-size: var(--text-sm); box-shadow: none; }
.cuenta { float: right; color: var(--accent); font-variant-numeric: tabular-nums; }
.segmento input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-block; border: 1px solid var(--glass-edge); background: var(--glass-strong); color: var(--text);
  padding: var(--space-2) var(--space-5); border-radius: var(--radius-md); cursor: pointer;
  font: inherit; font-weight: var(--w-medium); text-decoration: none; white-space: nowrap;
  box-shadow: var(--glass-shadow-sm);
  transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast), filter var(--t-fast);
}
.btn:hover { background: var(--white); color: var(--accent); transform: translateY(-2px); box-shadow: inset 0 1px 0 #fff, 0 10px 24px rgba(159,31,78,.14); }
.btn:active { transform: scale(0.96); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled { color: var(--text-muted); background: var(--glass-soft); box-shadow: none; cursor: not-allowed; transform: none; }
.btn.primary {
  color: var(--white); border-color: rgba(255, 255, 255, 0.35);
  background: linear-gradient(180deg, var(--pink-500), var(--pink-600));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 6px 16px rgba(199, 42, 99, 0.32);
}
.btn.primary:hover { color: var(--white); background: linear-gradient(180deg, var(--pink-500), var(--pink-700)); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 12px 28px rgba(199,42,99,.34); }
.btn.danger { color: var(--danger); background: var(--danger-bg); }
.btn.danger:hover { color: var(--danger); background: var(--white); }
.btn.sm { padding: var(--space-1) var(--space-4); font-size: var(--text-sm); }

/* ---------- Tablas ---------- */
.card { border-radius: var(--radius-sm); overflow-x: auto; transition: box-shadow var(--t-base), border-color var(--t-base); }
.card:hover { border-color: rgba(255,255,255,.98); box-shadow: inset 0 1px 0 #fff, 0 22px 55px rgba(159,31,78,.13); }
.card h2 { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; margin: 0; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); }
.pad { padding: var(--space-4); overflow: visible; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; padding: var(--space-3) var(--space-5); color: var(--text-muted);
  font-size: var(--text-sm); font-weight: var(--w-medium); border-bottom: 1px solid var(--border); white-space: nowrap;
}
td { padding: var(--space-3) var(--space-5); border-bottom: 1px solid var(--border); }
td small { color: var(--text-muted); }
td strong, .tile strong, .prod strong { font-weight: var(--w-medium); }
tbody tr { transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast); }
tbody tr:hover { background: rgba(255,255,255,.48); box-shadow: inset 3px 0 0 rgba(224,69,126,.45); }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.actions { text-align: right; white-space: nowrap; }
td.actions .btn { margin-left: var(--space-2); }
.total-row td { font-size: var(--text-lg); font-weight: var(--w-medium); background: var(--glass-soft); }

.badge {
  display: inline-block; padding: 2px var(--space-3); border-radius: var(--radius-md);
  font-size: var(--text-xs); font-weight: var(--w-medium); white-space: nowrap;
  border: 1px solid var(--glass-edge);
}
.badge.abierta { background: var(--ok-bg); color: var(--ok); }
.badge.cerrada { background: var(--glass-strong); color: var(--pink-700); }
.badge.alerta { background: var(--danger-bg); color: var(--danger); }
.neg { color: var(--danger); font-weight: var(--w-medium); }
.pos-val { color: var(--ok); font-weight: var(--w-medium); }
.empty { text-align: center; color: var(--text-muted); padding: var(--space-6); margin: 0; }

/* ---------- Tarjetas de productos del pedido ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-3); }
.tile { overflow: hidden; border-radius: var(--radius-sm); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); transition: transform var(--t-base), box-shadow var(--t-base); }
.tile:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 #fff, 0 20px 45px rgba(159,31,78,.16); }
.tile.busy { background: linear-gradient(160deg, rgba(255, 201, 218, 0.75), var(--glass)); }
.tile-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); font-size: var(--text-lg); }
.tile-body { color: var(--text-muted); font-size: var(--text-sm); min-height: 56px; }
.tile-body .value { color: var(--text); font-size: var(--text-xl); font-weight: var(--w-medium); line-height: 1.2; }
.tile-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }

.pos { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: var(--space-4); align-items: start; }
.pos.solo { grid-template-columns: minmax(0, 640px); }
.pos > * { min-width: 0; }
.sell-order-bar { position: relative; overflow: hidden; border-color: rgba(255,255,255,.9); background: linear-gradient(105deg, rgba(255,255,255,.72), rgba(252,144,192,.15)); }
.order-cart { overflow: hidden; background: linear-gradient(155deg, rgba(255,255,255,.78), rgba(255,245,248,.5)); }
.cart-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.cart-head > span:nth-child(2) { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.cart-head strong { font-family: var(--font-display); font-size: 17px; }
.cart-head small { color: var(--text-muted); font-size: 11px; }
.cart-icon { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 15px; background: var(--pink-100); box-shadow: inset 0 1px 0 white; font-size: 21px; }
.order-steps { display: flex; align-items: center; padding: 14px 18px; color: var(--text-muted); font-size: 10px; }
.order-steps span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.order-steps span i { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--glass-strong); font-style: normal; font-weight: 700; }
.order-steps span.active { color: var(--pink-600); font-weight: 700; }
.order-steps span.active i { color: white; background: var(--pink-500); box-shadow: 0 5px 12px rgba(199,42,99,.22); }
.order-steps > b { flex: 1; min-width: 12px; height: 1px; margin: 0 7px; background: var(--border); }
.cart-items { display: grid; gap: 10px; padding: 0 14px 14px; }
.cart-item { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid rgba(255,255,255,.9); border-radius: 18px; background: rgba(255,255,255,.58); box-shadow: inset 0 1px 0 white, 0 5px 14px rgba(159,31,78,.06); animation: cartItemIn .28s ease-out both; }
.cart-item-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; color: white; background: linear-gradient(145deg, var(--pink-500), var(--pink-600)); font-family: var(--font-display); }
.cart-item-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cart-item-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); font-size: 13px; }
.cart-item-copy small { overflow: hidden; color: var(--text-muted); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.cart-item-total { min-width: 72px; text-align: right; color: var(--pink-600); font-size: 12px; }
.cart-item-qty { color: var(--text-muted); font-size: 11px; }
.cart-total { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-top: 1px solid var(--glass-edge); background: rgba(255,245,248,.9); backdrop-filter: blur(18px); }
.cart-total > span { display: flex; flex-direction: column; }
.cart-total small { color: var(--text-muted); }
.cart-total strong { color: var(--red-fresa); font-family: var(--font-display); font-size: 24px; }
.cart-empty { min-height: 360px; display: grid; place-items: center; align-content: center; gap: 9px; padding: 34px; text-align: center; }
.cart-empty-orb { position: relative; width: 96px; height: 96px; display: grid; place-items: center; margin-bottom: 8px; border-radius: 32px; background: linear-gradient(145deg, rgba(255,255,255,.9), var(--pink-100)); box-shadow: inset 0 1px 0 white, 0 18px 38px rgba(199,42,99,.16); animation: cartFloat 3s ease-in-out infinite; }
.cart-empty-orb b { font-size: 39px; }
.cart-empty-orb i { position: absolute; right: -8px; bottom: -7px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--pink-500); box-shadow: 0 8px 18px rgba(199,42,99,.25); font-style: normal; font-size: 22px; }
.cart-empty h3 { margin: 4px 0 0; color: var(--ink-1); font-family: var(--font-display); font-size: 20px; }
.cart-empty p { max-width: 310px; margin: 0; color: var(--text-muted); font-size: 12px; }
.cart-empty > div { display: flex; align-items: center; gap: 7px; margin-top: 10px; color: var(--text-muted); font-size: 10px; }
.cart-empty > div span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--pink-600); background: var(--pink-100); font-weight: 700; }
@keyframes cartFloat { 50% { transform: translateY(-7px) rotate(1deg); } }
@keyframes cartItemIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.prods { grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 14px; margin-top: var(--space-4); }
.prod { --product-tone: var(--pink-500); --product-soft: rgba(252,144,192,.2); position: relative; overflow: hidden; min-height: 210px; display: flex; flex-direction: column; gap: 12px; text-align: left; white-space: normal; padding: 16px; border: 1px solid rgba(255,255,255,.92); border-radius: 24px; background: linear-gradient(150deg, rgba(255,255,255,.84), rgba(255,245,248,.55)); box-shadow: inset 0 1px 0 rgba(255,255,255,.96), 0 8px 22px rgba(159,31,78,.09); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.prod::before { content: ""; position: absolute; width: 115px; height: 115px; top: -58px; right: -48px; border-radius: 50%; background: var(--product-soft); transition: transform .3s ease; }
.prod:hover { z-index: 1; transform: translateY(-6px) scale(1.025); border-color: color-mix(in srgb, var(--product-tone) 30%, white); box-shadow: inset 0 1px 0 #fff, 0 18px 34px rgba(159,31,78,.17); }
.prod:hover::before { transform: scale(1.25) translate(-7px, 7px); }
.prod:active { transform: translateY(-1px) scale(.98); }
.prod:disabled { opacity: .58; filter: grayscale(.3); cursor: not-allowed; }
.product-card-head, .product-card-foot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.popular-badge { position: absolute; z-index: 3; top: 67px; right: 12px; padding: 4px 8px; border: 1px solid rgba(255,255,255,.75); border-radius: 999px; color: #fff; background: linear-gradient(145deg, var(--red-fresa), var(--pink-600)); box-shadow: 0 6px 14px rgba(159,31,78,.2); font-size: 9px; font-weight: 700; letter-spacing: .02em; animation: popularFloat 2.5s ease-in-out infinite; }
.product-card:has(.popular-badge) .product-card-copy { padding-right: 48px; }
.product-icon { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 15px; color: white; background: linear-gradient(145deg, color-mix(in srgb, var(--product-tone) 72%, white), var(--product-tone)); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 16px color-mix(in srgb, var(--product-tone) 22%, transparent); font-family: var(--font-display); font-size: 20px; }
.product-category { max-width: calc(100% - 50px); overflow: hidden; padding: 5px 9px; border-radius: 999px; color: color-mix(in srgb, var(--product-tone) 80%, var(--ink-1)); background: var(--product-soft); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 700 !important; }
.product-card-copy { position: relative; z-index: 1; display: flex; flex: 1; flex-direction: column; justify-content: center; gap: 6px; }
.product-card-copy strong { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--ink-1); font-family: var(--font-display); font-size: 16px; line-height: 1.2; }
.product-price { color: var(--product-tone); font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.product-card-foot small { min-width: 0; overflow: hidden; color: var(--text-muted); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.product-add { flex: 0 0 32px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--product-tone); box-shadow: 0 7px 15px color-mix(in srgb, var(--product-tone) 25%, transparent); font-size: 21px; font-weight: 400; transition: transform .2s ease; }
.prod:hover .product-add { transform: rotate(90deg) scale(1.08); }
.product-stock { position: absolute; left: 14px; top: 64px; z-index: 2; padding: 3px 7px; border-radius: 999px; color: var(--ok); background: var(--ok-bg); font-size: 9px; font-weight: 700; }
.product-stock.low { color: var(--danger); background: var(--danger-bg); }
.tone-0 { --product-tone: #c72a63; --product-soft: rgba(252,144,192,.22); }
.tone-1 { --product-tone: #e43141; --product-soft: rgba(228,49,65,.13); }
.tone-2 { --product-tone: #9f1f4e; --product-soft: rgba(240,192,200,.35); }
.tone-3 { --product-tone: #5a987d; --product-soft: rgba(90,152,125,.14); }
.tone-4 { --product-tone: #b45b8a; --product-soft: rgba(180,91,138,.14); }
.tone-5 { --product-tone: #d65b76; --product-soft: rgba(214,91,118,.14); }
.catalog-summary { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin: 16px 2px 0; color: var(--text-muted); font-size: var(--text-sm); }
.catalog-summary strong { color: var(--pink-600); font-family: var(--font-display); font-size: 18px; }
.product-filter { position: sticky; top: 82px; z-index: 8; margin-top: var(--space-3); padding: 9px; border: 1px solid var(--glass-edge); border-radius: 22px; background: rgba(255,245,248,.88); backdrop-filter: blur(18px); box-shadow: 0 8px 24px rgba(159,31,78,.08); }
.product-filter-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 2px 8px 8px; color: var(--text-muted); font-size: 11px; }
.product-filter-head > span { display: flex; align-items: center; gap: 7px; color: var(--ink-1); }
.product-filter-head i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 9px; color: white; background: var(--pink-500); font-style: normal; font-size: 17px; }
.dropdown-filter { max-width: 520px; }
.category-select { position: relative; display: flex; align-items: center; min-height: 52px; border: 1px solid rgba(255,255,255,.9); border-radius: 17px; background: rgba(255,255,255,.66); box-shadow: inset 0 1px 0 white, 0 7px 18px rgba(159,31,78,.07); }
.category-select > span { position: absolute; z-index: 1; left: 15px; top: 7px; color: var(--text-muted); font-size: 9px; pointer-events: none; }
.category-select select { position: relative; z-index: 2; width: 100%; min-height: 52px; padding: 20px 46px 6px 14px; border: 0; appearance: none; color: var(--ink-1); background: transparent; box-shadow: none; font-family: var(--font-display); font-size: 14px; font-weight: 600; cursor: pointer; }
.category-select select:focus { outline: 2px solid var(--pink-300); outline-offset: -2px; }
.category-select > i { position: absolute; z-index: 1; right: 14px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 11px; color: white; background: linear-gradient(145deg, var(--pink-500), var(--pink-600)); box-shadow: 0 6px 13px rgba(199,42,99,.2); font-style: normal; font-size: 18px; pointer-events: none; transition: transform .2s ease; }
.category-select:focus-within > i { transform: rotate(180deg); }
.chips { margin-top: var(--space-3); gap: var(--space-1); }
.chips { overflow-x: auto; flex-wrap: nowrap; margin-top: 0; padding: 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips .tab { flex: 0 0 auto; padding: 7px 13px; font-size: var(--text-sm); background: var(--glass-soft); }
.chips .tab b { display: inline-grid; min-width: 20px; height: 20px; margin-left: 5px; place-items: center; border-radius: 999px; color: var(--pink-700); background: rgba(255,255,255,.62); font-size: 9px; }
.chips .tab.active { color: white; background: linear-gradient(145deg, var(--pink-500), var(--pink-600)); box-shadow: 0 7px 16px rgba(199,42,99,.2); }
.chips .tab.active b { color: var(--pink-700); background: white; }
@keyframes popularFloat { 50% { transform: translateY(-2px); } }
.prod small { color: var(--text-muted); font-weight: var(--w-regular); }
.qty { display: inline-flex; align-items: center; gap: var(--space-2); }
.qty .btn { padding: 0; width: 28px; height: 28px; }
.note { color: var(--text-muted); font-size: var(--text-sm); margin: 0; padding: var(--space-3) var(--space-5); border-top: 1px solid var(--border); }

@media (min-width: 1001px) {
  .pos > .card:last-child { position: sticky; top: 98px; max-height: calc(100vh - 118px); overflow: auto; }
}

/* ---------- Pantalla de preparación ---------- */
.kds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); grid-auto-rows: 1fr; gap: var(--space-4); align-items: stretch; }
.kds-order {
  position: relative; overflow: hidden; display: flex; flex-direction: column; min-width: 0; min-height: 390px; border-radius: var(--radius-sm); padding: var(--space-5);
  background: var(--glass-highlight); border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow-float); transition: transform var(--t-base), box-shadow var(--t-base);
}
.kds-order::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 5px;
  background: linear-gradient(180deg, var(--pink-300), var(--pink-600)); box-shadow: 0 0 18px rgba(224,69,126,.42);
}
.kds-order:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 #fff, 0 24px 55px rgba(159,31,78,.18); }
.kds-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-4); padding-bottom: var(--space-3); border-bottom: 1px solid rgba(159,31,78,.1); }
.kds-head > div { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.kds-number { font-size: 28px; line-height: 1; font-weight: 700; letter-spacing: -.03em; }
.kds-client { padding: 4px 10px; border-radius: 999px; color: var(--pink-700); background: rgba(255,255,255,.62); border: 1px solid var(--glass-edge); font-weight: var(--w-medium); }
.kds-time { flex-shrink: 0; padding: 5px 11px; border-radius: 999px; color: var(--white); background: linear-gradient(180deg, var(--pink-500), var(--pink-600)); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 6px 16px rgba(199,42,99,.25); font-weight: 700; }
.kds-customer { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: calc(var(--space-2) * -1) 0 var(--space-3); color: var(--text-muted); font-size: var(--text-sm); }
.kds-customer span { padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.42); border: 1px solid rgba(255,255,255,.66); }
.kds-items { display: flex; flex: 1; flex-direction: column; gap: var(--space-2); align-content: start; }
.kds-item { display: flex; flex-direction: column; gap: 3px; padding: var(--space-3) var(--space-4); border-radius: 17px; background: rgba(255,255,255,.58); border: 1px solid rgba(255,255,255,.82); box-shadow: inset 0 1px 0 rgba(255,255,255,.86), 0 4px 12px rgba(159,31,78,.05); }
.kds-item strong { font-size: 15px; line-height: 1.3; }
.kds-item small { color: var(--text-muted); }
.kds-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin-top: auto; padding-top: var(--space-5); color: var(--text-muted); font-size: var(--text-sm); }
.kds-empty { padding: var(--space-7); text-align: center; }
.kds-empty h2 { border: 0; padding: 0; margin: var(--space-3) 0 var(--space-1); }
.kds-empty p { margin: 0; color: var(--text-muted); }
.kds-check { width: 64px; height: 64px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; color: var(--white); font-size: 30px; background: linear-gradient(160deg, #45b978, var(--ok)); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 12px 28px rgba(31,122,74,.24); }

/* ---------- Reportes y configuración ---------- */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-4); align-items: start; }
.dashboard-orders { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, .8fr); gap: var(--space-4); align-items: start; }
.dashboard-hero { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: var(--space-5); margin-bottom: var(--space-4); padding: clamp(20px, 3vw, 34px); border: 1px solid var(--glass-edge); border-radius: var(--radius-lg); background: linear-gradient(125deg, rgba(255,245,248,.9), rgba(252,144,192,.3)); box-shadow: var(--glass-shadow); }
.dashboard-hero::after { content: ""; position: absolute; width: 260px; height: 260px; right: -80px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(228,49,65,.2), transparent 68%); animation: dashboardGlow 5s ease-in-out infinite alternate; pointer-events: none; }
.dashboard-hero h2 { margin: 8px 0 4px; color: var(--red-fresa); font-family: var(--font-display); font-size: clamp(24px, 3vw, 38px); }
.dashboard-hero p, .dashboard-hero-side { margin: 0; color: var(--text-muted); }
.dashboard-hero-side { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; text-align: right; text-transform: capitalize; }
.dashboard-live { display: inline-flex; align-items: center; gap: 7px; color: var(--pink-600); font-size: var(--text-sm); font-weight: 700; }
.dashboard-live i { width: 9px; height: 9px; border-radius: 50%; background: var(--red-fresa); box-shadow: 0 0 0 0 rgba(228,49,65,.5); animation: livePulse 1.8s infinite; }
.dashboard-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.dashboard-kpis article { position: relative; overflow: hidden; min-height: 122px; padding: var(--space-4) var(--space-5); border: 1px solid var(--glass-edge); border-radius: var(--radius-sm); background: var(--glass); box-shadow: var(--glass-shadow-sm); transition: transform var(--t-fast), box-shadow var(--t-fast); }
.dashboard-kpis article:hover { transform: translateY(-4px); box-shadow: var(--glass-shadow); }
.dashboard-kpis article::after { content: ""; position: absolute; width: 58px; height: 58px; right: -18px; bottom: -20px; border-radius: 50%; background: var(--pink-200); opacity: .45; }
.dashboard-kpis span, .dashboard-kpis small { display: block; color: var(--text-muted); }
.dashboard-kpis strong { display: block; margin: 6px 0 3px; color: var(--ink-1); font-family: var(--font-display); font-size: 30px; }
.dashboard-kpis small { font-size: 11px; }
.dashboard-quick { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.dashboard-dynamic-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: var(--space-4); margin-bottom: var(--space-4); }
.flow-track { display: grid; gap: 14px; padding: var(--space-5); }
.flow-track > div { display: grid; grid-template-columns: 92px 1fr 26px; align-items: center; gap: var(--space-3); font-size: var(--text-sm); }
.flow-track i { height: 12px; overflow: hidden; border-radius: 999px; background: var(--pink-100); }
.flow-track i::after { content: ""; display: block; width: var(--flow); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--pink-300), var(--pink-600)); animation: growBar .8s ease-out both; }
.flow-track strong { text-align: right; }
.week-bars { height: 190px; display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 10px; padding: var(--space-5); }
.week-bars > div { height: 100%; display: grid; grid-template-rows: 20px 1fr 20px; align-items: end; justify-items: center; gap: 5px; color: var(--text-muted); font-size: 11px; text-transform: capitalize; }
.week-bars i { width: min(30px, 80%); min-height: 8px; align-self: end; border-radius: 999px 999px 7px 7px; background: linear-gradient(180deg, var(--pink-300), var(--pink-600)); box-shadow: 0 8px 18px rgba(199,42,99,.16); animation: riseBar .7s ease-out both; transform-origin: bottom; }
.week-bars strong { color: var(--ink-1); }
.dashboard-products { display: flex; flex-direction: column; }
.dashboard-products > div { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-5); border-bottom: 1px solid var(--border); }
.dashboard-products > div:last-child { border-bottom: 0; }
.dashboard-products strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-products > div > span:last-child { color: var(--text-muted); font-size: var(--text-sm); white-space: nowrap; }
.dashboard-rank { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--pink-700); background: rgba(255,255,255,.62); border: 1px solid var(--glass-edge); font-weight: 700; }
.product-progress { min-width: 0; display: grid; gap: 7px; }
.product-progress i { display: block; height: 5px; overflow: hidden; border-radius: 999px; background: var(--pink-100); }
.product-progress b { display: block; height: 100%; border-radius: inherit; background: var(--pink-500); animation: growBar .8s ease-out both; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 9px rgba(228,49,65,0); } 100% { box-shadow: 0 0 0 0 rgba(228,49,65,0); } }
@keyframes dashboardGlow { to { transform: translate(-35px, 25px) scale(1.12); } }
@keyframes growBar { from { width: 0; } }
@keyframes riseBar { from { transform: scaleY(0); opacity: .3; } }
.badge.preparando { color: var(--pink-700); background: var(--pink-100); }
.badge.lista { color: var(--ok); background: var(--ok-bg); }
.bars { padding: var(--space-4) var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.bar-row { display: grid; grid-template-columns: 96px 1fr auto; gap: var(--space-3); align-items: center; font-size: var(--text-sm); }
.bar { height: 10px; border-radius: var(--radius-md); background: var(--glass-strong); box-shadow: inset 0 1px 3px rgba(159, 31, 78, 0.15); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: var(--radius-md); background: linear-gradient(90deg, var(--pink-300), var(--pink-600)); }
.form { padding: var(--space-5); max-width: 480px; }

/* ---------- Modal ---------- */
dialog {
  border-radius: var(--radius-sm); padding: 0; width: min(520px, 92vw); color: var(--text);
  background: var(--glass-strong); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 24px 60px rgba(159, 31, 78, 0.3);
}
dialog[open] { animation: panelReveal var(--t-base) ease-out; }
dialog::backdrop { background: rgba(159, 31, 78, 0.22); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog form { padding: var(--space-5); }
dialog h2 { margin: 0 0 var(--space-4); font-size: var(--text-xl); font-weight: var(--w-medium); line-height: 1.2; letter-spacing: -0.01em; }
.field { margin-bottom: var(--space-4); }
.field label { display: block; font-size: var(--text-sm); font-weight: var(--w-medium); margin-bottom: var(--space-1); }
.hint { color: var(--text-muted); margin: 0 0 var(--space-4); }
.hint strong { color: var(--text); font-weight: var(--w-medium); }
.lector-ok { color: var(--ok); font-weight: var(--w-medium); }
input[type=file] { padding: var(--space-2); }
.form-error {
  color: var(--danger); background: var(--danger-bg); border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-4); font-size: var(--text-sm); font-weight: var(--w-medium); margin: 0 0 var(--space-4);
}
.modal-scroll { max-height: 46vh; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: var(--space-4); background: var(--glass-soft); }
.modal-scroll th, .modal-scroll td { padding: var(--space-2) var(--space-3); font-size: var(--text-sm); }
/* ---------- Factura ---------- */
.factura { background: var(--white); border-radius: var(--radius-sm); padding: var(--space-5); margin-bottom: var(--space-4); font-size: var(--text-sm); }
.factura-head { display: flex; gap: var(--space-3); align-items: center; font-size: var(--text-sm); color: var(--text-muted); }
.factura-head img { border-radius: 50%; }
.factura-head strong { font-size: var(--text-lg); font-weight: var(--w-medium); color: var(--text); }
.factura dl { display: grid; grid-template-columns: auto 1fr; gap: var(--space-1) var(--space-4); margin: var(--space-4) 0; }
.factura dt { color: var(--text-muted); }
.factura dd { margin: 0; text-align: right; font-weight: var(--w-medium); }
.factura th, .factura td { padding: var(--space-2) 0; }
.factura th + th, .factura td + td { padding-left: var(--space-3); }
.factura tbody tr:hover { background: none; }
.factura tfoot tr:last-child td { border-bottom: 0; }
.factura .total-row td { background: none; border-top: 2px solid var(--text); }
.factura h3 { font-size: var(--text-sm); font-weight: var(--w-medium); color: var(--text-muted); margin: var(--space-4) 0 0; }
.factura tfoot td { font-weight: var(--w-medium); }
.factura td.actions { width: 1%; padding-left: var(--space-3); }
.factura-totales { margin-top: var(--space-4); }
.factura-acciones { justify-content: flex-end; margin-bottom: var(--space-4); }
.factura-pie { text-align: center; color: var(--text-muted); margin: var(--space-4) 0 0; }

/* ---------- Tipografía oficial de marca ---------- */
.login-heading h1,
dialog h2,
.page-title,
.kds-number,
.kds-item strong,
.stat b,
.dashboard-products strong,
td strong,
.tile strong,
.prod strong,
.topbar nav a,
.btn,
.tab,
.badge,
.account-dropdown strong,
.login-submit {
  font-family: var(--font-display);
  font-weight: 600;
}
.login-heading h1 { color: var(--red-fresa); }
.login-eyebrow { color: var(--pink-600); font-family: var(--font-display); font-weight: 600; }
.prod small,
.hint,
.note,
td,
th,
input,
select,
textarea { font-family: var(--font); }
.script-accent { color: var(--pink-600); font-family: var(--font-script); }

@keyframes ambientFloat {
  from { transform: translate3d(0, -2vh, 0) scale(.96); }
  to { transform: translate3d(6vw, 5vh, 0) scale(1.08); }
}
@keyframes viewReveal {
  from { opacity: 0; transform: translateY(12px) scale(.995); }
  to { opacity: 1; transform: none; }
}

@media print {
  body { background: var(--white); }
  .app, .toast, .modal-actions, #modalTitle, #modalError, .no-print { display: none !important; }
  dialog { position: absolute; inset: 0 auto auto 0; margin: 0; width: 100%; max-width: 420px; max-height: none; border: 0; box-shadow: none; background: var(--white); -webkit-backdrop-filter: none; backdrop-filter: none; }
  dialog::backdrop { display: none; }
  dialog form, .factura { padding: 0; margin: 0; }
}

.modal-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-2); }

.toast {
  position: fixed; bottom: var(--space-5); left: 50%; transform: translateX(-50%);
  background: rgba(58, 18, 38, 0.82); color: var(--white); padding: var(--space-3) var(--space-5);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.25); box-shadow: 0 10px 30px rgba(58, 18, 38, 0.3);
  border-radius: var(--radius-md); font-weight: var(--w-medium); z-index: 50; max-width: 92vw;
}

@keyframes panelReveal {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
/* Sin desenfoque disponible o con transparencia reducida: superficies casi opacas */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: rgba(255, 255, 255, 0.9); --glass-strong: rgba(255, 255, 255, 0.96); }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: rgba(255, 255, 255, 0.92); --glass-strong: var(--white); --glass-soft: var(--pink-50); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1560px) {
  .clock { display: none; }
}
@media (max-width: 1400px) and (min-width: 901px) {
  .topbar nav .ico { display: none; }
}
@media (max-width: 1180px) and (min-width: 901px) {
  .topbar { gap: var(--space-3); }
  .topbar nav a { padding-inline: var(--space-2); }
  #userName, .brand-name small { display: none; }
}
@media (max-width: 1000px) {
  .pos { grid-template-columns: minmax(0, 1fr); }
  .dashboard-orders { grid-template-columns: 1fr; }
  .dashboard-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-dynamic-grid { grid-template-columns: 1fr; }
  .content { padding: var(--space-5) var(--space-4) var(--space-6); }
}

/* ---------- Móvil: barra de módulos abajo, tablas apiladas y ventanas como hoja inferior ---------- */
@media (max-width: 900px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

  /* sin desenfoque en la barra superior: así la navegación fija se ancla a la pantalla y no a la barra */
  .topbar {
    top: var(--space-2); width: calc(100% - var(--space-4)); margin-top: var(--space-2); gap: var(--space-3);
    padding: 6px var(--space-3) 6px var(--space-2); border-radius: var(--radius-sm);
    -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255, 255, 255, 0.88);
  }
  .brand-logo { width: 36px; height: 36px; }
  .brand-name small, #userName { display: none; }
  .account-copy { display: none; }
  .topbar-right { margin-left: auto; }
  .avatar { width: 32px; height: 32px; }

  .topbar nav {
    position: fixed; z-index: 30; left: var(--space-2); right: var(--space-2); bottom: calc(var(--space-2) + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: repeat(auto-fit, minmax(42px, 1fr)); gap: 0; padding: var(--space-1); overflow: visible;
    background: var(--glass-strong); border: 1px solid var(--glass-edge); border-radius: var(--radius-sm);
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 30px rgba(159, 31, 78, 0.22);
  }
  .topbar nav a { flex-direction: column; gap: 2px; padding: 6px 0; min-width: 0; font-size: 10px; border-radius: 18px; }
  .topbar nav a.active { box-shadow: none; background: var(--pink-100); border-color: transparent; }
  .topbar nav .ico { width: 22px; height: 22px; }
  .lbl { display: none; }
  .lbl-corto { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

  .content { padding: var(--space-4) var(--space-3) var(--space-5); }
  .content h1 { font-size: var(--text-xl); margin-bottom: var(--space-4); }
  .view { gap: var(--space-4); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
  .dashboard-hero { align-items: flex-start; flex-direction: column; }
  .dashboard-hero-side { align-items: flex-start; text-align: left; }
  .dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-kpis article { min-height: 105px; padding: var(--space-3); }
  .dashboard-kpis strong { font-size: 25px; }
  .week-bars { height: 170px; gap: 5px; padding-inline: var(--space-3); }
  .stat { padding: var(--space-3) var(--space-4); }
  .stat .label { font-size: var(--text-xs); }
  .stat .value { font-size: 19px; overflow-wrap: anywhere; }

  /* barras de herramientas: las pestañas arriba, los botones en una fila que reparte el ancho */
  .tabs .spacer { flex-basis: 100%; height: 0; }
  .tabs > .btn, .tabs > a.btn { flex: 1 1 auto; text-align: center; padding-inline: var(--space-4); }
  .tabs input[type=search] { width: 100%; order: 5; }
  .tabs .tab { flex-shrink: 0; }
  .page-title { flex-basis: 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--space-3) * -1); padding: 2px var(--space-3); }
  .chips::-webkit-scrollbar { display: none; }
  .pad .chips { margin-inline: calc(var(--space-4) * -1); padding-inline: var(--space-4); }

  /* tamaños cómodos para el dedo; 16 px evita el zoom automático del teclado en iPhone */
  input, select, textarea { font-size: 16px; }
  .btn.sm { padding: var(--space-2) var(--space-4); }
  .qty .btn { width: 36px; height: 36px; }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
  .kds-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .kds-order { min-height: 0; padding: var(--space-4); }
  .kds-foot { align-items: stretch; flex-direction: column; }
  .kds-foot .btn { width: 100%; }
  .tile { padding: var(--space-4); gap: var(--space-2); }
  .tile-head { font-size: var(--text-base); flex-wrap: wrap; }
  .tile-body { min-height: 0; }
  .tile-actions .btn { flex: 1 1 auto; text-align: center; }
  .prods { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
  .prod { min-height: 190px; padding: 13px; border-radius: 20px; }
  .product-filter { top: 70px; }
  .catalog-summary { align-items: flex-start; flex-direction: column; gap: 2px; }
  .order-cart { position: static !important; max-height: none !important; }
  .cart-empty { min-height: 260px; }
  .cart-item { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .cart-item-total { grid-column: 2 / -1; }
  .cart-total { align-items: stretch; flex-direction: column; }
  .cart-total .btn { width: 100%; }
  .cols, .fila2 { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 76px 1fr auto; gap: var(--space-2); }
  .form { padding: var(--space-4); }
  th, td { padding: var(--space-3); }
  .card h2 { padding: var(--space-3) var(--space-4); }

  /* tablas apiladas: una tarjeta por fila, con el nombre de la columna a la izquierda */
  table.apilada thead { display: none; }
  table.apilada, table.apilada tbody, table.apilada tr { display: block; }
  table.apilada tr { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
  table.apilada tr:last-child { border-bottom: 0; }
  table.apilada td { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); padding: 3px 0; border: 0; text-align: right; background: none; }
  table.apilada td::before { content: attr(data-label); flex-shrink: 0; color: var(--text-muted); font-size: var(--text-sm); font-weight: var(--w-regular); text-align: left; }
  table.apilada td:first-child { display: block; padding-bottom: var(--space-1); font-size: var(--text-lg); text-align: left; }
  table.apilada td:first-child::before, table.apilada td[data-label=""]::before, table.apilada td.actions::before { display: none; }
  table.apilada td.actions { justify-content: flex-end; flex-wrap: wrap; gap: var(--space-2); padding-top: var(--space-2); white-space: normal; }
  table.apilada td.actions:empty { display: none; }
  table.apilada td.actions .btn { margin: 0; flex: 1 1 auto; text-align: center; }
  table.apilada tr.total-row { background: var(--glass-soft); }
  table.apilada tr.total-row td { font-size: var(--text-base); }
  table.apilada tr.total-row td:empty { display: none; }

  /* ventanas como hoja que sube desde abajo */
  dialog {
    width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; border-bottom: 0;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  }
  dialog[open] { animation: hojaSube var(--t-base) ease-out; }
  dialog form { padding: var(--space-5) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom)); }
  dialog h2 { font-size: 20px; }
  .modal-actions .btn { flex: 1; text-align: center; }
  .factura { padding: var(--space-4); }
  .toast { bottom: calc(88px + env(safe-area-inset-bottom)); width: max-content; text-align: center; }
}
@keyframes hojaSube {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* REDISEÑO INTEGRAL 2026 */
:root { --surface-app:#fff9fb; --surface-card:rgba(255,255,255,.88); --line-soft:rgba(123,23,59,.10); --shadow-soft:0 10px 32px rgba(103,28,61,.07); --shadow-float:0 18px 48px rgba(103,28,61,.12); }
body { background:radial-gradient(circle at 94% 4%,rgba(252,144,192,.18),transparent 26rem),radial-gradient(circle at 18% 96%,rgba(228,49,65,.07),transparent 28rem),var(--surface-app); color:var(--ink-1); }
body::before,body::after { opacity:.22; filter:blur(90px); }
.content>h1 { margin:0 0 22px; color:var(--ink-1); font-family:var(--font-display); font-size:clamp(28px,2.2vw,38px); font-weight:700; letter-spacing:-.035em; }
.content>h1::after { content:""; display:block; width:42px; height:4px; margin-top:9px; border-radius:99px; background:linear-gradient(90deg,var(--red-fresa),var(--pink-500)); }
.view { gap:18px; }
.card,.stat,.panel,.form,.pad,.tile,.order-card,.cash-card,.product-filter,.order-cart,.dashboard-hero,.quick-actions { border-color:var(--line-soft); background:var(--surface-card); box-shadow:var(--shadow-soft); backdrop-filter:blur(18px) saturate(125%); -webkit-backdrop-filter:blur(18px) saturate(125%); }
.card,.panel,.pad,.form,.order-cart { border-radius:24px; }
.stat { border-radius:20px; box-shadow:0 8px 24px rgba(103,28,61,.055); }
.stat::before { height:3px; opacity:.75; }
.stat strong { color:var(--ink-1); font-size:clamp(26px,2.2vw,36px); }
.btn { min-height:42px; border-radius:13px; font-weight:800; box-shadow:none; transition:transform .18s ease,box-shadow .18s ease,background .18s ease; }
.btn:hover { transform:translateY(-2px); box-shadow:0 10px 22px rgba(159,31,78,.13); }
.btn.primary { border-color:transparent; background:linear-gradient(135deg,var(--red-fresa),var(--pink-500)); color:#fff; box-shadow:0 8px 22px rgba(199,42,99,.24); }
input,select,textarea { min-height:44px; border-color:var(--line-soft); background:rgba(255,255,255,.92); box-shadow:inset 0 1px 2px rgba(58,18,38,.03); }
input:focus,select:focus,textarea:focus { border-color:rgba(199,42,99,.45); box-shadow:0 0 0 4px rgba(199,42,99,.10); }
.pos { grid-template-columns:minmax(560px,1.45fr) minmax(340px,.85fr); gap:20px; align-items:start; }
.product-filter { padding:14px; border-radius:18px; }
.dropdown-filter { min-height:48px; font-weight:800; }
.prods { grid-template-columns:repeat(auto-fill,minmax(168px,1fr)); gap:13px; }
.prod { min-height:202px; padding:16px; border:1px solid var(--line-soft); border-radius:20px; background:rgba(255,255,255,.94); box-shadow:0 7px 22px rgba(87,25,51,.06); overflow:hidden; }
.prod::before { width:74px; height:74px; opacity:.11; }
.prod:hover { transform:translateY(-5px); border-color:rgba(199,42,99,.20); box-shadow:0 16px 34px rgba(103,28,61,.12); }
.prod .product-icon { box-shadow:0 8px 18px rgba(159,31,78,.15); }
.prod .product-price { font-size:20px; letter-spacing:-.02em; }
.order-cart { top:24px; padding:18px; }
.cart-empty { min-height:340px; border:1px dashed rgba(199,42,99,.18); border-radius:20px; background:rgba(255,249,251,.72); }
.cart-item { border-radius:16px; background:#fff; box-shadow:0 5px 16px rgba(87,25,51,.055); }
.cart-total { border-radius:18px; background:linear-gradient(135deg,rgba(250,226,232,.72),rgba(255,255,255,.9)); }
table { background:rgba(255,255,255,.62); }
thead th { background:rgba(250,226,232,.58); color:var(--pink-700); }
tbody tr:hover td { background:rgba(255,245,248,.75); }
.tabs { padding:5px; border:1px solid var(--line-soft); border-radius:16px; background:rgba(255,255,255,.65); }
.tab { border-radius:11px; }
.tab.active { background:#fff; box-shadow:0 6px 16px rgba(103,28,61,.08); }

@media (min-width:901px) {
  .app { display:block; min-height:100vh; }
  .topbar { position:fixed; z-index:60; inset:18px auto 18px 18px; width:226px; height:auto; min-height:0; padding:18px 13px 14px; display:flex; flex-direction:column; align-items:stretch; gap:18px; border:1px solid rgba(255,255,255,.92); border-radius:28px; background:rgba(255,255,255,.78); box-shadow:var(--shadow-float); backdrop-filter:blur(26px) saturate(145%); -webkit-backdrop-filter:blur(26px) saturate(145%); }
  .brand { min-width:0; justify-content:center; padding:6px 0 13px; border-bottom:1px solid var(--line-soft); }
  .brand-logo { width:68px; height:68px; object-fit:contain; filter:drop-shadow(0 8px 12px rgba(159,31,78,.14)); }
  .topbar nav { width:100%; display:flex; flex-direction:column; align-items:stretch; gap:5px; overflow:visible; }
  .topbar nav a { position:relative; width:100%; min-height:44px; padding:0 13px; justify-content:flex-start; gap:11px; border:1px solid transparent; border-radius:14px; color:var(--ink-2); font-size:13px; font-weight:800; }
  .topbar nav a::after { display:none; }
  .topbar nav a:hover { background:rgba(250,226,232,.56); color:var(--pink-700); transform:translateX(2px); }
  .topbar nav a.active { border-color:rgba(199,42,99,.09); background:linear-gradient(105deg,rgba(250,226,232,.94),rgba(255,255,255,.9)); color:var(--pink-500); box-shadow:0 8px 20px rgba(103,28,61,.07); }
  .topbar nav a.active::before { content:""; position:absolute; left:0; width:4px; height:22px; border-radius:0 8px 8px 0; background:var(--red-fresa); }
  .topbar nav a svg { width:18px; height:18px; }
  .topbar-right { margin-top:auto; width:100%; display:flex; flex-direction:column; align-items:stretch; gap:9px; }
  .clock { order:2; padding:8px 4px 0; border-top:1px solid var(--line-soft); text-align:center; font-size:10px; line-height:1.35; }
  .account-menu { order:1; width:100%; }
  .account-link { width:100%; min-width:0; min-height:54px; justify-content:flex-start; padding:7px 9px; border-radius:16px; background:rgba(255,245,248,.86); }
  .account-copy { display:grid; min-width:0; }
  .account-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .account-dropdown { top:auto; right:auto; bottom:0; left:calc(100% + 12px); width:240px; transform-origin:left bottom; }
  .content { width:auto; max-width:none; min-height:100vh; margin:0 0 0 258px; padding:34px clamp(24px,2.5vw,44px) 48px; }
  .view { width:100%; }
}
@media (max-width:1180px) and (min-width:901px) {
  .topbar { width:204px; }
  .content { margin-left:230px; padding-inline:22px; }
  .pos { grid-template-columns:minmax(470px,1.3fr) minmax(300px,.8fr); }
  .prods { grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); }
}
@media (max-width:900px) {
  body { background:linear-gradient(160deg,#fffafb 0%,#fff4f7 100%); }
  .content { padding:20px 12px calc(102px + env(safe-area-inset-bottom)); }
  .content>h1 { margin-bottom:18px; font-size:28px; }
  .content>h1::after { width:34px; height:3px; margin-top:7px; }
  .topbar { background:rgba(255,255,255,.86); border-bottom-color:var(--line-soft); box-shadow:0 5px 18px rgba(103,28,61,.06); }
  .topbar nav { background:rgba(255,255,255,.92); border-color:rgba(123,23,59,.10); box-shadow:0 -7px 28px rgba(103,28,61,.10); }
  .topbar nav a.active { background:rgba(250,226,232,.78); }
  .card,.panel,.pad,.form,.order-cart { border-radius:20px; }
  .pos { display:block; }
  .prods { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .prod { min-height:184px; padding:13px; border-radius:18px; }
  .product-filter { top:68px; }
  .order-cart { margin-top:14px; }
}

/* Rediseño POS compacto: estructura de trabajo, sin ilustraciones */
@media (min-width:901px) {
  .app { display:block; padding-top:84px; }
  .topbar {
    position:fixed; z-index:60; inset:0 0 auto 0; width:100%; height:72px; min-height:72px;
    padding:9px 24px; display:grid; grid-template-columns:170px minmax(0,1fr) auto;
    align-items:center; gap:18px; border:0; border-bottom:1px solid var(--line-soft);
    border-radius:0; background:rgba(255,255,255,.91); box-shadow:0 7px 24px rgba(103,28,61,.065);
    backdrop-filter:blur(22px) saturate(135%); -webkit-backdrop-filter:blur(22px) saturate(135%);
  }
  .brand { min-width:0; justify-content:flex-start; padding:0; border:0; }
  .brand-logo { width:52px; height:52px; filter:drop-shadow(0 5px 9px rgba(159,31,78,.12)); }
  .topbar nav { width:auto; display:flex; flex-direction:row; justify-content:center; align-items:center; gap:3px; overflow:visible; }
  .topbar nav a { width:auto; min-height:40px; padding:0 12px; justify-content:center; gap:7px; border-radius:12px; font-size:12px; white-space:nowrap; }
  .topbar nav a:hover { transform:none; background:rgba(250,226,232,.55); }
  .topbar nav a.active { background:#fff0f5; box-shadow:inset 0 0 0 1px rgba(199,42,99,.09); }
  .topbar nav a.active::before { display:none; }
  .topbar nav a.active::after { display:block; content:""; position:absolute; left:14px; right:14px; bottom:2px; width:auto; height:2px; border-radius:9px; background:var(--pink-500); }
  .topbar nav a svg { width:15px; height:15px; }
  .topbar-right { margin:0; width:auto; display:flex; flex-direction:row; align-items:center; gap:12px; }
  .clock { order:1; max-width:150px; padding:0; border:0; text-align:right; font-size:10px; }
  .account-menu { order:2; width:auto; }
  .account-link { width:auto; min-width:178px; min-height:48px; padding:5px 9px; border:1px solid rgba(199,42,99,.10); border-radius:15px; }
  .account-dropdown { top:calc(100% + 10px); right:0; bottom:auto; left:auto; width:240px; transform-origin:right top; }
  .content { width:auto; max-width:none; min-height:calc(100vh - 84px); margin:0; padding:22px 24px 42px; }
  .content>h1 { margin-bottom:14px; font-size:28px; }
  .content>h1::after { width:32px; height:3px; margin-top:6px; }
  .sell-order-bar { position:sticky; z-index:22; top:82px; margin-bottom:14px; padding:7px; border-radius:15px; }
  .pos { grid-template-columns:minmax(600px,1.62fr) minmax(350px,.78fr); gap:16px; }
  .pos>.pad { padding:16px; }
  .order-cart { top:146px; }
}

@media (min-width:901px) and (max-width:1280px) {
  .topbar { grid-template-columns:76px minmax(0,1fr) auto; padding-inline:16px; gap:10px; }
  .topbar nav a { padding-inline:8px; }
  .topbar nav a .lbl { font-size:11px; }
  .clock { display:none; }
  .account-link { min-width:155px; }
  .content { padding-inline:18px; }
  .pos { grid-template-columns:minmax(520px,1.4fr) minmax(320px,.8fr); }
}

.product-filter.dropdown-filter { display:grid; grid-template-columns:auto minmax(230px,360px); align-items:end; gap:14px; padding:12px 14px; }
.product-filter-head { align-self:center; }
.product-filter-head span i { display:none; }
.category-select { margin:0; }
.catalog-summary { margin:14px 2px 10px; }
.prods { grid-template-columns:repeat(auto-fill,minmax(172px,1fr)); gap:12px; }
.prod { min-height:188px; padding:14px; text-align:left; border-radius:17px; box-shadow:0 4px 14px rgba(87,25,51,.05); }
.prod::before { display:none; }
.prod:hover { transform:translateY(-3px); box-shadow:0 12px 25px rgba(103,28,61,.10); }
.product-card-head { min-height:27px; justify-content:flex-start; gap:8px; }
.product-marker { width:8px; height:8px; flex:0 0 8px; border-radius:50%; background:var(--product-tone); box-shadow:0 0 0 4px color-mix(in srgb,var(--product-tone) 12%,transparent); }
.product-category { padding:5px 8px; border-radius:99px; background:color-mix(in srgb,var(--product-tone) 8%,white); }
.popular-badge { top:12px; right:12px; padding:4px 7px; font-size:9px; box-shadow:none; }
.product-card-copy strong { font-size:15px; line-height:1.25; }
.product-card-foot { margin-top:auto; padding-top:10px; border-top:1px solid var(--line-soft); }
.product-add { width:30px; height:30px; border-radius:10px; font-size:19px; box-shadow:none; }
.cart-icon { width:36px; height:36px; flex-basis:36px; padding:9px 8px; display:flex; flex-direction:column; justify-content:center; gap:4px; border-radius:11px; background:#fff0f5; box-shadow:none; }
.cart-icon i { display:block; width:100%; height:2px; border-radius:4px; background:var(--pink-500); }
.cart-empty { min-height:260px; }
.cart-empty-mark { width:48px; height:48px; display:grid; place-items:center; margin-bottom:11px; border:1px solid rgba(199,42,99,.18); border-radius:14px; background:#fff; color:var(--pink-500); font-size:27px; font-weight:500; }
.cart-empty h3 { margin:0 0 5px; font-size:17px; }
.cart-empty p { max-width:270px; margin:0; }
.cart-empty-orb { display:none!important; }
.order-steps { margin-inline:-4px; }
.cart-item { padding:12px; border:1px solid var(--line-soft); box-shadow:none; }
.cart-item-icon { border-radius:10px; background:#fff0f5; color:var(--pink-600); box-shadow:none; }

@media (max-width:900px) {
  .product-filter.dropdown-filter { display:block; padding:12px; }
  .category-select { margin-top:9px; }
  .prods { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .prod { min-height:176px; }
}

/* Adaptación móvil final */
@media (max-width:900px) {
  html { scroll-padding-top:72px; }
  body { padding:0 0 calc(82px + env(safe-area-inset-bottom)); overflow-x:hidden; }
  .app { width:100%; min-height:100dvh; }
  .topbar {
    position:fixed; z-index:60; top:0; left:0; right:0; width:100%; height:62px;
    margin:0; padding:7px 12px; border:0; border-bottom:1px solid var(--line-soft);
    border-radius:0; background:rgba(255,255,255,.94); box-shadow:0 5px 18px rgba(103,28,61,.07);
  }
  .brand { gap:7px; }
  .brand-logo { width:42px; height:42px; }
  .brand-name { display:none; }
  .topbar-right { margin-left:auto; }
  .clock { display:none; }
  .account-link { min-width:0; min-height:44px; padding:5px; border:0; background:transparent; box-shadow:none; }
  .account-link:hover { transform:none; box-shadow:none; }
  .avatar { width:36px; height:36px; }
  .account-chevron { width:14px; }
  .account-dropdown { position:fixed; top:56px; right:8px; width:min(330px,calc(100vw - 16px)); max-height:calc(100dvh - 145px); overflow:auto; border-radius:18px; }

  .topbar nav {
    position:fixed; z-index:55; left:8px; right:8px; bottom:calc(8px + env(safe-area-inset-bottom));
    width:auto; display:flex; grid-template-columns:none; justify-content:flex-start; gap:3px;
    padding:5px; overflow-x:auto; overscroll-behavior-x:contain; scroll-snap-type:x proximity;
    border:1px solid rgba(123,23,59,.10); border-radius:19px;
    background:rgba(255,255,255,.96); box-shadow:0 10px 32px rgba(103,28,61,.16);
    -webkit-backdrop-filter:blur(20px); backdrop-filter:blur(20px); scrollbar-width:none;
  }
  .topbar nav::-webkit-scrollbar { display:none; }
  .topbar nav a { flex:0 0 68px; min-height:54px; padding:6px 3px; gap:2px; scroll-snap-align:start; border-radius:14px; font-size:9px; }
  .topbar nav a.active { background:#fff0f5; color:var(--pink-500); }
  .topbar nav .ico { width:20px; height:20px; }
  .lbl-corto { display:block; line-height:1.1; }

  .content { width:100%; margin:62px 0 0; padding:17px 11px 24px; }
  .content>h1 { margin:0 0 14px; font-size:25px; }
  .content>h1::after { margin-top:5px; }
  .view { gap:12px; }
  .card,.panel,.pad,.form,.order-cart { border-radius:17px; }
  .stats,.dashboard-kpis { gap:8px; }
  .stat { min-height:88px; padding:12px; border-radius:16px; }
  .stat strong,.stat .value { font-size:22px; }
  .dashboard-hero { padding:18px; border-radius:18px; }
  .dashboard-hero h2 { font-size:24px; }
  .quick-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .quick-actions .btn { width:100%; }

  .sell-order-bar {
    position:sticky; z-index:24; top:69px; display:grid; grid-template-columns:auto 1fr auto;
    gap:7px; margin-bottom:2px; padding:7px; border-radius:15px; background:rgba(255,255,255,.96);
    box-shadow:0 8px 24px rgba(103,28,61,.10);
  }
  .sell-order-bar .page-title { grid-column:2; align-self:center; min-width:0; flex-basis:auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
  .sell-order-bar .badge { grid-column:3; }
  .sell-order-bar .spacer { display:none; }
  .sell-order-bar>.btn { min-width:0; min-height:38px; padding:8px 10px; font-size:12px; }
  .sell-order-bar>.btn.danger { grid-column:1 / 2; grid-row:2; }
  .sell-order-bar>.btn.primary { grid-column:2 / 4; grid-row:2; }
  .pos { display:flex; flex-direction:column; gap:12px; }
  .pos>.pad { order:1; padding:11px; }
  .pos>.order-cart { order:2; padding:13px; }
  .pad>label.search,.pad>.search { margin-bottom:9px; }
  .product-filter.dropdown-filter { padding:10px; border-radius:14px; }
  .product-filter-head { gap:6px; }
  .product-filter-head strong { font-size:12px; }
  .category-select select { min-height:43px; }
  .catalog-summary { margin:10px 2px 8px; font-size:12px; }
  .catalog-summary small { display:none; }
  .prods { margin-top:8px; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .prod { min-height:166px; padding:11px; border-radius:15px; }
  .product-card-head { min-height:22px; gap:5px; }
  .product-category { max-width:100%; padding:4px 6px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:9px; }
  .product-card-copy strong { font-size:13px; line-height:1.2; }
  .prod .product-price { font-size:17px; }
  .product-card-foot small { max-width:calc(100% - 32px); font-size:9px; }
  .product-add { width:28px; height:28px; }
  .popular-badge { display:none; }
  .cart-head { align-items:center; }
  .order-steps { overflow:hidden; font-size:10px; }
  .cart-empty { min-height:180px; padding:24px 12px; }
  .cart-item { grid-template-columns:32px minmax(0,1fr) auto; gap:8px; padding:10px; }
  .cart-item-copy strong { font-size:13px; }
  .cart-total { position:sticky; bottom:calc(78px + env(safe-area-inset-bottom)); z-index:8; padding:12px; box-shadow:0 8px 28px rgba(103,28,61,.14); }
  .cart-total strong { font-size:22px; }

  .tabs { gap:6px; padding:6px; overflow-x:auto; }
  .tabs>.btn,.tabs>a.btn { min-height:40px; padding-inline:11px; }
  table.apilada tr { padding:12px; }
  dialog { max-height:94dvh; border-radius:20px 20px 0 0; }
  dialog form { padding:20px 15px calc(16px + env(safe-area-inset-bottom)); }
}

@media (max-width:390px) {
  .content { padding-inline:8px; }
  .prods { gap:6px; }
  .prod { min-height:158px; padding:9px; }
  .product-card-copy strong { font-size:12px; }
  .prod .product-price { font-size:16px; }
  .topbar nav a { flex-basis:64px; }
}

/* Navegación móvil inspirada en Instagram */
@media (max-width:900px) {
  body { padding-bottom:calc(68px + env(safe-area-inset-bottom)); }
  .topbar nav {
    left:0; right:0; bottom:0; height:calc(58px + env(safe-area-inset-bottom));
    padding:0 8px env(safe-area-inset-bottom); gap:0;
    justify-content:space-between; align-items:center;
    border:0; border-top:1px solid rgba(58,18,38,.10); border-radius:0;
    background:rgba(255,255,255,.98); box-shadow:0 -5px 18px rgba(58,18,38,.06);
    backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
  }
  .topbar nav a {
    position:relative; flex:1 0 48px; min-width:48px; max-width:72px; min-height:58px;
    padding:0; display:grid; place-items:center; border:0; border-radius:0;
    color:#6f4a5b; background:transparent; scroll-snap-align:center;
  }
  .topbar nav a:hover,.topbar nav a.active { color:var(--pink-500); background:transparent; box-shadow:none; transform:none; }
  .topbar nav a.active::after {
    content:""; position:absolute; left:50%; bottom:5px; width:4px; height:4px;
    border-radius:50%; background:var(--pink-500); transform:translateX(-50%); box-shadow:none;
  }
  .topbar nav .ico { width:23px; height:23px; stroke-width:1.9; }
  .topbar nav a.active .ico { stroke-width:2.5; transform:scale(1.06); }
  .topbar nav .lbl,.topbar nav .lbl-corto { display:none!important; }
  .cart-total { bottom:calc(64px + env(safe-area-inset-bottom)); }
  .toast { bottom:calc(70px + env(safe-area-inset-bottom)); }
}

