/**
 * ENNU Face Chart - Luxury Medical Aesthetics Interface
 * World-Class Premium Design System
 * iPad-Optimized Professional Face Charting
 *
 * @package ENNU_Life_Assessments
 * @version 7.0.0 - Luxury Redesign
 */

/* ==========================================================================
   LUXURY DESIGN SYSTEM - Premium Typography & Colors
   ========================================================================== */

/* Import Premium Typography - Josefin Sans + Handwriting Font */
@import url("https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@300;400;500;600;700&family=Caveat:wght@400;500;600;700&display=swap");

/* ==========================================================================
   CSS CUSTOM PROPERTIES - Luxury Theme Tokens
   ========================================================================== */

:root {
  /* Premium Color Palette */
  --luxury-gold: #C9A962;
  --luxury-gold-light: #D4BC7B;
  --luxury-gold-dark: #B8954D;
  --luxury-gold-subtle: rgba(201, 169, 98, 0.1);
  --luxury-gold-glow: rgba(201, 169, 98, 0.25);

  /* Neutral Sophistication */
  --charcoal-900: #1A1A1E;
  --charcoal-800: #26262B;
  --charcoal-700: #36363D;
  --charcoal-600: #4A4A54;
  --charcoal-500: #62626E;
  --charcoal-400: #8E8E9A;
  --charcoal-300: #B4B4BC;
  --charcoal-200: #D8D8DE;
  --charcoal-100: #EEEEEF;
  --charcoal-50: #F7F7F8;

  /* Clinical Whites */
  --clinical-white: #FFFFFF;
  --clinical-cream: #FDFCFA;
  --clinical-warm: #FAF9F7;
  --clinical-cool: #F8F9FB;

  /* Accent States - Luxury Gold Theme */
  --success-emerald: var(--luxury-gold);
  --success-light: var(--luxury-gold-subtle);
  --warning-amber: var(--luxury-gold-dark);
  --warning-light: var(--luxury-gold-subtle);
  --error-rose: #8B4513;
  --error-light: rgba(139, 69, 19, 0.1);
  --info-sapphire: var(--luxury-gold);
  --info-light: var(--luxury-gold-subtle);

  /* Light Theme (Default) */
  --bg-primary: var(--clinical-white);
  --bg-secondary: var(--clinical-cream);
  --bg-tertiary: var(--charcoal-50);
  --bg-elevated: var(--clinical-white);
  --bg-canvas: var(--clinical-warm);

  --text-primary: var(--charcoal-900);
  --text-secondary: var(--charcoal-800);
  --text-tertiary: var(--charcoal-600);
  --text-inverse: var(--clinical-white);

  --border-subtle: var(--charcoal-100);
  --border-default: var(--charcoal-200);
  --border-strong: var(--charcoal-300);

  --accent-primary: var(--luxury-gold);
  --accent-hover: var(--luxury-gold-dark);
  --accent-subtle: var(--luxury-gold-subtle);

  /* Typography Scale */
  --font-display: "Josefin Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body: "Josefin Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", monospace;

  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.8125rem;    /* 13px */
  --text-base: 0.9375rem;  /* 15px */
  --text-md: 1rem;         /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */

  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Spacing Scale */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */

  /* Border Radius - Refined */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadows - Luxury Depth */
  --shadow-xs: 0 1px 2px rgba(26, 26, 30, 0.04);
  --shadow-sm: 0 2px 4px rgba(26, 26, 30, 0.06);
  --shadow-md: 0 4px 8px rgba(26, 26, 30, 0.08), 0 2px 4px rgba(26, 26, 30, 0.04);
  --shadow-lg: 0 8px 24px rgba(26, 26, 30, 0.10), 0 4px 8px rgba(26, 26, 30, 0.06);
  --shadow-xl: 0 16px 48px rgba(26, 26, 30, 0.12), 0 8px 16px rgba(26, 26, 30, 0.08);
  --shadow-2xl: 0 24px 64px rgba(26, 26, 30, 0.16), 0 12px 24px rgba(26, 26, 30, 0.10);
  --shadow-gold: 0 4px 16px rgba(201, 169, 98, 0.20);
  --shadow-gold-lg: 0 8px 32px rgba(201, 169, 98, 0.30);
  --shadow-inner: inset 0 2px 4px rgba(26, 26, 30, 0.06);

  /* Transitions - Smooth & Refined */
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --duration-fast: 150ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
  --duration-slower: 400ms;

  --transition-fast: var(--duration-fast) var(--ease-out);
  --transition-normal: var(--duration-normal) var(--ease-out);
  --transition-slow: var(--duration-slow) var(--ease-out);

  /* Z-Index Scale */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 900;
  --z-modal: 1000;
  --z-popover: 600;
  --z-tooltip: 700;
  --z-notification: 800;
  --z-admin-bar: 99999;

  /* Touch Targets (Apple HIG: 44px minimum) */
  --touch-target-min: 44px;
  --touch-target-comfortable: 48px;
  --touch-target-large: 56px;
}

/* ==========================================================================
   DARK THEME - Sophisticated Night Mode
   ========================================================================== */

.theme-dark {
  --bg-primary: var(--charcoal-900);
  --bg-secondary: var(--charcoal-800);
  --bg-tertiary: var(--charcoal-700);
  --bg-elevated: var(--charcoal-800);
  --bg-canvas: #0D0D0F;

  --text-primary: var(--charcoal-100);
  --text-secondary: var(--charcoal-300);
  --text-tertiary: var(--charcoal-400);
  --text-inverse: var(--charcoal-900);

  --border-subtle: var(--charcoal-700);
  --border-default: var(--charcoal-600);
  --border-strong: var(--charcoal-500);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.35), 0 4px 8px rgba(0, 0, 0, 0.25);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.4), 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   DARK THEME - Comprehensive Element Overrides
   ========================================================================== */

/* Container & Body */
.theme-dark .ennu-face-chart-container {
  background: var(--bg-canvas);
  color: var(--text-primary);
}

/* Header */
.theme-dark .face-chart-header {
  background: linear-gradient(180deg, var(--charcoal-900) 0%, var(--charcoal-800) 100%);
  border-bottom-color: var(--charcoal-700);
}

.theme-dark .face-chart-header *,
.theme-dark .header-section *,
.theme-dark .header-main-row * {
  color: var(--charcoal-100);
}

/* Session Status - Dark Mode */
.theme-dark .session-status {
  background: var(--charcoal-800);
  border-color: var(--charcoal-600);
  color: var(--charcoal-100);
}

.theme-dark .status-time,
.theme-dark .status-provider {
  color: var(--charcoal-200);
}

.theme-dark .status-timer {
  color: var(--luxury-gold);
}

/* Action Buttons - Dark Mode */
.theme-dark .action-btn,
.theme-dark .voice-btn,
.theme-dark .theme-btn,
.theme-dark .complete-btn {
  background: var(--charcoal-800);
  border-color: var(--charcoal-600);
  color: var(--charcoal-100);
}

.theme-dark .action-btn:hover,
.theme-dark .voice-btn:hover,
.theme-dark .theme-btn:hover,
.theme-dark .complete-btn:hover {
  background: var(--charcoal-700);
  border-color: var(--luxury-gold);
  color: var(--luxury-gold);
}

.theme-dark .complete-btn::before {
  color: var(--luxury-gold);
}

.theme-dark .action-btn svg,
.theme-dark .voice-btn svg,
.theme-dark .theme-btn svg {
  stroke: var(--charcoal-100);
}

.theme-dark .action-btn:hover svg,
.theme-dark .voice-btn:hover svg,
.theme-dark .theme-btn:hover svg {
  stroke: var(--luxury-gold);
}

/* Mode Toggle Bar - Dark Mode */
.theme-dark .mode-toggle-bar,
.theme-dark .ennu-fc-mode-toggle-bar {
  background: var(--charcoal-800);
  border-color: var(--charcoal-600);
}

.theme-dark .mode-btn {
  background: transparent;
  color: var(--charcoal-200);
}

.theme-dark .mode-btn:hover {
  background: var(--charcoal-700);
  color: var(--charcoal-100);
}

.theme-dark .mode-btn.active {
  background: linear-gradient(135deg, var(--luxury-gold) 0%, var(--luxury-gold-dark) 100%);
  color: var(--charcoal-900);
}

/* Canvas & Content - Dark Mode */
.theme-dark .face-chart-content {
  background: var(--bg-canvas);
}

.theme-dark .canvas-wrapper,
.theme-dark .ennu-fc-canvas-wrapper {
  background: var(--charcoal-900);
}

/* Sidebar Panels - Dark Mode */
.theme-dark .face-chart-sidebar,
.theme-dark .sidebar-panel {
  background: var(--charcoal-900);
  border-color: var(--charcoal-700);
  color: var(--charcoal-100);
}

.theme-dark .face-chart-sidebar *,
.theme-dark .sidebar-panel * {
  color: var(--charcoal-100);
}

.theme-dark .sidebar-header {
  background: var(--charcoal-800);
  border-color: var(--charcoal-700);
}

/* Tool Buttons - Dark Mode */
.theme-dark .tool-btn,
.theme-dark .btn-canvas-action {
  background: var(--charcoal-800);
  border-color: var(--charcoal-600);
  color: var(--charcoal-100);
}

.theme-dark .tool-btn:hover,
.theme-dark .btn-canvas-action:hover {
  background: var(--charcoal-700);
  border-color: var(--luxury-gold);
  color: var(--luxury-gold);
}

.theme-dark .tool-btn.active,
.theme-dark .btn-canvas-action.active {
  background: var(--luxury-gold);
  color: var(--charcoal-900);
}

.theme-dark .tool-btn svg,
.theme-dark .btn-canvas-action svg {
  stroke: currentColor;
}

/* Canvas Toolbar - Dark Mode */
.theme-dark .canvas-toolbar,
.theme-dark .ennu-fc-canvas-toolbar {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-bottom: 1px solid rgba(197, 163, 92, 0.3);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  border-color: var(--charcoal-700);
}

/* Modals - Dark Mode */
.theme-dark .modal-content {
  background: var(--charcoal-900);
  border-color: var(--charcoal-700);
  color: var(--charcoal-100);
}

.theme-dark .modal-header {
  background: var(--charcoal-800);
  border-color: var(--charcoal-700);
}

/* Forms - Dark Mode */
.theme-dark input,
.theme-dark select,
.theme-dark textarea {
  background: var(--charcoal-800);
  border-color: var(--charcoal-600);
  color: var(--charcoal-100);
}

.theme-dark input:focus,
.theme-dark select:focus,
.theme-dark textarea:focus {
  border-color: var(--luxury-gold);
}

/* Photo Thumbnails - Dark Mode */
.theme-dark .photo-thumbnails-strip {
  background: rgba(26, 26, 30, 0.9);
}

.theme-dark .photo-thumb {
  border-color: var(--charcoal-600);
}

.theme-dark .photo-thumb.active {
  border-color: var(--luxury-gold);
}

/* Template Thumbnails - Dark Mode */
.theme-dark .template-thumbnails-strip {
  background: rgba(26, 26, 30, 0.9);
}

.theme-dark .template-thumb {
  background: var(--charcoal-800);
  border-color: var(--charcoal-600);
  color: var(--charcoal-300);
}

.theme-dark .template-thumb:hover {
  border-color: var(--luxury-gold);
  color: var(--luxury-gold);
}

.theme-dark .template-thumb.active {
  background: var(--luxury-gold);
  border-color: var(--luxury-gold);
  color: var(--charcoal-900);
}

/* Treatment/Billing Panel - Dark Mode */
.theme-dark .treatment-item,
.theme-dark .product-card {
  background: var(--charcoal-800);
  border-color: var(--charcoal-700);
  color: var(--charcoal-100);
}

.theme-dark .treatment-item:hover,
.theme-dark .product-card:hover {
  border-color: var(--luxury-gold);
}

/* Back Button - Dark Mode */
.theme-dark .ennu-fc-btn-back-mini {
  background: var(--charcoal-800);
  border-color: var(--charcoal-600);
  color: var(--charcoal-100);
}

.theme-dark .ennu-fc-btn-back-mini:hover {
  background: var(--charcoal-700);
  border-color: var(--luxury-gold);
  color: var(--luxury-gold);
}

.theme-dark .ennu-fc-btn-back-mini svg {
  stroke: currentColor;
}

/* ==========================================================================
   GLOBAL RESETS & BASE STYLES
   ========================================================================== */

/* Allow scrolling - Critical for page functionality */
html,
body {
  position: relative !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  height: auto !important;
  min-height: 100% !important;
  -webkit-overflow-scrolling: touch !important;
}

/* Base typography */
.ennu-face-chart-container {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  color: #1A1A1E;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Prevent horizontal scroll on main container - only canvas wrapper can scroll */
  overflow-x: hidden;
  max-width: 100vw;
}

/* Force black text on all interactive elements */
.ennu-face-chart-container button,
.ennu-face-chart-container a,
.ennu-face-chart-container label,
.ennu-face-chart-container span,
.ennu-face-chart-container p,
.ennu-face-chart-container h1,
.ennu-face-chart-container h2,
.ennu-face-chart-container h3,
.ennu-face-chart-container h4,
.ennu-face-chart-container h5,
.ennu-face-chart-container h6,
.ennu-face-chart-container .btn-text,
.ennu-face-chart-container input,
.ennu-face-chart-container select,
.ennu-face-chart-container textarea {
  color: #1A1A1E;
}

/* Header, toolbar, sidebar, panel text - force black */
.face-chart-header,
.face-chart-header *,
.canvas-toolbar,
.canvas-toolbar *,
.face-chart-sidebar,
.face-chart-sidebar *,
.sidebar-panel,
.sidebar-panel * {
  color: #1A1A1E;
}

/* Exceptions for gold accent buttons */
.ennu-face-chart-container .btn-primary,
.ennu-face-chart-container .btn-save,
.ennu-face-chart-container .btn-complete {
  color: #1A1A1E;
}

/* SVG icons - use currentColor for proper inheritance */
.ennu-face-chart-container svg {
  stroke: currentColor;
}

/* Ensure stroke is black */
.face-chart-header svg,
.canvas-toolbar svg,
.face-chart-sidebar svg,
.sidebar-panel svg,
.btn-canvas-action svg {
  stroke: #1A1A1E;
}

/* Selection styling */
.ennu-face-chart-container ::selection {
  background: var(--luxury-gold-subtle);
  color: var(--text-primary);
}

/* ==========================================================================
   MAIN CONTAINER - Full Application Shell
   ========================================================================== */

.ennu-face-chart-container {
  width: 100%;
  min-height: 100vh;
  height: auto;
  background: var(--bg-canvas);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Full screen on desktop/iPad */
@media (min-width: 768px) {
  .ennu-face-chart-container {
    width: 100vw;
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
    position: relative;
    top: 0;
    left: 0;
    z-index: var(--z-base);
  }
}

/* ==========================================================================
   HEADER - Luxury Clinical Toolbar (Matching luxury-checkin.css)
   ========================================================================== */

.face-chart-header {
  background: linear-gradient(180deg, var(--clinical-white) 0%, var(--clinical-cream) 100%);
  border-bottom: 1px solid rgba(201, 169, 98, 0.15);
  position: sticky;
  top: 0;
  z-index: 600; /* Higher than sidebar backdrop (450) and sidebars (500) to ensure header is always clickable */
  flex-shrink: 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  /* Allow dropdowns to escape - use clip-path instead of overflow for horizontal containment */
  overflow: visible;
  max-width: 100vw;
}

/* Gold accent line at top */
.face-chart-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 3px;
  background: linear-gradient(135deg, #C9A962 0%, #E5D4A1 50%, #C9A962 100%);
  border-radius: var(--radius-full);
}

.theme-dark .face-chart-header {
  background: linear-gradient(180deg, #1A1A1E 0%, #26262B 100%);
  border-color: var(--charcoal-700);
}

/* Admin bar offset - not needed with position: relative */

/* Compact Header Layout */
.face-chart-header.compact-header {
  box-shadow: 0 4px 16px rgba(26, 39, 68, 0.06);
}

.header-main-row,
.ennu-fc-header-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  min-height: 72px;
  max-width: 100%;
  box-sizing: border-box;
}

/* Header Sections */
.header-section,
.ennu-fc-header-section {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

/* Left Section: Logo & Navigation */
.header-left-section,
.ennu-fc-header-left-section {
  flex: 0 0 auto;
}

.header-logo-mini,
.ennu-fc-header-logo-mini {
  height: 32px;
  width: auto;
  object-fit: contain;
}

/* Logo light/dark mode switching */
/* Default: show black logo (light theme) - ignore system dark mode preference */
.header-logo-light {
  display: block !important;
  visibility: visible !important;
  width: auto !important;
  height: 32px !important;
}

.header-logo-dark {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  position: absolute !important;
  left: -9999px !important;
}

/* Dark mode: show white logo - ONLY with explicit .theme-dark class */
.theme-dark .header-logo-light {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  position: absolute !important;
  left: -9999px !important;
}

.theme-dark .header-logo-dark {
  display: block !important;
  visibility: visible !important;
  width: auto !important;
  height: 32px !important;
  position: static !important;
  left: auto !important;
}

/* Back Button - Elegant */
.ennu-fc-btn-back-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.ennu-fc-btn-back-mini:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.ennu-fc-btn-back-mini:active {
  transform: scale(0.96);
}

.ennu-fc-btn-back-mini svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

/* Chart Title */
.ennu-fc-title-compact,
#chart-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* Center Section: Mode Navigation */
.header-center-section,
.ennu-fc-header-center-section {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  max-width: 560px;
}

/* Mode Toggle Bar - Premium Segmented Control */
.ennu-fc-mode-toggle-bar {
  display: flex;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 3px;
  gap: 2px;
}

.ennu-fc-mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  min-height: var(--touch-target-min);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.ennu-fc-mode-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.ennu-fc-mode-btn.active {
  background: var(--accent-primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-gold);
}

.ennu-fc-mode-btn .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.ennu-fc-mode-label {
  display: inline;
}

/* Right Section: Status & Actions */
.header-right-section,
.ennu-fc-header-right-section {
  flex: 0 0 auto;
  gap: var(--space-3);
}

/* Session Status Badge */
.ennu-fc-session-status {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.ennu-fc-status-timer {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-weight: var(--font-medium);
  color: var(--success-emerald);
}

.ennu-fc-status-timer::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--success-emerald);
  border-radius: var(--radius-full);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}

/* Header Action Buttons */
.ennu-fc-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-normal);
  -webkit-tap-highlight-color: transparent;
}

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

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

.action-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
}

/* Ensure SVG icons are visible in light mode */
.voice-btn svg,
.theme-btn svg {
  stroke: #1A1A1E !important;
  fill: none !important;
}

/* Theme Switcher */
.ennu-fc-btn-theme-switcher {
  position: relative;
}

.ennu-fc-btn-theme-switcher svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-normal);
}

.ennu-fc-btn-theme-switcher:hover svg {
  transform: rotate(15deg);
}

/* Complete/Checkout Button - Premium Gold CTA */
.complete-btn,
.btn-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-5);
  min-height: var(--touch-target-min);
  min-width: 120px;
  background: linear-gradient(135deg, var(--luxury-gold) 0%, var(--luxury-gold-dark) 100%);
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-inverse);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-gold);
  -webkit-tap-highlight-color: transparent;
}

.complete-btn:hover,
.btn-checkout:hover {
  background: linear-gradient(135deg, var(--luxury-gold-light) 0%, var(--luxury-gold) 100%);
  box-shadow: var(--shadow-gold-lg);
  transform: translateY(-1px);
}

.complete-btn:active,
.btn-checkout:active {
  transform: translateY(0);
  box-shadow: var(--shadow-gold);
}

/* ==========================================================================
   MAIN CONTENT LAYOUT
   ========================================================================== */

.face-chart-content {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  overflow: visible;
  height: calc(100vh - 80px); /* Account for header */
  padding: 0;
  margin: 0;
}

.admin-bar .face-chart-content {
  height: calc(100vh - 112px); /* Account for header + admin bar */
}

@media (max-width: 782px) {
  .admin-bar .face-chart-content {
    height: calc(100vh - 126px); /* Account for header + mobile admin bar */
  }
}

/* Chart Mode - Canvas Full Width with Overlay Sidebars */
.face-chart-content.mode-face-chart {
  position: relative;
}

.face-chart-content.mode-face-chart .face-chart-canvas-area {
  flex: 1;
  width: 100%;
}

/* Non-Chart Modes - Full Width Panel */
.face-chart-content.mode-treatment,
.face-chart-content.mode-notes,
.face-chart-content.mode-tip,
.face-chart-content.mode-refer {
  flex-direction: column;
}

.face-chart-content.mode-treatment .face-chart-canvas-area,
.face-chart-content.mode-notes .face-chart-canvas-area,
.face-chart-content.mode-tip .face-chart-canvas-area,
.face-chart-content.mode-refer .face-chart-canvas-area {
  display: none;
}

.face-chart-content.mode-treatment .face-chart-sidebar,
.face-chart-content.mode-notes .face-chart-sidebar,
.face-chart-content.mode-tip .face-chart-sidebar,
.face-chart-content.mode-refer .face-chart-sidebar {
  display: none !important;
}

/* ==========================================================================
   CANVAS AREA - Premium Drawing Surface
   ========================================================================== */

.face-chart-canvas-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-canvas);
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  position: relative;
  /* Prevent horizontal scroll - only vertical allowed on this container */
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  margin: 0;
  /* Prevent overscroll bounce on iOS that could show past canvas edges */
  overscroll-behavior: contain;
}

/* Canvas Container - Professional Drawing Surface */
.canvas-container {
  flex: 1 1 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--clinical-white);
  margin: 0;
  width: 100%;
  max-width: 100%;
  border-radius: 0;
  box-shadow: none;
  /* Allow canvas-wrapper to handle scroll - container just clips at edges */
  overflow: visible;
  border: none;
  min-height: 400px;
  height: auto;
}

/* Canvas Wrapper - Contains the actual canvas with zoom/pan functionality */
.canvas-wrapper,
.ennu-fc-canvas-wrapper {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  position: relative;
  padding: var(--space-5);
  margin: 0 auto;
  background: var(--clinical-white);
  
  /* ONLY the canvas wrapper allows scrolling for zoom/pan - bidirectional */
  overflow: auto;
  /* Prevent overscroll bounce */
  overscroll-behavior: contain;

  /* DO NOT use scroll-behavior: smooth - conflicts with JS zoom animation */
  /* JS handles smooth zoom/scroll via requestAnimationFrame */
  scroll-behavior: auto;
  -webkit-overflow-scrolling: touch;

  /* Contain zoom within wrapper */
  contain: layout style;
  width: 100%;
  min-height: 400px;
  
  /* Touch gesture improvements for zoom/pan */
  touch-action: pan-x pan-y pinch-zoom;
}

/* Canvas element - JS handles sizing for smooth zoom */
.canvas-wrapper #face-chart-canvas,
.ennu-fc-canvas-wrapper #face-chart-canvas,
#face-chart-canvas {
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 24px rgba(26, 39, 68, 0.1);
  border-radius: var(--radius-md);
}

/* AI Analysis Overlay Canvas - Must match main canvas positioning */
#ai-overlay-canvas,
.face-chart-ai-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  pointer-events: none !important;
  z-index: 10 !important;
  /* Match main canvas styling */
  margin: 0 auto;
  border-radius: var(--radius-md);
}

/* Ensure canvas wrapper has relative positioning for overlay */
.canvas-wrapper,
.ennu-fc-canvas-wrapper {
  position: relative;
}

/* ==========================================================================
   Template Thumbnails Strip - For Face/Body Template Switching
   ========================================================================== */

.template-thumbnails-strip {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: row;
  gap: 8px;
  z-index: 100;
  padding: 6px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(201, 169, 98, 0.3);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.template-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  min-width: 56px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 2px solid rgba(0, 0, 0, 0.1);
  background: var(--clinical-white);
  color: var(--charcoal-600);
  transition: all 0.2s ease;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.template-thumb svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.5;
}

.template-thumb:hover {
  border-color: var(--luxury-gold);
  color: var(--luxury-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(201, 169, 98, 0.2);
}

.template-thumb.active {
  background: linear-gradient(135deg, var(--luxury-gold) 0%, var(--luxury-gold-dark) 100%);
  border-color: var(--luxury-gold);
  color: var(--clinical-white);
  box-shadow: 0 2px 8px rgba(201, 169, 98, 0.4);
}

.template-thumb.active svg {
  stroke: var(--clinical-white);
}

/* Body template thumbnail - purple accent */
.template-thumb[data-template-type="body"] {
  /* Default state uses standard styling */
}

.template-thumb[data-template-type="body"]:hover:not(.active) {
  border-color: #7C6BE6;
  color: #7C6BE6;
  box-shadow: 0 4px 12px rgba(124, 107, 230, 0.2);
}

.template-thumb[data-template-type="body"].active {
  background: linear-gradient(135deg, #7C6BE6 0%, #9C88FF 100%);
  border-color: #7C6BE6;
  box-shadow: 0 2px 8px rgba(124, 107, 230, 0.4);
}

/* ==========================================================================
   Photo Thumbnails Strip - Top Left of Canvas
   ========================================================================== */

/* ==========================================================================
   REDESIGNED Photo Thumbnails Strip - Side-by-Side Photo/Silhouette
   Each photo row has the actual photo and silhouette option side by side
   New photos stack vertically
   ========================================================================== */

.photo-thumbnails-strip {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 100;
  max-height: calc(100% - 24px);
  overflow-y: auto;
  padding: 8px;
  background: rgba(26, 26, 30, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(201, 169, 98, 0.25);
  transition: opacity var(--transition-normal);
}

/* Hide when empty */
.photo-thumbnails-strip:empty {
  display: none;
}

/* Photo Row - One row per photo taken */
.photo-row {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  padding: 2px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.photo-row.active {
  background: rgba(201, 169, 98, 0.15);
}

/* Photo Pair - Photo + Silhouette side by side */
.photo-pair {
  display: flex;
  gap: 3px;
}

/* Individual thumbnail (photo or silhouette) */
.thumb-photo,
.thumb-silhouette {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.15);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--charcoal-700);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.thumb-photo img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  display: block;
}

/* Ensure photo row thumbnails never overflow */
.photo-row .thumb-photo,
.photo-row .thumb-silhouette {
  flex-shrink: 0;
  min-width: 44px;
  max-width: 44px;
  min-height: 44px;
  max-height: 44px;
}

.thumb-silhouette {
  background: linear-gradient(135deg, #2a2a35 0%, #1a1a22 100%);
}

.thumb-silhouette svg {
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.15s ease;
}

/* Active state - which view is currently shown */
.thumb-photo.active,
.thumb-silhouette.active {
  border-color: var(--luxury-gold);
  box-shadow: 0 0 0 2px rgba(201, 169, 98, 0.4);
}

.thumb-silhouette.active svg {
  color: var(--luxury-gold);
}

/* Hover states */
.thumb-photo:hover,
.thumb-silhouette:hover {
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

.thumb-silhouette:hover svg {
  color: rgba(255, 255, 255, 0.8);
}

/* Delete button for photo row */
.thumb-delete {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.8);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: all 0.15s ease;
  padding: 0;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.photo-row:hover .thumb-delete,
.photo-row.active .thumb-delete {
  opacity: 1;
}

.thumb-delete:hover {
  background: #dc2626;
  transform: scale(1.1);
}

/* Photo number badge */
.photo-number {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--luxury-gold);
  color: #1a1a22;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .thumb-photo,
  .thumb-silhouette {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }

  .thumb-delete {
    opacity: 0.8;
    width: 26px;
    height: 26px;
    min-width: 26px;
  }
}

/* Legacy classes for backward compatibility */
.photo-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
  flex-shrink: 0;
  background: var(--charcoal-800);
  opacity: 0.8;
  display: none; /* Hide legacy thumbnails */
}

.photo-thumb-delete {
  display: none; /* Hide legacy delete */
}

/* ==========================================================================
   TWO-ROW FOOTER BAR
   ========================================================================== */

.fc-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  background: rgba(250, 250, 249, 0.97);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  font-size: 10px;
  font-weight: 300;
  line-height: 1;
}

/* Hide footer when wizard is active */
body:has(.ennu-fc-modal-overlay.active) .fc-footer {
  display: none;
}

/* Footer Rows */
.fc-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  min-height: 22px;
}

/* Row 1: Title + Save */
.fc-footer-row-1 {
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

/* Row 2: Appointment + IDs */
.fc-footer-row-2 {
  font-size: 9px;
  min-height: 20px;
}

/* Title group container */
.fc-footer-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

/* Title */
.fc-footer-title {
  color: #374151;
}

/* DateTime next to title */
.fc-footer-datetime {
  color: #9ca3af;
  white-space: nowrap;
}

.fc-footer-datetime::before {
  content: '·';
  margin-right: 8px;
  color: #d1d5db;
}

/* Save Group */
.fc-save-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Save Button */
.fc-save-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.15s ease;
}

.fc-save-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #2563eb;
}

.fc-save-btn:active {
  transform: scale(0.95);
}

.fc-save-btn svg {
  width: 12px;
  height: 12px;
}

/* Separator dot */
.fc-footer-sep {
  color: #d1d5db;
  font-weight: 300;
  margin: 0 2px;
}

/* Left info container (appointment + location) */
.fc-footer-left-info {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

/* Appointment text */
.fc-footer-appt {
  color: #6b7280;
  white-space: nowrap;
}

/* Location */
.fc-footer-location {
  color: #9ca3af;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 300;
}

.fc-footer-location:not(:empty)::before {
  content: '@ ';
  color: #d1d5db;
}

/* IDs container */
.fc-footer-ids {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ID display */
.fc-footer-id {
  font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
  font-size: 9px;
  font-weight: 400;
  color: #6b7280;
  letter-spacing: -0.2px;
}

/* ==========================================================================
   SAVE STATUS INDICATOR
   ========================================================================== */

.fc-save-status {
  display: flex;
  align-items: center;
  gap: 4px;
}

.fc-save-status svg { display: none; flex-shrink: 0; }

.fc-save-text {
  font-size: 9px;
  font-weight: 400;
  color: #6b7280;
}

/* Saved = green check */
.fc-save-status[data-status="saved"] .icon-saved { display: block; stroke: #16a34a; }
.fc-save-status[data-status="saved"] .fc-save-text { color: #16a34a; }
.fc-save-status[data-status="saved"] .fc-save-text::after { content: 'Saved'; }

/* Unsaved = yellow dot */
.fc-save-status[data-status="unsaved"] .icon-unsaved { display: block; fill: #eab308; }
.fc-save-status[data-status="unsaved"] .fc-save-text { color: #ca8a04; }
.fc-save-status[data-status="unsaved"] .fc-save-text::after { content: 'Unsaved'; }

/* Saving = blue spinner */
.fc-save-status[data-status="saving"] .icon-saving {
  display: block;
  stroke: #2563eb;
  animation: fc-spin 0.8s linear infinite;
}
.fc-save-status[data-status="saving"] .fc-save-text { color: #2563eb; }
.fc-save-status[data-status="saving"] .fc-save-text::after { content: 'Saving...'; }

/* Error = red X */
.fc-save-status[data-status="error"] .icon-error { display: block; stroke: #dc2626; }
.fc-save-status[data-status="error"] .fc-save-text { color: #dc2626; }
.fc-save-status[data-status="error"] .fc-save-text::after { content: 'Error'; }

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

/* ==========================================================================
   STATUS BADGES - Unified Color System
   ========================================================================== */

.fc-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  font-size: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-radius: 3px;
  white-space: nowrap;
}

/* Gray - Draft, Archived, No Status */
.fc-badge-gray {
  background: rgba(107, 114, 128, 0.12);
  color: #6b7280;
}

/* Green - Completed, Reviewed, Paid */
.fc-badge-green {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

/* Blue - Processing, Checked-In, Active */
.fc-badge-blue {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

/* Yellow - Pending, On-Hold */
.fc-badge-yellow {
  background: rgba(234, 179, 8, 0.12);
  color: #b45309;
}

/* Orange - On-Hold (alternative) */
.fc-badge-orange {
  background: rgba(249, 115, 22, 0.12);
  color: #ea580c;
}

/* Red - Cancelled, Failed, Refunded, Error */
.fc-badge-red {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

/* Purple - Walk-in, Special */
.fc-badge-purple {
  background: rgba(168, 85, 247, 0.12);
  color: #7c3aed;
}

/* ==========================================================================
   DARK MODE
   ========================================================================== */

.ennu-fc-dark .fc-footer,
.theme-dark .fc-footer,
[data-theme="dark"] .fc-footer {
  background: rgba(30, 30, 32, 0.97);
  border-top-color: rgba(255, 255, 255, 0.08);
}

.ennu-fc-dark .fc-footer-row-1,
.theme-dark .fc-footer-row-1,
[data-theme="dark"] .fc-footer-row-1 {
  border-bottom-color: rgba(255, 255, 255, 0.04);
}

.ennu-fc-dark .fc-footer-title,
.theme-dark .fc-footer-title,
[data-theme="dark"] .fc-footer-title {
  color: #e5e7eb;
}

.ennu-fc-dark .fc-footer-datetime,
.theme-dark .fc-footer-datetime,
[data-theme="dark"] .fc-footer-datetime {
  color: #9ca3af;
}

.ennu-fc-dark .fc-footer-datetime::before,
.theme-dark .fc-footer-datetime::before,
[data-theme="dark"] .fc-footer-datetime::before {
  color: #4b5563;
}

.ennu-fc-dark .fc-footer-sep,
.theme-dark .fc-footer-sep,
[data-theme="dark"] .fc-footer-sep {
  color: #4b5563;
}

.ennu-fc-dark .fc-footer-appt,
.ennu-fc-dark .fc-footer-id,
.ennu-fc-dark .fc-footer-location,
.theme-dark .fc-footer-appt,
.theme-dark .fc-footer-id,
.theme-dark .fc-footer-location,
[data-theme="dark"] .fc-footer-appt,
[data-theme="dark"] .fc-footer-id,
[data-theme="dark"] .fc-footer-location {
  color: #9ca3af;
}

.ennu-fc-dark .fc-footer-location:not(:empty)::before,
.theme-dark .fc-footer-location:not(:empty)::before,
[data-theme="dark"] .fc-footer-location:not(:empty)::before {
  color: #4b5563;
}

.ennu-fc-dark .fc-save-btn,
.theme-dark .fc-save-btn,
[data-theme="dark"] .fc-save-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #9ca3af;
}

.ennu-fc-dark .fc-save-btn:hover,
.theme-dark .fc-save-btn:hover,
[data-theme="dark"] .fc-save-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

/* Dark mode badges - slightly brighter backgrounds */
.ennu-fc-dark .fc-badge-gray,
.theme-dark .fc-badge-gray,
[data-theme="dark"] .fc-badge-gray {
  background: rgba(107, 114, 128, 0.2);
}

.ennu-fc-dark .fc-badge-green,
.theme-dark .fc-badge-green,
[data-theme="dark"] .fc-badge-green {
  background: rgba(34, 197, 94, 0.18);
}

.ennu-fc-dark .fc-badge-blue,
.theme-dark .fc-badge-blue,
[data-theme="dark"] .fc-badge-blue {
  background: rgba(59, 130, 246, 0.18);
}

.ennu-fc-dark .fc-badge-yellow,
.theme-dark .fc-badge-yellow,
[data-theme="dark"] .fc-badge-yellow {
  background: rgba(234, 179, 8, 0.18);
}

.ennu-fc-dark .fc-badge-red,
.theme-dark .fc-badge-red,
[data-theme="dark"] .fc-badge-red {
  background: rgba(239, 68, 68, 0.18);
}

.ennu-fc-dark .fc-badge-purple,
.theme-dark .fc-badge-purple,
[data-theme="dark"] .fc-badge-purple {
  background: rgba(168, 85, 247, 0.18);
}

/* ==========================================================================
   STATUS ACTIONS DROPDOWN
   ========================================================================== */

.status-actions-dropdown {
  position: relative;
  display: inline-block;
}

.status-actions-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.15s ease;
}

.status-actions-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #374151;
}

.status-actions-menu {
  display: none;
  position: fixed; /* Use fixed to escape overflow containers */
  min-width: 180px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 10001; /* Above session dropdown */
  overflow: hidden;
}

.status-actions-menu.open {
  display: block;
}

.status-action-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  transition: background 0.1s;
  text-align: left;
}

.status-action-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.status-action-item svg {
  flex-shrink: 0;
  stroke: #6b7280;
}

.status-action-item:hover svg {
  stroke: #374151;
}

.status-action-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  margin: 4px 0;
}

.status-action-danger {
  color: #dc2626;
}

.status-action-danger svg {
  stroke: #dc2626;
}

.status-action-danger:hover {
  background: rgba(239, 68, 68, 0.08);
}

/* Hide actions based on current status */
.status-actions-dropdown[data-status="draft"] #btn-mark-reviewed,
.status-actions-dropdown[data-status="draft"] #btn-reopen-chart,
.status-actions-dropdown[data-status="draft"] #btn-archive-chart,
.status-actions-dropdown[data-status="in_progress"] #btn-mark-reviewed,
.status-actions-dropdown[data-status="in_progress"] #btn-reopen-chart,
.status-actions-dropdown[data-status="in_progress"] #btn-archive-chart,
.status-actions-dropdown[data-status="completed"] #btn-reopen-chart,
.status-actions-dropdown[data-status="completed"] #btn-archive-chart,
.status-actions-dropdown[data-status="reviewed"] #btn-mark-reviewed,
.status-actions-dropdown[data-status="archived"] .status-action-item,
.status-actions-dropdown[data-status="cancelled"] .status-action-item {
  display: none;
}

/* Dark mode */
.ennu-fc-dark .status-actions-btn,
.theme-dark .status-actions-btn,
[data-theme="dark"] .status-actions-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #9ca3af;
}

.ennu-fc-dark .status-actions-btn:hover,
.theme-dark .status-actions-btn:hover,
[data-theme="dark"] .status-actions-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
}

.ennu-fc-dark .status-actions-menu,
.theme-dark .status-actions-menu,
[data-theme="dark"] .status-actions-menu {
  background: #1f2937;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.ennu-fc-dark .status-action-item,
.theme-dark .status-action-item,
[data-theme="dark"] .status-action-item {
  color: #e5e7eb;
}

.ennu-fc-dark .status-action-item:hover,
.theme-dark .status-action-item:hover,
[data-theme="dark"] .status-action-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.ennu-fc-dark .status-action-item svg,
.theme-dark .status-action-item svg,
[data-theme="dark"] .status-action-item svg {
  stroke: #9ca3af;
}

.ennu-fc-dark .status-action-divider,
.theme-dark .status-action-divider,
[data-theme="dark"] .status-action-divider {
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   UNIFIED SESSION DROPDOWN
   ========================================================================== */

.session-dropdown {
  position: relative;
  display: inline-block;
}

.session-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #c5a35c 0%, #d4b76a 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #1a1a2e;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(197, 163, 92, 0.25);
  outline: none;
}

.session-btn:hover {
  background: linear-gradient(135deg, #d4b76a 0%, #e0c478 100%);
  box-shadow: 0 4px 12px rgba(197, 163, 92, 0.35);
  transform: translateY(-1px);
}

.session-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(197, 163, 92, 0.4), 0 4px 12px rgba(197, 163, 92, 0.35);
}

.session-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(197, 163, 92, 0.2);
}

/* Session button icon for mobile */
.session-btn-icon {
  display: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.session-dropdown-arrow {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.session-dropdown:hover .session-dropdown-arrow,
.session-dropdown.open .session-dropdown-arrow {
  transform: rotate(180deg);
}

.session-dropdown-menu {
  position: fixed; /* Use fixed to escape overflow:hidden containers */
  min-width: 200px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 20px 25px -5px rgba(0, 0, 0, 0.05);
  z-index: 100000; /* Very high z-index to ensure it's above everything including AI panel */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: 
    opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 6px 0;
  overflow: visible;
}

/* Show dropdown on click (via .open class) - using fixed positioning */
.session-dropdown.open .session-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.session-action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  outline: none;
}

.session-action-item:focus-visible {
  background: rgba(197, 163, 92, 0.08);
  outline: none;
}

.session-action-item:hover {
  background: rgba(197, 163, 92, 0.1);
  color: #9a7e3f;
}

.session-action-item:hover svg {
  stroke: #9a7e3f;
}

.session-action-item:active {
  background: rgba(197, 163, 92, 0.15);
}

.session-action-item svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  stroke: #6b7280;
  transition: stroke 0.15s ease;
}

.session-action-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin: 6px 0;
}

.session-action-danger {
  color: #dc2626;
}

.session-action-danger svg {
  stroke: #dc2626;
}

.session-action-danger:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
}

.session-action-danger:hover svg {
  stroke: #b91c1c;
}

.session-action-danger:focus-visible {
  background: rgba(239, 68, 68, 0.06);
}

/* Dark mode for Session dropdown */
.ennu-fc-dark .session-btn,
.theme-dark .session-btn,
[data-theme="dark"] .session-btn {
  background: linear-gradient(135deg, #c5a35c 0%, #d4b76a 100%);
  color: #1a1a2e;
}

.ennu-fc-dark .session-dropdown-menu,
.theme-dark .session-dropdown-menu,
[data-theme="dark"] .session-dropdown-menu {
  background: #1f2937;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.3),
    0 10px 15px -3px rgba(0, 0, 0, 0.3),
    0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.ennu-fc-dark .session-action-item,
.theme-dark .session-action-item,
[data-theme="dark"] .session-action-item {
  color: #e5e7eb;
}

.ennu-fc-dark .session-action-item:hover,
.theme-dark .session-action-item:hover,
[data-theme="dark"] .session-action-item:hover {
  background: rgba(197, 163, 92, 0.12);
  color: #d4b76a;
}

.ennu-fc-dark .session-action-item:focus-visible,
.theme-dark .session-action-item:focus-visible,
[data-theme="dark"] .session-action-item:focus-visible {
  background: rgba(197, 163, 92, 0.08);
}

.ennu-fc-dark .session-action-item svg,
.theme-dark .session-action-item svg,
[data-theme="dark"] .session-action-item svg {
  stroke: #9ca3af;
}

.ennu-fc-dark .session-action-divider,
.theme-dark .session-action-divider,
[data-theme="dark"] .session-action-divider {
  background: rgba(255, 255, 255, 0.06);
}

/* Tablet & Mobile responsive */
@media (max-width: 1024px) {
  .session-dropdown-menu {
    min-width: 190px;
  }
  
  .session-action-item {
    padding: 14px 16px;
  }
}

@media (max-width: 768px) {
  .session-btn {
    padding: 10px 12px;
    gap: 4px;
  }
  
  .session-btn-text {
    display: none;
  }
  
  .session-btn-icon {
    display: block;
  }
  
  .session-dropdown-arrow {
    width: 10px;
    height: 10px;
  }
  
  .session-dropdown-menu {
    right: 0;
    min-width: 180px;
    border-radius: 10px;
  }
  
  .session-action-item {
    padding: 14px 14px;
    font-size: 15px;
  }
}

/* Touch device optimization */
@media (hover: none) {
  .session-btn {
    /* Slightly larger touch target on touch devices */
    min-height: 44px;
  }
}

/* ==========================================================================
   RESPONSIVE FOOTER - Tablet & Mobile Optimizations
   ========================================================================== */

/* Tablet: 768px - 1024px */
@media (max-width: 1024px) and (min-width: 769px) {
  .fc-footer {
    font-size: 10px;
  }
  
  .fc-footer-row {
    padding: 0 10px;
    min-height: 24px;
  }
  
  /* Larger touch targets for tablet */
  .fc-save-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
  }
  
  .fc-save-btn svg {
    width: 14px;
    height: 14px;
  }
  
  .fc-badge {
    font-size: 9px;
    padding: 3px 6px;
    min-height: 18px;
  }
}

/* Mobile: < 768px - COMPACT 2-ROW FOOTER */
@media (max-width: 768px) {
  .fc-footer {
    font-size: 9px;
  }
  
  /* Row 1: Title + Save - Single row */
  .fc-footer-row-1 {
    padding: 6px 8px;
    min-height: 36px;
    flex-wrap: nowrap;
  }
  
  /* Row 2: Compact info row */
  .fc-footer-row-2 {
    padding: 4px 8px;
    min-height: 24px;
    font-size: 8px;
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  
  .fc-footer-title-group {
    flex: 1;
    min-width: 0;
    gap: 4px;
  }
  
  .fc-footer-title {
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  /* Hide datetime on mobile */
  .fc-footer-datetime {
    display: none;
  }
  
  /* Save group */
  .fc-save-group {
    gap: 4px;
    flex-shrink: 0;
  }
  
  .fc-save-text {
    display: none; /* Hide text, show only icon */
  }
  
  .fc-save-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 6px;
  }
  
  .fc-save-btn svg {
    width: 14px;
    height: 14px;
  }
  
  /* Hide appointment info on mobile - less important */
  .fc-footer-left-info {
    display: none;
  }
  
  /* IDs stay in single row */
  .fc-footer-ids {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    width: 100%;
    justify-content: flex-start;
  }
  
  .fc-footer-id {
    font-size: 9px;
  }
  
  /* Compact badges */
  .fc-badge {
    font-size: 7px;
    padding: 2px 5px;
    min-height: 16px;
  }
  
  .fc-footer-sep {
    margin: 0 2px;
    color: #ccc;
  }
  
  /* Hide order info to save space - keep chart ID */
  .fc-footer-ids #footer-order-id,
  .fc-footer-ids #footer-order-status,
  .fc-footer-ids .fc-footer-sep:last-of-type {
    display: none;
  }
}

/* Very Small Mobile: < 480px - ULTRA COMPACT */
@media (max-width: 480px) {
  .fc-footer {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  
  .fc-footer-row-1 {
    padding: 5px 6px;
    min-height: 32px;
  }
  
  .fc-footer-row-2 {
    padding: 3px 6px;
    min-height: 20px;
  }
  
  .fc-footer-title {
    font-size: 9px;
  }
  
  .fc-footer-id {
    font-size: 8px;
  }
  
  .fc-badge {
    font-size: 6px;
    padding: 2px 4px;
    min-height: 14px;
  }
  
  /* IDs take full width */
  .fc-footer-ids {
    width: 100%;
    justify-content: flex-start;
  }
  
  /* Hide order info on very small screens - keep chart ID */
  .fc-footer-ids .fc-footer-sep:last-of-type,
  .fc-footer-ids #footer-order-id,
  .fc-footer-ids #footer-order-status {
    display: none;
  }
}

/* Snapshot Capture Button - In Bottom Bar */
.snapshot-capture-btn {
  display: none; /* Hidden by default, shown when zoomed */
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  background: linear-gradient(135deg, rgba(201, 169, 98, 0.2) 0%, rgba(201, 169, 98, 0.1) 100%);
  border: 1px solid rgba(201, 169, 98, 0.4);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--luxury-gold-dark, #a08050);
  box-shadow:
    0 4px 24px rgba(201, 169, 98, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Show capture button when zoomed (via JS setting display: flex) */
.snapshot-capture-btn[style*="flex"],
.snapshot-capture-btn.visible {
  display: flex;
}

.snapshot-capture-btn:hover {
  background: linear-gradient(135deg, rgba(201, 169, 98, 0.35) 0%, rgba(201, 169, 98, 0.25) 100%);
  border-color: rgba(201, 169, 98, 0.6);
  color: var(--luxury-gold, #c9a962);
  box-shadow:
    0 6px 24px rgba(201, 169, 98, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

.snapshot-capture-btn:active {
  transform: translateY(0);
  background: linear-gradient(135deg, rgba(201, 169, 98, 0.4) 0%, rgba(201, 169, 98, 0.3) 100%);
}

.snapshot-capture-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  flex-shrink: 0;
}

.snapshot-capture-btn span {
  font-weight: 600;
}

/* Legacy responsive bottom bar - kept for backward compatibility */
@media screen and (max-width: 767px) {
  .canvas-bottom-bar {
    padding: var(--space-2) var(--space-3);
  }

  .bottom-bar-content {
    gap: var(--space-3);
  }

  .chart-title-display {
    padding: var(--space-1) var(--space-3);
  }

  .chart-title-display .title-text {
    font-size: 12px;
    letter-spacing: 0.5px;
  }

  .snapshot-capture-btn {
    padding: 10px 18px;
    font-size: 12px;
  }

  .snapshot-capture-btn svg {
    width: 16px;
    height: 16px;
  }
}

@media screen and (max-width: 480px) {
  .bottom-bar-content {
    gap: var(--space-2);
  }

  .chart-title-display .title-text {
    font-size: 11px;
  }

  .snapshot-capture-btn {
    padding: 8px 14px;
    font-size: 11px;
    gap: 6px;
  }

  .snapshot-capture-btn span {
    display: none; /* Icon only on very small screens */
  }

  .snapshot-capture-btn svg {
    width: 18px;
    height: 18px;
  }
}

/* Legacy canvas-chart-title (kept for backwards compatibility) */
.canvas-chart-title {
  display: none; /* Hidden - using new bottom bar instead */
}

.canvas-chart-title .title-text {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--luxury-gold, #c9a962);
  opacity: 0.7;
}

/* Dark mode canvas title */
[data-theme="dark"] .canvas-chart-title,
.dark .canvas-chart-title {
  background: rgba(0, 0, 0, 0.15);
  border-color: rgba(201, 169, 98, 0.2);
}

[data-theme="dark"] .canvas-chart-title .title-text,
.dark .canvas-chart-title .title-text {
  opacity: 0.6;
}

/* Snapshot indicator on thumbnails */
.photo-thumb[data-is-snapshot="true"]::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, var(--luxury-gold) 0%, var(--luxury-gold-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.photo-thumb[data-is-snapshot="true"]::before {
  content: '📷';
  position: absolute;
  bottom: 5px;
  left: 5px;
  font-size: 10px;
  z-index: 1;
}

/* Dark mode support for snapshot button */
[data-theme="dark"] .snapshot-capture-btn,
.dark .snapshot-capture-btn {
  background: rgba(201, 169, 98, 0.12);
  border-color: rgba(201, 169, 98, 0.35);
  color: var(--luxury-gold, #c9a962);
  box-shadow:
    0 4px 24px rgba(201, 169, 98, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .snapshot-capture-btn:hover,
.dark .snapshot-capture-btn:hover {
  background: rgba(201, 169, 98, 0.2);
  border-color: rgba(201, 169, 98, 0.5);
  box-shadow:
    0 8px 32px rgba(201, 169, 98, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Disabled gender toggle state */
.gender-toggle.disabled,
#gender-toggle.disabled,
[data-action="toggle-gender"].disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Ruler Corner Spacer */
.ruler-corner-spacer {
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  background: var(--charcoal-100);
  border-right: 1px solid var(--charcoal-200);
  border-bottom: 1px solid var(--charcoal-200);
  z-index: 10;
}

/* Horizontal Ruler */
.ruler-horizontal {
  position: relative;
  height: 30px;
  width: 100%;
  background: var(--charcoal-50);
  border-bottom: 1px solid var(--charcoal-200);
  display: flex;
  align-items: center;
  padding-left: 30px;
  box-sizing: border-box;
}

.ruler-horizontal .ruler-canvas {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 100%;
}

.ruler-info {
  position: absolute;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--charcoal-800);
}

.ruler-paper-size {
  padding: 2px 8px;
  background: var(--charcoal-100);
  border-radius: var(--radius-sm);
}

.ruler-zoom-level {
  font-weight: var(--font-semibold);
  color: var(--luxury-gold);
}

/* Vertical Ruler */
.ruler-vertical {
  position: absolute;
  top: 30px;
  left: 0;
  width: 30px;
  bottom: 0;
  background: var(--charcoal-50);
  border-right: 1px solid var(--charcoal-200);
}

.ruler-vertical .ruler-canvas {
  width: 100%;
  height: 100%;
  min-height: 0;
}

/* Canvas Toolbar - Floating Controls */
.ennu-fc-canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  position: sticky;
  top: 64px;
  z-index: var(--z-dropdown);
}

.admin-bar .ennu-fc-canvas-toolbar {
  top: 96px;
}

@media (max-width: 782px) {
  .admin-bar .ennu-fc-canvas-toolbar {
    top: 110px;
  }
}

/* Sidebar Toggle Buttons */
.ennu-fc-btn-unified-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  min-height: var(--touch-target-min);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all var(--transition-normal);
  -webkit-tap-highlight-color: transparent;
}

.ennu-fc-btn-unified-toggle:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.ennu-fc-btn-unified-toggle[aria-expanded="true"] {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-gold);
}

.ennu-fc-btn-unified-toggle svg {
  width: 16px;
  height: 16px;
}

/* Canvas Action Buttons */
.ennu-fc-btn-canvas-action {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  min-height: 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.ennu-fc-btn-canvas-action:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.ennu-fc-btn-canvas-action.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--text-inverse);
}

.ennu-fc-btn-canvas-action svg {
  width: 16px;
  height: 16px;
}

/* Zoom Controls - Compact, Same Height as Other Buttons */
.ennu-fc-zoom-controls,
.zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  background: var(--clinical-white);
  border: 2px solid #E5E8EC;
  border-radius: var(--radius-md);
  height: 40px;
  overflow: hidden;
}

.ennu-fc-zoom-controls button,
.zoom-controls button,
#btn-zoom-in,
#btn-zoom-out {
  width: 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 0;
  color: #1A1A1E;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 200ms ease;
}

.ennu-fc-zoom-controls button:hover,
.zoom-controls button:hover,
#btn-zoom-in:hover,
#btn-zoom-out:hover {
  background: rgba(201, 169, 98, 0.15);
  color: #1A2744;
}

.ennu-fc-zoom-controls button:active,
.zoom-controls button:active,
#btn-zoom-in:active,
#btn-zoom-out:active {
  background: rgba(201, 169, 98, 0.3);
}

#zoom-level {
  min-width: 48px;
  padding: 0 4px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: #1A2744;
  border-left: 1px solid #E5E8EC;
  border-right: 1px solid #E5E8EC;
  padding: 0 var(--space-2);
}

/* ==========================================================================
   CANVAS CONTAINER - Professional Drawing Surface
   ========================================================================== */

.ennu-fc-canvas-container {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: 40px 1fr;
  flex: 1;
  background: var(--bg-canvas);
  position: relative;
  min-height: 0;
}

/* Rulers */
.ennu-fc-ruler-corner-spacer {
  grid-column: 1;
  grid-row: 1;
  background: var(--bg-tertiary);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.ennu-fc-ruler-horizontal.ennu-fc-ruler-top {
  grid-column: 2;
  grid-row: 1;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.ennu-fc-ruler-vertical.ennu-fc-ruler-left {
  grid-column: 1;
  grid-row: 2;
  background: var(--bg-tertiary);
  border-right: 1px solid var(--border-subtle);
}

.ennu-fc-ruler-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.ennu-fc-ruler-info {
  position: absolute;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

/* Canvas Wrapper */
.ennu-fc-canvas-wrapper {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  background: var(--bg-elevated);
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

/* Face Chart Canvas */
#face-chart-canvas,
.face-chart-canvas-element {
  display: block;
  cursor: crosshair;
  touch-action: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  background: white;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  pointer-events: auto !important;

  /* GPU-accelerated smooth zoom */
  will-change: transform;
  transform-origin: top left;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  perspective: 1000px;
  -webkit-perspective: 1000px;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);

  /* Smooth image rendering during zoom */
  image-rendering: auto;
  -webkit-font-smoothing: antialiased;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Hide template image (drawn on canvas instead) */
.ennu-fc-canvas-template-image,
.canvas-template-image,
#canvas-background-template {
  display: none !important;
  visibility: hidden !important;
}

/* ==========================================================================
   SIDEBARS - Elegant Slide-in Panels
   ========================================================================== */

.face-chart-sidebar {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 320px;
  background: var(--bg-primary);
  z-index: var(--z-modal); /* Must be higher than backdrop (z-modal-backdrop: 400) */
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--duration-slow) var(--ease-out);
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

/* Sidebars hidden by default - toggle buttons to show */
.face-chart-sidebar.sidebar-left {
  left: 0;
  width: 300px;
  border-right: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  transform: translateX(-100%);
  visibility: hidden;
}

.face-chart-sidebar.sidebar-left.show,
.face-chart-sidebar.sidebar-left.open {
  transform: translateX(0);
  visibility: visible;
}

.face-chart-sidebar.sidebar-right {
  right: 0;
  width: 360px;
  border-left: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  visibility: hidden;
}

.face-chart-sidebar.sidebar-right.show,
.face-chart-sidebar.sidebar-right.open {
  transform: translateX(0);
  visibility: visible;
}

/* Hide mobile drawer toggle buttons - not needed, use toolbar buttons */
.btn-drawer-toggle {
  display: none !important;
}

/* Sidebar Header - Luxury Style */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-5);
  border-bottom: 1px solid rgba(201, 169, 98, 0.15);
  background: linear-gradient(180deg, var(--clinical-cream) 0%, var(--clinical-white) 100%);
  flex-shrink: 0;
  position: relative;
  min-height: 64px;
}

/* Gold accent line at top of sidebar header */
.sidebar-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(135deg, #C9A962 0%, #E5D4A1 50%, #C9A962 100%);
}

.sidebar-header h3 {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: #1A2744;
  margin: 0;
  letter-spacing: -0.01em;
}

.sidebar-header h3 svg {
  color: var(--luxury-gold);
  flex-shrink: 0;
}

/* Close Button - Premium Touch Target */
.btn-close-sidebar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--clinical-white);
  border: 2px solid var(--charcoal-200);
  border-radius: var(--radius-lg);
  color: var(--charcoal-800);
  cursor: pointer;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.btn-close-sidebar:hover {
  background: var(--charcoal-50);
  border-color: var(--charcoal-300);
  color: var(--charcoal-900);
  transform: scale(1.05);
}

.btn-close-sidebar:active {
  transform: scale(0.95);
}

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

/* Sidebar Content - Luxury */
.sidebar-content {
  flex: 1;
  padding: var(--space-5);
  overflow-y: auto;
  background: linear-gradient(180deg, var(--clinical-white) 0%, var(--clinical-cream) 100%);
}

/* Tool Section - Luxury Style */
.tool-section,
.ennu-fc-tool-section {
  margin-bottom: var(--space-6);
  background: var(--clinical-white);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: 0 2px 8px rgba(26, 39, 68, 0.04);
  border: 1px solid rgba(201, 169, 98, 0.1);
}

.tool-section h3,
.ennu-fc-tool-section h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: #1A1A1E;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 var(--space-3) 0;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(201, 169, 98, 0.15);
}

.tool-section h3 svg,
.ennu-fc-tool-section h3 svg {
  color: var(--luxury-gold);
  flex-shrink: 0;
}

/* Sidebar Backdrop */
.ennu-fc-sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 30, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.ennu-fc-sidebar-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   TOOL BUTTONS - Luxury Touch Controls (Matching luxury-checkin.css)
   ========================================================================== */

.ennu-fc-tool-buttons,
.tool-buttons {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: var(--space-3) !important;
  width: 100% !important;
}

.ennu-fc-tool-btn,
.tool-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--space-2);
  padding: var(--space-4) !important;
  min-height: 80px !important;
  width: 100% !important;
  background: var(--clinical-white);
  border: 2px solid #E5E8EC;
  border-radius: var(--radius-lg);
  color: #1A1A1E;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  box-sizing: border-box !important;
  position: relative;
  overflow: hidden;
}

/* Shimmer effect on hover */
.ennu-fc-tool-btn::before,
.tool-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}

.ennu-fc-tool-btn:hover,
.tool-btn:hover {
  background: var(--charcoal-50);
  border-color: var(--luxury-gold);
  color: #1A2744;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(26, 39, 68, 0.08);
}

.ennu-fc-tool-btn:hover::before,
.tool-btn:hover::before {
  opacity: 1;
}

.ennu-fc-tool-btn:active,
.tool-btn:active {
  transform: translateY(0);
}

/* Active State - Luxury Gold Gradient */
.ennu-fc-tool-btn.active,
.tool-btn.active {
  background: linear-gradient(135deg, #C9A962 0%, #E5D4A1 50%, #C9A962 100%);
  border-color: var(--luxury-gold);
  color: #1A2744;
  box-shadow: 0 4px 20px rgba(201, 169, 98, 0.25);
  font-weight: 600;
}

.ennu-fc-tool-btn.active::before,
.tool-btn.active::before {
  opacity: 1;
}

.ennu-fc-tool-btn svg,
.tool-btn svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.75;
  transition: color 200ms ease;
}

.ennu-fc-tool-btn.active svg,
.tool-btn.active svg {
  color: #1A2744;
  stroke: currentColor;
}

/* Color Picker */
.color-picker {
  margin-top: var(--space-4);
}

.color-picker input[type="color"] {
  width: 100%;
  height: 48px;
  border: 2px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 0;
}

.color-picker input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 4px;
}

.color-picker input[type="color"]::-webkit-color-swatch {
  border-radius: var(--radius-sm);
  border: none;
}

/* ==========================================================================
   PRODUCT CARDS - Luxury Selection Interface
   ========================================================================== */

.treatment-product-card,
.product-card,
.service-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
  background: var(--bg-elevated);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.treatment-product-card::before,
.product-card::before,
.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background var(--transition-normal);
}

.treatment-product-card:hover,
.product-card:hover,
.service-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.treatment-product-card:hover::before,
.product-card:hover::before,
.service-card:hover::before {
  background: var(--accent-primary);
}

.treatment-product-card.selected,
.treatment-product-card.active,
.product-card.selected,
.service-card.selected {
  border-color: var(--accent-primary);
  background: var(--accent-subtle);
}

.treatment-product-card.selected::before,
.product-card.selected::before,
.service-card.selected::before {
  background: var(--accent-primary);
}

/* Product Card Content */
.product-name,
.treatment-product-card h4 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin: 0 0 var(--space-2) 0;
  line-height: 1.3;
}

.product-description,
.treatment-product-card p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: 0 0 var(--space-3) 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-details,
.treatment-product-card .product-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}

.product-price,
.treatment-product-card .price {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--accent-primary);
}

.product-sku {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

/* Quantity Selector */
.quantity-selector {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: var(--space-1);
}

.quantity-selector button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--text-md);
  font-weight: var(--font-bold);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.quantity-selector button:hover {
  background: var(--accent-primary);
  color: var(--text-inverse);
}

.quantity-selector input {
  width: 48px;
  text-align: center;
  background: transparent;
  border: none;
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

/* Quick Add Button */
.btn-quick-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--accent-primary);
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-inverse);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-gold);
}

.btn-quick-add:hover {
  background: var(--luxury-gold-light);
  box-shadow: var(--shadow-gold-lg);
  transform: translateY(-1px);
}

/* ==========================================================================
   ORDER SUMMARY - Premium Invoice Display
   ========================================================================== */

.order-summary-section {
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.order-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.order-summary-header h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin: 0;
}

/* Order Items */
.order-items-table {
  width: 100%;
  border-collapse: collapse;
}

.order-items-table th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-tertiary);
}

.order-items-table td {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

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

.order-item-name {
  font-weight: var(--font-medium);
}

.order-item-price {
  font-family: var(--font-mono);
  font-weight: var(--font-semibold);
}

.order-item-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.order-item-remove:hover {
  background: var(--error-light);
  color: var(--error-rose);
}

/* Order Totals */
.order-totals {
  padding: var(--space-4) var(--space-5);
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-subtle);
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.order-total-row.subtotal {
  border-bottom: 1px dashed var(--border-default);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-3);
}

.order-total-row.grand-total {
  padding-top: var(--space-3);
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--text-primary);
}

.order-total-row.grand-total .amount {
  color: var(--accent-primary);
  font-family: var(--font-mono);
}

/* Promo Code Input */
.promo-code-section {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border-subtle);
}

.promo-code-input-group {
  display: flex;
  gap: var(--space-2);
}

.promo-code-input-group input {
  flex: 1;
  padding: var(--space-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.promo-code-input-group input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.promo-code-input-group button {
  padding: var(--space-3) var(--space-4);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.promo-code-input-group button:hover {
  background: var(--bg-secondary);
  border-color: var(--border-strong);
}

/* Complete Order CTA */
.order-complete-cta {
  padding: var(--space-5);
  border-top: 1px solid var(--border-subtle);
}

.btn-complete-order {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  background: linear-gradient(135deg, var(--luxury-gold) 0%, var(--luxury-gold-dark) 100%);
  border: none;
  border-radius: var(--radius-lg);
  color: var(--text-inverse);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: var(--font-bold);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-gold-lg);
}

.btn-complete-order:hover {
  background: linear-gradient(135deg, var(--luxury-gold-light) 0%, var(--luxury-gold) 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(201, 169, 98, 0.35);
}

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

/* ==========================================================================
   TREATMENTS LIST - Elegant Timeline
   ========================================================================== */

.ennu-fc-treatments-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.ennu-fc-treatment-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  position: relative;
}

.ennu-fc-treatment-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-primary);
  border-radius: var(--radius-full) 0 0 var(--radius-full);
}

.ennu-fc-treatment-item:hover {
  background: var(--bg-secondary);
  border-color: var(--border-default);
  box-shadow: var(--shadow-md);
}

.ennu-fc-treatment-item-content {
  flex: 1;
  min-width: 0;
}

.ennu-fc-treatment-item strong {
  display: block;
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.ennu-fc-treatment-item p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

.ennu-fc-treatment-cost {
  font-family: var(--font-mono);
  font-weight: var(--font-semibold);
  color: var(--accent-primary) !important;
  margin-top: var(--space-2);
}

.ennu-fc-treatment-item-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.ennu-fc-treatment-edit-btn,
.ennu-fc-treatment-delete-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ennu-fc-treatment-edit-btn {
  color: var(--info-sapphire);
  border-color: var(--info-sapphire);
}

.ennu-fc-treatment-edit-btn:hover {
  background: var(--info-sapphire);
  color: var(--text-inverse);
}

.ennu-fc-treatment-delete-btn {
  color: var(--error-rose);
  border-color: var(--error-rose);
}

.ennu-fc-treatment-delete-btn:hover {
  background: var(--error-rose);
  color: var(--text-inverse);
}

.ennu-fc-treatment-edit-btn svg,
.ennu-fc-treatment-delete-btn svg {
  width: 16px;
  height: 16px;
}

/* Treatment item action buttons - unprefixed versions (used by JS) */
.treatment-item-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.treatment-edit-btn,
.treatment-delete-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.treatment-edit-btn {
  color: var(--info-sapphire, #3b82f6);
  border-color: var(--info-sapphire, #3b82f6);
}

.treatment-edit-btn:hover {
  background: var(--info-sapphire, #3b82f6);
  color: var(--text-inverse, #ffffff);
}

.treatment-delete-btn {
  color: var(--error-rose, #ef4444);
  border-color: var(--error-rose, #ef4444);
}

.treatment-delete-btn:hover {
  background: var(--error-rose, #ef4444);
  color: var(--text-inverse, #ffffff);
}

.treatment-edit-btn svg,
.treatment-delete-btn svg {
  width: 16px;
  height: 16px;
}

/* Treatment item styling - unprefixed (used by JS) */
.treatment-item {
  display: flex;
  gap: var(--space-4, 16px);
  padding: var(--space-4, 16px);
  background: var(--bg-elevated, #ffffff);
  border: 1px solid var(--border-subtle, #e5e7eb);
  border-radius: var(--radius-lg, 8px);
  transition: all var(--transition-normal, 0.2s);
  position: relative;
  margin-bottom: var(--space-2, 8px);
}

.treatment-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-primary, #C9A962);
  border-radius: var(--radius-full, 9999px) 0 0 var(--radius-full, 9999px);
}

.treatment-item:hover {
  background: var(--bg-secondary, #f9fafb);
  border-color: var(--border-default, #d1d5db);
  box-shadow: var(--shadow-md, 0 4px 6px rgba(0,0,0,0.1));
}

.treatment-item-content {
  flex: 1;
  min-width: 0;
}

.treatment-item-content strong {
  display: block;
  font-size: var(--text-base, 16px);
  font-weight: var(--font-semibold, 600);
  color: var(--text-primary, #1f2937);
  margin-bottom: var(--space-1, 4px);
}

.treatment-item-content p {
  font-size: var(--text-sm, 14px);
  color: var(--text-secondary, #6b7280);
  margin: 0;
  line-height: 1.4;
}

.treatment-item-content .treatment-cost {
  font-weight: var(--font-semibold, 600);
  color: var(--accent-primary, #C9A962) !important;
  margin-top: var(--space-2, 8px);
}

/* Price input group with currency prefix */
.price-input-group {
  display: flex;
  align-items: center;
  position: relative;
}

.price-input-group .currency-prefix {
  position: absolute;
  left: 12px;
  color: var(--text-secondary, #6b7280);
  font-weight: 500;
  z-index: 1;
  pointer-events: none;
}

.price-input-group input {
  padding-left: 28px !important;
}

.ennu-fc-no-treatments {
  padding: var(--space-8);
  text-align: center;
  color: var(--text-tertiary);
  font-style: italic;
}

/* ==========================================================================
   MODALS - Elegant Overlay Dialogs
   ========================================================================== */

.ennu-modal,
.ennu-fc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 30, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-4);
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.ennu-modal.active,
.ennu-fc-modal-overlay.active {
  display: flex;
  opacity: 1;
}

.ennu-fc-modal-content {
  background: var(--bg-primary);
  border-radius: var(--radius-2xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
  animation: modalSlideIn var(--duration-slow) var(--ease-out);
}

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

.ennu-fc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.ennu-fc-modal-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin: 0;
}

.ennu-fc-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
  font-size: var(--text-2xl);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ennu-fc-modal-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.ennu-fc-modal-body {
  flex: 1;
  padding: var(--space-6);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.ennu-fc-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-tertiary);
}

/* ==========================================================================
   FORM ELEMENTS - Premium Inputs
   ========================================================================== */

.ennu-fc-form-group {
  margin-bottom: var(--space-5);
}

.ennu-fc-form-group label,
.ennu-fc-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.ennu-fc-form-control,
.ennu-fc-form-group input[type="text"],
.ennu-fc-form-group input[type="number"],
.ennu-fc-form-group input[type="email"],
.ennu-fc-form-group input[type="datetime-local"],
.ennu-fc-form-group select,
.ennu-fc-form-group textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  transition: all var(--transition-fast);
  min-height: var(--touch-target-comfortable);
}

.ennu-fc-form-control:focus,
.ennu-fc-form-group input:focus,
.ennu-fc-form-group select:focus,
.ennu-fc-form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.ennu-fc-form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%234A4A54' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
}

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

.ennu-fc-form-text,
.help-text {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* ==========================================================================
   BUTTONS - Consistent Button System
   ========================================================================== */

.ennu-fc-btn-primary,
.ennu-fc-btn-secondary,
.ennu-fc-btn-danger,
.ennu-fc-btn-save,
.ennu-fc-btn-complete,
.ennu-fc-btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  min-height: var(--touch-target-min);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: all var(--transition-normal);
  -webkit-tap-highlight-color: transparent;
}

.ennu-fc-btn-primary {
  background: var(--accent-primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-gold);
}

.ennu-fc-btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-gold-lg);
  transform: translateY(-1px);
}

.ennu-fc-btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.ennu-fc-btn-secondary:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.ennu-fc-btn-danger {
  background: var(--error-rose);
  color: var(--text-inverse);
}

.ennu-fc-btn-danger:hover {
  background: #6B3410;
}

.ennu-fc-btn-save {
  background: var(--luxury-gold);
  color: var(--charcoal-900);
}

.ennu-fc-btn-save:hover {
  background: var(--luxury-gold-dark);
}

.ennu-fc-btn-complete {
  background: var(--luxury-gold);
  color: var(--charcoal-900);
}

.ennu-fc-btn-complete:hover {
  background: var(--luxury-gold-dark);
}

.ennu-fc-btn-back {
  background: transparent;
  color: var(--text-secondary);
  padding: var(--space-2) var(--space-4);
}

.ennu-fc-btn-back:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* Button Loading State */
.ennu-fc-btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.ennu-fc-btn-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 50%;
  left: 50%;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: var(--radius-full);
  animation: btnSpinner 0.8s linear infinite;
}

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

/* ==========================================================================
   NOTIFICATIONS - Elegant Toast Messages
   ========================================================================== */

.ennu-notification {
  position: fixed;
  top: var(--space-5);
  right: var(--space-5);
  min-width: 320px;
  max-width: 480px;
  padding: var(--space-4) var(--space-5);
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  z-index: var(--z-notification);
  animation: notificationSlideIn var(--duration-slow) var(--ease-spring);
  border-left: 4px solid;
}

@keyframes notificationSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.ennu-notification.success {
  border-color: var(--success-emerald);
  background: var(--success-light);
}

.ennu-notification.error {
  border-color: var(--error-rose);
  background: var(--error-light);
}

.ennu-notification.warning {
  border-color: var(--warning-amber);
  background: var(--warning-light);
}

.ennu-notification.info {
  border-color: var(--info-sapphire);
  background: var(--info-light);
}

.ennu-fc-notification-icon {
  font-size: var(--text-xl);
  flex-shrink: 0;
}

.ennu-fc-notification-content {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  line-height: 1.4;
}

.ennu-fc-notification-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  font-size: var(--text-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ennu-fc-notification-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-primary);
}

/* ==========================================================================
   LOADING STATES
   ========================================================================== */

.face-chart-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
}

.theme-dark .face-chart-loading-overlay {
  background: rgba(26, 26, 30, 0.95);
}

.face-chart-loading-content {
  text-align: center;
  padding: var(--space-8);
  background: var(--bg-primary);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
}

.face-chart-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-primary);
  border-radius: var(--radius-full);
  animation: spinner 0.8s linear infinite;
  margin: 0 auto var(--space-4);
}

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

.face-chart-loading-text {
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
}

/* ==========================================================================
   WIZARD - Premium Initialization Flow
   ========================================================================== */

#chart-init-wizard .ennu-fc-modal-content,
.modal-wizard {
  max-width: 700px;
}

.wizard-header {
  padding: var(--space-6);
  background: linear-gradient(135deg, var(--charcoal-800) 0%, var(--charcoal-900) 100%);
  color: var(--clinical-white);
  text-align: center;
}

.wizard-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  margin: 0 0 var(--space-5) 0;
}

.wizard-steps {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  opacity: 0.5;
  transition: opacity var(--transition-normal);
}

.wizard-step.active {
  opacity: 1;
}

.step-number {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  font-weight: var(--font-bold);
  font-size: var(--text-base);
}

.wizard-step.active .step-number {
  background: var(--accent-primary);
  box-shadow: var(--shadow-gold);
}

.step-label {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.wizard-panel {
  padding: var(--space-6);
}

.wizard-panel h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin: 0 0 var(--space-2) 0;
}

.wizard-panel .help-text {
  color: var(--text-secondary);
  margin-bottom: var(--space-5);
}

.wizard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-tertiary);
}

.footer-spacer {
  flex: 1;
}

.wizard-back,
.wizard-next,
.wizard-finish {
  padding: var(--space-3) var(--space-6);
}

/* ==========================================================================
   NOTES PANEL - Clean Documentation Interface
   ========================================================================== */

.ennu-fc-notes-panel,
#notes-content {
  padding: var(--space-6);
  max-width: 900px;
  margin: 0 auto;
}

.ennu-fc-notes-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-6);
}

.ennu-fc-notes-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.ennu-fc-notes-card h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin: 0 0 var(--space-2) 0;
}

.ennu-fc-notes-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: 0 0 var(--space-4) 0;
  line-height: 1.5;
}

.ennu-fc-notes-textarea {
  width: 100%;
  padding: var(--space-4);
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  line-height: 1.6;
  resize: vertical;
  min-height: 120px;
}

.ennu-fc-notes-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.ennu-fc-notes-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  margin-top: var(--space-5);
}

.ennu-fc-save-status {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.ennu-fc-save-status.success {
  color: var(--success-emerald);
}

.ennu-fc-save-status.error {
  color: var(--error-rose);
}

/* Voice Transcription */
.ennu-fc-live-transcription-card {
  border-left: 4px solid var(--success-emerald);
}

.ennu-fc-live-transcription-display {
  min-height: 150px;
  padding: var(--space-4);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin: var(--space-4) 0;
}

.ennu-fc-transcription-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 100px;
  color: var(--text-tertiary);
  text-align: center;
  gap: var(--space-2);
}

.ennu-fc-transcription-placeholder .dashicons {
  font-size: 32px;
  width: 32px;
  height: 32px;
  color: var(--charcoal-300);
}

.ennu-fc-live-transcription-text {
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
}

.ennu-fc-transcription-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--success-emerald);
  margin-bottom: var(--space-2);
}

.ennu-fc-transcription-status.recording {
  color: var(--error-rose);
}

.ennu-fc-recording-dot {
  width: 8px;
  height: 8px;
  background: var(--error-rose);
  border-radius: var(--radius-full);
  animation: recordingPulse 1.5s ease-in-out infinite;
}

@keyframes recordingPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ==========================================================================
   VOICE RECORDER - LUXURY DESIGN
   ========================================================================== */

/* Voice Notes Panel Container */
.notes-panel {
  padding: var(--space-6);
  background: linear-gradient(180deg, var(--bg-canvas) 0%, var(--charcoal-50) 100%);
  min-height: 100%;
}

.notes-panel .notes-section {
  max-width: 800px;
  margin: 0 auto;
}

.notes-panel .notes-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.notes-panel-intro {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
  line-height: 1.6;
}

/* AI Notes Section in Notes Tab */
.ai-notes-card {
  background: linear-gradient(135deg, rgba(197, 163, 92, 0.05) 0%, rgba(197, 163, 92, 0.02) 100%);
  border: 1px solid rgba(197, 163, 92, 0.3);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  position: relative;
}

.ai-notes-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--luxury-gold) 0%, var(--luxury-gold-light) 50%, var(--luxury-gold) 100%);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.ai-notes-card h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.ai-notes-card h3 .dashicons {
  color: var(--luxury-gold);
}

.ai-notes-badge {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  padding: 2px 8px;
  background: linear-gradient(135deg, var(--luxury-gold) 0%, var(--luxury-gold-light) 100%);
  color: #1a2744;
  border-radius: var(--radius-full);
  margin-left: auto;
}

.ai-notes-field {
  margin-bottom: var(--space-4);
}

.ai-notes-field:last-child {
  margin-bottom: 0;
}

.ai-notes-field label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.ai-notes-textarea {
  width: 100%;
  padding: var(--space-3);
  border: 1px solid var(--charcoal-200);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: 1.5;
  resize: vertical;
  background: var(--clinical-white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ai-notes-textarea:focus {
  outline: none;
  border-color: var(--luxury-gold);
  box-shadow: 0 0 0 3px rgba(197, 163, 92, 0.15);
}

/* Dark mode AI notes */
.theme-dark .ai-notes-card {
  background: linear-gradient(135deg, rgba(197, 163, 92, 0.08) 0%, rgba(197, 163, 92, 0.03) 100%);
  border-color: rgba(197, 163, 92, 0.4);
}

.theme-dark .ai-notes-card h3 {
  color: var(--charcoal-100);
}

.theme-dark .ai-notes-field label {
  color: var(--charcoal-300);
}

.theme-dark .ai-notes-textarea {
  background: var(--charcoal-800);
  border-color: var(--charcoal-600);
  color: var(--charcoal-100);
}

.theme-dark .ai-notes-textarea:focus {
  border-color: var(--luxury-gold);
}

/* AI Notes Timestamp */
.ai-notes-timestamp,
#ai-notes-timestamp {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--charcoal-200);
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-style: italic;
  display: none;
}

.theme-dark .ai-notes-timestamp,
.theme-dark #ai-notes-timestamp {
  border-color: var(--charcoal-600);
  color: var(--charcoal-400);
}

/* Voice Notes Recorder Container */
.voice-notes-recorder {
  background: var(--clinical-white);
  border: 1px solid var(--charcoal-200);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

.voice-notes-recorder::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--luxury-gold) 0%, var(--luxury-gold-light) 50%, var(--luxury-gold) 100%);
}

/* Override voice transcription plugin buttons */
.voice-notes-recorder .ennu-voice-recorder,
.voice-notes-recorder .voice-recorder-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.voice-notes-recorder button[class*="record"],
.voice-notes-recorder .record-btn,
.voice-notes-recorder .ennu-record-btn {
  background: linear-gradient(135deg, var(--luxury-gold) 0%, var(--luxury-gold-dark) 100%) !important;
  color: var(--clinical-white) !important;
  border: none !important;
  border-radius: var(--radius-full) !important;
  padding: var(--space-4) var(--space-8) !important;
  font-family: var(--font-display) !important;
  font-size: var(--text-base) !important;
  font-weight: var(--font-semibold) !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 4px 15px rgba(201, 169, 98, 0.3) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: var(--space-2) !important;
  min-width: 180px !important;
  justify-content: center !important;
}

.voice-notes-recorder button[class*="record"]:hover,
.voice-notes-recorder .record-btn:hover,
.voice-notes-recorder .ennu-record-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 25px rgba(201, 169, 98, 0.45) !important;
  background: linear-gradient(135deg, var(--luxury-gold-light) 0%, var(--luxury-gold) 100%) !important;
}

.voice-notes-recorder button[class*="record"]:active,
.voice-notes-recorder .record-btn:active,
.voice-notes-recorder .ennu-record-btn:active {
  transform: scale(0.98) !important;
}

/* Recording state */
.voice-notes-recorder button[class*="record"].recording,
.voice-notes-recorder .record-btn.recording,
.voice-notes-recorder .ennu-record-btn.recording,
.voice-notes-recorder button[class*="stop"] {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4) !important;
  animation: recordingGlow 1.5s ease-in-out infinite !important;
}

@keyframes recordingGlow {
  0%, 100% { box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4); }
  50% { box-shadow: 0 4px 25px rgba(220, 53, 69, 0.6), 0 0 40px rgba(220, 53, 69, 0.2); }
}

/* Microphone Permission Status */
.microphone-permission-status,
#microphone-permission-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: linear-gradient(135deg, var(--charcoal-50) 0%, var(--charcoal-100) 100%);
  border: 1px solid var(--charcoal-200);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.microphone-permission-status .dashicons,
#microphone-permission-status .dashicons {
  color: var(--luxury-gold);
  font-size: 18px;
  width: 18px;
  height: 18px;
}

/* Live Transcription Display */
.live-transcription-display,
#live-transcription-display {
  background: var(--charcoal-50);
  border: 2px dashed var(--charcoal-200);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  min-height: 180px;
  margin: var(--space-4) 0;
  transition: all 0.3s ease;
}

.live-transcription-display:focus-within,
#live-transcription-display:focus-within {
  border-color: var(--luxury-gold);
  border-style: solid;
  box-shadow: 0 0 0 4px rgba(201, 169, 98, 0.1);
}

.live-transcription-display.has-content,
#live-transcription-display.has-content {
  background: var(--clinical-white);
  border-style: solid;
  border-color: var(--charcoal-200);
}

/* Transcription Placeholder */
.transcription-placeholder,
.ennu-fc-transcription-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 140px;
  color: var(--text-tertiary);
  text-align: center;
  gap: var(--space-3);
  padding: var(--space-4);
}

.transcription-placeholder .dashicons,
.ennu-fc-transcription-placeholder .dashicons {
  font-size: 48px;
  width: 48px;
  height: 48px;
  color: var(--charcoal-300);
  opacity: 0.6;
}

/* Live Transcription Text */
.live-transcription-text,
.ennu-fc-live-transcription-text {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--text-primary);
  white-space: pre-wrap;
}

/* Transcription Status Indicator */
.transcription-status,
.ennu-fc-transcription-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--success-emerald);
  padding: var(--space-2) var(--space-3);
  background: rgba(16, 185, 129, 0.1);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-3);
}

.transcription-status.recording,
.ennu-fc-transcription-status.recording {
  color: var(--error-rose);
  background: rgba(244, 63, 94, 0.1);
}

/* Recording Dot */
.recording-dot,
.ennu-fc-recording-dot {
  width: 10px;
  height: 10px;
  background: var(--error-rose);
  border-radius: var(--radius-full);
  animation: recordingPulse 1.2s ease-in-out infinite;
}

/* Transcription Actions */
.transcription-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--charcoal-200);
}

.transcription-actions button,
#clear-transcription-btn {
  background: var(--clinical-white);
  color: var(--text-secondary);
  border: 1px solid var(--charcoal-300);
  border-radius: var(--radius-lg);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.transcription-actions button:hover,
#clear-transcription-btn:hover {
  background: var(--charcoal-50);
  border-color: var(--luxury-gold);
  color: var(--luxury-gold);
}

/* Voice Notes History */
.voice-notes-history {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 2px solid var(--charcoal-200);
}

.voice-notes-history h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.voice-notes-history h3::before {
  content: '📜';
}

/* Voice Notes List Items */
.voice-notes-history .voice-note-item,
.voice-notes-history .ennu-voice-note {
  background: var(--clinical-white);
  border: 1px solid var(--charcoal-200);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  transition: all 0.2s ease;
}

.voice-notes-history .voice-note-item:hover,
.voice-notes-history .ennu-voice-note:hover {
  border-color: var(--luxury-gold);
  box-shadow: 0 4px 12px rgba(201, 169, 98, 0.1);
}

/* Live Transcription Card (in notes tab) */
.live-transcription-card,
.notes-card.live-transcription-card {
  background: var(--clinical-white);
  border: 1px solid var(--charcoal-200);
  border-left: 4px solid var(--luxury-gold);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.live-transcription-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin: 0 0 var(--space-2) 0;
}

.live-transcription-card .notes-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  line-height: 1.5;
}

/* Voice Recorder - Flatten nested containers inside face-chart */
.live-transcription-card .voice-recorder-card {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.live-transcription-card .voice-recorder-card::before {
  display: none;
}

.live-transcription-card .ennu-modern-recorder {
  margin: 0;
}

/* Follow-up Required Highlight Animation */
.notes-card.highlight-required,
.followup-scheduling-card.highlight-required {
  animation: highlight-pulse 0.5s ease-in-out 3;
  border-color: var(--accent-warning, #f59e0b) !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3) !important;
}

@keyframes highlight-pulse {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.2);
  }
}

/* Simplify the live transcript container when inside face-chart */
.live-transcription-card .live-transcript-container {
  border: none;
  border-radius: var(--radius-lg);
  margin: var(--space-4) 0;
  box-shadow: none;
  background: var(--charcoal-50);
}

.live-transcription-card .live-transcript-header {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.live-transcription-card .live-transcript-text {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ==========================================================================
   TREATMENT/BILLING PANEL
   ========================================================================== */

.ennu-fc-treatment-billing-panel {
  display: none !important;
  padding: var(--space-6);
  background: var(--bg-canvas);
  overflow-y: auto;
}

.ennu-fc-treatment-billing-panel.active {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: var(--space-6);
}

.ennu-fc-billing-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
}

.ennu-fc-billing-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin: 0 0 var(--space-4) 0;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

/* ==========================================================================
   UPLOAD AREA - Elegant Drop Zone
   ========================================================================== */

.ennu-fc-upload-area {
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  background: var(--bg-tertiary);
}

.ennu-fc-upload-area:hover,
.ennu-fc-upload-area.dragover {
  border-color: var(--accent-primary);
  background: var(--accent-subtle);
}

.ennu-fc-upload-area svg {
  width: 48px;
  height: 48px;
  color: var(--text-tertiary);
  margin-bottom: var(--space-4);
}

.ennu-fc-upload-area p {
  color: var(--text-secondary);
  font-size: var(--text-base);
  margin: 0;
}

/* Template Grid */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
}

.template-card {
  padding: var(--space-4);
  background: var(--bg-elevated);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-normal);
}

.template-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.template-card img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-sm);
}

.template-card h4 {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  margin: 0;
}

/* ==========================================================================
   IMAGE THUMBNAILS - Canvas Photo Strip (Bottom)
   ========================================================================== */

/* Hide bottom strip by default - thumbnails are now overlaid on canvas */
.canvas-images-strip,
.ennu-fc-canvas-images-strip {
  display: none;
}

.image-thumbnails,
.ennu-fc-image-thumbnails {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  -webkit-overflow-scrolling: touch;
}

.image-thumb,
.ennu-fc-image-thumb {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-normal);
  opacity: 0.8;
  background: var(--charcoal-800);
}

.image-thumb:hover,
.ennu-fc-image-thumb:hover {
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
  opacity: 1;
}

.image-thumb.active,
.ennu-fc-image-thumb.active {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-gold);
  opacity: 1;
}

.image-thumb img,
.ennu-fc-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-label,
.ennu-fc-thumb-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-1);
  background: rgba(26, 26, 30, 0.8);
  color: var(--clinical-white);
  font-size: 9px;
  text-align: center;
}

.ennu-fc-thumb-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: var(--error-rose);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.ennu-fc-image-thumb:hover .ennu-fc-thumb-delete-btn {
  opacity: 1;
}

.ennu-fc-thumb-primary-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  padding: 2px 6px;
  background: var(--accent-primary);
  color: var(--text-inverse);
  font-size: 8px;
  font-weight: var(--font-bold);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

/* ==========================================================================
   RESPONSIVE - iPad Optimizations
   ========================================================================== */

/* iPad Landscape (1024px - 1366px) */
@media (min-width: 1024px) and (max-width: 1366px) {
  .ennu-fc-mode-label {
    display: inline;
  }

  .ennu-fc-session-status {
    display: flex;
  }
}

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  .header-main-row,
  .ennu-fc-header-main-row {
    padding: var(--space-3) var(--space-4);
    gap: var(--space-3);
  }

  .ennu-fc-header-logo-mini {
    display: none;
  }

  .ennu-fc-title-compact {
    font-size: var(--text-base);
    max-width: 150px;
  }

  .ennu-fc-mode-label {
    display: none;
  }

  /* Session status - SHOW on tablet with compact styling */
  .session-status,
  .ennu-fc-session-status {
    display: flex !important;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
  }

  .status-time,
  .status-timer {
    font-size: var(--text-xs);
  }

  /* Provider name compact on tablet */
  .status-provider {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Action buttons on tablet - icon only, uniform size */
  .action-btn.voice-btn,
  .action-btn.theme-btn,
  .action-btn.complete-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* SVG icons visible on tablet */
  .action-btn.voice-btn svg,
  .action-btn.theme-btn svg {
    width: 20px !important;
    height: 20px !important;
    stroke: #1A1A1E !important;
    fill: none !important;
  }

  /* Complete button - icon only on tablet */
  .action-btn.complete-btn {
    font-size: 0 !important;
    color: transparent !important;
    text-indent: -9999px !important;
    position: relative !important;
    background: linear-gradient(135deg, #c9a962 0%, #b8944f 100%) !important;
    border: none !important;
  }

  .action-btn.complete-btn::before {
    content: '✓' !important;
    font-size: 22px !important;
    font-weight: bold !important;
    color: #1A1A1E !important;
    text-indent: 0 !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
  }

  /* Dark theme tablet */
  .theme-dark .action-btn.voice-btn svg,
  .theme-dark .action-btn.theme-btn svg {
    stroke: #f0f0f0 !important;
  }

  /* Rulers hidden on tablet */
  .ennu-fc-ruler-corner-spacer,
  .ennu-fc-ruler-horizontal,
  .ennu-fc-ruler-vertical {
    display: none;
  }

  .ennu-fc-canvas-container {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }

  .ennu-fc-canvas-wrapper {
    grid-column: 1;
    grid-row: 1;
    padding: var(--space-3);
  }

  /* Sidebars as overlays */
  .face-chart-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: var(--z-modal); /* Must be higher than backdrop */
  }

  .face-chart-sidebar.sidebar-left {
    width: 85%;
    max-width: 320px;
  }

  .face-chart-sidebar.sidebar-right {
    width: 85%;
    max-width: 380px;
  }
}

/* Mobile (768px and below) - TWO ROW LAYOUT */
@media (max-width: 768px) {
  .header-main-row,
  .ennu-fc-header-main-row {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    padding: 8px 12px;
    gap: 8px;
    min-height: auto;
    overflow-x: visible;
  }

  /* Row 1: Logo/Back on left, Status/Actions on right */
  .header-left-section,
  .ennu-fc-header-left-section {
    order: 1;
    flex: 0 0 auto;
    gap: 8px;
    min-width: 0;
  }

  .header-right-section,
  .ennu-fc-header-right-section {
    order: 3;
    flex: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  .session-status {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 12px;
  }

  .header-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
  }

  /* Row 2: Navigation buttons take full width */
  .header-center-section,
  .ennu-fc-header-center-section {
    order: 2;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 100% !important;
    margin: 0 !important;
    padding: 8px 0 0 0 !important;
    overflow-x: auto !important;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    visibility: visible !important;
    min-height: 44px;
  }

  /* Hide scrollbar but keep functionality */
  .header-center-section::-webkit-scrollbar,
  .ennu-fc-header-center-section::-webkit-scrollbar {
    display: none;
  }

  .ennu-fc-mode-toggle-bar {
    width: auto; /* Not full width, allow scroll */
    display: inline-flex !important;
    flex-wrap: nowrap;
    min-width: min-content;
    visibility: visible !important;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 3px;
    gap: 2px;
  }

  .mode-toggle-bar {
    width: auto; /* Not full width */
    display: inline-flex !important;
    flex-wrap: nowrap;
    min-width: min-content;
    gap: 4px;
    padding: 3px;
    visibility: visible !important;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
  }

  .ennu-fc-mode-btn,
  .mode-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto; /* Don't expand, maintain size */
    padding: 8px 12px;
    min-height: 44px; /* Touch-friendly */
    min-width: 44px;
    white-space: nowrap;
    gap: 6px;
    visibility: visible !important;
  }

  .mode-label {
    display: inline; /* Show labels on most phones */
    font-size: 12px;
  }

  /* Action buttons - icon only, uniform size at 768px */
  .action-btn.voice-btn,
  .action-btn.theme-btn,
  .action-btn.complete-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  /* SVG icons visible at 768px */
  .action-btn.voice-btn svg,
  .action-btn.theme-btn svg {
    width: 18px !important;
    height: 18px !important;
    stroke: #1A1A1E !important;
    fill: none !important;
  }

  /* Complete button - icon only at 768px */
  .action-btn.complete-btn {
    font-size: 0 !important;
    color: transparent !important;
    text-indent: -9999px !important;
    position: relative !important;
    background: linear-gradient(135deg, #c9a962 0%, #b8944f 100%) !important;
    border: none !important;
  }

  .action-btn.complete-btn::before {
    content: '✓' !important;
    font-size: 20px !important;
    font-weight: bold !important;
    color: #1A1A1E !important;
    text-indent: 0 !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
  }

  /* Dark theme 768px */
  .theme-dark .action-btn.voice-btn svg,
  .theme-dark .action-btn.theme-btn svg {
    stroke: #f0f0f0 !important;
  }

  /* Canvas toolbar docked to bottom */
  .ennu-fc-canvas-toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    z-index: var(--z-dropdown);
    border-top: 1px solid var(--border-subtle);
    border-bottom: none;
    justify-content: space-around;
    padding: var(--space-2);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
  }

  .ennu-fc-btn-canvas-action span,
  .ennu-fc-btn-unified-toggle .ennu-fc-btn-text {
    display: none;
  }

  .face-chart-sidebar.sidebar-left,
  .face-chart-sidebar.sidebar-right {
    width: 90%;
    max-width: 360px;
  }

  .ennu-fc-treatment-billing-panel.active {
    grid-template-columns: 1fr;
  }
}

/* Small Mobile (480px and below) - Legacy styles */
@media (max-width: 480px) {
  .ennu-fc-title-compact {
    font-size: var(--text-sm);
    max-width: 100px;
  }

  .ennu-fc-mode-btn {
    padding: var(--space-2) var(--space-1);
  }

  .ennu-fc-mode-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
  }

  /* Action buttons handled by screen breakpoint below - removed conflicting rules */

  .ennu-fc-btn-unified-toggle {
    padding: var(--space-2);
    min-width: 40px;
    justify-content: center;
  }
}

/* ==========================================================================
   WIZARD MOBILE RESPONSIVE - Smaller iPhones (iPhone 12/13/14 series)
   ========================================================================== */

/* Medium phones (390px - 428px typical iPhone sizes) */
@media (max-width: 428px) {
  #chart-init-wizard .ennu-fc-modal-content,
  .modal-wizard {
    max-width: 95vw;
    max-height: 95vh;
    margin: 2.5vh auto;
  }

  .wizard-header {
    padding: var(--space-4);
  }

  .wizard-header h2 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-3);
  }

  .wizard-steps {
    gap: var(--space-4);
  }

  .step-number {
    width: 28px;
    height: 28px;
    font-size: var(--text-sm);
  }

  .step-label {
    font-size: 10px;
    max-width: 50px;
    text-align: center;
  }

  .wizard-panel {
    padding: var(--space-4);
    max-height: 50vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .wizard-panel h3 {
    font-size: var(--text-lg);
  }

  .wizard-footer {
    padding: var(--space-3) var(--space-4);
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .wizard-back,
  .wizard-next,
  .wizard-finish {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    flex: 1;
    min-width: 0;
    justify-content: center;
  }

  .footer-spacer {
    display: none;
  }

  /* Form elements spacing */
  .ennu-fc-form-group {
    margin-bottom: var(--space-3);
  }

  .ennu-fc-form-group select,
  .ennu-fc-form-group input {
    font-size: 16px; /* Prevents iOS zoom on focus */
    padding: var(--space-3);
  }
}

/* Extra small phones (< 375px) */
@media (max-width: 375px) {
  #chart-init-wizard .ennu-fc-modal-content,
  .modal-wizard {
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .wizard-header h2 {
    font-size: var(--text-base);
  }

  .step-label {
    display: none;
  }

  .wizard-panel {
    padding: var(--space-3);
    max-height: 55vh;
  }

  .wizard-footer {
    position: sticky;
    bottom: 0;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-3);
  }

  .wizard-back,
  .wizard-next,
  .wizard-finish {
    padding: var(--space-3);
    font-size: var(--text-base);
  }
}

/* Safe area insets for notched iPhones */
@supports (padding: max(0px)) {
  @media (max-width: 428px) {
    .wizard-footer {
      padding-bottom: max(var(--space-3), env(safe-area-inset-bottom));
    }

    #chart-init-wizard .ennu-fc-modal-content {
      padding-top: max(0px, env(safe-area-inset-top));
    }
  }
}

/* ==========================================================================
   TOUCH OPTIMIZATION
   ========================================================================== */

@media (hover: none) and (pointer: coarse) {
  /* Increase touch targets */
  .ennu-fc-tool-btn,
  .ennu-fc-btn-canvas-action,
  .action-btn,
  .ennu-fc-mode-btn {
    min-height: var(--touch-target-comfortable);
    min-width: var(--touch-target-min);
  }

  /* Disable hover transforms on touch */
  .ennu-fc-tool-btn:hover,
  .ennu-fc-btn-canvas-action:hover,
  .treatment-product-card:hover,
  .product-card:hover {
    transform: none;
  }

  /* Canvas touch handling */
  #face-chart-canvas {
    touch-action: none;
  }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
  .face-chart-header,
  .face-chart-sidebar,
  .ennu-fc-canvas-toolbar,
  .ennu-fc-sidebar-backdrop,
  .ennu-modal {
    display: none !important;
  }

  .ennu-face-chart-container {
    background: white;
    min-height: auto;
  }

  .face-chart-canvas-area {
    padding: 0;
  }

  #face-chart-canvas {
    max-width: 100%;
    height: auto;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  @page {
    size: letter portrait;
    margin: 0.5in;
  }
}

/* ==========================================================================
   CLASS NAME COMPATIBILITY - Map non-prefixed to prefixed styles
   ========================================================================== */

/* Mode Toggle Bar - Luxury Style */
.mode-toggle-bar {
  display: flex;
  background: var(--clinical-white);
  border: 2px solid #E5E8EC;
  border-radius: var(--radius-xl);
  padding: 4px;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(26, 39, 68, 0.06);
}

/* Mode Buttons - Luxury Style */
.mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  min-height: 48px;
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  color: #1A1A1E;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.mode-btn:hover {
  background: var(--charcoal-50);
  color: #1A2744;
}

/* Active State - Luxury Gold Gradient */
.mode-btn.active {
  background: linear-gradient(135deg, #C9A962 0%, #E5D4A1 50%, #C9A962 100%);
  color: #1A2744;
  box-shadow: 0 4px 16px rgba(201, 169, 98, 0.25);
  font-weight: 600;
}

/* Shimmer effect on active */
.mode-btn.active::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  pointer-events: none;
}

.mode-btn .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
  line-height: 1;
}

.mode-label {
  display: inline;
}

/* Session Status - Luxury Style */
.session-status {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: var(--clinical-white);
  border: 1px solid rgba(201, 169, 98, 0.15);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: #1A1A1E;
  box-shadow: 0 2px 8px rgba(26, 39, 68, 0.04);
}

.status-time {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: 500;
  color: #1A2744;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  min-width: 70px;
  text-align: center;
}

.status-timer {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--luxury-gold);
  font-variant-numeric: tabular-nums;
  min-width: 70px;
}

.status-timer::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--success-emerald);
  border-radius: var(--radius-full);
  animation: pulse-dot 2s ease-in-out infinite;
}

.status-provider {
  font-weight: var(--font-medium);
  color: var(--text-secondary);
}

/* Header Actions - Luxury Style */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* ==========================================================================
   Voice Recorder Quick Action - Header Button with Mini Indicator
   ========================================================================== */

.voice-recorder-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

/* Mini Recording Indicator in Header */
.voice-header-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
}

.recording-pulse-mini {
  width: 8px;
  height: 8px;
  background: #e74c3c;
  border-radius: 50%;
  animation: recording-blink-mini 1s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(231, 76, 60, 0.6);
}

@keyframes recording-blink-mini {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1);
    box-shadow: 0 0 6px rgba(231, 76, 60, 0.6);
  }
  50% { 
    opacity: 0.4; 
    transform: scale(0.8);
    box-shadow: 0 0 3px rgba(231, 76, 60, 0.3);
  }
}

/* Voice Recording Button */
.voice-record-btn {
  position: relative;
}

/* Recording Active State */
.voice-record-btn.recording {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
  border-color: #e74c3c !important;
  color: #ffffff !important;
  animation: recording-glow 1.5s ease-in-out infinite;
}

.voice-record-btn.recording svg {
  stroke: #ffffff !important;
}

@keyframes recording-glow {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
  }
  50% { 
    box-shadow: 0 0 0 6px rgba(231, 76, 60, 0);
  }
}

/* Dark Mode */
.theme-dark .voice-record-btn.recording {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
}

/* Action Buttons - Luxury Style */
/* Unified Action Buttons - Voice, Theme, Complete */
.voice-btn,
.theme-btn,
.complete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--bg-elevated);
  border: 2px solid var(--border-default);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  font-size: 11px;
  font-weight: 600;
  padding: 0;
  min-width: 48px;
  max-width: 48px;
}

.voice-btn:hover,
.theme-btn:hover,
.complete-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201, 169, 98, 0.15);
}

.voice-btn:active,
.theme-btn:active,
.complete-btn:active {
  transform: scale(0.95);
}

.voice-btn svg,
.theme-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

/* Complete button - show checkmark icon instead of text */
.complete-btn {
  font-size: 0; /* Hide text */
  position: relative;
}

.complete-btn::before {
  content: '✓';
  font-size: 20px;
  font-weight: bold;
  color: var(--accent-primary);
}

/* Theme icons */
.theme-dark .theme-icon-light {
  display: none;
}

.theme-dark .theme-icon-dark {
  display: block !important;
}

/* ==========================================================================
   RESPONSIVE HEADER STYLES - Desktop, iPad, Mobile
   ========================================================================== */

/* Desktop: Full layout */
@media screen and (min-width: 1025px) {
  .header-main-row {
    padding: var(--space-3) var(--space-5);
    min-height: 64px;
  }

  .mode-toggle-bar {
    gap: 4px;
    padding: 4px;
  }

  .mode-btn {
    padding: var(--space-2) var(--space-4);
    min-height: 44px;
    gap: var(--space-2);
  }

  .mode-label {
    display: inline;
    font-size: 13px;
  }
}

/* iPad: Compact with labels */
@media screen and (max-width: 1024px) and (min-width: 768px) {
  .header-main-row {
    padding: var(--space-2) var(--space-3);
    min-height: 56px;
    gap: var(--space-2);
    flex-wrap: nowrap;
  }

  /* Logo always visible on iPad */
  .header-left-section {
    flex: 0 0 auto;
    gap: var(--space-2);
  }

  .header-logo-mini {
    height: 26px;
    width: auto;
    display: block !important;
    flex-shrink: 0;
  }

  /* Center section takes remaining space but can shrink */
  .header-center-section {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
  }

  .mode-toggle-bar {
    gap: 2px;
    padding: 3px;
    border-radius: var(--radius-lg);
    flex-wrap: nowrap;
  }

  .mode-btn {
    padding: var(--space-2);
    min-height: 36px;
    min-width: 36px;
    gap: 4px;
    font-size: var(--text-xs);
    border-radius: var(--radius-md);
  }

  .mode-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
  }

  /* Hide labels on iPad to save space */
  .mode-label {
    display: none;
  }

  /* Right section - session status and actions */
  .header-right-section {
    flex: 0 0 auto;
    gap: var(--space-2);
  }

  .session-status {
    padding: var(--space-1) var(--space-2);
    font-size: 11px;
    gap: var(--space-1);
    flex-shrink: 0;
  }

  .status-time,
  .status-timer {
    font-size: 11px;
    min-width: 55px;
  }

  /* Hide provider name on iPad to save space */
  .status-provider {
    display: none;
  }

  /* Action buttons - icon only on iPad */
  .action-btn.voice-btn,
  .action-btn.theme-btn,
  .action-btn.complete-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .action-btn.voice-btn svg,
  .action-btn.theme-btn svg {
    width: 18px !important;
    height: 18px !important;
    stroke: #1A1A1E !important;
    fill: none !important;
  }

  /* Complete button - icon only on iPad */
  .action-btn.complete-btn {
    font-size: 0 !important;
    color: transparent !important;
    text-indent: -9999px !important;
    position: relative !important;
    background: linear-gradient(135deg, #c9a962 0%, #b8944f 100%) !important;
    border: none !important;
  }

  .action-btn.complete-btn::before {
    content: '✓' !important;
    font-size: 20px !important;
    font-weight: bold !important;
    color: #1A1A1E !important;
    text-indent: 0 !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
  }

  /* Dark theme iPad */
  .theme-dark .action-btn.voice-btn svg,
  .theme-dark .action-btn.theme-btn svg {
    stroke: #f0f0f0 !important;
  }

  .header-actions {
    gap: var(--space-2);
  }

  /* Back button smaller */
  .ennu-fc-btn-back-mini {
    width: 32px;
    height: 32px;
  }
}

/* Mobile: 3-row layout - Logo+Timer+Theme | Modes | Actions */
@media screen and (max-width: 767px) {
  .face-chart-header.compact-header {
    box-shadow: 0 2px 8px rgba(26, 39, 68, 0.05);
  }

  .header-main-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    padding: 6px 10px;
    min-height: auto;
    gap: 8px;
    row-gap: 6px;
  }

  /* Row 1: Logo on left, Time/Duration + Theme toggle on right */
  .header-left-section {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 4px;
    order: 1;
  }

  /* Let children of header-right-section flow into parent flex */
  .header-right-section {
    display: contents !important;
  }

  /* Header main row - positioning context */
  .header-main-row {
    position: relative;
  }

  /* Session status - Row 1, leave space for theme toggle on right */
  .session-status {
    display: flex !important;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--bg-tertiary, #f5f5f5);
    border-radius: var(--radius-md, 8px);
    font-size: 11px;
    flex-shrink: 0;
    order: 2;
    margin-left: auto; /* Push to right */
    margin-right: 46px; /* Space for theme toggle */
  }

  /* Theme toggle - in Row 1, right of session status */
  .action-btn.theme-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    border-width: 1.5px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    border-color: #e0e0e0 !important;
    border-style: solid !important;
    box-sizing: border-box !important;
    color: #1A1A1E !important;
  }

  /* Theme toggle icons - only show one at a time */
  .action-btn.theme-btn .theme-icon-light {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    stroke-width: 2 !important;
    fill: none !important;
  }

  .action-btn.theme-btn .theme-icon-dark {
    display: none !important;
    width: 18px !important;
    height: 18px !important;
    stroke-width: 2 !important;
    fill: none !important;
  }

  /* Dark mode: show moon, hide sun */
  .theme-dark .action-btn.theme-btn .theme-icon-light {
    display: none !important;
  }

  .theme-dark .action-btn.theme-btn .theme-icon-dark {
    display: block !important;
  }

  /* Row 2: Mode toggles - full width, centered */
  .header-center-section {
    flex: 1 1 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    order: 3;
  }

  /* Row 3: Action buttons (Voice + Complete) - full width, centered */
  .header-actions {
    display: flex !important;
    flex: 1 1 100%;
    gap: 10px;
    justify-content: center;
    align-items: center;
    order: 4;
    padding: 4px 0;
  }

  /* Theme toggle - pull out of normal flow and position in Row 1 */
  .header-actions .action-btn.theme-btn {
    position: absolute !important;
    top: 6px;
    right: 10px;
    margin: 0 !important;
    z-index: 5;
  }

  /* Logo compact */
  .header-logo-mini {
    height: 18px;
    width: auto;
    display: block !important;
    flex-shrink: 0;
  }

  .ennu-fc-btn-back-mini {
    width: 26px;
    height: 26px;
    padding: 0;
    flex-shrink: 0;
  }

  .ennu-fc-btn-back-mini svg {
    width: 12px;
    height: 12px;
  }

  .mode-toggle-bar {
    display: inline-flex;
    gap: 3px;
    padding: 2px;
    border-radius: var(--radius-md);
    border-width: 1px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mode-btn {
    padding: 8px;
    min-height: 40px; /* Touch-friendly minimum */
    min-width: 40px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
  }

  .mode-btn .dashicons {
    font-size: 18px; /* Larger for visibility */
    width: 18px;
    height: 18px;
  }

  /* Mobile: Active mode shows icon+text, inactive shows only icon */
  .mode-label {
    display: none !important; /* Hide text by default */
    font-size: 11px;
  }
  
  .mode-btn.active .mode-label {
    display: inline !important; /* Show text only on active */
  }

  .status-time {
    font-size: 11px;
    min-width: auto;
  }

  .status-timer {
    font-size: 11px;
    min-width: auto;
  }

  .status-provider {
    font-size: 11px;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Voice button - show icon + text on mobile */
  .action-btn.voice-btn {
    width: auto !important;
    height: 40px !important;
    min-width: auto !important;
    max-width: none !important;
    min-height: 40px !important;
    padding: 0 14px !important;
    gap: 6px !important;
    border-width: 1.5px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    border-color: #e0e0e0 !important;
    border-style: solid !important;
    box-sizing: border-box !important;
    color: #1A1A1E !important;
    font-size: 13px !important;
    font-weight: 600 !important;
  }

  .action-btn.voice-btn svg {
    width: 18px !important;
    height: 18px !important;
    stroke-width: 2 !important;
    display: block !important;
    fill: none !important;
    flex-shrink: 0 !important;
  }

  /* Add "Voice" text after the SVG icon */
  .action-btn.voice-btn::after {
    content: 'Voice' !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: inherit !important;
  }

  /* Complete button - show icon + text on mobile */
  .action-btn.complete-btn {
    width: auto !important;
    height: 40px !important;
    min-width: auto !important;
    max-width: none !important;
    min-height: 40px !important;
    padding: 0 14px !important;
    gap: 6px !important;
    border-width: 1.5px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #c9a962 0%, #b8944f 100%) !important;
    border: none !important;
    box-sizing: border-box !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1A1A1E !important;
    text-indent: 0 !important;
    position: relative !important;
  }

  /* Checkmark icon before "Complete" text */
  .action-btn.complete-btn::before {
    content: '✓' !important;
    font-size: 16px !important;
    font-weight: bold !important;
    color: #1A1A1E !important;
    line-height: 1 !important;
    text-indent: 0 !important;
    position: static !important;
    transform: none !important;
    flex-shrink: 0 !important;
  }

  /* Dark theme adjustments for mobile */
  .theme-dark .session-status {
    background: #26262B !important;
    border-color: #404045 !important;
  }

  .theme-dark .status-time,
  .theme-dark .status-timer,
  .theme-dark .status-provider {
    color: #f0f0f0 !important;
  }

  .theme-dark .action-btn.voice-btn {
    background: #26262B !important;
    border-color: #404045 !important;
    color: #f0f0f0 !important;
  }

  .theme-dark .action-btn.theme-btn {
    background: #26262B !important;
    border-color: #404045 !important;
    color: #f0f0f0 !important;
  }

  .theme-dark .action-btn.theme-btn .theme-icon-dark {
    stroke: #f0f0f0 !important;
  }

  .theme-dark .action-btn.complete-btn {
    background: linear-gradient(135deg, #c9a962 0%, #b8944f 100%) !important;
  }

  .theme-dark .action-btn.complete-btn::before {
    color: #1A1A1E !important;
  }
}

/* Small Mobile: Compact 3-row layout */
@media screen and (max-width: 480px) {
  .header-main-row {
    padding: 4px 6px;
    gap: 4px;
    row-gap: 4px;
  }

  /* Row 2: Mode toggles - full width, centered */
  .header-center-section {
    display: flex !important;
    flex: 1 1 100%;
    justify-content: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mode-toggle-bar {
    display: inline-flex !important;
    padding: 2px;
    gap: 2px;
  }

  .mode-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 6px;
    min-height: 36px;
    min-width: 36px;
  }

  .mode-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
  }

  /* Very small screens: Active mode shows icon+text, inactive shows only icon */
  .mode-label {
    display: none !important;
  }
  
  .mode-btn.active .mode-label {
    display: inline !important;
    font-size: 10px;
  }

  /* Session status - compact on small mobile, stays in Row 1 */
  .session-status {
    display: flex !important;
    padding: 3px 6px;
    gap: 4px;
    font-size: 10px;
    margin-right: 40px; /* Space for smaller theme toggle */
  }

  .status-time {
    font-size: 10px;
  }

  .status-timer {
    font-size: 10px;
  }

  /* Hide provider name on very small screens to save space */
  .status-provider {
    display: none;
  }

  /* Theme toggle - smaller on very small screens, positioned in Row 1 */
  .header-actions .action-btn.theme-btn {
    top: 4px;
    right: 6px;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 32px !important;
  }

  /* Theme toggle icons - smaller */
  .action-btn.theme-btn .theme-icon-light {
    width: 16px !important;
    height: 16px !important;
  }

  .action-btn.theme-btn .theme-icon-dark {
    width: 16px !important;
    height: 16px !important;
  }

  /* Row 3: Action buttons - centered */
  .header-actions {
    gap: 8px !important;
  }

  /* Voice button - smaller with icon + text on small mobile */
  .action-btn.voice-btn {
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }

  .action-btn.voice-btn svg {
    width: 16px !important;
    height: 16px !important;
  }

  .action-btn.voice-btn::after {
    font-size: 12px !important;
  }

  /* Complete button - smaller with icon + text on small mobile */
  .action-btn.complete-btn {
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }

  .action-btn.complete-btn::before {
    font-size: 14px !important;
  }

  .header-logo-mini {
    height: 14px;
  }

  .ennu-fc-btn-back-mini {
    width: 24px;
    height: 24px;
  }

  .ennu-fc-btn-back-mini svg {
    width: 11px;
    height: 11px;
  }

  /* Dark theme for small mobile */
  .theme-dark .action-btn.voice-btn,
  .theme-dark .action-btn.theme-btn {
    color: #f0f0f0 !important;
  }
}

/* Canvas Toolbar - Sticky at Top of Canvas Area (only visible in chart mode) */
.canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-3) var(--space-5);
  background: linear-gradient(180deg, var(--clinical-white) 0%, var(--clinical-cream) 100%);
  border-bottom: 1px solid rgba(201, 169, 98, 0.15);
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hide toolbar when not in chart mode */
.face-chart-content:not(.mode-face-chart) .canvas-toolbar,
.canvas-toolbar.toolbar-hidden {
  display: none !important;
}

/* Canvas Action Buttons - Luxury Style */
.btn-canvas-action {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  min-height: 44px;
  background: var(--clinical-white);
  border: 2px solid #E5E8EC;
  border-radius: var(--radius-lg);
  color: #1A1A1E;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}

.btn-canvas-action:hover {
  background: var(--charcoal-50);
  border-color: var(--luxury-gold);
  color: #1A1A1E;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 39, 68, 0.08);
}

/* Active State - Luxury Gold Gradient */
.btn-canvas-action.active {
  background: linear-gradient(135deg, #C9A962 0%, #E5D4A1 50%, #C9A962 100%);
  border-color: var(--luxury-gold);
  color: #1A2744;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(201, 169, 98, 0.25);
}

.btn-canvas-action svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

/* Canvas Tool Mode Buttons - Draw, Treat, Inject */
.canvas-tool-modes {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(201, 169, 98, 0.08);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(201, 169, 98, 0.15);
  margin-left: var(--space-2);
  margin-right: var(--space-2);
}

.btn-tool-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  min-height: 40px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  color: #5A5A6E;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 200ms ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-tool-mode:hover {
  background: rgba(255, 255, 255, 0.8);
  color: #1A1A1E;
  border-color: rgba(201, 169, 98, 0.3);
}

.btn-tool-mode.active {
  background: linear-gradient(135deg, #C9A962 0%, #D4BC7B 100%);
  border-color: var(--luxury-gold);
  color: #1A2744;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(201, 169, 98, 0.3);
}

.btn-tool-mode svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.btn-tool-mode span {
  font-size: 13px;
  letter-spacing: 0.01em;
}

/* View/Pan mode button - same styling as other tool buttons */
.btn-tool-mode[data-tool="view"] {
  background: transparent;
  border: 2px solid transparent;
}

.btn-tool-mode[data-tool="view"]:hover {
  background: rgba(255, 255, 255, 0.8);
  color: #1A1A1E;
  border-color: rgba(201, 169, 98, 0.3);
}

.btn-tool-mode[data-tool="view"].active {
  background: linear-gradient(135deg, #C9A962 0%, #D4BC7B 100%);
  border-color: var(--luxury-gold);
  color: #1A2744;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(201, 169, 98, 0.3);
}

.btn-tool-mode[data-tool="view"].active svg {
  stroke: #1A2744;
}

/* Body tool button - distinct styling for body waxing mode */
.btn-tool-mode[data-tool="body"] {
  background: transparent;
  border: 2px solid transparent;
}

.btn-tool-mode[data-tool="body"]:hover {
  background: rgba(156, 136, 255, 0.15);
  color: #6B5AED;
  border-color: rgba(156, 136, 255, 0.3);
}

.btn-tool-mode[data-tool="body"].active {
  background: linear-gradient(135deg, #7C6BE6 0%, #9C88FF 100%);
  border-color: #7C6BE6;
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(124, 107, 230, 0.4);
}

.btn-tool-mode[data-tool="body"].active svg {
  stroke: #FFFFFF;
}

/* Dark Mode Tool Mode Buttons */
.ennu-fc-dark .canvas-tool-modes {
  background: rgba(201, 169, 98, 0.1);
  border-color: rgba(201, 169, 98, 0.2);
}

.ennu-fc-dark .btn-tool-mode {
  color: #A0A0B0;
}

.ennu-fc-dark .btn-tool-mode:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #E0E0E8;
}

.ennu-fc-dark .btn-tool-mode.active {
  background: linear-gradient(135deg, rgba(201, 169, 98, 0.9) 0%, rgba(212, 188, 123, 0.9) 100%);
  color: #1A2744;
}

/* Dark mode body tool styling */
.ennu-fc-dark .btn-tool-mode[data-tool="body"]:hover {
  background: rgba(156, 136, 255, 0.2);
  color: #B8AAFF;
  border-color: rgba(156, 136, 255, 0.4);
}

.ennu-fc-dark .btn-tool-mode[data-tool="body"].active {
  background: linear-gradient(135deg, #7C6BE6 0%, #9C88FF 100%);
  border-color: #7C6BE6;
  color: #FFFFFF;
}

/* ==========================================================================
   RESPONSIVE TOOLBAR SYSTEM - Desktop, iPad, Mobile
   ========================================================================== */

/* Canvas Toolbar - Single Row Layout */
.canvas-toolbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: linear-gradient(180deg, var(--clinical-white) 0%, var(--clinical-cream) 100%);
  border-bottom: 1px solid rgba(201, 169, 98, 0.15);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  /* Prevent horizontal scroll on toolbar - content wraps instead */
  overflow: hidden;
}

/* Toolbar Rows - dissolve into single line on desktop */
.toolbar-row {
  display: contents;
}

.toolbar-row.toolbar-primary,
.toolbar-row.toolbar-secondary {
  display: contents;
}

/* Toolbar Group - Button container */
.toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* Tool modes group - special styling */
.toolbar-group.toolbar-modes {
  background: rgba(201, 169, 98, 0.08);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(201, 169, 98, 0.15);
  padding: 4px;
  gap: 4px;
}

/* Actions group with zoom */
.toolbar-group.toolbar-actions {
  gap: var(--space-3);
}

/* ==========================================================================
   TOOLBAR BUTTON BASE STYLES
   ========================================================================== */

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  min-height: 44px;
  min-width: 44px;
  background: var(--clinical-white);
  border: 2px solid #E5E8EC;
  border-radius: var(--radius-lg);
  color: #1A1A1E;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 200ms ease;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.toolbar-btn:hover {
  background: var(--charcoal-50);
  border-color: var(--luxury-gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 39, 68, 0.08);
}

.toolbar-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(26, 39, 68, 0.08);
}

.toolbar-btn.active {
  background: linear-gradient(135deg, #C9A962 0%, #E5D4A1 50%, #C9A962 100%);
  border-color: var(--luxury-gold);
  color: #1A2744;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(201, 169, 98, 0.25);
}

.toolbar-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  flex-shrink: 0;
}

.toolbar-btn .btn-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Toolbar Button Variants */
.toolbar-btn-accent,
#btn-upload-photo {
  background: rgba(201, 169, 98, 0.1);
  border: 2px solid rgba(201, 169, 98, 0.3) !important;
  min-height: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-md);
}

.toolbar-btn-accent:hover,
#btn-upload-photo:hover {
  background: rgba(201, 169, 98, 0.2);
  border-color: var(--luxury-gold) !important;
}

.toolbar-btn-danger {
  background: rgba(220, 53, 69, 0.05);
  border-color: rgba(220, 53, 69, 0.2);
}

.toolbar-btn-danger:hover {
  background: rgba(220, 53, 69, 0.1);
  border-color: rgba(220, 53, 69, 0.4);
  color: #dc3545;
}

.toolbar-btn-danger svg {
  stroke: currentColor;
}

.toolbar-btn-primary {
  background: linear-gradient(135deg, rgba(201, 169, 98, 0.15) 0%, rgba(201, 169, 98, 0.1) 100%);
  border-color: rgba(201, 169, 98, 0.4);
}

.toolbar-btn-primary:hover {
  background: linear-gradient(135deg, #C9A962 0%, #D4BC7B 100%);
  border-color: var(--luxury-gold);
  color: #1A2744;
  box-shadow: 0 4px 16px rgba(201, 169, 98, 0.25);
}

/* ==========================================================================
   ZOOM CONTROLS
   ========================================================================== */

.zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--clinical-white);
  border: 2px solid #E5E8EC;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.zoom-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 40px;
  background: transparent;
  border: none;
  color: #1A1A1E;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms ease;
}

.zoom-btn:hover {
  background: rgba(201, 169, 98, 0.1);
  color: var(--luxury-gold);
}

.zoom-btn:active {
  background: rgba(201, 169, 98, 0.2);
}

.zoom-display {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 40px;
  padding: 0 var(--space-2);
  background: var(--charcoal-50);
  border-left: 1px solid #E5E8EC;
  border-right: 1px solid #E5E8EC;
  font-size: 12px;
  font-weight: 600;
  color: #1A1A1E;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-variant-numeric: tabular-nums;
}

.zoom-display:hover {
  background: rgba(201, 169, 98, 0.1);
  color: var(--luxury-gold);
}

/* Zoom reset button */
.zoom-reset-btn {
  border-left: 1px solid #E5E8EC !important;
}

.zoom-reset-btn svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   GENDER TOGGLE BUTTON
   ========================================================================== */

.btn-gender-toggle {
  position: relative;
}

/* Hide the non-active gender icon */
.btn-gender-toggle .gender-icon {
  display: none;
}

/* Show female icon when data-gender="female" */
.btn-gender-toggle[data-gender="female"] .gender-female {
  display: block;
}

/* Show male icon when data-gender="male" */
.btn-gender-toggle[data-gender="male"] .gender-male {
  display: block;
}

/* Fixed dimensions to prevent pixel shifting */
.btn-gender-toggle .gender-icon {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   RESPONSIVE STYLES - iPad (768px - 1024px)
   ========================================================================== */

@media screen and (max-width: 1024px) {
  .canvas-toolbar {
    padding: var(--space-2) var(--space-3);
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .toolbar-group {
    gap: var(--space-1);
  }

  /* Compact buttons on iPad */
  .toolbar-btn {
    padding: var(--space-2);
    min-height: 44px;
    min-width: 44px;
  }

  /* Hide text labels on iPad, show only icons */
  .toolbar-btn .btn-label {
    display: none;
  }

  /* Keep labels visible for tool modes */
  .toolbar-group.toolbar-modes .toolbar-btn .btn-label,
  .btn-tool-mode .btn-label,
  .btn-tool-mode span {
    display: inline;
    font-size: 12px;
  }

  .zoom-display {
    min-width: 44px;
    font-size: 11px;
  }

  .zoom-btn {
    width: 32px;
    height: 38px;
  }
}

/* ==========================================================================
   RESPONSIVE STYLES - Mobile (<768px)
   ========================================================================== */

@media screen and (max-width: 767px) {
  .canvas-toolbar {
    padding: var(--space-2);
    gap: var(--space-2);
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Tool modes - prominent, first position */
  .toolbar-group.toolbar-modes {
    order: -1;
    flex: 1 0 100%;
    justify-content: center;
    padding: var(--space-2);
  }

  /* ==========================================================================
     MOBILE CANVAS & RULERS - Full Width, Edge Flush, Perfect Zoom
     ========================================================================== */

  /* Thin rulers on mobile - 20px instead of 30-40px */
  .ruler-corner-spacer,
  .ennu-fc-ruler-corner-spacer {
    width: 20px !important;
    height: 20px !important;
  }

  .ruler-horizontal,
  .ennu-fc-ruler-horizontal {
    height: 20px !important;
    padding-left: 20px !important;
  }

  .ruler-vertical,
  .ennu-fc-ruler-vertical {
    width: 20px !important;
    top: 20px !important;
  }

  /* Hide ruler info text on mobile - just show the tick marks */
  .ruler-info,
  .ennu-fc-ruler-info {
    display: none !important;
  }

  /* Ruler styling - subtle background */
  .ruler-horizontal,
  .ruler-vertical,
  .ruler-corner-spacer {
    background: var(--charcoal-100, #f0f0f5) !important;
    border-color: var(--charcoal-200, #e0e0e5) !important;
  }

  /* Dark mode rulers */
  .theme-dark .ruler-horizontal,
  .theme-dark .ruler-vertical,
  .theme-dark .ruler-corner-spacer,
  .theme-dark .ennu-fc-ruler-horizontal,
  .theme-dark .ennu-fc-ruler-vertical,
  .theme-dark .ennu-fc-ruler-corner-spacer {
    background: var(--charcoal-800, #26262B) !important;
    border-color: var(--charcoal-600, #404045) !important;
  }

  /* Dark mode canvas wrapper */
  .theme-dark .canvas-wrapper,
  .theme-dark .ennu-fc-canvas-wrapper {
    background: var(--charcoal-900, #1A1A1E) !important;
  }

  /* Canvas container with thin rulers */
  .ennu-fc-canvas-container {
    grid-template-columns: 20px 1fr !important;
    grid-template-rows: 20px 1fr !important;
  }

  /* Canvas wrapper - FULL WIDTH, EDGE FLUSH, perfect for zoom */
  .canvas-wrapper,
  .ennu-fc-canvas-wrapper {
    grid-column: 2 !important;
    grid-row: 2 !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-x pan-y pinch-zoom !important;
    background: var(--clinical-white) !important;
    /* Prevent horizontal scroll beyond canvas width at 100% zoom */
    overflow-x: hidden !important;
  }

  /* Enable horizontal scroll only when zoomed in (canvas wider than viewport) */
  .canvas-wrapper.zoomed-in,
  .ennu-fc-canvas-wrapper.zoomed-in {
    overflow-x: auto !important;
  }

  /* Canvas element - edge flush, no rounded corners on mobile */
  /* CRITICAL: Ensure image is not skewed - maintain aspect ratio */
  .canvas-wrapper #face-chart-canvas,
  .ennu-fc-canvas-wrapper #face-chart-canvas,
  #face-chart-canvas {
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: block !important;
    transform-origin: 0 0 !important;
    /* At 100% zoom, canvas should be exactly viewport width */
    width: 100% !important;
    height: auto !important;
    /* Preserve aspect ratio - prevent skewing */
    aspect-ratio: 1275 / 1650;
  }

  /* Canvas container - full width */
  .canvas-container,
  .ennu-fc-canvas-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }

  /* Face chart content area - full width */
  .face-chart-content {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
  }

  /* Template thumbnails - smaller on mobile, right edge */
  .template-thumbnails-strip {
    top: 8px !important;
    right: 8px !important;
    padding: 4px !important;
    gap: 4px !important;
  }

  .template-thumb {
    padding: 6px 8px !important;
    min-width: 44px !important;
    font-size: 8px !important;
  }

  .template-thumb svg {
    width: 18px !important;
    height: 18px !important;
  }

  /* Photo thumbnails - smaller on mobile, left edge */
  .photo-thumbnails-strip {
    top: 8px !important;
    left: 8px !important;
    padding: 4px !important;
    gap: 4px !important;
  }

  .photo-thumb {
    width: 48px !important;
    height: 48px !important;
  }

  /* Smaller buttons on mobile */
  .toolbar-btn {
    padding: var(--space-2);
    min-height: 40px;
    min-width: 40px;
    border-radius: var(--radius-md);
  }

  .toolbar-btn svg {
    width: 18px;
    height: 18px;
  }

  /* Hide text labels on most toolbar buttons */
  .toolbar-btn .btn-label {
    display: none !important;
  }

  /* Show text labels on Draw/Treat/Inject mode buttons */
  .toolbar-group.toolbar-modes .btn-tool-mode {
    padding: 8px 12px !important;
    gap: 6px !important;
  }

  .toolbar-group.toolbar-modes .btn-tool-mode span,
  .btn-tool-mode .btn-label {
    display: inline !important;
    font-size: 12px !important;
    font-weight: 500 !important;
  }

  /* Gender toggle - icon only, same size as other toolbar buttons */
  .btn-gender-toggle {
    min-width: 40px !important;
    width: 40px !important;
    padding: 0 !important;
    justify-content: center !important;
  }

  .btn-gender-toggle .btn-label,
  .btn-gender-toggle #template-gender-label {
    display: none !important;
  }

  /* Photo button - show icon + text, match Draw/Treat/Inject style */
  .toolbar-group.toolbar-actions #btn-upload-photo {
    padding: 8px 12px !important;
    gap: 6px !important;
    background: rgba(201, 169, 98, 0.1) !important;
    border: 2px solid rgba(201, 169, 98, 0.3) !important;
    border-radius: 8px !important;
  }

  .toolbar-group.toolbar-actions #btn-upload-photo .btn-label {
    display: inline !important;
    font-size: 12px !important;
    font-weight: 500 !important;
  }

  .toolbar-group.toolbar-actions #btn-upload-photo svg {
    width: 18px !important;
    height: 18px !important;
  }

  /* Zoom controls - consistent design */
  .zoom-controls {
    border-radius: 8px;
    background: #ffffff !important;
    border: 2px solid #e0e0e0 !important;
    padding: 4px 6px !important;
    gap: 4px !important;
  }

  .zoom-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 6px !important;
    color: #1A1A1E !important;
  }

  .zoom-btn:hover {
    background: rgba(201, 169, 98, 0.15) !important;
    color: #C9A962 !important;
  }

  .zoom-display {
    min-width: 44px;
    height: 32px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(201, 169, 98, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .toolbar-group.toolbar-actions {
    gap: 8px;
  }

  /* ==========================================================================
     MOBILE ZOOM & TOUCH INTERACTION - Perfect Usability
     ========================================================================== */

  /* Zoom controls - larger touch targets on mobile */
  .zoom-controls {
    position: relative;
    z-index: 50;
  }

  .zoom-btn {
    min-width: 44px !important;
    min-height: 44px !important;
    font-size: 20px !important;
    font-weight: 700 !important;
  }

  .zoom-display {
    min-width: 50px !important;
    min-height: 36px !important;
    font-size: 12px !important;
    cursor: pointer;
  }

  /* Touch feedback for zoom buttons */
  .zoom-btn:active {
    transform: scale(0.92) !important;
    background: rgba(201, 169, 98, 0.3) !important;
  }

  /* Canvas scroll indicator when zoomed */
  .canvas-wrapper::-webkit-scrollbar,
  .ennu-fc-canvas-wrapper::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }

  .canvas-wrapper::-webkit-scrollbar-track,
  .ennu-fc-canvas-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
  }

  .canvas-wrapper::-webkit-scrollbar-thumb,
  .ennu-fc-canvas-wrapper::-webkit-scrollbar-thumb {
    background: rgba(201, 169, 98, 0.4);
    border-radius: 3px;
  }

  .canvas-wrapper::-webkit-scrollbar-thumb:hover,
  .ennu-fc-canvas-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 169, 98, 0.6);
  }

  /* Snapshot capture button - prominent when zoomed */
  .snapshot-capture-btn {
    position: fixed !important;
    bottom: 80px !important;
    right: 16px !important;
    z-index: 100 !important;
    padding: 12px 16px !important;
    border-radius: 24px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
  }

  .snapshot-capture-btn span {
    display: inline !important;
  }
}

/* ==========================================================================
   RESPONSIVE STYLES - Small Mobile (<480px)
   ========================================================================== */

@media screen and (max-width: 480px) {
  /* ==========================================================================
     SMALL MOBILE CANVAS & RULERS - Ultra Thin, Maximum Canvas Space
     ========================================================================== */

  /* Ultra thin rulers on small mobile - 16px */
  .ruler-corner-spacer,
  .ennu-fc-ruler-corner-spacer {
    width: 16px !important;
    height: 16px !important;
  }

  .ruler-horizontal,
  .ennu-fc-ruler-horizontal {
    height: 16px !important;
    padding-left: 16px !important;
  }

  .ruler-vertical,
  .ennu-fc-ruler-vertical {
    width: 16px !important;
    top: 16px !important;
  }

  .ennu-fc-canvas-container {
    grid-template-columns: 16px 1fr !important;
    grid-template-rows: 16px 1fr !important;
  }

  /* Template thumbnails - even smaller */
  .template-thumbnails-strip {
    top: 4px !important;
    right: 4px !important;
    padding: 3px !important;
    gap: 3px !important;
    border-radius: 6px !important;
  }

  .template-thumb {
    padding: 4px 6px !important;
    min-width: 36px !important;
    font-size: 7px !important;
    gap: 2px !important;
  }

  .template-thumb svg {
    width: 14px !important;
    height: 14px !important;
  }

  /* Photo thumbnails - even smaller */
  .photo-thumbnails-strip {
    top: 4px !important;
    left: 4px !important;
    padding: 3px !important;
    gap: 3px !important;
    border-radius: 6px !important;
  }

  .photo-thumb {
    width: 40px !important;
    height: 40px !important;
    border-radius: 4px !important;
  }

  .photo-thumb-delete {
    width: 20px !important;
    height: 20px !important;
    top: 1px !important;
    right: 1px !important;
  }

  .canvas-toolbar {
    padding: var(--space-1) var(--space-2);
    gap: var(--space-1);
  }

  .toolbar-group {
    gap: 4px;
  }

  .toolbar-btn {
    min-height: 36px;
    min-width: 36px;
    padding: 6px;
    border-width: 1px;
  }

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

  .toolbar-group.toolbar-modes {
    padding: 3px;
    gap: 2px;
  }

  /* Gender toggle - smaller on very small screens */
  .btn-gender-toggle {
    min-width: 36px !important;
    width: 36px !important;
  }

  /* Draw/Treat/Inject buttons - smaller with labels */
  .toolbar-group.toolbar-modes .btn-tool-mode {
    padding: 6px 10px !important;
    min-height: 34px;
    gap: 4px !important;
  }

  .toolbar-group.toolbar-modes .btn-tool-mode span {
    font-size: 11px !important;
  }

  .toolbar-group.toolbar-modes .btn-tool-mode svg {
    width: 14px !important;
    height: 14px !important;
  }

  /* Photo button - smaller on very small screens */
  .toolbar-group.toolbar-actions #btn-upload-photo {
    padding: 6px 10px !important;
  }

  .toolbar-group.toolbar-actions #btn-upload-photo .btn-label {
    font-size: 11px !important;
  }

  .toolbar-group.toolbar-actions #btn-upload-photo svg {
    width: 14px !important;
    height: 14px !important;
  }

  /* Zoom controls - smaller */
  .zoom-controls {
    padding: 3px 4px !important;
  }

  .zoom-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 16px !important;
  }

  .zoom-display {
    min-width: 36px;
    height: 28px;
    font-size: 10px;
    padding: 0 4px;
    background: rgba(201, 169, 98, 0.1);
    border-radius: 4px;
  }
}

/* ==========================================================================
   DARK MODE TOOLBAR STYLES
   ========================================================================== */

.ennu-fc-dark .canvas-toolbar {
  background: linear-gradient(180deg, var(--charcoal-800) 0%, var(--charcoal-900) 100%);
  border-bottom-color: rgba(201, 169, 98, 0.2);
}

.ennu-fc-dark .toolbar-row.toolbar-secondary {
  border-top-color: rgba(201, 169, 98, 0.15);
}

.ennu-fc-dark .toolbar-btn {
  background: var(--charcoal-800);
  border-color: var(--charcoal-600);
  color: var(--charcoal-200);
}

.ennu-fc-dark .toolbar-btn:hover {
  background: var(--charcoal-700);
  border-color: var(--luxury-gold);
  color: var(--charcoal-100);
}

.ennu-fc-dark .toolbar-btn.active {
  background: linear-gradient(135deg, rgba(201, 169, 98, 0.9) 0%, rgba(212, 188, 123, 0.9) 100%);
  color: #1A2744;
}

.ennu-fc-dark .toolbar-group.toolbar-modes {
  background: rgba(201, 169, 98, 0.1);
  border-color: rgba(201, 169, 98, 0.2);
}

.ennu-fc-dark .zoom-controls {
  background: var(--charcoal-800);
  border-color: var(--charcoal-600);
}

.ennu-fc-dark .zoom-btn {
  color: var(--charcoal-200);
}

.ennu-fc-dark .zoom-btn:hover {
  background: rgba(201, 169, 98, 0.15);
  color: var(--luxury-gold);
}

.ennu-fc-dark .zoom-display {
  background: var(--charcoal-700);
  border-color: var(--charcoal-600);
  color: var(--charcoal-200);
}

/* Dark mode Photo button */
.ennu-fc-dark .toolbar-group.toolbar-actions #btn-upload-photo,
.theme-dark .toolbar-group.toolbar-actions #btn-upload-photo {
  background: rgba(201, 169, 98, 0.15) !important;
  border-color: rgba(201, 169, 98, 0.3) !important;
  color: var(--charcoal-100) !important;
}

.ennu-fc-dark .toolbar-group.toolbar-actions #btn-upload-photo:hover,
.theme-dark .toolbar-group.toolbar-actions #btn-upload-photo:hover {
  background: rgba(201, 169, 98, 0.25) !important;
  border-color: var(--luxury-gold) !important;
}

/* Unified Toggle Buttons */
.btn-unified-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  min-height: var(--touch-target-min);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-unified-toggle:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-unified-toggle[aria-expanded="true"],
.btn-unified-toggle.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-gold);
}

.btn-unified-toggle svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.btn-text {
  display: inline;
}

/* Title Compact - Non-prefixed version */
.title-compact {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* Sidebar show/open states - MUST override hidden states */
.face-chart-sidebar.show,
.face-chart-sidebar.open {
  transform: translateX(0) !important;
  visibility: visible !important;
  display: block !important;
}

/* Sidebar backdrop show state */
#sidebar-backdrop.show,
#sidebar-backdrop.active,
.ennu-fc-sidebar-backdrop.show,
.ennu-fc-sidebar-backdrop.active {
  opacity: 1;
  visibility: visible;
  z-index: 450; /* Below sidebars (500) and header (600) - header remains clickable */
}

/* Ensure sidebars always appear ABOVE the backdrop */
.face-chart-sidebar {
  z-index: 500 !important; /* Higher than backdrop (450) */
}

.face-chart-sidebar.show,
.face-chart-sidebar.open {
  z-index: 500 !important;
}

/* Secondary Button - Luxury Style */
.ennu-fc-btn-secondary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  min-height: 48px;
  background: var(--clinical-white);
  border: 2px solid #1A2744;
  border-radius: var(--radius-lg);
  color: #1A2744;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}

.ennu-fc-btn-secondary:hover,
.btn-secondary:hover {
  background: #1A2744;
  border-color: #1A2744;
  color: var(--clinical-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 39, 68, 0.15);
}

.ennu-fc-btn-secondary:active,
.btn-secondary:active {
  transform: translateY(0);
}

/* Primary Button - Luxury Gold Gradient */
.ennu-fc-btn-primary,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  min-height: 56px;
  background: linear-gradient(135deg, #C9A962 0%, #E5D4A1 50%, #C9A962 100%);
  border: none;
  border-radius: var(--radius-lg);
  color: #1A2744;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 20px rgba(201, 169, 98, 0.25);
  position: relative;
  overflow: hidden;
}

/* Shimmer effect */
.ennu-fc-btn-primary::before,
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  pointer-events: none;
}

.ennu-fc-btn-primary:hover,
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201, 169, 98, 0.4);
}

.ennu-fc-btn-primary:active,
.btn-primary:active {
  transform: translateY(0);
}

/* Danger Button - Luxury Style */
.ennu-fc-btn-danger,
.btn-danger {
  background: #FDEDEF;
  border: 2px solid #B8505A;
  color: #B8505A;
  padding: var(--space-3) var(--space-5);
  min-height: 48px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  cursor: pointer;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.ennu-fc-btn-danger:hover,
.btn-danger:hover {
  background: #B8505A;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(184, 80, 90, 0.25);
}

/* ==========================================================================
   SIDEBAR TOOLS - Modern Panel Styling
   ========================================================================== */

/* Tool Section - Non-prefixed version */
.tool-section {
  margin-bottom: var(--space-6);
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.tool-section:first-child {
  padding-top: 0;
}

.tool-section h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 var(--space-3) 0;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
}

/* Section icons via pseudo-elements */
.tool-section h3::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.7;
}

/* Tool Buttons Grid - 2 equal columns across full width */
.tool-buttons,
.sidebar-content .tool-buttons,
.face-chart-sidebar .tool-buttons {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Tool Button - Non-prefixed version */
.tool-btn,
.sidebar-content .tool-btn,
.face-chart-sidebar .tool-btn,
.tool-buttons .tool-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--space-2);
  padding: var(--space-4) !important;
  min-height: 88px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  flex: 1 1 auto !important;
  background: var(--bg-elevated);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all var(--transition-normal);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  box-sizing: border-box !important;
}

.tool-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-default);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.tool-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-gold);
}

.tool-btn svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.75;
}

.tool-btn.active svg {
  stroke: currentColor;
}

.tool-btn span {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
}

/* Sidebar Form Elements */
.face-chart-sidebar .ennu-fc-form-group,
.face-chart-sidebar .form-group {
  margin-bottom: var(--space-4);
}

.face-chart-sidebar label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.face-chart-sidebar input[type="text"],
.face-chart-sidebar input[type="datetime-local"],
.face-chart-sidebar input[type="date"],
.face-chart-sidebar input[type="number"],
.face-chart-sidebar select,
.face-chart-sidebar textarea {
  width: 100%;
  padding: var(--space-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.face-chart-sidebar input:focus,
.face-chart-sidebar select:focus,
.face-chart-sidebar textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.face-chart-sidebar textarea {
  min-height: 80px;
  resize: vertical;
}

/* Range Slider Styling */
.face-chart-sidebar input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  border: none;
  padding: 0;
}

.face-chart-sidebar input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--accent-primary);
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: var(--shadow-sm);
}

.face-chart-sidebar input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--accent-primary);
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: var(--shadow-sm);
}

/* Color Picker in Sidebar */
.face-chart-sidebar input[type="color"] {
  width: 100%;
  height: 44px;
  border: 2px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 2px;
}

.face-chart-sidebar input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.face-chart-sidebar input[type="color"]::-webkit-color-swatch {
  border-radius: var(--radius-sm);
  border: none;
}

/* Block Button in Sidebar */
.btn-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3);
  min-height: var(--touch-target-min);
  background: var(--bg-tertiary);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-block:hover {
  background: var(--accent-subtle);
  border-color: var(--accent-primary);
  border-style: solid;
  color: var(--accent-primary);
}

/* Treatments List */
.treatments-list {
  margin-top: var(--space-3);
}

.treatments-list:empty::before {
  content: "No treatments added yet";
  display: block;
  text-align: center;
  padding: var(--space-4);
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  font-style: italic;
}

/* Order Display in Sidebar */
.sidebar-order-display {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  font-size: var(--text-sm);
}

.loading-order {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4);
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}

.loading-order::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-default);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Help Text */
.help-text,
.ennu-fc-form-text,
.text-muted {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* Treatment/Billing Panel */
.treatment-billing-panel,
.ennu-fc-treatment-billing-panel {
  display: none;
  flex-direction: column;
  width: 100%;
  padding: var(--space-6);
  background: var(--bg-primary);
  overflow-y: auto;
}

.treatment-billing-panel.active,
.ennu-fc-treatment-billing-panel.active {
  display: flex;
}

.billing-section,
.ennu-fc-billing-section {
  margin-bottom: var(--space-8);
  padding: var(--space-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.billing-section h2,
.ennu-fc-billing-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin: 0 0 var(--space-4) 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.services-instruction {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

/* Order Display Panel */
.ennu-order-display {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

/* Services Panel */
.ennu-services-panel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}

/* ==========================================================================
   MODAL OVERLAYS - Modern Dialog Styling
   ========================================================================== */

.ennu-fc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 30, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.ennu-fc-modal-overlay.active {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.ennu-fc-modal-content {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-6);
  animation: modalSlideIn var(--duration-slow) var(--ease-out);
}

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

.modal-wizard {
  max-width: 700px;
  padding: 0;
}

.wizard-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.wizard-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin: 0 0 var(--space-4) 0;
}

.wizard-steps {
  display: flex;
  gap: var(--space-4);
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  transition: all var(--transition-normal);
}

.wizard-step.active {
  background: var(--accent-primary);
  color: var(--text-inverse);
}

.wizard-step.completed {
  background: var(--success-light);
  color: var(--success-emerald);
}

/* ==========================================================================
   COMPLETE OPTIONS MODAL - Session Completion Choices
   ========================================================================== */

#complete-options-modal {
  z-index: 10000; /* Above everything */
}

.modal-complete-options {
  max-width: 520px;
  padding: 0;
  text-align: center;
  border-radius: 24px;
  overflow: hidden;
}

.complete-modal-header {
  padding: 32px 24px 24px;
  background: linear-gradient(135deg, #1A1A1E 0%, #2D2D33 100%);
  color: #FFFFFF;
}

.complete-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #2E7D32 0%, #43A047 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 4px 20px rgba(46, 125, 50, 0.4);
  transition: all 0.3s ease;
}

/* Dynamic icon states for session actions */
.complete-icon.icon-complete {
  background: linear-gradient(135deg, #2E7D32 0%, #43A047 100%);
  box-shadow: 0 4px 20px rgba(46, 125, 50, 0.4);
}

.complete-icon.icon-pause {
  background: linear-gradient(135deg, #c5a35c 0%, #d4b76a 100%);
  box-shadow: 0 4px 20px rgba(197, 163, 92, 0.4);
}

.complete-icon.icon-cancel {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4);
}

.complete-modal-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
}

.complete-subtitle {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.complete-options-grid {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.complete-option-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 20px;
  background: #FFFFFF;
  border: 2px solid #E5E5E8;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.complete-option-btn:hover {
  border-color: #C9A962;
  background: rgba(201, 169, 98, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(201, 169, 98, 0.15);
}

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

.complete-option-btn.option-primary {
  background: linear-gradient(135deg, rgba(201, 169, 98, 0.1) 0%, rgba(201, 169, 98, 0.05) 100%);
  border-color: rgba(201, 169, 98, 0.3);
}

.complete-option-btn.option-primary:hover {
  background: linear-gradient(135deg, #C9A962 0%, #A88B4A 100%);
  border-color: transparent;
  box-shadow: 0 6px 24px rgba(201, 169, 98, 0.35);
}

.complete-option-btn.option-primary:hover .option-icon,
.complete-option-btn.option-primary:hover .option-title,
.complete-option-btn.option-primary:hover .option-description {
  color: #FFFFFF;
}

.complete-option-btn.option-primary:hover .option-icon svg {
  stroke: #FFFFFF;
}

.option-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #F5F3EF 0%, #EDEAE4 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1A1A1E;
  transition: all 0.2s ease;
}

.option-icon svg {
  stroke: #1A1A1E;
  transition: stroke 0.2s ease;
}

.option-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.option-title {
  font-size: 16px;
  font-weight: 600;
  color: #1A1A1E;
  transition: color 0.2s ease;
}

.option-description {
  font-size: 13px;
  color: #6B6B73;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.complete-modal-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid #E5E5E8;
}

.complete-modal-footer .ennu-fc-btn-secondary {
  width: 100%;
  padding: 14px 24px;
  font-size: 15px;
}

/* Dark mode for complete options modal */
.theme-dark .modal-complete-options {
  background: #1A1A1E;
}

.theme-dark .complete-option-btn {
  background: #26262B;
  border-color: #3D3D44;
}

.theme-dark .complete-option-btn:hover {
  border-color: #C9A962;
  background: rgba(201, 169, 98, 0.1);
}

.theme-dark .option-icon {
  background: linear-gradient(135deg, #3D3D44 0%, #2D2D33 100%);
}

.theme-dark .option-icon svg {
  stroke: #E5E5E8;
}

.theme-dark .option-title {
  color: #E5E5E8;
}

.theme-dark .option-description {
  color: #8B8B93;
}

.theme-dark .complete-modal-footer {
  border-top-color: #3D3D44;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .modal-complete-options {
    max-width: 100%;
    margin: 16px;
    border-radius: 20px;
  }
  
  .complete-modal-header {
    padding: 24px 20px 20px;
  }
  
  .complete-icon {
    width: 56px;
    height: 56px;
    font-size: 28px;
  }
  
  .complete-modal-header h2 {
    font-size: 20px;
  }
  
  .complete-options-grid {
    padding: 20px;
    gap: 10px;
  }
  
  .complete-option-btn {
    padding: 14px 16px;
    gap: 12px;
  }
  
  .option-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }
  
  .option-icon svg {
    width: 24px;
    height: 24px;
  }
  
  .option-title {
    font-size: 15px;
  }
  
  .option-description {
    font-size: 12px;
  }
  
  .complete-modal-footer {
    padding: 12px 20px 20px;
  }
}

/* ==========================================================================
   PATIENT SEARCH - Wizard Patient Selection
   ========================================================================== */

.patient-search-group {
  margin-bottom: var(--space-4);
}

.patient-search-container {
  position: relative;
}

.patient-search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.patient-search-input {
  padding-left: 40px !important;
  padding-right: 40px !important;
}

.search-icon,
.search-spinner {
  position: absolute;
  left: 12px;
  color: #8B8B93;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-spinner {
  left: 12px;
}

.search-spinner .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

/* Patient Search Results Dropdown */
.patient-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background: #FFFFFF;
  border: 1px solid #E5E5E8;
  border-top: none;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 1000;
}

.patient-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.patient-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid #F0F0F3;
}

.patient-result-item:last-child {
  border-bottom: none;
}

.patient-result-item:hover {
  background: rgba(201, 169, 98, 0.08);
}

.patient-avatar-small {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #E8E6E1 0%, #D8D6D1 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.patient-avatar-small svg {
  stroke: #6B6B73;
}

.patient-result-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.patient-result-info strong {
  font-size: 14px;
  font-weight: 600;
  color: #1A1A1E;
}

.patient-result-info span {
  font-size: 12px;
  color: #6B6B73;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.patient-result-info .patient-phone {
  color: #8B8B93;
}

.no-results {
  padding: 20px 16px;
  text-align: center;
  color: #6B6B73;
}

.no-results p {
  margin: 0 0 12px 0;
  font-size: 14px;
}

.btn-create-from-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #C9A962 0%, #A88B4A 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-create-from-search:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201, 169, 98, 0.3);
}

.search-error {
  padding: 16px;
  text-align: center;
  color: #D32F2F;
  font-size: 13px;
}

/* Selected Patient Display */
.selected-patient-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(201, 169, 98, 0.1) 0%, rgba(201, 169, 98, 0.05) 100%);
  border: 2px solid rgba(201, 169, 98, 0.3);
  border-radius: 12px;
  margin-top: 8px;
}

.selected-patient-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.patient-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #C9A962 0%, #A88B4A 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.patient-avatar svg {
  stroke: #FFFFFF;
}

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

.patient-details strong {
  font-size: 15px;
  font-weight: 600;
  color: #1A1A1E;
}

.patient-details span {
  font-size: 13px;
  color: #6B6B73;
}

.btn-change-patient {
  width: 32px;
  height: 32px;
  background: #FFFFFF;
  border: 1px solid #E5E5E8;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-change-patient:hover {
  background: #F5F3EF;
  border-color: #D0D0D5;
}

.btn-change-patient svg {
  stroke: #6B6B73;
}

/* Add New Patient Button */
.btn-add-new-patient {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  margin-top: 12px;
  background: transparent;
  border: 2px dashed #C9A962;
  border-radius: 12px;
  color: #C9A962;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-add-new-patient:hover {
  background: rgba(201, 169, 98, 0.08);
  border-style: solid;
}

.btn-add-new-patient svg {
  stroke: currentColor;
}

/* ==========================================================================
   ADD PATIENT MODAL
   ========================================================================== */

#add-patient-modal {
  z-index: 10001;
}

.modal-add-patient {
  max-width: 500px;
  padding: 0;
  border-radius: 20px;
  overflow: hidden;
}

.add-patient-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: linear-gradient(135deg, #1A1A1E 0%, #2D2D33 100%);
  color: #FFFFFF;
}

.add-patient-header h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.add-patient-header h2 svg {
  stroke: #C9A962;
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-close-btn svg {
  stroke: #FFFFFF;
}

.add-patient-form {
  padding: 24px;
}

.add-patient-form .form-section {
  margin-bottom: 24px;
}

.add-patient-form .form-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: #6B6B73;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #E5E5E8;
}

.add-patient-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.add-patient-form .ennu-fc-form-group {
  margin-bottom: 16px;
}

.add-patient-form .ennu-fc-form-group:last-child {
  margin-bottom: 0;
}

.add-patient-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #3D3D44;
}

.add-patient-form input[type="text"],
.add-patient-form input[type="email"],
.add-patient-form input[type="tel"] {
  width: 100%;
  padding: 12px 14px;
  background: #FFFFFF;
  border: 2px solid #E5E5E8;
  border-radius: 10px;
  font-size: 15px;
  color: #1A1A1E;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.add-patient-form input:focus {
  border-color: #C9A962;
  outline: none;
  box-shadow: 0 0 0 4px rgba(201, 169, 98, 0.15);
}

.add-patient-form input::placeholder {
  color: #B0B0B5;
}

/* Appointment Preview */
.appointment-section .help-text {
  font-size: 13px;
  color: #6B6B73;
  margin: -8px 0 16px 0;
}

.appointment-preview {
  background: #F8F7F5;
  border-radius: 12px;
  padding: 16px;
}

.preview-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #E5E5E8;
}

.preview-item:last-child {
  border-bottom: none;
}

.preview-label {
  font-size: 13px;
  color: #6B6B73;
}

.preview-value {
  font-size: 14px;
  font-weight: 600;
  color: #1A1A1E;
}

/* Form Actions */
.add-patient-form .form-actions {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #E5E5E8;
}

.add-patient-form .form-actions .ennu-fc-btn-secondary {
  flex: 1;
  padding: 14px 20px;
  font-size: 15px;
}

.add-patient-form .form-actions .ennu-fc-btn-primary {
  flex: 2;
  padding: 14px 20px;
  font-size: 15px;
}

.add-patient-form .form-actions .btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Success State */
.add-patient-success {
  padding: 48px 24px;
  text-align: center;
}

.add-patient-success .success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #2E7D32 0%, #43A047 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(46, 125, 50, 0.3);
}

.add-patient-success h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1A1A1E;
  margin: 0 0 12px 0;
}

.add-patient-success p {
  font-size: 14px;
  color: #6B6B73;
  margin: 0;
  line-height: 1.5;
}

/* Dark Mode for Patient Search */
.theme-dark .patient-search-results {
  background: #26262B;
  border-color: #3D3D44;
}

.theme-dark .patient-result-item {
  border-color: #3D3D44;
}

.theme-dark .patient-result-item:hover {
  background: rgba(201, 169, 98, 0.15);
}

.theme-dark .patient-avatar-small {
  background: linear-gradient(135deg, #3D3D44 0%, #2D2D33 100%);
}

.theme-dark .patient-result-info strong {
  color: #E5E5E8;
}

.theme-dark .patient-result-info span {
  color: #8B8B93;
}

.theme-dark .selected-patient-display {
  background: rgba(201, 169, 98, 0.1);
  border-color: rgba(201, 169, 98, 0.3);
}

.theme-dark .patient-details strong {
  color: #E5E5E8;
}

.theme-dark .patient-details span {
  color: #8B8B93;
}

.theme-dark .btn-change-patient {
  background: #3D3D44;
  border-color: #4D4D54;
}

.theme-dark .btn-change-patient:hover {
  background: #4D4D54;
}

.theme-dark .modal-add-patient {
  background: #1A1A1E;
}

.theme-dark .add-patient-form .form-section h3 {
  color: #8B8B93;
  border-color: #3D3D44;
}

.theme-dark .add-patient-form label {
  color: #B0B0B5;
}

.theme-dark .add-patient-form input {
  background: #26262B;
  border-color: #3D3D44;
  color: #E5E5E8;
}

.theme-dark .add-patient-form input:focus {
  border-color: #C9A962;
}

.theme-dark .appointment-preview {
  background: #26262B;
}

.theme-dark .preview-item {
  border-color: #3D3D44;
}

.theme-dark .preview-value {
  color: #E5E5E8;
}

.theme-dark .add-patient-form .form-actions {
  border-color: #3D3D44;
}

.theme-dark .add-patient-success h3 {
  color: #E5E5E8;
}

/* Mobile Responsive for Patient Search */
@media (max-width: 600px) {
  .add-patient-form .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .add-patient-form .form-actions {
    flex-direction: column-reverse;
  }

  .add-patient-form .form-actions .ennu-fc-btn-secondary,
  .add-patient-form .form-actions .ennu-fc-btn-primary {
    flex: none;
    width: 100%;
  }
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-weight: var(--font-semibold);
  font-size: var(--text-xs);
}

.wizard-step.active .step-number {
  background: rgba(255, 255, 255, 0.3);
}

.step-label {
  font-weight: var(--font-medium);
}

.wizard-panel {
  padding: var(--space-6);
}

.wizard-panel h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin: 0 0 var(--space-2) 0;
}

.wizard-panel .help-text {
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

/* ==========================================================================
   FORM ELEMENTS - Polished Inputs
   ========================================================================== */

.ennu-fc-form-group {
  margin-bottom: var(--space-4);
}

.ennu-fc-form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.ennu-fc-form-group label .required {
  color: var(--error-rose);
}

.ennu-fc-form-control {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.ennu-fc-form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.ennu-fc-form-control:disabled,
.ennu-fc-form-control[readonly] {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: not-allowed;
}

/* Primary Button */
.ennu-fc-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  min-height: var(--touch-target-min);
  background: linear-gradient(135deg, var(--luxury-gold) 0%, var(--luxury-gold-dark) 100%);
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-inverse);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-gold);
}

.ennu-fc-btn-primary:hover {
  background: linear-gradient(135deg, var(--luxury-gold-light) 0%, var(--luxury-gold) 100%);
  box-shadow: var(--shadow-gold-lg);
  transform: translateY(-1px);
}

.ennu-fc-btn-primary:active {
  transform: translateY(0);
}

/* Secondary Button */
.ennu-fc-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  min-height: var(--touch-target-min);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.ennu-fc-btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Patient Info Panel */
.patient-info-panel {
  margin-top: var(--space-3);
  padding: var(--space-4);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.patient-info-loading {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}

.patient-info-loading .dashicons {
  animation: spin 1s linear infinite;
}

/* Notes History */
.notes-history {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-height: 150px;
  overflow-y: auto;
}

/* ==========================================================================
   UTILITY CLASSES - WordPress Compliant (No Inline Styles)
   ========================================================================== */

/* Display utilities */
.hidden,
.is-hidden,
.display-none {
  display: none !important;
}

.visible,
.is-visible {
  display: block !important;
}

/* Modal sizes */
.modal-sm {
  max-width: 500px !important;
}

.modal-lg {
  max-width: 900px !important;
}

/* Spacing utilities */
.mt-4 {
  margin-top: 20px !important;
}

.mb-3 {
  margin-bottom: 12px !important;
}

.mb-4 {
  margin-bottom: 20px !important;
}

.mt-8 {
  margin-top: 40px !important;
}

.p-3 {
  padding: 15px !important;
}

.p-2 {
  padding: 10px !important;
}

/* Text utilities */
.text-muted {
  color: var(--text-tertiary) !important;
}

.text-sm {
  font-size: var(--text-sm) !important;
}

.text-xs {
  font-size: var(--text-xs) !important;
}

.text-primary {
  color: var(--accent-primary) !important;
}

.text-success {
  color: var(--success-emerald) !important;
}

.text-warning {
  color: var(--warning-amber) !important;
}

.text-danger {
  color: var(--error-rose) !important;
}

/* Notes history panel */
.notes-history {
  max-height: 150px;
  overflow-y: auto;
  background: var(--bg-tertiary);
  padding: 10px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}

/* Wizard panel hidden state */
.wizard-panel[data-panel] {
  display: none;
}

.wizard-panel.active,
.wizard-panel[data-panel="1"] {
  display: block;
}

/* Wizard loading overlay */
.wizard-loading-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.wizard-loading-overlay.active {
  display: flex;
}

/* Theme icon visibility */
.theme-icon-dark {
  display: none;
}

.theme-dark .theme-icon-light {
  display: none;
}

.theme-dark .theme-icon-dark {
  display: block !important;
}

/* Delete annotation button */
#btn-delete-annotation {
  display: none;
}

#btn-delete-annotation.visible {
  display: inline-flex;
}

/* Canvas precision cursor */
.canvas-precision-cursor {
  display: none;
  position: absolute;
  pointer-events: none;
}

.canvas-precision-cursor.active {
  display: block;
}

/* Draw settings panel */
#draw-settings {
  display: none;
}

#draw-settings.active {
  display: block;
}

/* Mode panels */
.treatment-billing-panel,
.tip-panel,
.notes-panel,
.refer-panel {
  display: none;
}

.treatment-billing-panel.active,
.tip-panel.active,
.notes-panel.active,
.refer-panel.active {
  display: block;
}

/* Tip provider description */
.tip-provider-description {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-bottom: 12px;
}

/* Assigned provider info box */
.assigned-provider-info {
  background: var(--info-light);
  border-left: 4px solid var(--info-sapphire);
  padding: 15px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.assigned-provider-info h3 {
  margin: 0 0 8px 0;
  color: var(--info-sapphire);
  font-size: var(--text-md);
}

.assigned-provider-info p {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.assigned-provider-info .provider-role {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  display: block;
  margin-top: 4px;
}

/* Tip split section */
#tip-split-section,
#tip-assigned-provider-section {
  display: none;
}

#tip-split-section.active,
#tip-assigned-provider-section.active {
  display: block;
}

/* Microphone permission status */
.microphone-permission-status {
  margin-bottom: 15px;
  padding: 10px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Referral forms */
.referral-form {
  display: none;
}

.referral-form.active {
  display: block;
}

/* Notes panel intro */
.notes-panel-intro {
  color: var(--text-secondary);
  margin-bottom: 30px;
}

/* Voice notes history */
.voice-notes-history {
  margin-top: 40px;
}

.voice-notes-history h3 {
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-subtle);
}

/* Photo input hidden */
#photo-input {
  display: none;
}

/* Products grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
}

/* Treatment step panels */
.treatment-step {
  display: none;
}

.treatment-step.active {
  display: block;
}

/* Selected product card - enhanced */
.selected-product-card {
  display: none;
  background: var(--bg-tertiary);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 1px solid var(--border-subtle);
}

.selected-product-card.active {
  display: block;
}

.selected-product-card .product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.selected-product-card .product-info-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.selected-product-card .product-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

.selected-product-card .product-description {
  margin: 8px 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.4;
}

.selected-product-card .btn-change {
  padding: 6px 12px;
  font-size: var(--text-xs);
  flex-shrink: 0;
}

/* Product price display in card */
.product-price-display {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.product-price-display .price-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.product-price-display .currency-prefix {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--accent-gold);
}

#treatment-price-value {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--accent-gold);
}

.product-price-display .price-unit-label {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* Treatment type badge */
.treatment-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  background: var(--accent-gold-light, rgba(197, 163, 92, 0.15));
  color: var(--accent-gold);
  border-radius: var(--radius-full);
  text-transform: capitalize;
}

.treatment-type-badge:empty {
  display: none;
}

/* Quantity stepper wrapper */
.quantity-stepper-group {
  margin-bottom: 16px;
}

.quantity-stepper-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-tertiary);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

/* Quantity +/- buttons */
.qty-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  background: var(--bg-primary);
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-md);
  color: var(--accent-gold);
  font-size: 20px;
  font-weight: var(--font-bold);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.qty-btn:hover {
  background: var(--accent-gold);
  color: var(--text-on-gold, #fff);
}

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

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

/* Slider container */
.quantity-slider-container {
  flex: 1;
  min-width: 80px;
}

.quantity-stepper-wrapper .quantity-slider {
  width: 100%;
}

/* Quantity value display */
.quantity-stepper-wrapper .quantity-value-display {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantity-stepper-wrapper .quantity-number-input {
  width: 60px;
  text-align: center;
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 8px;
}

.quantity-stepper-wrapper .quantity-unit-select {
  min-height: 40px;
  padding: 8px 12px;
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
}

/* Treatment optional sections (accordions) */
.treatment-optional-sections {
  margin-top: 20px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}

.treatment-accordion {
  margin-bottom: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.treatment-accordion .accordion-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: none;
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  text-align: left;
  transition: background 0.15s ease;
}

.treatment-accordion .accordion-toggle:hover {
  background: var(--bg-secondary);
}

.treatment-accordion.expanded .accordion-toggle {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.treatment-accordion .accordion-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

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

.treatment-accordion.expanded .accordion-icon {
  transform: rotate(45deg);
}

.treatment-accordion .accordion-label {
  flex: 1;
}

.treatment-accordion .note-indicator,
.treatment-accordion .provider-indicator {
  display: flex;
  align-items: center;
  color: var(--accent-gold);
}

.treatment-accordion .accordion-content {
  display: none;
  padding: 16px;
  background: var(--bg-primary);
}

.treatment-accordion.expanded .accordion-content {
  display: block;
}

.treatment-accordion #treatment-notes {
  width: 100%;
  min-height: 60px;
  resize: vertical;
}

.treatment-accordion .secondary-provider-select {
  width: 100%;
  min-height: 44px;
  margin-bottom: 8px;
}

/* Form row grid */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

/* Treatment area select */
#treatment-area {
  min-height: 120px;
  padding: 8px;
}

/* Back button in treatment modal */
#btn-back-to-products {
  display: none;
}

#btn-back-to-products.visible {
  display: inline-flex;
}

#btn-confirm-treatment {
  display: none;
}

#btn-confirm-treatment.visible {
  display: inline-flex;
}

/* Error message box */
.error-message {
  background: var(--error-light);
  border: 1px solid var(--error-rose);
  padding: 20px;
  border-radius: var(--radius-md);
  text-align: center;
}

.error-message h4 {
  margin: 0 0 10px 0;
  color: var(--error-rose);
  font-size: var(--text-lg);
}

.error-message p {
  margin: 0;
  color: var(--error-rose);
  font-size: var(--text-sm);
}

/* Accordion content */
.accordion-content {
  display: none;
}

.accordion-content.active {
  display: block;
}

/* Note items in history */
.note-item {
  margin-bottom: 8px;
}

.note-timestamp {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.note-content {
  font-size: var(--text-sm);
  margin-left: 10px;
}

/* Status icons */
.status-icon {
  display: inline-flex;
  align-items: center;
}

.status-icon.success {
  color: var(--success-emerald);
}

.status-icon.warning {
  color: var(--warning-amber);
}

.status-icon.danger {
  color: var(--error-rose);
}

/* Score display */
.score-value {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--info-sapphire);
}

/* Wizard buttons visibility */
.wizard-back {
  display: none;
}

.wizard-back.visible {
  display: inline-flex;
}

.wizard-finish {
  display: none;
}

.wizard-finish.visible {
  display: inline-flex;
}

/* View patient info button */
#wizard-view-patient-info {
  display: none;
}

#wizard-view-patient-info.visible {
  display: inline-flex;
}

/* Patient info panel */
#wizard-patient-info-panel {
  display: none;
}

#wizard-patient-info-panel.active {
  display: block;
}

/* Notes history display */
#wizard-notes-history {
  display: none;
}

#wizard-notes-history.active {
  display: block;
}

#wizard-no-notes-message {
  display: none;
  color: var(--text-tertiary);
}

#wizard-no-notes-message.visible {
  display: block;
}

/* ==========================================================================
   PRINT LAYOUT - Multi-Page Professional Print
   ========================================================================== */

/* Hide print layout on screen */
.ennu-fc-print-only {
  display: none !important;
  visibility: hidden;
}

@media print {
  /* -------------------------------------------------------------------------
     Force Print Colors and Reset Defaults
     ------------------------------------------------------------------------- */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  /* Hide links' URLs after content */
  a[href]::after {
    content: none !important;
  }

  /* -------------------------------------------------------------------------
     Hide Sensitive Information for Patient Copies
     Items marked with .print-sensitive-info are hidden by default
     Add .print-show-sensitive to body to reveal (for internal copies)
     ------------------------------------------------------------------------- */
  .print-sensitive-info {
    display: none !important;
    visibility: hidden !important;
  }
  
  /* When body has .print-show-sensitive class, show sensitive info (provider copies) */
  body.print-show-sensitive .print-sensitive-info {
    display: table-row !important;
    visibility: visible !important;
  }
  
  body.print-show-sensitive div.print-sensitive-info {
    display: block !important;
    visibility: visible !important;
  }

  /* -------------------------------------------------------------------------
     Hide Screen Elements, Show Print Layout
     ------------------------------------------------------------------------- */
  .ennu-fc-print-only {
    display: block !important;
    visibility: visible !important;
  }

  .ennu-face-chart-container,
  .face-chart-header,
  .face-chart-content,
  .face-chart-sidebar,
  .face-chart-canvas-area,
  .ennu-fc-canvas-toolbar,
  .ennu-fc-sidebar-backdrop,
  .ennu-modal,
  .wizard-modal,
  .admin-bar,
  #wpadminbar,
  .elementor-location-header,
  .elementor-location-footer,
  header,
  footer,
  nav,
  aside {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  body {
    background: white !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* -------------------------------------------------------------------------
     Print Layout Container
     ------------------------------------------------------------------------- */
  #print-layout {
    display: block !important;
    visibility: visible !important;
    position: relative;
    width: 100%;
    background: white;
    color: #000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 11pt;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
  }

  /* -------------------------------------------------------------------------
     Print Pages - Page Break Control
     ------------------------------------------------------------------------- */
  .print-page {
    position: relative;
    page-break-after: always;
    break-after: page;
    page-break-inside: avoid;
    break-inside: avoid;
    padding: 0.25in;
    min-height: 9.5in;
    max-height: 10in;
    box-sizing: border-box;
    background: white;
    overflow: hidden;
  }

  .print-page:last-of-type {
    page-break-after: auto;
    break-after: auto;
  }

  /* Orphan and widow control */
  .print-page p,
  .print-page li,
  .print-page tr {
    orphans: 3;
    widows: 3;
  }

  /* -------------------------------------------------------------------------
     Print Header
     ------------------------------------------------------------------------- */
  .print-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
    page-break-after: avoid;
    break-after: avoid;
  }

  .print-logo {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    flex-shrink: 0;
  }

  .print-header h1 {
    font-size: 22pt;
    font-weight: 600;
    margin: 0;
    padding: 0;
    color: #1a1a1a;
    flex: 1;
  }

  .print-header h2 {
    font-size: 18pt;
    font-weight: 600;
    margin: 0;
    padding: 0;
    color: #1a1a1a;
    flex: 1;
  }

  /* -------------------------------------------------------------------------
     Print Sections
     ------------------------------------------------------------------------- */
  .print-section {
    margin-bottom: 20px;
    page-break-inside: avoid;
    break-inside: avoid;
  }

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

  .print-section h3 {
    font-size: 13pt;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
    page-break-after: avoid;
    break-after: avoid;
  }

  /* -------------------------------------------------------------------------
     Print Info Tables
     ------------------------------------------------------------------------- */
  .print-info-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 10pt;
    border: 1px solid #ddd;
    margin-bottom: 5px;
  }

  .print-info-table tr {
    border-bottom: 1px solid #ddd;
  }

  .print-info-table tr:last-child {
    border-bottom: none;
  }

  .print-info-table td {
    padding: 8px 12px;
    vertical-align: top;
    border-right: 1px solid #eee;
  }

  .print-info-table td:last-child {
    border-right: none;
  }

  .print-info-table td.label {
    width: 160px;
    min-width: 140px;
    font-weight: 600;
    color: #444;
    background-color: #f5f5f5 !important;
    white-space: nowrap;
  }

  .print-info-table td.value {
    color: #1a1a1a;
    background-color: white !important;
    word-break: break-word;
  }

  .print-info-table td.value:empty::after {
    content: '\2014';
    color: #999;
  }

  /* -------------------------------------------------------------------------
     Print Notes
     ------------------------------------------------------------------------- */
  .print-notes {
    background-color: #f9f9f9 !important;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    min-height: 60px;
    font-size: 10pt;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    color: #333;
  }

  .print-notes:empty::after {
    content: 'No notes recorded.';
    color: #999;
    font-style: italic;
  }

  /* -------------------------------------------------------------------------
     Print Canvas Page
     ------------------------------------------------------------------------- */
  .print-page-canvas {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .print-page-canvas .print-header {
    width: 100%;
  }

  .print-canvas-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    margin-top: 10px;
    width: 100%;
  }

  #print-canvas {
    max-width: 100%;
    max-height: 8.5in;
    width: auto;
    height: auto;
    border: 1px solid #ccc;
    box-shadow: none;
    background: white;
  }

  /* -------------------------------------------------------------------------
     Print Treatments List
     ------------------------------------------------------------------------- */
  #print-treatments-list {
    font-size: 10pt;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
  }

  #print-treatments-list:empty::after {
    content: 'No treatments recorded.';
    display: block;
    padding: 15px;
    color: #999;
    font-style: italic;
    text-align: center;
  }

  #print-treatments-list .treatment-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  #print-treatments-list .treatment-item:last-child {
    border-bottom: none;
  }

  #print-treatments-list .treatment-item:nth-child(odd) {
    background-color: #f9f9f9 !important;
  }

  #print-treatments-list .treatment-item:nth-child(even) {
    background-color: white !important;
  }

  #print-treatments-list .treatment-name {
    font-weight: 600;
    color: #333;
    flex: 1;
  }

  #print-treatments-list .treatment-details {
    color: #666;
    font-size: 9pt;
    text-align: right;
    margin-left: 15px;
  }

  #print-treatments-list .treatment-zone {
    display: inline-block;
    background-color: #e8e8e8 !important;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 9pt;
    color: #555;
    margin-left: 8px;
  }

  /* -------------------------------------------------------------------------
     Print Annotations List
     ------------------------------------------------------------------------- */
  #print-annotations-list {
    font-size: 10pt;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
  }

  #print-annotations-list:empty::after {
    content: 'No annotations recorded.';
    display: block;
    padding: 15px;
    color: #999;
    font-style: italic;
    text-align: center;
  }

  #print-annotations-list .annotation-item {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  #print-annotations-list .annotation-item:last-child {
    border-bottom: none;
  }

  #print-annotations-list .annotation-item:nth-child(odd) {
    background-color: #f9f9f9 !important;
  }

  #print-annotations-list .annotation-item:nth-child(even) {
    background-color: white !important;
  }

  #print-annotations-list .annotation-number {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background-color: #333 !important;
    color: white !important;
    border-radius: 50%;
    font-weight: 600;
    font-size: 9pt;
    margin-right: 10px;
    vertical-align: middle;
  }

  #print-annotations-list .annotation-text {
    display: inline;
    color: #333;
    vertical-align: middle;
  }

  #print-annotations-list .annotation-position {
    display: block;
    margin-top: 5px;
    margin-left: 34px;
    color: #888;
    font-size: 9pt;
  }

  /* -------------------------------------------------------------------------
     Print Footer - Fixed Position on All Pages
     ------------------------------------------------------------------------- */
  .print-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 9pt;
    color: #666;
    background-color: white !important;
    border-top: 1px solid #ddd;
    padding: 10px 0.5in;
    z-index: 1000;
  }

  .print-footer p {
    margin: 0;
    padding: 0;
    line-height: 1.4;
  }

  .print-footer br {
    line-height: 1.2;
  }

  /* -------------------------------------------------------------------------
     Signature Lines (if needed)
     ------------------------------------------------------------------------- */
  .print-signature-line {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 10px;
  }

  .print-signature-block {
    width: 45%;
    text-align: center;
  }

  .print-signature-block .signature-line {
    border-top: 1px solid #333;
    margin-bottom: 5px;
    height: 40px;
  }

  .print-signature-block .signature-label {
    font-size: 9pt;
    color: #666;
  }

  /* -------------------------------------------------------------------------
     Utility Classes for Print
     ------------------------------------------------------------------------- */
  .print-no-break {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .print-break-before {
    page-break-before: always !important;
    break-before: page !important;
  }

  .print-break-after {
    page-break-after: always !important;
    break-after: page !important;
  }

  .print-hide {
    display: none !important;
    visibility: hidden !important;
  }

  .print-show {
    display: block !important;
    visibility: visible !important;
  }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

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

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --border-subtle: var(--charcoal-400);
    --border-default: var(--charcoal-500);
    --border-strong: var(--charcoal-600);
  }
}

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

/* Skip link */
.ennu-fc-skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--accent-primary);
  color: var(--text-inverse);
  border-radius: var(--radius-md);
  font-weight: var(--font-semibold);
  text-decoration: none;
  z-index: var(--z-tooltip);
  transition: top var(--transition-fast);
}

.ennu-fc-skip-link:focus {
  top: var(--space-3);
}

/* ==========================================================================
   LEGACY COMPATIBILITY - Preserve Existing Functionality
   ========================================================================== */

/* Ensure all existing class selectors continue to work */
.face-chart-header.two-row {
  display: flex;
  flex-direction: column;
}

.ennu-fc-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.ennu-fc-header-row:last-child {
  border-bottom: none;
}

.ennu-fc-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.ennu-fc-header-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.ennu-fc-header-logo {
  max-width: 280px;
  height: auto;
}

/* Chart mode specific overrides */
.face-chart-content.mode-face-chart .face-chart-sidebar {
  top: 0;
}

/* Admin bar adjustments */
.admin-bar .face-chart-content.mode-face-chart .face-chart-sidebar {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .face-chart-content.mode-face-chart .face-chart-sidebar {
    top: 46px;
  }
}

/* Tip and Refer panels */
#tip-panel,
#refer-panel {
  display: none !important;
  padding: var(--space-6);
  background: var(--bg-canvas);
}

#tip-panel.active,
#refer-panel.active {
  display: block !important;
}

/* Send SMS Section Styles */
.send-sms-section {
  background: var(--bg-elevated, #ffffff);
  border: 1px solid var(--border-subtle, #e5e7eb);
  border-radius: var(--radius-lg, 12px);
  padding: var(--space-5, 20px);
  margin-bottom: var(--space-4, 16px);
}

.send-sms-section h3 {
  font-size: var(--text-lg, 18px);
  font-weight: var(--font-semibold, 600);
  color: var(--text-primary, #1f2937);
  margin: 0 0 var(--space-2, 8px) 0;
}

.send-sms-description {
  color: var(--text-secondary, #6b7280);
  font-size: var(--text-sm, 14px);
  margin-bottom: var(--space-4, 16px);
}

.send-sms-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 12px);
}

.sms-input-group {
  display: flex;
  gap: var(--space-2, 8px);
}

.referral-phone-input {
  flex: 1;
  padding: var(--space-3, 12px) var(--space-4, 16px);
  border: 1px solid var(--border-default, #d1d5db);
  border-radius: var(--radius-md, 8px);
  font-size: var(--text-base, 16px);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.referral-phone-input:focus {
  outline: none;
  border-color: var(--accent-primary, #C9A962);
  box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.15);
}

.send-sms-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2, 8px);
  padding: var(--space-3, 12px) var(--space-5, 20px);
  background: linear-gradient(135deg, #C9A962 0%, #A88B4A 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md, 8px);
  font-size: var(--text-base, 16px);
  font-weight: var(--font-semibold, 600);
  cursor: pointer;
  transition: all 0.2s;
}

.send-sms-btn:hover {
  background: linear-gradient(135deg, #D4B978 0%, #C9A962 100%);
  transform: translateY(-1px);
}

.send-sms-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.send-sms-btn .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

.sms-send-status {
  padding: var(--space-3, 12px);
  border-radius: var(--radius-md, 8px);
  font-size: var(--text-sm, 14px);
}

.sms-send-status.success {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.sms-send-status.error {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.sms-send-status.loading {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* History panel styling */
.ennu-fc-treatment-history-section {
  margin-top: var(--space-6);
}

/* Patient info panel in wizard */
.patient-info-panel {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-top: var(--space-3);
}

.patient-info-loading {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
}

.patient-info-loading .dashicons {
  animation: spinner 1s linear infinite;
}

/* Notes history in wizard */
.notes-history {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  max-height: 200px;
  overflow-y: auto;
}

/* Content lock overlay */
.ennu-fc-content-lock-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 30, 0.9);
  backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ennu-fc-lock-message {
  background: var(--bg-primary);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  max-width: 500px;
  text-align: center;
  box-shadow: var(--shadow-2xl);
}

.ennu-fc-lock-icon {
  color: var(--accent-primary);
  margin-bottom: var(--space-5);
}

.ennu-fc-lock-message h3 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin: 0 0 var(--space-3) 0;
}

.ennu-fc-lock-message p {
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: 1.6;
  margin: 0 0 var(--space-5) 0;
}

.ennu-fc-lock-tip {
  background: var(--info-light);
  border: 1px solid var(--info-sapphire);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  text-align: left;
  margin-bottom: var(--space-5);
}

.ennu-fc-lock-tip .dashicons {
  color: var(--info-sapphire);
  flex-shrink: 0;
}

.ennu-fc-lock-actions {
  margin-top: var(--space-5);
}

.ennu-fc-lock-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--accent-primary);
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-inverse);
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-gold);
}

.ennu-fc-lock-actions .btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold-lg);
}

/* ==========================================================================
   CONSOLIDATED: Product Card Styles (from face-chart-products-fix.css)
   ========================================================================== */

/* Base product card - high specificity */
#ennu-face-chart-app .ennu-face-chart-container .treatment-product-card,
.ennu-face-chart-container .treatment-product-card.treatment-product-card {
  border: 2px solid #e0e0e0;
  background: white;
  transition: all 0.2s ease;
  border-radius: 8px;
  padding: 15px;
  cursor: pointer;
}

#ennu-face-chart-app .ennu-face-chart-container .treatment-product-card:hover,
.ennu-face-chart-container .treatment-product-card.treatment-product-card:hover {
  border-color: var(--luxury-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(201, 169, 98, 0.2);
}

#ennu-face-chart-app .ennu-face-chart-container .treatment-product-card.selected,
#ennu-face-chart-app .ennu-face-chart-container .treatment-product-card.active,
.ennu-face-chart-container .treatment-product-card.treatment-product-card.selected {
  border-color: var(--luxury-gold);
  background: var(--clinical-cream);
}

#ennu-face-chart-app .treatment-product-card h4,
.ennu-face-chart-container .treatment-product-card h4 {
  color: #1A2744;
  margin: 0 0 5px 0;
  font-size: 0.95em;
  font-weight: 600;
}

#ennu-face-chart-app .treatment-product-card p,
.ennu-face-chart-container .treatment-product-card p {
  color: #1A1A1E;
  margin: 0 0 10px 0;
  font-size: 0.85em;
}

#ennu-face-chart-app .treatment-product-card .price,
#ennu-face-chart-app .treatment-product-card .product-price {
  color: var(--luxury-gold);
  font-weight: 600;
}

.treatment-product-card .product-name {
  margin: 0 0 5px 0;
  font-size: 0.95em;
  font-weight: 600;
}

.treatment-product-card .product-description {
  margin: 0 0 10px 0;
  font-size: 0.85em;
  line-height: 1.3;
  height: 35px;
  overflow: hidden;
}

.treatment-product-card .product-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.treatment-product-card .product-sku {
  font-size: 0.75em;
  color: #999;
}

/* ==========================================================================
   CONSOLIDATED: Order Service Styles (from unified-order-service.css)
   ========================================================================== */

.unified-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5000;
}

.unified-loading-overlay.active {
  display: flex;
}

.unified-loading-overlay .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--luxury-gold);
  border-radius: 50%;
  animation: unified-spin 1s linear infinite;
}

@keyframes unified-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.ennu-order-display.loading,
.treatment-products-grid.loading {
  opacity: 0.6;
  pointer-events: none;
}

.unified-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: var(--radius-md);
  background: #333;
  color: white;
  font-size: 14px;
  max-width: 300px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 10000;
}

.unified-notification.show {
  opacity: 1;
  transform: translateY(0);
}

.unified-notification.success {
  background: var(--luxury-gold);
  color: var(--charcoal-900);
}

.unified-notification.error {
  background: var(--error-rose);
  color: var(--clinical-white);
}

.unified-notification.warning {
  background: var(--luxury-gold-dark);
  color: var(--charcoal-900);
}

.btn-add-to-order,
.add-service-btn {
  background: var(--luxury-gold);
  color: #1A2744;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-add-to-order:hover,
.add-service-btn:hover {
  background: var(--luxury-gold-light);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(201, 169, 98, 0.3);
}

.treatment-product-card.adding,
.ennu-service-card.adding {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.treatment-product-card.adding::after,
.ennu-service-card.adding::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--luxury-gold);
  border-top-color: transparent;
  border-radius: 50%;
  animation: unified-spin 0.8s linear infinite;
}

.order-item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.quantity-controls button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--charcoal-200);
  background: white;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.quantity-controls button:hover {
  background: var(--charcoal-50);
  border-color: var(--luxury-gold);
}

.quantity-controls input {
  width: 40px;
  text-align: center;
  border: 1px solid var(--charcoal-200);
  border-radius: var(--radius-sm);
  padding: 4px;
}

/* ==========================================================================
   CONSOLIDATED: Order Display Styles (from face-chart-order-display.css)
   ========================================================================== */

#ennu-services-panel-facechart {
  height: calc(100vh - 140px);
  max-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
}

#ennu-services-panel-facechart .ennu-service-filters {
  flex: 0 0 auto;
}

#ennu-services-panel-facechart .ennu-services-container {
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: none;
  min-height: 0;
}

#ennu-order-display-facechart .deposit-row {
  background: var(--clinical-cream);
  border-top: 2px solid var(--charcoal-200);
}

#ennu-order-display-facechart .deposit-row td {
  padding: 12px 8px;
  font-weight: 600;
}

#ennu-order-display-facechart .subtotal-row td {
  padding: 8px;
  border-top: 1px solid var(--charcoal-200);
  color: #1A1A1E;
}

#ennu-order-display-facechart .balance-due-row {
  background: var(--luxury-gold-subtle);
  border: 1px solid var(--luxury-gold);
}

#ennu-order-display-facechart .balance-due-row td {
  padding: 12px 8px;
  color: var(--luxury-gold-dark);
  font-weight: 700;
}

#ennu-order-display-facechart .order-items-table tbody tr:first-child {
  background: var(--charcoal-50);
}

/* ==========================================================================
   PEPTIDE INTEGRATION - Product Modal & Cart Styles
   ========================================================================== */

/* Peptide Toolbar Button */
.toolbar-btn-peptide {
  background: linear-gradient(135deg, #7C6BE6 0%, #9C88FF 100%) !important;
  color: white !important;
  border: none !important;
}

.toolbar-btn-peptide:hover {
  background: linear-gradient(135deg, #6B5AD5 0%, #8B77EE 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 107, 230, 0.35);
}

.toolbar-btn-peptide.not-configured {
  background: linear-gradient(135deg, #888 0%, #aaa 100%) !important;
  opacity: 0.7;
}

.toolbar-btn-peptide.not-configured:hover {
  background: linear-gradient(135deg, #777 0%, #999 100%) !important;
  opacity: 0.9;
}

.toolbar-btn-peptide svg {
  stroke: white;
}

/* Peptide Modal Overlay */
.peptide-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 30, 0.85);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

/* Peptide Modal Content */
.peptide-modal-content {
  background: var(--clinical-white);
  border-radius: 16px;
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

/* Peptide Modal Header */
.peptide-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(135deg, #7C6BE6 0%, #9C88FF 100%);
  color: white;
  flex-shrink: 0;
}

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

.peptide-header-left h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  font-family: var(--font-luxury);
}

.peptide-header-left svg {
  stroke: white;
}

.peptide-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
}

.peptide-source-badge .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
}

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

.peptide-header-right .btn-sm {
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s;
}

.peptide-header-right .btn-sm:hover {
  background: rgba(255, 255, 255, 0.3);
}

.peptide-modal-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.peptide-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Peptide Modal Body */
.peptide-modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* Loading State */
.peptide-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--charcoal-500);
}

.peptide-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--charcoal-200);
  border-top-color: #7C6BE6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.peptide-loading-state p {
  margin-top: 16px;
  font-size: 14px;
}

/* Error State */
.peptide-error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--charcoal-600);
  text-align: center;
}

.peptide-error-state .dashicons {
  font-size: 48px;
  width: 48px;
  height: 48px;
  color: #e74c3c;
  margin-bottom: 16px;
}

/* Peptide Content Area */
.peptide-content {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Search Bar */
.peptide-search-bar {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  background: var(--clinical-cream);
  border-bottom: 1px solid var(--charcoal-200);
  flex-shrink: 0;
}

.peptide-search-input-wrapper {
  flex: 1;
  position: relative;
}

.peptide-search-input-wrapper .dashicons {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--charcoal-400);
  font-size: 18px;
}

.peptide-search-input-wrapper input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  border: 1px solid var(--charcoal-300);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.peptide-search-input-wrapper input:focus {
  outline: none;
  border-color: #7C6BE6;
  box-shadow: 0 0 0 3px rgba(124, 107, 230, 0.15);
}

#peptide-category-filter {
  padding: 10px 16px;
  border: 1px solid var(--charcoal-300);
  border-radius: 8px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  min-width: 180px;
}

/* Products Grid */
.peptide-products-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-auto-rows: min-content;
  gap: 12px;
  align-content: start;
}

/* Product Card */
.peptide-product-card {
  background: white;
  border: 1px solid var(--charcoal-200);
  border-radius: 12px;
  overflow: visible;
  transition: transform 0.2s, box-shadow 0.2s;
  height: fit-content;
}

/* Clip image only for border-radius */
.peptide-product-card .peptide-product-image {
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.peptide-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.peptide-product-card[data-in-stock="false"] {
  opacity: 0.6;
}

/* Product Image */
.peptide-product-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--charcoal-100);
  overflow: hidden;
}

.peptide-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.peptide-no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--charcoal-400);
}

.peptide-no-image .dashicons {
  font-size: 36px;
  width: 36px;
  height: 36px;
}

.peptide-stock-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.peptide-stock-badge.in-stock {
  background: #27ae60;
  color: white;
}

.peptide-stock-badge.out-of-stock {
  background: #e74c3c;
  color: white;
}

/* Product Info */
.peptide-product-info {
  padding: 12px;
}

.peptide-product-name {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--charcoal-800);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.peptide-product-category {
  display: inline-block;
  font-size: 11px;
  color: var(--charcoal-500);
  background: var(--charcoal-100);
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.peptide-price {
  font-size: 16px;
  font-weight: 700;
  color: #7C6BE6;
}

.peptide-price-sale s {
  color: var(--charcoal-400);
  font-weight: 400;
  margin-right: 6px;
  font-size: 13px;
}

.peptide-price-sale {
  font-size: 16px;
  font-weight: 700;
  color: #27ae60;
}

/* Product Actions */
.peptide-product-actions {
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.peptide-qty-controls {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--charcoal-100);
  border-radius: 8px;
  padding: 6px;
}

.peptide-qty-controls.active {
  display: flex;
}

.peptide-qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  color: var(--charcoal-700);
  transition: background 0.2s;
}

.peptide-qty-btn:hover:not(:disabled) {
  background: #7C6BE6;
  color: white;
}

.peptide-qty-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.peptide-qty-display {
  min-width: 32px;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--charcoal-800);
}

.peptide-add-btn {
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: #7C6BE6;
  color: white;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s;
}

.peptide-add-btn:hover:not(:disabled) {
  background: #6B5AD5;
}

.peptide-add-btn:disabled {
  background: var(--charcoal-300);
  cursor: not-allowed;
}

.peptide-add-btn.in-cart {
  background: #27ae60;
}

.peptide-add-btn.in-cart:hover {
  background: #219a52;
}

.peptide-add-btn .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

/* Cart Panel */
.peptide-cart-panel {
  flex-shrink: 0;
  background: var(--charcoal-50);
  border-top: 2px solid var(--charcoal-200);
  padding: 12px 16px;
  max-height: 180px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.peptide-cart-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--charcoal-700);
}

.peptide-cart-header .dashicons {
  color: #7C6BE6;
}

.peptide-cart-count {
  background: #7C6BE6;
  color: white;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.peptide-cart-items {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 12px;
}

.peptide-cart-empty {
  color: var(--charcoal-400);
  font-size: 13px;
  text-align: center;
  padding: 20px;
  margin: 0;
}

.peptide-cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--charcoal-200);
}

.peptide-cart-item:last-child {
  border-bottom: none;
}

.peptide-cart-item-info {
  flex: 1;
  min-width: 0;
}

.peptide-cart-item-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.peptide-cart-item-meta {
  font-size: 11px;
  color: var(--charcoal-500);
}

.peptide-cart-item-total {
  font-weight: 700;
  color: var(--charcoal-800);
  white-space: nowrap;
}

.peptide-cart-remove {
  background: none;
  border: none;
  color: var(--charcoal-400);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}

.peptide-cart-remove:hover {
  color: #e74c3c;
}

/* Cart Totals */
.peptide-cart-totals {
  border-top: 2px solid var(--charcoal-200);
  padding-top: 12px;
  margin-bottom: 12px;
}

.peptide-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 4px;
}

.peptide-total-row span:last-child {
  font-weight: 700;
  color: var(--charcoal-800);
}

.peptide-commission-row span:last-child {
  color: #27ae60;
}

/* Cart Actions */
.peptide-cart-actions {
  display: flex;
  gap: 12px;
}

.peptide-cart-actions button {
  flex: 1;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

#btn-peptide-clear-cart {
  background: var(--clinical-white);
  border: 1px solid var(--charcoal-300);
  color: var(--charcoal-700);
}

#btn-peptide-clear-cart:hover {
  background: var(--charcoal-100);
}

#btn-peptide-send-cart {
  background: linear-gradient(135deg, #7C6BE6 0%, #9C88FF 100%);
  border: none;
  color: white;
}

#btn-peptide-send-cart:hover:not(:disabled) {
  background: linear-gradient(135deg, #6B5AD5 0%, #8B77EE 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 107, 230, 0.3);
}

#btn-peptide-send-cart:disabled {
  background: var(--charcoal-300);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#btn-peptide-send-cart .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

/* Modal Footer - Notes */
.peptide-modal-footer {
  padding: 10px 16px;
  background: var(--clinical-cream);
  border-top: 1px solid var(--charcoal-200);
  flex-shrink: 0;
}

.peptide-notes-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal-700);
  margin-bottom: 8px;
}

.peptide-notes-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--charcoal-300);
  border-radius: 8px;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
}

.peptide-notes-group textarea:focus {
  outline: none;
  border-color: #7C6BE6;
  box-shadow: 0 0 0 3px rgba(124, 107, 230, 0.15);
}

/* No Results State */
.peptide-no-results {
  text-align: center;
  color: var(--charcoal-500);
  padding: 40px 20px;
  grid-column: 1 / -1;
}

/* ==========================================================================
   PEPTIDE MODAL - Responsive Styles
   ========================================================================== */

@media (max-width: 1024px) {
  .peptide-modal-content {
    max-width: 95%;
    max-height: 95vh;
  }
  
  .peptide-modal-header {
    padding: 12px 16px;
  }
  
  .peptide-header-left h2 {
    font-size: 1.2rem;
  }
  
  .peptide-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
    padding: 12px;
  }
  
  .peptide-cart-panel {
    max-height: 160px;
    padding: 10px 14px;
  }
}

@media (max-width: 768px) {
  .peptide-modal {
    padding: 0;
  }
  
  .peptide-modal-content {
    max-width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }
  
  /* Compact Header */
  .peptide-modal-header {
    padding: 10px 12px;
  }
  
  .peptide-header-left {
    gap: 8px;
  }
  
  .peptide-header-left svg {
    width: 20px;
    height: 20px;
  }
  
  .peptide-header-left h2 {
    font-size: 1rem;
  }
  
  .peptide-source-badge {
    display: none;
  }
  
  #btn-peptide-refresh {
    padding: 4px;
  }
  
  #btn-peptide-refresh .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
  }
  
  .peptide-modal-close {
    padding: 4px;
  }
  
  .peptide-modal-close svg {
    width: 20px;
    height: 20px;
  }
  
  /* Compact Search Bar */
  .peptide-search-bar {
    flex-direction: row;
    padding: 8px 12px;
    gap: 8px;
  }
  
  .peptide-search-input-wrapper input {
    padding: 8px 10px 8px 32px;
    font-size: 14px;
  }
  
  .peptide-search-input-wrapper .dashicons {
    left: 8px;
    font-size: 16px;
  }
  
  #peptide-category-filter {
    min-width: 100px;
    padding: 8px 10px;
    font-size: 13px;
  }
  
  /* Compact Products Grid */
  .peptide-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px;
  }
  
  /* Compact Product Cards */
  .peptide-product-card .peptide-product-image {
    aspect-ratio: 1 / 1;
  }
  
  .peptide-product-info {
    padding: 8px;
  }
  
  .peptide-product-name {
    font-size: 12px;
    margin-bottom: 2px;
    -webkit-line-clamp: 1;
  }
  
  .peptide-product-category {
    font-size: 9px;
    padding: 1px 6px;
    margin-bottom: 4px;
  }
  
  .peptide-price,
  .peptide-price-sale {
    font-size: 13px;
  }
  
  .peptide-product-actions {
    padding: 0 8px 8px;
    gap: 4px;
  }
  
  .peptide-add-btn {
    padding: 6px 10px;
    font-size: 11px;
    gap: 4px;
  }
  
  .peptide-add-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
  }
  
  .peptide-qty-controls {
    padding: 4px;
    gap: 6px;
  }
  
  .peptide-qty-btn {
    width: 26px;
    height: 26px;
    font-size: 14px;
  }
  
  .peptide-qty-display {
    font-size: 13px;
    min-width: 24px;
  }
  
  /* Compact Cart Panel */
  .peptide-cart-panel {
    padding: 8px 12px;
    max-height: 140px;
  }
  
  .peptide-cart-header {
    margin-bottom: 6px;
  }
  
  .peptide-cart-header h3 {
    font-size: 12px;
    gap: 4px;
  }
  
  .peptide-cart-header .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
  }
  
  .peptide-cart-count {
    font-size: 10px;
    padding: 1px 6px;
  }
  
  .peptide-cart-items {
    margin-bottom: 6px;
  }
  
  .peptide-cart-empty {
    font-size: 11px;
    padding: 10px;
  }
  
  .peptide-cart-item {
    padding: 4px 0;
    gap: 8px;
  }
  
  .peptide-cart-item-name {
    font-size: 11px;
  }
  
  .peptide-cart-item-price {
    font-size: 11px;
  }
  
  .peptide-cart-totals {
    padding-top: 6px;
  }
  
  .peptide-total-row {
    font-size: 11px;
    padding: 2px 0;
  }
  
  .peptide-cart-actions {
    gap: 6px;
    margin-top: 6px;
  }
  
  #btn-peptide-clear-cart,
  #btn-peptide-send-cart {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  /* Compact Footer */
  .peptide-modal-footer {
    padding: 8px 12px;
  }
  
  .peptide-notes-group label {
    font-size: 11px;
    margin-bottom: 4px;
  }
  
  .peptide-notes-group textarea {
    padding: 6px 8px;
    font-size: 13px;
    min-height: 40px;
  }
}

/* Extra compact for very small screens */
@media (max-width: 480px) {
  .peptide-modal-header {
    padding: 8px 10px;
  }
  
  .peptide-header-left h2 {
    font-size: 0.9rem;
  }
  
  .peptide-search-bar {
    padding: 6px 8px;
  }
  
  .peptide-products-grid {
    gap: 6px;
    padding: 6px;
  }
  
  .peptide-product-info {
    padding: 6px;
  }
  
  .peptide-product-name {
    font-size: 11px;
  }
  
  .peptide-price {
    font-size: 12px;
  }
  
  .peptide-product-actions {
    padding: 0 6px 6px;
  }
  
  .peptide-add-btn {
    padding: 5px 8px;
    font-size: 10px;
  }
  
  .peptide-cart-panel {
    padding: 6px 10px;
    max-height: 120px;
  }
  
  .peptide-modal-footer {
    padding: 6px 10px;
  }
}

/* ==========================================================================
   COMPREHENSIVE MOBILE OPTIMIZATIONS - iOS & Android
   ========================================================================== */

/* iOS Safari: Prevent zoom on input focus (requires 16px minimum font) */
input, select, textarea, button {
  font-size: 16px;
}

/* iOS Safe Area - Account for iPhone notch/home indicator */
@supports (padding: env(safe-area-inset-bottom)) {
  .ennu-face-chart-container {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  
  .canvas-bottom-bar {
    padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom));
  }
  
  .face-chart-header {
    padding-top: env(safe-area-inset-top);
  }
  
  /* Modals need safe area too */
  .modal-overlay,
  .ennu-modal-overlay {
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
}

/* Touch device optimizations - minimum 44×44px touch targets (Apple HIG) */
@media (hover: none) and (pointer: coarse) {
  /* All buttons must be at least 44px */
  .toolbar-btn,
  .mode-btn,
  .btn-primary,
  .btn-secondary,
  .thumb-photo,
  .thumb-silhouette,
  .zoom-btn {
    min-width: 44px;
    min-height: 44px;
  }
  
  /* Increase photo thumbnails for better touch */
  .thumb-photo,
  .thumb-silhouette {
    width: 52px;
    height: 52px;
  }
  
  /* Larger delete buttons for touch */
  .thumb-delete {
    width: 32px;
    height: 32px;
    min-width: 32px;
    opacity: 1;
  }
  
  /* Prevent double-tap zoom */
  * {
    touch-action: manipulation;
  }
  
  /* Canvas specific touch handling */
  #face-chart-canvas {
    touch-action: none;
  }
  
  /* Disable text selection on interactive elements */
  .toolbar-btn,
  .mode-btn,
  .photo-row,
  .zoom-controls {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }
  
  /* Remove tap highlight on iOS */
  button, a, .toolbar-btn, .mode-btn {
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Larger spacing in modals for finger navigation */
  .modal-form-group,
  .form-group {
    margin-bottom: 16px;
  }
  
  .modal-body {
    padding: 16px;
  }
  
  /* Larger modal close buttons */
  .modal-close,
  .close-modal-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    font-size: 24px;
  }
}

/* Portrait phone optimization (iPhone SE to iPhone Pro Max) */
@media screen and (max-width: 428px) and (orientation: portrait) {
  /* Full-width modals on phones */
  .modal-content,
  .ennu-modal-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 16px 16px 0 0;
    max-height: calc(100vh - env(safe-area-inset-top, 0px));
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  }
  
  /* Compact header on phones */
  .face-chart-header {
    padding: 8px 12px;
    min-height: 56px;
  }
  
  /* Stack header items on narrow screens */
  .header-left,
  .header-center,
  .header-right {
    flex-wrap: wrap;
  }
  
  /* Hide some labels on phones to save space */
  .toolbar-btn .btn-label {
    display: none;
  }
  
  /* Smaller toolbar buttons on phones */
  .toolbar-btn {
    padding: 8px;
    min-width: 44px;
    width: auto;
  }
  
  /* Photo strip - vertical scrolling */
  .photo-thumbnails-strip {
    max-height: 160px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Ensure canvas fits screen */
  .face-chart-canvas-area {
    max-width: 100vw;
    overflow: hidden;
  }
}

/* Landscape phone optimization */
@media screen and (max-height: 500px) and (orientation: landscape) {
  /* Very compact header */
  .face-chart-header {
    padding: 4px 12px;
    min-height: 48px;
  }
  
  /* Hide less important items */
  .header-center {
    display: none;
  }
  
  /* Compact bottom bar */
  .canvas-bottom-bar {
    padding: 4px 12px;
  }
}

/* iPad / Tablet optimization */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  /* Optimal touch targets for tablet */
  .toolbar-btn {
    padding: 10px 14px;
    min-width: 60px;
  }
  
  .mode-btn {
    padding: 10px 20px;
  }
  
  /* Larger photo thumbnails */
  .photo-row {
    padding: 8px;
  }
  
  .thumb-photo,
  .thumb-silhouette {
    width: 56px;
    height: 56px;
  }
}

/* High DPI / Retina display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Ensure crisp lines on retina */
  .toolbar-btn,
  .modal-content,
  .photo-row {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark mode support (respects system preference) */
@media (prefers-color-scheme: dark) {
  /* Only apply if theme isn't explicitly set to light */
  .ennu-face-chart-container:not([data-theme="light"]) {
    /* Already using dark theme by default */
  }
}

/* ==========================================================================
   HANDWRITING RECOGNITION (WRITE TOOL) STYLES
   ========================================================================== */

.write-mode-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.write-mode-container {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px;
  width: 90%;
  max-width: 650px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.write-mode-overlay.active .write-mode-container {
  transform: scale(1) translateY(0);
}

.write-mode-header {
  text-align: center;
  margin-bottom: 20px;
}

.write-mode-header h3 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a22;
  margin: 0 0 8px 0;
}

.write-mode-header p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.write-canvas-container {
  position: relative;
  background: #fafafa;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

#write-canvas {
  display: block;
  width: 100%;
  height: auto;
  cursor: crosshair;
  touch-action: none;
}

.write-baseline {
  position: absolute;
  bottom: 50px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #d1d5db 10%, #d1d5db 90%, transparent);
  pointer-events: none;
}

.write-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 10px;
  margin-bottom: 20px;
  min-height: 48px;
}

.write-preview-label {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.write-preview-text {
  flex: 1;
  font-size: 18px;
  font-weight: 500;
  color: #1a1a22;
  font-family: 'Caveat', 'Segoe Script', 'Bradley Hand', cursive;
}

.write-text-input {
  flex: 1;
  font-size: 18px;
  font-weight: 500;
  color: #1a1a22;
  font-family: 'Caveat', 'Segoe Script', 'Bradley Hand', cursive;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 12px;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease;
}

.write-text-input:focus {
  border-color: #3b82f6;
}

.write-mode-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.write-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.write-btn-secondary {
  background: #f1f5f9;
  color: #475569;
}

.write-btn-secondary:hover {
  background: #e2e8f0;
}

.write-btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.write-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.write-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.write-btn .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

/* Mobile adjustments for write mode */
@media (max-width: 768px) {
  .write-mode-container {
    width: 95%;
    padding: 16px;
    border-radius: 16px;
  }
  
  .write-mode-header h3 {
    font-size: 18px;
  }
  
  .write-canvas-container {
    border-radius: 8px;
  }
  
  #write-canvas {
    height: 150px;
  }
  
  .write-mode-actions {
    flex-wrap: wrap;
  }
  
  .write-btn {
    flex: 1;
    justify-content: center;
    min-width: 100px;
  }
}

/* Handwritten text annotation styling on canvas */
.annotation-handwritten {
  font-family: 'Caveat', 'Segoe Script', 'Bradley Hand', cursive;
}

/* ==========================================================================
   TREATMENT MODAL - Mobile Optimization
   ========================================================================== */

/* Treatment modal - tablet and below */
@media screen and (max-width: 1024px) {
  #add-treatment-modal .ennu-fc-modal-content {
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
  }
  
  #add-treatment-modal .ennu-fc-modal-body {
    max-height: calc(90vh - 140px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Treatment modal - mobile phones */
@media screen and (max-width: 768px) {
  /* Full-screen modal on mobile */
  #add-treatment-modal .ennu-fc-modal-content {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    max-width: 100%;
    border-radius: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
  }
  
  #add-treatment-modal .ennu-fc-modal-header {
    padding: 16px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-subtle);
  }
  
  #add-treatment-modal .ennu-fc-modal-header h2 {
    font-size: var(--text-lg);
  }
  
  #add-treatment-modal .ennu-fc-modal-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    padding-bottom: 100px; /* Space for sticky footer */
  }
  
  /* Sticky footer with action buttons */
  #add-treatment-modal .ennu-fc-modal-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-subtle);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 20;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
  }
  
  #add-treatment-modal .ennu-fc-modal-footer .ennu-fc-btn-primary,
  #add-treatment-modal .ennu-fc-modal-footer .ennu-fc-btn-secondary {
    flex: 1;
    min-height: 48px;
    font-size: var(--text-base);
  }
  
  /* Product grid - 2 columns on mobile */
  #treatment-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .treatment-product-card {
    padding: 12px;
  }
  
  .treatment-product-card .product-name {
    font-size: var(--text-sm);
    line-height: 1.3;
  }
  
  .treatment-product-card .product-description {
    display: none; /* Hide description on mobile for compact cards */
  }
  
  /* Selected product card mobile */
  .selected-product-card {
    padding: 12px;
  }
  
  .selected-product-card .product-header {
    flex-direction: column;
    gap: 10px;
  }
  
  .selected-product-card .product-info-main {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .selected-product-card .btn-change {
    align-self: flex-start;
  }
  
  /* Quantity stepper - larger touch targets on mobile */
  .quantity-stepper-wrapper {
    padding: 16px;
    gap: 10px;
    flex-wrap: wrap;
  }
  
  .qty-btn {
    min-width: 52px;
    min-height: 52px;
    font-size: 24px;
  }
  
  .qty-btn svg {
    width: 24px;
    height: 24px;
  }
  
  .quantity-slider-container {
    order: 3;
    width: 100%;
    margin-top: 8px;
  }
  
  .quantity-stepper-wrapper .quantity-value-display {
    flex: 1;
    justify-content: center;
  }
  
  .quantity-stepper-wrapper .quantity-number-input {
    width: 70px;
    font-size: var(--text-xl);
    padding: 10px;
    min-height: 48px;
  }
  
  .quantity-stepper-wrapper .quantity-unit-select {
    min-height: 48px;
    font-size: var(--text-base);
    padding: 10px 16px;
  }
  
  /* Treatment area select - easier to use on mobile */
  #treatment-area {
    min-height: 150px;
    font-size: var(--text-base);
  }
  
  #treatment-area option {
    padding: 8px;
  }
  
  /* Hide multi-select hint on mobile - use native behavior */
  #treatment-area + small {
    display: none;
  }
  
  /* Accordions - larger touch targets */
  .treatment-accordion .accordion-toggle {
    min-height: 52px;
    padding: 14px 16px;
    font-size: var(--text-base);
  }
  
  .treatment-accordion .accordion-content {
    padding: 16px;
  }
  
  .treatment-accordion #treatment-notes {
    font-size: var(--text-base);
    min-height: 80px;
  }
  
  .treatment-accordion .secondary-provider-select {
    min-height: 48px;
    font-size: var(--text-base);
  }
}

/* Very small phones */
@media screen and (max-width: 375px) {
  #treatment-products-grid {
    grid-template-columns: 1fr; /* Single column on very small screens */
  }
  
  .quantity-stepper-wrapper {
    padding: 12px;
  }
  
  .qty-btn {
    min-width: 48px;
    min-height: 48px;
  }
  
  .quantity-stepper-wrapper .quantity-number-input {
    width: 60px;
  }
}

/* Treatment note annotation on canvas */
.treatment-note-bubble {
  position: absolute;
  max-width: 150px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.3;
  color: #374151;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.treatment-note-bubble::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: #d1d5db;
}

.treatment-note-bubble::after {
  content: '';
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right-color: rgba(255, 255, 255, 0.95);
}

/* Treatment card note indicator in sidebar */
.treatment-card .note-icon {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  color: var(--text-tertiary);
}

.treatment-card .note-icon svg {
  width: 14px;
  height: 14px;
}

.treatment-card.has-note .note-icon {
  color: var(--accent-gold);
}

/* ==========================================================================
   BOOKING WIZARD - Real-Time Slot Selection
   ========================================================================== */

/* Booking Cascade Groups */
.booking-cascade-group {
  margin-bottom: 10px;
}

.booking-cascade-group label {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
  font-weight: 500;
  font-size: 12px;
  color: var(--charcoal-300, #B4B4BC);
}

.booking-cascade-group label svg {
  margin-right: 6px;
  stroke: var(--luxury-gold, #C9A962);
}

.booking-cascade-select {
  width: 100%;
  padding: 8px 12px;
  background: var(--charcoal-800, #26262B);
  border: 1px solid var(--charcoal-600, #4A4A54);
  border-radius: 6px;
  color: var(--clinical-white, #fff);
  font-size: 13px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.booking-cascade-select:focus {
  outline: none;
  border-color: var(--luxury-gold, #C9A962);
  box-shadow: 0 0 0 3px var(--luxury-gold-subtle, rgba(201, 169, 98, 0.1));
}

.booking-cascade-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--charcoal-900, #1A1A1E);
}

.booking-cascade-select option {
  background: var(--charcoal-800, #26262B);
  color: var(--clinical-white, #fff);
}

/* Loading Indicator */
.cascade-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--charcoal-400, #8E8E9A);
}

.cascade-loading .dashicons-update.spin {
  animation: spin 1s linear infinite;
}

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

/* Timeslots Grid */
.timeslots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  padding: 8px 0;
}

.timeslot-btn {
  padding: 12px 8px;
  background: var(--charcoal-800, #26262B);
  border: 1px solid var(--charcoal-600, #4A4A54);
  border-radius: 8px;
  color: var(--clinical-white, #fff);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.timeslot-btn:hover {
  background: var(--charcoal-700, #36363D);
  border-color: var(--luxury-gold, #C9A962);
}

.timeslot-btn.selected {
  background: linear-gradient(135deg, var(--luxury-gold-dark, #B8954D) 0%, var(--luxury-gold, #C9A962) 100%);
  border-color: var(--luxury-gold, #C9A962);
  color: var(--charcoal-900, #1A1A1E);
  box-shadow: 0 4px 12px var(--luxury-gold-glow, rgba(201, 169, 98, 0.25));
}

.timeslot-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* No Slots Message */
.no-slots-message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: #f87171;
  font-size: 13px;
}

.no-slots-message svg {
  flex-shrink: 0;
}

/* Booking Confirmation Badge */
.booking-confirmed-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--luxury-gold-dark) 0%, var(--luxury-gold) 100%);
  border-radius: 20px;
  color: var(--charcoal-900);
  font-size: 12px;
  font-weight: 600;
}

.booking-confirmed-badge svg {
  stroke: var(--charcoal-900);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .timeslots-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .timeslot-btn {
    padding: 10px 6px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .timeslots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Dark Mode Enhancement for Wizard */
.modal-wizard .booking-cascade-group {
  background: rgba(0, 0, 0, 0.15);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.modal-wizard .booking-cascade-group label {
  margin-bottom: 6px;
}

/* ==========================================================================
   WIZARD MOBILE OPTIMIZATION - Compact No-Scroll Layout
   ========================================================================== */

/* Compact Booking Cascade - Mobile First */
@media (max-width: 768px) {
  /* Wizard Modal - Full screen on mobile */
  #chart-init-wizard .ennu-fc-modal-content,
  .modal-wizard {
    max-width: 100vw;
    max-height: 100dvh; /* Use dynamic viewport height for mobile browsers */
    height: 100dvh;
    margin: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }

  /* Compact wizard header */
  .wizard-header {
    padding: 10px 12px;
    flex-shrink: 0;
  }

  .wizard-header h2 {
    font-size: 15px;
    margin-bottom: 8px;
  }

  .wizard-steps {
    gap: 12px;
  }

  .wizard-step .step-number {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .wizard-step .step-label {
    font-size: 9px;
  }

  /* Wizard panel - scrollable content area */
  .wizard-panel {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    -webkit-overflow-scrolling: touch;
  }

  .wizard-panel h3 {
    font-size: 14px;
    margin-bottom: 4px;
  }

  .wizard-panel > .help-text {
    font-size: 11px;
    margin-bottom: 10px;
  }

  /* Ultra-compact booking cascade groups */
  .booking-cascade-group {
    margin-bottom: 8px !important;
    padding: 8px 10px !important;
    background: rgba(0, 0, 0, 0.15) !important;
    border-radius: 6px !important;
  }

  .booking-cascade-group label {
    font-size: 11px !important;
    margin-bottom: 4px !important;
    display: flex;
    align-items: center;
  }

  .booking-cascade-group label svg {
    width: 12px !important;
    height: 12px !important;
    margin-right: 4px !important;
  }

  .booking-cascade-select {
    padding: 8px 10px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
  }

  .booking-cascade-group .help-text,
  .booking-cascade-group small {
    display: none !important; /* Hide help text on mobile to save space */
  }

  .cascade-loading {
    font-size: 11px;
    padding: 4px 0;
  }

  /* Compact timeslots grid */
  .timeslots-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 4px !important;
    padding: 4px 0 !important;
    max-height: 120px;
    overflow-y: auto;
  }

  .timeslot-btn {
    padding: 8px 4px !important;
    font-size: 11px !important;
    border-radius: 4px !important;
  }

  .no-slots-message {
    padding: 10px;
    font-size: 11px;
  }

  .no-slots-message svg {
    width: 16px;
    height: 16px;
  }

  /* Compact patient search */
  .patient-search-group {
    margin-bottom: 8px !important;
  }

  .patient-search-group label {
    font-size: 11px !important;
    margin-bottom: 4px !important;
  }

  .patient-search-input {
    padding: 8px 32px 8px 10px !important;
    font-size: 13px !important;
  }

  .selected-patient-display {
    padding: 8px !important;
    margin-top: 6px !important;
  }

  .selected-patient-info .patient-avatar svg {
    width: 18px !important;
    height: 18px !important;
  }

  .selected-patient-info .patient-details strong {
    font-size: 12px !important;
  }

  .selected-patient-info .patient-details span {
    font-size: 10px !important;
  }

  #btn-add-new-patient {
    padding: 8px 12px !important;
    font-size: 11px !important;
    margin-top: 6px !important;
  }

  #btn-add-new-patient svg {
    width: 14px !important;
    height: 14px !important;
  }

  /* Hide view patient info on mobile */
  #view-patient-info-group {
    display: none !important;
  }

  /* Compact wizard footer */
  .wizard-footer {
    flex-shrink: 0;
    padding: 8px 12px;
    gap: 8px;
    border-top: 1px solid var(--charcoal-700, #36363D);
  }

  .wizard-back,
  .wizard-next,
  .wizard-finish,
  .wizard-skip {
    padding: 10px 16px !important;
    font-size: 13px !important;
    flex: 1;
    min-width: 0;
  }

  /* Skip button styling */
  .wizard-skip {
    background: transparent !important;
    border: 1px solid var(--charcoal-500) !important;
    color: var(--charcoal-300) !important;
  }
}

/* Extra compact for very small screens */
@media (max-width: 380px) {
  .wizard-header {
    padding: 8px 10px;
  }

  .wizard-header h2 {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .wizard-step .step-number {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }

  .wizard-step .step-label {
    font-size: 8px;
  }

  .wizard-panel {
    padding: 8px 10px;
  }

  .booking-cascade-group {
    padding: 6px 8px !important;
    margin-bottom: 6px !important;
  }

  .booking-cascade-select {
    padding: 6px 8px !important;
    font-size: 12px !important;
  }

  .timeslots-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    max-height: 100px;
  }

  .timeslot-btn {
    padding: 6px 2px !important;
    font-size: 10px !important;
  }

  .wizard-footer {
    padding: 6px 10px;
  }

  .wizard-back,
  .wizard-next,
  .wizard-finish,
  .wizard-skip {
    padding: 8px 12px !important;
    font-size: 12px !important;
  }
}

/* Landscape mode optimization */
@media (max-height: 500px) and (orientation: landscape) {
  .wizard-header {
    padding: 6px 10px;
  }

  .wizard-header h2 {
    font-size: 13px;
    margin-bottom: 4px;
  }

  .wizard-steps {
    gap: 10px;
  }

  .wizard-step .step-number {
    width: 18px;
    height: 18px;
    font-size: 9px;
  }

  .wizard-step .step-label {
    display: none; /* Hide labels in landscape to save vertical space */
  }

  .wizard-panel {
    padding: 6px 10px;
  }

  .wizard-panel h3 {
    font-size: 13px;
    margin-bottom: 2px;
  }

  .wizard-panel > .help-text {
    display: none;
  }

  .booking-cascade-group {
    padding: 4px 8px !important;
    margin-bottom: 4px !important;
  }

  .booking-cascade-group label {
    font-size: 10px !important;
    margin-bottom: 2px !important;
  }

  .booking-cascade-select {
    padding: 5px 8px !important;
    font-size: 11px !important;
  }

  .timeslots-grid {
    grid-template-columns: repeat(6, 1fr) !important;
    max-height: 60px;
  }

  .timeslot-btn {
    padding: 4px 2px !important;
    font-size: 9px !important;
  }

  .wizard-footer {
    padding: 4px 10px;
  }
}

/* iPad / Tablet optimization */
@media (min-width: 769px) and (max-width: 1024px) {
  #chart-init-wizard .ennu-fc-modal-content,
  .modal-wizard {
    max-width: 600px;
    max-height: 90vh;
  }

  .booking-cascade-group {
    margin-bottom: 10px;
    padding: 10px 14px;
  }

  .timeslots-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Two-column layout for booking fields on larger mobile/tablet */
@media (min-width: 500px) and (max-width: 768px) {
  .wizard-panel[data-panel="1"] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .wizard-panel[data-panel="1"] h3,
  .wizard-panel[data-panel="1"] > .help-text {
    grid-column: 1 / -1;
  }

  .wizard-panel[data-panel="1"] .patient-search-group {
    grid-column: 1 / -1;
  }

  /* Timeslots take full width */
  .wizard-panel[data-panel="1"] .booking-cascade-group:has(.timeslots-grid) {
    grid-column: 1 / -1;
  }
}

/* Date & Time Row - Side by Side on Desktop */
.booking-datetime-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 8px;
}

.booking-datetime-row .booking-date-group {
  min-width: 0;
}

.booking-datetime-row .booking-time-group {
  min-width: 0;
}

/* Stack on mobile */
@media (max-width: 500px) {
  .booking-datetime-row {
    grid-template-columns: 1fr;
  }
}

/* Compact no-slots message */
.no-slots-message {
  font-size: 12px;
  padding: 8px;
  text-align: center;
}

/* Improve loading indicator */
.cascade-loading {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
}

/* Remove excessive booking group styling on mobile */
@media (max-width: 768px) {
  .modal-wizard .booking-cascade-group {
    background: rgba(0, 0, 0, 0.12);
  }
}

/* ========== WIZARD STEP 1 MOBILE COMPACTION ========== */

@media (max-width: 768px) {
  /* Hide non-essential sections on mobile */
  .wizard-panel[data-panel="1"] .notes-history,
  .wizard-panel[data-panel="1"] #wizard-notes-history,
  .wizard-panel[data-panel="1"] #wizard-no-notes-message,
  .wizard-panel[data-panel="1"] > .ennu-fc-form-group:has(.notes-history) {
    display: none !important;
  }

  /* Compact demographics section */
  .wizard-demographics-section {
    padding: 8px !important;
    margin-bottom: 8px !important;
  }

  .demographics-notice {
    font-size: 11px !important;
    margin-bottom: 6px !important;
  }

  .demographics-notice .dashicons {
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
  }

  /* Compact gender buttons */
  .gender-selection-buttons {
    display: flex;
    gap: 8px;
  }

  .gender-btn {
    flex: 1;
    padding: 10px 8px !important;
    min-height: auto !important;
  }

  .gender-btn svg {
    width: 24px !important;
    height: 24px !important;
  }

  .gender-btn span {
    font-size: 11px !important;
  }

  /* Hide gender help text */
  #wizard-gender-field .help-text,
  #wizard-age-field .help-text {
    display: none !important;
  }

  #wizard-gender-field label,
  #wizard-age-field label {
    font-size: 11px !important;
    margin-bottom: 4px !important;
  }

  #wizard-patient-dob {
    padding: 8px !important;
    font-size: 13px !important;
  }

  /* Compact patient search */
  .patient-search-container {
    margin-bottom: 4px;
  }

  .patient-search-input-wrapper {
    position: relative;
  }

  .search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
  }

  .search-icon svg {
    width: 14px !important;
    height: 14px !important;
  }

  /* Smaller add patient button */
  #btn-add-new-patient {
    width: 100%;
    justify-content: center;
  }
}

/* Extra small - stack everything tightly */
@media (max-width: 380px) {
  /* Even more compact on tiny screens */
  .wizard-panel[data-panel="1"] h3 {
    font-size: 13px;
  }

  .wizard-panel[data-panel="1"] > .help-text {
    display: none;
  }

  .gender-btn {
    padding: 8px 6px !important;
  }

  .gender-btn svg {
    width: 20px !important;
    height: 20px !important;
  }
}

/* ========== FIX: Previous Notes section visibility ========== */
/* Support for browsers without :has() */
@media (max-width: 768px) {
  .wizard-panel[data-panel="1"] > .ennu-fc-form-group:last-of-type {
    display: none !important; /* Hide last form group which contains notes */
  }
  
  /* But show patient search group */
  .wizard-panel[data-panel="1"] .patient-search-group {
    display: block !important;
  }
  
  /* Demographics section is important - keep visible but compact */
  .wizard-panel[data-panel="1"] .wizard-demographics-section {
    display: block !important;
  }
}

/* ========== WIZARD STEPS 2 & 3 MOBILE COMPACTION ========== */

@media (max-width: 768px) {
  /* Step 2 & 3 compaction */
  .wizard-panel[data-panel="2"],
  .wizard-panel[data-panel="3"] {
    padding: 12px;
  }

  .wizard-panel[data-panel="2"] h3,
  .wizard-panel[data-panel="3"] h3 {
    font-size: 14px;
    margin-bottom: 4px;
  }

  .wizard-panel[data-panel="2"] > .help-text,
  .wizard-panel[data-panel="3"] > .help-text {
    font-size: 11px;
    margin-bottom: 10px;
  }

  .wizard-panel[data-panel="2"] .ennu-fc-form-group,
  .wizard-panel[data-panel="3"] .ennu-fc-form-group {
    margin-bottom: 10px;
  }

  .wizard-panel[data-panel="2"] label,
  .wizard-panel[data-panel="3"] label {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .wizard-panel[data-panel="2"] .help-text,
  .wizard-panel[data-panel="3"] .help-text {
    display: none;
  }

  /* Compact provider display */
  .provider-info-display {
    padding: 8px !important;
  }

  .provider-info-display strong {
    font-size: 13px;
  }

  .provider-info-display small {
    font-size: 10px;
  }

  /* Compact notes textarea */
  #wizard-notes {
    padding: 8px !important;
    font-size: 13px !important;
  }

  /* Session title input */
  #wizard-session-title {
    padding: 8px 10px !important;
    font-size: 13px !important;
  }

  #wizard-session-type {
    padding: 8px 10px !important;
    font-size: 13px !important;
  }
}

/* ========== WIZARD FOOTER - Touch Friendly ========== */

@media (max-width: 768px) {
  .wizard-footer {
    display: flex;
    gap: 8px;
    padding: 10px 12px !important;
    background: var(--charcoal-900, #1A1A1E);
    border-top: 1px solid var(--charcoal-700, #36363D);
  }

  .wizard-footer .footer-spacer {
    display: none;
  }

  .wizard-back,
  .wizard-next,
  .wizard-finish {
    flex: 1;
    min-height: 44px; /* iOS touch target */
    font-size: 14px !important;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .wizard-back {
    flex: 0.7;
    background: transparent;
    border: 1px solid var(--charcoal-500);
    color: var(--charcoal-300);
  }

  .wizard-next,
  .wizard-finish {
    flex: 1;
    background: linear-gradient(135deg, var(--luxury-gold-dark, #B8954D) 0%, var(--luxury-gold, #C9A962) 100%);
    color: var(--charcoal-900);
    border: none;
  }
}

/* ========== WIZARD LOADING OVERLAY ========== */

.wizard-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.wizard-loading-box {
  text-align: center;
  color: white;
}

.wizard-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--luxury-gold, #C9A962);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

.wizard-loading-text {
  font-size: 14px;
  color: var(--charcoal-200);
}

/* ========== ENSURE WIZARD FITS VIEWPORT ========== */

@media (max-width: 768px) {
  #chart-init-wizard {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.9);
  }

  #chart-init-wizard .ennu-fc-modal-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  /* Ensure content area scrolls */
  #chart-init-wizard .wizard-panel {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Fixed header and footer */
  #chart-init-wizard .wizard-header,
  #chart-init-wizard .wizard-footer {
    flex-shrink: 0;
  }
}

/* ========== FIX: Timeslot Button Text Visibility ========== */

.timeslot-btn {
  color: #ffffff !important;
  background-color: #26262B !important;
  border-color: #4A4A54 !important;
}

.timeslot-btn:hover {
  color: #ffffff !important;
  background-color: #36363D !important;
  border-color: #C9A962 !important;
}

.timeslot-btn.selected {
  color: #1A1A1E !important;
  background: linear-gradient(135deg, #B8954D 0%, #C9A962 100%) !important;
  border-color: #C9A962 !important;
}

/* Ensure cascade loading spinner is visible */
.cascade-loading {
  color: #8E8E9A !important;
}

.cascade-loading .dashicons {
  color: #C9A962 !important;
}

/* No slots message visibility */
.no-slots-message {
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

/* ==========================================================================
   WIZARD DEMOGRAPHICS - Compact Fixed Above Footer
   ========================================================================== */

/* Demographics bar - fixed above footer */
.wizard-demographics-fixed {
  display: none; /* Hidden by default, shown via JS when needed */
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(26, 26, 30, 0.95) 0%, rgba(38, 38, 43, 0.98) 100%);
  border-top: 1px solid var(--charcoal-600, #4A4A54);
  padding: 10px 16px;
}

.wizard-demographics-fixed.visible {
  display: block;
}

/* Inline layout: Gender buttons + DOB input in one row */
.demographics-inline-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Compact gender toggle */
.gender-toggle-inline {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.gender-btn-compact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 14px;
  background: var(--charcoal-800, #26262B);
  border: 1px solid var(--charcoal-600, #4A4A54);
  border-radius: 6px;
  color: var(--charcoal-300, #B4B4BC);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 36px;
}

.gender-btn-compact svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

.gender-btn-compact:hover {
  background: var(--charcoal-700, #36363D);
  border-color: var(--luxury-gold, #C9A962);
  color: #fff;
}

.gender-btn-compact.selected {
  background: linear-gradient(135deg, var(--luxury-gold-dark, #B8954D) 0%, var(--luxury-gold, #C9A962) 100%);
  border-color: var(--luxury-gold, #C9A962);
  color: var(--charcoal-900, #1A1A1E);
}

.gender-btn-compact.selected svg {
  stroke: var(--charcoal-900, #1A1A1E);
}

/* Separator */
.demographics-separator {
  width: 1px;
  height: 24px;
  background: var(--charcoal-600, #4A4A54);
  flex-shrink: 0;
}

/* DOB inline input */
.dob-inline-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.dob-inline-label {
  font-size: 11px;
  color: var(--charcoal-400, #8E8E9A);
  white-space: nowrap;
  flex-shrink: 0;
}

.dob-inline-input {
  flex: 1;
  min-width: 120px;
  max-width: 160px;
  padding: 8px 10px;
  background: var(--charcoal-800, #26262B);
  border: 1px solid var(--charcoal-600, #4A4A54);
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
}

.dob-inline-input:focus {
  outline: none;
  border-color: var(--luxury-gold, #C9A962);
}

/* Mobile responsive */
@media (max-width: 480px) {
  .wizard-demographics-fixed {
    padding: 8px 12px;
  }

  .demographics-inline-row {
    gap: 8px;
  }

  .gender-btn-compact {
    padding: 6px 10px;
    font-size: 11px;
    min-height: 32px;
  }

  .gender-btn-compact svg {
    width: 12px;
    height: 12px;
  }

  .demographics-separator {
    display: none;
  }

  .dob-inline-group {
    width: 100%;
    margin-top: 6px;
  }

  .dob-inline-input {
    max-width: none;
  }
}

/* Extra small screens - stack everything */
@media (max-width: 360px) {
  .demographics-inline-row {
    flex-direction: column;
    align-items: stretch;
  }

  .gender-toggle-inline {
    justify-content: center;
  }

  .dob-inline-group {
    justify-content: center;
    margin-top: 8px;
  }
}

/* Hide old demographics section styling when using new fixed layout */
.wizard-demographics-section.hidden-for-fixed {
  display: none !important;
}

/* ==========================================================================
   FIX: Demographics Bar Styling with High Specificity
   ========================================================================== */

#wizard-demographics-fixed {
  display: none !important;
  background: linear-gradient(180deg, rgba(26, 26, 30, 0.98) 0%, rgba(38, 38, 43, 1) 100%) !important;
  border-top: 1px solid #4A4A54 !important;
  padding: 12px 16px !important;
  flex-shrink: 0 !important;
}

#wizard-demographics-fixed.visible {
  display: block !important;
}

#wizard-demographics-fixed .demographics-inline-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

#wizard-demographics-fixed .gender-toggle-inline {
  display: flex !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

#wizard-demographics-fixed .gender-btn-compact {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 10px 16px !important;
  background: #26262B !important;
  border: 2px solid #4A4A54 !important;
  border-radius: 8px !important;
  color: #B4B4BC !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  min-height: 40px !important;
}

#wizard-demographics-fixed .gender-btn-compact svg {
  width: 16px !important;
  height: 16px !important;
  stroke: currentColor !important;
  flex-shrink: 0 !important;
}

#wizard-demographics-fixed .gender-btn-compact:hover {
  background: #36363D !important;
  border-color: #C9A962 !important;
  color: #ffffff !important;
}

#wizard-demographics-fixed .gender-btn-compact.selected {
  background: linear-gradient(135deg, #B8954D 0%, #C9A962 100%) !important;
  border-color: #C9A962 !important;
  color: #1A1A1E !important;
  box-shadow: 0 2px 8px rgba(201, 169, 98, 0.3) !important;
}

#wizard-demographics-fixed .gender-btn-compact.selected svg {
  stroke: #1A1A1E !important;
}

#wizard-demographics-fixed .demographics-separator {
  width: 1px !important;
  height: 28px !important;
  background: #4A4A54 !important;
  flex-shrink: 0 !important;
}

#wizard-demographics-fixed .dob-inline-group {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 1 !important;
  min-width: 0 !important;
}

#wizard-demographics-fixed .dob-inline-label {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #B4B4BC !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

#wizard-demographics-fixed #wizard-patient-dob,
#wizard-demographics-fixed .dob-inline-input {
  flex: 1 !important;
  min-width: 130px !important;
  max-width: 180px !important;
  padding: 10px 12px !important;
  background: #26262B !important;
  border: 2px solid #4A4A54 !important;
  border-radius: 8px !important;
  color: #ffffff !important;
  font-size: 14px !important;
}

#wizard-demographics-fixed #wizard-patient-dob:focus,
#wizard-demographics-fixed .dob-inline-input:focus {
  outline: none !important;
  border-color: #C9A962 !important;
  box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.15) !important;
}

/* Mobile responsive */
@media (max-width: 500px) {
  #wizard-demographics-fixed {
    padding: 10px 12px !important;
  }

  #wizard-demographics-fixed .demographics-inline-row {
    gap: 8px !important;
  }

  #wizard-demographics-fixed .gender-btn-compact {
    padding: 8px 12px !important;
    font-size: 12px !important;
    min-height: 36px !important;
  }

  #wizard-demographics-fixed .gender-btn-compact svg {
    width: 14px !important;
    height: 14px !important;
  }

  #wizard-demographics-fixed .demographics-separator {
    display: none !important;
  }

  #wizard-demographics-fixed .dob-inline-group {
    width: 100% !important;
    margin-top: 8px !important;
  }

  #wizard-demographics-fixed #wizard-patient-dob {
    max-width: none !important;
    width: 100% !important;
  }
}

/* ==========================================================================
   MEMBER PRICING & PRICING UNIT DISPLAY
   ========================================================================== */

/* Member price display in product cards */
.treatment-product-card .member-price {
  display: block;
  font-size: var(--text-sm);
  color: var(--accent-success, #10b981);
  font-weight: var(--font-semibold);
  margin-top: 4px;
}

/* Pricing type indicator */
.treatment-product-card .product-pricing-type {
  display: inline-block;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  text-transform: capitalize;
}

/* Product details layout for member price */
.treatment-product-card .product-details {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.treatment-product-card .product-details .product-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Quantity controls disabled state for flat-rate products */
.quantity-row.quantity-disabled,
.treatment-quantity-group.quantity-disabled,
#treatment-quantity-group.quantity-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.quantity-row.quantity-disabled::after {
  content: 'Fixed quantity';
  display: block;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* Member pricing in order summary */
.order-item .member-savings {
  font-size: var(--text-xs);
  color: var(--accent-success, #10b981);
  margin-left: 8px;
}

/* Unit label in price display */
.treatment-product-card .product-price .unit-suffix {
  font-size: var(--text-sm);
  font-weight: var(--font-normal);
  color: var(--text-tertiary);
}
