/* ==========================================================================
   Sagra Corticella — Design System
   Mobile-first, Bootstrap 5.3.3 companion
   ========================================================================== */


/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */

:root {
  /* Colori primari */
  --sagra-red:         #8B1A1A;
  --sagra-red-hover:   #A82222;
  --sagra-red-light:   #C73E3E;
  --sagra-gold:        #D4A574;
  --sagra-gold-hover:  #E0B88A;
  --sagra-cream:       #FFF8F0;
  --sagra-cream-alt:   #F5EDE3;
  --sagra-dark:        #1A1A1A;
  --sagra-dark-soft:   #2A2A2A;
  --sagra-olive:       #7A8B5B;
  --sagra-olive-hover: #8DA06A;
  --sagra-gray:        #6B7280;
  --sagra-gray-light:  #9CA3AF;
  --sagra-border:      #F0E8DC;
  --sagra-card-bg:     #FFFFFF;

  /* Tipografia fluida */
  --text-xs:   clamp(0.625rem, 1vw, 0.75rem);
  --text-sm:   clamp(0.75rem, 1.2vw, 0.875rem);
  --text-base: clamp(0.875rem, 1.5vw, 1rem);
  --text-lg:   clamp(1rem, 2vw, 1.25rem);
  --text-xl:   clamp(1.25rem, 3vw, 1.75rem);
  --text-2xl:  clamp(1.5rem, 4vw, 2.5rem);
  --text-3xl:  clamp(2rem, 5vw, 3.5rem);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;

  /* Line height */
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}


/* ==========================================================================
   2. BASE
   ========================================================================== */

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--sagra-cream);
  color: var(--sagra-dark);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6,
.font-serif,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: 'Playfair Display', serif;
}

a {
  color: var(--sagra-red);
  transition: color .15s ease;
}
a:hover {
  color: var(--sagra-red-hover);
}

/* Selection */
::selection {
  background: var(--sagra-gold);
  color: var(--sagra-dark);
}


/* ==========================================================================
   3. TIPOGRAFIA
   ========================================================================== */

.sagra-hero-title {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: var(--text-3xl);
  color: #fff;
}

.sagra-section-title {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: var(--text-2xl);
  color: var(--sagra-dark);
}

.sagra-product-name {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--sagra-dark);
}

.sagra-product-price {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--sagra-red);
}

.sagra-product-desc {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--text-sm);
  color: var(--sagra-gray);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sagra-table-number {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: var(--text-2xl);
  color: var(--sagra-dark);
}

.sagra-brand-text {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sagra-label {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: var(--text-xs);
  color: var(--sagra-gray);
}

.sagra-data {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--text-sm);
  color: var(--sagra-dark);
}

.sagra-lead {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--text-lg);
}

/* Hero title in display classes */
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: 'Playfair Display', serif;
}


/* ==========================================================================
   4. LAYOUT
   ========================================================================== */

/* Navbar */
.navbar-sagra {
  background: linear-gradient(135deg, var(--sagra-red) 0%, #5C1010 100%) !important;
  padding: .6rem 0;
  box-shadow: 0 2px 20px rgba(139, 26, 26, .2);
}

.navbar-sagra .navbar-brand {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.navbar-sagra .navbar-brand i {
  color: var(--sagra-gold);
}

/* Main content area */
main { flex: 1; }

/* Footer */
.footer-sagra {
  background: var(--sagra-dark);
  color: rgba(255, 255, 255, .5);
  font-size: .85rem;
}

.footer-sagra i {
  color: var(--sagra-gold);
}

.footer-sagra .fw-medium {
  color: rgba(255, 255, 255, .7);
}

/* Hero section */
.sagra-hero {
  background: linear-gradient(135deg, var(--sagra-red) 0%, #5C1010 50%, #2C0808 100%);
}

.sagra-hero-subtitle {
  color: rgba(255, 255, 255, .7);
}

.sagra-hero-gradient-mask {
  height: 60px;
  background: linear-gradient(to top, var(--sagra-cream), transparent);
}

.sagra-hero-btn-outline {
  border: 2px solid rgba(255, 255, 255, .2);
  color: #fff;
  border-radius: var(--radius-md);
  transition: all .15s ease;
}
.sagra-hero-btn-outline:hover {
  border-color: rgba(255, 255, 255, .4);
  color: #fff;
}

/* Floating cards above hero */
.sagra-floating-cards {
  margin-top: -30px;
  position: relative;
  z-index: 2;
}

/* CTA section gradient */
.sagra-cta-gradient {
  background: linear-gradient(135deg, var(--sagra-red), #5C1010);
  border-radius: var(--radius-lg);
}

.sagra-cta-gradient h3 {
  color: #fff;
  font-family: 'Playfair Display', serif;
}

.sagra-cta-gradient p {
  color: rgba(255, 255, 255, .5);
}

/* Section divider line */
.sagra-divider {
  border-color: var(--sagra-border);
  opacity: .5;
  flex-grow: 1;
}


/* ==========================================================================
   5. COMPONENTS
   ========================================================================== */

/* --------------------------------------------------------------------------
   5.1 Cards
   -------------------------------------------------------------------------- */

.card-sagra {
  background: var(--sagra-card-bg);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04), 0 4px 16px rgba(139, 26, 26, .06);
  transition: box-shadow .3s ease;
}

.card-sagra:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, .06), 0 12px 32px rgba(139, 26, 26, .1);
}

.card-staff {
  background: var(--sagra-card-bg);
  border: none;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04), 0 4px 12px rgba(0, 0, 0, .03);
}


/* --------------------------------------------------------------------------
   5.2 Menu Card
   -------------------------------------------------------------------------- */

.menu-card {
  background: var(--sagra-card-bg);
  border: 1px solid var(--sagra-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  height: 100%;
  cursor: pointer;
}

.menu-card:hover {
  border-color: var(--sagra-gold);
  box-shadow: 0 8px 24px rgba(139, 26, 26, .08);
  transform: translateY(-2px);
}

.menu-card .img-wrapper {
  height: 160px;
  overflow: hidden;
  background: var(--sagra-cream-alt);
  position: relative;
}

.menu-card .img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.menu-card:hover .img-wrapper img {
  transform: scale(1.06);
}

.menu-card .img-placeholder {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--sagra-cream-alt), var(--sagra-border));
  color: var(--sagra-gold);
  font-size: 2.5rem;
}

.menu-card .card-body {
  padding: 1rem;
}

.menu-card .prod-nome {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: .25rem;
}

.menu-card .prod-desc {
  font-size: .8rem;
  color: var(--sagra-gray);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-card .prod-prezzo {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--sagra-red);
}

.menu-card .allergene-icon {
  font-size: .8rem;
  color: var(--sagra-gray);
}

.menu-card .varianti-count {
  font-size: .75rem;
  color: var(--sagra-gray);
}


/* --------------------------------------------------------------------------
   5.3 Menu Navigation (search + reparto tabs + category pills)
   -------------------------------------------------------------------------- */

.menu-nav-sticky {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--sagra-cream);
  padding: .6rem 0 .4rem;
  border-bottom: 2px solid var(--sagra-border);
  margin-bottom: 2rem;
  transition: box-shadow .2s ease;
}

.menu-nav-shadow {
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
}

/* Reparto tabs */
.menu-reparto-tab {
  background: transparent;
  border: 1.5px solid var(--sagra-border);
  border-radius: 20px;
  color: var(--sagra-gray);
  font-size: .8rem;
  font-weight: 500;
  padding: .3rem 1rem;
  transition: all .15s ease;
  white-space: nowrap;
  cursor: pointer;
}

.menu-reparto-tab:hover {
  border-color: var(--sagra-gold);
  color: var(--sagra-dark);
}

.menu-reparto-tab.active {
  background: var(--sagra-red);
  border-color: var(--sagra-red);
  color: #fff;
}

/* Category pill nav */
.menu-cat-nav {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.menu-cat-nav::-webkit-scrollbar { display: none; }

.menu-cat-pill {
  background: var(--sagra-cream-alt);
  color: var(--sagra-gray);
  border-radius: 20px;
  padding: .25rem .8rem;
  border: none;
}

.menu-cat-pill:hover,
.menu-cat-pill.active {
  background: var(--sagra-gold);
  color: var(--sagra-dark);
}

/* Search group inside sticky nav */
.menu-search-group .form-control {
  font-size: .85rem;
  padding-top: .35rem;
  padding-bottom: .35rem;
}

.menu-search-group .input-group-text {
  background: transparent;
  font-size: .85rem;
}
/* --------------------------------------------------------------------------
   5.4 Buttons
   -------------------------------------------------------------------------- */

.btn-sagra {
  background: var(--sagra-red);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.btn-sagra:hover {
  background: var(--sagra-red-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 26, 26, .3);
}

.btn-sagra:active {
  transform: translateY(0);
}

.btn-sagra-outline {
  background: transparent;
  color: var(--sagra-red);
  border: 2px solid var(--sagra-red);
  border-radius: var(--radius-md);
  font-weight: 600;
  padding: .5rem 1.25rem;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.btn-sagra-outline:hover {
  background: var(--sagra-red);
  color: #fff;
  transform: translateY(-1px);
}

.btn-sagra-gold {
  background: var(--sagra-gold);
  color: var(--sagra-dark);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.btn-sagra-gold:hover {
  background: var(--sagra-gold-hover);
  color: var(--sagra-dark);
  transform: translateY(-1px);
}

.btn-staff {
  background: var(--sagra-dark);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 500;
  padding: .5rem 1.25rem;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.btn-staff:hover {
  background: #333;
  color: #fff;
  transform: translateY(-1px);
}

.btn-staff-outline {
  background: transparent;
  border: 1.5px solid var(--sagra-border);
  border-radius: 10px;
  padding: .45rem 1rem;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.btn-staff-outline:hover {
  border-color: var(--sagra-gold);
  background: var(--sagra-cream);
  transform: translateY(-1px);
}

.btn-sagra-sm {
  padding: .35rem .9rem;
  font-size: .8rem;
  border-radius: 10px;
}

/* Olive/green action button (close table, paid) */
.btn-sagra-olive {
  background: var(--sagra-olive);
  color: #fff;
  border: none;
  border-radius: 10px;
  transition: background .15s ease, transform .15s ease;
}

.btn-sagra-olive:hover {
  background: var(--sagra-olive-hover);
  color: #fff;
  transform: translateY(-1px);
}

/* Close button on dark overlay */
.btn-close-overlay {
  background: rgba(0, 0, 0, .4);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
}


/* --------------------------------------------------------------------------
   5.5 Forms
   -------------------------------------------------------------------------- */

.form-control, .form-select {
  border-radius: var(--radius-md);
  border: 1.5px solid var(--sagra-border);
  padding: .5rem 1rem;
  font-size: .9rem;
  transition: box-shadow .2s ease, border-color .2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--sagra-gold);
  box-shadow: 0 0 0 3px rgba(212, 165, 116, .25);
}

.form-control::placeholder, .form-select::placeholder {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--text-sm);
  color: var(--sagra-gray-light);
}

.form-label {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--sagra-gray);
}

.form-check-input:checked {
  background-color: var(--sagra-olive);
  border-color: var(--sagra-olive);
}

/* Allergen checkboxes in product form: grid layout */
#div_id_allergens fieldset > div {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.25rem 1rem;
}

.form-switch .form-check-input:focus {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

/* Input group for quantity */
.input-group-qty {
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.input-group-qty .btn-qty {
  border: 1.5px solid var(--sagra-border);
  background: transparent;
  padding: .25rem .6rem;
  font-size: .85rem;
  color: var(--sagra-dark);
}

.input-group-qty .btn-qty-minus {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-group-qty .btn-qty-plus {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.input-group-qty .qty-input {
  border-radius: 0;
  padding: .25rem;
  text-align: center;
  width: 50px;
  border: 1.5px solid var(--sagra-border);
  border-left: none;
  border-right: none;
}


/* --------------------------------------------------------------------------
   5.6 Badges
   -------------------------------------------------------------------------- */

.badge-sagra {
  background: var(--sagra-red);
  color: #fff;
  font-weight: 500;
  padding: .25em .7em;
  border-radius: 20px;
  font-size: .75rem;
}

.badge-reparto {
  background: var(--sagra-olive);
  color: #fff;
  font-weight: 500;
  padding: .2em .6em;
  border-radius: 20px;
  font-size: .7rem;
}

.badge-cart {
  background: var(--sagra-gold);
  color: var(--sagra-dark);
}

.badge-gold {
  background: var(--sagra-cream);
  color: var(--sagra-gray);
  font-weight: 400;
  font-size: .7rem;
  border-radius: 20px;
  padding: .3em .7em;
}

/* Order status badges */
.order-badge {
  padding: .25em .8em;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Status semantic badges */
.status-badge {
  padding: .2em .7em;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Individual status colors */
.status-nuovo {
  background: #FFF3CD;
  color: #856404;
  border: 1px solid #FFC107;
}

.status-in-prep {
  background: #D1ECF1;
  color: #0C5460;
  border: 1px solid #17A2B8;
}

.status-pronto {
  background: #D4EDDA;
  color: #155724;
  border: 1px solid #28A745;
}

.status-consegnato {
  background: #E2E3E5;
  color: #383D41;
  border: 1px solid #6C757D;
}

.status-pagato {
  background: rgba(122, 139, 91, .15);
  color: var(--sagra-olive);
  border: 1px solid var(--sagra-olive);
}

.status-libero {
  background: var(--sagra-olive);
  color: #fff;
}

.status-aperto {
  background: #D4EDDA;
  color: #155724;
}

.status-chiuso {
  background: #E2E3E5;
  color: #383D41;
}


/* --------------------------------------------------------------------------
   5.7 Staff Sidebar
   -------------------------------------------------------------------------- */

.staff-sidebar {
  background: var(--sagra-dark);
  min-height: 100vh;
  width: 16.666%;
}

.staff-sidebar .nav-link {
  color: rgba(255, 255, 255, .55);
  padding: .55rem .9rem;
  border-radius: 10px;
  margin: 0 .5rem;
  font-size: .85rem;
  transition: all .15s ease;
}

.staff-sidebar .nav-link:hover,
.staff-sidebar .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, .07);
}

.staff-sidebar .nav-link i {
  width: 1.3rem;
  color: var(--sagra-gold);
}

.staff-sidebar .sidebar-brand {
  font-family: 'Playfair Display', serif;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 1.1rem .9rem;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.staff-sidebar .sidebar-brand i {
  color: var(--sagra-gold);
}

.staff-sidebar .section-label {
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .2);
  padding: .9rem .9rem .25rem;
}

.main-content {
  min-height: 100vh;
}


/* --------------------------------------------------------------------------
   5.8 Bottom Navigation (mobile staff)
   -------------------------------------------------------------------------- */

.staff-bottom-nav {
  background: var(--sagra-dark);
  border-top: none;
  z-index: 1050;
}

.staff-bottom-nav .nav-item {
  color: var(--sagra-gray);
  font-size: .65rem;
  text-decoration: none;
  text-align: center;
  padding: .4rem 0;
  transition: color .15s ease;
  position: relative;
}

.staff-bottom-nav .nav-item i {
  display: block;
  font-size: 1.1rem;
  margin-bottom: .2rem;
}

.staff-bottom-nav .nav-item.active {
  color: var(--sagra-gold);
}

.staff-bottom-nav .nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  background: var(--sagra-gold);
}

.staff-bottom-nav .nav-item:hover {
  color: var(--sagra-gold);
}


/* --------------------------------------------------------------------------
   5.9 Table Cards (cassa dashboard)
   -------------------------------------------------------------------------- */

.table-card {
  cursor: pointer;
  border: none;
  border-radius: var(--radius-lg);
  transition: transform .2s ease, box-shadow .2s ease;
  background: var(--sagra-card-bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.table-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.table-card .table-numero {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
}

.table-card-border-active {
  border-left: 4px solid var(--sagra-red);
}

.table-card-border-free {
  border-left: 4px solid var(--sagra-olive);
}


/* --------------------------------------------------------------------------
   5.10 Order Cards (cassa detail, staff)
   -------------------------------------------------------------------------- */

.order-card {
  border: none;
  border-radius: var(--radius-md);
  background: var(--sagra-card-bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
  transition: box-shadow .15s ease;
}

.order-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

/* Order card header separator */
.order-header {
  border-bottom: 1px solid var(--sagra-border);
}


/* --------------------------------------------------------------------------
   5.12 Alerts
   -------------------------------------------------------------------------- */

.alert-sagra {
  background: var(--sagra-cream);
  border-left: 4px solid var(--sagra-gold) !important;
  border-radius: var(--radius-lg);
  border: none;
}

.alert-sagra i {
  color: var(--sagra-gold);
}


/* --------------------------------------------------------------------------
   5.13 Modal
   -------------------------------------------------------------------------- */

.modal-sagra .modal-content {
  border: none;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.modal-sagra .modal-img-wrapper {
  height: 220px;
  background: var(--sagra-cream-alt);
  position: relative;
}

.modal-sagra .modal-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* --------------------------------------------------------------------------
   5.14 Toast
   -------------------------------------------------------------------------- */

.toast-sagra {
  background: var(--sagra-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
}

.toast-sagra i {
  color: var(--sagra-olive);
}


/* --------------------------------------------------------------------------
   5.15 Tables
   -------------------------------------------------------------------------- */

.sagra-table thead {
  background: var(--sagra-cream);
}

.sagra-table th {
  padding: .75rem 1rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--sagra-gray);
  text-transform: none;
  letter-spacing: normal;
}

.sagra-table td {
  padding: .5rem 1rem;
  font-size: .9rem;
  vertical-align: middle;
}

.sagra-table tfoot {
  border-top: 2px solid var(--sagra-border);
}

.sagra-table tfoot td {
  font-weight: 700;
  padding: .75rem 1rem;
}

/* Cart table */
.cart-table thead {
  background: var(--sagra-cream);
}

.cart-table th {
  padding: .75rem 1rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--sagra-gray);
}

.cart-table td {
  padding: .75rem 1rem;
  vertical-align: middle;
}


/* --------------------------------------------------------------------------
   5.16 Varianti badges in modal
   -------------------------------------------------------------------------- */

.variant-badge {
  background: var(--sagra-cream);
  color: var(--sagra-gray);
  font-weight: 400;
  font-size: .7rem;
  border-radius: 20px;
  padding: .3em .7em;
}


/* ==========================================================================
   6. ORDER CARDS (cliente dashboard)
   ========================================================================== */

.order-history-card {
  border-bottom: 1px solid var(--sagra-border);
  padding: .75rem 1rem;
}

.order-history-card:last-child {
  border-bottom: none;
}


/* ==========================================================================
   7. ANIMATIONS
   ========================================================================== */

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

.animate-fade-up {
  animation: fadeUp .5s cubic-bezier(.22, 1, .36, 1) forwards;
  opacity: 0;
}

/* Dynamic delay classes for stagger */
.delay-1  { animation-delay: .05s; }
.delay-2  { animation-delay: .10s; }
.delay-3  { animation-delay: .15s; }
.delay-4  { animation-delay: .20s; }
.delay-5  { animation-delay: .25s; }
.delay-6  { animation-delay: .30s; }
.delay-7  { animation-delay: .35s; }
.delay-8  { animation-delay: .40s; }
.delay-9  { animation-delay: .45s; }
.delay-10 { animation-delay: .50s; }
.delay-11 { animation-delay: .55s; }
.delay-12 { animation-delay: .60s; }

/* Skeleton screen */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton-card {
  height: 280px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--sagra-cream-alt) 25%, var(--sagra-border) 50%, var(--sagra-cream-alt) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite;
}


/* ==========================================================================
   8. STAFF SPECIFIC
   ========================================================================== */

/* Table detail page */
.staff-summary-card {
  background: var(--sagra-cream);
  border-radius: 14px;
  border: none;
}

/* Force order product card */
.force-order-product {
  border: 1px solid var(--sagra-border);
  border-radius: var(--radius-md);
  padding: .75rem;
  height: 100%;
}

.force-order-product.unavailable {
  opacity: .5;
}


/* ==========================================================================
   9. REDUCED MOTION
   ========================================================================== */

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

  .animate-fade-up {
    opacity: 1;
    transform: none;
  }

  .menu-card:hover {
    transform: none;
  }

  .menu-card .img-wrapper img {
    transition: none;
  }

  .skeleton-card {
    animation: none;
    background: var(--sagra-cream-alt);
  }
}


/* ==========================================================================
   11. RESPONSIVE OVERRIDES
   ========================================================================== */

/* Mobile < 768px */
@media (max-width: 767.98px) {
  .staff-sidebar {
    min-height: auto;
  }

  .menu-card .img-wrapper {
    height: 120px;
  }

  .menu-card .img-placeholder {
    height: 120px;
    font-size: 2rem;
  }

  .menu-card .prod-nome {
    font-size: .95rem;
  }

  .menu-card .prod-prezzo {
    font-size: 1rem;
  }

  .table-card .table-numero {
    font-size: 1.4rem;
  }
}

/* Desktop ≥ 992px */
@media (min-width: 992px) {
  .main-content-offset {
    margin-left: 16.666%;
  }
}


/* ==========================================================================
   12. ACCESSIBILITY
   ========================================================================== */

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--sagra-gold);
  outline-offset: 2px;
}

/* Min touch targets */
.btn,
.nav-link,
.form-check-input,
.form-check-label,
.btn-close,
.table-card,
.menu-card,
a:not(.btn):not(.nav-link) {
  min-height: 44px;
  min-width: 44px;
}

/* Exceptions: small elements that shouldn't be 44px */
.btn-sm,
.btn-close,
.badge,
.form-check-input {
  min-height: auto;
  min-width: auto;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ==========================================================================
   13. UTILITY CLASSES
   ========================================================================== */

.sagra-total-row {
  border-top: 2px solid var(--sagra-border);
}

.sagra-separator {
  border-color: var(--sagra-border);
  opacity: .5;
}

.sagra-separator-light {
  border-color: var(--sagra-border);
  opacity: .4;
}

.sagra-separator-sm {
  border-color: var(--sagra-border);
  margin: .5rem 0;
}

.sagra-border-top {
  border-top: 1px solid var(--sagra-border);
}

.sagra-color-gold {
  color: var(--sagra-gold);
}

.sagra-color-red {
  color: var(--sagra-red);
}

.sagra-color-dark {
  color: var(--sagra-dark);
}

.sagra-color-gray {
  color: var(--sagra-gray);
}

.sagra-color-olive {
  color: var(--sagra-olive);
}

.sagra-bg-cream {
  background: var(--sagra-cream);
  color: var(--sagra-dark);
}

.sagra-bg-olive {
  background: var(--sagra-olive) !important;
}

.sagra-bg-red {
  background: var(--sagra-red);
}

.sagra-fs-xs {
  font-size: .65rem;
}

.sagra-fs-sm {
  font-size: .75rem;
}

.sagra-fs-base {
  font-size: .85rem;
}

.sagra-fs-md {
  font-size: .95rem;
}

.sagra-fs-lg {
  font-size: 1.1rem;
}

.sagra-fs-xl {
  font-size: 1.25rem;
}

.sagra-z-over {
  z-index: 1;
}

.sagra-w-sm {
  width: 60px;
}

.sagra-w-md {
  width: 90px;
}

.sagra-w-100px {
  width: 100px;
}

.sagra-max-w-600 {
  max-width: 600px;
}

.sagra-flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sagra-opacity-90 {
  opacity: .9;
}

.sagra-min-h-60vh {
  min-height: 60vh;
}

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

.sagra-z-overlay {
  z-index: 1;
}

.sagra-w-50 {
  width: 50px;
}

.sagra-fs-icon {
  font-size: 1.5rem;
}
