/* ===== GOOGLE FONTS - INTER ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== CSS RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Ordergo Brand Colors */
  --primary: #FEC818;
  --primary-dark: #E5B416;
  --primary-light: #FEF5D9;
  --primary-hover: #FFD23F;

  /* Background Colors */
  --bg-body: #f8f9fa;
  --bg-white: #ffffff;
  --bg-secondary: #ffffff;
  --bg-primary: #FEF5D9;
  --bg-green: #d1fae5;
  --bg-orange: #ff8c00;
  --bg-tertiary: #f1f5f9;
  --bg-hover: #f1f5f9;

  /* Text Colors */
  --text-primary: #1a1a1a;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --text-muted: #9ca3af;

  /* Border */
  --border-color: #e5e7eb;
  --border-radius: 12px;
  --border-radius-sm: 8px;

  /* Semantic Colors */
  --green: #10b981;
  --success: #10b981;
  --blue: #3b82f6;
  --info: #3b82f6;
  --orange: #ff8c00;
  --warning: #f59e0b;
  --red: #ef4444;
  --error: #ef4444;

  /* Channel Colors - Styleguide v2: Kiosk=blue, Kassa=purple, Web=orange */
  --channel-kiosk: #5b8def;
  --channel-webshop: #f59e0b;
  --channel-kassa: #9b7bea;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --bg-body: #0a0a0a;
  --bg-white: #1a1a1a;
  --bg-secondary: #141414;
  --bg-primary: #3D2E08;
  --bg-green: rgba(16, 185, 129, 0.2);
  --bg-tertiary: #262626;
  --bg-hover: #2a2a2a;

  /* Primary colors adjusted for dark mode */
  --primary-light: rgba(254, 200, 24, 0.15);

  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --text-muted: #71717a;

  --border-color: #2a2a2a;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.5);
}

[data-theme="dark"] .logo-icon .logo-img {
  display: none;
}

[data-theme="dark"] .logo-icon .logo-img-dark {
  display: block;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Global thin scrollbar styling */
*,
*::before,
*::after {
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ===== DASHBOARD WRAPPER ===== */
.dashboard-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== HEADER ===== */
.dashboard-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 80px;
  position: sticky;
  top: 0;
  z-index: 100;
  /* Ensure sticky works */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-left {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  flex: 1;
  height: 40px;
}

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

.logo-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon .logo-img {
  width: 40px;
  height: auto;
  display: block;
}

.logo-icon .logo-img-dark {
  display: none;
  width: 40px;
  height: auto;
}

/* Dark mode logo switch - add [data-theme="dark"] when dark mode is implemented */
.dark-mode .logo-icon .logo-img {
  display: none;
}

.dark-mode .logo-icon .logo-img-dark {
  display: block;
}

.logo-text h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  height: 40px;
}

/* Nav selectors (store/time) in nav row */
.nav-selector {
  margin-left: 0;
}

.nav-selector + .nav-selector {
  margin-left: 0;
}

/* Push store selector and everything after it to the right */
.store-selector-menu.nav-selector {
  margin-left: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  position: relative;
}

.nav-item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
}

[data-theme="dark"] .nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}

[data-theme="dark"] .nav-item.active {
  background: rgba(255, 255, 255, 0.1);
}

/* Ordergo Yellow left border indicator for active nav item */
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
}

.nav-item svg {
  width: 16px;
  height: 16px;
}

/* Keep icon neutral on active - only the dot shows yellow */
.nav-item.active svg {
  color: var(--text-primary);
}

/* Hide secondary nav items on desktop - only show in hamburger menu */
.nav-item.nav-item-secondary {
  display: none;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Header Selectors Container */
.header-selectors {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.notification-bell {
  position: relative;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.notification-bell:hover {
  background: var(--bg-body);
}

.notification-bell svg {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

.notification-bell .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 8px;
  background: var(--bg-body);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #cbd5e1;
  transition: 0.3s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background: white;
  transition: 0.3s;
  border-radius: 50%;
}

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

input:checked + .slider:before {
  transform: translateX(16px);
}

.user-initials {
  width: 36px;
  height: 36px;
  background: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

/* ===== MAIN CONTENT ===== */
.dashboard-content {
  padding: 24px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header h2 {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ===== CATEGORY FILTER (Food/Non-Food) ===== */
.category-filter {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.category-filter-label {
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
}

.category-toggle-group {
  display: inline-flex;
  gap: 4px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 4px;
}

.category-toggle-btn {
  padding: 10px 18px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.category-toggle-btn:hover:not(.active) {
  background: rgba(91, 141, 239, 0.1);
  color: #374151;
}

.category-toggle-btn.active {
  background: var(--primary);
  color: #1a1a2e;
}

.category-toggle-btn svg {
  width: 16px;
  height: 16px;
}

[data-theme="dark"] .category-filter-label {
  color: #9ca3af;
}

[data-theme="dark"] .category-toggle-group {
  background: var(--bg-tertiary);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .category-toggle-btn {
  color: #9ca3af;
}

[data-theme="dark"] .category-toggle-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
  color: #e5e7eb;
}

[data-theme="dark"] .category-toggle-btn.active {
  background: var(--primary);
  color: #1a1a2e;
}

/* ===== TIME SELECTOR DROPDOWN ===== */
.time-selector-dropdown {
  position: relative;
}

.btn-time-dropdown {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-time-dropdown:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.btn-time-dropdown svg {
  color: var(--text-secondary);
}

.time-zone {
  font-size: 12px;
  color: var(--text-muted);
  padding: 2px 8px;
  background: var(--bg-body);
  border-radius: 4px;
}

/* ===== DROPDOWN PANEL ===== */
.dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 950px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  max-height: 80vh;
  overflow-y: auto;
}

.dropdown-content {
  padding: 24px;
}

.absolute-time-section {
  flex: 1;
  padding: 24px;
  border-right: 1px solid var(--border-color);
}

.absolute-time-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

/* ===== DATE TIME INPUTS (IMPROVED) ===== */
.date-time-inputs {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.input-group:hover {
  border-color: var(--primary);
  background: rgba(254, 200, 24, 0.05);
}

.input-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.input-group .input-row {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 10px;
}

.input-group input[type="date"],
.input-group input[type="time"] {
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-white);
  transition: all 0.2s;
  font-family: inherit;
  min-width: 0;
}

.input-group input[type="date"]::-webkit-calendar-picker-indicator,
.input-group input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.input-group input[type="date"]::-webkit-calendar-picker-indicator:hover,
.input-group input[type="time"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(254, 200, 24, 0.2);
  background: var(--bg-white);
}

.input-group input:hover:not(:focus) {
  border-color: rgba(254, 200, 24, 0.5);
}

.btn-apply {
  width: 100%;
  padding: 10px 16px;
  background: var(--primary);
  color: var(--text-primary);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
}

.btn-apply:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.time-info {
  padding: 12px;
  background: var(--bg-body);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.timezone-info {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-weight: 500;
  color: var(--text-primary);
}

.divider {
  width: 1px;
  background: var(--border-color);
}

.quick-periods-section {
  flex: 1;
  padding: 24px;
}

.quick-periods-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 12px;
}

.search-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-box input {
  border: none;
  outline: none;
  font-size: 14px;
  width: 100%;
  color: var(--text-primary);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.period-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.period-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.period-btn:hover {
  background: var(--bg-body);
  color: var(--text-primary);
}

.period-btn.active {
  background: var(--bg-primary);
  color: var(--primary-dark);
  font-weight: 500;
}

.period-btn svg {
  width: 14px;
  height: 14px;
  opacity: 0;
}

.period-btn.active svg {
  opacity: 1;
  color: var(--primary-dark);
}

/* ===== STORE SELECTOR ===== */
.store-selector-dropdown {
  position: relative;
  margin-right: 12px;
}

.btn-store-dropdown {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-store-dropdown:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.btn-store-dropdown svg {
  color: var(--text-secondary);
}

.store-dropdown-panel {
  width: 360px;
}

/* Removed old store selector styles - now defined under .store-menu-dropdown namespace */

/* ===== CALENDAR ===== */
.calendar-section {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

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

.calendar-header span {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-nav {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.2s;
}

.btn-nav:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.calendar-grid {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg-body);
  padding: 8px 0;
}

.calendar-weekdays span {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg-white);
  gap: 1px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  min-height: 38px;
}

.calendar-day:hover {
  background: var(--bg-body);
}

.calendar-day.today {
  /* No highlighting for today's date */
}

.calendar-day.disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

.calendar-day.in-range {
  background: rgba(254, 200, 24, 0.2);
}

.calendar-day.range-start,
.calendar-day.range-end {
  background: var(--primary);
  color: var(--text-primary);
  font-weight: 600;
}

.calendar-day.range-start {
  border-radius: 4px 0 0 4px;
}

.calendar-day.range-end {
  border-radius: 0 4px 4px 0;
}

.calendar-day.range-start.range-end {
  border-radius: 4px;
}

/* ===== BUTTONS ===== */
.btn-secondary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-secondary svg {
  color: var(--text-secondary);
}

/* ===== MAIN GRID ===== */
.main-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.right-column {
  display: flex;
  flex-direction: column;
}

/* ===== STAT CARDS (TOP 2) ===== */
.stats-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  transition: all 0.2s;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* White stat card with green badge (Omzet) - Styleguide */
.stat-card-green {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
}

.stat-card-green .stat-header h3 {
  color: var(--text-secondary);
}

.stat-card-green .stat-value {
  color: var(--text-primary);
}

.stat-card-green .stat-icon {
  background: #22c55e;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}

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

.stat-header h3 {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.stat-icon {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-dark);
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1;
}

.stat-meta {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-meta .stat-label {
  white-space: nowrap;
}

/* VAT Breakdown */
.vat-breakdown {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.vat-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
}

.vat-line:last-child {
  margin-bottom: 0;
}

.vat-label {
  color: #000000 !important;
  font-weight: 500;
}

.vat-value {
  color: #000000 !important;
  font-weight: 600;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
}

.refund-line {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 8px;
  margin-top: 4px;
}

.refund-line .vat-label {
  color: #000000 !important;
}

.refund-line .refund-value {
  color: #ef4444 !important;
}

/* Yellow stat card (Orders) - Styleguide */
.stat-card-yellow {
  background: linear-gradient(135deg, #fef9c3 0%, #fef08a 100%);
  border: 1px solid rgba(234, 179, 8, 0.2);
}

.stat-card-yellow .stat-header h3 {
  color: #854d0e;
}

.stat-card-yellow .stat-value {
  color: #854d0e;
}

.stat-card-yellow .stat-label {
  color: #a16207;
}

.stat-card-yellow .stat-icon {
  background: #ca8a04;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Channel breakdown in Orders card */
.channel-breakdown {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(234, 179, 8, 0.2);
}

.channel-line {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
}

.channel-line:last-child {
  margin-bottom: 0;
}

.channel-dot-small {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
}

.channel-dot-small.green {
  background: #22c55e;
}

.channel-dot-small.blue {
  background: #3b82f6;
}

.channel-dot-small.orange {
  background: #f97316;
}

.channel-label {
  color: #854d0e;
  font-weight: 500;
  margin-right: 4px;
}

.channel-value {
  color: #854d0e;
  font-weight: 600;
  margin-left: auto;
}

.stat-change {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.stat-change.positive {
  color: var(--green);
  background: rgba(16, 185, 129, 0.1);
}

/* ===== CLEAN STAT CARDS (Operations Style) ===== */
.stats-cards-clean {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-card-clean {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
}

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

.stat-card-clean-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.stat-card-clean-info {
  color: var(--text-tertiary);
  cursor: help;
  display: flex;
  align-items: center;
}

.stat-card-clean-info:hover {
  color: var(--text-secondary);
}

/* Info Button for Stat Cards */
.stat-card-clean .info-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: none;
  border: none;
  padding: 0;
  cursor: help;
  color: var(--text-tertiary);
  transition: color 0.2s ease;
}

.stat-card-clean .info-btn:hover,
.stat-card-clean .info-btn:focus {
  color: var(--primary);
  outline: none;
}

.stat-card-clean .info-btn svg {
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.stat-card-clean .info-btn:hover svg {
  opacity: 1;
}

/* Info Tooltip */
.info-tooltip {
  position: fixed;
  width: 280px;
  padding: 14px 16px;
  background: #2d2d2d;
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  pointer-events: none;
}

.info-tooltip.visible {
  opacity: 1;
  visibility: visible;
}

/* Arrow */
.info-tooltip::after {
  content: '';
  position: absolute;
  border: 6px solid transparent;
}

/* Arrow pointing down (tooltip above trigger) */
.info-tooltip.tooltip-above::after {
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-top-color: #2d2d2d;
}

/* Arrow pointing up (tooltip below trigger) */
.info-tooltip.tooltip-below::after {
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: #2d2d2d;
}

.tooltip-header {
  font-size: 0.875rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.tooltip-content {
  font-size: 0.8125rem;
  color: #b0b0b0;
  line-height: 1.6;
  margin-bottom: 12px;
}

.tooltip-section {
  margin-bottom: 12px;
}

.tooltip-section:last-child {
  margin-bottom: 0;
}

.tooltip-section strong {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #FEC818; /* Gold/yellow */
  display: block;
  margin-bottom: 4px;
}

.tooltip-section p {
  font-size: 0.8125rem;
  color: #b0b0b0;
  margin: 0;
  line-height: 1.5;
}

/* Mobile: smaller tooltip */
@media (max-width: 768px) {
  .info-tooltip {
    width: 260px;
    font-size: 12px;
  }
}

.stat-card-clean-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 8px;
}

.stat-card-clean-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.stat-card-clean-meta-label {
  color: #06b6d4;
  font-weight: 500;
}

.stat-card-clean-change {
  font-weight: 600;
}

.stat-card-clean-change.positive {
  color: var(--green);
}

.stat-card-clean-change.negative {
  color: var(--red);
}

.stat-card-clean-change.neutral {
  color: var(--text-secondary);
}

/* Breakdown section in stat cards */
.stat-card-clean-breakdown {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.breakdown-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
}

.breakdown-line:last-child {
  margin-bottom: 0;
}

.breakdown-label {
  color: var(--text-secondary);
}

.breakdown-value {
  color: var(--text-primary);
  font-weight: 500;
}

.breakdown-refund .breakdown-value,
.breakdown-value.refund-value {
  color: var(--red);
}

/* Channel cards section */
.stat-card-clean-channels {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px 20px;
}

.channel-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.channel-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-body);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.channel-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.channel-card-dot.kiosk {
  background: var(--primary);
}

.channel-card-dot.kassa {
  background: #6366f1;
}

.channel-card-dot.web {
  background: #22c55e;
}

.channel-card-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 55px;
}

.channel-card-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.channel-card-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 35px;
  text-align: right;
}

.channel-card-pct {
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  min-width: 42px;
  text-align: center;
}

/* Dark mode adjustments for clean cards */
[data-theme="dark"] .stat-card-clean-meta-label {
  color: #22d3ee;
}

[data-theme="dark"] .channel-card {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}

[data-theme="dark"] .channel-card-pct {
  background: rgba(255, 255, 255, 0.08);
}

/* Refunds Card */
.card-refunds {
  margin-top: 24px;
}

.refunds-content {
  padding: 0;
}

.refunds-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(239, 68, 68, 0.05);
  border-left: 3px solid #ef4444;
  margin-bottom: 16px;
}

.refund-total {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.refund-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

/* Refund value in breakdown - same size as other breakdown values */
.refund-value {
  font-size: 13px;
  font-weight: 600;
  color: #ef4444;
}

.refund-count {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.refund-count span {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.refunds-channels {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 20px 20px;
}

.refund-channel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.refund-channel-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.refund-channel-details {
  display: flex;
  align-items: center;
  gap: 12px;
}

.refund-channel-count {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  min-width: 30px;
  text-align: right;
}

.refund-channel-amount {
  font-size: 15px;
  font-weight: 600;
  color: #ef4444;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-width: 80px;
  text-align: right;
}

.stat-change.negative {
  color: var(--red);
  background: rgba(239, 68, 68, 0.1);
}

.stat-change svg {
  width: 12px;
  height: 12px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===== CARD ===== */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
}

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

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.badge-today {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-body);
  padding: 4px 12px;
  border-radius: 16px;
}

/* ===== CHANNEL LIST ===== */
.channel-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.channel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.channel-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.channel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.channel-dot.green {
  background: var(--green);
}

.channel-dot.blue {
  background: var(--blue);
}

.channel-dot.orange {
  background: var(--orange);
}

.channel-revenue {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
  margin-left: 4px;
}

.channel-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

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

.channel-count {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

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

.channel-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.total-value {
  font-size: 18px;
  font-weight: 700;
}

/* ===== CHART ===== */
.card-chart {
  height: 100%;
  min-height: 400px;
}

.card-chart .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chart-date-range {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
}

.chart-placeholder {
  height: calc(100% - 100px);
  min-height: 300px;
}


.scale-icon svg {
  width: 16px;
  height: 16px;
}

/* ===== BOTTOM STATS ===== */
.bottom-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card-small {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
}

.stat-card-small:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card-small.stat-card-orange {
  background: var(--orange);
  border-color: var(--orange);
}

.stat-card-small.stat-card-orange .stat-label-small,
.stat-card-small.stat-card-orange .stat-value-small,
.stat-card-small.stat-card-orange .stat-label {
  color: white;
}

.stat-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-circle.green {
  background: var(--primary);
}

.stat-icon-circle.green svg {
  color: var(--primary-text, #1a1a1a);
}

.stat-icon-circle.green svg circle,
.stat-icon-circle.green svg path {
  stroke: var(--primary-text, #1a1a1a);
}

.stat-icon-circle.blue {
  background: var(--blue);
}

.stat-icon-circle.orange {
  background: rgba(255, 255, 255, 0.2);
}

.stat-icon-circle.red {
  background: var(--red);
}

.stat-info {
  flex: 1;
}

.stat-label-small {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.stat-value-small {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-value-small .unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ===== THEME TOGGLE ===== */
.theme-toggle-container {
  position: relative;
}

.btn-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  height: 42px;
  width: 42px;
}

.btn-theme-toggle:hover {
  background: rgba(254, 200, 24, 0.1);
  border-color: var(--primary);
}

[data-theme="dark"] .btn-theme-toggle:hover {
  background: rgba(254, 200, 24, 0.15);
}

.btn-theme-toggle svg {
  color: var(--text-secondary);
  transition: all 0.3s;
}

.btn-theme-toggle:hover svg {
  color: var(--primary);
}

/* Show sun icon by default (light mode), hide moon */
.btn-theme-toggle .icon-sun {
  display: block;
}

.btn-theme-toggle .icon-moon {
  display: none;
}

/* In dark mode, show moon icon, hide sun */
[data-theme="dark"] .btn-theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .btn-theme-toggle .icon-moon {
  display: block;
}

[data-theme="dark"] .btn-theme-toggle {
  background: var(--bg-white);
  border-color: var(--primary);
}

[data-theme="dark"] .btn-theme-toggle svg {
  color: var(--primary);
}

/* ===== DATA SOURCE INDICATOR ===== */
.data-source-indicator {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: help;
  height: 32px;
}

.data-source-indicator .indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

.data-source-indicator.bi-api .indicator-dot {
  background: var(--blue);
}

.data-source-indicator.database .indicator-dot {
  background: var(--green);
}

.data-source-indicator .indicator-label {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

[data-theme="dark"] .data-source-indicator {
  background: var(--bg-white);
  border-color: var(--border-color);
}

/* ===== NOTIFICATION SYSTEM ===== */
.notification-container {
  position: relative;
}

.btn-notification {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  height: 42px;
  width: 42px;
}

.btn-notification:hover {
  background: rgba(254, 200, 24, 0.1);
  border-color: var(--primary);
}

[data-theme="dark"] .btn-notification:hover {
  background: rgba(254, 200, 24, 0.15);
}

.btn-notification svg {
  color: var(--text-secondary);
  transition: color 0.2s;
}

.btn-notification:hover svg {
  color: var(--primary-dark);
}

[data-theme="dark"] .btn-notification:hover svg {
  color: var(--primary);
}

.btn-notification.has-notifications {
  border-color: var(--red);
}

.btn-notification.has-notifications svg {
  color: var(--red);
}

/* Notification Badge with Pulse Animation */
.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-white);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.notification-badge.pulse {
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.8), 0 0 0 4px rgba(239, 68, 68, 0.2);
  }
}

/* Bell Shake Animation for new notifications */
@keyframes bellShake {
  0%, 100% { transform: rotate(0deg); }
  10%, 30%, 50%, 70%, 90% { transform: rotate(-10deg); }
  20%, 40%, 60%, 80% { transform: rotate(10deg); }
}

.btn-notification.shake svg {
  animation: bellShake 0.8s ease-in-out;
}

/* Language Selector */
.language-selector {
  position: relative;
}

.btn-language {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  height: 42px;
}

.btn-language:hover {
  background: rgba(254, 200, 24, 0.1);
  border-color: var(--primary);
}

[data-theme="dark"] .btn-language {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] .btn-language:hover {
  background: rgba(254, 200, 24, 0.15);
  border-color: var(--primary);
}

.btn-language .language-flag {
  font-size: 18px;
  line-height: 1;
}

.btn-language svg {
  color: var(--text-secondary);
  transition: transform 0.2s;
}

.btn-language.open svg {
  transform: rotate(180deg);
}

.language-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  overflow: hidden;
  animation: slideDown 0.2s ease-out;
}

[data-theme="dark"] .language-dropdown {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.language-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
}

.language-option:hover {
  background: rgba(254, 200, 24, 0.1);
}

[data-theme="dark"] .language-option:hover {
  background: rgba(254, 200, 24, 0.15);
}

.language-option.active {
  background: rgba(254, 200, 24, 0.2);
}

.language-option .language-flag {
  font-size: 20px;
  line-height: 1;
}

.language-option .language-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Notification Dropdown */
.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 480px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  max-height: 600px;
  overflow: hidden;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notification-dropdown .dropdown-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.notification-dropdown .dropdown-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.btn-mark-all-read {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
}

.btn-mark-all-read:hover {
  background: var(--bg-primary);
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* Notification Tabs */
.notification-tabs {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: var(--bg-body);
  border-radius: 8px;
}

.notification-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.notification-tab:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
}

.notification-tab.active {
  background: var(--bg-white);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--border-color);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  transition: all 0.2s;
}

.notification-tab.active .tab-count {
  background: var(--primary);
  color: var(--text-primary);
}

/* Notification List */
.notification-list {
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notification-list::-webkit-scrollbar {
  width: 6px;
}

.notification-list::-webkit-scrollbar-track {
  background: var(--bg-body);
  border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Empty State */
.notification-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.notification-empty svg {
  margin-bottom: 12px;
  opacity: 0.3;
}

.notification-empty p {
  font-size: 14px;
  margin: 0;
}

/* Individual Notification Item */
.notification-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.notification-item:hover {
  background: var(--bg-body);
  border-color: var(--primary);
  transform: translateX(-2px);
}

.notification-item.unread {
  background: rgba(59, 130, 246, 0.05);
  border-left: 3px solid var(--blue);
}

.notification-item.unread::before {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  background: var(--blue);
  border-radius: 50%;
}

/* Notification Icon Container */
.notification-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.notification-icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

/* Priority Colors */
.notification-item.urgent .notification-icon {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.notification-item.warning .notification-icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.notification-item.info .notification-icon {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.notification-item.success .notification-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Notification Content */
.notification-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notification-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin: 0;
}

.notification-message {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.notification-time {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.notification-category {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--bg-body);
  color: var(--text-secondary);
  border-radius: 4px;
  font-weight: 500;
}

/* Notification Actions */
.notification-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.notification-item:hover .notification-actions {
  opacity: 1;
}

.notification-action-btn {
  padding: 6px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-action-btn:hover {
  background: var(--bg-white);
  border-color: var(--primary);
}

.notification-action-btn.dismiss:hover {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.notification-action-btn svg {
  width: 14px;
  height: 14px;
  color: var(--text-secondary);
}

.notification-action-btn.dismiss:hover svg {
  color: white;
}

/* Priority Badge in notification */
.priority-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-white);
}

.priority-badge svg {
  width: 10px;
  height: 10px;
}

.notification-item.urgent .priority-badge svg {
  color: var(--red);
}

/* Dark Mode Support (placeholder) */
@media (prefers-color-scheme: dark) {
  .notification-dropdown {
    background: #1a1a1a;
    border-color: #333;
  }

  .notification-item {
    background: #2a2a2a;
    border-color: #333;
  }

  .notification-item:hover {
    background: #333;
  }

  .notification-badge {
    border-color: #1a1a1a;
  }
}

/* Notification Type Icons */
.notification-type-icon {
  flex-shrink: 0;
}

/* Group Separator */
.notification-group-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 12px 4px 12px;
  margin-top: 8px;
}

.notification-group-label:first-child {
  margin-top: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .dropdown-panel {
    width: 600px;
  }

  .notification-dropdown {
    width: 420px;
  }
}

@media (max-width: 768px) {
  .header-left {
    gap: 16px;
  }

  .main-nav {
    display: none;
  }

  .page-header {
    flex-direction: column;
    gap: 16px;
  }

  .page-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .stats-cards {
    grid-template-columns: 1fr;
  }

  .bottom-stats {
    grid-template-columns: 1fr;
  }

  .dropdown-panel {
    width: calc(100vw - 32px);
    left: 0;
    right: 0;
  }

  .dropdown-content {
    flex-direction: column;
  }

  .absolute-time-section {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  /* Notification responsive */
  .notification-dropdown {
    position: fixed;
    top: 80px;
    left: 16px;
    right: 16px;
    width: auto;
    max-height: calc(100vh - 100px);
  }

  .notification-tabs {
    flex-wrap: wrap;
  }

  .notification-tab {
    font-size: 12px;
    padding: 6px 8px;
  }

  .notification-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .notification-actions {
    opacity: 1;
    width: 100%;
    justify-content: flex-end;
  }
}

/* ===== KITCHEN SCREENS LIST ===== */
.screen-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.screen-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.screen-item:hover {
  background: var(--hover-bg);
  border-color: var(--primary-color);
}

.screen-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.screen-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.screen-status-dot.online {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.screen-status-dot.offline {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.screen-name {
  font-weight: 500;
  color: var(--text-primary);
}

.screen-item-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.screen-info-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== NEW TWO-COLUMN TIME SELECTOR LAYOUT ===== */
.time-selector-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 32px;
  min-height: 550px;
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 24px;
  border-right: 1px solid var(--border-color);
}

.left-column .calendar-section {
  order: 3;
  margin-top: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.left-column .date-time-inputs {
  order: 1;
}

.left-column .btn-apply {
  order: 2;
}

.left-column .timezone-info {
  order: 4;
  margin-top: auto;
  padding-top: 12px;
}

.right-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-left: 24px;
}

/* Recent Periods Section */
.recent-periods-section {
  flex: 1;
}

.recent-periods-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recent-item {
  padding: 10px 12px;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.recent-item:hover {
  background: rgba(254, 200, 24, 0.1);
  border-color: var(--primary);
}

.recent-item .date-range {
  font-weight: 500;
  color: var(--text-primary);
}

.recent-item .date-details {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.no-recent {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--bg-body);
  border-radius: 6px;
}

/* ===== STORE SELECTOR IN MENU ===== */
.store-selector-menu {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-store-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  white-space: nowrap;
  height: 42px;
}

.btn-store-menu:hover {
  background: rgba(254, 200, 24, 0.08);
  border-color: var(--primary);
}

[data-theme="dark"] .btn-store-menu:hover {
  background: rgba(254, 200, 24, 0.1);
}

.btn-store-menu svg:first-child {
  color: var(--primary-dark);
}

[data-theme="dark"] .btn-store-menu svg:first-child {
  color: var(--primary);
}

.btn-store-menu svg {
  flex-shrink: 0;
}

.btn-store-menu svg:last-child {
  color: var(--text-muted);
  width: 10px;
  height: 10px;
}

.store-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  min-width: 380px;
  max-height: 500px;
  overflow: hidden;
}

.store-menu-dropdown .dropdown-content {
  padding: 16px;
}

.store-menu-dropdown h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.store-menu-dropdown .dropdown-header {
  margin-bottom: 12px;
}

.store-menu-dropdown .search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 12px;
}

.store-menu-dropdown .search-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.store-menu-dropdown .search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  width: 100%;
  color: var(--text-primary);
}

.store-menu-dropdown .store-list {
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
}

.store-menu-dropdown .store-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 6px;
  transition: background 0.2s;
  cursor: pointer;
}

.store-menu-dropdown .store-checkbox-item:hover {
  background: var(--bg-body);
}

.store-menu-dropdown .store-checkbox-item input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  cursor: pointer;
  flex-shrink: 0;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  background: white;
  transition: all 0.2s;
  position: relative;
}

.store-menu-dropdown .store-checkbox-item input[type="checkbox"]:hover {
  border-color: var(--blue);
}

.store-menu-dropdown .store-checkbox-item input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.store-menu-dropdown .store-checkbox-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #1a1a2e;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

[data-theme="dark"] .store-menu-dropdown .store-checkbox-item input[type="checkbox"] {
  border-color: rgba(255, 255, 255, 0.1);
  background: var(--bg-tertiary);
}

[data-theme="dark"] .store-menu-dropdown .store-checkbox-item input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.store-menu-dropdown .store-checkbox-item label {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}

.store-menu-dropdown .store-actions {
  display: flex;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.store-menu-dropdown .btn-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}

.store-menu-dropdown .btn-link:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

[data-theme="dark"] .store-menu-dropdown .btn-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.store-menu-dropdown .btn-apply-stores {
  width: 100%;
  padding: 14px 16px;
  margin-top: 12px;
  background: var(--primary);
  color: #1a1a2e;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.store-menu-dropdown .btn-apply-stores:hover {
  background: var(--primary-dark);
}

.store-menu-dropdown .btn-apply-stores:active {
  transform: scale(0.98);
}

/* ===== TIME SELECTOR IN MENU ===== */
.time-selector-menu {
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
}

.btn-time-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  white-space: nowrap;
  height: 42px;
}

.btn-time-menu:hover {
  background: rgba(254, 200, 24, 0.08);
  border-color: var(--primary);
}

[data-theme="dark"] .btn-time-menu:hover {
  background: rgba(254, 200, 24, 0.1);
}

.btn-time-menu svg:first-child {
  color: var(--primary-dark);
}

[data-theme="dark"] .btn-time-menu svg:first-child {
  color: var(--primary);
}

.btn-time-menu svg {
  flex-shrink: 0;
}

.btn-time-menu span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.selected-period-detail {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.2;
  white-space: nowrap;
  text-align: right;
}

.time-menu-dropdown {
  position: fixed;
  top: 80px;
  right: 250px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  width: 850px;
  max-height: calc(100vh - 100px);
  overflow: visible;
}

.time-menu-dropdown .dropdown-content {
  padding: 20px;
}

/* Dropdown Header with Close Button */
.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.dropdown-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.btn-close-dropdown {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.btn-close-dropdown:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-close-dropdown svg {
  width: 14px;
  height: 14px;
}

.time-menu-dropdown h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Time Selector Layout */
.time-selector-layout {
  display: flex;
  gap: 20px;
  margin-top: 16px;
}

.time-selector-layout .left-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.time-selector-layout .right-column {
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-left: 1px solid var(--border-color);
  padding-left: 20px;
}

/* Recent Periods Section - Scrollable */
.recent-periods-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recent-periods-section h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.recent-list {
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.recent-list::-webkit-scrollbar {
  width: 6px;
}

.recent-list::-webkit-scrollbar-track {
  background: var(--bg-body);
  border-radius: 3px;
}

.recent-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.recent-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
  gap: 8px;
}

.recent-item:hover {
  background: var(--bg-body);
}

.recent-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.recent-item-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-item-date {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-item-delete {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
  opacity: 0;
}

.recent-item:hover .recent-item-delete {
  opacity: 1;
}

.recent-item-delete:hover {
  background: var(--red);
  color: white;
}

.no-recent {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px 10px;
  margin: 0;
}

/* Quick Periods Section */
.quick-periods-section h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.time-menu-dropdown .period-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.period-btn {
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.period-btn:hover {
  background: var(--bg-body);
}

.time-menu-dropdown .period-btn.active {
  background: var(--bg-primary);
  color: var(--primary-dark);
  font-weight: 500;
}

.period-btn svg {
  flex-shrink: 0;
}

/* ===== HEADER LOGO ===== */

.header-logo {
  display: flex;
  align-items: center;
  margin-right: 16px;
  flex-shrink: 0;
  height: 40px;
  position: relative;
}

.beta-badge {
  position: absolute;
  bottom: -5px;
  left: 0;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary, #FEC818);
  line-height: 1;
  pointer-events: none;
}

.header-logo .logo-img {
  height: 32px;
  width: auto;
}

.header-logo .logo-img-dark {
  display: none;
  height: 32px;
  width: auto;
}

[data-theme="dark"] .header-logo .logo-img {
  display: none;
}

[data-theme="dark"] .header-logo .logo-img-dark {
  display: block;
}

/* ===== MOBILE LOCATION BUTTON (compact icon with badge) ===== */
.mobile-location-btn {
  display: none; /* Hidden on desktop */
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
  position: relative;
  flex-shrink: 0;
}

.mobile-location-btn:hover {
  background: var(--bg-white);
  border-color: var(--primary);
  color: var(--primary);
}

.mobile-location-btn svg {
  width: 20px;
  height: 20px;
}

.mobile-location-btn .location-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-white);
  z-index: 1;
}

/* ===== SELECTED STORES LABELS (under page title) ===== */
.selected-stores-labels {
  display: none; /* Hidden on desktop, shown on mobile */
  flex-direction: column;
  gap: 6px;
  padding: 0 16px 12px;
  margin-top: -8px;
}

.selected-stores-labels .stores-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.selected-stores-labels .stores-count {
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: 0;
}

.selected-stores-labels .store-labels-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
}

.selected-stores-labels .store-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: linear-gradient(135deg, #fff9e6 0%, #fff5d6 100%);
  border: 1px solid #f0e4b8;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 500;
  color: #5a4a00;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  max-width: calc(50% - 3px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.selected-stores-labels .store-label::before {
  content: '';
  width: 5px;
  height: 5px;
  background: #FEC818;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===== MOBILE CALENDAR BUTTON ===== */
.mobile-calendar-btn {
  display: none; /* Hidden on desktop */
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.mobile-calendar-btn:hover {
  background: var(--bg-white);
  border-color: var(--primary);
  color: var(--primary);
}

.mobile-calendar-btn svg {
  width: 20px;
  height: 20px;
}

/* ===== HAMBURGER MENU (CRM Style - Right Position) ===== */

/* Hamburger Button - Always Visible, right side */
.hamburger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
  margin-left: 8px;
  flex-shrink: 0;
}

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

.hamburger-btn:active {
  transform: scale(0.96);
}

.hamburger-btn svg {
  width: 20px;
  height: 20px;
}

/* Hamburger Sidebar - Floating Panel (CRM Style) */
.mobile-sidebar {
  display: block;
  position: fixed;
  top: 80px;
  right: -380px;
  width: 340px;
  max-height: calc(100vh - 100px);
  background: var(--bg-white);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  z-index: 2000;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overflow-x: hidden;
}

.mobile-sidebar.active {
  right: 32px;
}

/* Mobile Sidebar Close Button */
.mobile-sidebar-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  z-index: 10;
}

.mobile-sidebar-close:hover {
  background: var(--bg-body);
  color: var(--red);
}

/* Mobile Menu Section */
.mobile-menu-section {
  padding: 16px 20px 24px;
}

/* Navigation section: compact, starts right below close button */
.mobile-menu-section-nav {
  padding-top: 48px; /* Ruimte voor close button */
  padding-bottom: 16px;
}

.mobile-menu-section:last-of-type {
  border-bottom: none;
}

.mobile-menu-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 4px 12px 4px;
}

/* Mobile Menu Items */
.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  transition: all 0.15s ease;
  border: none;
  background: transparent;
  width: 100%;
  cursor: pointer;
  text-align: left;
  margin-bottom: 4px;
}

.mobile-menu-item:hover {
  background: var(--bg-body);
}

.mobile-menu-item.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 500;
}

.mobile-menu-item svg {
  flex-shrink: 0;
  color: var(--text-secondary);
}

.mobile-menu-item.active svg {
  color: var(--primary-dark);
}

/* Hide certain menu items on mobile (TV Display) */
.mobile-menu-item.desktop-only-menu {
  display: none;
}

.mobile-menu-item span {
  flex: 1;
}

.mobile-menu-arrow {
  margin-left: auto;
  color: var(--text-muted);
}

/* Mobile Theme Toggle */
.mobile-theme-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--text-primary);
}

.mobile-theme-toggle svg {
  flex-shrink: 0;
  color: var(--text-secondary);
}

.mobile-theme-toggle span {
  flex: 1;
}

.mobile-theme-btns {
  display: flex;
  gap: 4px;
  background: var(--bg-body);
  padding: 4px;
  border-radius: 8px;
}

.mobile-theme-btn {
  padding: 6px 12px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.mobile-theme-btn:hover {
  color: var(--text-primary);
}

.mobile-theme-btn.active {
  background: var(--bg-white);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Mobile Data Source */
.mobile-data-source {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.mobile-data-source .indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  animation: pulse 2s infinite;
}

/* Backdrop - for closing menu when clicking outside */
.mobile-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-backdrop.active {
  display: block;
  opacity: 1;
}

/* ===== Mobile Specific Adjustments ===== */
@media (max-width: 768px) {
  /* Hide desktop nav on mobile */
  .main-nav {
    display: none !important;
  }

  /* Full height sidebar on mobile */
  .mobile-sidebar {
    top: 0;
    right: -320px;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .mobile-sidebar.active {
    right: 0;
  }

  /* Adjust header for mobile - Zonneplan style */
  .dashboard-header {
    padding: 12px 16px;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  /* Mobile header layout: location left | logo center | hamburger right */
  .dashboard-header {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 8px;
  }

  .mobile-location-btn {
    display: flex;
    justify-self: start;
  }

  .mobile-calendar-btn {
    display: flex;
  }

  .selected-stores-labels {
    display: flex;
  }

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

  .header-logo {
    margin-right: 0;
  }

  .header-logo .logo-img,
  .header-logo .logo-img-dark {
    height: 28px;
  }

  /* Hamburger on the right */
  .hamburger-btn {
    justify-self: end;
  }

  .logo-text h1 {
    font-size: 16px;
  }

  .logo-text span {
    font-size: 11px;
  }

  /* Hide desktop notification in mobile (use mobile version) */
  .notification-container.nav-selector {
    display: none;
  }
}

/* Dark Mode for Mobile Menu */
[data-theme="dark"] .mobile-sidebar {
  background: var(--bg-white);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .mobile-menu-item:hover {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .mobile-theme-btns {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .mobile-theme-btn.active {
  background: var(--bg-white);
}

[data-theme="dark"] .hamburger-btn {
  background: var(--bg-white);
  border-color: var(--border-color);
}

/* ===== PREFERENCES SLIDE-OVER PANEL ===== */
/* Desktop: matches desktop sidebar dimensions */
.preferences-panel {
  position: fixed;
  top: 80px;
  right: 32px;
  width: 340px;
  max-height: calc(100vh - 100px);
  background: var(--bg-white);
  z-index: 2100; /* Above mobile sidebar (2000) */
  transform: translateX(calc(100% + 50px));
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
}

.preferences-panel.active {
  transform: translateX(0);
}

/* Mobile: full height sidebar style */
@media (max-width: 768px) {
  .preferences-panel {
    top: 0;
    right: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: none;
  }
}

/* Panel Header */
.pref-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-white);
}

.pref-panel-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--text-primary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.pref-panel-back:hover {
  background: var(--bg-hover);
}

.pref-panel-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
}

/* Panel Content */
.pref-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* Panel Sections */
.pref-panel-section {
  margin-bottom: 20px;
}

.pref-panel-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* Clickable Items */
.pref-panel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.pref-panel-clickable {
  cursor: pointer;
  transition: background 0.2s;
}

.pref-panel-clickable:hover {
  background: var(--bg-hover);
}

.pref-panel-value {
  font-size: 15px;
  color: var(--text-primary);
}

.pref-panel-item svg {
  color: var(--text-muted);
  opacity: 0.5;
}

/* Dropdowns */
.pref-panel-dropdown {
  display: none;
  margin-top: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.pref-panel-dropdown.open {
  display: block;
}

.pref-panel-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  text-align: left;
  font-size: 15px;
  color: var(--text-primary);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.2s;
}

.pref-panel-option:last-child {
  border-bottom: none;
}

.pref-panel-option:hover {
  background: var(--bg-hover);
}

.pref-panel-option.selected {
  color: var(--green);
}

.pref-panel-option .pref-check {
  display: none;
  color: var(--green);
}

.pref-panel-option.selected .pref-check {
  display: block;
}

/* Segmented Controls */
.pref-panel-segmented {
  display: flex;
  background: var(--bg-tertiary);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

.pref-seg-btn {
  flex: 1;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.pref-seg-btn:hover {
  color: var(--text-primary);
}

.pref-seg-btn.active {
  background: var(--green);
  color: #fff;
  font-weight: 500;
}

/* Reset Section */
.pref-panel-reset-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.pref-panel-reset-btn {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 400;
  color: var(--red);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.pref-panel-reset-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

/* Footer */
.pref-panel-footer {
  text-align: center;
  padding: 16px;
  margin-top: auto;
}

.pref-panel-version {
  font-size: 12px;
  color: var(--text-muted);
}

/* Product Type Categorization */
.pref-panel-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.pref-panel-card {
  background: var(--bg-secondary);
  border-radius: 10px;
}

.pref-panel-product-type {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
}

.pref-panel-product-type:last-child {
  border-bottom: none;
}

.pref-panel-pt-name {
  font-size: 13px;
  color: var(--text-primary);
  flex: 1;
}

.pref-panel-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.pref-panel-toggle input {
  display: none;
}

.pref-panel-toggle-track {
  width: 36px;
  height: 20px;
  background: var(--border-color);
  border-radius: 20px;
  position: relative;
  transition: background 0.2s;
}

.pref-panel-toggle-track::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.pref-panel-toggle input:checked + .pref-panel-toggle-track {
  background: var(--green);
}

.pref-panel-toggle input:checked + .pref-panel-toggle-track::after {
  transform: translateX(16px);
}

.pref-panel-toggle-label {
  font-size: 10px;
  color: var(--text-muted);
  min-width: 45px;
  text-align: right;
}

.pref-panel-toggle input:checked ~ .pref-panel-toggle-label {
  color: var(--green);
}

.pref-panel-loading,
.pref-panel-empty,
.pref-panel-error {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.pref-panel-error {
  color: var(--red);
}

/* BTW Settings in Panel */
.pref-panel-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pref-panel-help-wrapper {
  position: relative;
  display: inline-flex;
}

.pref-panel-help-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s;
}

.pref-panel-help-btn:hover {
  color: var(--green);
  background: rgba(16, 185, 129, 0.1);
}

/* Tooltip */
.pref-panel-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.pref-panel-tooltip.visible {
  opacity: 1;
  visibility: visible;
}

.pref-panel-tooltip-arrow {
  position: absolute;
  top: -6px;
  left: 50%;
  width: 12px;
  height: 12px;
  background: var(--bg-primary);
  border-left: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
  transform: translateX(-50%) rotate(45deg);
}

.pref-panel-tooltip-content {
  position: relative;
  z-index: 1;
}

.pref-panel-tooltip-content strong {
  display: block;
  font-size: 12px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.pref-panel-tooltip-content p {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 8px 0;
}

.pref-panel-tooltip-content p:last-child {
  margin-bottom: 0;
}

.pref-panel-tooltip-content .tooltip-note {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
  padding-top: 6px;
  border-top: 1px solid var(--border-color);
  margin-top: 8px;
}

.pref-panel-btw-card {
  max-height: none;
  overflow: visible;
}

.pref-panel-btw-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
}

.pref-panel-btw-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0 12px;
}

.pref-panel-btw-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pref-panel-btw-label span:first-child {
  font-size: 13px;
  color: var(--text-primary);
}

.pref-panel-btw-sub {
  font-size: 10px;
  color: var(--text-muted);
}

.pref-panel-btw-input {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  padding: 4px 8px 4px 4px;
}

.pref-panel-btw-input input {
  width: 48px;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  background: transparent;
  border: none;
  text-align: right;
  outline: none;
}

.pref-panel-btw-input input:focus {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.pref-panel-btw-input input::-webkit-outer-spin-button,
.pref-panel-btw-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pref-panel-btw-input input[type=number] {
  -moz-appearance: textfield;
}

.pref-panel-btw-input span {
  font-size: 12px;
  color: var(--text-muted);
}

/* Product Type Drag & Drop Columns */
.pt-columns {
  display: flex;
  gap: 8px;
}

.pt-column {
  flex: 1;
  min-width: 0;
}

.pt-column-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 10px;
  border-radius: 8px 8px 0 0;
  text-align: center;
}

.pt-food-column .pt-column-header {
  background: #E0F2F1;
  color: #00695C;
}

.pt-nonfood-column .pt-column-header {
  background: #ECEFF1;
  color: #546E7A;
}

.pt-column-items {
  background: var(--bg-secondary);
  border-radius: 0 0 8px 8px;
  min-height: 80px;
  padding: 4px;
  transition: background 0.2s;
}

.pt-column-items.drag-over {
  background: var(--bg-hover);
  outline: 2px dashed var(--green);
  outline-offset: -2px;
}

.pt-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--bg-primary);
  border-radius: 6px;
  margin: 4px 0;
  cursor: grab;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  user-select: none;
}

.pt-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pt-item:active {
  cursor: grabbing;
}

.pt-item.dragging {
  opacity: 0.5;
  transform: scale(0.95);
}

.pt-item-drag {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 1px;
}

.pt-item-name {
  font-size: 12px;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pt-hint {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

/* Dark mode adjustments */
[data-theme="dark"] .preferences-panel {
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .pref-seg-btn.active {
  background: var(--green);
  color: #000;
}

/* ===== LOCATION PICKER MODAL (Same size as mobile-sidebar) ===== */
/* Desktop: exactly matches mobile-sidebar dimensions */
.location-picker-modal {
  position: fixed;
  top: 80px;
  right: -380px;
  width: 340px;
  max-height: calc(100vh - 100px);
  background: var(--bg-white);
  z-index: 2100;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
}

.location-picker-modal.active,
.location-picker-modal[style*="block"] {
  right: 32px;
}

/* Mobile: full height sidebar style - matches mobile-sidebar */
@media (max-width: 768px) {
  .location-picker-modal {
    top: 0;
    right: -320px;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: none;
  }

  .location-picker-modal.active {
    right: 0;
  }
}

.location-picker-content {
  display: flex;
  flex-direction: column;
  max-height: 100%;
  overflow: hidden;
}

.location-picker-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-white);
}

.location-picker-header h2 {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

.btn-close-picker {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-close-picker:hover {
  background: var(--bg-hover);
}

.location-picker-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

/* Location Card - Colored dot style */
.location-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 4px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
}

.location-card:last-child {
  margin-bottom: 0;
}

.location-card:hover {
  background: var(--bg-hover);
}

.location-card.selected {
  background: var(--primary-light);
}

/* Colored dot indicator */
.location-card-dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 2px rgba(254, 200, 24, 0.2);
}

.location-card.selected .location-card-dot {
  background: var(--primary-dark);
  box-shadow: 0 0 0 3px rgba(254, 200, 24, 0.3);
}

/* Location info */
.location-card-info {
  flex: 1;
  min-width: 0;
}

.location-card-name {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-card.selected .location-card-name {
  font-weight: 600;
  color: var(--text-primary);
}

/* Hide address for cleaner look */
.location-card-address {
  display: none;
}

/* Checkmark for selected - blue accent */
.location-card-radio {
  width: 20px;
  height: 20px;
  min-width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
}

.location-card.selected .location-card-radio {
  color: var(--blue);
}

.location-card-radio svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

/* Hide legacy icon element */
.location-card-icon {
  display: none;
}

/* Location picker footer with apply button */
.location-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-white);
}

.location-picker-count {
  font-size: 13px;
  color: var(--text-secondary);
}

.btn-apply-locations {
  padding: 10px 24px;
  background: var(--primary);
  color: #1a1a1a;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-apply-locations:hover {
  background: var(--primary-dark);
}

/* Dark mode for location picker */
[data-theme="dark"] .location-picker-modal {
  background: var(--bg-body);
}

[data-theme="dark"] .location-picker-footer {
  background: var(--bg-body);
}

[data-theme="dark"] .location-card:hover {
  background: var(--bg-hover);
}

[data-theme="dark"] .location-card.selected {
  background: var(--bg-white);
}

/* ===== USER MENU ===== */
.user-menu {
  position: relative;
}

.btn-user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  height: 42px;
}

.btn-user-menu:hover {
  background: rgba(254, 200, 24, 0.08);
  border-color: var(--primary);
}

[data-theme="dark"] .btn-user-menu:hover {
  background: rgba(254, 200, 24, 0.1);
}

.btn-user-menu svg:first-child {
  color: var(--primary-dark);
}

[data-theme="dark"] .btn-user-menu svg:first-child {
  color: var(--primary);
}

.user-menu-name {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* User Menu Dropdown */
.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  overflow: hidden;
}

.user-menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-body);
  border-bottom: 1px solid var(--border-color);
}

.user-avatar {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: 50%;
  color: var(--primary-dark);
}

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

.user-display-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-role-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-menu-stats {
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-secondary);
}

.user-menu-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
}

.user-menu-item:hover {
  background: var(--bg-body);
  color: var(--text-primary);
}

.user-menu-item svg {
  flex-shrink: 0;
}

.user-menu-logout {
  color: var(--red);
}

.user-menu-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
}

/* Hide user menu when not logged in */
.user-menu.hidden {
  display: none;
}

/* Mobile User Section */
.mobile-user-section {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.mobile-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.mobile-user-avatar {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: 50%;
  color: var(--primary-dark);
}

.mobile-user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.mobile-user-role {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mobile-logout-btn {
  color: var(--red) !important;
}

.mobile-logout-btn:hover {
  background: rgba(239, 68, 68, 0.1) !important;
}

/* Dark mode user menu */
[data-theme="dark"] .user-menu-dropdown {
  background: var(--bg-secondary);
}

[data-theme="dark"] .user-menu-header {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .user-avatar,
[data-theme="dark"] .mobile-user-avatar {
  background: rgba(254, 200, 24, 0.15);
}

/* ===== API INFO BUTTON & MODAL ===== */
/* Ghost button variant for utility action */
.info-button {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  padding: var(--space-2, 8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.info-button:hover {
  background: var(--bg-tertiary);
  color: var(--primary);
  border-color: var(--primary);
}

.info-button svg {
  width: 20px;
  height: 20px;
}

/* API Info Modal */
.api-info-modal {
  position: fixed;
  top: 80px;
  right: -420px;
  width: 400px;
  max-height: calc(100vh - 100px);
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: right 0.3s ease;
  overflow: hidden;
}

.api-info-modal.active {
  right: var(--space-8, 32px);
}

.api-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4, 16px) var(--space-5, 20px);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

.api-info-header h3 {
  margin: 0;
  font-size: 18px;  /* H3: 18px / 600 per styleguide */
  font-weight: 600;
  color: var(--text-primary);
}

.api-info-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.api-info-close:hover {
  color: var(--text-primary);
}

.api-info-content {
  padding: var(--space-5, 20px);
  overflow-y: auto;
  max-height: calc(100vh - 180px);
}

.api-info-intro {
  color: var(--text-secondary);
  font-size: 14px;  /* Body: 14px / 400 */
  margin: 0 0 var(--space-5, 20px) 0;
}

.api-endpoint-group {
  margin-bottom: var(--space-5, 20px);
  padding-bottom: var(--space-4, 16px);
  border-bottom: 1px solid var(--border);
}

.api-endpoint-group:last-of-type {
  border-bottom: none;
  margin-bottom: var(--space-4, 16px);
}

.api-endpoint-group h4 {
  margin: 0 0 var(--space-3, 12px) 0;
  font-size: 16px;  /* H4: 16px / 600 per styleguide */
  font-weight: 600;
  color: var(--text-primary);
}

.api-endpoint {
  display: flex;
  align-items: center;
  gap: var(--space-2, 8px);
  flex-wrap: wrap;
  margin-bottom: var(--space-2, 8px);
}

.api-endpoint code {
  background: var(--bg-tertiary);
  padding: var(--space-1, 4px) var(--space-2, 8px);
  border-radius: var(--radius-sm, 4px);
  font-size: 12px;  /* Small: 12px / 400 */
  font-family: 'Monaco', 'Menlo', monospace;
  color: var(--info, #3b82f6);
}

.api-arrow {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Neutral styling instead of semantic success green */
.api-backend {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding: var(--space-1, 4px) var(--space-2, 8px);
  border-radius: var(--radius-sm, 4px);
  font-size: 12px;  /* Small: 12px / 400 */
  font-weight: 500;
}

.api-note {
  margin: 0;
  font-size: 12px;  /* Small: 12px / 400 */
  color: var(--text-secondary);
  font-style: italic;
}

.api-note code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: var(--radius-sm, 4px);
  font-size: 11px;
  font-style: normal;
}

.api-validation-note {
  background: var(--bg-tertiary);
  border-left: 3px solid var(--info, #3b82f6);
  padding: var(--space-3, 12px) var(--space-4, 16px);
  border-radius: 0 var(--radius-md, 8px) var(--radius-md, 8px) 0;
  font-size: 13px;
  color: var(--text-primary);
}

.api-validation-note strong {
  color: var(--text-primary);
}

.api-validation-note code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: var(--radius-sm, 4px);
  font-size: 11px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .api-info-modal {
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .api-info-modal.active {
    right: 0;
  }

  .api-info-content {
    max-height: calc(100vh - 60px);
  }
}

/* Dark mode */
[data-theme="dark"] .api-info-modal {
  background: var(--bg-secondary);
}

[data-theme="dark"] .api-endpoint code,
[data-theme="dark"] .api-note code,
[data-theme="dark"] .api-validation-note code {
  background: var(--bg-body);
}

/* ===== MOBILE ZONNEPLAN-INSPIRED LAYOUT ===== */

/* Hide mobile layout on desktop */
.mobile-dashboard {
  display: none;
}

/* Show mobile layout, hide desktop on small screens */
@media (max-width: 768px) {
  /* Light gray background so white cards stand out */
  .dashboard-wrapper {
    background: #f5f5f5;
  }

  .mobile-dashboard {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
  }

  .desktop-only {
    display: none !important;
  }

  .page-header {
    margin-bottom: 16px;
  }

  .page-header h2 {
    font-size: 20px;
  }

  .page-header .subtitle {
    display: none;
  }

  .page-header .info-button {
    display: none;
  }

  .dashboard-content {
    padding: 16px;
    background: #f5f5f5;
  }
}

/* Dark mode mobile background */
@media (max-width: 768px) {
  [data-theme="dark"] .dashboard-wrapper,
  [data-theme="dark"] .dashboard-content {
    background: #1a1a2e;
  }
}

/* ===== MOBILE HERO CARD - Subtle white card like desktop ===== */
.mobile-hero-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  color: var(--text-primary);
  text-align: center;
  border: 1px solid #e5e7eb;
}

.mobile-hero-period {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.mobile-hero-main {
  margin-bottom: 20px;
}

.mobile-hero-value {
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.mobile-hero-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.mobile-hero-meta {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.mobile-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.mobile-hero-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.mobile-hero-stat-change {
  font-size: 16px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.mobile-hero-stat-change.positive {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.mobile-hero-stat-change.negative {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.mobile-hero-stat-change.neutral {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.mobile-hero-stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Dark mode for hero card */
[data-theme="dark"] .mobile-hero-card {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

/* ===== MOBILE PERIOD TOGGLE - Subtle style ===== */
.mobile-period-toggle {
  display: flex;
  background: #ffffff;
  border-radius: 10px;
  padding: 4px;
  border: 1px solid #e5e7eb;
}

.mobile-period-btn {
  flex: 1;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.mobile-period-btn:hover {
  color: var(--text-primary);
  background: #f5f5f5;
}

/* Active state - subtle gray background, not yellow */
.mobile-period-btn.active {
  background: #f3f4f6;
  color: var(--text-primary);
  font-weight: 600;
}

[data-theme="dark"] .mobile-period-toggle {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] .mobile-period-btn:hover {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .mobile-period-btn.active {
  background: var(--bg-tertiary);
}

/* ===== MOBILE CHART ===== */
.mobile-chart-container {
  background: var(--bg-white);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--border-color);
  height: 200px;
}

.mobile-chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

[data-theme="dark"] .mobile-chart-container {
  background: var(--bg-secondary);
}

/* ===== MOBILE CHANNELS ===== */
.mobile-channels {
  background: var(--bg-white);
  border-radius: 16px;
  padding: 16px 20px;
  border: 1px solid var(--border-color);
}

.mobile-channels-header {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.mobile-channel-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.mobile-channel-row:last-child {
  margin-bottom: 0;
}

.mobile-channel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mobile-channel-dot.kiosk,
.mobile-channel-dot.kassa,
.mobile-channel-dot.web {
  background: #FEC818;
}

.mobile-channel-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 60px;
}

.mobile-channel-bar-container {
  flex: 1;
  height: 8px;
  background: var(--bg-body);
  border-radius: 4px;
  overflow: hidden;
}

.mobile-channel-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.mobile-channel-bar.kiosk,
.mobile-channel-bar.kassa,
.mobile-channel-bar.web {
  background: #FEC818;
}

.mobile-channel-pct {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 36px;
  text-align: right;
}

[data-theme="dark"] .mobile-channels {
  background: var(--bg-secondary);
}

[data-theme="dark"] .mobile-channel-bar-container {
  background: var(--bg-body);
}

/* ===== MOBILE DATE PICKER PANEL ===== */
/* Mobile Date Picker - Subtle Design */
.mobile-date-picker {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 320px;
  height: 100vh;
  background: #f5f5f5; /* Light gray base */
  z-index: 2100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}

.mobile-date-picker.active {
  transform: translateX(0);
  visibility: visible;
}

.mobile-date-picker-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.mobile-date-picker-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.mobile-date-picker-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
}

.mobile-date-picker-close:hover {
  background: #e5e7eb;
}

.mobile-date-picker-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

/* Section container */
.mobile-period-section {
  margin-bottom: 24px;
}

.mobile-period-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* Quick period options - 3 column grid */
.mobile-period-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* Period options - white tiles on gray background, subtle style */
.mobile-period-option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.mobile-period-option:hover {
  border-color: #d1d5db;
  background: #fafafa;
}

/* Active state - subtle border accent, not solid fill */
.mobile-period-option.active {
  background: #ffffff;
  border-color: var(--primary);
  border-width: 2px;
  color: var(--text-primary);
}

/* Recent periods list */
.mobile-recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-no-recent {
  color: var(--text-tertiary);
  font-size: 13px;
  text-align: center;
  padding: 16px;
  margin: 0;
}

.mobile-recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.mobile-recent-item:hover {
  border-color: #d1d5db;
  background: #fafafa;
}

.mobile-recent-item-content {
  flex: 1;
}

.mobile-recent-item-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.mobile-recent-item-date {
  font-size: 12px;
  color: var(--text-secondary);
}

.mobile-recent-item-delete {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-tertiary);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
}

.mobile-recent-item-delete:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* Date input cards - white tiles */
.mobile-date-inputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.mobile-date-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #ffffff;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.mobile-date-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mobile-date-field input {
  padding: 8px 0;
  font-size: 16px;
  border: none;
  background: transparent;
  color: var(--text-primary);
}

.mobile-date-field input:focus {
  outline: none;
}

/* Sticky footer for date picker */
.mobile-date-picker-footer {
  padding: 16px 20px;
  background: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 -8px 16px -4px rgba(0, 0, 0, 0.08);
}

/* Apply button - subtle yellow accent */
.mobile-date-apply {
  width: 100%;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  background: #fffbeb;
  color: #92400e;
  border: 1.5px solid #FEC818;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.mobile-date-apply:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  box-shadow: 0 2px 8px rgba(254, 200, 24, 0.3);
}

/* Dark mode */
[data-theme="dark"] .mobile-date-picker {
  background: #1a1a2e;
}

[data-theme="dark"] .mobile-date-picker-footer {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] .mobile-date-picker-header {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] .mobile-period-option {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] .mobile-period-option:hover {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .mobile-period-option.active {
  background: var(--bg-secondary);
}

[data-theme="dark"] .mobile-date-field {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] .mobile-date-apply {
  background: rgba(254, 200, 24, 0.1);
  color: #FEC818;
  border-color: rgba(254, 200, 24, 0.5);
}

[data-theme="dark"] .mobile-date-apply:hover {
  background: rgba(254, 200, 24, 0.2);
  border-color: #FEC818;
}

[data-theme="dark"] .mobile-recent-item {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] .mobile-recent-item:hover {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .mobile-recent-item-delete:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* ===== LOADING OVERLAY ===== */
.dashboard-loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(248, 249, 250, 0.7);
  backdrop-filter: blur(2px);
  z-index: 100;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.dashboard-loading-overlay.active {
  display: flex;
}

.dashboard-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color, #e5e7eb);
  border-top-color: var(--primary, #FEC818);
  border-radius: 50%;
  animation: dashboard-spin 0.7s linear infinite;
}

.dashboard-loading-text {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary, #6b7280);
}

@keyframes dashboard-spin {
  to { transform: rotate(360deg); }
}

[data-theme="dark"] .dashboard-loading-overlay {
  background: rgba(17, 24, 39, 0.7);
}

/* ===== DAY DETAIL MODAL ===== */
.day-detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.day-detail-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.day-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.day-detail-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
}

.day-detail-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  border-radius: 6px;
  font-size: 20px;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.day-detail-close:hover {
  background: #e5e7eb;
  color: #1a1a1a;
}

/* Channel tabs — segmented control style */
.day-detail-tabs {
  padding: 12px 24px 0;
  flex-shrink: 0;
}

.day-detail-tabs-inner {
  display: inline-flex;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.day-detail-tab {
  padding: 6px 16px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.day-detail-tab:hover {
  color: #1a1a1a;
  background: rgba(0, 0, 0, 0.04);
}

.day-detail-tab.active {
  color: #1a1a1a;
  background: #fff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.day-detail-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.day-detail-loading,
.day-detail-empty,
.day-detail-error {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
  font-size: 14px;
}

.day-detail-error {
  color: #dc2626;
}

.day-detail-loading .spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e5e7eb;
  border-top-color: #FEC818;
  border-radius: 50%;
  animation: dashboard-spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

/* Channel sections */
.day-detail-channel {
  margin-bottom: 24px;
}

.day-detail-channel:last-child {
  margin-bottom: 0;
}

.day-detail-channel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 2px solid #FEC818;
  margin-bottom: 8px;
}

.day-detail-channel-name {
  font-weight: 600;
  font-size: 15px;
  color: #1a1a1a;
}

.day-detail-channel-summary {
  font-size: 13px;
  color: #6b7280;
}

/* Table */
.day-detail-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
}

.day-detail-table th {
  text-align: left;
  padding: 6px 8px;
  font-weight: 500;
  color: #9ca3af;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #f3f4f6;
}

/* Fixed column widths: Order | Artikel | Aantal | Excl BTW | BTW | Incl BTW */
.day-detail-table th:nth-child(1),
.day-detail-table td:nth-child(1) { width: 140px; }
.day-detail-table th:nth-child(3),
.day-detail-table td:nth-child(3) { width: 60px; }
.day-detail-table th:nth-child(4),
.day-detail-table td:nth-child(4) { width: 90px; }
.day-detail-table th:nth-child(5),
.day-detail-table td:nth-child(5) { width: 100px; }
.day-detail-table th:nth-child(6),
.day-detail-table td:nth-child(6) { width: 90px; }

.day-detail-table td {
  padding: 5px 8px;
  color: #374151;
  border-bottom: 1px solid #f9fafb;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-detail-table .text-right {
  text-align: right;
}

.day-detail-order-nr {
  font-family: 'SF Mono', 'Monaco', monospace;
  font-size: 11px;
  color: #9ca3af;
  white-space: nowrap;
}

.btw-pct {
  font-size: 10px;
  color: #9ca3af;
}

.day-detail-subtotal td {
  padding-top: 8px;
  font-weight: 600;
  color: #1a1a1a;
  border-top: 1px solid #e5e7eb;
  border-bottom: none;
}

/* Sticky footer */
.day-detail-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 12px 12px;
  gap: 16px;
}

.day-detail-footer-label {
  font-weight: 600;
  font-size: 13px;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 60px;
}

.day-detail-footer-stats {
  display: flex;
  gap: 20px;
  flex: 1;
  justify-content: center;
}

.day-detail-footer-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.day-detail-footer-stat-value {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.day-detail-footer-stat-label {
  font-size: 10px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.day-detail-footer-total {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  min-width: 120px;
  text-align: right;
}

/* Dark mode */
[data-theme="dark"] .day-detail-modal {
  background: var(--bg-white);
}

[data-theme="dark"] .day-detail-header {
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .day-detail-header h3 {
  color: var(--text-primary);
}

[data-theme="dark"] .day-detail-close {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

[data-theme="dark"] .day-detail-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

[data-theme="dark"] .day-detail-tabs-inner {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .day-detail-tab {
  color: var(--text-secondary);
}

[data-theme="dark"] .day-detail-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .day-detail-tab.active {
  color: var(--text-primary);
  background: var(--bg-hover);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .day-detail-channel-name {
  color: var(--text-primary);
}

[data-theme="dark"] .day-detail-channel-summary {
  color: var(--text-secondary);
}

[data-theme="dark"] .day-detail-table th {
  color: var(--text-tertiary);
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .day-detail-table td {
  color: var(--text-primary);
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .day-detail-subtotal td {
  color: var(--text-primary);
  border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .day-detail-footer {
  background: var(--bg-secondary);
  border-top-color: var(--border-color);
}

[data-theme="dark"] .day-detail-footer-label {
  color: var(--text-primary);
}

[data-theme="dark"] .day-detail-footer-stat-value {
  color: var(--text-primary);
}

[data-theme="dark"] .day-detail-footer-stat-label {
  color: var(--text-tertiary);
}

[data-theme="dark"] .day-detail-footer-total {
  color: #f9fafb;
}

/* Responsive */
@media (max-width: 768px) {
  .day-detail-modal {
    max-height: 95vh;
    border-radius: 8px;
  }

  .day-detail-header {
    padding: 16px;
  }

  .day-detail-tabs {
    padding: 12px 16px 0;
  }

  .day-detail-body {
    padding: 16px;
  }

  .day-detail-table {
    font-size: 12px;
  }

  .day-detail-table th,
  .day-detail-table td {
    padding: 4px 4px;
  }

  .day-detail-footer {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .day-detail-footer-stats {
    gap: 12px;
  }

  .day-detail-footer-total {
    font-size: 18px;
  }
}
