/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--font-sm);
  letter-spacing: 0.02em;
  transition: all var(--transition-normal);
  min-height: 44px;
  min-width: 44px;
  border: none;
  cursor: pointer;
  user-select: none;
  white-space: normal;
  text-align: center;
  word-break: normal;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

.btn:active {
  transform: scale(0.97);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--on-brand);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 6px 20px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.btn-danger {
  background: var(--error);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(255,107,107,0.3);
}

.btn-danger:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(255,107,107,0.4);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: var(--font-xs);
  min-height: 36px;
  border-radius: var(--radius-sm);
}

.btn-full {
  width: 100%;
}

.btn-icon {
  padding: 10px;
  min-height: 44px;
  min-width: 44px;
}

/* ===== CARDS ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: all var(--transition-normal);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

.card-glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all var(--transition-normal);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.card-glass:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}
/* Solid hero cards keep their gradient on hover — swapping to --surface-hover
   would blank them to white (e.g. the Rewards points balance card). */
.card-glass:not(.hero-solid):hover {
  background: var(--surface-hover);
}
.card-glass.hero-solid:hover {
  filter: brightness(1.04);
}

.card-glass-sm {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Chosen state for the tappable tiles in the booking wizards: date chips, time
   slots, collection type, urgency, mode and payment. Also reused (without
   cursor:pointer) for the read-only summary chips on the confirm steps.
   Overrides border-color rather than border-width so selecting a tile cannot
   shift the layout, and uses theme tokens so it survives light mode and the
   font-size zoom. */
.tile-selected,
.tile-selected:hover {
  border-color: var(--primary);
  background: var(--primary-surface);
  box-shadow: 0 0 0 3px var(--primary-glow);
  color: var(--text-primary);
}

/* ===== INPUTS ===== */
.input {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: var(--font-md);
  transition: all var(--transition-fast);
  min-height: 44px;
}

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

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

.input-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.input-group .input {
  padding-left: 48px;
}

.input-group .input-prefix {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: var(--font-md);
  pointer-events: none;
}

.input-label {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-secondary);
}

.input-error .input {
  border-color: var(--error);
}

.input-error-message {
  color: var(--error);
  font-size: var(--font-xs);
}

/* ===== OTP INPUT ===== */
.otp-input {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}

.otp-input input {
  width: 56px;
  height: 64px;
  text-align: center;
  font-size: var(--font-2xl);
  font-weight: 700;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: all var(--transition-fast);
  caret-color: var(--primary);
}

.otp-input input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.otp-input input.filled {
  border-color: var(--primary);
  background: var(--primary-surface);
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Semantic pills are SOLID fills with white text: a tinted background carrying
   same-hue text ("green on green", "orange on green") reads as invisible on
   phone screens, so text and background are always different in nature. */
.badge-success {
  background: var(--success);
  color: #FFFFFF;
}

.badge-error {
  background: var(--error);
  color: #FFFFFF;
}

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

.badge-info {
  background: var(--info);
  color: #FFFFFF;
}

/* "Coming Soon" gate (Admin → Settings → Feature availability). A gated
   control stays visible so customers know it is coming, but is greyed and
   cannot be activated. The pill is OUTLINED (per the owner's reference) and
   kept legible even though its host is dimmed. */
.coming-soon-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

.coming-soon {
  position: relative;
  opacity: 0.55;
  filter: grayscale(0.35);
  cursor: not-allowed;
}

.coming-soon .coming-soon-pill {
  opacity: 1;
  filter: none;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  /* Float the sheet off the bottom edge so its full card (and bottom action)
     is visible instead of looking sliced by the screen edge. */
  padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom, 0px));
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  padding-bottom: calc(var(--space-lg) + env(safe-area-inset-bottom, 0px));
  width: 100%;
  max-width: 480px;
  max-height: calc(85 * var(--vh));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(100%);
  transition: transform var(--transition-slow);
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.modal-title {
  font-size: var(--font-xl);
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 18px;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--surface-hover);
  color: var(--text);
}

/* The sheet's own exit. Separated by a rule so it reads as the dialog's control
   rather than as one more action belonging to the form above it. */
.modal-footer-close {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  top: var(--space-lg);
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: var(--font-sm);
  font-weight: 600;
  z-index: var(--z-toast);
  transition: transform var(--transition-slow);
  max-width: calc(100 * var(--vw) - 32px);
  text-align: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast-success {
  background: var(--success);
  color: #FFFFFF;
  border: 1px solid color-mix(in srgb, #FFFFFF 30%, transparent);
}

.toast-error {
  background: var(--error);
  color: #FFFFFF;
  border: 1px solid color-mix(in srgb, #FFFFFF 30%, transparent);
}

.toast-info {
  background: var(--info);
  color: #FFFFFF;
  border: 1px solid color-mix(in srgb, #FFFFFF 30%, transparent);
}

.toast-warning {
  background: var(--warning);
  color: #FFFFFF;
  border: 1px solid color-mix(in srgb, #FFFFFF 30%, transparent);
}

/* ===== SPINNER ===== */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

/* ===== SKELETON ===== */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s ease infinite;
  border-radius: var(--radius-sm);
}

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

.skeleton-text {
  height: 16px;
  margin-bottom: var(--space-sm);
}

.skeleton-text:last-child {
  width: 60%;
}

.skeleton-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

/* ===== BOTTOM NAV ===== */
.nav-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: var(--z-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  transition: all var(--transition-fast);
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  position: relative;
}

.nav-item .nav-icon {
  font-size: 22px;
  transition: transform var(--transition-fast);
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.active .nav-icon {
  transform: scale(1.1);
}

.nav-item .nav-badge {
  position: absolute;
  top: 2px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--error);
  color: #FFF;
  font-size: 9px;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== SIDEBAR NAV ===== */
.nav-sidebar {
  width: 280px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: var(--z-nav);
  padding: var(--space-lg) var(--space-md);
  transition: transform var(--transition-slow);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}
.nav-sidebar::-webkit-scrollbar {
  width: 6px;
}
.nav-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-lg);
}

.sidebar-brand-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-brand-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.sidebar-brand-text {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--text);
}

.sidebar-brand-textcol {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-brand-tagline {
  font-size: 11px;
  line-height: 1.3;
  color: var(--text-muted);
  margin-top: 2px;
}

.install-banner-tagline {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 1px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding-bottom: 80px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: var(--font-sm);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.sidebar-item:hover {
  background: var(--surface);
  color: var(--text);
}

.sidebar-item.active {
  background: var(--primary-surface);
  color: var(--primary-dark);
  font-weight: 600;
}

.sidebar-item-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.sidebar-section-title {
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-md) 14px var(--space-sm);
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.sidebar-item .nav-badge {
  margin-left: auto;
}

/* Hide app chrome outside the authenticated app shell (e.g. login). */
body:not(.app-shell) .nav-sidebar,
body:not(.app-shell) .nav-bottom {
  display: none;
}

/* ===== OFFLINE BANNER ===== */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--warning);
  color: #1A1A2E;
  font-size: var(--font-sm);
  font-weight: 600;
  z-index: var(--z-toast);
}

.offline-banner.visible {
  display: flex;
}

/* ===== NOT FOUND ===== */
.notfound-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  min-height: calc(80 * var(--vh));
  text-align: center;
  padding: var(--space-xl);
}

.notfound-code {
  font-size: 72px;
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--primary);
  line-height: 1;
}

.notfound-title {
  font-size: var(--font-2xl);
  font-weight: 700;
}

.notfound-desc {
  color: var(--text-secondary);
  max-width: 360px;
}

/* ===== LIST CARD ===== */
.list-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  cursor: pointer;
}

.list-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.list-card-img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  overflow: hidden;
}

.list-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.list-card-title {
  font-weight: 600;
  font-size: var(--font-md);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-card-subtitle {
  font-size: var(--font-sm);
  color: var(--text-secondary);
}

.list-card-price {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: var(--font-md);
}

.list-card-price-old {
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: line-through;
  font-size: var(--font-sm);
  margin-left: var(--space-sm);
}

.list-card-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
}

/* ===== TABS ===== */
.tab-bar {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding-bottom: var(--space-sm);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tab-bar::-webkit-scrollbar {
  display: none;
}

.tab {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: var(--font-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition-fast);
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  min-height: 36px;
  display: flex;
  align-items: center;
}

.tab.active {
  background: var(--primary);
  color: var(--on-brand);
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}

.tab:hover:not(.active) {
  background: var(--surface-hover);
}

/* ===== QUANTITY CONTROL ===== */
.qty-control {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.qty-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  transition: all var(--transition-fast);
}

.qty-btn:hover {
  background: var(--surface-hover);
}

.qty-btn:active {
  transform: scale(0.9);
}

.qty-val {
  width: 40px;
  text-align: center;
  font-weight: 700;
  font-size: var(--font-md);
}

/* ===== UPLOAD AREA ===== */
.upload-area {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-2xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  background: var(--surface);
}

.upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-surface);
}

.upload-area.dragover {
  border-color: var(--primary);
  background: var(--primary-surface);
  transform: scale(1.01);
}

.upload-area-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
}

.upload-area-text {
  font-size: var(--font-md);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.upload-area-hint {
  font-size: var(--font-sm);
  color: var(--text-muted);
}

/* ===== TIMELINE ===== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  position: relative;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-strong);
  flex-shrink: 0;
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

.timeline-item.completed .timeline-dot {
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
}

.timeline-item.active .timeline-dot {
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
}

.timeline-line {
  position: absolute;
  left: 5px;
  top: 20px;
  bottom: -4px;
  width: 2px;
  background: var(--border);
}

.timeline-item:last-child .timeline-line {
  display: none;
}

.timeline-item.completed .timeline-line {
  background: var(--primary);
}

.timeline-content {
  flex: 1;
}

.timeline-title {
  font-weight: 600;
  font-size: var(--font-sm);
}

.timeline-date {
  font-size: var(--font-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

.timeline-desc {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

/* ===== ORDER TRACKING PROGRESS ===== */
.track-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}
.track-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light, var(--primary)));
  transition: width 0.4s ease;
}
.track-progress-bar.cancelled {
  background: var(--error);
}

/* ===== PROFILE ===== */
.profile-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 14px var(--space-lg);
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.profile-item:hover {
  background: var(--surface);
  color: var(--text);
}

.profile-item-icon {
  width: 20px;
  text-align: center;
  font-size: 18px;
}

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

.profile-item-logout {
  color: var(--error);
}

.profile-item-logout:hover {
  background: var(--error-surface);
}

/* ===== SEARCH BOX ===== */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box .search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  font-size: 18px;
  pointer-events: none;
}

.search-box .input {
  padding-left: 48px;
  padding-right: 48px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
}

.search-box .search-clear {
  position: absolute;
  right: 8px;
  width: 32px;
  height: 32px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.search-box .search-clear.visible {
  display: flex;
}

.search-box .search-clear:hover {
  background: var(--surface-hover);
  color: var(--text);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
  animation: fadeIn var(--transition-normal) ease;
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: var(--space-lg);
  opacity: 0.5;
}

.empty-state-title {
  font-size: var(--font-xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.empty-state-desc {
  font-size: var(--font-md);
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  max-width: 280px;
}

/* ===== STATUS BAR ===== */
.status-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--font-xs);
  font-weight: 600;
  width: fit-content;
}

.status-online {
  background: var(--success);
  color: #FFFFFF;
}

.status-offline {
  background: var(--error);
  color: #FFFFFF;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* ===== CART ===== */
.cart-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.cart-item-remove {
  color: var(--text-muted);
  font-size: 18px;
  transition: color var(--transition-fast);
  align-self: flex-start;
}

.cart-item-remove:hover {
  color: var(--error);
}

.cart-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.cart-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  font-size: var(--font-sm);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  padding-top: var(--space-md);
  margin-top: var(--space-sm);
  border-top: 1px solid var(--border);
  font-weight: 700;
  font-size: var(--font-lg);
}

/* ===== FORMS ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-label {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input {
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: var(--font-md);
  transition: all var(--transition-fast);
}

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

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* ===== TABLE ===== */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  font-size: var(--font-sm);
  border-bottom: 1px solid var(--border);
}

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

.data-table tr:hover td {
  background: var(--surface);
}

/* ===== ALERTS ===== */
.alert {
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  font-size: var(--font-sm);
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.alert-success {
  background: var(--success);
  color: #FFFFFF;
  border: 1px solid color-mix(in srgb, #FFFFFF 30%, transparent);
}

.alert-error {
  background: var(--error);
  color: #FFFFFF;
  border: 1px solid color-mix(in srgb, #FFFFFF 30%, transparent);
}

.alert-warning {
  background: var(--warning);
  color: #FFFFFF;
  border: 1px solid color-mix(in srgb, #FFFFFF 30%, transparent);
}

/* ===== STAT CARDS ===== */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.stat-value {
  font-size: var(--font-3xl);
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-change {
  font-size: var(--font-xs);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.stat-change.positive {
  color: var(--success);
}

.stat-change.negative {
  color: var(--error);
}

/* ===== INSTALL BANNER ===== */
.install-banner {
  position: fixed;
  bottom: 80px;
  left: var(--space-md);
  right: var(--space-md);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  display: none;
  align-items: center;
  gap: var(--space-md);
  z-index: var(--z-dropdown);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 48px rgba(0, 214, 143, 0.25), 0 4px 16px rgba(0,0,0,0.15);
  animation: slideUp var(--transition-normal) ease;
}

.install-banner.visible {
  display: flex;
}

.install-banner-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.install-banner-info {
  flex: 1;
}

.install-banner-title {
  font-weight: 700;
  font-size: var(--font-sm);
}

.install-banner-desc {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

.install-banner .btn-sm {
  flex-shrink: 0;
}

.install-banner-close {
  color: var(--text-muted);
  font-size: 16px;
  padding: 4px;
}

/* ===== MISC ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.section-title {
  font-size: var(--font-xl);
  font-weight: 700;
}

.section-link {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--primary);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-md) 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

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

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-error { color: var(--error); }

/* ===== REPORTS ===== */
.report-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.summary-card.warning {
  border-color: var(--warning);
  background: var(--warning-surface);
}

.summary-label {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.summary-value {
  font-size: var(--font-2xl);
  font-weight: 700;
  color: var(--primary);
}

.report-section {
  margin-bottom: var(--space-xl);
}

.report-section .section-title {
  font-size: var(--font-lg);
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text);
}

.table-header {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--surface-active);
  font-weight: 600;
  font-size: var(--font-sm);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.table-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
  font-size: var(--font-sm);
}

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

.table-row.warning {
  background: var(--warning-surface);
}

.table-cell {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─────────────────────────────────────────────────────────────────────────
   Premium theme layer (v3.5) — calm clinical design system.
   Placed last so it wins the cascade over the legacy component rules above
   without touching every screen file. Tokens live in variables.css.
   ───────────────────────────────────────────────────────────────────────── */

.btn {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-full);
  min-height: 44px;
  padding: 12px 22px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
              background-color var(--transition-fast), color var(--transition-fast),
              border-color var(--transition-fast);
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn-sm { min-height: 36px; padding: 8px 16px; font-size: var(--font-sm); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #FFFFFF;
  border: none;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: var(--shadow-glow);
  filter: brightness(1.04);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) { background: var(--surface-hover); border-color: var(--border-strong); }

.btn-danger {
  background: var(--error);
  color: #FFFFFF;
  border: 1px solid transparent;
}
.btn-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--error) 84%, #000000); color: #FFFFFF; }

.card,
.card-glass,
.card-glass-sm {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.card:hover,
.card-glass:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.card-glass-sm { border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }

.badge {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.badge-success { background: var(--success); color: #FFFFFF; }
.badge-error   { background: var(--error);   color: #FFFFFF; }
.badge-warning { background: var(--warning); color: #FFFFFF; }
.badge-info    { background: var(--info);    color: #FFFFFF; }

.input,
.form-input,
.form-textarea,
select.input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  min-height: 44px;
  padding: 12px 14px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}
.input:focus,
.form-input:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-surface);
  outline: none;
}
.input::placeholder, .form-input::placeholder { color: var(--text-muted); }

.tab-bar { gap: var(--space-sm); }
.tab {
  font-family: var(--font-display);
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 9px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.tab:hover:not(.active) { background: var(--surface-hover); color: var(--text); }
.tab.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  color: var(--on-brand);
  box-shadow: var(--shadow-sm);
}

.nav-bottom {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(16,24,40,0.06);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-item {
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}
.nav-item.active { color: var(--primary-dark); background: var(--primary-surface); }
.nav-item.active .nav-icon { transform: translateY(-1px); }

.nav-sidebar {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-right: 1px solid var(--border);
}
.sidebar-item {
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
.sidebar-item:hover { background: var(--surface-hover); }
.sidebar-item.active {
  background: var(--primary-surface);
  color: var(--primary-dark);
  font-weight: 600;
}

.list-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.list-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.list-card-img {
  background: linear-gradient(135deg, var(--primary-surface), var(--info-surface));
  border-radius: var(--radius-sm);
}

.modal {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  background: var(--bg);
}
@media (min-width: 768px) {
  .modal { border-radius: var(--radius-xl); }
}
.modal-handle { background: var(--border-strong); }

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

.qty-control {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}
.qty-btn {
  border-radius: var(--radius-full);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
.qty-btn:hover { background: var(--primary-surface); color: var(--primary); }

.upload-area {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}
.upload-area:hover, .upload-area.dragover {
  border-color: var(--primary);
  background: var(--primary-surface);
}

.empty-state-icon {
  background: var(--primary-surface);
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%); }

/* ─────────────────────────────────────────────────────────────────────────
   Visual pass v3.6 — frosted glass controls, solid hero blocks and HD
   category tiles. Appended last so it wins the cascade over the v3.5 layer.
   ───────────────────────────────────────────────────────────────────────── */

/* Frosted-glass buttons: translucent pane, blurred backdrop, lit top edge. */
.btn-ghost,
.btn-glass {
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  border: 1px solid color-mix(in srgb, #FFFFFF 55%, var(--border));
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55),
              inset 0 -1px 0 rgba(255,255,255,0.18),
              0 6px 16px rgba(16,24,40,0.10);
}
.btn-ghost:hover:not(:disabled),
.btn-glass:hover:not(:disabled) {
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  border-color: var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.70),
              0 8px 20px rgba(16,24,40,0.14);
}

/* Glass variant that sits on top of photography (hero headers). */
.btn-glass.on-photo {
  background: rgba(255,255,255,0.20);
  border-color: rgba(255,255,255,0.38);
  color: var(--on-brand);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 6px 16px rgba(0,0,0,0.18);
}
.btn-glass.on-photo:hover:not(:disabled) { background: rgba(255,255,255,0.30); }

.tab {
  background: color-mix(in srgb, var(--surface) 68%, transparent);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.50);
}
.tab.active { box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.25); }

/* Solid hero blocks — the saturated single-colour card treatment. */
.hero-solid {
  border: none;
  color: var(--on-brand);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.hero-solid::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,0.22), transparent 55%);
  pointer-events: none;
}
.hero-teal  { background: linear-gradient(135deg, var(--primary-dark), var(--primary) 55%, var(--accent)); }
.hero-green { background: linear-gradient(135deg, #047857, #059669 60%, #10B981); }
.hero-blue  { background: linear-gradient(135deg, #0E7490, #0891B2 60%, #0EA5E9); }
.hero-rose  { background: linear-gradient(135deg, #BE123C, #E11D48 60%, #F43F5E); }

/* Solid coloured surfaces carry white label text. Re-map the neutral text tokens
   *inside* them so any child that reaches for --text / --text-secondary /
   --text-muted (dark teal in the light theme) renders light-on-colour instead of
   teal-on-teal. Only text tokens are overridden — --primary / --accent / --error
   are left alone because they also drive backgrounds and borders here. */
.hero-solid, .hero-solid *,
.home-hero, .home-hero *,
.screen-hero, .screen-hero *,
.action-card, .action-card * {
  --text: var(--on-brand);
  --text-primary: var(--on-brand);
  --text-secondary: var(--on-brand-soft);
  --text-muted: var(--on-brand-muted);
}

/* Home hero: HD photograph under a solid teal scrim so text stays legible. */
.home-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: var(--on-brand);
  padding: var(--space-lg);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.home-hero .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-hero .hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(6,78,70,0.93) 0%, rgba(13,148,136,0.84) 48%, rgba(5,150,105,0.58) 100%);
}
.home-hero .hero-body { position: relative; z-index: 1; }

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.30);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 600;
  color: var(--on-brand);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}
.hero-chip:hover { background: rgba(255,255,255,0.28); }

/* HD category tiles: photo card with a bottom scrim carrying the label. */
.cat-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: var(--space-sm);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cat-row::-webkit-scrollbar { display: none; }

/* Chevron slide controls for long category rows (Catalog + Lab). An arrow
   only appears while there are tiles left to slide towards. */
.cat-scroller { position: relative; }
.cat-scroller .cat-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-md);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.cat-scroller .cat-arrow.left { left: -6px; }
.cat-scroller .cat-arrow.right { right: -6px; }
.cat-scroller.can-left .cat-arrow.left { display: flex; }
.cat-scroller.can-right .cat-arrow.right { display: flex; }

.cat-tile {
  position: relative;
  flex: 0 0 132px;
  height: 104px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  padding: 0;
  background: var(--surface);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.cat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cat-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: var(--tile-img-op, 0.6);
  transition: transform var(--transition-slow);
}
.cat-tile:hover img { transform: scale(1.06); }
.cat-tile .cat-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6,30,26,0.85) 0%, rgba(6,30,26,0.28) 45%, transparent 72%);
}
.cat-tile .cat-label {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.25;
  text-align: left;
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);
}
.cat-tile.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary), var(--shadow-md);
}
.cat-tile-all { background: linear-gradient(135deg, var(--primary-dark), var(--primary) 70%, color-mix(in srgb, var(--primary) 78%, var(--accent)) 100%); border-color: transparent; }
.cat-tile-all .cat-label {
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  text-align: center;
}

/* Featured "Specialty stores" band — larger, brand-tinted cards that visually
   separate big verticals (Ayurvedic, Cosmetic, Veterinary) from the routine
   category row. Owner-featured categories only. */
.specialty-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.specialty-tile {
  position: relative;
  min-height: 154px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1.5px solid var(--primary);
  box-shadow: 0 8px 22px -8px var(--primary-glow), var(--shadow-sm);
  cursor: pointer;
  padding: 0;
  text-align: left;
  background: var(--surface);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.specialty-tile:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -10px var(--primary-glow), var(--shadow-md); }
.specialty-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: var(--tile-img-op, 0.6);
  transition: transform var(--transition-slow);
}
.specialty-tile:hover img { transform: scale(1.06); }
.specialty-tile .specialty-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, color-mix(in srgb, var(--primary) 0.72, transparent) 0%, rgba(6,30,26,0.55) 52%, rgba(6,30,26,0.88) 100%);
}
.specialty-tile .specialty-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-brand);
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.28);
}
.specialty-content {
  position: relative;
  z-index: 2;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}
.specialty-tile .specialty-label {
  position: static;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  word-break: break-word;
}
.specialty-tile .specialty-sub {
  position: static;
  color: rgba(255,255,255,0.88);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-brand="orange"] .specialty-tile .specialty-label,
[data-brand="orange"] .specialty-tile .specialty-sub { color: #FFFFFF; }

/* Featured marker on the compact catalog category tiles: a brand ring + star so
   specialty verticals stay recognisable in the dense tab row. */
.cat-tile.cat-tile-featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1.5px var(--primary), var(--shadow-sm);
}
.cat-tile .cat-flag {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  color: var(--on-brand);
  background: var(--primary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.30);
}

[data-theme="dark"] .btn-ghost,
[data-theme="dark"] .btn-glass,
[data-theme="dark"] .tab {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 6px 16px rgba(0,0,0,0.35);
}

/* Compact hero header for sub-pages (Lab, Consult). */
.screen-hero { padding: var(--space-md) var(--space-lg); }
.screen-hero .hero-body { display: flex; align-items: center; gap: 12px; }

/* Solid gradient avatar disc for doctor cards. */
.doc-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

/* Bold per-screen scrim colours (later in file, so they beat .hero-scrim).
   --hero-sat / --hero-bright come from the admin "Colour intensity" slider
   (pharmacy_settings.hero_vibrancy) so the owner can lighten or bolden every
   photo scrim without a code change. */
.hero-scrim { filter: saturate(var(--hero-sat, 1.1)) brightness(var(--hero-bright, 1.075)); }
.hero-scrim.scrim-teal   { background: linear-gradient(120deg, rgba(6,78,70,0.93) 0%, rgba(13,148,136,0.84) 48%, rgba(5,150,105,0.58) 100%); }
.hero-scrim.scrim-green  { background: linear-gradient(120deg, rgba(5,68,25,0.93) 0%, rgba(22,163,74,0.84) 48%, rgba(132,204,22,0.55) 100%); }
.hero-scrim.scrim-orange { background: linear-gradient(120deg, rgba(124,45,18,0.93) 0%, rgba(234,88,12,0.84) 48%, rgba(251,146,60,0.55) 100%); }
.hero-scrim.scrim-blue   { background: linear-gradient(120deg, rgba(30,58,138,0.93) 0%, rgba(37,99,235,0.84) 48%, rgba(56,189,248,0.55) 100%); }
.hero-scrim.scrim-violet { background: linear-gradient(120deg, rgba(76,29,149,0.93) 0%, rgba(124,58,237,0.84) 48%, rgba(196,181,253,0.55) 100%); }
.hero-scrim.scrim-rose   { background: linear-gradient(120deg, rgba(136,19,55,0.93) 0%, rgba(225,29,72,0.84) 48%, rgba(251,113,133,0.55) 100%); }

/* Rich action cards: HD photo + bold scrim + frosted icon chip. */
.action-grid {
  display: grid;
  /* Two per row at every width (owner directive, like the Feature-availability
     grid) so the shortcuts read as a tidy pair-column instead of a tall stack. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.action-card {
  position: relative;
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  /* Fade base for the translucent tile photo (--tile-img-op < 1). */
  background: var(--surface);
  /* Compact fixed height keeps every tile identical while halving the vertical
     space the shortcut block consumes. */
  height: 118px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 3px;
  text-align: left;
  color: #FFFFFF;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
@media (min-width: 768px) {
  .action-card { height: 132px; }
}
.action-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.action-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Owner-tunable: the admin "Photo transparency" slider sets --tile-img-op so
     bold HD imagery can be calmed toward the card surface without a code change. */
  opacity: var(--tile-img-op, 0.6);
  transition: transform var(--transition-slow);
}
.action-card:hover img { transform: scale(1.07); }
.action-card .hero-scrim { position: absolute; inset: 0; }
.action-card .action-icon {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: auto;
}
.action-card .action-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.action-card .action-sub {
  position: relative;
  z-index: 1;
  font-size: 11px;
  opacity: 0.92;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   UI pass 4 — the same bold-colour language on every screen
   ============================================================ */

/* Extra bold scrims so no two neighbouring screens share a colour. */
.hero-scrim.scrim-indigo { background: linear-gradient(120deg, rgba(30,27,75,0.94) 0%, rgba(79,70,229,0.85) 48%, rgba(129,140,248,0.55) 100%); }
.hero-scrim.scrim-amber  { background: linear-gradient(120deg, rgba(69,26,3,0.94) 0%, rgba(217,119,6,0.86) 48%, rgba(252,211,77,0.55) 100%); }
.hero-scrim.scrim-cyan   { background: linear-gradient(120deg, rgba(8,51,68,0.94) 0%, rgba(8,145,178,0.85) 48%, rgba(103,232,249,0.55) 100%); }
.hero-scrim.scrim-slate  { background: linear-gradient(120deg, rgba(15,23,42,0.95) 0%, rgba(51,65,85,0.87) 48%, rgba(148,163,184,0.55) 100%); }
.hero-scrim.scrim-plum   { background: linear-gradient(120deg, rgba(59,7,100,0.94) 0%, rgba(147,51,234,0.85) 48%, rgba(216,180,254,0.55) 100%); }

/* Matching solid gradients for tiles and balance cards. The light end of every
   ramp stays dark enough for white label text to stay legible. */
.hero-orange { background: linear-gradient(135deg, #9A3412, #EA580C 60%, #F97316); }
.hero-violet { background: linear-gradient(135deg, #4C1D95, #7C3AED 60%, #8B5CF6); }
.hero-indigo { background: linear-gradient(135deg, #1E1B4B, #4F46E5 60%, #6366F1); }
.hero-amber  { background: linear-gradient(135deg, #78350F, #D97706 60%, #F59E0B); }
.hero-cyan   { background: linear-gradient(135deg, #155E75, #0891B2 60%, #06B6D4); }
.hero-slate  { background: linear-gradient(135deg, #0F172A, #334155 60%, #64748B); }
.hero-plum   { background: linear-gradient(135deg, #3B0764, #9333EA 60%, #A855F7); }

/* Hero internals: icon chip, title block, right-hand action slot. */
.hero-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.20);
  border: 1px solid rgba(255,255,255,0.34);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.hero-titleblock { flex: 1; min-width: 0; }
.hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}
/* Dense admin screens need a shorter header than the customer heroes. */
.screen-hero.hero-sm { padding: 12px var(--space-md); }
.screen-hero.hero-sm .hero-ico { width: 34px; height: 34px; font-size: 17px; border-radius: 10px; }

/* Admin dashboard navigation: solid colour tiles instead of a plain button list. */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 768px) {
  .admin-grid { grid-template-columns: repeat(3, 1fr); }
}
.admin-tile {
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: var(--radius-lg);
  padding: 14px;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  color: #FFFFFF;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.admin-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.admin-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,0.22), transparent 55%);
  pointer-events: none;
}
.admin-tile .tile-ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 8px;
}
.admin-tile .tile-label {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(0,0,0,0.30);
}
.admin-tile .tile-sub {
  position: relative;
  z-index: 1;
  font-size: 10.5px;
  opacity: 0.9;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0,0,0,0.30);
}

/* Reorderable admin sections: drag the ⠿ handle (js/drag-order.js). The order
   persists per user; see adminDashboard.js. */
.admin-section { margin-bottom: 24px; }
.admin-section:last-child { margin-bottom: 0; }
.admin-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.admin-section-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  flex: 1;
}
.admin-section.dragging { opacity: 0.5; }

/* #34 — Admin Console tab strip. Permission-filtered in Shell.adminTabsHtml();
   this only carries presentation, and inherits the app's surface/border tokens so
   it follows the active theme. Horizontally scrollable so a narrow phone never
   clips a tab. */
.admin-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 12px 0;
  scrollbar-width: thin;
}
.admin-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.admin-tab:hover { background: var(--surface-2, var(--surface)); color: var(--text); }
.admin-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}
.admin-tab-icon { font-size: 14px; line-height: 1; }

/* Shared drag-to-reorder (js/drag-order.js). Pointer-event based so the same
   handle works with a finger on the phone and a mouse on the desktop. */
.drag-handle {
  cursor: grab;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  padding: 6px 4px;
  user-select: none;
  touch-action: none;
  flex: 0 0 auto;
  background: none;
  border: none;
}
.drag-handle:active { cursor: grabbing; }
.drag-row { position: relative; }
.drag-row.dragging {
  opacity: 0.8;
  z-index: 5;
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

/* My Documents — compact responsive grid (was a full-width vertical stack that
   wasted space). Two tiles per row on phones, more as the viewport widens. */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 640px) { .doc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .doc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Loading / empty states are single children — let them span the whole grid. */
.doc-grid > .empty-state { grid-column: 1 / -1; }
.doc-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.doc-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.doc-ico { font-size: 22px; line-height: 1; }
.doc-body { min-width: 0; }
.doc-title {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.25;
  word-break: break-word;
}
.doc-sub { font-size: 11px; color: var(--text-secondary); margin-top: 3px; }
.doc-meta { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }
.doc-actions {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.doc-actions .btn { width: 100%; justify-content: center; }

/* Profile: identity lives in the hero, menu rows become glass cards. */
.profile-hero-body { display: flex; align-items: center; gap: 14px; }
.profile-hero-avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: #FFFFFF;
  background: rgba(255,255,255,0.22);
  border: 2px solid rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.28);
}
.profile-hero-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.35);
}
.profile-hero-phone { font-size: 12.5px; opacity: 0.92; margin-top: 2px; }
.profile-menu { gap: 8px; padding: 0 2px; }
.profile-item {
  background: color-mix(in srgb, var(--surface) 68%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  font-weight: 600;
}
.profile-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: var(--shadow-sm);
}

/* Login: brand and form float on the storefront photograph. */
.login-wrap { position: relative; overflow: hidden; }
.login-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* The pharmacy photo is mint-toned. Luminosity keeps only its light and
     shadow as texture, so the warm ground below supplies every hue and no
     green survives anywhere on the first screen. */
  opacity: 0.22;
  mix-blend-mode: luminosity;
  filter: contrast(1.08) brightness(0.92);
}
.login-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(92% 58% at 50% 0%, rgba(255, 138, 30, 0.34) 0%, rgba(255, 138, 30, 0) 62%),
    linear-gradient(168deg, rgba(59, 26, 8, 0.88) 0%, rgba(43, 18, 6, 0.93) 46%, rgba(20, 8, 2, 0.97) 100%);
}
.login-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100 * var(--vh));
  padding: 24px;
}
.login-brand { margin-bottom: 28px; text-align: center; color: #FFFFFF; }
.login-brand h1 { text-shadow: 0 2px 10px rgba(0,0,0,0.40); }
.login-brand p { color: rgba(255,255,255,0.92); text-shadow: 0 1px 6px rgba(0,0,0,0.35); }
/* Owner's full lockup (emblem + wordmark + tagline) floats over the hero photo. */
.login-brand .brand-plate-img {
  width: min(320px, 78vw);
  max-height: 140px;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.45));
}
.login-card {
  width: 100%;
  max-width: 440px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, #FFF9F1 96%, transparent);
  border: 1px solid rgba(255, 190, 120, 0.35);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}

/* --- Desktop & Mobile Login Grid & Statutory Trust Showcase --- */
.login-desktop-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}
.login-desktop-brand-pane {
  display: contents;
}
.login-brand {
  order: 1;
  text-align: center;
  margin-bottom: 10px;
}
.login-trust-badges {
  order: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 14px;
  width: 100%;
  max-width: 440px;
}
.login-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.login-card-container {
  order: 3;
  width: 100%;
  max-width: 440px;
}
.login-trust-pillars {
  order: 4;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 440px;
  margin-top: 18px;
  padding: 18px;
  background: rgba(30, 14, 5, 0.55);
  border: 1px solid rgba(255, 200, 130, 0.25);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.login-pillar-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.pillar-ico {
  font-size: 20px;
  flex: 0 0 auto;
  margin-top: 1px;
}
.pillar-title {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
}
.pillar-desc {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.4;
  margin-top: 2px;
}
.login-support-note {
  order: 5;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 440px;
  margin-top: 12px;
  margin-bottom: 24px;
  padding: 14px 18px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
}
.login-dev-credit {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 6px;
}

.quick-role-box {
  padding: 12px;
}
.quick-role-box .btn,
.quick-role-btn {
  white-space: normal !important;
  line-height: 1.25 !important;
  word-break: break-word !important;
  min-width: 0 !important;
  text-align: center !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  padding: 8px 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

@media (max-width: 480px) {
  .login-card {
    padding: 18px 14px;
    border-radius: var(--radius-md);
  }
  .login-desktop-brand-pane .brand-plate-img {
    width: 220px;
    max-height: 90px;
  }
  .quick-role-box {
    padding: 10px 8px !important;
  }
  .quick-role-box .btn,
  .quick-role-btn {
    font-size: 11px !important;
    padding: 7px 4px !important;
    min-height: 38px !important;
    line-height: 1.15 !important;
    letter-spacing: normal !important;
  }
}

@media (min-width: 880px) {
  .login-desktop-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    max-width: 960px;
    align-items: center;
    background: rgba(30, 14, 5, 0.45);
    border: 1px solid rgba(255, 200, 130, 0.22);
    border-radius: 28px;
    padding: 38px 44px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
  }
  .login-desktop-brand-pane {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding-right: 12px;
    order: initial;
  }
  .login-desktop-brand-pane .login-brand {
    text-align: left;
    margin-bottom: 24px;
    order: initial;
  }
  .login-trust-badges {
    display: none;
  }
  .login-desktop-brand-pane .brand-plate-img {
    width: 280px;
    margin: 0;
  }
  .login-trust-pillars {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 0;
    margin-bottom: 22px;
    padding: 0;
    background: none;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    width: 100%;
    order: initial;
  }
  .pillar-ico {
    font-size: 22px;
  }
  .pillar-title {
    font-size: 13.5px;
  }
  .pillar-desc {
    font-size: 12px;
  }
  .login-support-note {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    background: none;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    padding: 14px 0 0 0;
    border-radius: 0;
    margin-top: 0;
    margin-bottom: 0;
    width: 100%;
    order: initial;
  }
  .login-card-container {
    order: initial;
  }
  .login-card {
    max-width: 440px;
  }
}

/* --- Desktop Admin Command Bar --- */
.admin-desktop-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}
.admin-cmd-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-brand-chip {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  margin-right: 4px;
}
.admin-stat-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.status-pill-online {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.status-pill-info {
  background: rgba(79, 70, 229, 0.12);
  color: #4f46e5;
  border: 1px solid rgba(79, 70, 229, 0.25);
}
.dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
}
.admin-cmd-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================================
   UI pass 5 — bold, tactile controls on every screen
   Appended last so it wins the cascade over passes 2–4.
   ============================================================ */

/* --- Buttons: saturated fill, lit top edge, springy press --- */
.btn { position: relative; isolation: isolate; }
.btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg,
              color-mix(in srgb, var(--primary-dark) 82%, #000000) 0%,
              var(--primary-dark) 52%,
              var(--primary) 100%);
  color: #FFFFFF;
  font-weight: 700;
  border: none;
  box-shadow: 0 6px 18px var(--primary-glow),
              inset 0 1px 0 rgba(255,255,255,0.34),
              inset 0 -2px 6px rgba(0,0,0,0.14);
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 80% at 50% -20%, rgba(255,255,255,0.32), transparent 62%);
  pointer-events: none;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.05) saturate(1.06);
  box-shadow: 0 12px 28px var(--primary-glow),
              inset 0 1px 0 rgba(255,255,255,0.44);
}
.btn-primary:active:not(:disabled) { transform: translateY(0) scale(0.98); }

/* Full-width CTAs (checkout, login, save) get extra presence. */
.btn-primary.btn-full {
  min-height: 52px;
  font-size: var(--font-md);
  letter-spacing: 0.02em;
}

.btn-ghost:not(:disabled):hover,
.btn-glass:not(.on-photo):not(:disabled):hover {
  color: var(--primary-dark);
  border-color: color-mix(in srgb, var(--primary) 45%, transparent);
  background: color-mix(in srgb, var(--primary) 9%, var(--surface));
}

.btn-danger {
  background: linear-gradient(135deg,
              color-mix(in srgb, var(--error) 55%, #000000) 0%,
              var(--error) 62%,
              color-mix(in srgb, var(--error) 82%, #FFFFFF) 100%);
  color: #FFFFFF;
  font-weight: 700;
  border: none;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--error) 32%, transparent),
              inset 0 1px 0 rgba(255,255,255,0.28);
}
.btn-danger:hover:not(:disabled) {
  color: #FFFFFF;
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--error) 42%, transparent);
}

.btn-glass.on-photo {
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.50), 0 6px 18px rgba(0,0,0,0.22);
}
.btn-glass.on-photo:hover:not(:disabled) {
  background: rgba(255,255,255,0.32);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.60), 0 10px 24px rgba(0,0,0,0.26);
}
.btn-sm { font-weight: 700; }

/* --- Profile menu: every row is a bold colour tile --- */
.profile-menu { gap: 10px; }
.profile-item {
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: var(--radius-md);
  padding: 13px 14px;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 55%, var(--accent));
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}
.profile-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,0.22), transparent 55%);
  pointer-events: none;
}
.profile-item:hover {
  color: #FFFFFF;
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: var(--shadow-lg);
}
.profile-item:active { transform: translateY(0) scale(0.985); }
.profile-item.tone-teal   { background: linear-gradient(135deg, #0F766E, #0D9488 55%, #10B981); }
.profile-item.tone-indigo { background: linear-gradient(135deg, #312E81, #4F46E5 55%, #6366F1); }
.profile-item.tone-violet { background: linear-gradient(135deg, #4C1D95, #7C3AED 55%, #8B5CF6); }
.profile-item.tone-slate  { background: linear-gradient(135deg, #1E293B, #475569 55%, #64748B); }
.profile-item.tone-blue   { background: linear-gradient(135deg, #1E3A8A, #2563EB 55%, #3B82F6); }
.profile-item.tone-cyan   { background: linear-gradient(135deg, #155E75, #0891B2 55%, #06B6D4); }
.profile-item.tone-green  { background: linear-gradient(135deg, #065F46, #059669 55%, #10B981); }
.profile-item.tone-amber  { background: linear-gradient(135deg, #92400E, #D97706 55%, #F59E0B); }
.profile-item.tone-rose   { background: linear-gradient(135deg, #9F1239, #E11D48 55%, #F43F5E); }
.profile-item.tone-orange { background: linear-gradient(135deg, #9A3412, #EA580C 55%, #F97316); }
.profile-item.tone-plum   { background: linear-gradient(135deg, #3B0764, #9333EA 55%, #A855F7); }
.profile-item.tone-error  { background: linear-gradient(135deg, #7F1D1D, #DC2626 58%, #EF4444); }

.profile-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.20);
  border: 1px solid rgba(255,255,255,0.34);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}
.profile-item-label {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.28);
}
.profile-item-arrow {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #FFFFFF;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.30);
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}
.profile-item:hover .profile-item-arrow {
  background: rgba(255,255,255,0.32);
  transform: translateX(2px);
}
.profile-item-logout,
.profile-item-logout:hover { color: #FFFFFF; }

/* --- Inputs: soft glass well with a glowing focus ring --- */
.input,
.form-input,
.form-textarea,
.form-select,
select.input {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--border));
  box-shadow: inset 0 1px 3px rgba(16,24,40,0.05);
}
.input:hover:not(:focus),
.form-input:hover:not(:focus),
.form-textarea:hover:not(:focus),
.form-select:hover:not(:focus) {
  border-color: color-mix(in srgb, var(--primary) 38%, var(--border));
}
.input:focus,
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-surface), 0 6px 18px rgba(13,148,136,0.14);
}
.form-label { font-weight: 700; letter-spacing: 0.01em; }
.search-box .input {
  box-shadow: var(--shadow-sm), inset 0 1px 3px rgba(16,24,40,0.05);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
}
.search-box .input:focus {
  box-shadow: 0 0 0 4px var(--primary-surface), var(--shadow-md);
}

/* --- Tabs: active pill carries the brand gradient and a glow --- */
.tab { font-weight: 700; }
.tab:hover:not(.active) {
  color: var(--primary-dark);
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}
.tab.active {
  background: linear-gradient(135deg,
              var(--primary-dark) 0%,
              var(--primary) 55%,
              var(--accent) 100%);
  color: var(--on-brand);
  box-shadow: 0 6px 16px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,0.30);
}

/* --- Cards: lit top edge, deeper lift on hover --- */
.card,
.card-glass,
.card-glass-sm {
  border-color: color-mix(in srgb, var(--primary) 12%, var(--border));
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.65);
}
.card-glass-sm { transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast); }
.card-glass-sm:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.65);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}
[data-theme="dark"] .card,
[data-theme="dark"] .card-glass,
[data-theme="dark"] .card-glass-sm { box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.08); }

/* --- Stat cards (admin dashboards): brand wash + top rail --- */
.stat-card {
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--primary) 14%, var(--border));
  background: linear-gradient(155deg,
              color-mix(in srgb, var(--primary) 9%, var(--surface)) 0%,
              var(--surface) 62%);
  box-shadow: var(--shadow-md);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.stat-value { font-family: var(--font-display); letter-spacing: -0.02em; }
.stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* --- Badges: bordered pills that read at a glance --- */
.badge {
  font-weight: 700;
  border: 1px solid color-mix(in srgb, #FFFFFF 30%, transparent);
  box-shadow: var(--shadow-sm);
}

/* --- Empty states: gradient icon disc instead of a faint emoji --- */
.empty-state-icon {
  width: 96px;
  height: 96px;
  font-size: 40px;
  opacity: 1;
  margin-bottom: var(--space-lg);
  background: linear-gradient(140deg, var(--primary-surface), var(--info-surface));
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.70);
}
.empty-state-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.01em; }

/* --- Upload area: tinted well that lights up on hover --- */
.upload-area {
  border: 2px dashed color-mix(in srgb, var(--primary) 35%, var(--border-strong));
  background: linear-gradient(160deg,
              color-mix(in srgb, var(--primary) 7%, var(--surface)) 0%,
              var(--surface) 70%);
  box-shadow: var(--shadow-sm);
}
.upload-area:hover,
.upload-area.dragover {
  border-color: var(--primary);
  background: linear-gradient(160deg,
              color-mix(in srgb, var(--primary) 14%, var(--surface)) 0%,
              var(--primary-surface) 100%);
  box-shadow: 0 10px 26px var(--primary-glow);
  transform: translateY(-2px);
}
.upload-area-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto var(--space-md);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 60%, var(--accent));
  box-shadow: 0 8px 20px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,0.30);
}
.upload-area-text { font-family: var(--font-display); font-weight: 700; }

/* --- Quantity stepper: chips that fill on hover --- */
.qty-control {
  border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
  box-shadow: var(--shadow-sm);
}
.qty-btn { font-weight: 800; }
.qty-btn:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #FFFFFF;
}
.qty-val { font-family: var(--font-display); font-weight: 800; }

/* --- Navigation: the active tab becomes a solid brand pill --- */
.nav-item.active {
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 55%, var(--accent));
  box-shadow: 0 6px 16px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,0.30);
}
.sidebar-item.active {
  color: #FFFFFF;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 55%, var(--accent));
  box-shadow: 0 6px 16px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,0.28);
}
.sidebar-item:hover:not(.active) {
  color: var(--primary-dark);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}

/* --- Tables (admin): zebra rows, live hover, branded header --- */
.table-container { border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.data-table th {
  background: linear-gradient(180deg, var(--surface-active), var(--surface));
  color: var(--primary-dark);
  font-weight: 800;
  letter-spacing: 0.07em;
}
.data-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--primary) 4%, transparent); }
.data-table tbody tr:hover td { background: var(--primary-surface); }
.table-row { transition: background-color var(--transition-fast); }
.table-row:hover { background: color-mix(in srgb, var(--primary) 6%, transparent); }

/* --- Alerts: colour rail on the leading edge --- */
.alert {
  border-width: 1px 1px 1px 4px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

/* --- Modals: branded wash, display-font title, spinning close --- */
.modal {
  background: linear-gradient(180deg,
              color-mix(in srgb, var(--primary) 6%, var(--bg)) 0%,
              var(--bg) 220px);
}
.modal-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.01em; }
.modal-close {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}
.modal-close:hover {
  background: var(--error);
  color: #FFFFFF;
  border-color: color-mix(in srgb, var(--error) 40%, transparent);
  transform: rotate(90deg);
}

/* --- Cart, lists and small interactive bits --- */
.cart-item,
.cart-summary {
  border-color: color-mix(in srgb, var(--primary) 12%, var(--border));
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.60);
}
.cart-item-remove {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}
.cart-item-remove:hover {
  background: var(--error-surface);
  border-color: color-mix(in srgb, var(--error) 35%, transparent);
  transform: scale(1.08);
}
.cart-total {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--primary-dark);
}
.list-card { border-left: 3px solid transparent; }
.list-card:hover { border-left-color: var(--primary); }
.faq-item {
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--primary) 12%, var(--border));
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.faq-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.status-bar { border: 1px solid color-mix(in srgb, currentColor 28%, transparent); box-shadow: var(--shadow-sm); }
.admin-tile:active { transform: translateY(0) scale(0.985); }
.timeline-dot {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent);
}

/* --- Booking wizards: the chosen tile pops forward --- */
.tile-selected,
.tile-selected:hover {
  border-color: var(--primary);
  background: linear-gradient(135deg,
              color-mix(in srgb, var(--primary) 26%, var(--surface)) 0%,
              color-mix(in srgb, var(--accent) 16%, var(--surface)) 100%);
  box-shadow: 0 0 0 3px var(--primary-glow),
              0 8px 20px rgba(13,148,136,0.18),
              inset 0 1px 0 rgba(255,255,255,0.55);
  transform: translateY(-2px);
}

/* --- Range sliders (Settings → Font Size) --- */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 10px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary-dark), var(--primary) 55%, var(--accent));
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.18);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid var(--primary);
  box-shadow: 0 3px 10px var(--primary-glow);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid var(--primary);
  box-shadow: 0 3px 10px var(--primary-glow);
  cursor: pointer;
}
input[type="range"]:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 3px; }

/* --- OTP boxes: display font, lift on focus, tinted once filled --- */
.otp-input input {
  font-family: var(--font-display);
  font-weight: 800;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 2px solid color-mix(in srgb, var(--primary) 18%, var(--border));
  box-shadow: var(--shadow-sm), inset 0 1px 3px rgba(16,24,40,0.05);
}
.otp-input input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-surface), 0 8px 20px var(--primary-glow);
  transform: translateY(-2px);
}
.otp-input input.filled {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: linear-gradient(150deg,
              color-mix(in srgb, var(--primary) 16%, var(--surface)) 0%,
              color-mix(in srgb, var(--accent) 10%, var(--surface)) 100%);
}

/* ============================================================
   UI pass 6 — the elegant system.
   White surfaces, pastel accent chips and hairline borders carry
   the lists; bold colour stays on heroes, CTAs and balance cards.
   Appended last so it wins the cascade over passes 2–5.
   ============================================================ */

/* Deep emerald scrim: rich and legible instead of a washed photo. */
.hero-scrim.scrim-emerald {
  background: linear-gradient(140deg,
              rgba(2,44,34,0.97) 0%,
              rgba(6,78,59,0.92) 45%,
              rgba(13,148,136,0.78) 100%);
}

/* --- Profile menu: clean cards, pastel chips, quiet chevrons --- */
.profile-menu { gap: 8px; }
.profile-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px 14px;
  color: var(--text);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 6px 16px rgba(16,24,40,0.05);
}
/* Re-asserted at the specificity of the pass-5 tone gradients so every row
   stays a white card; the tone now only colours the icon chip. */
.profile-menu .profile-item { background: var(--surface); }
.profile-menu .profile-item-logout { background: var(--error); }
.profile-item::after { content: none; }
.profile-item:hover {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--border-strong);
  filter: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(16,24,40,0.05), 0 10px 24px rgba(16,24,40,0.08);
}
.profile-item:active { transform: scale(0.99); }
.profile-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  font-size: 18px;
  background: color-mix(in srgb, var(--primary) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 24%, transparent);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}
.profile-item-label { color: var(--text); text-shadow: none; }
.profile-item-arrow {
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 600;
}
.profile-item:hover .profile-item-arrow {
  background: none;
  color: var(--primary-dark);
  transform: translateX(2px);
}
.profile-item.tone-teal   .profile-item-icon { background: color-mix(in srgb, #0D9488 13%, transparent); border-color: color-mix(in srgb, #0D9488 24%, transparent); }
.profile-item.tone-indigo .profile-item-icon { background: color-mix(in srgb, #4F46E5 12%, transparent); border-color: color-mix(in srgb, #4F46E5 22%, transparent); }
.profile-item.tone-violet .profile-item-icon { background: color-mix(in srgb, #7C3AED 12%, transparent); border-color: color-mix(in srgb, #7C3AED 22%, transparent); }
.profile-item.tone-slate  .profile-item-icon { background: color-mix(in srgb, #475569 13%, transparent); border-color: color-mix(in srgb, #475569 24%, transparent); }
.profile-item.tone-blue   .profile-item-icon { background: color-mix(in srgb, #2563EB 12%, transparent); border-color: color-mix(in srgb, #2563EB 22%, transparent); }
.profile-item.tone-cyan   .profile-item-icon { background: color-mix(in srgb, #0891B2 13%, transparent); border-color: color-mix(in srgb, #0891B2 24%, transparent); }
.profile-item.tone-green  .profile-item-icon { background: color-mix(in srgb, #059669 13%, transparent); border-color: color-mix(in srgb, #059669 24%, transparent); }
.profile-item.tone-amber  .profile-item-icon { background: color-mix(in srgb, #D97706 14%, transparent); border-color: color-mix(in srgb, #D97706 26%, transparent); }
.profile-item.tone-rose   .profile-item-icon { background: color-mix(in srgb, #E11D48 12%, transparent); border-color: color-mix(in srgb, #E11D48 22%, transparent); }
.profile-item.tone-orange .profile-item-icon { background: color-mix(in srgb, #EA580C 13%, transparent); border-color: color-mix(in srgb, #EA580C 24%, transparent); }
.profile-item.tone-plum   .profile-item-icon { background: color-mix(in srgb, #9333EA 12%, transparent); border-color: color-mix(in srgb, #9333EA 22%, transparent); }
.profile-item.tone-error  .profile-item-icon { background: color-mix(in srgb, #DC2626 12%, transparent); border-color: color-mix(in srgb, #DC2626 22%, transparent); }

.profile-item-logout,
.profile-item-logout:hover {
  background: var(--error);
  border-color: color-mix(in srgb, #FFFFFF 26%, transparent);
  color: #FFFFFF;
}
.profile-item-logout .profile-item-label { color: #FFFFFF; }
.profile-item-logout .profile-item-arrow { color: rgba(255,255,255,0.75); }

/* --- Admin dashboard: white tiles with a colour rail and pastel chip --- */
.admin-tile {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 6px 16px rgba(16,24,40,0.05);
  min-height: 96px;
}
.admin-tile::after { content: none; }
.admin-tile::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--primary);
}
.admin-tile:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: 0 2px 4px rgba(16,24,40,0.05), 0 12px 28px rgba(16,24,40,0.09);
}
.admin-tile .tile-ico {
  background: color-mix(in srgb, var(--primary) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 24%, transparent);
}
.admin-tile .tile-label { color: var(--text); text-shadow: none; }
.admin-tile .tile-sub { color: var(--text-secondary); text-shadow: none; }

.admin-tile.hero-teal::before   { background: #0D9488; }
.admin-tile.hero-indigo::before { background: #4F46E5; }
.admin-tile.hero-violet::before { background: #7C3AED; }
.admin-tile.hero-slate::before  { background: #475569; }
.admin-tile.hero-blue::before   { background: #2563EB; }
.admin-tile.hero-cyan::before   { background: #0891B2; }
.admin-tile.hero-green::before  { background: #059669; }
.admin-tile.hero-amber::before  { background: #D97706; }
.admin-tile.hero-rose::before   { background: #E11D48; }
.admin-tile.hero-orange::before { background: #EA580C; }
.admin-tile.hero-plum::before   { background: #9333EA; }
.admin-tile.hero-teal   .tile-ico { background: color-mix(in srgb, #0D9488 13%, transparent); border-color: color-mix(in srgb, #0D9488 24%, transparent); }
.admin-tile.hero-indigo .tile-ico { background: color-mix(in srgb, #4F46E5 12%, transparent); border-color: color-mix(in srgb, #4F46E5 22%, transparent); }
.admin-tile.hero-violet .tile-ico { background: color-mix(in srgb, #7C3AED 12%, transparent); border-color: color-mix(in srgb, #7C3AED 22%, transparent); }
.admin-tile.hero-slate  .tile-ico { background: color-mix(in srgb, #475569 13%, transparent); border-color: color-mix(in srgb, #475569 24%, transparent); }
.admin-tile.hero-blue   .tile-ico { background: color-mix(in srgb, #2563EB 12%, transparent); border-color: color-mix(in srgb, #2563EB 22%, transparent); }
.admin-tile.hero-cyan   .tile-ico { background: color-mix(in srgb, #0891B2 13%, transparent); border-color: color-mix(in srgb, #0891B2 24%, transparent); }
.admin-tile.hero-green  .tile-ico { background: color-mix(in srgb, #059669 13%, transparent); border-color: color-mix(in srgb, #059669 24%, transparent); }
.admin-tile.hero-amber  .tile-ico { background: color-mix(in srgb, #D97706 14%, transparent); border-color: color-mix(in srgb, #D97706 26%, transparent); }
.admin-tile.hero-rose   .tile-ico { background: color-mix(in srgb, #E11D48 12%, transparent); border-color: color-mix(in srgb, #E11D48 22%, transparent); }
.admin-tile.hero-orange .tile-ico { background: color-mix(in srgb, #EA580C 13%, transparent); border-color: color-mix(in srgb, #EA580C 24%, transparent); }
.admin-tile.hero-plum   .tile-ico { background: color-mix(in srgb, #9333EA 12%, transparent); border-color: color-mix(in srgb, #9333EA 22%, transparent); }

/* --- Softer elevation everywhere: cards breathe instead of floating --- */
.card,
.card-glass,
.card-glass-sm {
  box-shadow: 0 1px 2px rgba(16,24,40,0.04),
              0 6px 16px rgba(16,24,40,0.05),
              inset 0 1px 0 rgba(255,255,255,0.60);
}
.card-glass-sm:hover {
  box-shadow: 0 2px 4px rgba(16,24,40,0.05),
              0 10px 24px rgba(16,24,40,0.08),
              inset 0 1px 0 rgba(255,255,255,0.60);
}
[data-theme="dark"] .card,
[data-theme="dark"] .card-glass,
[data-theme="dark"] .card-glass-sm {
  box-shadow: 0 1px 2px rgba(0,0,0,0.35),
              0 6px 16px rgba(0,0,0,0.35),
              inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ============================================================
   UI pass 7 — Brand colour picker (Settings)
   Four selectable brand hues; the active one gets a glow ring.
   ============================================================ */
.brand-picker {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.brand-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 6px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 2px rgba(16,24,40,0.04);
  -webkit-tap-highlight-color: transparent;
}
.brand-opt:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.brand-opt .brand-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(16,24,40,0.18),
              inset 0 1px 2px rgba(255,255,255,0.5);
  transition: transform var(--transition-fast);
}
.brand-opt .brand-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}
.brand-opt.active {
  border-color: var(--primary);
  background: var(--primary-surface);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.brand-opt.active .brand-dot { transform: scale(1.08); }
.brand-opt.active .brand-name { color: var(--primary-dark); font-weight: 700; }
[data-theme="dark"] .brand-opt.active .brand-name { color: var(--primary); }

/* Dark mode: the semantic solids above are light tints at night, so their text
   flips to near-black — same "never same-nature text/background" rule. */
[data-theme="dark"] .badge-success,
[data-theme="dark"] .alert-success,
[data-theme="dark"] .toast-success,
[data-theme="dark"] .status-online { color: #052E22; }
[data-theme="dark"] .badge-error,
[data-theme="dark"] .alert-error,
[data-theme="dark"] .toast-error,
[data-theme="dark"] .status-offline,
[data-theme="dark"] .btn-danger,
[data-theme="dark"] .profile-item-logout,
[data-theme="dark"] .profile-item-logout .profile-item-label { color: #3F0D0D; }
[data-theme="dark"] .profile-item-logout .profile-item-arrow { color: rgba(63,13,13,0.70); }
[data-theme="dark"] .badge-warning,
[data-theme="dark"] .alert-warning,
[data-theme="dark"] .toast-warning { color: #3A1A05; }
[data-theme="dark"] .badge-info,
[data-theme="dark"] .toast-info { color: #062C33; }
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .cat-tile-all .cat-label { color: #07130F; }

/* ---- Toggle switch (notification preferences) ---- */
.notif-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.notif-pref-row:last-child { border-bottom: none; padding-bottom: 0; }
.notif-pref-row:first-child { padding-top: 0; }
.toggle-switch {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--border);
  cursor: pointer;
  padding: 0;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.toggle-switch .toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.28);
  transition: transform 0.18s ease;
}
.toggle-switch[aria-checked="true"] {
  background: var(--primary);
  border-color: var(--primary);
}
.toggle-switch[aria-checked="true"] .toggle-knob { transform: translateX(20px); }
.toggle-switch:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ===== EMPTY STATE (text alias) ===== */
.empty-state-text {
  font-size: var(--font-md);
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  max-width: 300px;
}

/* ===== POLICY / ARTICLE LIST ROW ===== */
.list-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  text-align: left;
  padding: 14px var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}
.list-row:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.list-row:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

/* ===== POLICY / ARTICLE BODY ===== */
.policy-body {
  font-size: var(--font-md);
  line-height: 1.72;
  color: var(--text-secondary);
}
.policy-body p { margin: 0 0 var(--space-md); }
.policy-body p:last-child { margin-bottom: 0; }
.policy-h {
  font-size: var(--font-md);
  font-weight: 700;
  color: var(--text);
  margin: var(--space-lg) 0 var(--space-sm);
  letter-spacing: 0.01em;
}
.policy-body .policy-h:first-child { margin-top: 0; }
.policy-list {
  margin: 0 0 var(--space-md);
  padding-left: var(--space-lg);
  list-style: disc;
}
.policy-list li { margin-bottom: 6px; }
.policy-list li::marker { color: var(--primary); }
.policy-muted { color: var(--text-muted); font-size: var(--font-sm); }

/* ===== OFFERS ===== */
.offer-card {
  position: relative;
  overflow: hidden;
}
.offer-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
}
.offer-code {
  display: inline-block;
  min-width: 92px;
  padding: 9px 12px;
  font-weight: 800;
  font-size: var(--font-sm);
  letter-spacing: 0.08em;
  color: var(--primary);
  text-align: center;
  background: var(--surface-active, color-mix(in srgb, var(--primary) 10%, transparent));
  border: 1.5px dashed var(--primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
}
.offer-code:hover {
  background: var(--primary);
  color: var(--on-brand);
  border-style: solid;
}

/* ===== Universal System Brand Immersion (All Brand Palettes) =====
   EVERY decorative accent dynamically follows the active brand palette:
   per-screen hero scrims, solid hero gradients, admin tile accent bars + icon tints,
   and status pills. No static teal or mismatched hues survive when any brand
   (Orange, Coral, Emerald, Indigo, Ocean, Govind) is active. */
.hero-scrim.scrim-teal,
.hero-scrim.scrim-green,
.hero-scrim.scrim-orange,
.hero-scrim.scrim-emerald,
.hero-scrim.scrim-blue,
.hero-scrim.scrim-violet,
.hero-scrim.scrim-rose,
.hero-scrim.scrim-indigo,
.hero-scrim.scrim-amber,
.hero-scrim.scrim-cyan,
.hero-scrim.scrim-slate,
.hero-scrim.scrim-plum,
.home-hero .hero-scrim {
  /* High-opacity brand wash matching the active theme */
  background: linear-gradient(120deg,
    color-mix(in srgb, var(--primary-dark) 96%, #000000) 0%,
    color-mix(in srgb, var(--primary) 92%, #000000) 48%,
    color-mix(in srgb, var(--accent) 82%, transparent) 100%) !important;
}
.hero-teal:not(.admin-tile),
.hero-green:not(.admin-tile),
.hero-blue:not(.admin-tile),
.hero-rose:not(.admin-tile),
.hero-violet:not(.admin-tile),
.hero-indigo:not(.admin-tile),
.hero-amber:not(.admin-tile),
.hero-cyan:not(.admin-tile),
.hero-slate:not(.admin-tile),
.hero-plum:not(.admin-tile) {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 55%, var(--accent)) !important;
}
.admin-tile.hero-teal::before,
.admin-tile.hero-indigo::before,
.admin-tile.hero-violet::before,
.admin-tile.hero-slate::before,
.admin-tile.hero-blue::before,
.admin-tile.hero-cyan::before,
.admin-tile.hero-green::before,
.admin-tile.hero-amber::before,
.admin-tile.hero-rose::before,
.admin-tile.hero-orange::before,
.admin-tile.hero-plum::before {
  background: var(--primary) !important;
}
.admin-tile.hero-teal .tile-ico,
.admin-tile.hero-indigo .tile-ico,
.admin-tile.hero-violet .tile-ico,
.admin-tile.hero-slate .tile-ico,
.admin-tile.hero-blue .tile-ico,
.admin-tile.hero-cyan .tile-ico,
.admin-tile.hero-green .tile-ico,
.admin-tile.hero-amber .tile-ico,
.admin-tile.hero-rose .tile-ico,
.admin-tile.hero-orange .tile-ico,
.admin-tile.hero-plum .tile-ico {
  background: color-mix(in srgb, var(--primary) 15%, transparent) !important;
  border-color: color-mix(in srgb, var(--primary) 28%, transparent) !important;
}

/* ===== v3.12.1 — Single-line glass chip rows =====
   Filter/facet chip groups (catalog schedule facets, My Documents filters) used
   to stack one-per-line because .tab is display:flex (block-level). They are now
   a single horizontally-scrollable row of frosted-glass pills, matching the
   reference storefronts and reclaiming the vertical space the owner flagged. */
.tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs .tab {
  flex: 0 0 auto;
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  backdrop-filter: blur(12px) saturate(1.5);
  -webkit-backdrop-filter: blur(12px) saturate(1.5);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), var(--shadow-sm);
}
.tabs .tab.active {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 55%, var(--accent));
  border-color: transparent;
  color: var(--on-brand);
  box-shadow: 0 6px 16px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,0.35);
}

/* ===== v3.12.2 — Warm monochrome status system (owner: final quality pass) =====
   The owner's directive: when the theme is orange, NOTHING cold (green/teal/
   blue/brown) may survive — status pills, chips and buttons included. Real
   branded design systems (Material tonal palettes, Shopify Polaris) solve this
   with a SINGLE-HUE tonal ramp: emphasis comes from fill strength, not from a
   second hue. So under the orange brand every semantic role is re-cut in the
   brand's own warm family, ordered solid → tint → outline → deep-rust:

     success  (Delivered/Paid/Approved/Completed)  solid brand gradient, on-brand type
     info     (Booked/routine/time/scheduled)      soft brand tint, brand-dark type
     warning  (Payment pending/soon/awaiting)      brand outline on surface
     error    (Missed/Rejected/offline/Delete)     deep warm rust (orange-800) —
              still warm, still clearly "not good", never a cold red/green.

   Destructive actions deliberately stay OUTLINE rust rather than a loud fill so
   they never read as a primary action, while remaining inside the warm family. */
[data-brand="orange"] {
  --success: #C2410C;
  --success-surface: rgba(194,65,12,0.12);
  --info: #B45309;
  --info-surface: rgba(180,83,9,0.12);
  --warning: #9A3412;
  --warning-surface: rgba(154,52,18,0.12);
  --error: #9A3412;
  --error-surface: rgba(154,52,18,0.12);
}
[data-theme="dark"][data-brand="orange"] {
  --success: #FDBA74;
  --success-surface: rgba(253,186,116,0.16);
  --info: #FCA55C;
  --info-surface: rgba(252,165,92,0.16);
  --warning: #F59E0B;
  --warning-surface: rgba(245,158,11,0.16);
}

/* Status pills: universal brand family across all palettes */
.badge-success {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary)) !important;
  color: var(--on-brand) !important;
  border-color: transparent !important;
}
.badge-info {
  background: var(--primary-surface) !important;
  color: var(--primary-dark) !important;
  border-color: color-mix(in srgb, var(--primary) 40%, transparent) !important;
}
.badge-warning {
  background: var(--surface) !important;
  color: var(--primary-dark) !important;
  border: 1px solid var(--primary) !important;
}
.badge-error {
  background: var(--error-surface) !important;
  color: var(--error) !important;
  border-color: color-mix(in srgb, var(--error) 40%, transparent) !important;
}

/* Buttons: dynamic brand hierarchy matching the active brand */
.btn-primary {
  color: var(--on-brand) !important;
  background: linear-gradient(135deg,
              color-mix(in srgb, var(--primary-dark) 85%, #000000) 0%,
              var(--primary-dark) 48%,
              var(--primary) 100%) !important;
}
.btn-ghost {
  background: color-mix(in srgb, var(--primary) 10%, var(--surface)) !important;
  color: var(--primary-dark) !important;
  border-color: color-mix(in srgb, var(--primary) 30%, transparent) !important;
}
.btn-ghost:hover:not(:disabled) {
  background: color-mix(in srgb, var(--primary) 18%, var(--surface)) !important;
  border-color: color-mix(in srgb, var(--primary) 45%, transparent) !important;
}
.btn-danger {
  background: var(--surface) !important;
  color: var(--error) !important;
  border: 1px solid color-mix(in srgb, var(--error) 45%, transparent) !important;
  box-shadow: none !important;
}
.btn-danger:hover:not(:disabled) {
  background: var(--error) !important;
  color: #FFFFFF !important;
}

/* Universal form inputs (checkbox, radio, range slider) follow active brand */
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--primary) !important;
}

input[type="range"] {
  accent-color: var(--primary) !important;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary) 55%, var(--accent)) !important;
}

input[type="range"]::-webkit-slider-thumb {
  border: 3px solid var(--primary) !important;
  box-shadow: 0 3px 10px var(--primary-glow) !important;
}

input[type="range"]::-moz-range-thumb {
  border: 3px solid var(--primary) !important;
  box-shadow: 0 3px 10px var(--primary-glow) !important;
}

/* ============================================================
   v3.12.3 — owner-selectable card style.
   data-card-style="solid" (the historical look) leaves every rule above
   untouched: the boxes stay completely filled with the brand colour.
   data-card-style="rail" KEEPS every photo but drops the heavy brand wash —
   the image shows through a light legibility scrim and the brand is carried
   only as a bold vertical line on the left (the admin Management / Data Entry
   language). List rows that have no photo (Health Library, etc.) become clean
   white cards with the same brand rail, so no box stays green/teal/rose.
   ============================================================ */

/* --- Home shortcut tiles (.action-card): White card + bold colour line --- */
[data-card-style="rail"] .action-card,
[data-card-style="rail"] .action-card * {
  --text: var(--text-primary);
  --text-primary: var(--text-primary);
  --text-secondary: var(--text-secondary);
  --text-muted: var(--text-muted);
}
[data-card-style="rail"] .action-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-sm) !important;
  color: var(--text) !important;
  overflow: hidden;
  position: relative;
}
[data-card-style="rail"] .action-card:hover {
  background: var(--surface-hover) !important;
  border-color: var(--border-strong) !important;
  box-shadow: var(--shadow-md) !important;
}
[data-card-style="rail"] .action-card .hero-scrim {
  display: none !important;
  background: transparent !important;
}
[data-card-style="rail"] .action-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px !important;
  background: var(--primary) !important;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  box-shadow: 0 0 8px var(--primary-glow);
  z-index: 3;
}
[data-card-style="rail"] .action-card .action-icon {
  background: color-mix(in srgb, var(--primary) 12%, var(--surface)) !important;
  border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent) !important;
  color: var(--primary) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
[data-card-style="rail"] .action-card .action-title {
  color: var(--text) !important;
  text-shadow: none !important;
  font-weight: 700 !important;
}
[data-card-style="rail"] .action-card .action-sub {
  color: var(--text-secondary) !important;
  text-shadow: none !important;
  opacity: 1 !important;
}
[data-card-style="rail"] .action-card img {
  opacity: var(--tile-img-op, 0.42) !important;
  filter: none !important;
}

/* --- Specialty-stores band (.specialty-tile): White card + bold colour line --- */
[data-card-style="rail"] .specialty-tile {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-sm) !important;
  color: var(--text) !important;
  overflow: hidden;
  position: relative;
}
[data-card-style="rail"] .specialty-tile:hover {
  background: var(--surface-hover) !important;
  border-color: var(--border-strong) !important;
  box-shadow: var(--shadow-md) !important;
}
[data-card-style="rail"] .specialty-tile .specialty-scrim {
  display: none !important;
  background: transparent !important;
}
[data-card-style="rail"] .specialty-tile::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px !important;
  background: var(--primary) !important;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  box-shadow: 0 0 8px var(--primary-glow);
  z-index: 3;
}
[data-card-style="rail"] .specialty-tile .specialty-label {
  color: var(--text) !important;
  text-shadow: none !important;
  font-weight: 700 !important;
}
[data-card-style="rail"] .specialty-tile .specialty-sub {
  color: var(--text-secondary) !important;
  text-shadow: none !important;
  opacity: 1 !important;
}
[data-card-style="rail"] .specialty-tile img {
  opacity: var(--tile-img-op, 0.42) !important;
  filter: none !important;
}

/* --- Tone-coloured list rows (Health Library and any row outside .profile-menu) --- */
[data-card-style="rail"] .profile-item[class*="tone-"] {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 6px 16px rgba(16,24,40,0.05);
}
[data-card-style="rail"] .profile-item[class*="tone-"]::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--primary);
  z-index: 2;
}
[data-card-style="rail"] .profile-item[class*="tone-"]::after { content: none; }
[data-card-style="rail"] .profile-item[class*="tone-"]:hover {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--border-strong);
  filter: none;
  box-shadow: 0 2px 4px rgba(16,24,40,0.05), 0 10px 24px rgba(16,24,40,0.08);
}
[data-card-style="rail"] .profile-item[class*="tone-"] .profile-item-icon {
  background: color-mix(in srgb, var(--primary) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 24%, transparent);
}
[data-card-style="rail"] .profile-item[class*="tone-"] .profile-item-label {
  color: var(--text);
  text-shadow: none;
}
[data-card-style="rail"] .profile-item[class*="tone-"] .profile-item-arrow {
  color: var(--text-muted);
  background: none;
  border: none;
}
/* Logout stays a highlighted destructive action even under the rail card style,
   whose white-card tone rule would otherwise outrank the base highlight. */
[data-card-style="rail"] .profile-item.profile-item-logout,
[data-card-style="rail"] .profile-item.profile-item-logout:hover {
  background: var(--error);
  border-color: color-mix(in srgb, #FFFFFF 26%, transparent);
  color: #FFFFFF;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 6px 16px rgba(16,24,40,0.05);
}
[data-card-style="rail"] .profile-item.profile-item-logout::before {
  background: color-mix(in srgb, #FFFFFF 45%, transparent);
}
[data-card-style="rail"] .profile-item.profile-item-logout .profile-item-icon {
  background: color-mix(in srgb, #FFFFFF 18%, transparent);
  border: 1px solid color-mix(in srgb, #FFFFFF 30%, transparent);
}
[data-card-style="rail"] .profile-item.profile-item-logout .profile-item-label {
  color: #FFFFFF;
  text-shadow: none;
}
[data-card-style="rail"] .profile-item.profile-item-logout .profile-item-arrow {
  color: rgba(255,255,255,0.75);
  background: none;
  border: none;
}
[data-theme="dark"][data-card-style="rail"] .profile-item.profile-item-logout,
[data-theme="dark"][data-card-style="rail"] .profile-item.profile-item-logout .profile-item-label {
  color: #3F0D0D;
}
[data-theme="dark"][data-card-style="rail"] .profile-item.profile-item-logout .profile-item-arrow {
  color: rgba(63,13,13,0.7);
}

/* ===================================================================
   My Health dashboard (#/health) — a dense one-glance board.
   Everything is compact by design: the owner's brief was "seen in one
   glance, not one below another". Prefix `hd-` is dashboard-only.
   =================================================================== */
.hd { display: flex; flex-direction: column; gap: 12px; }

.hd-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #FFFFFF;
  box-shadow: var(--shadow-md);
}
.hd-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 130% at 92% -10%, rgba(255,255,255,0.30), transparent 62%);
  pointer-events: none;
}
.hd-ring {
  --pct: 0;
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#FFFFFF calc(var(--pct) * 1%), rgba(255,255,255,0.28) 0);
}
.hd-ring-inner {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  background: color-mix(in srgb, var(--primary) 78%, #000000);
}
.hd-ring-val { font-size: 17px; font-weight: 800; }
.hd-ring-cap { font-size: 8px; text-transform: uppercase; letter-spacing: 0.09em; opacity: 0.85; margin-top: 3px; }
.hd-hero-side { position: relative; z-index: 1; flex: 1; min-width: 0; }
.hd-hello { font-size: 15px; font-weight: 800; }
.hd-sub { font-size: 11.5px; opacity: 0.9; margin-top: 1px; }
.hd-hero-stats { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.hd-hero-stat {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.32);
  border-radius: var(--radius-sm);
  padding: 5px 9px;
}
.hd-hero-stat b { display: block; font-size: 14px; font-weight: 800; line-height: 1.15; }
.hd-hero-stat span { font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.92; }

.hd-vitals { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.hd-vitals::-webkit-scrollbar { display: none; }
.hd-vital {
  flex: 0 0 auto;
  min-width: 76px;
  padding: 7px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
}
.hd-vital b { display: block; font-size: 14px; font-weight: 800; color: var(--text); line-height: 1.2; }
.hd-vital span { font-size: 9.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.hd-vital-add {
  display: flex;
  align-items: center;
  border-style: dashed;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  background: none;
  font-family: inherit;
  cursor: pointer;
}

.hd-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text);
  background: var(--warning-surface);
  border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent);
}
.hd-alert b { font-weight: 800; }

.hd-card {
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.hd-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hd-card-title { font-size: 13.5px; font-weight: 800; }
.hd-card-meta { font-size: 11.5px; font-weight: 700; color: var(--text-secondary); }
.hd-bar { height: 6px; margin-top: 8px; border-radius: var(--radius-full); background: color-mix(in srgb, var(--primary) 15%, var(--surface)); overflow: hidden; }
.hd-bar > i { display: block; height: 100%; border-radius: var(--radius-full); background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width 0.4s ease; }

.hd-doses { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.hd-dose {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface-hover);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
}
.hd-dose i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); }
.hd-dose.taken { color: var(--success); border-color: color-mix(in srgb, var(--success) 45%, transparent); }
.hd-dose.taken i { background: var(--success); }
.hd-dose.missed, .hd-dose.skipped { color: var(--error); border-color: color-mix(in srgb, var(--error) 45%, transparent); }
.hd-dose.missed i, .hd-dose.skipped i { background: var(--error); }
.hd-dose.next { color: var(--primary); border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
.hd-dose.next i { background: var(--primary); }
.hd-next { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--border); }
.hd-next-time { font-size: 16px; font-weight: 800; color: var(--primary); }
.hd-next-name { flex: 1; min-width: 110px; font-size: 13px; font-weight: 700; }

.hd-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(94px, 1fr)); gap: 8px; }
.hd-tile {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 10px 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.hd-tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--tone, var(--primary)); }
.hd-tile-ico { font-size: 13px; }
.hd-tile b { font-size: 19px; font-weight: 800; line-height: 1.1; color: var(--text); }
.hd-tile span { font-size: 10.5px; line-height: 1.25; color: var(--text-muted); }

.hd-rows { display: flex; flex-direction: column; gap: 6px; }
.hd-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--tone, var(--border));
  border-radius: var(--radius-sm);
  font: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.hd-row-ico { flex: 0 0 auto; font-size: 15px; }
.hd-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hd-row-t { display: block; font-size: 12.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-row-s { display: block; font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-row .badge { flex: 0 0 auto; font-size: 10.5px; padding: 3px 8px; }

.hd-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.hd-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.hd-chip span.hd-chip-go { margin-left: auto; color: var(--text-muted); }
.hd-note { font-size: 11px; color: var(--text-muted); line-height: 1.5; }
.hd-section-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); }

/* --- v3.13.8: the dashboards honour the owner's two-option card style.
   solid keeps the gradient hero; rail turns it into a clean surface card
   carrying the brand only as the bold left line, exactly like the homepage
   boxes in rail mode. --- */
[data-card-style="rail"] .hd-hero {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 5px solid var(--primary);
}
[data-card-style="rail"] .hd-hero::after { content: none; }
[data-card-style="rail"] .hd-ring {
  background: conic-gradient(var(--primary) calc(var(--pct) * 1%), color-mix(in srgb, var(--primary) 16%, var(--surface)) 0);
}
[data-card-style="rail"] .hd-ring-inner { background: var(--surface); color: var(--text); }
[data-card-style="rail"] .hd-sub { color: var(--text-secondary); opacity: 1; }
[data-card-style="rail"] .hd-hero-stat {
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  color: var(--text);
}
[data-card-style="rail"] .hd-hero-stat span { color: var(--text-muted); opacity: 1; }
[data-card-style="rail"] .hd-hero .btn-glass.on-photo {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
/* Rails read a touch bolder in rail mode so the boards match the home tiles. */
[data-card-style="rail"] .hd-vital,
[data-card-style="rail"] .hd-row { border-left-width: 5px; }
[data-card-style="rail"] .hd-tile::before { width: 5px; }

/* ===== STAFF WORK QUEUE ===== */
/* The pharmacist's landing screen: every queue is a full-width tap target, so
   a hundred-prescription shift is worked without hunting for small buttons. */
.wq-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.wq-total {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  color: var(--primary);
}

.wq-total-label {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 4px;
  max-width: 22ch;
}

.wq-checked {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.wq-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 18px 0 8px;
}

.wq-card {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  margin-bottom: 10px;
  padding: 14px 16px;
  cursor: pointer;
  border-left: 4px solid var(--warning);
}

.wq-card.wq-first { border-left-color: var(--error); }
.wq-card.wq-idle { border-left-color: var(--success); opacity: 0.82; }

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

.wq-icon { font-size: 22px; line-height: 1; }

.wq-text { flex: 1; min-width: 0; }

.wq-label {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
}

.wq-hint {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.wq-count {
  font-size: 24px;
  font-weight: 800;
  color: var(--warning);
  min-width: 34px;
  text-align: right;
}

.wq-card.wq-first .wq-count { color: var(--error); }
.wq-count-zero { color: var(--text-muted); }

.wq-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.wq-waiting {
  font-size: 11.5px;
  color: var(--text-muted);
}

.wq-open {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}

/* ==========================================================================
   STATE-OF-THE-ART RX CAPTURE, SCANNER & CAMERA SUITE
   ========================================================================== */

/* Multi-Action Ingestion Hub */
.rx-scanner-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.rx-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 10px;
  border-radius: var(--radius-md);
  background: var(--surface-glass, rgba(255, 255, 255, 0.7));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.rx-action-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.18);
  background: var(--surface);
}

.rx-action-card:active {
  transform: translateY(0);
}

.rx-action-card .rx-act-icon {
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
  transition: transform 0.2s ease;
}

.rx-action-card:hover .rx-act-icon {
  transform: scale(1.1);
  background: var(--primary);
  color: #fff;
}

.rx-action-card .rx-act-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.rx-action-card .rx-act-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.2;
}

/* Modern Reactive Dropzone */
.rx-dropzone-modern {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  background: var(--surface-glass, rgba(255, 255, 255, 0.5));
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.rx-dropzone-modern:hover,
.rx-dropzone-modern.dragover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
  transform: scale(1.008);
}

.rx-dropzone-modern.dragover {
  border-style: solid;
  border-width: 2.5px;
}

.rx-drop-badges {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.rx-badge-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Live Camera Scanner Overlay / Modal */
.cv-scanner-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 15, 29, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  color: #fff;
  overflow: hidden;
}

.cv-scanner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.4);
  z-index: 10;
}

.cv-scanner-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cv-scanner-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cv-scanner-tool-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cv-scanner-tool-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.cv-scanner-body {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cv-scanner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cv-viewfinder-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.cv-viewfinder-frame {
  width: min(85vw, 420px);
  height: min(65vh, 520px);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

/* Corner Guides */
.cv-vf-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: #10b981;
  border-style: solid;
}
.cv-vf-tl { top: -2px; left: -2px; border-width: 4px 0 0 4px; border-top-left-radius: 12px; }
.cv-vf-tr { top: -2px; right: -2px; border-width: 4px 4px 0 0; border-top-right-radius: 12px; }
.cv-vf-bl { bottom: -2px; left: -2px; border-width: 0 0 4px 4px; border-bottom-left-radius: 12px; }
.cv-vf-br { bottom: -2px; right: -2px; border-width: 0 4px 4px 0; border-bottom-right-radius: 12px; }

/* Animated Scanner Laser Beam */
.cv-scan-laser {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #10b981 20%, #34d399 50%, #10b981 80%, transparent);
  box-shadow: 0 0 16px #10b981, 0 0 8px #34d399;
  animation: cv-scan-anim 2.4s ease-in-out infinite alternate;
}

@keyframes cv-scan-anim {
  0% { top: 4%; opacity: 0.3; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 96%; opacity: 0.3; }
}

.cv-viewfinder-hint {
  margin-top: 18px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  background: rgba(0, 0, 0, 0.5);
  padding: 6px 14px;
  border-radius: 100px;
}

/* Bottom Controls */
.cv-scanner-footer {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10;
}

.cv-shutter-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25), 0 8px 24px rgba(16, 185, 129, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  transition: all 0.18s ease;
}

.cv-shutter-btn:hover {
  transform: scale(1.08);
  background: #059669;
}

.cv-shutter-btn:active {
  transform: scale(0.94);
}

/* Snapshot Preview & Confirmation */
.cv-snapshot-preview {
  position: absolute;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.cv-snapshot-img {
  max-width: 90vw;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}


/* --- Date / time pickers -------------------------------------------------
   The native picker button is only a pseudo-element: if the engine renders it
   transparent or zero-sized (which is what "tooltip says Show date picker but
   no icon is visible" means), the control looks like a plain text box and the
   user cannot open the calendar. Paint it explicitly, in both themes, so every
   date field in the product (register From/To, batch expiry, PO dates, slot
   date, ...) has a visible, tappable calendar button.
   ------------------------------------------------------------------------- */
input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="week"] {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 24px;
  height: 24px;
  padding: 0;
  margin-left: 8px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  opacity: 0.9;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A2A00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16' rx='2.5'/%3E%3Cpath d='M8 2.5v4M16 2.5v4M3 9.5h18'/%3E%3C/svg%3E");
}

input[type="date"]:hover::-webkit-calendar-picker-indicator,
input[type="datetime-local"]:hover::-webkit-calendar-picker-indicator,
input[type="month"]:hover::-webkit-calendar-picker-indicator,
input[type="week"]:hover::-webkit-calendar-picker-indicator {
  opacity: 1;
  background-color: var(--primary-surface);
}

input[type="date"]:focus-visible::-webkit-calendar-picker-indicator,
input[type="datetime-local"]:focus-visible::-webkit-calendar-picker-indicator {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Night palettes: a dark-stroke icon would vanish on the dark field. */
[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="month"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="week"]::-webkit-calendar-picker-indicator {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFE7CC' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16' rx='2.5'/%3E%3Cpath d='M8 2.5v4M16 2.5v4M3 9.5h18'/%3E%3C/svg%3E");
}
