/* ==========================================================================
   Legado de California — Sistema Interno
   Tema oscuro premium, inspirado en la landing (noche de la Sierra + oro).
   ========================================================================== */

:root {
  color-scheme: dark;

  --bg: #070b12;
  --surface-0: rgba(12, 18, 28, 0.6);
  --surface-1: #0e1520;
  --surface-2: #131c2a;
  --surface-3: #1a2536;
  --surface-glass: rgba(19, 28, 42, 0.78);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text: #eef1f6;
  --text-soft: #c6cdd8;
  --muted: #8b97a8;

  --gold: #f5b544;
  --gold-light: #fcd27b;
  --gold-deep: #d98a1c;
  --blue: #2a8fd6;
  --blue-light: #6cc4f5;
  --red: #e0463e;
  --red-light: #ff8a80;
  --green: #22c08a;
  --green-light: #5fe0b0;
  --violet-light: #c9a7ff;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, 0.75);
  --ring: 0 0 0 3px rgba(245, 181, 68, 0.28);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --font-display: 'Didot', 'Bodoni MT', 'Playfair Display', 'Palatino Linotype', Georgia, serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: clip;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

a { color: inherit; }

::selection { background: rgba(245, 181, 68, 0.35); color: #fff; }

.hidden { display: none !important; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.16) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.24); }
*::-webkit-scrollbar-track { background: transparent; }

/* Ambient background (imagen pre-desenfocada de 1 KB, sin filtros CSS costosos) */
.app-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 8% 0%, rgba(245, 181, 68, 0.10), transparent 70%),
    radial-gradient(ellipse 55% 45% at 100% 10%, rgba(42, 143, 214, 0.10), transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 110%, rgba(224, 70, 62, 0.07), transparent 70%),
    linear-gradient(180deg, rgba(7, 11, 18, 0.55), rgba(7, 11, 18, 0.92) 55%, var(--bg)),
    url('/assets/brand/bg-ambient.webp') center top / cover no-repeat,
    var(--bg);
}

.tricolor-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0 33.3%, var(--blue) 33.3% 66.6%, var(--red) 66.6% 100%);
}

/* ==========================================================================
   Login
   ========================================================================== */
.login-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  overflow: hidden;
  isolation: isolate;
}

.login-photo {
  position: absolute;
  inset: -4%;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 70% at 50% 50%, rgba(7, 11, 18, 0.25), rgba(7, 11, 18, 0.85) 100%),
    linear-gradient(180deg, rgba(7, 11, 18, 0.2), rgba(7, 11, 18, 0.75)),
    url('/assets/brand/bg-redwoods.webp') center / cover no-repeat;
  animation: loginDrift 40s ease-in-out infinite alternate;
}

@keyframes loginDrift {
  from { transform: scale(1.02); }
  to { transform: scale(1.1) translate(-1%, -1%); }
}

.login-card {
  width: 100%;
  max-width: 410px;
  background: rgba(10, 16, 24, 0.62);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  padding: 2.2rem 2rem 1.8rem;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: rise 0.9s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.login-logo {
  display: block;
  width: 116px;
  height: 116px;
  object-fit: contain;
  margin: -0.4rem auto 0.9rem;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.55));
}

.login-card h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2rem;
  letter-spacing: 0.02em;
  text-align: center;
  margin-bottom: 0.25rem;
}

.login-sub {
  color: var(--text-soft);
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 1.6rem;
}

.login-card input {
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.14);
  padding: 0.78rem 0.95rem;
}

.login-error {
  color: var(--red-light);
  font-size: 0.88rem;
  margin-bottom: 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(224, 70, 62, 0.12);
  border: 1px solid rgba(224, 70, 62, 0.3);
}

.login-back { text-align: center; margin-top: 1.1rem; }
.login-back a { color: var(--muted); font-size: 0.85rem; text-decoration: none; transition: color 0.2s; }
.login-back a:hover { color: var(--gold-light); }

/* ==========================================================================
   Topbar + Tabs
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(8, 12, 19, 0.82);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--border);
}

.topbar::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--gold) 0 33.3%, var(--blue) 33.3% 66.6%, var(--red) 66.6% 100%);
  opacity: 0.9;
}

.topbar-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.topbar-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  line-height: 1.1;
}

.brand-text strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.12rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.8rem 0.25rem 0.3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 0.86rem;
  font-weight: 600;
  margin-left: 0.25rem;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-deep));
  color: #1a1206;
}

.user-avatar svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.role-badge {
  display: inline-block;
  width: fit-content;
  padding: 0.08rem 0.5rem;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.role-badge.admin {
  background: rgba(245, 181, 68, 0.14);
  color: var(--gold-light);
  border: 1px solid rgba(245, 181, 68, 0.35);
}

.role-badge.oficina {
  background: rgba(42, 143, 214, 0.16);
  color: var(--blue-light);
  border: 1px solid rgba(108, 196, 245, 0.35);
}

.tabs-bar {
  border-top: 1px solid var(--border);
  background: rgba(10, 15, 24, 0.72);
}

.tabs-ribbon {
  position: relative;
  max-width: 1480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.tabs-ribbon::before,
.tabs-ribbon::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 34px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s;
}

.tabs-ribbon::before {
  left: 0;
  background: linear-gradient(90deg, rgba(8, 12, 19, 0.96), transparent);
}

.tabs-ribbon::after {
  right: 0;
  background: linear-gradient(270deg, rgba(8, 12, 19, 0.96), transparent);
}

.tabs-ribbon.has-left::before { opacity: 1; }
.tabs-ribbon.has-right::after { opacity: 1; }

.ribbon-arrow {
  position: relative;
  z-index: 3;
  width: 32px;
  height: 32px;
  margin: 0 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(19, 28, 42, 0.92);
  color: var(--gold-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  transition: background 0.18s, transform 0.15s, border-color 0.18s;
}

.ribbon-arrow:hover {
  background: rgba(245, 181, 68, 0.22);
  border-color: var(--gold);
  transform: scale(1.06);
}

.ribbon-arrow.is-hidden {
  display: none;
}

.tabs-inner {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.42rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.tabs-inner::-webkit-scrollbar { display: none; }

.tab-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  padding: 0.5rem 0.88rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.86rem;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.tab-btn.active {
  color: var(--gold-light);
  background: linear-gradient(180deg, rgba(245, 181, 68, 0.18), rgba(245, 181, 68, 0.07));
  border-color: rgba(245, 181, 68, 0.35);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: -0.42rem;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(245, 181, 68, 0.8);
}

/* SVG icons */
.ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.app-main {
  max-width: 1480px;
  margin: 0 auto;
  padding: 1.6rem 1.25rem 3rem;
}

.tab-panel { animation: panelIn 0.45s var(--ease) both; }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.panel-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.3rem;
}

.panel-header h2 {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.panel-header p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.3rem;
  max-width: 70ch;
}

h3 { letter-spacing: -0.01em; }

code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.82em;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold-light);
}

/* ==========================================================================
   Forms & Buttons
   ========================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  margin-bottom: 0.9rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.85rem;
}

label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.01em;
}

input, select, textarea {
  width: 100%;
  padding: 0.62rem 0.82rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: rgba(6, 10, 16, 0.6);
  color: var(--text);
  font-size: 0.93rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

input::placeholder, textarea::placeholder { color: #66717f; }

input:hover, select:hover, textarea:hover { border-color: rgba(255, 255, 255, 0.22); }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: var(--ring);
  background: rgba(6, 10, 16, 0.85);
}

select {
  cursor: pointer;
  white-space: nowrap;
  text-overflow: ellipsis;
}

select option { background: var(--surface-2); color: var(--text); }

input[type="checkbox"] {
  width: 18px !important;
  height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
}

input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.75); cursor: pointer; }

input[type="number"] { font-variant-numeric: tabular-nums; }

textarea { resize: vertical; min-height: 90px; line-height: 1.45; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s var(--ease), filter 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
}

.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 45%, var(--gold-deep));
  color: #1b1205;
  box-shadow: 0 8px 22px -10px rgba(245, 181, 68, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-gold:hover:not(:disabled) { filter: brightness(1.06); box-shadow: 0 12px 28px -10px rgba(245, 181, 68, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.4); }

.btn-blue {
  background: linear-gradient(135deg, #3aa3ea, var(--blue));
  color: #fff;
  box-shadow: 0 8px 20px -10px rgba(42, 143, 214, 0.8);
}

.btn-blue:hover:not(:disabled) { filter: brightness(1.08); }

.btn-green {
  background: linear-gradient(135deg, #3bd69d, var(--green));
  color: #04261a;
  box-shadow: 0 8px 20px -10px rgba(34, 192, 138, 0.8);
}

.btn-green:hover:not(:disabled) { filter: brightness(1.06); }

.btn-red {
  background: rgba(224, 70, 62, 0.12);
  border-color: rgba(224, 70, 62, 0.38);
  color: var(--red-light);
}

.btn-red:hover:not(:disabled) { background: rgba(224, 70, 62, 0.22); border-color: rgba(224, 70, 62, 0.6); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.24); }

.btn-sm { padding: 0.42rem 0.75rem; font-size: 0.8rem; border-radius: 9px; }
.btn-sm .ico { width: 15px; height: 15px; }
.btn-icon { padding: 0.42rem; }
.btn-block { width: 100%; padding: 0.85rem; font-size: 0.95rem; }

/* ==========================================================================
   Cards & KPIs
   ========================================================================== */
.card-box {
  position: relative;
  background: linear-gradient(180deg, rgba(24, 34, 50, 0.85), rgba(16, 24, 36, 0.85));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.4rem;
}

#adsKpis {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.kpi-card {
  --accent: var(--gold-light);
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(24, 34, 50, 0.9), rgba(16, 24, 36, 0.9));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem 1rem 1.3rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), border-color 0.25s;
}

.kpi-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14%;
  bottom: 14%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
  opacity: 0.85;
}

.kpi-card::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.06;
  filter: blur(10px);
  pointer-events: none;
}

.kpi-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }

.kpi-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1.15;
}

.kpi-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* ==========================================================================
   POS
   ========================================================================== */
.pos-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, 0.9fr);
  gap: 1.25rem;
  align-items: start;
}

.pos-layout > .card-box {
  min-width: 0;
}

.pos-layout > .card-box:last-child {
  position: sticky;
  top: 124px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

@media (max-width: 1060px) {
  .pos-layout { grid-template-columns: 1fr; }
  .pos-layout > .card-box:last-child { position: static; max-height: none; overflow: visible; }
}

.pos-toolbar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.pos-toolbar input {
  flex: 1 1 220px;
  padding-left: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b97a8' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.85rem center;
}

.pos-categories {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.chip {
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-strong);
  color: var(--text-soft);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.chip:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }

.chip.active {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #1b1205;
  border-color: transparent;
  box-shadow: 0 6px 16px -8px rgba(245, 181, 68, 0.8);
}

.pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 0.85rem;
  max-height: calc(100vh - 290px);
  min-height: 320px;
  overflow-y: auto;
  padding: 0.15rem 0.35rem 0.35rem 0.15rem;
  contain: content;
}

.pos-item {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font: inherit;
  padding: 0;
  transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
  content-visibility: auto;
  contain-intrinsic-size: 168px 240px;
}

.pos-item:hover {
  border-color: rgba(245, 181, 68, 0.55);
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(245, 181, 68, 0.15);
}

.pos-item:active { transform: translateY(-1px) scale(0.985); }
.pos-item:focus-visible { outline: none; box-shadow: var(--ring); }

.pos-item-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #070a10;
  transition: transform 0.5s var(--ease);
}

.pos-item:hover .pos-item-img { transform: scale(1.05); }

/* Imágenes ilustrativas por defecto (SVG / logo): mostrarlas completas, sin recorte */
.pos-item-img[src$=".svg"],
.pos-item-img[src*="/assets/brand/"] {
  object-fit: contain;
  padding: 0.5rem;
  background: radial-gradient(circle at 50% 40%, #121b29, #070a10 75%);
}

.pos-item-body {
  position: relative;
  padding: 0.65rem 0.7rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
  flex: 1;
  background: var(--surface-1);
}

.pos-item-title {
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.25;
}

.pos-item-meta {
  font-size: 0.72rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pos-item-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.4rem;
  font-size: 0.84rem;
}

.pos-price {
  color: var(--gold-light);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.stock-pill {
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(34, 192, 138, 0.14);
  color: var(--green-light);
  white-space: nowrap;
}

.stock-pill.low {
  background: rgba(224, 70, 62, 0.16);
  color: var(--red-light);
}

/* Customer Combobox */
.customer-combobox {
  position: relative;
}

.customer-combobox-row {
  display: flex;
  gap: 0.45rem;
  align-items: stretch;
}

.customer-input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

#posCustomerSearch {
  padding-left: 2.35rem;
  padding-right: 2.15rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b97a8' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.8rem center;
}

.customer-clear-btn {
  position: absolute;
  right: 0.42rem;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.customer-clear-btn:hover {
  background: rgba(245, 181, 68, 0.22);
  color: var(--gold-light);
}

.customer-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 45;
  max-height: 280px;
  overflow-y: auto;
  background: rgba(15, 22, 34, 0.98);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(245, 181, 68, 0.34);
  border-radius: 12px;
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.85);
  padding: 0.32rem;
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
}

.customer-option {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 0.5rem 0.68rem;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  transition: background 0.14s, border-color 0.14s;
}

.customer-option:hover,
.customer-option.is-active {
  background: rgba(245, 181, 68, 0.12);
  border-color: rgba(245, 181, 68, 0.28);
}

.customer-option.is-selected {
  background: rgba(245, 181, 68, 0.16);
  border-color: rgba(245, 181, 68, 0.4);
}

.customer-option.is-create {
  color: var(--gold-light);
  font-weight: 600;
  border-top: 1px dashed var(--border-strong);
  margin-top: 0.2rem;
  padding-top: 0.55rem;
}

.customer-option-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.customer-option-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-option-name mark {
  background: rgba(245, 181, 68, 0.32);
  color: var(--gold-light);
  border-radius: 3px;
  padding: 0 2px;
}

.customer-option-sub {
  font-size: 0.73rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-option-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.customer-option-debt {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--red-light);
  background: rgba(224, 70, 62, 0.14);
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}

.customer-dropdown-footer {
  padding: 0.4rem 0.65rem 0.25rem;
  font-size: 0.74rem;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 0.15rem;
}

.customer-dropdown-empty {
  padding: 0.7rem 0.65rem;
  font-size: 0.83rem;
  color: var(--muted);
  text-align: center;
}

.customer-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  min-height: 1.25rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.customer-meta-debt {
  color: var(--red-light);
  font-weight: 700;
}

/* Cart */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0.9rem 0;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.cart-row {
  background: rgba(6, 10, 16, 0.55);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  animation: rise 0.35s var(--ease) both;
}

.cart-row-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.cart-row-controls input[type="number"] {
  width: 104px;
  padding: 0.38rem 0.55rem;
  font-size: 0.86rem;
}

.qty-box {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.qty-box input {
  width: 54px;
  text-align: center;
  padding: 0.34rem;
}

.modified-tag {
  font-size: 0.7rem;
  color: var(--blue-light);
  font-weight: 600;
}

.backdate-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(42, 143, 214, 0.08);
  border: 1px solid rgba(108, 196, 245, 0.22);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.85rem;
  font-size: 0.84rem;
}

.backdate-bar label { color: var(--text-soft); }

.summary-box {
  border-top: 1px dashed var(--border-strong);
  padding-top: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.93rem;
}

.summary-total {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--gold-light);
  padding: 0.6rem 0.85rem;
  margin: 0.15rem -0.15rem;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(245, 181, 68, 0.12), rgba(245, 181, 68, 0.02));
  border: 1px solid rgba(245, 181, 68, 0.22);
}

.summary-total span:first-child {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--text-soft);
}

.quick-pay-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin: 0.3rem 0;
}

.quick-pay-modes .btn { white-space: normal; text-align: center; }

#submitSaleBtn { font-size: 0.98rem; padding: 0.9rem !important; letter-spacing: 0.02em; }

/* ==========================================================================
   Badges
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
}

.badge-pagado { background: rgba(34, 192, 138, 0.14); color: var(--green-light); }
.badge-parcial { background: rgba(245, 181, 68, 0.14); color: var(--gold-light); }
.badge-pendiente { background: rgba(224, 70, 62, 0.16); color: var(--red-light); }
.badge-devuelto { background: rgba(168, 85, 247, 0.16); color: var(--violet-light); }
.badge-anulado { background: rgba(156, 163, 175, 0.14); color: #c3c9d2; }
.badge-info { background: rgba(42, 143, 214, 0.16); color: var(--blue-light); }
.badge-nuevo { background: rgba(42, 143, 214, 0.18); color: var(--blue-light); }
.badge-recompra { background: rgba(34, 192, 138, 0.16); color: var(--green-light); }
.badge-otro { background: rgba(156, 163, 175, 0.16); color: #cbd5e1; }
.badge-mayorista { background: rgba(245, 181, 68, 0.16); color: var(--gold-light); }
.badge-detal { background: rgba(156, 163, 175, 0.14); color: #cbd5e1; }
.badge-vip { background: rgba(168, 85, 247, 0.18); color: var(--violet-light); }

.filter-bar {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.filter-count {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.field-hint {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.3;
}

.pos-item.out-of-stock {
  opacity: 0.56;
  border-style: dashed;
}

.pos-item.out-of-stock:hover {
  opacity: 0.88;
}

/* Publicidad ROI Verdict & Comparison Bars */
.verdict-banner {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.verdict-banner.rentable {
  background: linear-gradient(90deg, rgba(34, 192, 138, 0.16), rgba(34, 192, 138, 0.04));
  border-color: rgba(34, 192, 138, 0.45);
}

.verdict-banner.recompra {
  background: linear-gradient(90deg, rgba(245, 181, 68, 0.16), rgba(42, 143, 214, 0.06));
  border-color: rgba(245, 181, 68, 0.45);
}

.verdict-banner.alerta {
  background: linear-gradient(90deg, rgba(224, 70, 62, 0.18), rgba(224, 70, 62, 0.04));
  border-color: rgba(224, 70, 62, 0.45);
}

.channel-bars {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.bar-row {
  display: grid;
  grid-template-columns: 200px 1fr 190px;
  align-items: center;
  gap: 0.9rem;
}

.bar-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.bar-sub {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 400;
}

.bar-track {
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  border: 1px solid var(--border);
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s var(--ease);
}

.bar-value {
  text-align: right;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .bar-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .bar-value {
    text-align: left;
  }
}

/* ==========================================================================
   Toast
   ========================================================================== */
.toast-banner {
  position: fixed;
  bottom: 1.4rem;
  right: 1.4rem;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.15rem 0.85rem 1rem;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-strong);
  background: rgba(26, 37, 54, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  max-width: 400px;
  animation: toastIn 0.45s var(--ease) both;
}

.toast-banner::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--blue-light);
  box-shadow: 0 0 10px currentColor;
}

.toast-banner.success { border-color: rgba(34, 192, 138, 0.45); }
.toast-banner.success::before { background: var(--green-light); color: var(--green-light); }
.toast-banner.error { border-color: rgba(224, 70, 62, 0.55); background: rgba(58, 20, 22, 0.94); }
.toast-banner.error::before { background: var(--red-light); color: var(--red-light); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(560px, 72vh);
  container-type: inline-size;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(14, 21, 32, 0.88);
  box-shadow: var(--shadow);
}

.table-wrapper:focus-visible { outline: none; box-shadow: var(--ring); }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
}

caption {
  text-align: left;
  padding: 0.85rem 1.1rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  background: linear-gradient(90deg, rgba(245, 181, 68, 0.08), transparent 60%), var(--surface-2);
  border-bottom: 1px solid var(--border);
}

caption::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--gold);
  margin-right: 0.6rem;
  vertical-align: middle;
  transform: rotate(45deg) translateY(-2px);
}

th, td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
  background: var(--surface-3);
}

thead th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
  background: var(--surface-3);
}

tbody th {
  position: sticky;
  inset-inline-start: 0;
  background: #111a27;
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
}

tbody tr { transition: background 0.15s; }
tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.012); }
tbody tr:hover td,
tbody tr:hover th { background: rgba(245, 181, 68, 0.045); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: none; }

td strong { font-weight: 700; }

/* Fechas, montos y acciones en una sola línea */
#salesTable td:nth-child(2), #debtsTable td:nth-child(2), #paymentsTable td:nth-child(2),
#expensesTable td:nth-child(2), #auditTable th, #batchTable td:nth-child(2),
#salesTable td:nth-child(4), #salesTable td:nth-child(5), #salesTable td:nth-child(6),
#debtsTable td:nth-child(3), #debtsTable td:nth-child(4), #debtsTable td:nth-child(5) {
  white-space: nowrap;
}
#salesTable td:last-child, #debtsTable td:last-child, #expensesTable td:last-child, #inventoryTable td:last-child {
  flex-wrap: nowrap !important;
  white-space: nowrap;
}

.row-error td, .row-error th { background: rgba(224, 70, 62, 0.12) !important; }
.row-warning td, .row-warning th { background: rgba(245, 181, 68, 0.09) !important; }

/* Column labels for stacked mobile view */
#debtsTable { --label-2: "Fecha"; --label-3: "Total"; --label-4: "Abonado"; --label-5: "Saldo Pendiente"; --label-6: "Estado"; --label-7: "Acción"; }
#paymentsTable { --label-2: "Fecha Abono"; --label-3: "Cliente"; --label-4: "Monto"; --label-5: "Método"; --label-6: "Registrado por"; }
#salesTable { --label-2: "Fecha"; --label-3: "Cliente"; --label-4: "Total"; --label-5: "Pagado"; --label-6: "Saldo"; --label-7: "Estado"; --label-8: "Acciones"; }
#inventoryTable { --label-2: "SKU / Categoría"; --label-3: "Precio Base"; --label-4: "Mayorista"; --label-5: "Stock Actual"; --label-6: "Toma Física / Estado"; --label-7: "Acciones"; }
#auditTable { --label-2: "Producto"; --label-3: "Anterior"; --label-4: "Nuevo"; --label-5: "Diferencia"; --label-6: "Motivo"; --label-7: "Usuario"; }
#expensesTable { --label-2: "Fecha"; --label-3: "Categoría"; --label-4: "Descripción"; --label-5: "Monto"; --label-6: "Método"; --label-7: "Acciones"; }
#batchTable { --label-2: "Fecha"; --label-3: "Cliente"; --label-4: "Producto"; --label-5: "Cant."; --label-6: "Precio Unit."; --label-7: "Total Reportado"; --label-8: "Pagado"; --label-9: "Estado / Diagnóstico"; }
#paymentMethodsTable { --label-2: "Categoría"; --label-3: "Vendido / Pendiente"; --label-4: "Estado"; --label-5: "Acción"; }
#interSettlementsTable { --label-2: "Modo"; --label-3: "Monto Ingresado"; --label-4: "Cambio Aplicado"; --label-5: "Nuevo Total Abonado"; --label-6: "Usuario"; }
#duplicatesTable { --label-2: "Cliente B"; --label-3: "Motivo"; --label-4: "Unificar"; }
#adsMonthlyTable { --label-2: "Gasto Pauta"; --label-3: "Clientes Nuevos"; --label-4: "CAC / Nuevo"; --label-5: "Ventas NUEVO"; --label-6: "Ventas RECOMPRA"; --label-7: "Utilidad Neta Ads"; --label-8: "ROAS"; }
#adsExpensesTable { --label-2: "Tipo"; --label-3: "Descripción"; --label-4: "Monto"; --label-5: "Método"; }

@container (width < 600px) {
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }

  tbody tr {
    margin: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-1);
    overflow: hidden;
  }

  tbody tr:nth-child(even) td { background: transparent; }

  tbody th {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
    background: var(--surface-3);
    border-bottom: 1px solid var(--border);
  }

  tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    text-align: right;
  }

  td:nth-child(2)::before { content: var(--label-2) ": "; }
  td:nth-child(3)::before { content: var(--label-3) ": "; }
  td:nth-child(4)::before { content: var(--label-4) ": "; }
  td:nth-child(5)::before { content: var(--label-5) ": "; }
  td:nth-child(6)::before { content: var(--label-6) ": "; }
  td:nth-child(7)::before { content: var(--label-7) ": "; }
  td:nth-child(8)::before { content: var(--label-8) ": "; }
  td:nth-child(9)::before { content: var(--label-9) ": "; }
  td::before { color: var(--muted); font-weight: 600; text-align: left; font-size: 0.8rem; }
}

/* ==========================================================================
   Dialogs
   ========================================================================== */
dialog {
  margin: auto;
  background: linear-gradient(180deg, rgba(26, 37, 54, 0.97), rgba(17, 25, 38, 0.97));
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 1.5rem;
  max-width: 560px;
  width: calc(100% - 2rem);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.3s var(--ease), transform 0.35s var(--ease), overlay 0.3s allow-discrete, display 0.3s allow-discrete;
}

dialog[open] { opacity: 1; transform: none; }

@starting-style {
  dialog[open] { opacity: 0; transform: translateY(14px) scale(0.98); }
}

dialog.dialog-wide { max-width: 860px; }

dialog::backdrop {
  background-color: rgba(3, 6, 10, 0.68);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}

.dialog-header h3 { font-size: 1.15rem; }

.photo-preview {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  background: #070a10;
}

.thumb-mini {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  background: #070a10;
  vertical-align: middle;
  margin-right: 0.6rem;
  border: 1px solid var(--border);
}

.exp-filter-box {
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
}

.exp-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.exp-cat-chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1120px) {
  .tab-btn { padding: 0.45rem 0.78rem; font-size: 0.83rem; }
  .tabs-inner { padding: 0.4rem 0.5rem; }
}

@media (max-width: 900px) {
  .topbar-user .btn span { display: none; }
  .topbar-user .btn-sm { padding: 0.45rem; }
  .user-chip #userDisplayName { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-width: 600px) {
  body { font-size: 14px; }
  .topbar-inner { padding: 0.5rem 0.9rem; }
  .brand-text strong { font-size: 1rem; }
  .user-chip { display: none; }
  .tabs-inner { padding: 0.38rem 0.4rem; }
  .tab-btn { padding: 0.44rem 0.72rem; }
  .tab-btn span { font-size: 0.81rem; }
  .ribbon-arrow { width: 28px; height: 28px; margin: 0 0.25rem; }
  .app-main { padding: 1.1rem 0.85rem 2.5rem; }
  .panel-header h2 { font-size: 1.3rem; }
  .card-box { padding: 1rem; border-radius: 16px; }
  .pos-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); max-height: 60vh; }
  .quick-pay-modes { grid-template-columns: 1fr 1fr 1fr; }
  .toast-banner { left: 0.9rem; right: 0.9rem; bottom: 0.9rem; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
