/* BarPilot - Modern Mobile & Desktop Responsive SaaS Stylesheet */
:root {
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Brand Colors */
  --primary: #FF7A00;
  --primary-hover: #E66D00;
  --primary-light: rgba(255, 122, 0, 0.12);
  --primary-glow: rgba(255, 122, 0, 0.25);
  
  /* Status Colors */
  --status-free: #10B981;
  --status-free-bg: rgba(16, 185, 129, 0.15);
  --status-occupied: #FF8A00;
  --status-occupied-bg: rgba(255, 138, 0, 0.15);
  --status-topay: #3B82F6;
  --status-topay-bg: rgba(59, 130, 246, 0.15);
  --status-reserved: #8B5CF6;
  --status-reserved-bg: rgba(139, 92, 246, 0.15);
  --status-alert: #EF4444;
  --status-alert-bg: rgba(239, 68, 68, 0.15);
  
  /* Transition */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;
  
  /* Light Mode Variables (default toggled via [data-theme="light"]) */
  --bg-app: #F4F6F9;
  --bg-sidebar: #0F1318;
  --bg-sidebar-text: #E5E7EB;
  --bg-sidebar-muted: #8E9BAE;
  --bg-sidebar-active: #FF7A00;
  --bg-sidebar-hover: #1A202A;
  --bg-card: #FFFFFF;
  --bg-card-secondary: #F8FAFC;
  --border-color: #E2E8F0;
  --border-card: #E5E9F0;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.06);
  --shadow-float: 0 12px 30px -4px rgba(15, 23, 42, 0.12);
  --floor-wood: #EAE6DF;
}

[data-theme="dark"] {
  --bg-app: #0B0E13;
  --bg-sidebar: #090C10;
  --bg-sidebar-text: #F3F4F6;
  --bg-sidebar-muted: #94A3B8;
  --bg-sidebar-active: #FF7A00;
  --bg-sidebar-hover: #131822;
  --bg-card: #121720;
  --bg-card-secondary: #171E2B;
  --border-color: #212B3B;
  --border-card: #1D2635;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
  --shadow-float: 0 12px 35px -4px rgba(0, 0, 0, 0.6);
  --floor-wood: #191E28;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* App Shell Layout */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar (Desktop / Tablet) */
.sidebar {
  width: 250px;
  background-color: var(--bg-sidebar);
  color: var(--bg-sidebar-text);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  flex-shrink: 0;
  z-index: 100;
  transition: transform var(--transition-normal);
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #FFFFFF;
}

.brand-title span {
  color: var(--primary);
}

.bar-switcher-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.06);
  color: #CBD5E1;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 16px;
  transition: background var(--transition-fast);
}

.bar-switcher-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.bar-switcher-btn .bar-status-dot {
  width: 7px;
  height: 7px;
  background-color: var(--status-free);
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 6px var(--status-free);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.nav-menu::-webkit-scrollbar {
  width: 4px;
}
.nav-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--bg-sidebar-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-item:hover {
  color: #FFFFFF;
  background: var(--bg-sidebar-hover);
}

.nav-item.active {
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.nav-item-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-badge-pro {
  margin-left: auto;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.nav-item.active .nav-badge-pro {
  background: #FFFFFF;
  color: var(--primary);
}

/* Zero-Flicker Session Persistence across Cache */
html.user-authenticated #splashScreen,
html.user-authenticated #storiesOverlay,
html.user-authenticated #authOverlay {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Sidebar Footer Profile & Utilities */
.sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
}

.btn-sidebar-logout {
  margin-left: auto;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #EF4444;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-sidebar-logout:hover {
  background: #EF4444;
  color: #FFFFFF;
  transform: translateY(-1px);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-role {
  font-size: 11px;
  color: var(--bg-sidebar-muted);
}

.sidebar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #CBD5E1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

.ctrl-btn-danger {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #EF4444 !important;
  border-color: rgba(239, 68, 68, 0.28) !important;
}

.ctrl-btn-danger:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  color: #FCA5A5 !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
}

.lang-switch {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 7px;
  border-radius: 4px;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--primary);
  color: #FFFFFF;
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-app);
}

/* Top Trial Notification Banner */
.trial-banner {
  background: linear-gradient(90deg, #FF7A00 0%, #FF9500 100%);
  color: #FFFFFF;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.trial-banner-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trial-cta-btn {
  background: #FFFFFF;
  color: var(--primary);
  border: none;
  border-radius: var(--radius-full);
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.trial-cta-btn:hover {
  transform: scale(1.04);
}

/* Topbar for mobile / desktop */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
}

.greeting-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.4px;
}

.greeting-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.date-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-main);
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.icon-btn:hover {
  background: var(--border-color);
}

/* Page Container */
.page-content {
  padding: 24px;
  flex: 1;
}

/* Hidden views */
.view-panel {
  display: none;
}
.view-panel.active {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

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

/* ========================================================
   DASHBOARD VIEW (Design strictly based on user's image)
   ======================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform var(--transition-fast);
}

.metric-card:hover {
  transform: translateY(-2px);
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.metric-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.metric-icon-box {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-icon-box.orange {
  background: var(--primary-light);
  color: var(--primary);
}
.metric-icon-box.blue {
  background: rgba(59, 130, 246, 0.12);
  color: #3B82F6;
}
.metric-icon-box.green {
  background: var(--status-free-bg);
  color: var(--status-free);
}
.metric-icon-box.red {
  background: var(--status-alert-bg);
  color: var(--status-alert);
}

.metric-value-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.metric-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.metric-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 2px;
}

.metric-badge.green {
  background: var(--status-free-bg);
  color: var(--status-free);
}

.metric-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  margin-top: 6px;
  display: inline-block;
  cursor: pointer;
}

/* Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.card-action {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

/* Hourly Sales Bar Chart (Pure CSS & Scalable SVG) */
/* Hourly Sales Bar Chart (Responsive & Interactive) */
.bar-chart-container {
  height: 220px;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding-top: 15px;
  position: relative;
  overflow: hidden;
}

.chart-y-axis {
  width: 40px;
  height: calc(100% - 26px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
  text-align: right;
  padding-right: 6px;
  border-right: 1px dashed var(--border-color);
}

.chart-bars-scroll {
  flex: 1;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 122, 0, 0.4) transparent;
}

.chart-bars-scroll::-webkit-scrollbar {
  height: 4px;
}

.chart-bars-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.chart-bars-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 122, 0, 0.35);
  border-radius: 4px;
}

.chart-bars-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: calc(100% - 26px);
  min-width: 100%;
  border-bottom: 1px dashed var(--border-color);
  padding: 0 4px;
  box-sizing: border-box;
  gap: 4px;
}

.bar-col {
  flex: 1;
  min-width: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  cursor: pointer;
  padding: 0 2px;
  transition: transform var(--transition-fast);
  user-select: none;
  position: relative;
}

.bar-col:hover, .bar-col.active {
  transform: translateY(-2px);
}

.bar-val-badge {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 3px;
  opacity: 0.85;
  white-space: nowrap;
}

.bar-col.active .bar-val-badge {
  color: var(--primary);
  opacity: 1;
  font-weight: 900;
}

.bar-fill {
  width: 65%;
  max-width: 24px;
  min-width: 12px;
  background: linear-gradient(180deg, #FF9500 0%, #FF6F00 100%);
  border-radius: 5px 5px 0 0;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1), filter var(--transition-fast);
  position: relative;
}

.bar-col.peak .bar-fill {
  background: linear-gradient(180deg, #FFB300 0%, #FF7A00 100%);
  box-shadow: 0 0 10px rgba(255, 179, 0, 0.35);
}

.bar-col.active .bar-fill {
  filter: brightness(1.25);
  box-shadow: 0 0 12px var(--primary-glow);
  border: 1.5px solid #FFFFFF;
}

.bar-tooltip {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: #000000;
  color: #FFFFFF;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  z-index: 10;
}

.bar-col:hover .bar-tooltip {
  opacity: 1;
}

.bar-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 6px;
  white-space: nowrap;
}

.bar-col.active .bar-label {
  color: var(--primary);
  font-weight: 900;
}

.hourly-slot-filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.btn-slot-filter {
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 99px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-slot-filter:hover {
  color: var(--text-main);
  background: var(--bg-card-secondary);
}

.btn-slot-filter.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.btn-period-pill {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-period-pill:hover {
  color: var(--text-main);
  background: var(--bg-card-secondary);
}

.btn-period-pill.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(255, 122, 0, 0.25);
}

.metric-badge.neutral {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}

.empty-state-row td {
  background: transparent !important;
}

.chart-scroll-hint {
  display: none;
  font-size: 10.5px;
  color: var(--text-muted);
  text-align: center;
  padding-top: 6px;
}

@media (max-width: 768px) {
  .chart-bars-wrap.slot-all {
    min-width: 580px; /* Ensures all 15 bars have plenty of breathing room and never overlap on mobile */
  }

  .chart-scroll-hint.show-hint {
    display: block;
  }

  .bar-label {
    font-size: 10px;
  }
}

/* Category Sales Donut */
.donut-chart-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 220px;
}

.donut-svg-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.donut-svg {
  transform: rotate(-90deg);
}

.donut-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.donut-total {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.donut-sub {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.legend-left {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
  font-weight: 500;
}

.legend-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-percent {
  font-weight: 700;
  color: var(--text-muted);
}

/* Bottom Tables Grid */
.bottom-tables-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.custom-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-color);
}

.custom-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.custom-table tr:last-child td {
  border-bottom: none;
}

.table-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
}

.badge-prep {
  background: var(--status-occupied-bg);
  color: var(--status-occupied);
}
.badge-ready {
  background: var(--status-topay-bg);
  color: var(--status-topay);
}
.badge-served {
  background: var(--status-free-bg);
  color: var(--status-free);
}
.badge-alert {
  background: var(--status-alert-bg);
  color: var(--status-alert);
}
.badge-ok {
  background: var(--status-free-bg);
  color: var(--status-free);
}

.product-row-flex {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-thumb-sm {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

/* ========================================================
   ORDER TAKING VIEW (Mobile-first "Nuova comanda")
   ======================================================== */
.order-screen-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  height: calc(100vh - 140px);
}

.order-catalog-pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.order-top-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.table-picker-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.select-table-input {
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  outline: none;
}

.btn-icon-plus {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 2px 6px var(--primary-glow);
}

.category-filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.category-filter-pills::-webkit-scrollbar {
  height: 4px;
}

.cat-pill {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: var(--bg-card-secondary);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.cat-pill:hover {
  color: var(--text-main);
}

.cat-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.products-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
}

.product-order-card {
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
  cursor: pointer;
  position: relative;
}

.product-order-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.product-card-img {
  width: 100%;
  height: 105px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.product-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 6px;
}

.product-card-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
}

.add-to-cart-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.add-to-cart-btn:hover {
  transform: scale(1.1);
}

/* Order Cart Sheet (Right Pane / Bottom Sheet) */
.order-cart-pane {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
  padding-right: 4px;
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  background: var(--bg-card-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.cart-item-details {
  display: flex;
  flex-direction: column;
}

.cart-item-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.cart-item-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.cart-item-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stepper-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: var(--border-color);
  border: none;
  color: var(--text-main);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stepper-qty {
  font-size: 13px;
  font-weight: 700;
  min-width: 16px;
  text-align: center;
}

.cart-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  margin-top: auto;
}

.cart-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cart-total-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.cart-total-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
}

.cart-actions-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
}

.btn-secondary {
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

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

.btn-period-tab {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-period-tab:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.04);
}

.btn-period-tab.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: var(--primary);
  border: none;
  color: #FFFFFF;
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* ========================================================
   PLAN DE SALLE / FLOOR PLAN
   ======================================================== */
.floor-plan-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.floor-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.floor-legend {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 12px;
}

.legend-badge {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.legend-dot.free { background: var(--status-free); }
.legend-dot.occupied { background: var(--status-occupied); }
.legend-dot.topay { background: var(--status-topay); }
.legend-dot.reserved { background: var(--status-reserved); }

.floor-room-canvas {
  background: var(--floor-wood);
  border-radius: var(--radius-xl);
  padding: 30px;
  min-height: 480px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px;
  align-content: start;
  border: 2px dashed rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table-node {
  background: var(--bg-card);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 120px;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
}

.table-node:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-float);
}

.table-node.status-free {
  border-color: var(--status-free);
  background: var(--status-free-bg);
}

.table-node.status-occupied {
  border-color: var(--status-occupied);
  background: var(--status-occupied-bg);
}

.table-node.status-topay {
  border-color: var(--status-topay);
  background: var(--status-topay-bg);
}

.table-node.status-reserved {
  border-color: var(--status-reserved);
  background: var(--status-reserved-bg);
}

.table-node-number {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.table-node-info {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.table-node-amount {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 4px;
}

.table-node-alert {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--status-alert);
  color: #FFFFFF;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

/* Table node delete button (Solo Proprietario) */
.table-node-delete-btn {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #EF4444;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 5;
  padding: 0;
  line-height: 1;
}

.table-node-delete-btn:hover {
  background: #EF4444;
  color: #FFFFFF;
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
}

/* ========================================================
   KDS / BARMAN PREPARATION VIEW
   ======================================================== */
.kds-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.kds-tickets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.kds-ticket {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast);
}

.kds-ticket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.kds-ticket-num {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
}

.kds-ticket-timer {
  font-size: 11px;
  font-weight: 700;
  background: var(--status-alert-bg);
  color: var(--status-alert);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.kds-ticket-table {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.kds-ticket-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  margin-bottom: 16px;
}

.kds-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.kds-item-qty {
  color: var(--primary);
  font-weight: 800;
  margin-right: 6px;
}

.kds-btn-action {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.kds-btn-start {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.kds-btn-start:hover {
  background: var(--primary);
  color: #FFFFFF;
}

.kds-btn-ready {
  background: var(--status-topay);
  color: #FFFFFF;
}

.kds-btn-served {
  background: var(--status-free);
  color: #FFFFFF;
}

/* ========================================================
   SUBSCRIPTION & 14-DAY TRIAL VIEW
   ======================================================== */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 24px 0;
}

.plan-card {
  background: var(--bg-card);
  border: 2px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.plan-card.popular {
  border-color: var(--primary);
  box-shadow: 0 8px 30px var(--primary-glow);
}

.plan-popular-pill {
  position: absolute;
  top: -12px;
  right: 24px;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.plan-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.plan-desc {
  font-size: 13px;
  color: var(--text-muted);
  min-height: 40px;
  margin-bottom: 18px;
}

.plan-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 24px;
}

.plan-price {
  font-size: 38px;
  font-weight: 900;
  color: var(--text-main);
}

.plan-period {
  font-size: 13px;
  color: var(--text-muted);
}

.plan-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  flex: 1;
}

.plan-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-main);
}

.feature-check-icon {
  color: var(--status-free);
  font-weight: 900;
}

/* Revenue simulator */
.simulator-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
}

.slider-ctrl {
  width: 100%;
  accent-color: var(--primary);
  height: 6px;
  border-radius: 3px;
  cursor: pointer;
  margin: 14px 0;
}

/* Modal Dialogs */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

#googlePickerModal, #facebookPickerModal, #logoutConfirmModal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1000001 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(8px) !important;
  padding: 16px;
}

#googlePickerModal.active, #facebookPickerModal.active, #logoutConfirmModal.active {
  display: flex !important;
}

.google-acc-item:hover {
  background: var(--bg-hover) !important;
  border-color: var(--primary) !important;
  transform: translateY(-1px);
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 28px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-float);
  animation: modalPop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.form-input {
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  border-color: var(--primary);
}

/* ========================================================
   MOBILE / RESPONSIVE BREAKPOINTS
   ======================================================== */
@media (max-width: 1024px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .charts-grid {
    grid-template-columns: 1fr;
  }
  .bottom-tables-grid {
    grid-template-columns: 1fr;
  }
  .order-screen-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .plans-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .topbar {
    padding: 12px 16px;
    gap: 10px;
  }
  .date-pill {
    padding: 5px 10px;
    font-size: 11.5px;
    gap: 6px;
  }
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    z-index: 110;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
  }
  .sidebar-close-btn {
    display: block !important;
  }
  .menu-toggle-btn {
    display: flex;
  }
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .page-content {
    padding: 16px;
  }
  .floor-room-canvas {
    padding: 16px;
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================================
   SIDEBAR DRAWER & RESPONSIVE CONTROLS
   ======================================================== */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sidebar-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (max-width: 1024px) {
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    width: 285px !important;
    max-width: 85vw !important;
    transform: translateX(-100%);
    z-index: 9999 !important;
    box-shadow: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  .sidebar.mobile-open,
  .sidebar.open {
    transform: translateX(0) !important;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.8) !important;
  }

  .sidebar.sidebar-closed,
  .sidebar.closed {
    transform: translateX(-100%) !important;
  }

  /* ON MOBILE: Show close "X" button in sidebar header */
  .sidebar-close-btn {
    display: flex !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: rgba(255, 122, 0, 0.2) !important;
    border: 1.5px solid var(--primary) !important;
    color: #FFFFFF !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    cursor: pointer !important;
    margin-left: auto !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all var(--transition-fast) !important;
    flex-shrink: 0 !important;
    z-index: 10001 !important;
  }

  .sidebar-close-btn:hover {
    background: var(--primary) !important;
    color: #FFFFFF !important;
    transform: scale(1.12) !important;
    box-shadow: 0 0 14px var(--primary-glow) !important;
  }

  .menu-toggle-btn {
    display: flex !important;
  }
}

@media (min-width: 1025px) {
  /* ON DESKTOP: Sidebar is ALWAYS fixed and visible - never closable */
  .sidebar,
  .sidebar.mobile-open,
  .sidebar.open,
  .sidebar.sidebar-closed,
  .sidebar.closed {
    display: flex !important;
    transform: none !important;
    margin-left: 0 !important;
    position: static !important;
    height: 100vh !important;
    width: 285px !important;
    min-width: 285px !important;
    box-shadow: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* ON DESKTOP: Remove close "X" button STRICTLY on desktop */
  .sidebar-close-btn {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
  }

  /* ON DESKTOP: Hide mobile hamburger button and backdrop */
  .menu-toggle-btn {
    display: none !important;
  }

  .sidebar-backdrop {
    display: none !important;
  }
}

/* Base fallback: button is hidden by default unless mobile media query matches */
.sidebar-close-btn {
  display: none;
}

/* ========================================================
   1. ANIMATED SPLASH SCREEN (3 SECONDS)
   ======================================================== */
.splash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #1E1711 0%, #0B0E13 80%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
  overflow: hidden;
}

.splash-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
}

.splash-logo-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.splash-glow-ring {
  position: absolute;
  inset: -15px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 122, 0, 0.6);
  animation: spinRing 8s linear infinite;
}

.splash-glow-ring::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 122, 0, 0.3);
}

@keyframes spinRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.splash-logo-img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 20px;
  animation: logoPulse 2s ease-in-out infinite;
  filter: drop-shadow(0 0 25px rgba(255, 122, 0, 0.7));
}

@keyframes logoPulse {
  0% { transform: scale(0.94); filter: drop-shadow(0 0 15px rgba(255, 122, 0, 0.5)); }
  50% { transform: scale(1.06); filter: drop-shadow(0 0 35px rgba(255, 122, 0, 0.95)); }
  100% { transform: scale(0.94); filter: drop-shadow(0 0 15px rgba(255, 122, 0, 0.5)); }
}

.splash-title {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  animation: splashFadeUp 0.8s ease forwards;
}

.splash-title span {
  color: var(--primary);
}

.splash-tagline {
  font-size: 14px;
  color: #94A3B8;
  font-weight: 500;
  max-width: 320px;
  animation: splashFadeUp 1s ease forwards;
}

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

/* 3-Second Progress Bar */
.splash-loader-bar {
  width: 220px;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  margin-top: 36px;
  overflow: hidden;
  position: relative;
}

.splash-loader-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #FF7A00, #FFA726);
  border-radius: var(--radius-full);
  box-shadow: 0 0 12px var(--primary);
  animation: splash3s 3s linear forwards;
}

@keyframes splash3s {
  0% { width: 0%; }
  100% { width: 100%; }
}

.splash-skip-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 10;
}

.splash-skip-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.04);
}

/* ========================================================
   2. INSTAGRAM STORIES ONBOARDING (5 ANIMATIONS)
   ======================================================== */
.stories-overlay {
  position: fixed;
  inset: 0;
  background: #06080B;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  transition: opacity 0.4s ease, visibility 0.4s;
}

.stories-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.stories-viewport {
  width: 100%;
  max-width: 440px;
  height: 94vh;
  max-height: 850px;
  background: #11151D;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 122, 0, 0.15);
}

/* 5 Segments Story Progress Bar */
.story-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 14px 16px 8px;
  z-index: 20;
  background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.story-progress-segments {
  display: flex;
  gap: 4px;
  width: 100%;
}

.story-segment-bar {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.story-segment-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: #FF7A00;
  transition: width 0.08s linear;
}

.story-top-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.story-brand-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #FFFFFF;
}

.story-brand-pill img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.story-brand-pill span {
  font-size: 13px;
  font-weight: 700;
}

.story-skip-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #FFFFFF;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

/* Touch tap areas for Prev / Next story */
.story-tap-area {
  position: absolute;
  top: 60px;
  bottom: 100px;
  z-index: 10;
  cursor: pointer;
}
.story-tap-left {
  left: 0;
  width: 32%;
}
.story-tap-right {
  right: 0;
  width: 68%;
}

/* Story Track & Slides */
.stories-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.story-slide {
  min-width: 100%;
  width: 100%;
  flex-shrink: 0;
  flex-grow: 0;
  height: 100%;
  padding: 80px 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  position: relative;
  color: #FFFFFF;
  overflow: hidden;
}

/* Story Visual Graphic Card */
.story-graphic-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 10px 0;
}

.story-graphic-box {
  width: 100%;
  max-width: 320px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  position: relative;
}

/* Story 1 Animation (Orders Ticket) */
.story-anim-ticket {
  background: #171E2B;
  border: 1px solid #FF7A00;
  border-radius: 14px;
  padding: 14px;
  animation: floatCard 3s ease-in-out infinite;
}

@keyframes floatCard {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

/* Story 2 Animation (Floor tables pulse) */
.story-anim-floor {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.story-floor-item {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  border: 1.5px solid transparent;
}
.story-floor-item.active1 { border-color: #10B981; animation: pulseGreen 2s infinite; }
.story-floor-item.active2 { border-color: #FF8A00; animation: pulseOrange 2s infinite 0.5s; }
.story-floor-item.active3 { border-color: #3B82F6; }
.story-floor-item.active4 { border-color: #8B5CF6; }

@keyframes pulseGreen {
  0%, 100% { box-shadow: 0 0 0 rgba(16, 185, 129, 0); }
  50% { box-shadow: 0 0 14px rgba(16, 185, 129, 0.4); }
}
@keyframes pulseOrange {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 138, 0, 0); }
  50% { box-shadow: 0 0 14px rgba(255, 138, 0, 0.4); }
}

/* Story 3 Animation (KDS countdown) */
.story-anim-kds {
  background: #151A24;
  border-radius: 14px;
  border-left: 4px solid #FF7A00;
  padding: 14px;
}

/* Story 4 Animation (Stock decrement) */
.story-anim-stock {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stock-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
}

/* Story 5 Animation (AI chat card) */
.story-anim-ai {
  background: linear-gradient(135deg, rgba(255,122,0,0.15) 0%, rgba(20,24,33,0.9) 100%);
  border: 1px solid rgba(255,122,0,0.3);
  border-radius: 16px;
  padding: 16px;
}

/* Story Text & CTA */
.story-text-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 15;
}

.story-badge-pill {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.story-title {
  font-size: 24px;
  font-weight: 900;
  line-height: 1.25;
  color: #FFFFFF;
}

.story-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #94A3B8;
}

.story-highlight-pill {
  align-self: flex-start;
  background: rgba(255, 122, 0, 0.15);
  border: 1px solid rgba(255, 122, 0, 0.4);
  color: #FFB366;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-top: 4px;
}

.story-action-bottom {
  margin-top: 18px;
  position: relative;
  z-index: 30;
}

.btn-story-next {
  width: 100%;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 18px var(--primary-glow);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.btn-story-next:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* ========================================================
   3. AUTHENTICATION & REGISTRATION SCREEN (GOOGLE, FB, ETC)
   ======================================================== */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-app);
  z-index: 99980;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  transition: opacity 0.4s ease, visibility 0.4s;
}

.auth-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-float);
  margin: auto;
  position: relative;
}

.auth-top-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo-badge {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 12px var(--primary-glow));
}

.auth-trial-pill {
  background: rgba(255, 122, 0, 0.12);
  border: 1px solid var(--primary);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.auth-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.4px;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 360px;
  margin-top: 4px;
}

/* Auth Tabs (Login vs Register) */
.auth-tab-switch {
  display: flex;
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 22px;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  padding: 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-tab-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* Social Buttons (Google & Facebook) */
.social-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-social-google {
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-social-google:hover {
  background: var(--border-color);
  transform: translateY(-1px);
}

.btn-social-facebook {
  background: #1877F2;
  border: 1px solid #1877F2;
  color: #FFFFFF;
}

.btn-social-facebook:hover {
  background: #1564CC;
  transform: translateY(-1px);
}

/* Divider with text */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 18px 0;
  color: var(--text-subtle);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.auth-divider span {
  padding: 0 12px;
}

/* Credential Mode Switcher (Password vs PIN) */
.cred-mode-switch {
  display: flex;
  background: var(--bg-card-secondary, #1F2937);
  border: 1px solid var(--border-color, #374151);
  border-radius: var(--radius-md, 10px);
  padding: 3px;
  gap: 4px;
  margin: 4px 0 14px;
}

.cred-mode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: var(--text-muted, #9CA3AF);
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cred-mode-btn:hover {
  color: #FFFFFF;
}

.cred-mode-btn.active {
  background: var(--primary, #FF7A00);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(255, 122, 0, 0.35);
}

/* Auth Error Alert */
.auth-error-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #EF4444;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  margin: 14px 0 16px;
  animation: shakeAlert 0.35s ease-in-out;
}

.auth-error-alert .auth-error-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.auth-error-alert .auth-error-text {
  color: #EF4444;
  flex: 1;
}

@keyframes shakeAlert {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.demo-account-box {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-color);
  text-align: center;
}

.btn-demo-quick {
  background: rgba(255, 122, 0, 0.1);
  border: 1px dashed var(--primary);
  color: var(--primary);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 8px;
}

.btn-demo-quick:hover {
  background: var(--primary);
  color: #FFFFFF;
}

/* ========================================================
   SETTINGS EXPANDED DASHBOARD
   ======================================================== */
.settings-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 960px;
}

.settings-tabs-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}

.settings-tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.settings-tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-card-secondary);
}

.settings-tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.settings-pane {
  display: none;
  animation: fadeIn 0.2s ease-in-out;
}

.settings-pane.active {
  display: block;
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

.settings-card-header {
  margin-bottom: 20px;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 12px;
}

.settings-card-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
}

.settings-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.settings-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .settings-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Switch Row */
.settings-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
  gap: 16px;
}

.settings-switch-row:last-child {
  border-bottom: none;
}

.switch-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.switch-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Toggle Switch Control */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-color);
  transition: .3s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

input:checked + .toggle-slider {
  background-color: var(--primary);
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* QR Code Preview Box */
.qr-preview-box {
  background: var(--bg-card-secondary);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.qr-graphic {
  width: 140px;
  height: 140px;
  background: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 10px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-graphic svg {
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   STAFF ROLES & RAPID PIN ACCESS SYSTEM
   ========================================================================== */
.btn-sidebar-switch-pin {
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-md);
  padding: 6px 8px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-sidebar-switch-pin:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  transform: scale(1.05);
}

.staff-pin-modal-box {
  max-width: 440px;
  width: 94%;
  padding: 24px;
  border-radius: 24px;
  text-align: center;
}

.staff-pin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  text-align: left;
}

.staff-pin-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.staff-pin-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

/* Staff Horizontal Selector Pills */
.staff-pills-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  margin-bottom: 12px;
  scrollbar-width: thin;
}

.staff-pill-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 5px 12px 5px 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.staff-pill-chip:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.staff-pill-chip.active {
  background: rgba(255, 122, 0, 0.12);
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(255, 122, 0, 0.2);
}

.staff-pill-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

.staff-pill-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.staff-pill-role {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 700;
}

/* Selected Active Card */
.staff-pin-active-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  text-align: left;
  margin-bottom: 16px;
}

.staff-pin-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.staff-pin-active-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.staff-pin-active-role {
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
}

.staff-pin-hint-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10B981;
}

/* 4-Dots Display */
.pin-dots-wrap {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 16px 0 12px;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pin-dot.filled {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(255, 122, 0, 0.5);
  transform: scale(1.15);
}

.pin-error-text {
  font-size: 12px;
  font-weight: 700;
  color: #EF4444;
  margin-bottom: 12px;
  animation: shakeAlert 0.35s ease-in-out;
}

/* Touch Numpad Grid */
.numpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 280px;
  margin: 0 auto 12px;
}

.numpad-key {
  height: 52px;
  border-radius: 14px;
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
  user-select: none;
}

.numpad-key:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.numpad-key:active {
  transform: scale(0.92);
}

.numpad-key.numpad-action {
  font-size: 16px;
  color: var(--text-muted);
}

.staff-pin-footer-info {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Role Badges */
.badge-role-owner {
  background: rgba(139, 92, 246, 0.15);
  color: #A78BFA;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.badge-role-manager {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.badge-role-waiter {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-role-barman {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-role-cashier {
  background: rgba(236, 72, 153, 0.15);
  color: #F472B6;
  border: 1px solid rgba(236, 72, 153, 0.35);
}

/* ==========================================================================
   STYLISH WELCOME ONBOARDING EMAIL MODAL & AVATAR PICKER
   ========================================================================== */
.email-preview-modal-box {
  max-width: 580px;
  width: 94%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.email-envelope-header {
  background: var(--bg-card-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 18px;
}

.email-envelope-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.email-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.email-meta-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.email-meta-item {
  display: flex;
  gap: 8px;
  font-size: 12px;
}

.email-meta-label {
  color: var(--text-muted);
  width: 55px;
  font-weight: 600;
}

.email-meta-value {
  color: var(--text-main);
  word-break: break-all;
}

.email-body-scroll-container {
  overflow-y: auto;
  padding: 16px;
  flex: 1;
}

.email-card-paper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 22px;
}

.email-brand-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 18px;
}

.email-brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
}

.email-brand-name {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.email-brand-name span {
  color: var(--primary);
}

.email-brand-tagline {
  font-size: 11px;
  color: var(--text-muted);
}

.email-role-badge {
  background: rgba(255, 122, 0, 0.12);
  color: var(--primary);
  border: 1px solid rgba(255, 122, 0, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
}

.email-content-block {
  margin-bottom: 18px;
}

.email-greeting-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.email-greeting-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.email-credentials-box {
  background: linear-gradient(135deg, rgba(255, 122, 0, 0.12) 0%, rgba(255, 122, 0, 0.04) 100%);
  border: 1px solid rgba(255, 122, 0, 0.35);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.email-cred-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.email-cred-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255, 122, 0, 0.2);
}

.email-cred-row:last-of-type {
  border-bottom: none;
}

.email-cred-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.email-cred-code {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  background: var(--bg-card);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.email-pin-display-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.email-pin-big {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 6px;
  color: var(--primary);
  background: var(--bg-card);
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 122, 0, 0.3);
}

.email-pin-tag {
  font-size: 10px;
  color: var(--text-muted);
}

.email-cta-btn {
  display: inline-block;
  background: var(--primary);
  color: #FFFFFF !important;
  font-size: 14px;
  font-weight: 800;
  padding: 12px 28px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(255, 122, 0, 0.4);
  transition: transform 0.2s ease;
}

.email-cta-btn:hover {
  transform: translateY(-1px);
}

.email-avatar-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 20px;
  gap: 12px;
}

.email-avatar-img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.btn-email-change-avatar {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.btn-email-change-avatar:hover {
  background: rgba(255, 122, 0, 0.1);
}

.email-steps-guide {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.email-step-item {
  text-align: center;
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 8px;
}

.email-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px auto;
}

.email-footer-brand {
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
  text-align: center;
}

.email-actions-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-card-secondary);
  border-top: 1px solid var(--border-color);
}

/* Avatar Presets Grid */
.avatar-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.avatar-preset-item {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s ease;
  margin: 0 auto;
}

.avatar-preset-item:hover {
  transform: scale(1.06);
}

.avatar-preset-item.selected {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(255, 122, 0, 0.5);
  transform: scale(1.08);
}

@media (max-width: 640px) {
  .email-steps-guide {
    grid-template-columns: 1fr;
  }
  .email-avatar-section {
    flex-direction: column;
    text-align: center;
  }
  .email-actions-footer {
    flex-wrap: wrap;
  }
  .avatar-preset-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}





/* Product Photo Presets and Allergen Pills */
.product-preset-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.product-preset-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.product-preset-thumb:hover {
  transform: scale(1.08);
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(255, 122, 0, 0.3);
}

.product-preset-thumb.selected {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(255, 122, 0, 0.5);
  transform: scale(1.05);
}

.allergen-pill-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 11.5px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.allergen-pill-checkbox input {
  display: none;
}

.allergen-pill-checkbox.active {
  background: rgba(255, 122, 0, 0.15);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
}

/* ========================================================
   SINGLE UNIQUE SUBSCRIPTION OFFER (59€) & CHECKOUT
   ======================================================== */
.single-plan-hero {
  max-width: 880px;
  margin: 10px auto 30px auto;
  background: var(--bg-card);
  border: 2px solid var(--primary);
  border-radius: var(--radius-xl);
  padding: 38px 32px 32px 32px;
  box-shadow: 0 16px 45px var(--primary-glow);
  position: relative;
}

.single-plan-badge-pill {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 5px 20px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px var(--primary-glow);
  white-space: nowrap;
}

.single-plan-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 24px;
  margin: 26px 0 32px 0;
  padding: 24px 26px;
  background: var(--bg-card-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

@media (max-width: 700px) {
  .single-plan-features-grid {
    grid-template-columns: 1fr;
    padding: 18px 16px;
  }
}

.single-plan-feature-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-main);
}

.single-plan-check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 1px;
  box-shadow: 0 2px 6px var(--primary-glow);
}

.btn-subscribe-hero {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  display: block;
  padding: 16px 28px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.3px;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 25px var(--primary-glow);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.btn-subscribe-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--primary-glow);
}

/* ========================================================
   Google Play Pay & In-App Purchase Styles
   ======================================================== */
.btn-gplay-subscribe {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(135deg, #0b1928 0%, #15293d 100%);
  color: #FFFFFF;
  border: 1.5px solid rgba(0, 210, 255, 0.45);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 210, 255, 0.2);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.btn-gplay-subscribe:hover {
  transform: translateY(-2px);
  border-color: #00D2FF;
  box-shadow: 0 12px 30px rgba(0, 210, 255, 0.35);
}

.btn-gplay-fast-checkout {
  width: 100%;
  background: #0b1928;
  color: #FFFFFF;
  border: 1.5px solid rgba(0, 210, 255, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-gplay-fast-checkout:hover {
  background: #112235;
  border-color: #00D2FF;
  transform: translateY(-1px);
}

.gplay-logo-wrap {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#googlePlayModal {
  z-index: 999999;
}

.gplay-sheet-box {
  max-width: 460px;
  width: 92%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: gplaySheetUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gplaySheetUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.gplay-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.gplay-account-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card-secondary);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  font-size: 11px;
}

.gplay-acc-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #00D2FF;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 10px;
}

.gplay-acc-email {
  color: var(--text-muted);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gplay-app-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.gplay-app-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.gplay-price-card {
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.gplay-trial-tag {
  background: rgba(0, 230, 118, 0.15);
  color: #00E676;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
}

.gplay-timeline {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gplay-timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.gplay-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00E676;
  margin-top: 5px;
  flex-shrink: 0;
}

.gplay-dot-future {
  background: #00D2FF;
}

.gplay-method-row {
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  cursor: pointer;
}

.gplay-method-badge {
  background: #1a73e8;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gplay-legal-text {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 4px;
}

.btn-gplay-confirm {
  width: 100%;
  background: #01875f;
  color: #FFFFFF;
  border: none;
  border-radius: 24px;
  padding: 14px;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(1, 135, 95, 0.4);
  transition: all var(--transition-fast);
}

.btn-gplay-confirm:hover {
  background: #017250;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(1, 135, 95, 0.5);
}

/* Dashboard Lock Banner */
.dashboard-sub-lock {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(245, 158, 11, 0.12) 100%);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}



/* ========================================================
   Non-closable Mandatory Checkout Modal
   ======================================================== */
#subscriptionCheckoutModal[data-mandatory="true"] .modal-close-icon-btn,
#subscriptionCheckoutModal[data-mandatory="true"] #btnCheckoutCancel,
#googlePlayModal[data-mandatory="true"] .modal-close-icon-btn,
#googlePlayModal[data-mandatory="true"] .btn-secondary {
  display: none !important;
}

#subscriptionCheckoutModal[data-mandatory="true"] #btnConfirmCheckout {
  flex: 1 1 100% !important;
  width: 100% !important;
}

.modal-shake {
  animation: shakeAlert 0.35s ease-in-out !important;
}


/* Custom Date Range Selector & Chips in Reports View */
.btn-range-chip {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 99px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-range-chip:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.btn-range-chip.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* Interactive Calendar Table for Reports Range Selection */
.reports-calendar-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.reports-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.reports-calendar-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
  text-transform: capitalize;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cal-nav-btn {
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  font-size: 13px;
  transition: all var(--transition-fast);
}

.cal-nav-btn:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  color: var(--primary);
}

.reports-calendar-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 2px 3px;
  text-align: center;
  table-layout: fixed;
}

.reports-calendar-table th {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 6px 0;
  letter-spacing: 0.5px;
}

.reports-calendar-table th.weekend-header {
  color: #f59e0b;
}

.reports-calendar-cell {
  height: 34px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  vertical-align: middle;
  position: relative;
}

.reports-calendar-cell:hover:not(.empty):not(.disabled) {
  background: rgba(255, 107, 0, 0.22);
  color: #FFFFFF;
}

.reports-calendar-cell.empty {
  cursor: default;
  opacity: 0.15;
}

.reports-calendar-cell.today-cell {
  border: 1.5px solid var(--primary);
  color: var(--primary);
  font-weight: 800;
}

.reports-calendar-cell.range-start {
  background: var(--primary) !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.reports-calendar-cell.range-end {
  background: var(--primary) !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.reports-calendar-cell.range-single {
  border-radius: 8px !important;
}

.reports-calendar-cell.in-range {
  background: rgba(255, 107, 0, 0.20) !important;
  color: #FFA500 !important;
  border-radius: 0;
  font-weight: 700;
}

.cal-badge-pill {
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  margin-left: 3px;
  vertical-align: middle;
}

.calendar-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
  flex-wrap: wrap;
  gap: 6px;
}

.cal-date-input-it {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  width: 130px;
  text-align: center;
  font-family: monospace, monospace;
  letter-spacing: 0.5px;
  transition: all var(--transition-fast);
}

.cal-date-input-it:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Auth Screen Language Switcher */
.auth-lang-picker {
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.auth-lang-btn {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.auth-lang-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.auth-lang-btn.active {
  background: var(--primary) !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 6px var(--primary-glow);
}

/* Password Eye Toggle & Rules Box */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrap .form-input {
  width: 100%;
  padding-right: 44px;
}

.btn-toggle-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border-radius: 6px;
  transition: all var(--transition-fast);
  line-height: 1;
}

.btn-toggle-eye:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.password-rules-box {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 11.5px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: all var(--transition-fast);
}

.pwd-rule-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: #EF4444; /* Initial red */
  transition: color 0.15s ease, transform 0.15s ease;
}

.pwd-rule-item .rule-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 9.5px;
  font-weight: 900;
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
  transition: all 0.15s ease;
}

.pwd-rule-item.valid {
  color: #10B981 !important; /* Instant Green */
}

.pwd-rule-item.valid .rule-icon {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #10B981 !important;
}

/* Checkout Payment Method Switcher (Carta, Stripe, Google) */
.checkout-method-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.checkout-tab-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-main);
  text-align: center;
}

.checkout-tab-btn:hover {
  background: var(--bg-card-secondary);
  border-color: rgba(255, 255, 255, 0.2);
}

.checkout-tab-btn.active {
  background: rgba(255, 107, 0, 0.08);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.checkout-pane {
  display: none;
  animation: fadeIn 0.2s ease-in-out;
}

.checkout-pane.active {
  display: block;
}



/* ========================================================
   Pixel-Perfect Native Pro Checkout (matching uploaded design)
   ======================================================== */
.checkout-pro-box {
  background: #FFFFFF !important;
  color: #111827 !important;
  border-radius: 28px !important;
  max-width: 440px !important;
  width: 94% !important;
  max-height: 94vh !important;
  overflow-y: auto !important;
  padding: 22px 20px 24px !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.45) !important;
  border: 1px solid #E5E7EB !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  box-sizing: border-box !important;
}

.checkout-pro-box::-webkit-scrollbar {
  width: 6px;
}
.checkout-pro-box::-webkit-scrollbar-thumb {
  background: #E5E7EB;
  border-radius: 4px;
}

.checkout-pro-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.checkout-pro-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 19px;
  color: #111827;
  letter-spacing: -0.4px;
}

.checkout-pro-logo span {
  color: #FF7A00;
}

.checkout-pro-close {
  background: transparent;
  border: none;
  font-size: 20px;
  color: #9CA3AF;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 50%;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkout-pro-close:hover {
  color: #111827;
  background: #F3F4F6;
}

.checkout-pro-title {
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.5px;
  margin: 0 0 3px 0;
  line-height: 1.2;
}

.checkout-pro-subtitle {
  font-size: 14px;
  color: #6B7280;
  font-weight: 500;
  margin: 0 0 16px 0;
}

.checkout-pro-bar-card {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.checkout-pro-bar-img {
  width: 62px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.06);
}

.checkout-pro-bar-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 6px;
}

.checkout-pro-pill {
  background: #FF7A00;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: none;
}

.checkout-pro-bar-address {
  font-size: 11.5px;
  color: #6B7280;
  margin-top: 2px;
  display: block;
}

.checkout-pro-change-plan {
  color: #FF7A00;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.checkout-pro-change-plan:hover {
  text-decoration: underline;
}

.btn-gpay-pill-black {
  width: 100%;
  height: 48px;
  background: #000000;
  border-radius: 8px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  margin: 12px 0 16px;
  padding: 0;
  overflow: hidden;
}

.btn-gpay-pill-black:hover {
  background: #111111;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  opacity: 0.95;
}

.btn-gpay-pill-black:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-gpay-img {
  height: 100%;
  max-height: 48px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  pointer-events: none;
}

.gpay-subtext {
  display: none;
}

.checkout-pro-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 0 0 18px;
  color: #6B7280;
  font-size: 13px;
  font-weight: 500;
}

.checkout-pro-divider::before,
.checkout-pro-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #E5E7EB;
}

.checkout-pro-divider span {
  padding: 0 12px;
  font-size: 13px;
  color: #6B7280;
  font-size: 11.5px;
  color: #9CA3AF;
  font-weight: 500;
}

/* Payment Methods Accordion List */
.checkout-pro-methods-wrap {
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  overflow: hidden;
  background: #FFFFFF;
  margin-bottom: 16px;
}

.checkout-pro-method-row {
  border-bottom: 1px solid #F3F4F6;
}

.checkout-pro-method-row:last-child {
  border-bottom: none;
}

.checkout-pro-method-header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.checkout-pro-method-header:hover {
  background: #F9FAFB;
}

.pro-radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #D1D5DB;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.checkout-pro-method-row.active .pro-radio-dot {
  border-color: #FF7A00;
}

.pro-radio-inner {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #FF7A00;
  display: none;
}

.checkout-pro-method-row.active .pro-radio-inner {
  display: block;
}

.pro-method-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  flex-shrink: 0;
}

.pro-method-title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  flex: 1;
}

.pro-badges-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pro-badge-card {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
}

/* Accordion Bodies */
.checkout-pro-method-body {
  display: none;
  padding: 0 14px 14px 14px;
  animation: fadeIn 0.2s ease;
}

.checkout-pro-method-row.active .checkout-pro-method-body {
  display: block;
}

.pro-field-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #4B5563;
  margin-bottom: 5px;
  display: block;
}

.pro-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pro-input {
  width: 100%;
  height: 42px;
  background: #FFFFFF !important;
  color: #111827 !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 10px !important;
  padding: 8px 12px !important;
  font-size: 13.5px !important;
  outline: none !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
  box-sizing: border-box !important;
}

.pro-input:focus {
  border-color: #FF7A00 !important;
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.15) !important;
}

.pro-input-right-badge {
  position: absolute;
  right: 10px;
  pointer-events: none;
}

.pro-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  cursor: pointer;
  user-select: none;
}

.pro-custom-checkbox {
  width: 17px;
  height: 17px;
  border-radius: 4px;
  background: #FF7A00;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  transition: all 0.2s;
}

.pro-checkbox-label {
  font-size: 12px;
  color: #374151;
  font-weight: 500;
  flex: 1;
}

.btn-checkout-pro-cta {
  width: 100%;
  height: 50px;
  background: #FF7A00;
  color: #FFFFFF;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 122, 0, 0.35);
  transition: all 0.2s ease;
}

.btn-checkout-pro-cta:hover {
  background: #E86B00;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 122, 0, 0.42);
}

.btn-checkout-pro-cta:active {
  transform: translateY(0);
}

.checkout-pro-footer-terms {
  text-align: center;
  font-size: 11px;
  color: #6B7280;
  margin-top: 10px;
  margin-bottom: 12px;
  line-height: 1.45;
}

.checkout-pro-footer-terms a {
  color: #FF7A00;
  text-decoration: underline;
}

.checkout-pro-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid #F3F4F6;
  font-size: 11.5px;
  color: #6B7280;
}

/* Full-Screen Edge-to-Edge Mobile Checkout */
@media (max-width: 640px) {
  #subscriptionCheckoutModal {
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
  }
  .checkout-pro-box {
    width: 100vw !important;
    max-width: 100vw !important;
    min-height: 100vh !important;
    height: auto !important;
    max-height: none !important;
    border-radius: 0 !important;
    border: none !important;
    padding: 20px 16px 40px !important;
    margin: 0 !important;
    box-shadow: none !important;
  }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.dashboard-strict-lock-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  min-height: 480px;
  background: radial-gradient(circle at center, rgba(255, 122, 0, 0.08) 0%, rgba(11, 21, 40, 0.98) 70%);
  border: 1px solid rgba(255, 122, 0, 0.25);
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  margin-bottom: 24px;
}


/* Button to mark order as served directly */
.btn-mark-served-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(255, 122, 0, 0.14);
  color: #FF7A00;
  border: 1px solid rgba(255, 122, 0, 0.38);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.btn-mark-served-badge:hover {
  background: #FF7A00;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 122, 0, 0.38);
}
.btn-mark-served-badge:active {
  transform: scale(0.97);
}

/* Button to mark order as paid directly from dashboard or prep */
.btn-mark-paid-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.15);
  color: #3B82F6;
  border: 1px solid rgba(59, 130, 246, 0.4);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.btn-mark-paid-badge:hover {
  background: #3B82F6;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.38);
}
.btn-mark-paid-badge:active {
  transform: scale(0.97);
}

/* KPI Box real-time update pulse */
.kpi-box-highlight {
  animation: kpiBoxPulse 1.1s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
}

@keyframes kpiBoxPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  35% {
    transform: scale(1.035);
    border-color: #10B981 !important;
    box-shadow: 0 0 25px 6px rgba(16, 185, 129, 0.45);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}


/* KDS Paid Action & Badges */
.kds-btn-paid {
  background: #3B82F6;
  color: #FFFFFF;
}
.kds-btn-paid:hover {
  background: #2563EB;
}
.kds-badge-paid {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 800;
  background: rgba(59, 130, 246, 0.15);
  color: #3B82F6;
  border: 1px solid rgba(59, 130, 246, 0.35);
}
.btn-mark-paid-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.14);
  color: #3B82F6;
  border: 1px solid rgba(59, 130, 246, 0.38);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.btn-mark-paid-badge:hover {
  background: #3B82F6;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.38);
}
.btn-mark-paid-badge:active {
  transform: scale(0.97);
}
