/* ==========================================================================
   Feria Comercial 2025 – Unified Application Styles
   --------------------------------------------------------------------------
   Everything visual across the platform should live here so that every page
   shares the same look & feel. Keep the palette, spacing scale and component
   rules consistent to guarantee a professional front-end.
   ========================================================================== */

:root {
  /* Brand palette */
  --color-primary: #1554d1;
  --color-primary-dark: #0d3fa1;
  --color-primary-soft: rgba(21, 84, 209, 0.08);
  --color-secondary: #0fa968;
  --color-accent: #f97316;

  /* Neutrals */
  --color-bg: #e8ecfb;
  --color-surface: #fcfdff;
  --color-surface-alt: #eef2ff;
  --color-border: rgba(15, 23, 42, 0.12);
  --color-border-strong: rgba(15, 23, 42, 0.22);
  --color-text: #111827;
  --color-text-secondary: #374151;
  --color-text-muted: #6b7280;
  --gradient-surface: linear-gradient(135deg, #ffffff 0%, #f1f5ff 100%);

  /* Utility */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 14px 30px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 32px 64px rgba(15, 23, 42, 0.16);
  --layout-max-width: 1400px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --line-height-base: 1.55;
}

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

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  line-height: var(--line-height-base);
  background: radial-gradient(circle at 10% 20%, #fdf8ff 0%, #eef2ff 45%, #e3e9f8 100%);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover,
a:focus-visible {
  color: var(--color-primary);
}

.app-shell {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-navbar {
  background: linear-gradient(120deg, #fdfbff 0%, #f1f5ff 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.08);
}

.app-navbar .app-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.app-navbar .navbar-toggler {
  border: none;
  box-shadow: none;
}

.app-navbar .navbar-collapse {
  flex-grow: 1;
  justify-content: flex-end;
}

.app-navbar .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.02em;
}

.app-navbar .navbar-brand img {
  height: 60px;
  width: auto;
}

.app-navbar .navbar-nav {
  gap: 0.25rem;
}

.app-navbar .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus-visible {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.app-navbar .nav-link.active {
  background: var(--color-primary);
  color: #ffffff;
}

.app-navbar .nav-link-label {
  pointer-events: none;
  cursor: default;
  color: var(--color-text-secondary);
}

.app-navbar .nav-link-label i {
  color: inherit;
}

.app-container {
  width: min(var(--layout-max-width), 100% - 3rem);
  margin: 0 auto;
}

main {
  flex: 1;
  padding: clamp(1.6rem, 4vw, 3.2rem) 0;
}

main .app-container {
  width: min(var(--layout-max-width), 100%);
}

.app-card {
  background: var(--gradient-surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(59, 130, 246, 0.18);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.4rem, 3vw, 2.1rem);
  margin-bottom: clamp(1.4rem, 3vw, 2.25rem);
  position: relative;
  overflow: hidden;
}

.app-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(21, 84, 209, 0.08), transparent 45%);
  pointer-events: none;
  opacity: 0.8;
  z-index: 0;
}

.app-card > * {
  position: relative;
  z-index: 1;
}

.app-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.app-card-title {
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 600;
  color: var(--color-primary-dark);
  margin: 0;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem;
  justify-content: space-between;
  margin-bottom: clamp(1.4rem, 3vw, 2.1rem);
}

.page-title {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  font-weight: 600;
  color: var(--color-primary-dark);
  margin: 0;
}

.page-subtitle {
  color: var(--color-text-secondary);
  margin: 0;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.module-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 1.75rem 1.6rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.9rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.module-card i {
  color: var(--color-primary);
  font-size: 2.4rem;
}

.module-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.module-card .btn {
  margin-top: auto;
}

.btn {
  border-radius: 999px;
  font-weight: 600;
  padding: 0.65rem 1.6rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.2s ease;
}

.btn:focus-visible {
  box-shadow: 0 0 0 0.2rem rgba(21, 84, 209, 0.2);
}

.btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(21, 84, 209, 0.25);
}

.btn-outline-primary {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline-primary:hover {
  background: var(--color-primary);
  color: #ffffff;
}

.btn-success {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
}

.btn-success:hover {
  background: #0c8653;
  border-color: #0c8653;
  transform: translateY(-1px);
}

.btn-warning {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #ffffff;
}

.btn-warning:hover {
  background: #dd650f;
  border-color: #dd650f;
}

.btn-link {
  color: var(--color-primary);
  font-weight: 500;
}

.btn-link:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 0.5rem;
}

.stat-card h3 {
  margin: 0;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.stat-card .stat-value {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 600;
  color: var(--color-primary-dark);
}

.alert {
  border-radius: var(--radius-md);
  border: none;
  padding: 1rem 1.2rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.alert-info {
  background: rgba(21, 84, 209, 0.08);
  color: var(--color-primary-dark);
}

.alert-warning {
  background: rgba(249, 115, 22, 0.15);
  color: #b45309;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

.badge {
  border-radius: 999px;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
}

.badge.bg-light {
  color: var(--color-primary-dark);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
}

.table thead {
  background: var(--color-surface-alt);
  color: var(--color-text-secondary);
}

.table th,
.table td {
  padding: 0.95rem 1rem;
  vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(15, 23, 42, 0.02);
}

.table-hover tbody tr:hover {
  background: rgba(21, 84, 209, 0.08);
}

.table-responsive {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  background: var(--color-surface);
}

.table-scroll {
  max-height: 420px;
  overflow-y: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.table-scroll .table {
  margin-bottom: 0;
}

.form-label {
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 0.35rem;
}

.form-control,
.form-select,
.form-control-lg,
.form-control-sm {
  border-radius: 0.75rem;
  border: 1px solid var(--color-border);
  background: rgba(15, 23, 42, 0.04);
  padding: 0.75rem 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--color-primary);
  background: rgba(21, 84, 209, 0.08);
  box-shadow: 0 0 0 0.15rem rgba(21, 84, 209, 0.15);
}

.input-group-text {
  border: 1px solid var(--color-border);
  border-radius: 0.75rem 0 0 0.75rem;
  background: rgba(15, 23, 42, 0.08);
  font-weight: 600;
}

.input-group > .form-control,
.input-group > .form-select {
  border-radius: 0 0.75rem 0.75rem 0;
}

.list-group-item {
  border: none;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  margin-bottom: 0.5rem;
  background: rgba(15, 23, 42, 0.04);
  transition: background 0.2s ease, transform 0.2s ease;
}

.list-group-item:hover,
.list-group-item:focus-visible {
  background: rgba(21, 84, 209, 0.08);
  transform: translateY(-1px);
}

.toast-container {
  z-index: 1060;
}

.toast {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.app-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 1.4rem 0;
}

.app-footer .footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.app-footer img {
  height: 45px;
  width: auto;
}

.fade-in {
  animation: fadeIn 0.45s ease-in-out both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  background: rgba(15, 23, 42, 0.06);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.chip--success {
  background: rgba(15, 168, 91, 0.15);
  color: #0a6f42;
}

.chip--warning {
  background: rgba(249, 115, 22, 0.15);
  color: #b45309;
}

.chip--danger {
  background: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
}

.page-section {
  margin-bottom: clamp(1.8rem, 4vw, 2.6rem);
}

.divider {
  height: 1px;
  width: 100%;
  background: var(--color-border);
  margin: 2rem 0;
}

.shadowed-block {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.soft-section {
  border-radius: var(--radius-lg);
  background: var(--color-surface-alt);
  padding: clamp(1.2rem, 3vw, 2rem);
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 2px dashed rgba(15, 23, 42, 0.12);
  color: var(--color-text-muted);
  background: rgba(15, 23, 42, 0.03);
}

.empty-state i {
  font-size: 2.4rem;
  margin-bottom: 0.8rem;
  color: var(--color-text-secondary);
}

.grid-2 {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.pill-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.35rem;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 999px;
}

.pill-group .btn {
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
}

.status-dot {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  margin-right: 0.4rem;
  background: currentColor;
}

.section-heading {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-bottom: 0.75rem;
}

.subtle-text {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.data-point {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.data-point:last-child {
  border-bottom: none;
}

.data-point strong {
  font-weight: 600;
  color: var(--color-primary-dark);
}

.floating-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  padding: 0.55rem 0.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

.toolbar-title {
  font-weight: 600;
  color: var(--color-text-secondary);
}

.table-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.table-actions .btn {
  padding-inline: 1rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-sm);
}

.filter-bar .form-select {
  min-width: 210px;
}

.filter-bar .form-control {
  min-width: 250px;
}

.timeline {
  position: relative;
  padding-left: 1.5rem;
  margin: 0;
  list-style: none;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0.35rem;
  bottom: 0.35rem;
  left: 0;
  width: 2px;
  background: rgba(15, 23, 42, 0.12);
}

.timeline li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 1.35rem;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: -0.55rem;
  top: 0.25rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(21, 84, 209, 0.18);
}

.chart-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.chart-card canvas {
  width: 100% !important;
  height: auto !important;
}

.form-divider {
  margin: 1.5rem 0;
  border-top: 1px dashed rgba(15, 23, 42, 0.12);
}

.form-layout {
  width: min(760px, 100%);
  margin: 0 auto;
}

.page-narrow {
  width: min(960px, 100%);
  margin: 0 auto;
}

.consulta-card .consulta-form .form-control {
  font-size: 1.05rem;
}

.consulta-card .consulta-resumen {
  margin-top: 1.5rem;
}

.list-layout {
  padding: clamp(1.4rem, 3vw, 2rem);
}

.description-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem 1.8rem;
}

.description-list dt {
  font-weight: 600;
  color: var(--color-text-secondary);
}

.description-list dd {
  margin: 0;
  color: var(--color-text);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  font-weight: 600;
  font-size: 0.85rem;
}

.pill i {
  font-size: 0.9rem;
}

.full-bleed {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.full-bleed .module-grid {
  padding: 0 clamp(2rem, 6vw, 5rem);
}

.hero-banner {
  background: linear-gradient(135deg, rgba(21, 84, 209, 0.92), rgba(15, 169, 104, 0.92));
  color: white;
  border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 4vw, 3rem);
  box-shadow: var(--shadow-lg);
}

.hero-banner h1 {
  margin-bottom: 0.6rem;
}

.hero-banner p {
  margin-bottom: 0;
  opacity: 0.85;
}

.card-compact {
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.card-compact h3 {
  margin-bottom: 0.4rem;
  font-size: 1.15rem;
  color: var(--color-text-secondary);
}

.card-compact .value {
  font-weight: 600;
  color: var(--color-primary-dark);
  font-size: 1.35rem;
}

.progress-bar-modern {
  height: 8px;
  border-radius: 999px;
  background: rgba(21, 84, 209, 0.12);
  overflow: hidden;
}

.progress-bar-modern .value {
  height: 100%;
  background: var(--color-primary);
  border-radius: inherit;
}

.app-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.06);
  padding: 0.4rem;
  border-radius: 999px;
}

.app-tabs a {
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.app-tabs a.active,
.app-tabs a:hover {
  background: var(--color-primary);
  color: #ffffff;
}

.card-highlight {
  border: 1px solid rgba(15, 169, 104, 0.35);
  box-shadow: 0 22px 45px rgba(15, 169, 104, 0.16);
}

.attention {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.15);
  color: #b45309;
  font-weight: 600;
}

.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-grid .tag {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.carousel-fullscreen {
  position: relative;
  height: 100vh;
  background: #000;
}

.carousel-fullscreen .carousel-item {
  height: 100vh;
  overflow: hidden;
  transition: opacity 1s ease-in-out, transform 1s ease-in-out;
}

.carousel-fullscreen img,
.carousel-fullscreen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.carousel-fullscreen .carousel-control-prev,
.carousel-fullscreen .carousel-control-next {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.carousel-fullscreen:hover .carousel-control-prev,
.carousel-fullscreen:hover .carousel-control-next {
  opacity: 0.9;
}

#progressBar {
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.5));
  border-radius: 0 999px 999px 0;
  z-index: 10;
}

.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(21, 84, 209, 0.92), rgba(15, 169, 104, 0.92));
  opacity: 0.88;
  z-index: -2;
}

.login-background {
  position: fixed;
  inset: 0;
  z-index: -3;
  object-fit: cover;
  width: 100%;
  height: 100%;
  filter: saturate(110%);
}

.login-card {
  width: min(420px, 100%);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 26px;
  padding: clamp(2rem, 4vw, 2.6rem);
  box-shadow: 0 35px 80px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(18px);
}

.login-card h1 {
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--color-primary-dark);
}

.login-subtitle {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.login-logo {
  height: 60px;
  width: auto;
  margin-bottom: 1.5rem;
}

.input-group-icon {
  position: relative;
}

.input-group-icon .icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

.input-group-icon .form-control {
  padding-left: 2.9rem;
}

.input-group-icon:focus-within .icon {
  color: var(--color-primary);
}

.login-footer {
  margin-top: 2rem;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  font-size: 0.9rem;
}

.login-footer img {
  height: 38px;
  margin-top: 0.35rem;
}

.fullscreen-page {
  min-height: 100vh;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  flex-direction: column;
}

.fullscreen-page .app-container {
  width: min(1100px, 100% - 2.5rem);
}

.fullscreen-card {
  background: rgba(15, 23, 42, 0.78);
  border-radius: 28px;
  padding: clamp(1.8rem, 4vw, 2.6rem);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 25px 65px rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(18px);
}

.fullscreen-card h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.prize-display {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #ffffff;
  color: #111827;
  overflow: hidden;
}

.prize-display__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
}

.prize-display__info {
  position: absolute;
  bottom: 3%;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  box-shadow: 0 25px 55px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(6px);
  max-width: min(92vw, 1200px);
  z-index: 2;
}

.prize-display__name {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  line-height: 1.2;
}

.prize-display__logo {
  width: clamp(90px, 12vw, 190px);
  height: auto;
  flex-shrink: 0;
}

.pantalla-bienvenida {
  background: #020617;
  color: #ffffff;
}

.bienvenida-screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at top, rgba(15, 118, 110, 0.25), transparent 55%),
    linear-gradient(145deg, #0f172a 0%, #020617 45%, #111827 100%);
}

.bienvenida-promos {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.bienvenida-promos__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1.2s ease, transform 1.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.bienvenida-promos__slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.bienvenida-promos__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) brightness(1.2) contrast(1.05);
  transform: scale(1.02);
}

.bienvenida-promos__slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.18), transparent 45%),
              radial-gradient(circle at 75% 15%, rgba(255, 255, 255, 0.18), transparent 40%),
              radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.15), transparent 50%);
}

.bienvenida-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.bienvenida-overlay.is-active {
  opacity: 1;
}

.bienvenida-overlay.is-hidden {
  opacity: 0;
}

.bienvenida-card {
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  border-radius: 32px;
  padding: clamp(2rem, 5vw, 3.8rem);
  text-align: center;
  box-shadow: 0 40px 90px rgba(15, 23, 42, 0.4);
  min-width: min(85vw, 960px);
  transform: translateY(30px);
  animation: welcomePop 0.7s ease forwards;
}

.bienvenida-card__tag {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-weight: 600;
  color: #0ea5e9;
  margin-bottom: 1rem;
}

.bienvenida-card__name {
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.bienvenida-card__details {
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  color: #1f2937;
  margin: 0;
}

.confetti-layer {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 3;
}

.confetti-piece {
  position: absolute;
  top: -10%;
  left: var(--confetti-left, 0);
  width: 12px;
  height: 20px;
  border-radius: 2px;
  opacity: 0;
  animation: confettiFall var(--confetti-duration, 3800ms) ease-in forwards;
  animation-delay: var(--confetti-delay, 0ms);
}

.confetti-piece[data-shape="triangle"] {
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
}

.confetti-piece[data-shape="circle"] {
  border-radius: 50%;
}

.confetti-piece[data-shape="papel"] {
  width: 18px;
  height: 14px;
  border-radius: 4px 4px 10px 10px;
  box-shadow: inset 0 -3px rgba(0, 0, 0, 0.15);
}

@keyframes confettiFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -20px, 0) rotate(0deg);
  }
  10% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(0, 120vh, 0) rotate(var(--confetti-rotate, 720deg));
  }
}

@keyframes welcomePop {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(40px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.papel-picado {
  position: absolute;
  width: 120%;
  height: 160px;
  left: -10%;
  z-index: 2;
  background-image: linear-gradient(90deg, #f97316 0%, #facc15 25%, #22c55e 50%, #0ea5e9 75%, #a855f7 100%);
  mask-image: radial-gradient(circle at 10% 50%, #000 25%, transparent 26%),
              radial-gradient(circle at 30% 50%, #000 25%, transparent 26%),
              radial-gradient(circle at 50% 50%, #000 25%, transparent 26%),
              radial-gradient(circle at 70% 50%, #000 25%, transparent 26%),
              radial-gradient(circle at 90% 50%, #000 25%, transparent 26%);
  mask-size: 160px 100%;
  mask-repeat: repeat;
  opacity: 0.55;
}

.papel-picado--top {
  top: -40px;
  transform: rotate(-2deg);
}

.papel-picado--bottom {
  bottom: -60px;
  transform: rotate(2deg);
}

.promo-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.promo-thumb {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: 200px;
  background: rgba(15, 23, 42, 0.3);
}

.promo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-status {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  background: rgba(34, 197, 94, 0.9);
  color: #04101c;
}

.promo-status.is-paused {
  background: rgba(248, 250, 252, 0.7);
  color: #0f172a;
}

.promo-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.promo-actions .btn {
  font-weight: 600;
}

.gradient-card {
  background: linear-gradient(160deg, rgba(15, 118, 110, 0.92), rgba(14, 165, 233, 0.85));
  color: #f8fafc;
  border: none;
  box-shadow: 0 25px 80px rgba(4, 17, 29, 0.4);
}

.gradient-card .checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  line-height: 1.3;
}

.gradient-card .btn-outline-light {
  border-color: rgba(248, 250, 252, 0.7);
  color: #fff;
}

.gradient-card .btn-outline-light:hover {
  background: rgba(248, 250, 252, 0.12);
}

.summary-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  padding: 1.15rem 1.4rem;
  background: var(--gradient-surface);
  box-shadow: var(--shadow-lg);
}

.summary-card p {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
  color: rgba(15, 23, 42, 0.65);
}

.summary-card span {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--color-primary);
}

.summary-card small {
  display: block;
  color: var(--color-text-secondary);
}

.podium-card {
  background: var(--gradient-surface);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-lg);
}

.podium-slot {
  text-align: center;
}

.podium-riser {
  position: relative;
  border-radius: 30px 30px 12px 12px;
  padding: 1.5rem 1rem 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(218, 225, 231, 0.9));
  box-shadow: inset 0 -20px 40px rgba(15, 23, 42, 0.08), 0 25px 60px rgba(15, 23, 42, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.35rem;
}

.podium-slot--oro .podium-riser {
  background: linear-gradient(180deg, #facc15, #f59e0b);
  color: #3f1b0a;
}

.podium-slot--plata .podium-riser {
  background: linear-gradient(180deg, #f3f4f6, #d1d5db);
  color: #1f2937;
}

.podium-slot--bronce .podium-riser {
  background: linear-gradient(180deg, #fed7aa, #fb923c);
  color: #431407;
}

.podium-position {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.podium-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto 0.5rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 24px;
}

.podium-logo.fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: inherit;
}

.podium-stand {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.podium-lab {
  font-size: 1.1rem;
  font-weight: 600;
}

.podium-points {
  font-size: 1.2rem;
}

.is-hidden {
  display: none !important;
}

.tapa-body {
  background: #f4f6f8;
  color: #212529;
  min-height: 100vh;
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem) 1.5rem 3rem;
}

.tapa-wrapper {
  width: min(980px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

.tapa-preview {
  width: var(--preview-width);
  max-width: 100%;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.15);
  padding: clamp(1.2rem, 3vw, 1.8rem);
  overflow: auto;
}

.tapa-canvas {
  position: relative;
  width: 100%;
  height: var(--preview-height);
  border-radius: 14px;
  background-image: var(--preview-bg);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.tapa-field {
  position: absolute;
  font-weight: 600;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  margin: 0;
  padding: 0 4px;
  color: #0f172a;
}

.tapa-field--left {
  text-align: left;
}

.tapa-field--center {
  text-align: center;
}

.tapa-field--right {
  text-align: right;
}

.tapa-barcode {
  position: absolute;
}

.tapa-status {
  font-size: 1.05rem;
  font-weight: 600;
  color: #13713b;
}

.imprimir-btn {
  padding: 0.9rem 2.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(19, 113, 59, 0.35);
}

.imprimir-btn:hover,
.imprimir-btn:focus-visible {
  box-shadow: 0 16px 34px rgba(19, 113, 59, 0.45);
  transform: translateY(-1px);
}

@media (max-width: 1200px) {
  .app-container {
    width: min(100% - 2.5rem, 1100px);
  }
}

@media (max-width: 992px) {
  .app-navbar .navbar-brand img {
    height: 48px;
  }

  .app-navbar .navbar-brand span {
    display: none;
  }

  .app-container {
    width: calc(100% - 2.4rem);
  }

  .page-header {
    align-items: flex-start;
  }

  .page-actions {
    width: 100%;
  }

  .module-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .app-footer .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .app-container {
    width: calc(100% - 2rem);
  }

  .app-card {
    padding: 1.4rem;
  }

  .module-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar .form-select,
  .filter-bar .form-control {
    min-width: 100%;
  }

  .login-card {
    box-shadow: 0 25px 55px rgba(15, 23, 42, 0.35);
  }
}

@media (max-width: 576px) {
  main {
    padding: 1.8rem 0;
  }

  .app-card {
    padding: 1.25rem;
  }

  .module-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .page-actions {
    gap: 0.5rem;
  }
}

.coord-helper__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
  gap: clamp(1.2rem, 3vw, 2rem);
  align-items: flex-start;
}

.coord-helper__stage {
  position: relative;
  background: repeating-linear-gradient(
      to right,
      rgba(15, 98, 255, 0.08),
      rgba(15, 98, 255, 0.08) 10px,
      transparent 10px,
      transparent 50px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(239, 68, 68, 0.08),
      rgba(239, 68, 68, 0.08) 10px,
      transparent 10px,
      transparent 50px
    ),
    #f8fafc;
  padding: clamp(1rem, 2vw, 1.4rem);
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.coord-helper__image-wrapper {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.coord-helper__image {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
}

.coord-helper__marker {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.15);
  pointer-events: none;
}

.coord-helper__marker span {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.coord-helper__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.coord-helper__overlay-field {
  position: absolute;
  border: 1px dashed rgba(15, 23, 42, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  color: #0f172a;
  font-weight: 600;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.2rem 0.4rem;
}

.coord-helper__overlay-field--barcode {
  border-color: rgba(13, 148, 136, 0.8);
  background: rgba(13, 148, 136, 0.12);
  color: #065f46;
}

.coord-helper__panel {
  border-radius: 20px;
  background: var(--gradient-surface);
  border: 1px solid rgba(59, 130, 246, 0.18);
  box-shadow: var(--shadow-lg);
}

.coord-helper__metrics {
  display: grid;
  gap: 1rem;
}

.coord-helper__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.coord-helper__value {
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

.coord-helper__snippet {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.coord-helper__snippet code {
  background: rgba(15, 23, 42, 0.06);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  flex: 1;
  overflow-x: auto;
}

.coord-helper__table-wrapper {
  max-height: 320px;
  overflow-y: auto;
  border-radius: 12px;
}

@media (max-width: 992px) {
  .coord-helper__layout {
    grid-template-columns: 1fr;
  }
}

.productos-page main .app-container {
  width: min(1440px, 100% - clamp(1.5rem, 3vw, 3.5rem));
  margin: 0 auto;
  padding: clamp(1.2rem, 3vw, 2.5rem) 0 clamp(2rem, 4vw, 3.2rem);
}

.productos-layout {
  background: linear-gradient(135deg, #f8fbff 0%, #eef2ff 100%);
  border-radius: 28px;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.14);
  padding: clamp(1.2rem, 2vw, 1.9rem);
  display: grid;
  gap: clamp(1rem, 2vw, 1.8rem);
}

.productos-layout .back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--color-primary);
}

.productos-layout .intro-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(0.8rem, 1.6vw, 1.4rem);
}

.productos-layout .stand-card,
.productos-layout .cliente-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(233, 239, 255, 0.98));
  border-radius: 20px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: clamp(1rem, 2vw, 1.5rem);
  display: grid;
  gap: 0.95rem;
  box-shadow: 0 20px 38px rgba(15, 23, 42, 0.12);
}

.productos-layout .stand-card {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.productos-layout .stand-logo {
  width: clamp(96px, 12vw, 140px);
  height: clamp(68px, 9vw, 110px);
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  display: grid;
  place-items: center;
  padding: 0.35rem 0.65rem;
}

.productos-layout .stand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.productos-layout .stand-info {
  display: grid;
  gap: 0.2rem;
}

.productos-layout .stand-info span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

.productos-layout .stand-info strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.productos-layout .cliente-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.65rem 1.1rem;
  font-size: 0.92rem;
}

.productos-controls {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 360px);
  gap: clamp(1rem, 2vw, 1.6rem);
  align-items: start;
}

@media (max-width: 992px) {
  .productos-controls {
    grid-template-columns: 1fr;
  }
}

.cart-overlay {
  position: sticky;
  top: 1.5rem;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 22px;
  padding: 1.5rem;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.35);
}

.cart-overlay .label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: rgba(248, 250, 252, 0.7);
}

.cart-overlay .cart-summary-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cart-overlay .cart-indicators {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.cart-overlay .cart-details {
  margin-top: 1rem;
  background: rgba(15, 23, 42, 0.35);
  border-radius: 18px;
  padding: 1rem;
}

.cart-overlay .cart-details.show,
.cart-overlay .cart-details {
  display: block;
}

.productos-layout .cliente-grid span {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.1rem;
}

.productos-layout .filters-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(0.6rem, 1.2vw, 1rem);
}

.productos-layout .cart-overlay {
  position: static;
}

.cart-overlay .cart-summary {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-overlay .cart-last .label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(248, 250, 252, 0.65);
}

.cart-overlay #cart-last-item {
  font-weight: 600;
  color: #ffffff;
}

.productos-layout .cart-indicators {
  display: flex;
  gap: 1rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  font-size: 0.9rem;
}

.productos-layout .cart-indicators strong {
  margin-left: 0.35rem;
  font-size: 1.2rem;
}

.productos-layout #toggle-cart {
  margin-left: auto;
  min-width: 130px;
}

.productos-layout #toggle-cart[disabled] {
  opacity: 0.55;
  pointer-events: none;
}

.productos-layout .cart-details {
  display: none;
  width: 100%;
  margin-top: 0.8rem;
  padding: 0.9rem 1rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.productos-layout .cart-details.show {
  display: block;
}

.productos-layout .cart-details .list-group-item {
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
}

.productos-layout .product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(0.8rem, 1.6vw, 1.2rem);
}

.productos-layout .product-card {
  background: linear-gradient(145deg, #ffffff 0%, #f5f7ff 100%);
  border-radius: 20px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.12);
  padding: clamp(0.95rem, 1.5vw, 1.25rem);
  display: grid;
  gap: 0.9rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.productos-layout .product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 52px rgba(15, 23, 42, 0.15);
}

.productos-layout .product-main {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.productos-layout .product-thumb {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.22);
  display: grid;
  place-items: center;
  color: var(--color-primary);
  font-size: 1.5rem;
}

.productos-layout .product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.productos-layout .product-body {
  flex: 1;
  display: grid;
  gap: 0.35rem;
}

.productos-layout .product-title {
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary-dark);
  font-size: 0.95rem;
}

.productos-layout .product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.82rem;
  color: rgba(15, 23, 42, 0.78);
}

.productos-layout .product-footer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.productos-layout .product-control {
  max-width: 110px;
}

.productos-layout .product-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: stretch;
}

.productos-layout .product-actions .btn {
  font-size: 0.8rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  width: auto;
}

.productos-layout .product-actions .btn i {
  font-size: 0.85em;
}

.productos-layout .price-block {
  text-align: right;
}

.productos-layout .price-block .precio-display {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-primary-dark);
}

.productos-layout .subtotal {
  font-weight: 700;
  font-size: 1.15rem;
  text-align: right;
  color: var(--color-secondary);
}

.productos-layout .product-card.text-center {
  padding: 2.5rem 1.5rem;
}

@media (max-width: 992px) {
  .productos-layout .product-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .productos-layout .product-main {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .productos-layout .product-footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .productos-layout .cart-summary {
    flex-direction: column;
    align-items: stretch;
  }
}

.confirmacion-page main .app-container {
  width: min(1200px, 100%);
  padding: clamp(1.2rem, 3vw, 2.4rem);
}

.confirm-layout {
  background: var(--color-surface);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: clamp(1.2rem, 2vw, 1.8rem);
  display: grid;
  gap: clamp(1rem, 2vw, 1.6rem);
}

.confirm-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: clamp(0.8rem, 1.6vw, 1.2rem);
  align-items: flex-start;
}

.confirm-header .back-link {
  color: var(--color-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.confirm-header .confirm-title {
  display: grid;
  gap: 0.4rem;
}

.confirm-header-logo {
  display: grid;
  place-items: center;
  padding: 0.4rem 0.6rem;
  border-radius: 16px;
  background: var(--color-surface-alt);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.confirm-header-logo img {
  max-height: clamp(70px, 8vw, 96px);
  width: auto;
}

.confirm-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(0.8rem, 1.6vw, 1.3rem);
}

.confirm-summary .summary-card {
  background: var(--color-surface-alt);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: clamp(0.85rem, 1.4vw, 1.1rem);
  display: grid;
  gap: 0.35rem;
}

.confirm-summary .summary-card h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0;
  color: var(--color-text-muted);
}

.confirm-summary .summary-card .muted {
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.confirm-table .table {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
}

.confirm-alert {
  gap: 1rem;
  border-radius: 16px;
}

@media (max-width: 768px) {
  .confirm-actions {
    justify-content: stretch;
  }

  .confirm-actions .btn {
    width: 100%;
  }
}

.mapa-page {
  background: #f0f2f5;
  padding: clamp(1.2rem, 3vw, 2.5rem);
  transition: margin-right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mapa-page.sidebar-visible {
  margin-right: 350px;
}

.mapa-search {
  width: min(900px, 100%);
  margin: 0 auto clamp(1rem, 2vw, 1.5rem);
}

.mapa-container {
  position: relative;
  width: min(900px, 100%);
  margin: 0 auto;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

#mapa-placeholder {
  width: 100%;
  background: #ffffff;
}

.stand-group {
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.stand-group:hover {
  transform: translateY(-4px);
  filter: drop-shadow(0 8px 12px rgba(15, 23, 42, 0.25));
}

.stand-group.active {
  transform: translateY(-2px) scale(1.02);
  filter: drop-shadow(0 0 18px rgba(37, 99, 235, 0.55));
}

.stand-group.faded {
  opacity: 0.25;
  pointer-events: none;
}

.stand-rect {
  stroke: rgba(15, 23, 42, 0.2);
  stroke-width: 15;
}

.stand-rect.reservado {
  fill: #f0ad4e;
}

.stand-rect.libre {
  fill: #f8f9fa;
}

.stand-logo {
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.7));
  object-fit: contain;
  object-position: center;
}

.stand-number {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  fill: #ffffff;
  text-anchor: end;
  paint-order: stroke;
  stroke: rgba(15, 23, 42, 0.35);
  stroke-width: 1px;
  stroke-linejoin: round;
}

.stand-number.dark-text {
  fill: #111827;
  stroke: rgba(255, 255, 255, 0.75);
}

.info-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 350px;
  height: 100%;
  background: linear-gradient(145deg, #ffffff 0%, #eef2ff 90%);
  box-shadow: -10px 0 30px rgba(15, 23, 42, 0.2);
  border-left: 1px solid rgba(15, 23, 42, 0.08);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
}

.info-sidebar.visible {
  transform: translateX(0);
}

.sidebar-close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 28px;
  color: #94a3b8;
  background: none;
  border: none;
  cursor: pointer;
}

.sidebar-content {
  padding: 48px 32px;
  overflow-y: auto;
  text-align: center;
}

.sidebar-logo {
  width: 100%;
  height: 140px;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 20px;
}

#sidebar-title {
  color: var(--color-primary-dark);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

#sidebar-description {
  color: var(--color-text-secondary);
  text-align: left;
  line-height: 1.6;
  white-space: pre-wrap;
}

.map-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.map-overlay.visible {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 992px) {
  .mapa-page.sidebar-visible {
    margin-right: 0;
  }

  .info-sidebar {
    width: 100%;
  }
}

.mapa-page h1 {
  text-align: center;
  margin-bottom: clamp(1.2rem, 3vw, 2rem);
  color: var(--color-primary-dark);
  font-weight: 600;
}

.votacion-page main .app-container {
  width: min(1200px, 100%);
  padding: clamp(1.2rem, 3vw, 2.4rem);
}

.voting-container {
  background: var(--color-surface);
  border-radius: 24px;
  padding: clamp(1.2rem, 2vw, 1.8rem);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.votacion-title {
  color: var(--color-primary-dark);
  font-weight: 700;
}

.votacion-subtitle {
  color: var(--color-text-secondary);
  font-weight: 600;
}

.votacion-form-title {
  color: var(--color-primary-dark);
  font-weight: 700;
}

#podium-section {
  background: linear-gradient(135deg, rgba(245, 247, 250, 0.95), rgba(233, 236, 239, 0.95));
  border-radius: 18px;
  padding: clamp(1.1rem, 2vw, 1.6rem);
  border: 1px solid rgba(148, 163, 184, 0.25);
  margin-bottom: clamp(1.1rem, 2vw, 1.6rem);
}

#podium-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(0.9rem, 2vw, 1.6rem);
  flex-wrap: wrap;
}

.podium-place {
  width: min(200px, 100%);
  border: 2px dashed rgba(148, 163, 184, 0.6);
  border-radius: 16px;
  padding: clamp(0.9rem, 2vw, 1.2rem);
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.podium-place h5 {
  font-weight: 700;
  color: var(--color-primary-dark);
}

.selected-stand {
  min-height: 110px;
  display: grid;
  place-items: center;
  gap: 0.4rem;
  color: var(--color-text-secondary);
}

#vote-button-container {
  display: flex;
  justify-content: center;
  margin-top: 1.4rem;
}

.stand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: clamp(0.75rem, 1.6vw, 1.2rem);
}

.stand-item {
  background: var(--color-surface-alt);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: clamp(0.8rem, 1.4vw, 1.2rem);
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stand-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
}

.stand-item .stand-logo {
  width: 100%;
  height: 120px;
  object-fit: contain;
  margin-bottom: 0.8rem;
}

.stand-item .stand-name {
  font-weight: 600;
  color: var(--color-primary-dark);
}

.stand-item .stand-number {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.tapa-form-container {
  max-width: 480px;
  margin: 0 auto;
  background: var(--color-surface);
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.3rem, 2vw, 1.8rem);
}

@media (max-width: 576px) {
  .podium-place {
    width: 100%;
  }
}

.home-dashboard {
  display: grid;
  gap: clamp(1.2rem, 3vw, 1.8rem);
}

.home-header {
  display: grid;
  gap: 0.3rem;
}

/* -- Nuevo layout de pedidos -- */
.productos-shell {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 3vw, 2rem);
  background: linear-gradient(145deg, #fbfdff 0%, #f2f5fb 100%);
  border-radius: 28px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: clamp(1rem, 3vw, 1.9rem);
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.08);
}

.productos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.productos-summary {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

@media (max-width: 992px) {
  .productos-summary {
    grid-template-columns: 1fr;
  }
}

.info-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: clamp(1rem, 2vw, 1.4rem);
  display: grid;
  gap: 0.85rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.cliente-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.cliente-card .cliente-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem 1.1rem;
}

.cliente-card span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.cliente-card strong {
  font-size: 1rem;
  font-weight: 600;
}

.productos-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2vw, 1.6rem);
  align-items: start;
}

.productos-form .product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: clamp(0.9rem, 1.6vw, 1.4rem);
}

.productos-form .product-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  padding: 1.2rem;
  display: grid;
  gap: 1rem;
}

.productos-form .product-main {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 1rem;
}

.productos-form .product-footer {
  display: grid;
  grid-template-columns: 130px 1fr auto auto;
  gap: 0.75rem;
  align-items: center;
}

@media (max-width: 768px) {
  .productos-form .product-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cart-overlay {
  background: #0f172a;
  color: #f8fafc;
  border-radius: 20px;
  padding: clamp(1rem, 2vw, 1.4rem);
  box-shadow: 0 25px 55px rgba(6, 12, 24, 0.45);
  position: sticky;
  top: 1.5rem;
}

.cart-overlay .cart-details {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 18px;
}

.cart-overlay .cart-summary-header {
  gap: 0.9rem;
}

/* Cart drawer - floating panel */
.cart-drawer {
  position: fixed;
  top: clamp(5.5rem, 7vh, 6.5rem);
  right: 0;
  width: min(420px, 92vw);
  height: calc(100vh - clamp(6rem, 10vh, 7.5rem));
  z-index: 1050;
  transform: translateX(calc(100% - 62px));
  transition: transform 0.4s ease;
  overflow: visible;
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-tab {
  position: absolute;
  top: 1rem;
  left: -58px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  color: #fff;
  border: 1px solid rgba(14, 165, 233, 0.35);
  border-radius: 999px 0 0 999px;
  padding: 0.55rem 0.9rem 0.55rem 1.4rem;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.35);
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.cart-tab.cart-tab-empty {
  opacity: 0.55;
}

.cart-tab-label {
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.cart-tab-pill {
  min-width: 32px;
  text-align: center;
  background: #fff;
  color: #2563eb;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.cart-drawer-panel {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: #0f172a;
  border-radius: 28px 0 0 28px;
  border: 1px solid rgba(59, 130, 246, 0.15);
  padding: clamp(1.2rem, 2vw, 1.6rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: -14px 24px 48px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}

.cart-drawer .cart-summary {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  height: 100%;
}

.cart-drawer .cart-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(14, 165, 233, 0.08);
  border-radius: 18px;
  border: 1px solid rgba(14, 165, 233, 0.15);
  padding: 1rem;
  overflow: hidden;
}

.cart-drawer #cart-items {
  flex: 1;
  overflow-y: auto;
}

.cart-drawer .cart-summary-header {
  gap: 0.75rem;
}

.cart-drawer .cart-last #cart-last-item {
  display: block;
  font-weight: 600;
  color: #0f172a;
}

.cart-drawer .cart-indicators {
  justify-content: space-between;
  font-size: 0.95rem;
  color: #0f172a;
}

.cart-drawer .cart-empty {
  color: rgba(15, 23, 42, 0.65);
}

@media (max-width: 991px) {
  .cart-drawer {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    transform: translateY(calc(100% - 60px));
  }

  .cart-drawer.open {
    transform: translateY(0);
  }

  .cart-tab {
    position: absolute;
    left: 50%;
    top: -48px;
    transform: translateX(-50%);
    border-radius: 999px;
    padding: 0.45rem 1.5rem;
  }

  .cart-drawer-panel {
    width: min(540px, 100%);
    margin: 0 auto;
    border-radius: 24px 24px 0 0;
  }
}
.productos-page main .app-container {
  width: min(1440px, 100% - clamp(1.5rem, 3vw, 3.5rem));
  margin: 0 auto;
  padding: clamp(1.2rem, 3vw, 2.5rem) 0 clamp(2rem, 4vw, 3.2rem);
}

.productos-shell {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 3vw, 2rem);
  background: #fff;
  border-radius: 28px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: clamp(1rem, 3vw, 2rem);
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.08);
}

.productos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.productos-summary {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

@media (max-width: 992px) {
  .productos-summary {
    grid-template-columns: 1fr;
  }
}

.info-card {
  background: #f8fafc;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: clamp(1rem, 2vw, 1.4rem);
  display: grid;
  gap: 1rem;
}

.cliente-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.cliente-card .cliente-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem 1.2rem;
}

.cliente-card span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.cliente-card strong {
  font-size: 1rem;
  font-weight: 600;
}

.productos-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: clamp(1rem, 2vw, 1.6rem);
  align-items: start;
}

@media (max-width: 992px) {
  .productos-controls {
    grid-template-columns: 1fr;
  }
}

.product-list-container {
  background: transparent;
}

.product-list-container .product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: clamp(1rem, 1.8vw, 1.8rem);
}

.product-list-container .product-card {
  background: #fff;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.08);
  padding: clamp(1.2rem, 1.8vw, 1.6rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-list-container .product-main {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 1rem;
}

.product-list-container .product-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  align-items: flex-start;
}

.product-list-container .product-control {
  flex: 0 0 140px;
}

.product-list-container .price-block {
  flex: 1 1 160px;
}

.product-list-container .product-actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: stretch;
}

.product-list-container .product-actions .btn {
  font-size: 0.78rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  min-width: 0;
  width: 140px;
  align-self: flex-start;
}

.product-list-container .subtotal {
  flex: 0 0 110px;
  text-align: right;
}

@media (max-width: 768px) {
  .product-list-container .product-control,
  .product-list-container .price-block,
  .product-list-container .product-actions,
  .product-list-container .subtotal {
    flex: 1 1 100%;
    text-align: center;
  }

  .product-list-container .product-actions {
    align-items: center;
  }

  .product-list-container .product-actions .btn {
    width: 100%;
  }

  .product-list-container .subtotal {
    text-align: center;
  }
}

.product-list-container .price-block {
  display: flex;
  flex-direction: column;
}

.product-list-container .subtotal {
  text-align: right;
  font-weight: 700;
}

.cart-overlay {
  background: #0f172a;
  color: #f8fafc;
  border-radius: 20px;
  padding: clamp(1rem, 2vw, 1.4rem);
  box-shadow: 0 25px 55px rgba(6, 12, 24, 0.45);
  position: sticky;
  top: 1.5rem;
}

.cart-overlay .cart-details {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 18px;
}

.cart-overlay .cart-summary-header {
  gap: 0.9rem;
}
