:root {
  --primary: #ff3d00;
  --accent: #ff9800;
  --bg: #fff8e1;
  --text: #212121;
  --muted: #757575;
  --card: #ffffff;
  --ok: #2e7d32;
  --warn: #d32f2f;
}
/* Temas visuales */
body.theme-classic { --primary:#1565c0; --accent:#ff6d00; --bg:#e3f2fd; --card:#ffffff; --text:#263238; }
body.theme-minimarket { --primary:#00838f; --accent:#ff6d00; --bg:#e0f7fa; --card:#ffffff; --text:#004d40; }
body.theme-botilleria_dark { --primary:#7c4dff; --accent:#00bcd4; --bg:#0f172a; --card:#111827; --text:#e5e7eb; --ok:#10b981; --warn:#ef4444; }
body.theme-cafe { --primary:#6d4c41; --accent:#ffb300; --bg:#fff3e0; --card:#ffffff; --text:#3e2723; }
body.theme-restaurant { --primary:#e53935; --accent:#fdd835; --bg:#fffde7; --card:#ffffff; --text:#263238; }
body.theme-heladeria { --primary:#f06292; --accent:#4dd0e1; --bg:#fce4ec; --card:#ffffff; --text:#424242; }
body.theme-foodtruck { --primary:#00c853; --accent:#ff6d00; --bg:#f1f8e9; --card:#ffffff; --text:#1b5e20; }
body.theme-pizzeria { --primary:#CE2B37; --accent:#009246; --bg:#fff8e1; --card:#ffffff; --text:#2b2b2b; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: 'Montserrat', system-ui, Arial; background: var(--bg); color: var(--text); }
body { position: relative; }
a { color: inherit; text-decoration: none; }
button, .btn, input, select { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

.app-header { display: flex; align-items: center; gap: 16px; padding: 12px 16px; background: var(--card); border-bottom: 4px solid var(--primary); position: sticky; top: 0; flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--primary); }
.menu-toggle { display: none; margin-left: auto; border: 2px solid #eee; background: #fff; border-radius: 8px; padding: 6px 10px; font-weight: 700; }
.app-nav { display: flex; gap: 12px; flex-wrap: wrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.app-nav a { padding: 8px 12px; border-radius: 8px; background: #ffe0b2; }
.app-nav a.accent { background: var(--accent); color: #fff; font-weight: 700; }
.user-box { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.user-box .logout { color: var(--warn); font-weight: 700; }

.app-content { padding: 16px; max-width: 1100px; margin: 0 auto; }
.app-footer { text-align: center; color: var(--muted); font-size: 14px; padding: 12px 0 20px; }
.card { background: var(--card); padding: 12px; border-radius: 10px; box-shadow: 0 2px 0 #eee; }
.row { display: flex; gap: 12px; align-items: center; }
.progress .step { padding: 8px 12px; border-radius: 999px; background: #eee; font-weight: 700; }
.progress .step.done { background: var(--ok); color: #fff; }
.progress .step.current { background: var(--accent); color: #fff; }
.grid.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid.two .card { height: fit-content; }
.muted { color: var(--muted); }
.alert { background: #fff3cd; color: #664d03; padding: 8px 12px; border-radius: 8px; margin: 8px 0; }

.tabs { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabs .btn { white-space: nowrap; }

label { display: block; margin: 8px 0; }
input, select, button { font-family: inherit; }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], select { width: 100%; padding: 8px; border: 2px solid #eee; border-radius: 8px; }

.btn { display: inline-block; padding: 8px 12px; border-radius: 8px; background: #eeeeee; }
.btn.primary { background: var(--primary); color: #fff; font-weight: 700; }
.btn.accent { background: var(--accent); color: #fff; font-weight: 700; }
.btn.big { padding: 12px 16px; font-size: 18px; }
.inline { display: inline-flex; gap: 8px; align-items: center; }

.table { width: 100%; border-collapse: collapse; background: var(--card); }
.table th, .table td { padding: 8px; border-bottom: 1px solid #eee; }
.table.compact th, .table.compact td { padding: 6px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.tile { background: var(--card); border-radius: 12px; padding: 16px; text-align: center; box-shadow: 0 2px 0 #eee; }
.tile .icon { font-size: 28px; }
.tile .label { font-weight: 700; margin-top: 8px; }
.tile.accent { background: var(--accent); color: #fff; }

.login { max-width: 420px; margin: 32px auto; }
.login h1 { margin: 0; }
.hint { margin-top: 8px; color: var(--muted); }

/* Fondo para login */
.bg-cover { position: fixed; inset: 0; z-index: 0; background: #000; pointer-events: none; }
.login-bg { background-image: url('/assets/login-bg.jpg'); background-size: cover; background-position: center; background-repeat: no-repeat; filter: saturate(1.05) contrast(1.02); }
/* Login según tema */
body.theme-classic .login-bg { background-image: url('/assets/login/classic.jpg'), url('/assets/login-bg.jpg'); }
body.theme-cafe .login-bg { background-image: url('/assets/login/cafe.jpg'), url('/assets/login-bg.jpg'); }
body.theme-restaurant .login-bg { background-image: url('/assets/login/restaurant.jpg'), url('/assets/login-bg.jpg'); }
body.theme-heladeria .login-bg { background-image: url('/assets/login/heladeria.jpg'), url('/assets/login-bg.jpg'); }
body.theme-foodtruck .login-bg { background-image: url('/assets/login/foodtruck.jpg'), url('/assets/login-bg.jpg'); }
body.theme-minimarket .login-bg { background-image: url('/assets/login/minimarket.jpg'), url('/assets/login-bg.jpg'); }
body.theme-botilleria_dark .login-bg { background-image: url('/assets/login/botilleria_dark.jpg'), url('/assets/login-bg.jpg'); }
body.theme-pizzeria .login-bg { background-image: url('/assets/login/pizzeria.jpg'), url('/assets/login-bg.jpg'); }
.bg-overlay { position: fixed; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.25) 60%, rgba(0,0,0,0.35) 100%); pointer-events: none; }

/* Centrado y estilo del formulario en login */
.login-centered { margin: 0 auto; min-height: calc(100vh - 160px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff; position: relative; z-index: 3; }
.login-centered h1 { color: #fff; }
.login-centered .muted { color: #e0e0e0; }
.login-card { background: #ffffff; border: 1px solid #e6e6e6; box-shadow: 0 12px 24px rgba(0,0,0,0.18); backdrop-filter: none; -webkit-backdrop-filter: none; color: #1f2937; position: relative; z-index: 4; }
.login-card input, .login-card select, .login-card button { color: #1f2937; }
.login-card input, .login-card select { border-color: #d1d5db; }
.login-card input, .login-card select { background: #fff; }
.login-card input::placeholder, .login-card select::placeholder { color: #999; }
.login-card input, .login-card select { border-color: #ddd; }
.login-card .btn.primary { background: var(--primary); }

/* Asegurar que el contenido quede por encima del overlay */
.app-header, .app-content, .app-footer { position: relative; z-index: 2; }

/* Fondos temáticos con iconos suaves */
@supports (background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>")) {
  body.theme-heladeria::before,
  body.theme-cafe::before,
  body.theme-foodtruck::before,
  body.theme-restaurant::before,
  body.theme-minimarket::before,
  body.theme-botilleria_dark::before {
    content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .06; z-index: 0;
  }
  body.theme-pizzeria::before {
    opacity: .10;
    background-image: url('/assets/theme-icons/pizzeria.png'), url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 80 80'><g fill='%23CE2B37'><path d='M10 18h60l-6 30H16z' fill='%23ffb300'/><circle cx='26' cy='36' r='4'/><circle cx='40' cy='42' r='4'/><circle cx='54' cy='34' r='4'/></g></svg>");
    background-repeat: repeat; background-size: 220px 220px;
  }
  body.theme-heladeria::before {
    opacity: .20;
    background-image: url('/assets/theme-icons/heladeria.png'), url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 80 80'><g fill='%234dd0e1'><circle cx='40' cy='26' r='14'/><path d='M30 44h20l-6 20h-8z'/></g></svg>");
    background-repeat: repeat; background-size: 240px 240px;
  }
  body.theme-cafe::before {
    opacity: .06;
    background-image: url('/assets/theme-icons/cafe.png'), url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 80 80'><g fill='%236d4c41'><path d='M18 48c0-9 7-16 16-16h12c9 0 16 7 16 16s-7 16-16 16H34c-9 0-16-7-16-16z'/><path d='M56 40h10c4 0 6 3 6 6s-2 6-6 6H56v-12z' fill='%236d4c41'/><rect x='22' y='60' width='36' height='4' rx='2' fill='%23a1887f'/></g></svg>");
    background-repeat: repeat; background-size: 180px 180px, 140px 140px;
  }
  body.theme-foodtruck::before {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 80 80'><g fill='%23ff6d00'><rect x='16' y='30' width='48' height='20' rx='4'/><circle cx='26' cy='56' r='6' fill='%2300c853'/><circle cx='54' cy='56' r='6' fill='%2300c853'/></g></svg>");
    background-repeat: repeat; background-size: 160px 160px;
  }
  body.theme-restaurant::before {
    background-image: url('/assets/theme-icons/restaurant.png'), url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 80 80'><g fill='%23fdd835'><circle cx='40' cy='40' r='16'/><rect x='18' y='20' width='4' height='24' fill='%23e53935'/><rect x='58' y='20' width='4' height='24' fill='%23e53935'/></g></svg>");
    background-repeat: repeat; background-size: 160px 160px;
  }
  body.theme-minimarket::before {
    opacity: .10;
    background-image: url('/assets/theme-icons/minimarket.png'), url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 80 80'><g fill='%2300838f'><rect x='18' y='30' width='44' height='26' rx='4'/><circle cx='26' cy='60' r='6' fill='%23ff6d00'/><circle cx='54' cy='60' r='6' fill='%23ff6d00'/></g></svg>");
    background-repeat: repeat; background-size: 220px 220px;
  }
  body.theme-botilleria_dark::before {
    opacity: .12;
    background-image: url('/assets/theme-icons/botilleria.png'), url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 80 80'><g fill='%237c4dff'><rect x='34' y='16' width='12' height='36' rx='3'/><circle cx='40' cy='60' r='8' fill='%2300bcd4'/></g></svg>");
    background-repeat: repeat; background-size: 220px 220px;
  }
}

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); grid-auto-rows: auto; gap: 12px; align-items: stretch; }
.product-btn { display: flex; flex-direction: column; gap: 6px; border-radius: 12px; }
.product-btn img.product-img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; margin-bottom: 6px; display: block; }
@media (min-width: 720px) {
  .product-btn img.product-img { aspect-ratio: 4 / 3; }
}
@media (min-width: 1024px) {
  .product-btn img.product-img { aspect-ratio: 4 / 3; }
}
/* Ajustes para móvil: tarjetas proporcionadas y textos legibles */
@media (max-width: 640px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-btn { padding: 10px; border-radius: 10px; min-height: auto; height: auto; }
  .product-btn img.product-img { height: 120px; aspect-ratio: auto; }
  .product-btn .name { font-size: 14px; line-height: 1.2; }
  .product-btn .price { font-size: 13px; }
  .product-btn .cat { display: none; }
  .product-btn .fav-toggle { top: 6px; right: 6px; font-size: 18px; padding: 6px; }
}
/* Refuerzo de columnas en móviles pequeños */
@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .product-btn { width: 100%; }
  .product-btn img.product-img { height: 100px; }
  .simple .product-btn .name { font-size: 14px; }
  .simple .product-btn .price { font-size: 12px; }
}
/* 3 columnas en móviles grandes / tablets pequeñas */
@media (min-width: 480px) and (max-width: 820px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-btn img.product-img { height: 140px; }
}
/* Tablets y pantallas medianas: 4 columnas y altura moderada */
@media (min-width: 821px) and (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .product-btn img.product-img { height: 160px; }
}
/* Prevención de textos que rompen layout */
.product-btn .name, .product-btn .price { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Sticky buscador en Nueva Venta */
.sale #productSearch { position: sticky; top: 56px; z-index: 50; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
@media (max-width: 640px) {
  .sale #productSearch { top: 52px; }
}

/* Usabilidad táctil: botones grandes en venta */
@media (max-width: 640px) {
  .sale .btn { padding: 12px 14px; font-size: 16px; }
  .sale .btn.primary { padding: 14px 16px; font-size: 17px; }
  .sale .table.compact tbody a.btn { min-width: 48px; min-height: 48px; line-height: 48px; text-align: center; border-radius: 10px; margin: 6px; font-size: 16px; }
  .cart-hidden #cartBox, .cart-hidden .order-panel, .cart-hidden .order-container, .cart-hidden .table.compact { display: none !important; }
  .cart-toggle { position: fixed; bottom: 16px; right: 16px; z-index: 60; background: #ff3d00; color: #fff; border-radius: 999px; padding: 12px 16px; box-shadow: 0 6px 18px rgba(0,0,0,.2); font-size: 16px; }
  .cart-toggle.hidden { display: none; }
  .charge-fab { position: fixed; bottom: 72px; right: 16px; z-index: 60; background: #2e7d32; color: #fff; border-radius: 999px; padding: 12px 16px; box-shadow: 0 6px 18px rgba(0,0,0,.2); font-size: 16px; }
}

/* Total fijo en la parte inferior en móvil */
@media (max-width: 640px) {
  .sale .total-box { position: fixed; bottom: 0; left: 0; right: 0; z-index: 51; background: #fff; border-top: 1px solid rgba(0,0,0,.1); padding: 8px 12px; }
}

/* Menú superior: hamburguesa/scroll en móvil */
@media (max-width: 640px) {
  .app-header .menu-toggle { display: inline-block; }
  .app-header .app-nav { display: none; }
  .menu-open .app-header .app-nav { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Ajustes mínimos para demo: compensar banner fijo sin alterar breakpoints */
.demo-host .app-header { margin-top: 28px; }
@media (max-width: 640px) { .demo-host .sale #productSearch { top: 64px; } }

/* Fuerza 2 columnas en smartphones (≤600px) */
@media (max-width: 600px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .product-btn { padding: 12px; min-height: 48px; }
}

/* Tamaño táctil para chips de categoría y tabs en venta */
@media (max-width: 640px) {
  .sale .tags .tag { padding: 10px 14px; font-size: 15px; min-height: 44px; line-height: 24px; border-radius: 999px; }
}
.product-btn { display: block; border-radius: 12px; padding: 10px; color: #fff; font-weight: 700; min-height: 80px; box-shadow: 0 2px 0 rgba(0,0,0,0.1); }
.product-btn { position: relative; }
.product-btn .fav-toggle { position: absolute; top: 8px; right: 8px; font-size: 22px; padding: 8px; border: none; border-radius: 999px; background: rgba(0,0,0,0.25); color: #fff; cursor: pointer; }
.product-btn .fav-toggle:hover { background: rgba(0,0,0,0.35); }
.simple .product-btn .fav-toggle { font-size: 26px; padding: 10px; }
.product-btn .name { display: block; font-size: 14px; }
.product-btn .price { display: block; font-size: 12px; opacity: 0.9; }
.product-btn .cat { display: block; font-size: 11px; opacity: 0.8; }
.simple .product-btn { min-height: 96px; padding: 14px; }
.simple .product-btn .name { font-size: 18px; }
.simple .product-btn .price { font-size: 16px; }
.simple .product-btn .cat { display: none; }
.simple .tag { font-size: 14px; padding: 8px 12px; }
.simple .table.compact th, .simple .table.compact td { padding: 10px; font-size: 16px; }

.tags { display: flex; gap: 8px; flex-wrap: wrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tag { background: #ffe0b2; padding: 6px 10px; border-radius: 999px; }
.tag.bright { color: #fff; font-weight: 700; }
.tag.top { background: #ff3d00; color: #fff; }
.demo-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; background: #ff3d00; color: #fff; height: 28px; overflow: hidden; display: flex; align-items: center; }
.demo-banner .demo-marquee { white-space: nowrap; display: inline-block; padding-left: 100%; animation: demoScroll 12s linear infinite; font-weight: 700; }
@keyframes demoScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
.tag.selected { background: var(--accent); color: #fff; }
.tag.ok { background: var(--ok); color: #fff; }
.tag.warn { background: var(--warn); color: #fff; }
/* Estado pendiente: mesa seleccionada sin items todavía */
.tag.pending { background: #757575; color: #fff; }
/* Mantener color por estado cuando está seleccionada y resaltar con borde interno */
.tag.ok.selected { background: var(--ok); box-shadow: inset 0 0 0 2px rgba(255,255,255,0.8); }
.tag.warn.selected { background: var(--warn); box-shadow: inset 0 0 0 2px rgba(255,255,255,0.8); }
.tag.pending.selected { background: #757575; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.8); }

.badge { padding: 4px 8px; border-radius: 8px; color: #fff; }
.badge.ok { background: var(--ok); }
.badge.warn { background: var(--warn); }

.total-box { margin-top: 8px; display: grid; gap: 8px; }
.item-name { font-weight: 700; }
/* Modal básico */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal { background: #fff; color: #222; border-radius: 8px; padding: 16px 24px; width: min(480px, 90vw); box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.modal h3 { margin: 0 0 8px; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.numpad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.numpad-grid .btn { font-size: 18px; padding: 12px; }
.tag .badge { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 10px; font-size: 12px; background: #eee; color: #333; }
/* Ajuste de badge sobre fondos para mejor contraste */
.tag.ok .badge, .tag.warn .badge, .tag.pending .badge { background: rgba(255,255,255,0.2); color: #fff; }

/* Tablas en pantallas pequeñas: permitir desplazamiento horizontal */
@media (max-width: 640px) {
  .app-content { padding: 10px; }
  .app-header { padding: 10px 12px; display:flex; flex-wrap:wrap; align-items:flex-start; }
  .menu-toggle { display: inline-flex; }
  .btn, input, select { font-size: 16px; }
  .tags { flex-wrap: nowrap; gap: 6px; }
  .tag { flex: 0 0 auto; }
  .app-header .brand { flex: 1 0 100%; margin-bottom: 6px; }
  .app-header .user-box { flex: 1 0 100%; justify-content: space-between; }
  /* Menú móvil animado */
  .app-nav { display: flex; width: 100%; flex-wrap: wrap; overflow: hidden;
    max-height: 0; opacity: 0; transform: translateY(-4px);
    transition: max-height 250ms ease, opacity 200ms ease, transform 200ms ease;
    pointer-events: none; will-change: max-height, opacity, transform;
  }
  .app-nav.open { opacity: 1; transform: translateY(0); pointer-events: auto;
    max-height: var(--nav-open-height, 300px);
  }
  .app-nav a { padding: 10px 12px; }
  .grid.two { grid-template-columns: 1fr; }
  .table { display: block; width: 100%; overflow-x: auto; }
  .product-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
  .product-btn { min-height: 72px; padding: 12px; }
  .product-btn .name { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .product-btn .price { font-size: 14px; }
  .product-btn .cat { display: none; }
  /* Barra de acciones fija al fondo en venta (móvil) */
  .sale .total-box .actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1001; background: var(--card); padding: 10px; border-top: 2px solid #eee; box-shadow: 0 -2px 6px rgba(0,0,0,0.06); }
  /* Espacio inferior para evitar solapamiento con barra fija */
  .sale { padding-bottom: 140px; }
  #cartBox { padding-bottom: 140px; }
  .cart-table { margin-bottom: 140px; }
  .sale .total-box .actions .btn { flex: 1 1 auto; }
  .sale .total-box .actions select { min-width: 140px; }
  .actions-fixed .app-footer { display: none; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  .app-nav { transition: none; }
}

/* Mejoras para pantallas medianas */
@media (min-width: 641px) and (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

/* Pantallas grandes */
@media (min-width: 1025px) {
  .product-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

/* Dispositivos táctiles (puntero grueso): aumentar áreas de toque */
@media (pointer: coarse) {
  .btn { padding: 12px 16px; }
  .app-nav a { padding: 12px 14px; }
  .tag { padding: 8px 12px; }
  .btn.big { padding: 14px 18px; }
}
.fullscreen .app-header, .fullscreen .app-footer { display: none; }
.fullscreen .app-content { padding: 0; max-width: none; }
.fullscreen .sale { min-height: 100vh; }
.simple .card input[type="text"] { font-size: 18px; padding: 10px; }
.simple #productSearch { width: 100%; }
.kiosk .app-nav a:not([href*="page=sale"]):not([href*="page=dashboard"]) { display: none; }
.kiosk .menu-toggle { display: none; }
/* Aviso flotante de agregado al carrito */
.toast { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); background: var(--primary); color: #fff; padding: 10px 14px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); z-index: 1000; display: none; font-weight: 700; }
  body.theme-classic::before {
    opacity: .10;
    background-image: url('/assets/theme-icons/minimarket.png'), url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 80 80'><g fill='%231565c0'><rect x='18' y='30' width='44' height='26' rx='4'/><circle cx='26' cy='60' r='6' fill='%23ff6d00'/><circle cx='54' cy='60' r='6' fill='%23ff6d00'/></g></svg>");
    background-repeat: repeat; background-size: 220px 220px;
  }
/* Mejorar contraste en tema oscuro */
body.theme-botilleria_dark .app-header, body.theme-botilleria_dark .app-footer, body.theme-botilleria_dark .app-content { color: var(--text); }
body.theme-botilleria_dark .app-nav a { color: var(--text) !important; background: transparent; border-color: rgba(255,255,255,0.15); }
body.theme-botilleria_dark .card { background: var(--card); color: var(--text); border-color: rgba(255,255,255,0.1); }
body.theme-botilleria_dark .btn { background: #374151; color: #fff; border-color: #4b5563; }
body.theme-botilleria_dark .btn:hover { background: #4b5563; }
body.theme-botilleria_dark .btn.primary { background: var(--primary); color: #fff; }
body.theme-botilleria_dark .btn.warn { background: var(--warn); color: #fff; }
body.theme-botilleria_dark input, body.theme-botilleria_dark select { background: #0b1220; color: #e5e7eb; border-color: #334155; }
body.theme-botilleria_dark input::placeholder { color: #9ca3af; }
body.theme-botilleria_dark .tag { background: rgba(255,255,255,0.12); color: #fff; }
body.theme-botilleria_dark .tag.selected { background: var(--accent); }
body.theme-botilleria_dark .table { color: var(--text); }
body.theme-botilleria_dark .product-btn .fav-toggle { background: rgba(0,0,0,0.35); color: #fff; }
body.theme-pizzeria .app-header { border-bottom-color: transparent; }
body.theme-pizzeria .app-header::after { content:""; position:absolute; left:0; right:0; bottom:0; height:8px; background: linear-gradient(90deg, #CE2B37 33.33%, #ffffff 33.33% 66.66%, #009246 66.66%); }
/* Fallback de iconos temáticos (sin depender de @supports) */
body.theme-pizzeria::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .08; z-index: 0; background-image: url('/assets/theme-icons/pizzeria.png'); background-repeat: repeat; background-size: 220px 220px; }
