/* ══════════════════════════════════════════════════════════════
   HandymanPro Navy/Gold Theme — Light & Dark Mode
   ══════════════════════════════════════════════════════════════ */

/* ── Brand Tokens (constant) ─────────────────────────────────── */
:root {
  --navy-deep:    #0D2B47;
  --navy-darker:  #091E33;
  --navy-mid:     #1E3A5F;
  --gold:         #C4A35A;
  --gold-hover:   #d4b36a;
  --gold-muted:   rgba(196, 163, 90, 0.55);
}

/* ── Light Mode ───────────────────────────────────────────────── */
:root, .light {
  --bg-page:        #f4f6f9;
  --bg-surface:     #ffffff;
  --bg-surface-2:   #f8fafc;
  --border:         #e2e8f0;
  --border-strong:  #cbd5e1;
  --shadow-card:    0 2px 8px rgba(0,0,0,0.05);
  --shadow-topbar:  0 1px 4px rgba(0,0,0,0.06);
  --text-primary:   #111827;
  --text-body:      #374151;
  --text-secondary: #64748b;
  --text-muted:     #94a3b8;
  --text-accent:    #0D2B47;
  --green:          #059669;
  --amber:          #d97706;
  --red:            #dc2626;
  --blue:           #3b82f6;
}

/* ── Dark Mode ────────────────────────────────────────────────── */
.dark {
  --bg-page:        #091E33;
  --bg-surface:     #0D2B47;
  --bg-surface-2:   rgba(0, 0, 0, 0.2);
  --border:         rgba(196, 163, 90, 0.15);
  --border-strong:  rgba(196, 163, 90, 0.25);
  --shadow-card:    0 4px 16px rgba(0,0,0,0.2);
  --shadow-topbar:  0 2px 8px rgba(0,0,0,0.2);
  --text-primary:   #ffffff;
  --text-body:      rgba(255, 255, 255, 0.8);
  --text-secondary: rgba(255, 255, 255, 0.5);
  --text-muted:     rgba(255, 255, 255, 0.3);
  --text-accent:    #C4A35A;
  --green:          #4ade80;
  --amber:          #fb923c;
  --red:            #f87171;
  --blue:           #60a5fa;
}

/* ── Base Typography ──────────────────────────────────────────── */
body {
  font-size: 15px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-page) !important;
  color: var(--text-body) !important;
  transition: background 0.2s, color 0.2s;
}

/* ══════════════════════════════════════════════════════════════
   SIDEBAR — always navy/gold in both modes
   ══════════════════════════════════════════════════════════════ */
.hp-sidebar {
  width: 256px;
  min-height: 100%;
  background: linear-gradient(180deg, #0D2B47 0%, #091E33 100%) !important;
  border-right: 1px solid rgba(196,163,90,0.2) !important;
}

.hp-sidebar .nav-section-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(196,163,90,0.55);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.hp-sidebar .nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  padding: 10px 12px;
  border-radius: 8px;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.hp-sidebar .nav-item:hover {
  background: rgba(196,163,90,0.1);
  color: rgba(255,255,255,0.9);
}
.hp-sidebar .nav-item.active {
  background: rgba(196,163,90,0.18);
  color: #C4A35A;
  border: 1px solid rgba(196,163,90,0.3);
}
.hp-sidebar .nav-item svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.hp-sidebar .nav-badge {
  background: #C4A35A;
  color: #0D2B47;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.hp-sidebar .comms-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #C4A35A;
  margin-left: 2px;
}

.hp-sidebar .nav-divider {
  border-color: rgba(196,163,90,0.12);
}

/* ══════════════════════════════════════════════════════════════
   TOP BAR
   ══════════════════════════════════════════════════════════════ */
.hp-topbar {
  height: 66px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-topbar);
  transition: background 0.2s, border-color 0.2s;
}
.dark .hp-topbar {
  background: #0D2B47;
}

.hp-topbar .page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-accent);
}
.hp-topbar .page-sub {
  font-size: 13px;
  color: var(--text-secondary);
}

/* User avatar — navy bg + gold initials */
.hp-avatar {
  background: var(--navy-deep);
  color: #C4A35A;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
}
.hp-avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.hp-avatar-md { width: 40px; height: 40px; font-size: 15px; }
.hp-avatar-lg { width: 48px; height: 48px; font-size: 18px; }
.hp-avatar-xl { width: 64px; height: 64px; font-size: 24px; }

/* Theme toggle */
.hp-topbar .theme-toggle {
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: background 0.15s;
}
.hp-topbar .theme-toggle:hover {
  background: rgba(0,0,0,0.05);
}
.dark .hp-topbar .theme-toggle:hover {
  background: rgba(255,255,255,0.08);
}

/* User dropdown */
.hp-dropdown {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.dark .hp-dropdown {
  background: #0D2B47;
  border-color: rgba(196,163,90,0.2);
}
.hp-dropdown a, .hp-dropdown button {
  color: var(--text-body);
}
.hp-dropdown a:hover, .hp-dropdown button:hover {
  background: rgba(0,0,0,0.04);
}
.dark .hp-dropdown a:hover, .dark .hp-dropdown button:hover {
  background: rgba(255,255,255,0.06);
}

/* ══════════════════════════════════════════════════════════════
   CARDS / PANELS
   ══════════════════════════════════════════════════════════════ */
.hp-card {
  background: var(--bg-surface);
  border-radius: 12px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.dark .hp-card {
  background: linear-gradient(145deg, #0D2B47, #091E33);
  border: 1px solid rgba(196,163,90,0.15);
}
/* Gold accent bar — dark mode only */
.dark .hp-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #C4A35A, transparent);
  z-index: 1;
}

.hp-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.hp-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.hp-card-body {
  padding: 16px 20px;
}

/* ══════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════ */
.hp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14px;
  transition: all 0.15s;
  cursor: pointer;
  white-space: nowrap;
}

/* Primary — gold CTA */
.hp-btn-primary {
  background: linear-gradient(135deg, #C4A35A, #a8894a);
  color: #0D2B47;
  font-weight: 700;
  border: none;
  box-shadow: 0 2px 8px rgba(196,163,90,0.3);
}
.hp-btn-primary:hover {
  background: linear-gradient(135deg, #d4b36a, #b8996a);
}

/* Secondary / ghost */
.hp-btn-secondary {
  background: #ffffff;
  color: #0D2B47;
  border: 1.5px solid #e2e8f0;
}
.hp-btn-secondary:hover {
  border-color: #C4A35A;
  color: #C4A35A;
}
.dark .hp-btn-secondary {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.15);
}
.dark .hp-btn-secondary:hover {
  border-color: rgba(196,163,90,0.4);
  color: #C4A35A;
}

/* Danger */
.hp-btn-danger {
  background: var(--red);
  color: #fff;
  border: none;
}
.hp-btn-danger:hover {
  opacity: 0.9;
}

/* Small variant */
.hp-btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* ══════════════════════════════════════════════════════════════
   TABLES
   ══════════════════════════════════════════════════════════════ */
.hp-table {
  width: 100%;
  border-collapse: collapse;
}
.hp-table thead th {
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  text-align: left;
}
.dark .hp-table thead th {
  color: rgba(196,163,90,0.7);
}

.hp-table tbody td {
  padding: 15px 18px;
  font-size: 14px;
  color: var(--text-body);
  border-bottom: 1px solid var(--border);
}
.hp-table tbody tr:hover td {
  background: rgba(0,0,0,0.02);
}
.dark .hp-table tbody tr:hover td {
  background: rgba(255,255,255,0.02);
}

/* ══════════════════════════════════════════════════════════════
   STATUS BADGES
   ══════════════════════════════════════════════════════════════ */
.hp-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

/* Light */
.hp-badge-active, .hp-badge-paid, .hp-badge-complete {
  background: #dcfce7; color: #15803d;
}
.hp-badge-vip {
  background: #fef9ec; color: #92600a; border: 1px solid rgba(196,163,90,0.3);
}
.hp-badge-inactive, .hp-badge-draft {
  background: #f3f4f6; color: #6b7280;
}
.hp-badge-sent, .hp-badge-scheduled {
  background: #dbeafe; color: #1e40af;
}
.hp-badge-overdue {
  background: #fee2e2; color: #991b1b;
}
.hp-badge-progress {
  background: #fef3c7; color: #92400e;
}

/* Dark */
.dark .hp-badge-active, .dark .hp-badge-paid, .dark .hp-badge-complete {
  background: rgba(74,222,128,0.12); color: #4ade80; border: none;
}
.dark .hp-badge-vip, .dark .hp-badge-progress {
  background: rgba(196,163,90,0.15); color: #C4A35A; border: 1px solid rgba(196,163,90,0.2);
}
.dark .hp-badge-inactive, .dark .hp-badge-draft {
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); border: none;
}
.dark .hp-badge-sent, .dark .hp-badge-scheduled {
  background: rgba(96,165,250,0.12); color: #60a5fa; border: none;
}
.dark .hp-badge-overdue {
  background: rgba(248,113,113,0.12); color: #f87171; border: none;
}

/* ══════════════════════════════════════════════════════════════
   STAT CARDS (Dashboard, Invoices)
   ══════════════════════════════════════════════════════════════ */
.hp-stat-card {
  background: var(--bg-surface);
  border-radius: 12px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: background 0.2s, border-color 0.2s;
}
.dark .hp-stat-card {
  background: linear-gradient(145deg, #0D2B47, #091E33);
  border: 1px solid rgba(196,163,90,0.15);
}
.dark .hp-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #C4A35A, transparent);
}
.hp-stat-card .stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}
.hp-stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-top: 4px;
}
.hp-stat-card .stat-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Colored top borders for stat cards */
.hp-stat-card.stat-gold::before { background: linear-gradient(90deg, #C4A35A, transparent) !important; }
.hp-stat-card.stat-green::before { background: linear-gradient(90deg, var(--green), transparent) !important; }
.hp-stat-card.stat-amber::before { background: linear-gradient(90deg, var(--amber), transparent) !important; }
.hp-stat-card.stat-red::before { background: linear-gradient(90deg, var(--red), transparent) !important; }
.hp-stat-card.stat-blue::before { background: linear-gradient(90deg, var(--blue), transparent) !important; }
.hp-stat-card.stat-navy::before { background: linear-gradient(90deg, var(--navy-deep), transparent) !important; }

/* Light mode stat cards also get the top border */
.hp-stat-card.stat-gold::before,
.hp-stat-card.stat-green::before,
.hp-stat-card.stat-amber::before,
.hp-stat-card.stat-red::before,
.hp-stat-card.stat-blue::before,
.hp-stat-card.stat-navy::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

/* ══════════════════════════════════════════════════════════════
   FORM INPUTS
   ══════════════════════════════════════════════════════════════ */
.hp-input {
  width: 100%;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-body);
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hp-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196,163,90,0.15);
}
.dark .hp-input {
  background: rgba(0,0,0,0.2);
  border-color: rgba(255,255,255,0.12);
}
.dark .hp-input:focus {
  border-color: var(--gold);
}

.hp-select {
  padding: 9px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-body);
  font-size: 14px;
}
.dark .hp-select {
  background: rgba(0,0,0,0.2);
  border-color: rgba(255,255,255,0.12);
}

.hp-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ══════════════════════════════════════════════════════════════
   FILTER / TAB BAR
   ══════════════════════════════════════════════════════════════ */
.hp-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.hp-tab:hover {
  color: var(--text-primary);
  background: rgba(0,0,0,0.04);
}
.dark .hp-tab:hover {
  background: rgba(255,255,255,0.06);
}
.hp-tab.active {
  background: rgba(196,163,90,0.12);
  color: var(--gold);
  border-color: rgba(196,163,90,0.25);
}

.hp-tab-count {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  background: var(--bg-surface-2);
  color: var(--text-secondary);
}
.hp-tab.active .hp-tab-count {
  background: rgba(196,163,90,0.2);
  color: var(--gold);
}

/* ══════════════════════════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════════════════════════ */
.hp-modal-overlay {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}
.hp-modal {
  background: var(--bg-surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.dark .hp-modal {
  background: #0D2B47;
  border-color: rgba(196,163,90,0.2);
}

/* ══════════════════════════════════════════════════════════════
   PIPELINE KANBAN
   ══════════════════════════════════════════════════════════════ */
.hp-kanban-card {
  background: var(--bg-surface);
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 14px;
  transition: box-shadow 0.15s, border-color 0.15s;
  cursor: pointer;
}
.hp-kanban-card:hover {
  box-shadow: var(--shadow-card);
  border-color: var(--border-strong);
}
.dark .hp-kanban-card {
  background: rgba(0,0,0,0.15);
  border-color: rgba(196,163,90,0.1);
}
.dark .hp-kanban-card:hover {
  border-color: rgba(196,163,90,0.25);
}

/* Colored left borders for pipeline cards */
.hp-kanban-card.border-left-blue { border-left: 3px solid var(--blue); }
.hp-kanban-card.border-left-amber { border-left: 3px solid var(--amber); }
.hp-kanban-card.border-left-green { border-left: 3px solid var(--green); }
.hp-kanban-card.border-left-gold { border-left: 3px solid var(--gold); }
.hp-kanban-card.border-left-red { border-left: 3px solid var(--red); }

/* ══════════════════════════════════════════════════════════════
   SCHEDULE CALENDAR
   ══════════════════════════════════════════════════════════════ */
.hp-schedule-slot {
  border-bottom: 1px solid var(--border);
  min-height: 48px;
  transition: background 0.1s;
}
.hp-schedule-slot:hover {
  background: rgba(196,163,90,0.04);
}
.hp-schedule-ot {
  background: rgba(217,119,6,0.06);
}
.dark .hp-schedule-ot {
  background: rgba(251,146,60,0.06);
}
.hp-schedule-today {
  background: rgba(196,163,90,0.04);
}

/* ══════════════════════════════════════════════════════════════
   COMMUNICATIONS
   ══════════════════════════════════════════════════════════════ */
.hp-chat-bubble-out {
  background: var(--navy-deep);
  color: #fff;
  border-radius: 16px 16px 4px 16px;
  padding: 10px 16px;
  max-width: 70%;
}
.hp-chat-bubble-in {
  background: var(--bg-surface-2);
  color: var(--text-body);
  border-radius: 16px 16px 16px 4px;
  padding: 10px 16px;
  max-width: 70%;
}
.dark .hp-chat-bubble-in {
  background: rgba(255,255,255,0.06);
}

.hp-conv-active {
  border-left: 3px solid var(--gold);
  background: rgba(196,163,90,0.06);
}
.light .hp-conv-active, :root:not(.dark) .hp-conv-active {
  background: rgba(13,43,71,0.04);
  border-left-color: var(--navy-deep);
}

/* ══════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ══════════════════════════════════════════════════════════════ */
.text-theme-primary { color: var(--text-primary); }
.text-theme-body { color: var(--text-body); }
.text-theme-secondary { color: var(--text-secondary); }
.text-theme-muted { color: var(--text-muted); }
.text-theme-accent { color: var(--text-accent); }
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-amber { color: var(--amber); }
.text-red { color: var(--red); }
.text-blue { color: var(--blue); }

.bg-theme-page { background: var(--bg-page); }
.bg-theme-surface { background: var(--bg-surface); }
.bg-theme-surface-2 { background: var(--bg-surface-2); }
.border-theme { border-color: var(--border); }
.border-theme-strong { border-color: var(--border-strong); }
.divide-theme > :not([hidden]) ~ :not([hidden]) { border-color: var(--border); }
.ring-offset-theme { --tw-ring-offset-color: var(--bg-surface); }

/* Hover utilities */
.hover\:text-theme-primary:hover { color: var(--text-primary); }
.hover\:text-theme-body:hover { color: var(--text-body); }
.hover\:text-gold:hover { color: var(--gold); }
.hover\:bg-theme-surface:hover { background: var(--bg-surface); }
.hover\:bg-theme-surface-2:hover { background: var(--bg-surface-2); }
.hover\:border-theme-strong:hover { border-color: var(--border-strong); }

/* Quick Actions grid */
.hp-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.hp-quick-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-body);
  border: 1px solid var(--border);
  transition: all 0.15s;
  cursor: pointer;
}
.hp-quick-action:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Flash messages */
.hp-flash-success {
  background: rgba(5,150,105,0.1);
  border: 1px solid rgba(5,150,105,0.3);
  color: var(--green);
  border-radius: 10px;
  padding: 12px 16px;
}
.hp-flash-error {
  background: rgba(220,38,38,0.1);
  border: 1px solid rgba(220,38,38,0.3);
  color: var(--red);
  border-radius: 10px;
  padding: 12px 16px;
}

/* Pagination */
.hp-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}
.hp-pagination button, .hp-pagination a {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-body);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  transition: all 0.15s;
}
.hp-pagination button:hover, .hp-pagination a:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.hp-pagination .active {
  background: var(--gold);
  color: var(--navy-deep);
  border-color: var(--gold);
  font-weight: 700;
}

/* Loading spinner */
.hp-spinner {
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: hp-spin 0.8s linear infinite;
}
@keyframes hp-spin {
  to { transform: rotate(360deg); }
}

/* Tooltip */
.hp-tooltip {
  background: var(--navy-deep);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
}

/* Scrollbar styling */
.hp-sidebar::-webkit-scrollbar {
  width: 4px;
}
.hp-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.hp-sidebar::-webkit-scrollbar-thumb {
  background: rgba(196,163,90,0.2);
  border-radius: 4px;
}

/* Toast notification */
.hp-toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.hp-toast-success {
  background: var(--green);
  color: #fff;
}
.hp-toast-error {
  background: var(--red);
  color: #fff;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  .hp-sidebar {
    position: fixed;
    z-index: 40;
    height: 100vh;
    top: 0;
  }
  .hp-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
@media (max-width: 639px) {
  .hp-btn-overflow {
    display: none;
  }
}

/* ══════════════════════════════════════════════════════════════
   OVERRIDE OLD TAILWIND dark: PATTERNS
   These ensure the new theme variables take effect even when
   old Tailwind dark: classes remain on elements.
   ══════════════════════════════════════════════════════════════ */

/* Body-level overrides */
.dark body,
body.dark {
  background: var(--bg-page);
  color: var(--text-body);
}

/* Ensure cards/surfaces use theme vars */
.dark .bg-white {
  background: var(--bg-surface);
}

/* ══════════════════════════════════════════════════════════════
   LIGHT MODE INPUT OVERRIDES
   Fix hardcoded dark Tailwind classes on form inputs
   ══════════════════════════════════════════════════════════════ */
:root input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.sr-only),
:root select,
:root textarea,
.light input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.sr-only),
.light select,
.light textarea {
  background-color: #ffffff !important;
  color: #111827 !important;
  border-color: #e2e8f0 !important;
  border-width: 1.5px;
  border-radius: 8px;
}
:root input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.sr-only):focus,
:root select:focus,
:root textarea:focus,
.light input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.sr-only):focus,
.light select:focus,
.light textarea:focus {
  border-color: #0D2B47 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(13,43,71,0.08) !important;
}

/* Dark mode inputs keep their existing styling */
.dark input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.sr-only),
.dark select,
.dark textarea {
  background-color: rgba(0,0,0,0.2) !important;
  color: #ffffff !important;
  border-color: rgba(255,255,255,0.12) !important;
}
.dark input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.sr-only):focus,
.dark select:focus,
.dark textarea:focus {
  border-color: var(--gold) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(196,163,90,0.15) !important;
}

/* ══════════════════════════════════════════════════════════════
   CUSTOMER DETAIL — TWO-COLUMN LAYOUT
   ══════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  .customer-content-grid {
    flex-direction: row !important;
  }
  .customer-content-grid .customer-sidebar {
    width: 300px;
    flex-shrink: 0;
  }
  .customer-content-grid .customer-main {
    flex: 1;
    min-width: 0;
  }
}

/* Keep pac-container z-index */
.pac-container { z-index: 99999 !important; }

/* ══ CUSTOMER DETAIL TWO-COLUMN FORCE (override Tailwind flex-col) ══ */
@media (min-width: 1024px) {
  div.customer-content-grid {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
  }
  div.customer-content-grid > div.customer-sidebar {
    width: 300px !important;
    max-width: 300px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
  }
  div.customer-content-grid > div.customer-main {
    flex: 1 1 0% !important;
    min-width: 0 !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   MODAL MAX-HEIGHT UTILITIES (Tailwind safelist workaround)
   ══════════════════════════════════════════════════════════════ */
.max-h-\[60vh\] { max-height: 60vh; }
.max-h-\[75vh\] { max-height: 75vh; }
.max-h-\[80vh\] { max-height: 80vh; }
.max-h-\[85vh\] { max-height: 85vh; }
.max-h-\[90vh\] { max-height: 90vh; }
.max-h-\[95vh\] { max-height: 95vh; }
.max-h-\[96vh\] { max-height: 96vh; }
.min-h-0 { min-height: 0; }
