/* =========================================================
   Milan Pizza — Estilos base
   Paleta: negro · blanco · rojo
   ========================================================= */

:root {
  --black: #0a0a0a;
  --black-soft: #141414;
  --black-mid: #1f1f1f;
  --white: #ffffff;
  --white-soft: #f5f5f5;
  --white-muted: #ebebeb;
  /* Superficie suave para tarjetas/funciones (contraste ligero sobre blanco) */
  --surface-muted: #e9e6e6;
  --surface-muted-hover: #e2dfdf;
  --surface-border: rgba(0, 0, 0, 0.12);
  --red: #e10600;
  --red-deep: #b00000;
  --red-soft: #f7ecec;

  /* Alias usados en el sistema */
  --ink: var(--black);
  --ink-soft: #4a4a4a;
  --paper: var(--white);
  --paper-2: var(--surface-muted);
  --tomato: var(--red);
  --tomato-deep: var(--red-deep);
  --ember: var(--red);
  --olive: var(--black);
  --line: rgba(0, 0, 0, 0.12);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  --radius: 14px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --sidebar-w: 260px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 70% 45% at 0% 0%, rgba(225, 6, 0, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(225, 6, 0, 0.12), transparent 50%),
    linear-gradient(165deg, #111111 0%, #0a0a0a 50%, #141414 100%);
  background-attachment: fixed;
}

/* Login: imagen de fondo difuminada + negro */
body.page-login {
  background: #0a0a0a;
  position: relative;
  isolation: isolate;
}

body.page-login::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("../img/login-bg.png") center center / cover no-repeat;
  filter: blur(4px) brightness(0.78) saturate(1.05);
  transform: scale(1.05);
  pointer-events: none;
}

body.page-login::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.42) 45%, rgba(0, 0, 0, 0.58) 100%),
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(225, 6, 0, 0.08), transparent 70%);
  pointer-events: none;
}

body.page-login .auth-shell,
body.page-login .main-auth,
body.page-login .site-footer {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ----- App shell + sidebar ----- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: var(--sidebar-w);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(225, 6, 0, 0.18), transparent 32%),
    linear-gradient(180deg, #111111 0%, #0a0a0a 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white);
  padding: 1.15rem 0.9rem 1rem;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 0.25rem 0.35rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.85rem;
  text-align: center;
}

.sidebar-brand .brand {
  margin-bottom: 0.35rem;
  justify-content: center;
}

.brand-with-logo {
  display: flex;
  justify-content: center;
  width: 100%;
}

.sidebar-logo {
  width: min(168px, 100%);
  height: auto;
  display: block;
  object-fit: contain;
  background: transparent;
}

.sidebar-tagline {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  opacity: 0.55;
  padding-left: 0;
  text-align: center;
}

.sidebar-section {
  margin: 0 0 0.45rem;
  padding: 0 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.45;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  font-size: 0.94rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.sidebar-link.is-active {
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  color: var(--white);
  box-shadow: 0 8px 20px rgba(225, 6, 0, 0.35);
}

.sidebar-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.sidebar-link.is-active .sidebar-dot,
.sidebar-link:hover .sidebar-dot {
  background: var(--white);
}

.sidebar-chip {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.85);
  opacity: 1;
}

.sidebar-link.is-active .sidebar-chip {
  background: rgba(0, 0, 0, 0.2);
}

.sidebar-footer {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sidebar-user {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 0.35rem;
}

.sidebar-user strong {
  font-size: 0.92rem;
}

.sidebar-user span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.55;
}

.sidebar-logout {
  align-self: flex-start;
}

/* En móvil: Cerrar sesión siempre visible bajo el logo (el footer puede quedar fuera de pantalla) */
.sidebar-logout-top {
  display: none;
  width: 100%;
  margin-top: 0.75rem;
  justify-content: center;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-backdrop {
  display: none;
}

.app-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--white);
  color: var(--black);
}

/* ----- Topbar (contenido) ----- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.4rem;
  background: rgba(10, 10, 10, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.topbar-app {
  background: var(--white);
  color: var(--black);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 0 rgba(225, 6, 0, 0.1);
}

.topbar-app .nav-toggle {
  border-color: rgba(0, 0, 0, 0.2);
  color: var(--black);
}

.topbar-title {
  flex: 1;
  min-width: 0;
}

.topbar-title h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--red), var(--red-deep));
  color: var(--white);
  font-size: 1rem;
}

.brand-text {
  font-size: 1.2rem;
}

.userbox {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
}

.userbox-name {
  font-weight: 600;
  font-size: 0.92rem;
}

.userbox-role {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.55;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}

/* ----- Layout ----- */
.main {
  width: min(1400px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.75rem 0 3rem;
}

.main-app {
  flex: 1;
  width: min(1480px, calc(100% - 2rem));
  max-width: none;
}

.main-auth {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 4rem);
}

.site-footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
  padding: 1rem 1rem 2rem;
}

.site-footer-app {
  margin-left: 0;
  color: rgba(0, 0, 0, 0.45);
  background: var(--white);
}

/* ----- Auth card ----- */
.auth-shell {
  width: min(420px, 100%);
  animation: rise 0.55s ease both;
}

.auth-card {
  background: var(--paper);
  border-radius: calc(var(--radius) + 4px);
  padding: 2rem 1.75rem 1.75rem;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  margin: 0 0 0.35rem;
  color: var(--ink);
}

.auth-card .lead {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.auth-hero {
  text-align: center;
  margin-bottom: 1.25rem;
  color: var(--white);
}

.auth-logo {
  width: min(260px, 78vw);
  height: auto;
  display: block;
  margin: 0 auto 0.85rem;
  object-fit: contain;
  background: transparent;
  box-shadow: none;
}

.auth-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3rem);
  margin: 0.4rem 0 0.35rem;
  letter-spacing: 0.01em;
}

.auth-hero p {
  margin: 0;
  opacity: 0.7;
}

/* ----- Forms ----- */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--ink-soft);
}

.form-control {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  font: inherit;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.18);
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  color: var(--white);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ff1a12, var(--red));
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

/* ----- Alerts ----- */
.alert {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  animation: rise 0.35s ease both;
}

.alert-error {
  background: var(--red-soft);
  color: var(--red-deep);
  border: 1px solid #ffb3ad;
}

.alert-success {
  background: var(--white-soft);
  color: var(--black);
  border: 1px solid #cccccc;
}

.alert-info {
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--red);
}

/* ----- Dashboard ----- */
.page-head {
  color: var(--black);
  margin-bottom: 1.5rem;
  animation: rise 0.45s ease both;
}

.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 0.35rem;
}

.page-head p {
  margin: 0;
  opacity: 0.7;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat {
  background: var(--surface-muted);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: none;
  border: 1px solid var(--surface-border);
  animation: rise 0.5s ease both;
}

.stat:nth-child(2) { animation-delay: 0.05s; }
.stat:nth-child(3) { animation-delay: 0.1s; }
.stat:nth-child(4) { animation-delay: 0.15s; }

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  opacity: 0.75;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.85rem;
  margin-top: 0.25rem;
  color: var(--ink);
}

.panel {
  background: var(--surface-muted);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--surface-border);
  animation: rise 0.55s ease both;
  width: 100%;
}

.panel h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}

.panel p {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.module-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.module-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: var(--surface-muted);
  border: 1px solid var(--surface-border);
}

.module-list .status {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.status-done {
  background: var(--white);
  color: var(--black);
  border: 1px solid #cccccc;
}

.status-next {
  background: var(--red-soft);
  color: var(--red-deep);
}

.status-wait {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink-soft);
}

.hint {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: rgba(0, 0, 0, 0.55);
}

/* ----- Page actions / toolbar ----- */
.page-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
}

.page-actions .btn {
  min-height: 2.55rem;
  padding: 0.7rem 1.25rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.page-actions .btn-primary {
  width: auto;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  color: var(--white);
  border: none;
}

.page-actions .btn-primary:hover {
  background: linear-gradient(135deg, #ff1a12, var(--red));
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(225, 6, 0, 0.28);
}

.btn-outline-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  border: 2px solid var(--black);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn-outline-dark:hover {
  background: var(--black);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-light {
  background: var(--white);
  color: var(--black);
  border: 1px solid #dddddd;
}

.btn-light:hover {
  background: var(--white-soft);
  border-color: var(--red);
  color: var(--red-deep);
}

.btn-inline {
  width: auto;
}

.page-actions .btn-ghost {
  color: var(--black);
  border-color: rgba(0, 0, 0, 0.2);
}

.page-actions .btn-ghost:hover {
  border-color: var(--red);
  color: var(--red);
}

.btn-ghost.dark {
  color: var(--ink);
  border-color: var(--line);
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
}

/* ----- Tables ----- */
.table-wrap {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  padding: 0.15rem 0.35rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--white);
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.75rem 0.65rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  opacity: 0.8;
}

.data-table tr:hover td {
  background: rgba(225, 6, 0, 0.04);
}

.data-table .empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 1.5rem;
}

.actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  white-space: nowrap;
}

.actions a,
.linkish {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--red);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.actions a:hover,
.linkish:hover {
  text-decoration: underline;
  color: var(--red-deep);
}

.linkish.danger {
  color: var(--red-deep);
}

.inline-form {
  display: inline;
  margin: 0;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 2.05rem;
  height: 2.05rem;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--surface-border);
  background: var(--white);
  color: var(--black);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.action-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

.action-btn:hover {
  text-decoration: none;
  transform: none;
}

.action-edit {
  color: #1a1a1a;
  border-color: #cccccc;
}

.action-edit:hover {
  border-color: var(--black);
  background: var(--white-soft);
  color: var(--black);
}

.action-on {
  color: #1a1a1a;
  border-color: #cccccc;
}

.action-on:hover {
  background: var(--white-soft);
}

.action-off {
  color: #4a4a4a;
  border-color: #cccccc;
}

.action-off:hover {
  background: var(--white-soft);
}

.action-delete {
  color: var(--red);
  border-color: rgba(225, 6, 0, 0.35);
  background: #fff7f6;
}

.action-delete:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.action-btn.is-disabled,
.action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.action-delete.is-disabled:hover,
.action-btn:disabled:hover {
  background: #fff7f6;
  border-color: rgba(225, 6, 0, 0.35);
  color: var(--red);
}

.action-wrap {
  display: inline-flex;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--black);
  border: 1px solid var(--surface-border);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-sys {
  background: var(--red-soft);
  color: var(--red-deep);
}

.pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.pill-ok {
  background: var(--white);
  color: var(--black);
  border: 1px solid #cccccc;
}

.pill-off {
  background: var(--red-soft);
  color: var(--red-deep);
}

/* ----- Forms ----- */
.panel-form {
  max-width: none;
  width: 100%;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem 1rem;
}

.form-group-check {
  display: flex;
  align-items: end;
}

.check-label {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  cursor: pointer;
  font-size: 0.92rem;
}

.check-label input {
  margin-top: 0.2rem;
}

.form-actions {
  display: flex;
  gap: 0.65rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.help,
.muted {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  opacity: 0.85;
}

.error-list {
  margin: 0;
  padding-left: 1.1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 1.5rem 0 0.35rem;
}

.perm-section {
  margin-top: 1.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--surface-border);
}

.perm-section-head {
  margin-bottom: 1rem;
}

.perm-section-head .section-title {
  margin: 0 0 0.3rem;
}

.perm-section-head .muted {
  margin: 0;
}

.perm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 0.35rem;
}

.perm-card {
  margin: 0;
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 0;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  min-width: 0;
}

.perm-card legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: calc(100% - 0.5rem);
  margin: 0;
  padding: 0.85rem 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--black);
  background: linear-gradient(90deg, rgba(225, 6, 0, 0.08), transparent 70%);
  border-bottom: 1px solid var(--surface-border);
  float: none;
}

.perm-card-icon {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.15);
}

.perm-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem;
}

.perm-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0;
  padding: 0.65rem 0.7rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--surface-muted);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.perm-item:hover {
  background: #f3f0f0;
  border-color: rgba(0, 0, 0, 0.08);
}

.perm-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.perm-box {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.1rem;
  border-radius: 5px;
  border: 2px solid #bdbdbd;
  background: var(--white);
  flex-shrink: 0;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.perm-box::after {
  content: "";
  position: absolute;
  left: 0.28rem;
  top: 0.05rem;
  width: 0.28rem;
  height: 0.55rem;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s ease;
}

.perm-item input:checked + .perm-box {
  background: var(--red);
  border-color: var(--red);
}

.perm-item input:checked + .perm-box::after {
  transform: rotate(45deg) scale(1);
}

.perm-item:has(input:checked) {
  background: #fff5f4;
  border-color: rgba(225, 6, 0, 0.28);
  box-shadow: inset 0 0 0 1px rgba(225, 6, 0, 0.06);
}

.perm-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.perm-text strong {
  font-size: 0.92rem;
  color: var(--black);
  line-height: 1.25;
}

.perm-item small,
.perm-text small {
  display: block;
  color: var(--ink-soft);
  font-weight: 400;
  font-size: 0.78rem;
  line-height: 1.35;
}

.notice {
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--red);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
}

.notice a {
  color: var(--red);
  font-weight: 700;
  text-decoration: underline;
}

.toolbar-3 {
  grid-template-columns: 1.4fr 1fr 0.9fr auto;
}

.table-desc {
  margin-top: 0.25rem;
  max-width: 280px;
}

.product-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--surface-border);
  background: var(--white);
  display: block;
}

.product-thumb-empty {
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
  background: var(--surface-muted);
}

.product-form-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.product-photo-card {
  background: var(--white);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 1rem;
}

.product-photo-card h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.product-photo-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  min-height: 220px;
  border-radius: 12px;
  border: 1px dashed rgba(0, 0, 0, 0.18);
  background: #1a1a1a;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 0.85rem;
  color: #888;
  font-size: 0.85rem;
}

.product-photo-preview-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(22px) saturate(1.08);
  transform: scale(1.18);
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.product-photo-preview-photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.product-photo-preview > span {
  position: relative;
  z-index: 1;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.file-btn {
  width: 100%;
  cursor: pointer;
}

.product-fields .form-group textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

@media (max-width: 900px) {
  .product-form-layout,
  .toolbar-3 {
    grid-template-columns: 1fr;
  }
}

.modules-panel-head h2 {
  margin-bottom: 0.35rem;
}

.modules-panel-head p {
  margin-bottom: 0;
}

.module-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.15rem;
}

.module-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.15rem 1.15rem 1rem;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid var(--surface-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  min-height: 168px;
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.module-card:hover {
  transform: translateY(-3px);
  border-color: rgba(225, 6, 0, 0.35);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  background: var(--white);
}

.module-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.module-card-icon {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--red), var(--red-deep));
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 6px 14px rgba(225, 6, 0, 0.25);
}

.module-card.is-soon .module-card-icon {
  background: linear-gradient(145deg, #2a2a2a, #111);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.module-card-status {
  margin: 0;
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

.module-card-status.ready {
  color: var(--black);
  background: var(--surface-muted);
  border: 1px solid var(--surface-border);
}

.module-card-status.soon {
  color: var(--red-deep);
  background: #fff5f4;
  border: 1px solid rgba(225, 6, 0, 0.22);
}

.module-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--black);
  line-height: 1.2;
}

.module-card-desc {
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.45;
  flex: 1;
}

.module-card-cta {
  margin-top: 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.01em;
}

.module-card:hover .module-card-cta {
  text-decoration: underline;
}

.module-card.is-soon .module-card-cta {
  color: #666;
}

/* ----- Confirm modal ----- */
body.modal-open {
  overflow: hidden;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.confirm-modal[hidden] {
  display: none !important;
}

.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
}

.confirm-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: var(--white);
  border-radius: 18px;
  padding: 1.6rem 1.45rem 1.35rem;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
  text-align: center;
  animation: rise 0.25s ease both;
  border: 1px solid rgba(225, 6, 0, 0.12);
}

.confirm-modal-icon {
  width: 3.4rem;
  height: 3.4rem;
  margin: 0 auto 0.9rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff5f4;
  border: 1px solid rgba(225, 6, 0, 0.25);
  color: var(--red);
}

.confirm-modal-icon svg {
  width: 1.45rem;
  height: 1.45rem;
  fill: currentColor;
}

.confirm-modal-dialog h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--black);
}

.confirm-modal-dialog p {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
  line-height: 1.45;
  font-size: 0.95rem;
}

.confirm-modal-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  flex-wrap: wrap;
}

.confirm-modal-actions .btn {
  min-width: 120px;
}

.confirm-modal-actions .btn-primary {
  width: auto;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .perm-grid,
  .form-grid,
  .toolbar,
  .module-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .sidebar {
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.35);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(0, 0, 0, 0.5);
  }

  .sidebar-backdrop[hidden] {
    display: none;
  }

  .app-content {
    margin-left: 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .userbox-name,
  .userbox-role {
    display: none;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .sidebar-logout-top {
    display: inline-flex;
  }

  .sidebar-logout-bottom {
    display: none;
  }
}

@media (max-width: 720px) {
  .stats {
    grid-template-columns: 1fr;
  }

  .main-app {
    width: min(1480px, calc(100% - 1.25rem));
  }
}

/* =========================================================
   Tienda pública (landing / pedir)
   ========================================================= */

body.page-store {
  background: #0a0a0a;
  color: var(--white);
  min-height: 100vh;
}

body.page-store .form-control {
  background: #1a1a1a;
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--white);
}

body.page-store .form-control:focus {
  border-color: var(--red);
  outline: none;
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.25);
}

body.page-store label,
body.page-store legend {
  color: rgba(255, 255, 255, 0.85);
}

body.store-drawer-open {
  overflow: hidden;
}

.store-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: transparent;
  transition: background 0.35s ease, backdrop-filter 0.35s ease, padding 0.35s ease;
}

.store-nav.is-scrolled {
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(12px);
  padding: 0.55rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.store-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.store-nav-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  transition: width 0.3s ease, height 0.3s ease;
}

.store-nav.is-scrolled .store-nav-brand img {
  width: 34px;
  height: 34px;
}

.store-nav-links {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
  margin-right: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
}

.store-nav-links a:hover {
  color: var(--white);
}

.store-cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.store-cart-btn:hover {
  background: rgba(225, 6, 0, 0.25);
  border-color: var(--red);
  transform: scale(1.04);
}

.store-cart-btn.has-items {
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  border-color: var(--red);
  color: var(--white);
  box-shadow:
    0 0 0 3px rgba(225, 6, 0, 0.28),
    0 8px 22px rgba(225, 6, 0, 0.45);
  animation: store-cart-pulse 1.8s ease-in-out infinite;
}

.store-cart-btn.has-items:hover {
  background: linear-gradient(135deg, #ff1a12, var(--red));
  transform: scale(1.08);
  animation: none;
}

.store-cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--white);
  color: var(--red);
  border: 2px solid var(--red);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: store-pop 0.35s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.store-cart-btn.has-items .store-cart-count {
  background: var(--white);
  color: var(--red-deep);
  border-color: var(--white);
}

@keyframes store-cart-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 3px rgba(225, 6, 0, 0.28),
      0 8px 22px rgba(225, 6, 0, 0.4);
  }
  50% {
    box-shadow:
      0 0 0 6px rgba(225, 6, 0, 0.15),
      0 10px 28px rgba(225, 6, 0, 0.55);
  }
}

@keyframes store-pop {
  0% { transform: scale(0.5); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Hero */
.store-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.store-hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    url("../img/login-bg.png") center center / cover no-repeat;
  transform: scale(1.06);
  filter: brightness(0.55) saturate(1.05);
  animation: store-hero- ken 18s ease-in-out infinite alternate;
}

@keyframes store-hero-ken {
  from { transform: scale(1.06); }
  to { transform: scale(1.12); }
}

.store-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 45%, rgba(10, 10, 10, 0.92) 100%),
    radial-gradient(ellipse 55% 45% at 50% 40%, rgba(225, 6, 0, 0.18), transparent 70%);
  pointer-events: none;
}

.store-hero-content {
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  max-width: 640px;
  animation: store-fade-up 0.9s ease both;
}

@keyframes store-fade-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.store-hero-logo {
  width: min(220px, 52vw);
  height: auto;
  margin: 0 auto 1.25rem;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
}

.store-hero-content h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--white);
}

.store-hero-content p {
  margin: 0 auto 1.75rem;
  max-width: 28rem;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.store-hero-cta {
  min-width: 10rem;
  animation: store-fade-up 0.9s ease 0.2s both;
}

/* Menú (fondo claro) */
.store-menu {
  background: #ffffff;
  color: var(--black);
  padding: 3.5rem 0 4rem;
}

.store-menu-inner {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.store-section-head {
  margin-bottom: 1.75rem;
}

.store-section-head h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--black);
}

.store-section-head p {
  margin: 0;
  color: var(--ink-soft);
}

.store-empty {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--ink-soft);
  border: 1px dashed rgba(0, 0, 0, 0.15);
  border-radius: var(--radius);
  background: var(--white-soft);
}

.store-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.store-cat {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: var(--white);
  color: var(--ink-soft);
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.store-cat:hover {
  border-color: rgba(225, 6, 0, 0.55);
  color: var(--black);
}

.store-cat.is-active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.store-cat-block {
  margin-bottom: 2.5rem;
  animation: store-fade-up 0.55s ease both;
}

.store-cat-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--black);
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.15rem;
}

.store-product {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.store-product:hover {
  border-color: rgba(225, 6, 0, 0.4);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.store-product-media {
  position: relative;
  aspect-ratio: 4 / 5;
  min-height: 240px;
  background: #1a1a1a;
  overflow: hidden;
}

.store-product-media-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(22px) saturate(1.08);
  transform: scale(1.18);
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.store-product-media-photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.45s ease;
}

.store-product:hover .store-product-media-photo {
  transform: scale(1.03);
}

.store-product-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(225, 6, 0, 0.18), transparent 55%),
    var(--white-muted);
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: rgba(0, 0, 0, 0.28);
}

.store-product-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem 1.05rem 1.1rem;
  flex: 1;
  background: var(--black);
  color: var(--white);
}

.store-product-body h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--white);
}

.store-product-body p {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.4;
  flex: 1;
}

.store-product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.store-product-foot strong {
  font-size: 1.1rem;
  color: var(--white);
}

.store-add {
  flex-shrink: 0;
}

.store-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1.5rem max(1.25rem, calc((100% - 1100px) / 2));
  background: var(--black);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.88rem;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.store-footer a,
.store-credit-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  text-underline-offset: 3px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.store-footer a:hover,
.store-credit-link:hover {
  color: var(--white);
  text-decoration: underline;
}

/* Flash en tienda */
.store-flash {
  position: fixed;
  top: 4.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  width: min(420px, calc(100% - 2rem));
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: #2a1212;
  border: 1px solid rgba(225, 6, 0, 0.45);
  color: #ffd4d4;
  text-align: center;
  animation: store-fade-up 0.4s ease;
}

.store-flash.success {
  background: #122a18;
  border-color: rgba(40, 160, 80, 0.45);
  color: #d4ffe0;
}

/* Drawer */
.store-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.store-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 55;
  width: min(420px, 100%);
  height: 100%;
  height: 100dvh;
  background: #121212;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.4);
}

.store-drawer.is-open {
  transform: translateX(0);
}

.store-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.store-drawer-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.store-drawer-close {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.4rem;
}

.store-drawer-close:hover {
  color: var(--white);
}

.store-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.2rem 1.5rem;
}

.store-cart-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: rgba(255, 255, 255, 0.55);
}

.store-cart-empty .btn {
  margin-top: 1rem;
}

.store-cart-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.store-cart-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 0.5rem 0.65rem;
  align-items: center;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.store-cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.store-cart-item-info strong {
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-cart-item-info span {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
}

.store-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  padding: 0.15rem;
}

.store-qty button {
  appearance: none;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}

.store-qty button:hover {
  background: var(--red);
}

.store-qty span {
  min-width: 1.25rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.store-cart-line {
  font-size: 0.9rem;
}

.store-cart-remove {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 0.2rem;
}

.store-cart-remove:hover {
  color: var(--red);
}

.store-checkout h3 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.store-fieldset {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  margin: 0 0 1rem;
}

.store-fieldset legend {
  padding: 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.store-radio {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0;
  cursor: pointer;
  font-size: 0.92rem;
}

.store-radio input {
  accent-color: var(--red);
}

.store-domicilio-fields {
  margin-bottom: 0.25rem;
}

.store-totals {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 1rem 0 1.15rem;
  padding: 0.85rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.store-totals > div {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.7);
}

.store-total-final {
  font-size: 1.1rem !important;
  color: var(--white) !important;
  margin-top: 0.25rem;
}

.store-total-final strong {
  color: var(--red);
  font-size: 1.2rem;
}

.store-submit {
  width: 100%;
}

.store-form-error {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: rgba(225, 6, 0, 0.15);
  border: 1px solid rgba(225, 6, 0, 0.35);
  color: #ffc9c9;
  font-size: 0.88rem;
}

.store-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  z-index: 60;
  transform: translateX(-50%) translateY(12px);
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid rgba(225, 6, 0, 0.45);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.store-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Confirmación */
.page-confirm .store-confirm {
  min-height: calc(100vh - 8rem);
  display: grid;
  place-items: center;
  padding: 5.5rem 1.25rem 2rem;
}

.store-confirm-card {
  width: min(480px, 100%);
  padding: 2rem 1.5rem 1.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  text-align: center;
  animation: store-fade-up 0.6s ease both;
}

.store-confirm-check {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(40, 160, 80, 0.2);
  color: #5ddea0;
  animation: store-pop 0.5s ease;
}

.store-confirm-card h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
}

.store-confirm-code {
  margin: 0 0 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.store-confirm-code strong {
  color: var(--red);
  letter-spacing: 0.04em;
}

.store-confirm-card > p {
  margin: 0 0 1.25rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.45;
}

.store-confirm-meta {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1.25rem;
  text-align: left;
  padding: 0.85rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
}

.store-confirm-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
}

.store-confirm-meta dt {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
}

.store-confirm-meta dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.store-confirm-items {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  text-align: left;
}

.store-confirm-items li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.92rem;
}

.store-confirm-totals {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.store-confirm-totals > div {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.7);
}

.store-confirm-card .btn {
  width: 100%;
}

@media (max-width: 560px) {
  .store-nav-links {
    display: none;
  }

  .store-cart-item {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "info rm"
      "qty line";
  }

  .store-cart-item-info { grid-area: info; }
  .store-qty { grid-area: qty; }
  .store-cart-line { grid-area: line; justify-self: end; }
  .store-cart-remove { grid-area: rm; justify-self: end; }
}

/* =========================================================
   Módulo Caja
   ========================================================= */

.pill-digital {
  background: #e8f1ff;
  color: #1a4a9c;
}

.pill-caja {
  background: #fff0e8;
  color: #9c3a1a;
}

/* Cola activa — secciones mesas / domicilio */
.cola-split {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cola-section {
  padding: 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--surface-muted);
}

.cola-section.is-mesas {
  background: linear-gradient(180deg, #fff8f5 0%, #f7f7f7 100%);
  border-color: rgba(225, 6, 0, 0.14);
}

.cola-section.is-domicilio {
  background: linear-gradient(180deg, #f3fff6 0%, #f7f7f7 100%);
  border-color: rgba(30, 120, 70, 0.16);
}

.cola-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cola-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cola-section-title h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.cola-section-title p {
  margin: 0.1rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.cola-section-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.cola-section.is-mesas .cola-section-icon {
  background: rgba(225, 6, 0, 0.12);
  color: var(--red-deep);
}

.cola-section.is-domicilio .cola-section-icon {
  background: rgba(30, 120, 70, 0.14);
  color: #1a7a45;
}

.cola-section-count {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.65rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--ink);
}

.cola-section-empty {
  padding: 1.25rem 1rem;
  text-align: center;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  border: 1px dashed rgba(0, 0, 0, 0.12);
  font-size: 0.92rem;
}

/* Cola activa — tarjetas visuales */
.cola-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.cola-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.1rem 1rem 1rem;
  border-radius: 16px;
  background: var(--white);
  border: 2px solid rgba(0, 0, 0, 0.08);
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 220px;
}

.cola-card-main {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.cola-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.1);
  border-color: rgba(225, 6, 0, 0.35);
}

.cola-card-cobrar {
  width: 100%;
  text-align: center;
  justify-content: center;
}

.cola-card.is-salon {
  background:
    linear-gradient(180deg, #fff8f5 0%, #ffffff 42%);
  border-color: rgba(225, 6, 0, 0.18);
}

.cola-card.is-digital {
  background:
    linear-gradient(180deg, #f5f8ff 0%, #ffffff 42%);
  border-color: rgba(26, 74, 156, 0.18);
}

.cola-card.is-domicilio {
  background:
    linear-gradient(180deg, #f3fff6 0%, #ffffff 42%);
  border-color: rgba(30, 120, 70, 0.2);
}

.cola-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin: 0 auto;
}

.cola-card.is-salon .cola-card-icon {
  background: rgba(225, 6, 0, 0.1);
  color: var(--red-deep);
}

.cola-card.is-digital .cola-card-icon {
  background: rgba(26, 74, 156, 0.1);
  color: #1a4a9c;
}

.cola-card.is-domicilio .cola-card-icon {
  background: rgba(30, 120, 70, 0.12);
  color: #1a7a45;
}

.cola-card.is-recoger .cola-card-icon {
  background: rgba(120, 80, 20, 0.1);
  color: #8a5a12;
}

.cola-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  text-align: center;
}

.cola-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.cola-card-code {
  color: var(--ink);
  font-size: 0.88rem;
}

.cola-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0.15rem;
}

.cola-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
  min-height: 2.2rem;
}

.cola-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.55rem;
}

.cola-card-total {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--red);
}

.cola-card-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
}

.cola-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--ink-soft);
}

.cola-empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-muted);
  color: rgba(0, 0, 0, 0.35);
}

.caja-turno-panel h2 {
  margin-top: 0;
}

.caja-turno-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.caja-turno-resumen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.caja-turno-resumen > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 150px;
  padding: 0.85rem 1.1rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff8f5 0%, #ffffff 100%);
  border: 2px solid rgba(225, 6, 0, 0.2);
  box-shadow: 0 6px 16px rgba(225, 6, 0, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.caja-turno-resumen strong {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--red);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  text-transform: none;
}

.caja-turno-resumen > div:last-child {
  background: linear-gradient(180deg, #f3fff6 0%, #ffffff 100%);
  border-color: rgba(30, 120, 70, 0.22);
  box-shadow: 0 6px 16px rgba(30, 120, 70, 0.08);
}

.caja-turno-resumen > div:last-child strong {
  color: #1a7a45;
}

.caja-metodos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin: 0.35rem 0 1rem;
}

.caja-metodo-chip {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  background: var(--white);
  border: 2px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.caja-metodo-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

.caja-metodo-chip span {
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.caja-metodo-chip strong {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.caja-metodo-chip em {
  font-style: normal;
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.caja-metodo-chip.is-efectivo {
  background: linear-gradient(180deg, #f3fff6 0%, #ffffff 55%);
  border-color: rgba(30, 120, 70, 0.28);
}

.caja-metodo-chip.is-efectivo strong {
  color: #1a7a45;
}

.caja-metodo-chip.is-tarjeta {
  background: linear-gradient(180deg, #f5f8ff 0%, #ffffff 55%);
  border-color: rgba(26, 74, 156, 0.28);
}

.caja-metodo-chip.is-tarjeta strong {
  color: #1a4a9c;
}

.caja-metodo-chip.is-transferencia {
  background: linear-gradient(180deg, #fff8f5 0%, #ffffff 55%);
  border-color: rgba(225, 6, 0, 0.25);
}

.caja-metodo-chip.is-transferencia strong {
  color: var(--red-deep);
}

.caja-metodo-chip.is-otro {
  background: linear-gradient(180deg, #fffaf0 0%, #ffffff 55%);
  border-color: rgba(140, 100, 20, 0.25);
}

.caja-metodo-chip.is-otro strong {
  color: #8a5a12;
}

.caja-cierre-form {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.caja-cierre-detalle {
  margin-bottom: 1rem;
}

.caja-cierre-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin: 0.25rem 0 1rem;
}

.caja-cierre-kpis > div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: var(--surface-muted);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.caja-cierre-kpis strong {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  text-transform: none;
  font-variant-numeric: tabular-nums;
}

.caja-cierre-kpis > div.is-ok strong {
  color: #1a7a45;
}

.caja-cierre-kpis > div.is-plus strong {
  color: #1a4a9c;
}

.caja-cierre-kpis > div.is-minus strong {
  color: var(--red-deep);
}

.caja-cierre-notas {
  margin: 0.25rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--surface-muted);
  color: var(--ink);
  line-height: 1.45;
  white-space: pre-wrap;
}

.caja-diff {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.caja-diff.diff-ok {
  color: #1a7a45;
}

.caja-diff.diff-plus {
  color: #1a4a9c;
}

.caja-diff.diff-minus {
  color: var(--red-deep);
}

/* Cobro / facturar (inspirado en Adminix, estilo Milan) */
.cobro-panel {
  max-width: 640px;
}

.cobro-resumen {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  border-radius: 14px;
  background: var(--surface-muted);
}

.cobro-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 0.2rem;
  font-weight: 600;
}

.cobro-total-box {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff5f3 0%, #ffe8e4 100%);
  border: 2px solid rgba(225, 6, 0, 0.28);
  text-align: right;
  min-width: 160px;
}

.cobro-total-box .cobro-label {
  color: var(--red-deep);
  font-size: 0.78rem;
  margin-bottom: 0.3rem;
}

.cobro-total-box strong {
  display: block;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--red);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.cobro-section-title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.cobro-hint {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
}

.cobro-medios {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.cobro-medio {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0.65rem;
  align-items: center;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.cobro-medio:hover {
  border-color: rgba(225, 6, 0, 0.35);
}

.cobro-medio.is-on {
  border-color: rgba(225, 6, 0, 0.45);
  background: #fff8f5;
  box-shadow: 0 0 0 1px rgba(225, 6, 0, 0.12);
}

.cobro-medio-check {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  margin: 0;
}

.cobro-medio-check input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--red);
  cursor: pointer;
  flex-shrink: 0;
}

.cobro-medio-check em {
  font-style: normal;
  font-weight: 600;
}

.cobro-monto {
  cursor: text;
  pointer-events: auto;
}

.cobro-suma-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1rem 0 0.5rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: var(--surface-muted);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: 700;
  font-size: 1.05rem;
}

.cobro-suma-row strong {
  font-size: 1.45rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.cobro-diff {
  margin: 0 0 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
}

.cobro-diff.is-error {
  color: var(--red-deep);
  background: #fff0ee;
  border: 2px solid rgba(225, 6, 0, 0.28);
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.cobro-efectivo {
  margin-top: 1.1rem;
  padding: 1rem;
  border-radius: 14px;
  background: #fff8f5;
  border: 1px solid rgba(225, 6, 0, 0.12);
}

.cobro-billetes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.cobro-billete {
  appearance: none;
  border: 2px solid rgba(0, 0, 0, 0.1);
  background: var(--white);
  border-radius: 12px;
  padding: 0.35rem;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
  line-height: 0;
}

.cobro-billete:hover:not(:disabled) {
  border-color: var(--red);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.cobro-billete.is-selected {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(225, 6, 0, 0.35), 0 8px 16px rgba(225, 6, 0, 0.18);
  transform: translateY(-1px);
}

.cobro-billete-img img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  pointer-events: none;
  user-select: none;
}

.cobro-billete-exacto {
  display: grid;
  place-items: center;
  min-height: 64px;
  line-height: normal;
  border-style: dashed;
  background: #fff8f5;
}

.cobro-billete-exacto.is-selected {
  background: var(--red);
  border-style: solid;
  color: #fff;
}

.cobro-billete-exacto-label {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Modal alerta cobro (billete insuficiente) */
.cobro-alert {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.cobro-alert[hidden] {
  display: none !important;
}

.cobro-alert-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 10, 8, 0.58);
  backdrop-filter: blur(4px);
}

.cobro-alert-dialog {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 1.5rem 1.35rem 1.25rem;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #fff8f5 0%, #ffffff 38%);
  border: 1px solid rgba(225, 6, 0, 0.18);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.22);
  text-align: center;
  animation: cobroAlertIn 0.22s ease;
}

@keyframes cobroAlertIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cobro-alert-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(225, 6, 0, 0.12);
  color: var(--red);
}

.cobro-alert-dialog h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink);
}

.cobro-alert-lead {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.4;
}

.cobro-alert-details {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.85rem;
  border-radius: 12px;
  background: var(--surface-muted);
  text-align: left;
}

.cobro-alert-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
}

.cobro-alert-row span {
  color: var(--ink-soft);
}

.cobro-alert-row strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.cobro-alert-row.is-highlight {
  margin-top: 0.25rem;
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(225, 6, 0, 0.25);
}

.cobro-alert-row.is-highlight span,
.cobro-alert-row.is-highlight strong {
  color: var(--red-deep);
  font-size: 1.1rem;
  font-weight: 800;
}

.cobro-alert-hint {
  margin: 0 0 1.15rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

.cobro-alert-actions {
  display: flex;
  justify-content: center;
}

.cobro-alert-actions .btn {
  min-width: 160px;
}

@media (max-width: 640px) {
  .cobro-billetes {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cobro-vuelto {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: #eefaf1;
  border: 1px solid rgba(30, 120, 70, 0.2);
  font-weight: 700;
}

.cobro-vuelto strong,
.cobro-vuelto strong.has-vuelto {
  font-size: 1.45rem;
  color: #1a7a45;
  font-variant-numeric: tabular-nums;
}

.cobro-submit {
  width: 100%;
  margin-top: 1.25rem;
}

@media (max-width: 640px) {
  .cobro-resumen {
    grid-template-columns: 1fr;
  }

  .cobro-medio {
    grid-template-columns: 1fr;
  }

  .cobro-billetes {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pedido-detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 1rem;
  align-items: start;
}

.pedido-detail-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pedido-status-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 1.15rem 1.35rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 2px solid transparent;
}

.pedido-status-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.75;
  width: 100%;
}

.pedido-status-value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
  margin-right: auto;
}

.pedido-status-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.pedido-status-tipo {
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.85;
}

.pedido-status-banner.st-pendiente {
  background: #fff4e5;
  border-color: #f0b45a;
  color: #8a4b00;
}

.pedido-status-banner.st-confirmado {
  background: #e8f1ff;
  border-color: #6a9adf;
  color: #1a4a9c;
}

.pedido-status-banner.st-prep {
  background: #fff0e8;
  border-color: #e89a6a;
  color: #9c3a1a;
}

.pedido-status-banner.st-listo {
  background: #e8fff3;
  border-color: #5dcea0;
  color: #0d6b45;
}

.pedido-status-banner.st-camino {
  background: #eef6ff;
  border-color: #7eb0e8;
  color: #165a9c;
}

.pedido-status-banner.st-entregado {
  background: #e9f8ee;
  border-color: #6dcb8c;
  color: #1a6b38;
}

.pedido-status-banner.st-cancelado {
  background: #fdecec;
  border-color: #e08a8a;
  color: #8a1f1f;
}

.pedido-client-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.pedido-info-tile {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem 0.95rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.pedido-info-wide {
  grid-column: 1 / -1;
}

.pedido-info-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}

.pedido-info-tile strong {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
}

.whatsapp-link {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}

.whatsapp-link:hover {
  color: var(--red-deep, #b10500);
}

.pedido-info-tile a {
  color: var(--red-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pedido-meta {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.pedido-meta > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.pedido-meta dt {
  margin: 0;
  color: var(--ink-soft);
}

.pedido-meta dd {
  margin: 0;
}

.pedido-totales {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pedido-totales > div {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.pedido-total-final {
  font-size: 1.1rem !important;
  margin-top: 0.25rem;
}

.pedido-total-final strong {
  color: var(--red);
}

.pedido-pagos-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.pedido-pago-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.1rem 1.15rem;
  border-radius: 14px;
  border: 2px solid rgba(225, 6, 0, 0.2);
  background:
    linear-gradient(180deg, #fff7f5 0%, #ffffff 55%);
}

.pedido-pago-card.is-paid {
  border-color: rgba(30, 120, 70, 0.28);
  background:
    linear-gradient(180deg, #f3fff7 0%, #ffffff 55%);
}

.pedido-pago-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 0.2rem;
}

.pedido-pago-monto strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.15rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--red);
}

.pedido-pago-card.is-paid .pedido-pago-monto strong {
  color: #1a6b38;
}

.pedido-pago-metodo em {
  display: block;
  font-style: normal;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
}

.pedido-pago-estado {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
}

.pedido-acciones-caja {
  margin-top: 1.15rem;
}

.pedido-acciones-caja .btn {
  width: 100%;
}

.pos-layout {
  display: grid;
  gap: 1rem;
}

.pos-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.65rem;
}

.pos-product {
  appearance: none;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  padding: 0.85rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  font: inherit;
}

.pos-product:hover {
  border-color: var(--red);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.pos-product span {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.pos-product em {
  font-style: normal;
  font-weight: 700;
  color: var(--red);
  margin-top: 0.25rem;
}

.pos-cart-panel {
  position: sticky;
  top: 0.75rem;
  z-index: 20;
  border: 2px solid rgba(225, 6, 0, 0.18);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  background: linear-gradient(180deg, #fff8f5 0%, #ffffff 55%);
}

.pos-cart-panel h2 {
  margin-bottom: 1rem;
}

.pos-cart-panel .pos-cart-list {
  max-height: min(42vh, 320px);
  overflow-y: auto;
  padding-right: 0.15rem;
}

.pos-cart-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pos-cart-list[hidden] {
  display: none !important;
}

.pos-cart-empty {
  margin: 0 0 1rem;
  padding: 1.25rem 1rem;
  text-align: center;
  color: var(--ink-soft);
  background: var(--surface-muted);
  border-radius: 12px;
  border: 1px dashed rgba(0, 0, 0, 0.12);
}

.pos-cart-empty[hidden] {
  display: none !important;
}

.pos-cart-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 0.75rem 0.85rem;
  align-items: center;
  padding: 0.95rem 1rem;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.pos-cart-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.pos-cart-info strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.pos-cart-info span {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.pos-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem;
  background: #f3f3f3;
  border-radius: 12px;
}

.pos-qty button {
  appearance: none;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.pos-qty button[data-act="inc"] {
  background: var(--red);
  color: var(--white);
}

.pos-qty button[data-act="inc"]:hover {
  background: var(--red-deep);
  transform: scale(1.05);
}

.pos-qty button[data-act="dec"]:hover {
  background: #ffe8e6;
  color: var(--red-deep);
  transform: scale(1.05);
}

.pos-qty-val {
  min-width: 1.75rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.pos-cart-line {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--red);
  white-space: nowrap;
}

.pos-rm {
  appearance: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(225, 6, 0, 0.25);
  border-radius: 10px;
  background: #fff5f4;
  color: var(--red);
  cursor: pointer;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  transition: background 0.15s ease, transform 0.15s ease;
}

.pos-rm:hover {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
  transform: scale(1.05);
}

.pos-cart-panel .pedido-totales {
  margin-top: 0.25rem;
  margin-bottom: 1rem;
  padding: 0.9rem 0.25rem 0;
}

@media (max-width: 640px) {
  .pos-cart-item {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "info rm"
      "qty line";
  }

  .pos-cart-info { grid-area: info; }
  .pos-qty { grid-area: qty; justify-self: start; }
  .pos-cart-line { grid-area: line; justify-self: end; }
  .pos-rm { grid-area: rm; justify-self: end; }
}

.actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.panel.is-editing {
  border: 2px solid rgba(225, 6, 0, 0.28);
  box-shadow: 0 8px 22px rgba(225, 6, 0, 0.08);
  background: linear-gradient(180deg, #fff8f5 0%, #ffffff 55%);
}

#mesaForm,
#categoriaForm {
  scroll-margin-top: 1rem;
}

.mesa-orden-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.mesa-orden-move,
.mesa-orden-set {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
}

.mesa-orden-input {
  width: 4rem;
  min-width: 4rem;
  padding: 0.35rem 0.45rem;
  text-align: center;
}

/* Salón mesero — plano visual */
.salon-legend {
  gap: 0.5rem;
}

.salon-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
}

.salon-chip.is-free {
  background: #e7f8ee;
  color: #1a6b38;
}

.salon-chip.is-busy {
  background: #fdecec;
  color: #8a1f1f;
}

.salon-floor {
  background:
    radial-gradient(circle at 12% 8%, rgba(225, 6, 0, 0.05), transparent 40%),
    radial-gradient(circle at 88% 12%, rgba(26, 107, 56, 0.06), transparent 38%),
    linear-gradient(180deg, #f7f7f7 0%, #ffffff 100%);
  overflow: hidden;
}

.salon-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1.1rem;
  width: 100%;
  align-items: stretch;
}

.salon-mesa {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.2rem 1rem 1.15rem;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.92);
  text-align: center;
  text-decoration: none;
  color: inherit;
  min-height: 210px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  position: relative;
}

.salon-mesa-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
}

.salon-mesa-icon {
  position: relative;
  width: 92px;
  height: 92px;
  flex-shrink: 0;
}

.salon-mesa-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 22px;
  filter: drop-shadow(0 8px 14px rgba(255, 107, 74, 0.28));
}

.salon-mesa-num {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #1F2A44;
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.salon-mesa.is-bloqueada .salon-mesa-icon {
  filter: grayscale(0.85);
  opacity: 0.75;
}

.salon-mesa.is-ocupada .salon-mesa-icon svg {
  filter: drop-shadow(0 8px 14px rgba(225, 6, 0, 0.25));
}

.salon-mesa-badge {
  display: inline-flex;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.salon-mesa-nombre {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.salon-mesa-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.35;
}

.salon-mesa-hint {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
}

.salon-mesa-btn {
  margin-top: auto;
}

a.salon-mesa.is-libre {
  background: linear-gradient(165deg, #f2fff6 0%, #ffffff 48%);
  border-color: rgba(30, 120, 70, 0.22);
  color: #1a6b38;
  cursor: pointer;
}

a.salon-mesa.is-libre .salon-mesa-badge {
  background: #e7f8ee;
  color: #1a6b38;
}

a.salon-mesa.is-libre .salon-mesa-hint {
  color: #1a6b38;
}

a.salon-mesa.is-libre:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 16px 34px rgba(26, 107, 56, 0.16);
  border-color: rgba(30, 120, 70, 0.45);
}

.salon-mesa.is-ocupada {
  background: linear-gradient(165deg, #fff5f2 0%, #ffffff 48%);
  border-color: rgba(225, 6, 0, 0.22);
  color: var(--red-deep);
}

.salon-mesa.is-ocupada .salon-mesa-badge {
  background: #fdecec;
  color: #8a1f1f;
}

.salon-mesa.is-ocupada .salon-mesa-hint {
  color: var(--red-deep);
}

.salon-mesa.is-bloqueada {
  background: #f0f0f0;
  border-color: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.4);
  opacity: 0.85;
}

.salon-mesa.is-bloqueada .salon-mesa-badge {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.5);
}

.salon-mesa.is-bloqueada .salon-mesa-num {
  color: rgba(0, 0, 0, 0.45);
}

@media (min-width: 1100px) {
  .salon-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 900px) {
  .salon-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.85rem;
  }

  .salon-mesa {
    min-height: 190px;
    padding: 1rem 0.75rem;
  }

  .salon-mesa-icon {
    width: 78px;
    height: 78px;
  }
}

@media (max-width: 520px) {
  .salon-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Catálogo admin / POS por categoría (estilo tienda) */
.admin-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.35rem;
}

.admin-cat {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: var(--white);
  color: var(--ink-soft);
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.admin-cat:hover {
  border-color: rgba(225, 6, 0, 0.45);
  color: var(--ink);
}

.admin-cat.is-active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

/* Filtros POS: iconos animados + nombre de categoría */
.pos-cats {
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.pos-cats .pos-cat-ico {
  min-width: 88px;
  max-width: 120px;
  height: auto;
  min-height: 86px;
  padding: 0.6rem 0.45rem 0.55rem;
  border-radius: 16px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  flex-shrink: 0;
  background: #ffe4cc;
  border: 2px solid #ffd4b0;
  color: #111;
  box-shadow: 0 6px 16px rgba(225, 100, 0, 0.12);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.pos-cats .pos-cat-ico:hover {
  transform: translateY(-3px) scale(1.04);
  background: #ffd9b8;
  border-color: #ffb87a;
  color: #000;
  box-shadow: 0 10px 22px rgba(225, 100, 0, 0.2);
}

.pos-cats .pos-cat-ico.is-active {
  background: #ffcfa3;
  border-color: var(--red);
  color: #000;
  box-shadow: 0 10px 24px rgba(225, 6, 0, 0.22);
  transform: translateY(-2px);
  outline: 2px solid rgba(225, 6, 0, 0.35);
  outline-offset: 2px;
}

.pos-cats .pos-cat-name {
  display: block;
  max-width: 100%;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 0.15rem;
}

.pos-cats .cat-ico {
  display: grid;
  place-items: center;
  line-height: 0;
  color: inherit;
}

.pos-cats .cat-ico svg {
  display: block;
  overflow: visible;
  width: 36px;
  height: 36px;
}

.pos-cats .pos-cat-ico .ico-a,
.pos-cats .pos-cat-ico .ico-b,
.pos-cats .pos-cat-ico .ico-c,
.pos-cats .pos-cat-ico .ico-d {
  transform-origin: center;
  transform-box: fill-box;
}

.pos-cats .pos-cat-ico:hover .cat-ico,
.pos-cats .pos-cat-ico.is-active .cat-ico {
  animation: catIcoBob 1.1s ease-in-out infinite;
}

.pos-cats .pos-cat-ico.is-active .ico-b {
  animation: catIcoPulse 1.2s ease-in-out infinite;
}

.pos-cats .pos-cat-ico.is-active .ico-c,
.pos-cats .pos-cat-ico.is-active .ico-d {
  animation: catIcoPop 1.4s ease-in-out infinite;
}

.pos-cats .pos-cat-ico.is-active .cat-ico-bebidas .ico-c,
.pos-cats .pos-cat-ico.is-active .cat-ico-bebidas .ico-d {
  animation: catBubble 1.6s ease-in-out infinite;
}

@keyframes catIcoBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes catIcoPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.08); }
}

@keyframes catIcoPop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@keyframes catBubble {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(-3px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .pos-cats .pos-cat-ico:hover .cat-ico,
  .pos-cats .pos-cat-ico.is-active .cat-ico,
  .pos-cats .pos-cat-ico.is-active .ico-b,
  .pos-cats .pos-cat-ico.is-active .ico-c,
  .pos-cats .pos-cat-ico.is-active .ico-d {
    animation: none;
  }
}

@media (max-width: 640px) {
  .pos-cats .pos-cat-ico {
    min-width: 76px;
    max-width: 100px;
    min-height: 72px;
    border-radius: 14px;
  }

  .pos-cats .cat-ico svg {
    width: 30px;
    height: 30px;
  }

  .pos-cats .pos-cat-name {
    font-size: 0.62rem;
  }
}

.admin-cat-block {
  margin-bottom: 1.75rem;
}

.admin-cat-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.admin-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.admin-product-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--white);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.09);
}

.admin-product-card.is-off {
  opacity: 0.72;
}

.admin-product-media {
  position: relative;
  aspect-ratio: 4 / 5;
  min-height: 200px;
  background: #1a1a1a;
  overflow: hidden;
}

.admin-product-media-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(22px) saturate(1.08);
  transform: scale(1.18);
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.admin-product-media-photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.admin-product-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: rgba(0, 0, 0, 0.25);
  background:
    radial-gradient(circle at 30% 30%, rgba(225, 6, 0, 0.16), transparent 55%),
    var(--white-muted);
}

.admin-product-code {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 2;
  background: rgba(10, 10, 10, 0.78);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

.admin-product-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.95rem 1rem 1rem;
  background: var(--black);
  color: var(--white);
  flex: 1;
}

.admin-product-body h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
}

.admin-product-body p {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.35;
  flex: 1;
}

.admin-product-price {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.admin-product-price strong {
  font-size: 1.15rem;
  color: #fff;
}

.admin-product-price small {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.admin-product-status {
  margin-top: 0.15rem;
}

.admin-product-actions {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.admin-product-actions .action-btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.admin-product-actions .action-btn svg {
  fill: #fff;
}

.admin-product-actions .action-btn:hover {
  background: var(--red);
  border-color: var(--red);
}

.pos-product-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.35rem;
  background: #eee;
}

.pos-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pos-cat-block {
  margin-bottom: 1.25rem;
}

.pos-cat-block .admin-cat-title {
  font-size: 1.1rem;
}

@media (max-width: 900px) {
  .pedido-detail-grid {
    grid-template-columns: 1fr;
  }

  .pedido-meta > div {
    grid-template-columns: 1fr;
  }

  .pedido-client-grid {
    grid-template-columns: 1fr;
  }

  .pedido-status-label {
    width: auto;
  }

  .pedido-status-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ========== Módulo Domicilios ========== */
.dom-filters {
  grid-template-columns: 1.6fr 160px 160px auto;
  align-items: center;
}

.dom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.dom-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.15rem 1.1rem;
  border-radius: 16px;
  background: var(--white);
  border: 2px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.dom-card.is-asignado {
  background: linear-gradient(180deg, #fff8f5 0%, #ffffff 40%);
  border-color: rgba(225, 6, 0, 0.16);
}

.dom-card.is-en_camino {
  background: linear-gradient(180deg, #f3fff6 0%, #ffffff 40%);
  border-color: rgba(30, 120, 70, 0.2);
}

.dom-card.is-entregado {
  background: linear-gradient(180deg, #f5f8ff 0%, #ffffff 40%);
  border-color: rgba(26, 74, 156, 0.16);
}

.dom-card.is-fallido {
  background: linear-gradient(180deg, #fff5f5 0%, #ffffff 40%);
  border-color: rgba(140, 20, 20, 0.2);
}

.dom-card.is-sin-asignar {
  border-style: dashed;
}

.dom-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.dom-card-code {
  color: var(--ink);
  font-size: 1rem;
}

.dom-card-estado {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.dom-card-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dom-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  font-weight: 600;
}

.dom-card-block strong {
  font-size: 0.98rem;
  line-height: 1.3;
  color: var(--ink);
}

.dom-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.35rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.dom-inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
  align-items: center;
}

.form-control-sm,
.dom-inline-form .form-control {
  min-height: 36px;
  padding: 0.35rem 0.55rem;
  font-size: 0.88rem;
}

.pill-dom-asignado {
  background: #fff0e8;
  color: #9c3a1a;
}

.pill-dom-en_camino {
  background: #e6f7ec;
  color: #1a7a45;
}

.pill-dom-entregado {
  background: #e8f1ff;
  color: #1a4a9c;
}

.pill-dom-fallido {
  background: #ffe8e6;
  color: #8c1414;
}

.pedido-dom-panel {
  border-color: rgba(30, 120, 70, 0.18);
}

.pedido-dom-forms {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.pedido-dom-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

@media (max-width: 720px) {
  .dom-filters {
    grid-template-columns: 1fr;
  }

  .dom-inline-form,
  .pedido-dom-row {
    grid-template-columns: 1fr;
  }
}

/* Sabores: selector y visualización */
.sabor-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.sabor-modal[hidden] {
  display: none !important;
}

.sabor-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 10, 8, 0.55);
  backdrop-filter: blur(3px);
}

.sabor-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 1.35rem 1.25rem 1.15rem;
  border-radius: 18px;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.sabor-modal-dialog h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.sabor-modal-product {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.sabor-modal-options {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.95rem;
  max-height: min(60vh, 420px);
  overflow-y: auto;
}

.sabor-modal-group {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft, #5c534c);
}

.sabor-modal-group + .sabor-modal-group,
.sabor-option + .sabor-modal-group {
  margin-top: 0.45rem;
}

.sabor-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.sabor-option.has-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.sabor-option.has-price small {
  font-weight: 700;
  color: var(--red-deep, #b10500);
  white-space: nowrap;
}

.sabor-option:hover {
  border-color: rgba(225, 6, 0, 0.45);
  background: #fff8f5;
  transform: translateY(-1px);
}

body.sabor-modal-open {
  overflow: hidden;
}

.store-cart-sabor,
.pos-cart-sabor,
.store-confirm-sabor {
  display: block;
  font-style: normal;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--red-deep, #b10500);
}

.admin-product-sabores {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.35;
}

.t-sabor {
  font-size: 0.85em;
  opacity: 0.85;
}
