/* Sianetic Portal - Custom Styles */

:root {
  --primary-color: #1A1A1A;
  --primary-light: #2A2A2A;
  --accent-color: #4ecdc4;
  --accent-hover: #3dbdb5;
  --success-color: #4CAF50;
  --warning-color: #ffa630;
  --danger-color: #ff6b6b;
  --text-color: #333;
  --text-muted: #7f8c8d;
  --bg-light: #f5f6f8;
  --bg-white: #ffffff;
  --border-color: #e2e5e9;
  --sidebar-width: 250px;
  --navbar-height: 60px;
}

/* Global Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Login Page Styles */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-card {
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  padding: 40px;
}

.login-logo {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo .brand-text {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.login-logo .brand-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.login-form .form-control {
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: 1rem;
}

.login-form .form-control:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.15);
}

.login-form .btn-primary {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.login-form .btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.login-footer {
  text-align: center;
  margin-top: 20px;
}

.login-footer a {
  color: var(--accent-color);
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

.language-toggle-login {
  position: absolute;
  top: 20px;
  right: 20px;
}

/* Portal Layout */
.portal-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation */
.portal-sidebar {
  width: var(--sidebar-width);
  background: var(--primary-color);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform 0.3s ease;
}

.portal-brand {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-brand .brand-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.portal-restaurant-name {
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-restaurant-name strong {
  display: block;
  color: white;
  font-size: 1rem;
  margin-top: 2px;
}

.portal-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.portal-menu::-webkit-scrollbar {
  width: 8px;
}

.portal-menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

.portal-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.portal-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32);
}

.portal-menu li a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.portal-menu li a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.portal-menu li a.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border-left-color: var(--accent-color);
}

.portal-menu li a i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

/* Submenu styles */
.portal-menu .nav-section-label {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
  user-select: none;
}

.portal-menu .nav-section-label:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.portal-menu .nav-section-label.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border-left-color: var(--accent-color);
}

.portal-menu .nav-section-label i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.portal-menu .nav-section-label .nav-chevron {
  margin-left: auto;
  margin-right: 0;
  width: auto;
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.portal-menu .nav-section-label.open .nav-chevron {
  transform: rotate(90deg);
}

.portal-submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.portal-submenu.open {
  max-height: 500px;
}

.portal-submenu li a {
  display: flex;
  align-items: center;
  padding: 10px 20px 10px 52px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.portal-submenu li a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.portal-submenu li a.active {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border-left-color: var(--accent-color);
}

/* Nested submenu (e.g. Bogføring under Integrationer) */
.nav-subsection-label {
  display: flex;
  align-items: center;
  padding: 10px 20px 10px 52px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  user-select: none;
  border-left: 3px solid transparent;
}
.nav-subsection-label:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}
.nav-subsection-label .nav-chevron {
  margin-left: auto;
  font-size: 0.65rem;
  transition: transform 0.2s ease;
}
.nav-subsection-label.open .nav-chevron {
  transform: rotate(90deg);
}
.portal-submenu-nested {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.portal-submenu-nested.open {
  max-height: 200px;
}
.portal-submenu-nested li a {
  padding-left: 68px;
  font-size: 0.85rem;
}

.portal-sidebar-footer {
  padding: 15px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.portal-sidebar-footer .btn {
  flex: 1;
  min-width: 80px;
}

/* Main Content Area */
.portal-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 30px;
  min-height: 100vh;
}

.portal-header {
  margin-bottom: 30px;
}

.portal-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
}

.portal-header p {
  color: var(--text-muted);
  margin: 5px 0 0 0;
}

/* Cards */
.portal-card {
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
}

.portal-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.portal-card-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: var(--primary-color);
}

.portal-card-body {
  padding: 24px;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-card .stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 5px;
}
.stat-card .stat-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
  min-height: 18px;
}

/* Labor % under the revenue tile - a second sub-line, tighter and darker than
   the comparison above it so the two never read as one sentence. */
.stat-card .stat-sub.dashboard-labor-sub {
  margin-top: 2px;
  min-height: 0;
  font-weight: 600;
  color: var(--text-color, #334155);
}

.stat-card.accent {
  background: var(--accent-color);
  color: white;
}

.stat-card.accent .stat-value,
.stat-card.accent .stat-label,
.stat-card.accent .stat-sub {
  color: white;
}

.dashboard-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

/* PortalCharts hourly curve - shared by the dashboard and the org overview.
   The line inherits the surrounding colour (currentColor); only the "now"
   marker gets its own muted treatment so it reads as a reference, not data. */
.pc-hourly { display: block; overflow: visible; }
.pc-hourly-area { fill-opacity: 0.12; }
.pc-hourly-line { vector-effect: non-scaling-stroke; }
.pc-hourly-axis { stroke: rgba(15, 23, 42, 0.12); stroke-width: 1; vector-effect: non-scaling-stroke; }
.pc-hourly-now {
  stroke: rgba(15, 23, 42, 0.35);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  vector-effect: non-scaling-stroke;
}
/* The chart panel lends the curve the portal accent; its title keeps its own. */
.dashboard-panel--chart { color: var(--primary-color); }
.dashboard-hourly-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.dashboard-panel {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px;
}
.dashboard-panel-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 12px;
}
.dashboard-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.dashboard-source-row,
.dashboard-summary-line,
.dashboard-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dashboard-source-row,
.dashboard-summary-line {
  padding: 8px 0;
}
.dashboard-summary-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 2px 0 6px;
}
.aov-kpi-hint {
  margin: -6px 0 14px;
}
.dashboard-source-row + .dashboard-source-row,
.dashboard-summary-line + .dashboard-summary-line,
.dashboard-order-row + .dashboard-order-row {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.dashboard-source-name,
.dashboard-order-name {
  color: var(--text-color);
  font-weight: 600;
}
.dashboard-source-value,
.dashboard-order-amount {
  color: var(--primary-color);
  font-weight: 700;
}
.dashboard-order-row {
  padding: 12px 0;
}
.dashboard-order-meta {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg-white);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.2s ease;
}

.quick-action-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quick-action-btn i {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.quick-action-btn span {
  font-weight: 500;
}

/* Forms */
.form-label {
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 6px;
}

.form-control,
.form-select {
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 10px 14px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.15);
}

/* Buttons */
.btn-portal-primary {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 500;
}

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

.btn-portal-secondary {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 500;
}

.btn-portal-secondary:hover {
  background-color: var(--bg-light);
  border-color: var(--text-muted);
}

/* Alerts */
.alert-portal {
  border-radius: 8px;
  border: none;
  padding: 16px 20px;
}

/* Loading Spinner */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

@media (min-width: 769px) {
  .portal-layout .loading-overlay {
    left: var(--sidebar-width);
  }
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* A start-up that fails (js/portal-common.js requireAuthOrSayWhy): the
   message on the loading screen, or on a panel over a page without one. */
.portal-startup-panel { left: 0 !important; }
/* Solid while it says so: the page behind holds only its built-in values. */
.loading-overlay.portal-startup-failed { background: var(--bg-light, #f8f9fa); }
.portal-startup-failure {
  max-width: 360px; margin: 0 16px; text-align: center; color: var(--text-color);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.portal-startup-failure[hidden] { display: none; }
.portal-startup-failure .bi { font-size: 2rem; color: var(--text-muted); }
.portal-startup-failure p { margin: 0; font-size: 1rem; line-height: 1.45; }

/* What is pinned to the top sits under the admin's impersonation banner:
   --portal-top-offset is its measured height (0px without one), set by
   js/portal-common.js measurePortalTopOffset. The page content itself is
   pushed down by the body's padding, which carries the phone's top bar. */
.portal-sidebar { top: var(--portal-top-offset, 0px); height: calc(100vh - var(--portal-top-offset, 0px)); }
/* In print the banner is hidden, so the room made for it goes too (the
   padding is set on the body by measurePortalTopOffset). */
@media print {
  body.has-imp-banner { padding-top: 0 !important; }
}

/* Mobile Styles */
@media (max-width: 768px) {
  .portal-sidebar {
    transform: translateX(-100%);
  }

  .portal-sidebar.open {
    transform: translateX(0);
  }

  .portal-main {
    margin-left: 0;
    padding: 20px 15px;
  }

  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: var(--primary-color);
    color: white;
    margin: -20px -15px 20px -15px;
  }

  .mobile-menu-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .sidebar-overlay.open {
    display: block;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-card .stat-value {
    font-size: 1.5rem;
  }

  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Utility Classes */
.text-muted {
  color: var(--text-muted) !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mt-3 {
  margin-top: 1rem !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.mb-4 {
  margin-bottom: 1.5rem !important;
}

/* Table Styles */
.table-portal {
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.table-portal th {
  background: var(--bg-light);
  font-weight: 600;
  color: var(--text-color);
  border-bottom: 2px solid var(--border-color);
}

.table-portal td {
  vertical-align: middle;
}

/* Modal Customization */
.modal-content {
  border-radius: 12px;
  border: none;
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: 20px 24px;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 16px 24px;
}

/* Hours Table */
.hours-table {
  width: 100%;
}

.hours-table td {
  padding: 10px 0;
  vertical-align: middle;
}

.hours-table .day-name {
  font-weight: 500;
  width: 120px;
}

.hours-table .time-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hours-table .time-inputs input {
  width: 100px;
}

.hours-table .closed-toggle {
  margin-left: auto;
}

/* Form Switch */
.form-check-input:checked {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

/* Badge */
.badge-portal {
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.8rem;
}

.badge-success {
  background-color: var(--success-color);
  color: white;
}

.badge-warning {
  background-color: var(--warning-color);
  color: white;
}

/* Toast Notifications */
.portal-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 8px;
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10000;
}

.portal-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.portal-toast .toast-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-toast.toast-success {
  background: var(--success-color);
}

.portal-toast.toast-error {
  background: var(--danger-color);
}

.portal-toast.toast-warning {
  background: var(--warning-color);
}

/* Welcome Banner */
.welcome-banner {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 24px;
}

.welcome-banner h1 {
  font-size: 1.75rem;
  margin-bottom: 8px;
}

.welcome-banner p {
  opacity: 0.9;
  margin: 0;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h3 {
  color: var(--text-color);
  margin-bottom: 10px;
}

/* Action Buttons in Cards */
.card-actions {
  display: flex;
  gap: 8px;
}

.card-actions .btn {
  padding: 6px 12px;
  font-size: 0.875rem;
}

/* Responsive adjustments for dashboard */
@media (max-width: 576px) {
  .welcome-banner {
    padding: 20px;
  }

  .welcome-banner h1 {
    font-size: 1.4rem;
  }

  .dashboard-overview-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-toast {
    left: 20px;
    right: 20px;
    bottom: 10px;
  }
}

/* Error States */
.error-state {
  text-align: center;
  padding: 60px 20px;
  background: #fff5f5;
  border-radius: 12px;
  border: 1px solid rgba(255, 107, 107, 0.2);
}

.error-state i {
  font-size: 3rem;
  color: var(--danger-color);
  margin-bottom: 16px;
}

.error-state h3 {
  color: var(--danger-color);
  margin-bottom: 8px;
}

.error-state p {
  color: var(--text-muted);
}

/* Form validation states */
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--danger-color);
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
  border-color: var(--danger-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
}

.invalid-feedback {
  color: var(--danger-color);
  font-size: 0.875rem;
  margin-top: 4px;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Disabled state */
.btn:disabled,
.btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Focus visible for accessibility */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .portal-sidebar,
  .mobile-header,
  .portal-sidebar-footer,
  .btn {
    display: none !important;
  }

  .portal-main {
    margin-left: 0 !important;
    padding: 0 !important;
  }

  .portal-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* Smooth transitions */
.portal-sidebar,
.portal-card,
.stat-card,
.btn,
.form-control,
.form-select {
  transition: all 0.2s ease;
}

/* Better mobile menu */
@media (max-width: 768px) {
  .portal-sidebar {
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  }

  .portal-header h1 {
    font-size: 1.5rem;
  }

  .portal-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .portal-card-header .btn {
    width: 100%;
  }
}

/* ---- Theme Picker (Online Ordering) ---- */
.oo-theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.oo-theme-swatch {
  width: 64px;
  height: 48px;
  border-radius: 10px;
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.oo-theme-option:hover .oo-theme-swatch {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.oo-theme-option input:checked ~ .oo-theme-swatch {
  box-shadow: 0 0 0 3px var(--accent-color);
  transform: scale(1.05);
}
.oo-theme-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}
.oo-theme-option input:checked ~ .oo-theme-label {
  color: var(--text-color);
  font-weight: 600;
}

/* ---- Employee Avatar ---- */
.avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  flex-shrink: 0;
}

.avatar-circle.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.875rem;
}

.avatar-circle.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 1.25rem;
}

/* Page header */
.page-header h1 {
  font-size: 1.75rem;
  margin-bottom: 4px;
  color: var(--text-color);
}

.page-header p {
  font-size: 0.95rem;
}

/* =========================================
   Orders Page
   ========================================= */

.orders-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.orders-header-row h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.3px;
}
/* The line under the title (settings slice 4), as on the other pages. */
.orders-header-row h1 + p {
  margin-top: 4px;
  font-size: 0.95rem;
}
.orders-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  color: var(--text-color);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.orders-refresh-btn:hover { border-color: var(--text-muted); }
.orders-refresh-btn.spinning i { animation: spin 0.8s linear; }

.orders-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
@media (min-width: 768px) {
  .orders-stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}
.orders-stat-tile {
  background: #EBEDF1;
  border-radius: 14px;
  padding: 16px 18px;
  min-height: 88px;
}
.orders-stat-tile .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.orders-stat-tile .value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.4px;
}
@media (min-width: 768px) {
  .orders-stat-tile .value { font-size: 1.85rem; }
}
.orders-stat-tile .sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.orders-stat-tile--list .value {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  line-height: 1.35;
}
.orders-stat-tile--list .value .source-item b {
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px;
}
.orders-stat-tile--list .value .source-item .source-delta {
  margin-left: 6px;
}
@media (min-width: 768px) {
  .orders-stat-tile--list .value { font-size: 1rem; }
}

.orders-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.orders-date-select {
  position: relative;
  flex-shrink: 0;
}
.orders-date-select select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 8px 32px 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  outline: none;
}
.orders-date-select::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.orders-search {
  flex: 1;
  position: relative;
  min-width: 0;
}
.orders-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}
.orders-search input {
  width: 100%;
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  border-radius: 999px;
  padding: 8px 14px 8px 38px;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.orders-search input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.15);
}

.orders-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.orders-pills::-webkit-scrollbar { display: none; }
.orders-pill {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.15s ease;
}
.orders-pill:hover { border-color: var(--text-muted); }
.orders-pill.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.orders-list {
  background: var(--bg-white);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
.order-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.1s ease;
}
.order-row:last-child { border-bottom: none; }
.order-row:hover { background: var(--bg-light); }
.order-row .row-main { min-width: 0; }
.order-row .row-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1rem;
  margin-bottom: 2px;
}
.order-row .row-name-text {
  min-width: 0;
}
.order-row .row-fulfill-time {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}
.order-row .row-fulfill-date {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 0.75;
}
.order-row .row-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.order-row .row-aside {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}
.order-row .row-amount {
  font-weight: 600;
  font-size: 1rem;
  color: var(--primary-color);
}

.source-chip {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1px 8px;
  letter-spacing: 0.01em;
  vertical-align: middle;
  white-space: nowrap;
}

.status-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.status-badge.s-pending     { background: #FFF1DA; color: #B66B0E; }
.status-badge.s-in-progress { background: #DEEBFF; color: #1E5BA8; }
.status-badge.s-completed   { background: #D8EDE0; color: #1F6E3A; }

.orders-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}
.orders-empty i { font-size: 2.5rem; opacity: 0.4; }
.orders-empty h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 8px 0 4px;
  color: var(--text-color);
}
.orders-empty p { font-size: 0.9rem; margin: 0; }

.orders-skeleton .order-row {
  cursor: default;
  pointer-events: none;
}
.orders-skeleton .skeleton-bar {
  display: inline-block;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, #ECEEF2 0%, #F5F6F8 50%, #ECEEF2 100%);
  background-size: 200% 100%;
  animation: skeleton 1.4s ease-in-out infinite;
}
@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =========================================
   Order Detail
   ========================================= */
.order-detail {
  max-width: 720px;
  margin: 0 auto;
}
.order-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}
.order-back-btn {
  background: none;
  border: none;
  padding: 4px 8px 4px 0;
  font-size: 1.4rem;
  color: var(--primary-color);
  cursor: pointer;
  line-height: 1;
}
.order-back-btn:hover { opacity: 0.7; }
.order-detail-header .titles { min-width: 0; flex: 1; }
.order-detail-header .name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0 0 2px;
  line-height: 1.2;
  word-break: break-word;
}
.order-detail-header .order-id {
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.order-stepper {
  display: flex;
  align-items: flex-start;
  margin: 28px 0 24px;
  padding: 0 4px;
}
.order-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}
.order-step .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border-color);
  box-sizing: border-box;
  margin-bottom: 8px;
  z-index: 1;
}
.order-step.done .dot   { background: #2F7548; border-color: #2F7548; }
.order-step.active .dot { background: #1E5BA8; border-color: #1E5BA8; box-shadow: 0 0 0 4px rgba(30, 91, 168, 0.15); }
.order-step.active      { color: #1E5BA8; font-weight: 600; }
.order-step.done        { color: var(--text-color); }
.order-connector {
  position: absolute;
  top: 6px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--border-color);
  z-index: 0;
}
.order-step.done .order-connector  { background: #2F7548; }
.order-step.active .order-connector { background: #1E5BA8; }
.order-step:last-child .order-connector { display: none; }

.detail-info-card {
  background: #EBEDF1;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  position: relative;
}
.detail-info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.95rem;
}
.detail-info-row + .detail-info-row { margin-top: 6px; }
/* "Ønsket 18:00" tucked under the fulfil time on a decided order. Two classes,
   so it beats the 6px sibling rule above. */
.detail-info-row + .detail-info-sub { margin-top: -2px; font-size: 0.82rem; }
.detail-info-row.detail-info-sub .value { color: var(--text-muted); }
.detail-info-row .label { color: var(--text-muted); }
.detail-info-row .value { color: var(--text-color); text-align: right; word-break: break-word; }
.detail-info-row .value a { color: #1E5BA8; text-decoration: none; }
.detail-info-row .value a:hover { text-decoration: underline; }
.detail-info-card .pill-paid,
.detail-info-card .pill-unpaid,
.detail-info-card .pill-pending {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
}
.detail-info-card .pill-paid    { background: #D8EDE0; color: #1F6E3A; }
.detail-info-card .pill-unpaid  { background: #FFE2E2; color: #A12626; }
.detail-info-card .pill-pending { background: #FFF1DA; color: #B66B0E; }

.detail-section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 20px 0 8px;
}
.detail-items {
  list-style: none;
  margin: 0;
  padding: 0;
}
.detail-items li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border-color);
}
.detail-items li:last-child { border-bottom: none; }
.detail-items li .qty   { color: var(--text-color); }
.detail-items li .price { color: var(--text-color); white-space: nowrap; font-variant-numeric: tabular-nums; }
.detail-items li .item-detail {
  display: block;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 3px;
}

.detail-total {
  display: flex;
  justify-content: space-between;
  padding: 12px 0 16px;
  border-top: 2px solid var(--border-color);
  margin-top: 6px;
  font-weight: 700;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.detail-comment {
  background: #EBEDF1;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.95rem;
  color: var(--text-color);
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.detail-action-btn {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.detail-action-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-color);
}
.detail-action-btn.primary {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}
.detail-action-btn.primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  color: white;
}
.detail-print-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 4px 0 0;
  text-align: center;
}

/* Mobile tweaks */
@media (max-width: 480px) {
  .orders-header-row h1     { font-size: 1.4rem; }
  .orders-stat-tile .value  { font-size: 1.4rem; }
  .order-row                { padding: 12px 14px; }
  .order-detail-header .name { font-size: 1.2rem; }
  .order-step               { font-size: 0.7rem; }
}

/* =========================================
   Print stylesheet - receipt only
   ========================================= */
@media print {
  body * { visibility: hidden; }
  #printableReceipt, #printableReceipt * { visibility: visible; }
  #printableReceipt {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 24px 32px;
    color: #000;
    background: #fff;
    font-family: 'Courier New', monospace;
  }
  #printableReceipt .receipt-title {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
  }
  #printableReceipt .receipt-meta {
    text-align: center;
    font-size: 0.85rem;
    margin-bottom: 16px;
  }
  #printableReceipt hr {
    border: none;
    border-top: 1px dashed #000;
    margin: 8px 0;
  }
  #printableReceipt .receipt-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 2px 0;
  }
  #printableReceipt .receipt-total {
    font-weight: 700;
    font-size: 1rem;
    border-top: 1px dashed #000;
    margin-top: 8px;
    padding-top: 6px;
  }
  .portal-sidebar, .mobile-header, .sidebar-overlay,
  .detail-actions, .order-back-btn, .order-stepper,
  .orders-toolbar, .orders-pills, .orders-stats-grid,
  .orders-header-row, .impersonationBanner, #impersonationBanner { display: none !important; }
}

/* ============================================================
   MOBILE POLISH - added 2026-05-05
   Scoped under @media (max-width) so desktop layout is untouched.
   ============================================================ */

@media (max-width: 768px) {
  /* Layout fix: .portal-layout is display:flex (row) by default. The
     mobile-header is injected as a sibling of .portal-main, so without
     stacking it renders as a left column. */
  .portal-layout { flex-direction: column; }

  /* mobile-header was originally written assuming it sat inside
     .portal-main's 20px/15px padding (negative margins to flush to edge).
     It's actually a sibling of .portal-main, so reset to 0. */
  .mobile-header { margin: 0; }

  /* Sidebar drawer must sit above the overlay (overlay has z-index: 999) */
  .portal-sidebar { z-index: 1000; }

  /* Tap targets - meet iOS 44pt minimum */
  .btn-portal-primary,
  .btn-portal-secondary,
  .btn,
  .view-toggle button,
  .mobile-menu-btn { min-height: 44px; }

  /* Prevent iOS zoom-on-focus (requires font-size >= 16px).
     Matches Bootstrap form-control specificity, plus a same-specificity
     override for the page-level rule in profile.html. */
  .form-control,
  .form-select,
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea,
  #hoursTableBody input[type="time"] { font-size: 16px; }

  /* Forms: full-width controls feel more native on phones */
  .copy-hours-row { flex-wrap: wrap; }
  .copy-hours-row select { max-width: 100%; flex: 1 1 auto; }
}

@media (max-width: 480px) {
  /* Page titles shouldn't wrap awkwardly on small phones */
  .portal-header h1 { font-size: 1.25rem; }
  .portal-header p { font-size: 0.9rem; }

  /* Reclaim card interior space (padded elements are body/header, not the card itself) */
  .portal-card-body { padding: 16px; }
  .portal-card-header { padding: 14px 16px; }

  /* Stats grid: collapse to single column so cards aren't cramped */
  .stats-grid { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: 1fr; }
}

/* ---------- Sales page ---------- */
.sales-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.sales-segmented {
  display: inline-flex;
  background: #EBEDF1;
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
.sales-seg-btn {
  border: 0;
  background: transparent;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.sales-seg-btn:hover { color: var(--text-color); }
.sales-seg-btn.active {
  background: var(--bg-white);
  color: var(--primary-color);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.sales-segmented--sm { padding: 3px; }
.sales-segmented--sm .sales-trend-btn,
.sales-segmented--sm .sales-bucket-btn {
  border: 0;
  background: transparent;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.sales-segmented--sm .sales-trend-btn:hover,
.sales-segmented--sm .sales-bucket-btn:hover { color: var(--text-color); }
.sales-segmented--sm .sales-trend-btn.active,
.sales-segmented--sm .sales-bucket-btn.active {
  background: var(--bg-white);
  color: var(--primary-color);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.sales-trend-controls {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.sales-compare-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-color);
  cursor: pointer;
  user-select: none;
}
.sales-compare-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.sales-delta {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 500;
}
.sales-delta--up    { color: var(--success-color); }
.sales-delta--down  { color: var(--danger-color); }
.sales-delta--flat  { color: var(--text-muted); }
.sales-delta-prev {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: 6px;
}
.sales-delta-prev::before {
  content: '·';
  margin-right: 6px;
  opacity: 0.6;
}

.sales-charts-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
@media (min-width: 992px) {
  .sales-charts-row { grid-template-columns: 2fr 1fr; }
}
.sales-card { margin-bottom: 0; }
.sales-card .portal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sales-card-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.sales-chart-wrap {
  position: relative;
  height: 280px;
}
.sales-chart-wrap--donut { height: 200px; }

.sales-source-legend {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sales-legend-row {
  display: grid;
  grid-template-columns: 14px 1fr auto auto;
  gap: 10px;
  align-items: center;
  font-size: 0.85rem;
}
.sales-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}
.sales-legend-label { color: var(--text-color); }
.sales-legend-value { color: var(--text-color); font-weight: 600; }
.sales-legend-pct   { color: var(--text-muted); min-width: 36px; text-align: right; }

.sales-empty-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 12px 0;
}

.sales-type-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sales-type-row { display: flex; flex-direction: column; gap: 6px; }
.sales-type-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.9rem;
}
.sales-type-name { font-weight: 600; color: var(--text-color); }
.sales-type-meta { color: var(--text-color); font-weight: 600; }
.sales-type-meta .muted { color: var(--text-muted); font-weight: 400; margin-left: 2px; }
.sales-type-track {
  height: 10px;
  border-radius: 999px;
  background: #EBEDF1;
  overflow: hidden;
}
.sales-type-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

@media (max-width: 480px) {
  .sales-toolbar { gap: 10px; }
  .sales-segmented { width: 100%; justify-content: space-between; }
  .sales-seg-btn { flex: 1; padding: 7px 8px; font-size: 0.82rem; }
  .sales-chart-wrap { height: 220px; }
}

/* ============ Live Orders page ============ */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #D8EDE0;
  color: #1F6E3A;
  font-size: 0.78rem;
  font-weight: 600;
  vertical-align: middle;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2E9E5B;
  animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.8); }
}
a.live-history-link { text-decoration: none; }

.live-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 10px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.live-completed-count {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg-light);
  font-size: 0.78rem;
  font-weight: 600;
}

.live-chip {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}
.live-chip--ok     { background: #D8EDE0; color: #1F6E3A; }
.live-chip--due    { background: #FFF1DA; color: #B66B0E; }
.live-chip--late   { background: #FFE2E2; color: #A12626; }
.live-chip--muted  { background: var(--bg-light); color: var(--text-muted); }
.live-chip--unpaid { background: #FFE2E2; color: #A12626; }

.order-row--late { box-shadow: inset 3px 0 0 #D64545; }

.orders-list--completed .order-row { opacity: 0.72; }
.orders-list--completed .order-row:hover { opacity: 1; }
.live-completed-empty {
  padding: 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.live-stat-late { color: #A12626; }

/* ============ Analytics Overview ============ */
.orders-stat-tile .aov-spark-wrap { margin: 4px 0 2px; line-height: 0; }
.aov-spark { width: 100%; height: 26px; color: #4ECDC4; display: block; }
.aov-spark-empty { color: #cbd5e1; font-size: 1rem; }
.aov-changed { display: flex; flex-direction: column; gap: 12px; }
.aov-changed-row { border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
.aov-changed-row:last-child { border-bottom: none; padding-bottom: 0; }
.aov-changed-main { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.aov-changed-name { font-weight: 600; font-size: 0.92rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aov-changed-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.aov-heatmap-scroll { overflow-x: auto; }
.aov-heat { min-width: 560px; display: block; color: #4ECDC4; }
.pc-heat-label { fill: var(--text-muted); }
.aov-top-list { display: flex; flex-direction: column; gap: 10px; }
.aov-top-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.aov-top-name { font-weight: 600; font-size: 0.92rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aov-top-meta { font-size: 0.85rem; white-space: nowrap; }
.aov-timing { display: flex; flex-direction: column; gap: 16px; }
.aov-timing-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); }
.aov-timing-big { font-size: 1.8rem; font-weight: 700; line-height: 1.2; }
.aov-timing-split .aov-changed-sub { margin-top: 4px; }

/* ============ Order Desk (manual intake) ============ */
/* Footnote under a KPI row when rejected / unanswered orders were left out. */
.excluded-orders-note { font-size: 0.78rem; color: var(--text-muted); margin: -8px 0 16px; }
.status-badge.s-awaiting { background: #E9E3FF; color: #5B3CC4; }
.status-badge.s-rejected { background: #FFE2E2; color: #A12626; }
.status-badge.s-cancelled { background: #ECECEC; color: #4A4A4A; text-decoration: line-through; }
.live-section-label--new { color: #5B3CC4; }
@media (min-width: 768px) {
  .orders-stats-grid.live-stats--with-new { grid-template-columns: repeat(5, 1fr); }
}
.order-reject-banner {
  background: #FFE2E2;
  color: #A12626;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 20px 0 16px;
}
.order-reject-title { font-weight: 700; }
.order-reject-note { margin-top: 4px; color: var(--text-color); white-space: pre-wrap; word-break: break-word; }

/* ============ Order Desk slice 5b: accept / reject on the live detail ============ */
.order-decision {
  background: var(--bg-white);
  border: 1px solid #D9D0FF;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 20px 0 16px;
}
.decision-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.decision-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--bg-white);
  color: var(--text-color);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}
.decision-chip.active { border-color: #5B3CC4; background: #E9E3FF; color: #5B3CC4; }
.decision-chip:disabled { opacity: 0.55; cursor: not-allowed; }
.decision-chip--wish { flex-basis: 100%; justify-content: space-between; border-radius: 12px; }
.decision-chip-why { font-size: 0.8rem; color: #A12626; }
.decision-chip--other { margin: 0; }
.decision-other-input {
  width: 72px;
  padding: 4px 6px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
}
.decision-other-input.is-invalid { border-color: #A12626; background: #FFF5F5; }
.decision-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.decision-btn {
  flex: 1 1 160px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-white);
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.decision-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.decision-btn--accept { background: #1F6E3A; border-color: #1F6E3A; color: #fff; }
.decision-btn--reject { color: #A12626; border-color: #F2B8B8; }
.decision-reasons { border: 0; padding: 0; margin: 0 0 12px; }
.decision-legend { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); margin-bottom: 8px; }
.decision-reason { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.decision-reason input { width: 18px; height: 18px; }
.decision-note { margin-bottom: 12px; }
.decision-note-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  resize: vertical;
}
.decision-note-count { text-align: right; font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

/* ═══════════════════════════════════════════════════════════════════
   Tables ("Borde") - table-service setup: zones, floor plan editor
   Geometry rules: shared/table-layout.js (room 600×340 units, grid 10)
   ═══════════════════════════════════════════════════════════════════ */
.tbl-status { font-size: 0.85rem; color: var(--text-muted); min-height: 1.4em; }
.tbl-status.saving { color: var(--warning-color); }
.tbl-status.saved { color: var(--success-color); }

.tbl-add-zone { display: flex; gap: 8px; align-items: center; }
.tbl-add-zone input { width: 220px; max-width: 60vw; }

.tbl-zone-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--border-color); border-radius: 10px; margin-bottom: 8px;
  background: var(--bg-white);
}
.tbl-zone-row.selected { border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.15); }
.tbl-zone-pick { border: 0; background: none; color: var(--accent-color); font-size: 1.1rem; padding: 0 2px; line-height: 1; }
.tbl-zone-name { max-width: 260px; }
.tbl-zone-count { color: var(--text-muted); font-size: 0.85rem; white-space: nowrap; flex: 1; }
.tbl-zone-actions { display: flex; gap: 4px; }

.tbl-zone-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tbl-zone-tab {
  border: 1px solid var(--border-color); background: var(--bg-light); color: var(--text-color);
  border-radius: 10px; padding: 8px 16px; font-weight: 600; font-size: 0.9rem;
}
.tbl-zone-tab.on { background: var(--accent-color); border-color: var(--accent-color); color: #fff; }

.tbl-editor { display: flex; gap: 20px; align-items: flex-start; }
.tbl-floor-wrap { flex: 1 1 0; min-width: 0; }
.tbl-side { flex: 0 0 300px; max-width: 100%; }

.tbl-floor {
  position: relative; width: 100%; overflow: hidden;
  border: 1px solid var(--border-color); border-radius: 14px;
  background-color: #1a1a1a;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  touch-action: none; user-select: none;
}
.tbl-room { position: absolute; left: 0; top: 0; width: 600px; height: 340px; transform-origin: top left; }
.tbl-floor-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.55); font-size: 0.95rem; padding: 20px; text-align: center; pointer-events: none;
}

.tbl-table {
  position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #2a2a2a; border: 1.5px solid #4a4a4a; color: #e6e6e6; cursor: grab;
  touch-action: none; user-select: none; outline: none;
}
.tbl-table.rect { border-radius: 10px; }
.tbl-table.round { border-radius: 50%; }
.tbl-table.section { border-radius: 4px; }
.tbl-table.selected { border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.35); z-index: 2; }
.tbl-table.dragging { cursor: grabbing; opacity: 0.9; z-index: 3; }
.tbl-table:focus-visible { box-shadow: 0 0 0 3px rgba(255, 166, 48, 0.6); }
.tbl-table-name { font-size: 20px; font-weight: 700; line-height: 1.05; }
.tbl-table-seats { font-size: 11px; opacity: 0.65; margin-top: 2px; }
.tbl-handle {
  position: absolute; right: -7px; bottom: -7px; width: 16px; height: 16px; border-radius: 4px;
  background: var(--accent-color); border: 2px solid #fff; cursor: nwse-resize;
}

.tbl-side-title { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); margin-bottom: 8px; }
.tbl-list { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; margin-bottom: 16px; }
.tbl-list-row {
  display: flex; align-items: center; gap: 8px; text-align: left; width: 100%;
  border: 1px solid var(--border-color); background: var(--bg-white); border-radius: 8px; padding: 6px 10px;
}
.tbl-list-row.selected { border-color: var(--accent-color); background: rgba(78, 205, 196, 0.08); }
.tbl-list-row.inactive .tbl-list-name { color: var(--text-muted); text-decoration: line-through; }
.tbl-list-name { font-weight: 600; min-width: 36px; }
.tbl-list-meta { color: var(--text-muted); font-size: 0.82rem; flex: 1; }
.tbl-props { border-top: 1px solid var(--border-color); padding-top: 12px; }
.tbl-props .form-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 2px; }
.tbl-props-title { font-weight: 600; margin-bottom: 8px; }
.tbl-empty { color: var(--text-muted); font-size: 0.9rem; padding: 8px 0; }

@media (max-width: 992px) {
  .tbl-editor { flex-direction: column; }
  .tbl-side { flex-basis: auto; width: 100%; }
}

/* ── Borde page: the Bookinger tab (js/portal-bookings.js) ─────────── */
.bk-daybar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bk-day-label { font-weight: 700; font-size: 1.05rem; margin: 0 4px; white-space: nowrap; }
.bk-date { width: auto; }
.bk-today { text-decoration: none; color: var(--text-muted); }
.bk-today:disabled { visibility: hidden; }
.bk-spacer { flex: 1; }
.bk-search { width: 200px; }
.bk-summary { margin-top: 14px; font-size: 0.95rem; }
.bk-summary:empty { display: none; }
.bk-warn { color: #b26a00; }
.bk-strip-label, .bk-group { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #9aa3ab; }
.bk-strip-label { margin-top: 14px; }
.bk-strip { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.bk-slot { border: 1px solid var(--border-color); border-radius: 8px; padding: 6px 10px; min-width: 62px; text-align: center; background: var(--bg-white); }
.bk-slot-time { font-size: 0.72rem; color: var(--text-muted); }
.bk-slot-guests { font-weight: 700; font-size: 1rem; }
.bk-slot-bar { height: 4px; border-radius: 2px; background: #e9ecef; margin-top: 4px; overflow: hidden; }
.bk-slot-bar i { display: block; height: 100%; background: var(--accent-color); }

.bk-group { margin: 4px 0 8px; }
.bk-fold { display: flex; align-items: center; gap: 6px; margin-top: 18px; padding: 4px 0; border: 0; background: none; color: #6b7480; cursor: pointer; }
.bk-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 14px; align-items: center;
          background: #fafbfc; border: 1px solid var(--border-color); border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; }
.bk-row-open { cursor: pointer; }
.bk-row-open:hover, .bk-row-open:focus-visible { border-color: var(--accent-color); outline: none; }
.bk-row-done { background: var(--bg-white); }
.bk-row-done .bk-name { font-weight: 500; }
.bk-time { font-weight: 700; font-size: 1.1rem; line-height: 1.2; }
.bk-size { color: var(--text-muted); font-size: 0.85rem; margin-top: 2px; }
.bk-who { min-width: 0; }
.bk-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-hitdate { color: var(--text-muted); font-weight: 400; font-size: 0.85rem; margin-left: 6px; }
/* "Online": a booking the guest made under Book bord. Information, not a warning: grey, not amber. */
.bk-online { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid #ced4da; border-radius: 999px;
             font-size: 0.7rem; font-weight: 500; line-height: 1.5; color: #6b7480; vertical-align: 1px; }
.bk-line { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-notable { color: #b26a00; }
.bk-note { color: #555; }
.bk-end { text-align: right; white-space: nowrap; font-size: 0.85rem; color: var(--text-muted); }
.bk-outcome { color: #555; }
.bk-end:empty { display: none; }
.bk-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.bk-dot.sat { background: var(--accent-color); }
.bk-dot.noshow { background: var(--danger-color); }
.bk-dot.cancel { background: #adb5bd; }
.bk-empty { color: var(--text-muted); text-align: center; padding: 32px 12px; }
.bk-empty-small { padding: 12px; text-align: left; }

.bk-optional { font-weight: 400; color: var(--text-muted); }
.bk-zone { font-size: 0.72rem; color: var(--text-muted); margin: 6px 0 4px; }
.bk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bk-chip { border: 1px solid #ced4da; border-radius: 999px; padding: 4px 12px; font-size: 0.82rem; background: var(--bg-white); color: var(--text-color); }
.bk-chip small { color: var(--text-muted); }
.bk-chip small, .bk-tl-label small { margin-left: 4px; white-space: nowrap; }
.bk-chip.on { background: #e8f8f6; border-color: var(--accent-color); color: #1c7a73; font-weight: 600; }
.bk-clash { background: #fff8e6; border: 1px solid #f3dca0; color: #7a5600; border-radius: 6px; padding: 8px 10px; font-size: 0.84rem; margin-top: 8px; }
.bk-clash-ok { margin-top: 2px; }
.bk-final { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-color); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bk-final-hint { font-size: 0.78rem; color: var(--text-muted); margin-right: auto; }

/* Tidslinje: tables down, hours across */
.bk-view .sales-seg-btn { padding: 5px 16px; font-size: 0.82rem; }
/* width 0 + min-width 100%: the wide timeline scrolls inside its box and never widens the page */
.bk-tl-scroll { width: 0; min-width: 100%; overflow-x: auto; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-white); }
.bk-tl-row { display: grid; grid-template-columns: 112px 1fr; border-top: 1px solid var(--border-color); }
.bk-tl-row:first-child { border-top: 0; }
.bk-tl-label { position: sticky; left: 0; z-index: 3; padding: 0 10px; font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; gap: 6px;
               background: #fafbfc; border-right: 1px solid var(--border-color); }
.bk-tl-label small { font-weight: 400; color: var(--text-muted); }
.bk-tl-track { position: relative; cursor: copy;
               background-image: linear-gradient(to right, var(--border-color) 1px, transparent 1px), linear-gradient(to right, #f1f3f5 1px, transparent 1px);
               background-size: calc(100% / var(--bk-hours)) 100%, calc(100% / (var(--bk-hours) * 2)) 100%; }
.bk-tl-head .bk-tl-track { height: 26px; background: #fafbfc; cursor: default; }
.bk-tl-head .bk-tl-label { font-weight: 400; color: var(--text-muted); font-size: 0.72rem; }
.bk-tl-hour { position: absolute; top: 5px; font-size: 0.72rem; color: var(--text-muted); transform: translateX(4px); }
.bk-tl-zone { border-top: 1px solid var(--border-color); background: var(--bg-light); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em;
              text-transform: uppercase; color: #9aa3ab; padding: 4px 0; }
.bk-tl-zone span { position: sticky; left: 10px; }
.bk-tl-shade { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(0,0,0,0.035) 0 6px, rgba(0,0,0,0.07) 6px 12px); pointer-events: none; }
.bk-tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger-color); z-index: 2; pointer-events: none; }
.bk-tl-drop { background-color: #e8f8f6; }
/* the booking a click would make: an outline from the quarter under the pointer, the standard length long */
.bk-tl-hover { position: absolute; top: 5px; height: 30px; border-radius: 6px; padding: 0 8px; z-index: 2; pointer-events: none;
               display: flex; align-items: center; font-size: 0.78rem; font-weight: 700; white-space: nowrap; overflow: hidden;
               background: rgba(232, 248, 246, 0.85); border: 1px dashed var(--accent-color); color: #1c7a73; }
.bk-bar { position: absolute; height: 30px; border-radius: 6px; padding: 0 8px; font-size: 0.78rem; font-weight: 600; z-index: 1;
          display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; user-select: none;
          background: #e8f8f6; border: 1px solid var(--accent-color); color: #1c7a73; }
.bk-bar small { font-weight: 400; opacity: 0.85; }
.bk-bar.sat { background: var(--accent-color); color: #fff; }
.bk-bar.notable { background: #fff8e6; border-color: #f0c869; color: #7a5600; }
.bk-bar.clash { background: #fdecec; border-color: #ef9a9a; color: #a62b2b; }
.bk-bar-drag { cursor: grab; touch-action: pan-x pan-y; }
.bk-bar-drag:hover, .bk-bar-drag:focus-visible { box-shadow: 0 1px 4px rgba(0,0,0,0.18); outline: none; }
.bk-bar-lifted { opacity: 0.35; }
.bk-bar-ghost { cursor: grabbing; box-shadow: 0 6px 16px rgba(0,0,0,0.25); }
.bk-undo { position: sticky; bottom: 16px; margin: 12px auto 0; width: fit-content; max-width: 100%; display: flex; align-items: center; gap: 8px;
           background: var(--primary-color); color: #fff; border-radius: 8px; padding: 8px 8px 8px 14px; font-size: 0.88rem; box-shadow: 0 6px 16px rgba(0,0,0,0.2); }
.bk-undo .btn-link { color: var(--accent-color); font-weight: 600; text-decoration: none; }

@media (max-width: 576px) {
  .bk-row { grid-template-columns: 60px minmax(0, 1fr); }
  .bk-end { grid-column: 2; text-align: left; }
  .bk-spacer { display: none; }
  .bk-search { flex: 1; width: auto; min-width: 140px; }
}

/* Settings gear (js/portal-settings-gear.js): the round button top right on
   every page, its panel, and the "Her er den" mark on a landed setting.
   z-order: sidebar 1000 < gear 1040 < backdrop 1044 < panel 1045 < Bootstrap
   modal 1050/1055 < loading overlay 9999. */

/* Room in the title row, so a page's own buttons never sit under the gear. */
@media (min-width: 768px) {
  .page-header, .portal-header, .orders-header-row, .schedule-header { padding-right: 56px; }
  .welcome-banner { padding-right: 86px; }
}

.sg-gear {
  position: fixed; top: 18px; right: 20px; z-index: 1040;
  width: 40px; height: 40px; border-radius: 999px; padding: 0;
  border: 1px solid var(--border-color); background: var(--bg-white); color: var(--primary-color);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); cursor: pointer;
  transition: box-shadow 0.2s ease, background-color 0.15s ease, color 0.15s ease;
}
.sg-gear:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14); }
.sg-gear.sg-scrolled { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.sg-gear.sg-open { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.sg-gear:focus-visible, .sg-gear-mobile:focus-visible { outline: 3px solid var(--accent-color); outline-offset: 2px; }

/* Phone: the gear sits in the dark top bar, beside the language toggle. */
.sg-mobile-actions { display: flex; align-items: center; gap: 6px; }
.sg-gear-mobile {
  width: 44px; height: 44px; border-radius: 999px; border: 0; padding: 0;
  background: none; color: #fff; font-size: 1.25rem;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.sg-gear-mobile:hover, .sg-gear-mobile.sg-open { background: rgba(255, 255, 255, 0.12); }
@media (max-width: 767.98px) {
  .sg-gear { display: none; }
  body.sg-locked { overflow: hidden; }
}

/* The panel: a sheet from the right, the whole screen on a phone. */
.sg-backdrop {
  position: fixed; inset: 0; top: var(--portal-top-offset, 0px); z-index: 1044; background: rgba(0, 0, 0, 0.32);
  opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}
.sg-backdrop.sg-show { opacity: 1; visibility: visible; transition: opacity 0.2s ease; }
.sg-panel {
  --sg-soft: #e6f8f6;
  position: fixed; top: var(--portal-top-offset, 0px); right: 0; bottom: 0; z-index: 1045;
  width: 380px; max-width: 100%; background: var(--bg-white);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12);
  display: flex; flex-direction: column; color: var(--text-color);
  transform: translateX(100%); visibility: hidden;
  transition: transform 0.22s ease, visibility 0s linear 0.22s;
}
.sg-panel.sg-show { transform: none; visibility: visible; transition: transform 0.22s ease; }
@media (max-width: 767.98px) { .sg-panel { width: 100%; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) {
  .sg-panel, .sg-panel.sg-show, .sg-backdrop, .sg-backdrop.sg-show { transition: none; }
}

.sg-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 10px 16px; }
.sg-title { font-size: 1.05rem; font-weight: 700; margin: 0; color: var(--text-color); }
.sg-close {
  width: 36px; height: 36px; border: 0; border-radius: 8px; background: none; color: #9aa3ab;
  font-size: 1.05rem; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.sg-close:hover { background: var(--bg-light); color: var(--text-color); }

.sg-search {
  margin: 0 16px 12px; border: 1px solid #ced4da; border-radius: 8px; padding: 0 10px;
  display: flex; align-items: center; gap: 8px; color: #9aa3ab;
}
.sg-search:focus-within { border-color: var(--accent-color); box-shadow: 0 0 0 3px var(--sg-soft); }
.sg-search-input {
  flex: 1; min-width: 0; border: 0; outline: none; background: none;
  padding: 8px 0; font-size: 0.875rem; color: var(--text-color); font-family: inherit;
}
@media (max-width: 767.98px) { .sg-search-input { font-size: 16px; } } /* no iOS zoom on focus */

.sg-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 16px; border-top: 1px solid var(--border-color); }
.sg-body > :first-child { border-top: 0; }
.sg-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.sg-group { border-top: 1px solid var(--border-color); }
.sg-group-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted);
}
.sg-group-head .n { margin-left: auto; font-weight: 500; text-transform: none; letter-spacing: 0; }
.sg-here { background: var(--sg-soft); }
.sg-here .sg-group-head { color: #1c8f87; }
.sg-now .sg-group-head { color: #b36b00; }

.sg-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 16px;
  font-size: 0.9rem; color: var(--text-color); text-decoration: none; text-align: left;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}
a.sg-row:hover { background: rgba(0, 0, 0, 0.035); color: var(--text-color); }
.sg-row:focus-visible, .sg-cat:focus-visible, .sg-lang-btn:focus-visible, .sg-switch:focus-visible,
.sg-close:focus-visible, .sg-empty a:focus-visible {
  outline: 2px solid var(--accent-color); outline-offset: -2px;
}
.sg-switch:focus-visible { outline-offset: 2px; }
.sg-name { flex: 1; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.sg-row-switch .sg-name { cursor: pointer; }
.sg-name small { display: block; color: var(--text-muted); font-size: 0.76rem; margin-top: 1px; }
.sg-name mark { background: #fff1b8; color: inherit; padding: 0 1px; border-radius: 2px; }
.sg-valslot { display: inline-flex; max-width: 50%; }
.sg-val { color: var(--text-muted); font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-go { color: #b9c0c7; font-size: 0.8rem; flex: none; }
.sg-pill { font-size: 0.72rem; font-weight: 600; border-radius: 999px; padding: 2px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-pill.on { background: #e7f6e8; color: #2e7d32; }
.sg-pill.off { background: #eef0f2; color: #6b757d; }
.sg-pill.warn { background: #fff1dc; color: #b36b00; }
.sg-saved { color: var(--success-color); font-size: 0.76rem; font-weight: 600; white-space: nowrap; }
.sg-saved[hidden] { display: none; }

/* A real checkbox, drawn as the board's switch. */
.sg-switch {
  -webkit-appearance: none; appearance: none; flex: none; margin: 0; cursor: pointer;
  width: 36px; height: 20px; border-radius: 999px; background-color: #cfd4da;
  background-image: radial-gradient(circle, #fff 0 7px, transparent 7.5px);
  background-size: 20px 20px; background-repeat: no-repeat; background-position: left center;
  transition: background-color 0.15s ease, background-position 0.15s ease;
}
.sg-switch:checked { background-color: var(--accent-color); background-position: right center; }
.sg-switch:disabled { opacity: 0.5; cursor: default; }
@media (prefers-reduced-motion: reduce) { .sg-switch { transition: none; } }

.sg-lang { display: inline-flex; flex: none; }
.sg-lang-btn {
  border: 1px solid #ced4da; background: var(--bg-white); color: var(--text-color);
  font-size: 0.75rem; font-weight: 600; padding: 3px 10px; cursor: pointer; font-family: inherit;
}
.sg-lang-btn:first-child { border-radius: 6px 0 0 6px; }
.sg-lang-btn:last-child { border-radius: 0 6px 6px 0; border-left: 0; }
.sg-lang-btn.active { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }

/* Categories: folded rows that open in place. */
.sg-cat {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 16px;
  font-size: 0.92rem; font-weight: 600; color: var(--text-color); text-align: left;
  background: none; border: 0; border-top: 1px solid var(--border-color); font-family: inherit; cursor: pointer;
}
button.sg-cat:hover { background: rgba(0, 0, 0, 0.035); }
.sg-cat .ic { width: 20px; color: var(--text-muted); flex: none; }
.sg-cat-label { flex: 1; min-width: 0; }
.sg-cat .n { color: var(--text-muted); font-weight: 400; font-size: 0.8rem; white-space: nowrap; }
.sg-cat .chev { color: #b9c0c7; font-size: 0.8rem; transition: transform 0.15s ease; }
.sg-cat.expanded .chev { transform: rotate(180deg); }
.sg-cat.locked { color: #b0b7be; font-weight: 500; cursor: default; }
.sg-cat.locked .ic { color: #b0b7be; }
.sg-cat.locked .n { font-size: 0.76rem; color: #9aa3ab; }
.sg-cat-rows { background: #fafbfc; }
.sg-cat-rows .sg-row { padding-left: 46px; }

.sg-empty { padding: 22px 16px; text-align: center; color: var(--text-muted); font-size: 0.88rem; border-top: 1px solid var(--border-color); }
.sg-empty strong { color: var(--text-color); font-weight: 600; overflow-wrap: anywhere; }
.sg-empty-help { font-size: 0.8rem; margin-top: 4px; }
.sg-empty a { color: inherit; }

/* Landing: the setting is marked for a couple of seconds. The ring and the
   tag are drawn outside the box, so nothing on the page moves. */
.settings-flash {
  position: relative; border-radius: 6px; background-color: #e6f8f6;
  box-shadow: 0 0 0 6px #e6f8f6, 0 0 0 8px var(--accent-color);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.settings-flash[data-settings-flash]::before {
  content: "\21B3\00a0" attr(data-settings-flash);
  position: absolute; right: 4px; top: -18px; z-index: 5; /* a badge on the ring */
  background: #1c8f87; color: #fff; font-size: 0.72rem; font-weight: 600; line-height: 1;
  padding: 4px 9px; border-radius: 999px; white-space: nowrap; pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { .settings-flash { transition: none; } }

/* The number of setup steps still open, on both gears (board part 1). */
/* (.sg-gear is position: fixed already, so the badge sits on it as is.) */
.sg-gear-mobile { position: relative; }
.sg-badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px; border: 2px solid var(--bg-white); background: var(--warning-color); color: #fff;
  font-size: 0.66rem; font-weight: 700; line-height: 1; font-style: normal;
  display: inline-flex; align-items: center; justify-content: center; pointer-events: none;
}
.sg-gear-mobile .sg-badge { top: 3px; right: 3px; border-color: var(--primary-color); }

/* "Kom godt i gang" above Lige nu (board part 7). */
.sg-setup[hidden] { display: none; }
.sg-body > .sg-setup[hidden] + * { border-top: 0; } /* the first group shown keeps no line on top */
.sg-setup-row { padding: 12px 16px; }
.sg-setup-row .sg-name strong { font-weight: 700; }

@media print {
  .sg-gear, .sg-gear-mobile, .sg-backdrop, .sg-panel { display: none !important; }
}

/* Setup checklist ("Kom godt i gang", js/portal-setup.js): a card under the
   welcome banner while steps are open (board part 6). The ring is shared with
   the gear's row. No overflow:hidden on the card, so the "Her er den" mark on
   its header is never clipped. */
#setupCard[hidden] { display: none; }

.su-ring {
  --su-pct: 0%;
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--accent-color) 0 var(--su-pct), #e8ebee var(--su-pct) 100%);
}
.su-ring > span {
  width: 38px; height: 38px; border-radius: 50%; background: var(--bg-white); color: var(--text-color);
  display: flex; align-items: center; justify-content: center; font-size: 0.74rem; font-weight: 700;
}
.su-ring.sm { width: 34px; height: 34px; }
.su-ring.sm > span { width: 26px; height: 26px; font-size: 0.62rem; }

/* Row on every width (the portal stacks card headers on a phone; not this one). */
.su-card .su-top { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 16px 18px 12px; border-bottom: 0; }
/* The title keeps room on a phone; a long "Vis på forsiden igen" goes to the next line instead. */
.su-head { flex: 1 1 170px; min-width: 0; }
.su-card .su-title { margin: 0; font-size: 1.1rem; font-weight: 600; color: var(--primary-color); }
.su-title:focus { outline: none; }
.su-sub { margin: 2px 0 0; font-size: 0.84rem; color: var(--text-muted); }

/* Quiet text buttons: Skjul, Spring over, Fortryd. */
.su-quiet {
  border: 0; background: none; padding: 4px 6px; margin: 0; border-radius: 6px;
  font-size: 0.8rem; color: var(--text-muted); font-family: inherit; white-space: nowrap; cursor: pointer;
}
.su-quiet:hover { color: var(--text-color); text-decoration: underline; }
.su-quiet:disabled { opacity: 0.55; cursor: default; text-decoration: none; }
.su-hide { margin-left: auto; align-self: flex-start; }

.su-steps { list-style: none; margin: 0; padding: 0; }
.su-step {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  padding: 11px 18px; border-top: 1px solid var(--border-color); font-size: 0.92rem;
}
.su-step:last-child { border-radius: 0 0 12px 12px; }
.su-step.next { background: #e6f8f6; }
.su-tick {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cfd4da; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 0.95rem; color: #fff;
}
.su-step.next .su-tick { border-color: var(--accent-color); }
.su-step.done .su-tick { background: var(--success-color); border-color: var(--success-color); }
.su-step.skipped .su-tick { background: #cfd4da; border-color: #cfd4da; }
.su-t { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.su-t small { display: block; color: var(--text-muted); font-size: 0.78rem; margin-top: 1px; }
.su-step.done .su-label { color: #9aa3ab; text-decoration: line-through; }
.su-step.skipped .su-label { color: var(--text-muted); }
.su-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.su-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.su-btn {
  display: inline-flex; align-items: center; border: 1px solid #ced4da; background: var(--bg-white);
  color: var(--text-color); border-radius: 6px; padding: 6px 12px; font-size: 0.84rem; line-height: 1.2;
  font-family: inherit; white-space: nowrap; text-decoration: none; cursor: pointer;
}
.su-btn:hover { background: var(--bg-light); color: var(--text-color); }
.su-btn.primary { background: var(--accent-color); border-color: var(--accent-color); color: #fff; font-weight: 600; }
.su-btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.su-btn:disabled, .su-btn.disabled { opacity: 0.55; pointer-events: none; }
.su-btn:focus-visible, .su-quiet:focus-visible, .su-swatch:focus-visible {
  outline: 2px solid var(--primary-color); outline-offset: 2px;
}

/* Step 6: the page's preset colours, answered on the card. */
.su-swatches { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.su-swatch {
  width: 24px; height: 24px; border-radius: 50%; padding: 0; flex: none; cursor: pointer;
  border: 2px solid var(--bg-white); box-shadow: 0 0 0 1px #d5dade;
}
.su-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--primary-color); }
.su-swatch-std {
  width: auto; border-radius: 999px; padding: 0 9px; border: 1px solid #ced4da; box-shadow: none;
  background: var(--bg-white); color: var(--text-color); font-size: 0.74rem; font-family: inherit;
}
.su-swatch-std[aria-pressed="true"] { border-color: var(--primary-color); box-shadow: 0 0 0 1px var(--primary-color); }

/* "I er klar": shown once, the page view the last step was ticked. */
.su-done-card {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px; padding: 14px 18px;
  border: 1px solid #cfe9d0; background: #f3fbf3; border-radius: 12px; font-size: 0.92rem;
}
.su-done-card > i { color: var(--success-color); font-size: 1.4rem; flex: none; }

/* Phone: the actions go under the step, in line with its text. */
@media (max-width: 575.98px) {
  .su-card .su-top { padding: 14px 14px 10px; gap: 12px; }
  .su-step { padding: 11px 14px; }
  .su-actions { flex-basis: 100%; margin-left: 0; padding-left: 34px; }
  /* All eight colours on one line at 360 px. */
  .su-swatches { gap: 5px; }
  .su-swatch { height: 22px; }
  .su-swatch:not(.su-swatch-std) { width: 22px; }
  .su-swatch-std { padding: 0 7px; }
}

/* ── Online ordering: saves as you go (js/portal-online-ordering.js saveGroup) ── */
/* The row status: inline after the row's label, so it never moves the field. */
.oo-row-status {
  display: inline; margin-left: 10px; font-size: 0.76rem; font-weight: 600; line-height: 1.4;
  vertical-align: baseline; color: var(--text-muted); white-space: nowrap;
}
.oo-row-status:empty { display: none; }
.oo-row-status.faded { visibility: hidden; }
.oo-row-status.saving { font-weight: 500; }
.oo-row-status.saved { color: #2e7d32; }
.oo-row-status.invalid, .oo-row-status.failed { color: #c62828; }
/* A failed or waiting save is a long message: on its own line under the label. */
.oo-row-status.failed, .oo-row-status.waiting { display: block; margin: 2px 0 6px; white-space: normal; }
.oo-row-status.waiting { color: #8a5300; }

/* Before the settings have loaded nothing can be changed (the column is inert). */
.oo-settings-col.oo-not-loaded { opacity: 0.55; pointer-events: none; transition: opacity 0.2s; }
.oo-not-loaded-note a { font-weight: 600; white-space: nowrap; }
.oo-row-retry {
  background: none; border: 0; padding: 0; margin: 0; color: inherit; font: inherit; font-weight: 700;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer; white-space: nowrap;
}
.oo-row-retry:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; border-radius: 2px; }
.portal-card-header .oo-row-status { margin-left: 12px; }
.oo-row-error { font-size: 0.78rem; color: #c62828; margin-top: 4px; }

/* "Fortryd": the dark message bottom right for the switches customers notice. */
.oo-undo {
  position: fixed; right: 20px; bottom: 20px; z-index: 10001; display: flex; align-items: center; gap: 16px;
  max-width: 440px; background: #1f2428; color: #fff; border-radius: 10px; padding: 11px 14px;
  font-size: 0.88rem; line-height: 1.4; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.oo-undo button {
  flex: none; background: none; border: 0; padding: 0; color: #fff; font: inherit; font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.oo-undo button:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 3px; border-radius: 2px; }
@media (max-width: 575.98px) {
  .oo-undo { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}

/* Manual → automatic refused: the way to the orders stays in one piece. */
#oo-manualIntakeBlocked a { white-space: nowrap; }

/* Where the Save button was. */
.oo-saves-at-once { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 24px; }
.oo-saves-at-once .bi { color: var(--success-color); }

/* Order controls bar (js/portal-order-controls.js): what customers meet right
   now and Travlt / Afhentningstider / Ingen flere i dag / Pause, under the
   Live ordrer title. Board part A. z-order: box 1030 < gear 1040 < sheet
   backdrop 1041 < sheet 1042 < gear backdrop 1044 / panel 1045. */
.oc-wrap { position: relative; margin: 0 0 18px; }
.oc-bar {
  border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-white);
  padding: 10px 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.oc-bar--busy { border-color: #f6cf96; background: #fffaf2; }
.oc-bar--stopped, .oc-bar--paused { border-color: #f3b9bb; background: #fff7f7; }
.oc-status { flex: 1 1 260px; min-width: 0; display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.oc-pill {
  font-size: 0.78rem; font-weight: 700; border-radius: 999px; padding: 4px 10px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.oc-pill .oc-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.oc-pill--on { background: #e7f6e8; color: #2e7d32; }
.oc-pill--off { background: #eef0f2; color: #6b757d; }
.oc-pill--warn { background: #fff1dc; color: #b36b00; }
.oc-pill--stop { background: #fdecec; color: #b3261e; }
.oc-pill--wait { background: #eef0f2; color: #6b757d; font-weight: 600; }
.oc-txt { font-size: 0.86rem; color: #5b6670; line-height: 1.4; }
.oc-txt b { color: var(--text-color); font-weight: 700; }
.oc-link { color: var(--text-muted); text-decoration: none; font-weight: 600; white-space: nowrap; }
.oc-link:hover { color: var(--text-color); text-decoration: underline; }
.oc-link .bi { font-size: 0.72rem; }
.oc-buttons { display: flex; gap: 12px 8px; flex-wrap: wrap; justify-content: flex-end; }
.oc-btn {
  border: 1px solid #ced4da; background: var(--bg-white); color: var(--text-color); border-radius: 8px;
  padding: 7px 12px; font-size: 0.86rem; font-family: inherit; white-space: nowrap; line-height: 1.3;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
}
.oc-btn:hover:not(:disabled) { border-color: var(--text-muted); }
.oc-btn:disabled { cursor: default; opacity: 0.6; }
.oc-btn:focus-visible, .oc-chip:focus-visible, .oc-dark:focus-visible, .oc-quiet:focus-visible, .oc-sheet-close:focus-visible {
  outline: 2px solid var(--primary-color); outline-offset: 2px;
}
.oc-btn--warn { background: #fff1dc; border-color: #f6cf96; color: #8a5300; font-weight: 600; }
.oc-btn--stop { background: #fdecec; border-color: #f3b9bb; color: #b3261e; font-weight: 600; }
.oc-btn[aria-expanded="true"] { border-color: var(--primary-color); box-shadow: 0 0 0 1px var(--primary-color); }
/* The gear's "Her er den" on a bar button: the ring stays with its box open,
   and the tag sits on the button's top edge, so it reaches no further up than
   the 12px gap above (the status, or the row of buttons above it). */
.oc-btn.settings-flash[aria-expanded="true"] { box-shadow: 0 0 0 6px #e6f8f6, 0 0 0 8px var(--accent-color); }
.oc-btn.settings-flash[data-settings-flash]::before { top: -11px; right: 6px; }
.oc-msg { margin-top: 6px; font-size: 0.8rem; color: #8a5300; }
.oc-msg--err { color: #c62828; }

/* The boxes under the buttons */
.oc-box {
  position: absolute; z-index: 1030; width: 320px; max-width: 100%; background: var(--bg-white);
  border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12); padding: 14px;
}
.oc-box[hidden] { display: none; }
.oc-box-title { margin: 0 0 4px; font-size: 0.98rem; font-weight: 700; }
.oc-box-desc { margin: 0 0 4px; font-size: 0.8rem; color: var(--text-muted); line-height: 1.45; }
.oc-field-label { display: block; font-size: 0.78rem; font-weight: 600; margin: 10px 0 6px; }
.oc-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.oc-chip {
  border: 1px solid #ced4da; border-radius: 999px; padding: 5px 12px; font-size: 0.84rem; background: var(--bg-white);
  color: var(--text-color); font-family: inherit; cursor: pointer; line-height: 1.3;
}
.oc-chip.sel, .oc-chip[aria-pressed="true"] { background: var(--primary-color); border-color: var(--primary-color); color: #fff; font-weight: 600; }
.oc-chip:disabled { opacity: 0.45; cursor: default; }
.oc-input {
  border: 1px solid #ced4da; border-radius: 8px; padding: 7px 10px; font-size: 0.86rem; background: var(--bg-white);
  display: block; width: 100%; color: var(--text-color); font-family: inherit;
}
.oc-input:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px #e6f8f6; }
.oc-input--time { width: 130px; }
textarea.oc-input { resize: vertical; min-height: 52px; }
.oc-at-row[hidden] { display: none; }
.oc-at-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.oc-box-keep { margin: 8px 0 0; font-size: 0.8rem; color: var(--text-muted); }
.oc-box-keep[hidden], .oc-chip[hidden] { display: none; }
/* "Ret": change a lever that is on, next to its words in the status. */
.oc-edit {
  border: 0; background: none; padding: 0 2px; margin-left: 2px; font: inherit; font-size: 0.84rem; font-weight: 600;
  color: var(--text-color); text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.oc-edit:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; border-radius: 2px; }
/* Another lever that is on, under the one the status leads with. */
.oc-also { flex-basis: 100%; font-size: 0.8rem; color: #5b6670; line-height: 1.4; }
.oc-also b { color: var(--text-color); }
.oc-also .oc-edit { font-size: 0.8rem; }
.oc-box-msg { margin-top: 10px; font-size: 0.8rem; color: #c62828; line-height: 1.4; }
.oc-box-msg--wait { color: #8a5300; }
.oc-box-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.oc-dark, .oc-quiet {
  border-radius: 8px; padding: 7px 12px; font-size: 0.86rem; font-family: inherit; cursor: pointer; white-space: nowrap;
}
.oc-dark { background: var(--primary-color); border: 1px solid var(--primary-color); color: #fff; font-weight: 600; }
.oc-dark:disabled { opacity: 0.6; cursor: default; }
.oc-quiet { background: none; border: 1px solid transparent; color: var(--text-muted); }
.oc-quiet:hover { color: var(--text-color); }

/* Afhentningstider: the sheet from the right */
.oc-sheet-backdrop { position: fixed; inset: 0; top: var(--portal-top-offset, 0px); z-index: 1041; background: rgba(0, 0, 0, 0.25); }
.oc-sheet-backdrop[hidden], .oc-sheet[hidden] { display: none; }
.oc-sheet {
  position: fixed; top: var(--portal-top-offset, 0px); right: 0; bottom: 0; z-index: 1042; width: 440px; max-width: 100%;
  background: var(--bg-white); box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15); display: flex; flex-direction: column;
}
.oc-sheet-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 6px; }
.oc-sheet-title { margin: 0; font-size: 1.05rem; font-weight: 700; }
.oc-sheet-close { border: 0; background: none; color: var(--text-muted); font-size: 1.05rem; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.oc-sheet-close:hover { color: var(--text-color); background: var(--bg-light); }
.oc-sheet-body { padding: 4px 16px 20px; overflow-y: auto; flex: 1 1 auto; min-height: 0; position: relative; }
body.oc-sheet-open { overflow: hidden; }
/* The days stay in view while the times scroll. */
.oc-sc-dates { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; padding: 8px 0; position: sticky; top: -4px; z-index: 1; background: var(--bg-white); }
.oc-sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; }
.oc-sc-msg { margin-top: 10px; font-size: 0.8rem; color: #8a5300; }
.oc-sc-legend { display: flex; gap: 6px 12px; flex-wrap: wrap; font-size: 0.74rem; color: var(--text-muted); margin-top: 14px; }
.oc-sc-help { font-size: 0.78rem; color: var(--text-muted); margin: 12px 0; line-height: 1.45; }
.oc-sc-refresh { font-size: 0.8rem; padding: 4px 10px; }
/* The slot cells (moved with the grid from online-ordering.html) */
.oo-sc-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; }
.oo-sc-slot {
  min-width: 0; padding: 7px 4px; border-radius: 8px; border: 1px solid #ccc; background: #fff;
  font-size: 0.8rem; font-weight: 600; line-height: 1.3; text-align: center; cursor: pointer; color: var(--text-color);
}
.oo-sc-slot .oo-sc-load { display: block; font-size: 0.68rem; font-weight: 400; opacity: 0.75; }
.oo-sc-slot.oo-sc-open { background: #e8f5e9; border-color: #a5d6a7; }
.oo-sc-slot.oo-sc-nearly { background: #fff8e1; border-color: #ffd54f; }
.oo-sc-slot.oo-sc-full { background: #ffebee; border-color: #ef9a9a; }
.oo-sc-slot.oo-sc-blocked { background: #37474f; border-color: #37474f; color: #fff; text-decoration: line-through; }
.oo-sc-slot.oo-sc-forced { background: #e8f5e9; border: 2px solid #2e7d32; }
.oo-sc-slot.oo-sc-blocked .oo-sc-load { text-decoration: none; opacity: 0.6; }
.oo-sc-slot.oo-sc-past { opacity: 0.4; cursor: default; }
.oo-sc-slot:disabled { cursor: default; }

/* Phone: the status on top, the four buttons two by two, the box full width,
   the sheet the whole screen. */
@media (max-width: 575.98px) {
  .oc-status { flex-basis: 100%; }
  .oc-buttons { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .oc-buttons .oc-btn { width: 100%; padding: 8px 6px; font-size: 0.82rem; gap: 5px; }
  .oc-box { left: 0 !important; right: 0; width: auto; }
  .oc-sheet { width: 100%; }
}
