/* ================================================================
   HostFactor — WHMCS Custom Theme
   Bootstrap 5 Deep Integration | HostFactor Green Accent
   ================================================================ */

/* Google Fonts (Deferred & preconnected via header.tpl) */


/* ----------------------------------------------------------------
   1. CSS Custom Properties (Brand Tokens)
   ---------------------------------------------------------------- */
:root {
  /* Font Families */
  --font-heading: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Font Weights */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  /* Heading Font Sizes */
  --fs-display: clamp(2.25rem, 4vw, 2.5rem); /* 36px - 40px */
  --fs-h1: 2.00rem; /* 32px */
  --fs-h2: 1.75rem; /* 28px */
  --fs-h3: 1.25rem; /* 20px */
  --fs-h4: 1.00rem; /* 16px */

  /* Body Font Sizes */
  --fs-body: 0.9375rem; /* 15px */
  --fs-small: 0.85rem;  /* 13.6px */
  --fs-caption: 0.75rem;/* 12px */

  /* Line Heights */
  --lh-heading: 1.20;
  --lh-body: 1.50;
  --lh-caption: 1.00;

  /* Brand Defaults */
  --brand-primary: #16a34a;
  --brand-primary-rgb: 22, 163, 74;
  --brand-hover: #15803d;
  --brand-light: rgba(22, 163, 74, 0.08);
  --brand-dark: #14532d;
  --text-on-brand: #FFFFFF;

  /* Light Mode Palette */
  --bg-body: #fafafa;
  --bg-surface: #ffffff;
  --bg-elevated: #f4f4f5;
  --bg-input: #ffffff;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --border-subtle: #f3f4f6;

  /* Status Palette */
  --success: #16a34a;
  --success-bg: rgba(22, 163, 74, 0.08);
  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.08);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.08);
  --info: #16a34a;
  --info-bg: rgba(22, 163, 74, 0.06);

  /* Layout */
  --announcement-h: 0px; /* No announcement bar rendered; set to 38px if one is added */
  --topbar-h: 70px;
  --sidebar-w: 260px;
  --sidebar-w-collapsed: 68px;
}

/* Dark Mode Design Tokens (HostFactor) */
html[data-theme="dark"] {
  --brand-primary:   #22c55e;                 /* Primary buttons, active tabs, main action CTA */
  --brand-hover:     #4ade80;                 /* Hover and focus states for interactive green elements */
  --brand-light:     rgba(34, 197, 94, 0.15); /* Active backgrounds, badge fills */
  --brand-dark:      #14532d;                 /* Hero card accents, dark container backgrounds */
  --brand-primary-rgb: 34, 197, 94;

  --text-primary:    #f9fafb;                 /* Headings, titles, main body text */
  --text-secondary:  #d1d5db;                 /* Subtitles, secondary navigation items */
  --text-muted:      #9ca3af;                 /* Placeholders, captions, disabled text */
  --text-on-brand:   #FFFFFF;                 /* Text on top of solid green buttons/badges */

  --bg-body:         #030712;                 /* Main layout background */
  --bg-surface:      #111827;                 /* Cards, sidebar, modal background */
  --bg-elevated:     #1f2937;                 /* Input fields, active row zebra stripes, dropdowns */
  --bg-input:        #1f2937;

  --border-color:    #1f2937;                 /* Card outlines, table dividers, panel borders */
  --border-subtle:   #182230;
  
  --success-bg: rgba(34, 197, 94, 0.15);
  --warning-bg: rgba(217, 119, 6, 0.2);
  --danger-bg: rgba(220, 38, 38, 0.2);
  --info-bg: rgba(34, 197, 94, 0.15);
}

/* Force override of hardcoded background colors and text colors in Dark Mode */
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .bg-light,
html[data-theme="dark"] [style*="background: #ffffff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background: white"],
html[data-theme="dark"] [style*="background-color: #ffffff"],
html[data-theme="dark"] [style*="background-color: #fff"],
html[data-theme="dark"] [style*="background-color: white"] {
  background-color: var(--bg-surface) !important;
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
}

html[data-theme="dark"] .text-dark,
html[data-theme="dark"] [style*="color: #1a1a1a"],
html[data-theme="dark"] [style*="color: #333"],
html[data-theme="dark"] [style*="color: #111"] {
  color: var(--text-primary) !important;
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] [style*="color: #757575"],
html[data-theme="dark"] [style*="color: #666"],
html[data-theme="dark"] [style*="color: #888"] {
  color: var(--text-muted) !important;
}

html[data-theme="dark"] .card-header,
html[data-theme="dark"] .panel-heading {
  background-color: var(--bg-elevated) !important;
  border-bottom-color: var(--border-color) !important;
}

html[data-theme="dark"] .border-bottom,
html[data-theme="dark"] [style*="border-bottom: 1px solid"] {
  border-bottom-color: var(--border-color) !important;
}

html[data-theme="dark"] .border,
html[data-theme="dark"] [style*="border: 1px solid"] {
  border-color: var(--border-color) !important;
}

/* Easing styles for theme transition icon buttons */
.d-none-theme-dark, .d-none-theme-light {
  transition: opacity 0.2s ease;
}
html[data-theme="dark"] .d-none-theme-dark {
  display: none !important;
}
html:not([data-theme="dark"]) .d-none-theme-light {
  display: none !important;
}

/* ----------------------------------------------------------------
   2. Bootstrap Overrides
   ---------------------------------------------------------------- */
body {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-body);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-primary); text-decoration: none; transition: color 0.15s; }
a:hover, a:focus { color: var(--brand-hover); text-decoration: none !important; }

h1, h2, h3, h4, h5, h6 { color: var(--text-primary); font-weight: 600; }

/* Override Bootstrap card */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.card-header {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.75rem 1rem;
}
.card-body { padding: 1rem; }

/* Override Bootstrap table */
.table { color: var(--text-primary); --bs-table-bg: transparent; }
.table > :not(caption) > * > * { border-bottom-color: var(--border-subtle); padding: 0.75rem 1rem; }
.table-hover > tbody > tr:hover > * { background-color: var(--brand-light); color: var(--text-primary); }
.table thead.table-dark th {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border-bottom: 2px solid var(--brand-primary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Override Bootstrap form-control */
.form-control, .form-select {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 6px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, .form-select:focus {
  background-color: var(--bg-input);
  border-color: var(--brand-primary);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.15);
}
.form-floating > label { color: var(--text-muted); }
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: var(--brand-primary);
}
.form-check-input:checked {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}

/* Override Bootstrap badges */
.badge { font-weight: 500; letter-spacing: 0.3px; }
.badge.bg-success { background-color: var(--success-bg) !important; color: var(--success) !important; border: 1px solid rgba(63,185,80,0.2); }
.badge.bg-warning { background-color: var(--warning-bg) !important; color: var(--warning) !important; border: 1px solid rgba(210,153,34,0.2); }
.badge.bg-danger { background-color: var(--danger-bg) !important; color: var(--danger) !important; border: 1px solid rgba(248,81,73,0.2); }
.badge.bg-info { background-color: var(--info-bg) !important; color: var(--info) !important; border: 1px solid rgba(88,166,255,0.2); }
.badge.bg-secondary { background-color: rgba(139,148,158,0.1) !important; color: var(--text-secondary) !important; border: 1px solid var(--border-color); }

/* Override Bootstrap alerts */
.alert { border-radius: 8px; font-size: 0.875rem; }

/* ----------------------------------------------------------------
   3. Button System
   ---------------------------------------------------------------- */

/* Primary CTA */
.btn-brand {
  background: var(--brand-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.5rem;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(var(--brand-primary-rgb), 0.3);
  transition: all 0.2s;
}
.btn-brand:hover {
  background: var(--brand-hover);
  color: #fff;
  box-shadow: 0 4px 12px rgba(var(--brand-primary-rgb), 0.4);
  transform: translateY(-1px);
}

/* Outline secondary */
.btn-outline-custom {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  font-weight: 500;
  transition: all 0.2s;
}
.btn-outline-custom:hover {
  background: var(--brand-light);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* Danger outline */
.btn-outline-danger-custom {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(248,81,73,0.3);
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  font-weight: 500;
  transition: all 0.2s;
}
.btn-outline-danger-custom:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
}

/* Legacy compat */
.btn-primary-custom { 
  background: var(--brand-primary); color: #fff; border: none; 
  border-radius: 8px; padding: 0.5rem 1.5rem; font-weight: 500;
  box-shadow: 0 2px 4px rgba(var(--brand-primary-rgb), 0.3); transition: all 0.2s;
}
.btn-primary-custom:hover {
  background: var(--brand-hover); color: #fff;
  box-shadow: 0 4px 12px rgba(var(--brand-primary-rgb), 0.4); transform: translateY(-1px);
}

/* ----------------------------------------------------------------
   4. Layout Structure
   ---------------------------------------------------------------- */
#snbd-wrapper { display: flex; min-height: 100vh; }

/* ----------------------------------------------------------------
   5. Sidebar Navigation
   ---------------------------------------------------------------- */
#snbd-sidebar {
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid #f0f0f0;
  position: fixed;
  top: var(--announcement-h);
  left: 0;
  height: calc(100vh - var(--announcement-h));
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: width 0.25s, top 0.25s, height 0.25s;
  overflow-x: hidden;
  font-family: 'Inter', var(--font-sans) !important;
}
#snbd-sidebar { background: var(--bg-surface) !important; }
#snbd-sidebar.collapsed { width: var(--sidebar-w-collapsed); }

/* Brand Logo Container */
.snbd-brand-logo-container {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  border-bottom: 1px solid #f0f0f0;
  overflow: hidden;
  transition: all 0.25s ease;
}
.snbd-brand-logo {
  max-height: 34px;
  width: auto;
  transition: all 0.25s ease;
  display: block;
}

/* HostFactor.eu mark + wordmark (matches main website header) */
.hf-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  line-height: 1;
}
.hf-logo:hover,
.hf-logo:focus {
  text-decoration: none;
  color: inherit;
}
.hf-logo-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hf-logo-square {
  width: 1.25rem;
  height: 1.25rem;
  border: 3px solid #22c55e;
  border-radius: 0.125rem;
  background: transparent;
  display: block;
}
.hf-logo-word {
  font-family: 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary, #111827);
  white-space: nowrap;
}
.hf-logo-accent { color: #22c55e; }
.hf-logo-tld {
  font-size: 0.875rem;
  font-weight: 700;
  color: #9ca3af;
}
.hf-logo--on-dark .hf-logo-word { color: #ffffff; }
.hf-logo--on-dark .hf-logo-tld { color: #9ca3af; }
.hf-logo--centered {
  display: flex;
  justify-content: center;
}
html[data-theme="dark"] .hf-logo-word { color: #f9fafb; }
html[data-theme="dark"] .hf-logo--on-dark .hf-logo-word { color: #ffffff; }

.snbd-brand-logo-container .hf-logo-word { font-size: 1.35rem; }

#snbd-sidebar.collapsed .snbd-brand-logo-container {
  padding: 0;
  justify-content: center;
}
#snbd-sidebar.collapsed .snbd-brand-logo-container .hf-logo-word { display: none; }
#snbd-sidebar.collapsed .snbd-brand-logo-container .hf-logo {
  justify-content: center;
  width: 100%;
}
#snbd-sidebar.collapsed .snbd-brand-logo {
  max-height: 32px;
  width: 32px;
  object-fit: cover;
  object-position: left;
}

/* Nav Section Labels */
.nav-section-label {
  padding: 1.25rem 1.25rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #aaaaaa;
  white-space: nowrap;
}
#snbd-sidebar.collapsed .nav-section-label { opacity: 0; height: 0; padding: 0; overflow: hidden; }

/* Nav Menu */
.snbd-nav-menu {
  flex: 1;
  padding: 0.5rem 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Nav Items */
.snbd-nav-item {
  display: flex;
  align-items: center;
  padding: 0.65rem 1.25rem;
  color: #555555;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-size: 0.85rem;
  font-weight: 600;
  gap: 0.75rem;
  text-decoration: none;
  font-family: 'Inter', var(--font-sans) !important;
}
.snbd-nav-item:hover {
  background: #f6f6f6 !important;
  color: #111111 !important;
}
.snbd-nav-item.active {
  background: rgba(22, 163, 74, 0.04) !important;
  color: #16a34a !important;
  border-left-color: #16a34a;
}
.snbd-nav-item i {
  width: 1.5rem;
  font-size: 1.15rem;
  text-align: center;
  color: #777777;
  flex-shrink: 0;
  transition: color 0.2s;
}
.snbd-nav-item:hover i {
  color: #111111;
}
.snbd-nav-item.active i {
  color: #16a34a !important;
}
.snbd-nav-text { transition: opacity 0.2s; }
#snbd-sidebar.collapsed .snbd-nav-text { opacity: 0; width: 0; display: inline-block; pointer-events: none; }
.snbd-nav-toggle {
  width: 100%;
  background: transparent;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  text-align: left;
}
.snbd-nav-toggle .snbd-nav-chevron {
  width: auto;
  margin-left: auto;
  font-size: 0.95rem;
  transition: transform 0.2s ease;
}
.snbd-nav-toggle[aria-expanded="true"] .snbd-nav-chevron { transform: rotate(180deg); }
.snbd-nav-submenu {
  padding: 0.15rem 0 0.35rem 3rem;
}
.snbd-nav-subitem {
  display: block;
  padding: 0.42rem 1.25rem 0.42rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  text-decoration: none;
  border-left: 1px solid var(--border-color);
  transition: color 0.2s ease, background-color 0.2s ease;
}
.snbd-nav-subitem:hover,
.snbd-nav-subitem.active {
  color: #16a34a !important;
  background: rgba(22, 163, 74, 0.04);
  text-decoration: none;
}
.snbd-nav-divider {
  margin: 0.3rem 1.25rem 0.3rem 0.75rem;
  border-color: var(--border-color);
  opacity: 1;
}
#snbd-sidebar.collapsed .snbd-nav-submenu { display: none !important; }
#snbd-sidebar.collapsed .snbd-nav-toggle .snbd-nav-chevron { display: none; }

/* User Profile Block */
.snbd-user-profile {
  padding: 1rem 1.25rem;
  border-top: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  white-space: nowrap;
  overflow: hidden;
}
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #16a34a !important;
  color: #ffffff !important;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
  flex-shrink: 0;
  border: none !important;
}
.user-info { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-weight: 700; font-size: 0.85rem; color: #111111; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 0.72rem; color: #777777; overflow: hidden; text-overflow: ellipsis; }
#snbd-sidebar.collapsed .snbd-user-profile .user-info { display: none; }

/* ----------------------------------------------------------------
   6. Main Content Area
   ---------------------------------------------------------------- */
#snbd-main {
  flex: 1;
  min-width: 0; /* CRITICAL: Prevents flex child from overflowing viewport to the right */
  margin-left: var(--sidebar-w); /* Offset for fixed sidebar */
  margin-top: calc(var(--announcement-h) + var(--topbar-h));
  display: flex;
  flex-direction: column;
  transition: margin-left 0.25s ease, margin-top 0.25s ease;
  min-height: calc(100vh - var(--announcement-h) - var(--topbar-h));
  background-color: var(--bg-body) !important;
}
#snbd-sidebar.collapsed ~ #snbd-main { margin-left: var(--sidebar-w-collapsed); }

/* Announcement Bar Styles */
.snbd-announcement-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--announcement-h);
  background-color: #0f0f11;
  z-index: 1060;
  display: flex;
  align-items: center;
  font-family: 'Inter', var(--font-sans), sans-serif;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.announcement-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.announcement-left {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.announcement-badge {
  background-color: var(--brand-primary);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.announcement-text {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.78rem;
  font-weight: 500;
}
.announcement-right {
  display: flex;
  align-items: center;
}
.announcement-link {
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: opacity 0.2s;
}
.announcement-link:hover {
  opacity: 0.8;
  color: #ffffff;
}

/* ----------------------------------------------------------------
   7. Top Navbar
   ---------------------------------------------------------------- */
#snbd-topbar {
  height: var(--topbar-h);
  background: var(--bg-surface);
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: fixed;
  top: var(--announcement-h);
  left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  z-index: 1050;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
  transition: left 0.25s ease, width 0.25s ease, top 0.25s ease;
}
#snbd-sidebar.collapsed ~ #snbd-main #snbd-topbar {
  left: var(--sidebar-w-collapsed);
  width: calc(100% - var(--sidebar-w-collapsed));
}
.topbar-left-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1 1 auto;
  min-width: 0;
}
.toggle-sidebar-btn {
  background: none; border: none;
  color: var(--text-secondary); font-size: 1.125rem;
  cursor: pointer; padding: 0.6rem;
  min-width: 44px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; transition: all 0.2s;
}
.toggle-sidebar-btn:hover { background: #f5f5f5; color: #16a34a; }

/* Topbar Breadcrumb */
.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: 'Inter', var(--font-sans), sans-serif;
}
.tb-crumb {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tb-crumb:hover { color: var(--brand-primary); }
.tb-crumb-home { color: var(--text-muted); font-size: 1rem; flex-shrink: 0; }
.tb-crumb-sep { color: var(--text-muted); font-size: 0.7rem; flex-shrink: 0; }
.tb-crumb-current { color: var(--text-primary); font-weight: 600; }

.topbar-right { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.topbar-icon-btn {
  background: none; border: none;
  color: var(--text-secondary); font-size: 1rem;
  cursor: pointer; position: relative;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  padding: 0;
}
.topbar-icon-btn:hover { background: #f5f5f5 !important; color: #16a34a !important; }
a.topbar-icon-btn { text-decoration: none; }
.notification-badge {
  position: absolute; top: 0; right: 0;
  background: var(--brand-primary); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  padding: 1px 5px; border-radius: 8px;
  line-height: 1.2;
}

/* WHMCS client-alert popover */
.popover-user-notifications {
  min-width: 330px;
  max-width: 380px;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-elevated);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  font-family: 'Inter', sans-serif;
}
.popover-user-notifications .popover-body {
  padding: 0 !important;
  color: var(--text-primary);
  background: var(--bg-elevated);
}
.popover-user-notifications .popover-inner,
.popover-user-notifications .popover-header {
  color: var(--text-primary);
  background: var(--bg-elevated);
  border-color: var(--border-color);
}
.popover-user-notifications .popover-header {
  border-bottom: 0;
}
.popover-user-notifications .client-alerts {
  margin: 0;
  padding: 0;
  list-style: none;
}
.popover-user-notifications .client-alerts li {
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--border-color);
}
.popover-user-notifications .client-alerts li:last-child {
  border-bottom: 0;
}
.popover-user-notifications .client-alerts li a {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.45;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.popover-user-notifications .client-alerts li a:hover {
  background: var(--brand-light);
  color: var(--brand-primary);
}
.popover-user-notifications .client-alerts li i.fas,
.popover-user-notifications .client-alerts li i.far {
  flex: 0 0 auto;
  float: none;
  padding-top: 0.1rem;
  font-size: 1rem;
}
.popover-user-notifications .client-alerts li .message {
  margin: 0;
}
.popover-user-notifications .client-alerts li.none {
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  text-align: center;
}
@media (max-width: 480px) {
  .popover-user-notifications {
    min-width: min(330px, calc(100vw - 2rem));
  }
}

/* Profile dropdown button (avatar + name) */
.topbar-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  outline: none;
  padding: 0;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  font-family: 'Inter', var(--font-sans), sans-serif;
}
.topbar-profile-btn:hover,
.topbar-profile-btn:focus,
.topbar-profile-btn:focus-visible,
.topbar-profile.show .topbar-profile-btn {
  border: 0;
  box-shadow: none;
  outline: none;
  text-decoration: none;
  color: var(--text-primary);
}
.topbar-profile-name {
  text-decoration: none;
}
.topbar-profile-chevron {
  font-size: 0.9rem;
  line-height: 1;
}
.topbar-profile-avatar {
  width: 30px; height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.topbar-profile-btn.dropdown-toggle::after { display: none; }
.topbar-profile .dropdown-menu {
  min-width: 240px;
  border: 1px solid #eeeeee;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  border-radius: 10px;
  padding: 0.5rem;
  margin-top: 0.5rem;
}
.topbar-profile-heading {
  padding: 0.4rem 1rem 0.2rem;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}
.topbar-profile .dropdown-item {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  color: #444444;
  text-decoration: none;
  transition: all 0.15s ease;
}
.topbar-profile .dropdown-item:hover {
  background-color: var(--brand-light);
  color: var(--brand-primary);
}

/* Dashboard Button */
.btn-topbar-dashboard {
  background: var(--brand-primary) !important;
  color: #ffffff !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  padding: 0.45rem 1.25rem !important;
  box-shadow: 0 2px 4px rgba(22, 163, 74, 0.2) !important;
  transition: all 0.2s ease !important;
  border: none !important;
  text-decoration: none;
  display: inline-block;
}
.btn-topbar-dashboard:hover {
  background: var(--brand-hover) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3) !important;
  transform: translateY(-1px);
}

/* ----------------------------------------------------------------
   8. Content Container
   ---------------------------------------------------------------- */
.snbd-content { padding: 1.5rem 2rem; flex: 1; }

/* ----------------------------------------------------------------
   9. Shared Page Hero
   ---------------------------------------------------------------- */
.snbd-page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 104px;
  margin-bottom: 1.25rem;
  padding: 1rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: linear-gradient(125deg, #052e16 0%, #14532d 52%, #0f172a 100%);
  box-shadow: 0 14px 32px rgba(20, 83, 45, 0.18);
  color: #ffffff;
}
.snbd-page-hero__glow,
.snbd-page-hero__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.snbd-page-hero__glow {
  background: radial-gradient(circle at 82% 20%, rgba(74, 222, 128, 0.3), transparent 28%), radial-gradient(circle at 10% 110%, rgba(255, 255, 255, 0.12), transparent 38%);
}
.snbd-page-hero__grid {
  opacity: 0.16;
  background-image: linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
}
.snbd-page-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}
.snbd-page-hero__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: #bbf7d0;
  font-size: 1.35rem;
}
.snbd-page-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.3rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.7rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}
.snbd-page-hero__eyebrow span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.14);
}
.snbd-page-hero h1 {
  margin: 0;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: clamp(1.55rem, 2.5vw, 2.2rem);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.035em;
  line-height: 1.12;
}
.snbd-page-hero__title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.snbd-page-hero p {
  max-width: 650px;
  margin: 0.35rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  line-height: 1.55;
}
.snbd-page-hero__domain {
  color: #ffffff;
  font-weight: var(--fw-bold);
  text-decoration: none;
}
.snbd-page-hero__domain:hover {
  color: #bbf7d0;
  text-decoration: underline;
}
.snbd-page-hero__aside {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 0;
}
.snbd-page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}
.snbd-page-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--brand-primary);
  background: var(--brand-primary);
  color: var(--text-on-brand) !important;
  font-size: 0.82rem;
  font-weight: var(--fw-bold);
  text-decoration: none;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.snbd-page-hero__cta:hover {
  transform: translateY(-2px);
  border-color: var(--brand-hover);
  background: var(--brand-hover);
  color: var(--text-on-brand) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}
.snbd-page-hero__cta:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}
.snbd-page-hero__cta--secondary {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: none;
}
.snbd-page-hero__cta--secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Client-area survey prompt */
.snbd-survey-prompt {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid #fde68a;
  border-radius: 16px;
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
  box-shadow: 0 6px 20px rgba(180, 83, 9, 0.08);
}
.snbd-survey-prompt.alert-dismissible { padding-right: 3.75rem; }
.snbd-survey-prompt__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: #fef3c7;
  color: #b45309;
  font-size: 1.35rem;
}
.snbd-survey-prompt__content { flex: 1 1 auto; min-width: 0; }
.snbd-survey-prompt__title {
  margin: 0 0 0.2rem;
  color: #78350f;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: var(--fw-bold);
}
.snbd-survey-prompt__text {
  margin: 0;
  color: #92400e;
  font-size: 0.86rem;
  line-height: 1.5;
}
.snbd-survey-prompt__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  padding: 0.68rem 0.9rem;
  border-radius: 9px;
  background: #16a34a;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: var(--fw-bold);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.snbd-survey-prompt__action:hover {
  background: #15803d;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(21, 128, 61, 0.22);
}
.snbd-survey-prompt__close {
  position: absolute;
  top: 0.8rem;
  right: 0.85rem;
  opacity: 0.55;
}
.snbd-survey-prompt__close:hover { opacity: 0.85; }

/* Client-area current deals */
.snbd-deals { margin-bottom: 1.5rem; }
.snbd-deals__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}
.snbd-deals__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
  color: var(--brand-primary);
  font-size: 0.7rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.snbd-deals__eyebrow i { font-size: 0.9rem; }
.snbd-deals__title {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.03em;
}
.snbd-deals__note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: right;
}
.snbd-deals__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}
.snbd-deal-card {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 202px;
  flex-direction: column;
  overflow: hidden;
  padding: 1.15rem;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.045);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.snbd-deal-card::before {
  position: absolute;
  z-index: -1;
  top: -75px;
  right: -65px;
  width: 165px;
  height: 165px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.2), rgba(74, 222, 128, 0));
  content: '';
}
.snbd-deal-card:hover {
  transform: translateY(-3px);
  border-color: rgba(22, 163, 74, 0.42);
  box-shadow: 0 12px 25px rgba(20, 83, 45, 0.12);
}
.snbd-deal-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.snbd-deal-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(22, 163, 74, 0.1);
  color: var(--brand-primary);
  font-size: 1.2rem;
}
.snbd-deal-card__badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0.25rem 0.55rem;
  border-radius: 7px;
  background: #14532d;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.snbd-deal-card__title {
  margin: 1rem 0 0.3rem;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
}
.snbd-deal-card__description {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.83rem;
  line-height: 1.5;
}
.snbd-deal-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: max-content;
  margin-top: auto;
  padding-top: 1rem;
  color: var(--brand-primary);
  font-size: 0.8rem;
  font-weight: var(--fw-bold);
  text-decoration: none;
}
.snbd-deal-card__link:hover { color: #15803d; text-decoration: none; }
.snbd-deal-card__link i { transition: transform 0.2s ease; }
.snbd-deal-card__link:hover i { transform: translateX(3px); }
/* ----------------------------------------------------------------
   10. Dashboard Stat Cards
   ---------------------------------------------------------------- */
.stat-card {
  border: 1px solid var(--border-color) !important;
  transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.stat-card .stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
}
.stat-card .stat-icon.icon-services { background: var(--info-bg); color: var(--info); }
.stat-card .stat-icon.icon-invoices { background: var(--warning-bg); color: var(--warning); }
.stat-card .stat-icon.icon-balance { background: var(--danger-bg); color: var(--danger); }
.stat-card .stat-icon.icon-tickets { background: var(--success-bg); color: var(--success); }

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}
.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ----------------------------------------------------------------
   10. Service Cards (Premium Redesign)
   ---------------------------------------------------------------- */
.service-card {
  background: #ffffff !important;
  border: 1px solid #eeeeee !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.01) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  overflow: hidden;
  padding: 0.5rem;
}
.service-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 30px rgba(0,0,0,0.06) !important;
  border-color: #dddddd !important;
}
.service-card .card-body {
  padding: 1.25rem !important;
}
.service-card-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
}
.service-card-icon.active { background: rgba(46, 125, 50, 0.08); color: #2e7d32; }
.service-card-icon.pending { background: rgba(230, 81, 0, 0.08); color: #e65100; }
.service-card-icon.suspended { background: rgba(198, 40, 40, 0.08); color: #c62828; }
.service-card-icon.terminated { background: rgba(100, 100, 100, 0.08); color: #666666; }

/* ----------------------------------------------------------------
   11. Floating Action Button (FAB)
   ---------------------------------------------------------------- */
.fab-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 990; display: flex; flex-direction: column-reverse; align-items: center; gap: 0.75rem; }
.fab-main {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--brand-primary); color: #fff; border: none;
  font-size: 1.25rem; cursor: pointer;
  box-shadow: 0 4px 14px rgba(var(--brand-primary-rgb), 0.4);
  transition: transform 0.25s cubic-bezier(0.175,0.885,0.32,1.275);
  display: flex; align-items: center; justify-content: center;
}
.fab-main:hover { transform: scale(1.05); }
.fab-main.active { transform: rotate(45deg); }
.fab-menu { display: flex; flex-direction: column; gap: 0.625rem; pointer-events: none; }
.fab-item {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-surface); color: var(--text-primary);
  border: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0;
  transform: translateY(16px) scale(0.8);
  transition: all 0.25s cubic-bezier(0.175,0.885,0.32,1.275);
  position: relative; text-decoration: none;
}
.fab-item:hover { background: var(--brand-light); color: var(--brand-primary); border-color: var(--brand-primary); }
.fab-item[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute; right: 52px;
  background: var(--bg-surface); border: 1px solid var(--border-color);
  padding: 0.25rem 0.625rem; border-radius: 6px; font-size: 0.75rem; white-space: nowrap;
  opacity: 0; transform: translateX(8px); transition: all 0.15s; pointer-events: none;
  color: var(--text-primary);
}
.fab-item:hover::before { opacity: 1; transform: translateX(0); }
.fab-container.active .fab-menu { pointer-events: auto; }
.fab-container.active .fab-item { opacity: 1; transform: translateY(0) scale(1); }

/* ----------------------------------------------------------------
   12. Loading Overlay
   ---------------------------------------------------------------- */
#snbd-loader {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: var(--bg-body); z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 0.4s;
}
#snbd-loader .loader-logo {
  font-size: 2rem; font-weight: 700; color: var(--brand-primary);
  animation: pulseLogo 1.5s infinite; margin-bottom: 1.5rem;
}
@keyframes pulseLogo { 0%,100% { opacity: 0.7; } 50% { opacity: 1; } }
.loader-progress-wrap { width: 200px; height: 3px; background: var(--border-color); border-radius: 3px; overflow: hidden; }
.loader-progress-bar { width: 0; height: 100%; background: var(--brand-primary); transition: width 0.8s ease-in-out; }

/* ----------------------------------------------------------------
   13. Auth Pages — Premium Design
   ---------------------------------------------------------------- */
.auth-page {
  background: var(--bg-body);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
#particles-js { position: absolute; width: 100%; height: 100%; top: 0; left: 0; z-index: 1; }

/* Auth Card */
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem 2.25rem 1.75rem;
  z-index: 2;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 0 0 1px rgba(34, 197, 94,0.05);
  position: relative;
  overflow: hidden;
}
.auth-card-wide { max-width: 520px; }

/* Glowing Accent Line */
.auth-accent-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand-primary), #4ade80, var(--brand-primary), transparent);
  background-size: 200% 100%;
  animation: accentShimmer 3s ease-in-out infinite;
}
@keyframes accentShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Logo Block */
.auth-logo-block {
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-logo-icon {
  width: 56px; height: 56px;
  margin: 0 auto 0.75rem;
  background: linear-gradient(135deg, var(--brand-primary), #4ade80);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff;
  box-shadow: 0 8px 24px rgba(var(--brand-primary-rgb), 0.3);
}
.auth-logo-text {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.auth-logo-tagline {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 0.25rem;
}

/* Tab Switcher */
.auth-tabs {
  display: flex;
  background: var(--bg-elevated);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  transition: all 0.2s;
  text-decoration: none;
}
.auth-tab:hover { color: var(--text-secondary); }
.auth-tab.active {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(var(--brand-primary-rgb), 0.3);
}

/* Icon-prefixed Input Groups */
.auth-input-group {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--bg-surface);
}
.auth-input-group:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.1);
}
.auth-input-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  color: var(--text-muted);
  font-size: 0.875rem;
  flex-shrink: 0;
  border-right: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}
.auth-input-group:focus-within .auth-input-icon { color: var(--brand-primary); }
.auth-input-group .form-floating { flex: 1; }
.auth-input-group .form-control {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--text-primary);
  font-size: 0.875rem;
  height: 52px;
}
.auth-input-group .form-floating > label {
  color: var(--text-muted);
  padding-left: 0.75rem;
}
.auth-input-group .form-floating > .form-control:focus ~ label,
.auth-input-group .form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: var(--brand-primary);
}

/* Auth Buttons */
.btn-auth-primary {
  background: linear-gradient(135deg, var(--brand-primary), #16a34a);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(var(--brand-primary-rgb), 0.3);
}
.btn-auth-primary:hover {
  background: linear-gradient(135deg, #16a34a, var(--brand-primary));
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(var(--brand-primary-rgb), 0.4);
}
.btn-auth-primary:active { transform: translateY(0); }

.btn-auth-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.625rem 1.5rem;
  font-weight: 500;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-auth-outline:hover {
  background: var(--brand-light);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* Auth Link */
.auth-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.auth-link:hover { color: var(--brand-primary); }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* Icon Circle (Password Reset) */
.auth-icon-circle {
  width: 64px; height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.15), rgba(var(--brand-primary-rgb), 0.05));
  border: 2px solid rgba(var(--brand-primary-rgb), 0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  color: var(--brand-primary);
}

/* Trust Badges */
.auth-trust-badges {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  color: var(--text-muted);
}
.trust-item i {
  font-size: 0.75rem;
  color: var(--success);
}

/* Legacy compat */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; color: var(--text-secondary); font-size: 0.8125rem; margin-bottom: 0.375rem; font-weight: 500; }
.form-control-custom {
  width: 100%; padding: 0.625rem 0.875rem;
  background: var(--bg-input); border: 1px solid var(--border-color);
  border-radius: 6px; color: var(--text-primary); outline: none;
  font-size: 0.875rem; transition: all 0.15s;
}
.form-control-custom:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.15); }

/* Auth card form checks */
.auth-card .form-check-label { color: var(--text-muted); }
.auth-card .form-check-input {
  background-color: var(--bg-surface);
  border-color: var(--border-color);
}

/* ----------------------------------------------------------------
   14. Empty States
   ---------------------------------------------------------------- */
.empty-state {
  padding: 3rem 1rem;
  text-align: center;
}
.empty-state i { font-size: 2.5rem; color: var(--text-muted); opacity: 0.3; margin-bottom: 1rem; }
.empty-state p { color: var(--text-muted); font-size: 0.875rem; margin: 0; }

/* ----------------------------------------------------------------
   15. Responsive
   ---------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --announcement-h: 0px;
    --topbar-h: 56px;
  }
  #snbd-sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-w);
    z-index: 1070;
    top: 0 !important;
    height: 100vh !important;
  }
  #snbd-sidebar.mobile-open { transform: translateX(0); }
  #snbd-main, #snbd-sidebar.collapsed ~ #snbd-main { margin-left: 0; margin-top: var(--topbar-h); }
  .snbd-content { padding: 1rem; }
  .snbd-page-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 16px;
  }
  .snbd-page-hero__icon { width: 42px; height: 42px; border-radius: 12px; font-size: 1.2rem; }
  .snbd-page-hero__aside { align-items: flex-start; }
  .snbd-page-hero__actions { justify-content: flex-start; }
  .snbd-survey-prompt { align-items: flex-start; flex-wrap: wrap; }
  .snbd-survey-prompt.alert-dismissible { padding-right: 3.5rem; }
  .snbd-survey-prompt__action { width: 100%; }
  .snbd-deals__heading { align-items: flex-start; flex-direction: column; }
  .snbd-deals__note { text-align: left; }
  .snbd-deals__grid { grid-template-columns: 1fr; }
  #snbd-topbar {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    padding: 0 1rem !important;
  }
  .topbar-breadcrumb {
    font-size: 0.78rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .topbar-breadcrumb::-webkit-scrollbar { display: none; }
  .topbar-breadcrumb .tb-crumb { flex: 0 0 auto; }
  .topbar-profile-btn .topbar-profile-name { display: none; }
  .snbd-announcement-bar {
    display: none !important;
  }
}

/* Mobile sidebar backdrop */
.sidebar-backdrop {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 1045;
  display: none;
}
.sidebar-backdrop.show { display: block; }

/* ----------------------------------------------------------------
   16. Global Bootstrap Button Overrides (Force Brand Green)
   ---------------------------------------------------------------- */

/* Override Bootstrap btn-success → green brand */
.btn-success:not(.badge):not(.status-badge) {
  background: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  box-shadow: 0 2px 4px rgba(var(--brand-primary-rgb), 0.3) !important;
  transition: all 0.2s !important;
}
.btn-success:hover:not(.badge):not(.status-badge) {
  background: var(--brand-hover) !important;
  border-color: var(--brand-hover) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(var(--brand-primary-rgb), 0.4) !important;
  transform: translateY(-1px) !important;
}

/* Override Bootstrap btn-primary → green brand */
.btn-primary:not(.badge):not(.status-badge) {
  background: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  box-shadow: 0 2px 4px rgba(var(--brand-primary-rgb), 0.3) !important;
}
.btn-primary:hover:not(.badge):not(.status-badge) {
  background: var(--brand-hover) !important;
  border-color: var(--brand-hover) !important;
  box-shadow: 0 4px 12px rgba(var(--brand-primary-rgb), 0.4) !important;
  transform: translateY(-1px) !important;
}

/* Override Bootstrap btn-info → green brand outline style */
.btn-info:not(.badge):not(.status-badge) {
  background: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
}
.btn-info:hover:not(.badge):not(.status-badge) {
  background: var(--brand-hover) !important;
  border-color: var(--brand-hover) !important;
  box-shadow: 0 4px 12px rgba(var(--brand-primary-rgb), 0.4) !important;
}

/* Manage Service, Back buttons — keep themed outline */
.btn-outline-secondary {
  color: var(--text-secondary) !important;
  border-color: var(--border-color) !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  transition: all 0.2s !important;
}
.btn-outline-secondary:hover {
  background: var(--brand-light) !important;
  border-color: var(--brand-primary) !important;
  color: var(--brand-primary) !important;
}

/* btn-danger stays red (semantic danger color) */
.btn-danger:not(.badge):not(.status-badge) {
  background: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
}
.btn-danger:hover:not(.badge):not(.status-badge) {
  background: var(--brand-hover) !important;
  border-color: var(--brand-hover) !important;
}

/* ================================================================
   17. Ticket Thread Styles
   ================================================================ */

.ticket-dept-badge {
  display: inline-flex; align-items: center;
  padding: 0.25rem 0.75rem;
  background: rgba(0,0,0,0.05);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.75rem; font-weight: 500;
  color: var(--text-secondary);
}
.ticket-status-badge {
  display: inline-flex; align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
  font-size: 0.75rem; font-weight: 600;
}
.status-open     { background: rgba(198,40,40,0.1);   color: #c62828; border: 1px solid rgba(198,40,40,0.25); }
.status-answered { background: rgba(46,125,50,0.1);   color: #2e7d32; border: 1px solid rgba(46,125,50,0.25); }
.status-waiting  { background: rgba(230,81,0,0.1);    color: #e65100; border: 1px solid rgba(230,81,0,0.25); }
.status-closed   { background: rgba(100,100,100,0.08);color: #666;    border: 1px solid rgba(100,100,100,0.18); }

.ticket-thread-card,
.ticket-reply-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}
.ticket-thread-header {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-color);
  padding: 0.875rem 1.25rem;
  font-weight: 600; font-size: 0.875rem;
  color: var(--text-primary);
  display: flex; align-items: center;
}
.ticket-replies-wrap {
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1.5rem;
}
.ticket-msg-row { display: flex; flex-direction: column; gap: 0.5rem; }
.ticket-msg-client { align-items: flex-end; }
.ticket-msg-staff  { align-items: flex-start; }

.ticket-msg-meta { display: flex; align-items: center; gap: 0.625rem; }
.ticket-msg-client .ticket-msg-meta { flex-direction: row-reverse; }

.ticket-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.875rem; flex-shrink: 0;
  text-transform: uppercase;
}
.ticket-avatar-client {
  background: rgba(var(--brand-primary-rgb), 0.1);
  color: var(--brand-primary);
  border: 2px solid rgba(var(--brand-primary-rgb), 0.2);
}
.ticket-avatar-staff {
  background: rgba(46,125,50,0.1);
  color: #2e7d32;
  border: 2px solid rgba(46,125,50,0.2);
}
.ticket-sender-name {
  display: block; font-weight: 600; font-size: 0.8125rem;
  color: var(--text-primary); line-height: 1.2;
}
.ticket-staff-label {
  font-size: 0.6875rem; color: #2e7d32; font-weight: 500; margin-left: 4px;
}
.ticket-msg-time {
  display: block; font-size: 0.6875rem; color: var(--text-muted); margin-top: 2px;
}

/* ---- Message Bubbles ---- */
.ticket-bubble {
  max-width: 78%;
  padding: 0.875rem 1.125rem;
  border-radius: 16px;
  font-size: 0.875rem;
  line-height: 1.65;
  word-wrap: break-word;
  color: var(--text-primary);   /* ALWAYS dark text for readability */
}
/* USER bubble: soft brand tint, brand border */
.ticket-bubble-client {
  background: rgba(var(--brand-primary-rgb), 0.07);
  border: 1px solid rgba(var(--brand-primary-rgb), 0.18);
  border-top-right-radius: 4px;
}
/* STAFF bubble: neutral elevated background */
.ticket-bubble-staff {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-top-left-radius: 4px;
}

/* Attachments */
.ticket-attachments { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ticket-attachment-pill {
  display: inline-flex; align-items: center;
  padding: 0.25rem 0.625rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 8px; font-size: 0.75rem;
  color: var(--text-secondary); text-decoration: none; transition: all 0.15s;
}
.ticket-attachment-pill:hover {
  background: var(--brand-light); border-color: var(--brand-primary); color: var(--brand-primary);
}

/* Reply form */
.ticket-reply-body { padding: 1.25rem; }
.ticket-textarea {
  width: 100%; padding: 0.875rem 1rem;
  background: var(--bg-body);
  border: 1.5px solid var(--border-color);
  border-radius: 10px; color: var(--text-primary);
  font-size: 0.875rem; outline: none; resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: var(--font-sans); min-height: 120px;
}
.ticket-textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.12);
}
.ticket-upload-label {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--border-color); border-radius: 8px;
  font-size: 0.8125rem; font-weight: 500;
  color: var(--text-secondary); cursor: pointer;
  transition: all 0.15s; background: var(--bg-surface);
}
.ticket-upload-label:hover {
  background: var(--brand-light); border-color: var(--brand-primary); color: var(--brand-primary);
}
.ticket-closed-notice {
  padding: 1.25rem 1.5rem;
  background: rgba(100,100,100,0.06);
  border: 1px solid var(--border-color); border-radius: 10px;
  color: var(--text-secondary); font-size: 0.875rem;
}
.ticket-link { color: var(--brand-primary); font-weight: 500; }
.ticket-link:hover { color: var(--brand-hover); }

/* ================================================================
   18. Enhanced Sidebar Navigation
   ================================================================ */

/* Active indicator line replaces border-left */
.snbd-nav-item { position: relative; border-left: none !important; }
.snbd-nav-item::after {
  content: '';
  position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: #16a34a;
  border-radius: 0 3px 3px 0;
  transform: scaleY(0);
  transition: transform 0.2s cubic-bezier(0.4,0,0.2,1);
}
.snbd-nav-item.active::after  { transform: scaleY(1); }
.snbd-nav-item.active i       { color: #16a34a !important; }
.snbd-nav-item:hover i        { color: #111111 !important; transition: color 0.15s; }

/* Tooltip labels for collapsed sidebar */
#snbd-sidebar.collapsed .snbd-nav-item { justify-content: center; padding-left: 0; padding-right: 0; }
#snbd-sidebar.collapsed .snbd-nav-text {
  position: fixed;
  left: calc(var(--sidebar-w-collapsed) + 12px);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.3rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8125rem; font-weight: 500;
  white-space: nowrap;
  width: auto !important;
  opacity: 0; pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transition: opacity 0.15s, transform 0.15s;
  transform: translateX(-4px);
  z-index: 2000;
}
#snbd-sidebar.collapsed .snbd-nav-item:hover .snbd-nav-text {
  opacity: 1; transform: translateX(0);
}

/* Brand pulse animation removal (deprecated) */

/* Section labels with subtle line */
.nav-section-label { display: flex; align-items: center; gap: 0.5rem; }
.nav-section-label::after {
  content: ''; flex: 1; height: 1px; background: #f0f0f0;
}

/* User profile hover */
.snbd-user-profile { cursor: default; transition: background 0.15s; }
.snbd-user-profile:hover { background: rgba(0, 0, 0, 0.02) !important; }

/* ================================================================
   19. Dashboard Widget Cards (Loyalty Matrix, etc.)
   ================================================================ */

/* Override default WHMCS widget HTML inside our card wrapper */
.dash-widget-body {
  font-size: 0.875rem;
  color: var(--text-primary);
}
/* Make widget links match brand color */
.dash-widget-body a       { color: var(--brand-primary); }
.dash-widget-body a:hover { color: var(--brand-hover); }

/* Any buttons inside widgets → green brand */
.dash-widget-body .btn-success,
.dash-widget-body button.btn-success {
  background: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  color: #fff !important; border-radius: 8px !important;
}
/* Reset widget table styles to match our theme */
.dash-widget-body table { width: 100%; font-size: 0.8125rem; }
.dash-widget-body table td, .dash-widget-body table th {
  padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}
.dash-widget-body table thead th { font-weight: 600; color: var(--text-secondary); }

/* Progress bars inside loyalty widget */
.dash-widget-body .progress { background: var(--bg-elevated); border-radius: 8px; height: 8px; }
.dash-widget-body .progress-bar { background: var(--brand-primary); border-radius: 8px; }

/* ================================================================
   20. Announcements Panel
   ================================================================ */

.announce-item {
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border-subtle);
}
.announce-item:last-child { border-bottom: none; }
.announce-title {
  display: block;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.15s;
}
.announce-title:hover { color: var(--brand-primary); }
.announce-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ================================================================
   21. Loyalty Matrix Card
   ================================================================ */

.loyalty-card .card-header { border-bottom: 2px solid rgba(var(--brand-primary-rgb),0.12); }

.loyalty-tier-badge {
  display: inline-flex; align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(var(--brand-primary-rgb), 0.08);
  border: 1px solid rgba(var(--brand-primary-rgb), 0.2);
  border-radius: 8px;
  color: var(--brand-primary);
  font-weight: 600; font-size: 0.875rem;
}
.loyalty-tier-badge i { color: #f9a825; }

.loyalty-meta-row { display: flex; align-items: center; margin-top: 0.5rem; }

.loyalty-progress-bar {
  height: 6px; border-radius: 8px;
  background: var(--bg-elevated);
  overflow: hidden; margin-top: 4px;
}
.loyalty-progress-fill {
  height: 100%; width: 40%;
  background: linear-gradient(90deg, var(--brand-primary), #4ade80);
  border-radius: 8px;
  animation: loyaltyFill 1.2s ease-out forwards;
}
@keyframes loyaltyFill {
  from { width: 0; }
}/* ================================================================
   22. Global Dashboard Headline & Button Styles
   ================================================================ */
.dash-headline {
  font-size: 2.75rem;
  font-weight: 900;
  color: #111111;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  font-family: 'Inter', var(--font-sans), sans-serif;
}
.dash-headline-accent {
  color: var(--brand-primary);
}
.dash-subhead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 2rem;
}
.btn-brand-clean {
  background-color: var(--brand-primary) !important;
  color: var(--text-on-brand) !important;
  border-radius: 8px !important;
  padding: 0.75rem 1.5rem !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.2) !important;
  transition: all 0.2s !important;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.btn-brand-clean:hover {
  background-color: var(--brand-hover) !important;
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3) !important;
  transform: translateY(-2px) !important;
  color: var(--text-on-brand) !important;
}

/* ================================================================
   23. Global Clean Status Badges
   ================================================================ */
.badge-clean {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.badge-clean-success { background: rgba(46, 125, 50, 0.08) !important; color: #2e7d32 !important; border: 1px solid rgba(46, 125, 50, 0.15) !important; }
.badge-clean-warning { background: rgba(230, 81, 0, 0.08) !important; color: #e65100 !important; border: 1px solid rgba(230, 81, 0, 0.15) !important; }
.badge-clean-danger  { background: rgba(198, 40, 40, 0.08) !important; color: #c62828 !important; border: 1px solid rgba(198, 40, 40, 0.15) !important; }
.badge-clean-info    { background: rgba(22, 163, 74, 0.08) !important; color: #16a34a !important; border: 1px solid rgba(22, 163, 74, 0.15) !important; }

/* Invoice statuses use the beta brand palette rather than generic badge colours. */
.invoice-status-paid {
  background: rgba(var(--brand-primary-rgb), 0.1) !important;
  color: var(--brand-primary) !important;
  border: 1px solid rgba(var(--brand-primary-rgb), 0.22) !important;
}
.invoice-status-unpaid {
  background: rgba(220, 53, 69, 0.1) !important;
  color: #dc3545 !important;
  border: 1px solid rgba(220, 53, 69, 0.22) !important;
}
/* Fallback for WHMCS status labels supplied as preformatted HTML. */
.textgreen,
.badge-clean .textgreen {
  color: var(--brand-primary) !important;
}
.textred,
.badge-clean .textred {
  color: #dc3545 !important;
}

/* ================================================================
   25. Cart Elements (High Contrast Quantity Selector & Removal)
   ================================================================ */
.btn-remove-from-cart {
  background-color: rgba(220, 53, 69, 0.08) !important;
  border: 1px solid rgba(220, 53, 69, 0.25) !important;
  color: #dc3545 !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  font-size: 0.82rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease-in-out !important;
  text-decoration: none !important;
}
.btn-remove-from-cart:hover {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2) !important;
}
.btn-remove-from-cart i {
  font-size: 0.95rem !important;
}

/* Quantity selector controls */
.quantity-control-group {
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  border-radius: 8px;
  overflow: hidden;
}
.quantity-control-group .btn-qty-dec,
.quantity-control-group .btn-qty-inc {
  padding: 0.35rem 0.65rem !important;
  font-weight: 800 !important;
  border-color: var(--border-color) !important;
}
.quantity-control-group .btn-qty-dec {
  color: #c62828 !important;
  background-color: rgba(198, 40, 40, 0.04) !important;
}
.quantity-control-group .btn-qty-dec:hover {
  background-color: #c62828 !important;
  color: #ffffff !important;
}
.quantity-control-group .btn-qty-inc {
  color: #2e7d32 !important;
  background-color: rgba(46, 125, 50, 0.04) !important;
}
.quantity-control-group .btn-qty-inc:hover {
  background-color: #2e7d32 !important;
  color: #ffffff !important;
}
.quantity-control-group input.qty-input {
  border-top: 1px solid var(--border-color) !important;
  border-bottom: 1px solid var(--border-color) !important;
  background-color: var(--bg-input) !important;
  color: var(--text-primary) !important;
}

/* ── Shopping Cart & Domain Checker Dark Mode Overrides ── */
html[data-theme="dark"] #order-standard_cart,
html[data-theme="dark"] #order-standard_cart h1,
html[data-theme="dark"] #order-standard_cart h2,
html[data-theme="dark"] #order-standard_cart h3,
html[data-theme="dark"] #order-standard_cart h4,
html[data-theme="dark"] #order-standard_cart .dash-headline,
html[data-theme="dark"] #order-standard_cart .header-lined h1 {
  color: var(--text-primary) !important;
}

html[data-theme="dark"] #order-standard_cart p,
html[data-theme="dark"] #order-standard_cart label,
html[data-theme="dark"] #order-standard_cart span:not(.btn):not(.badge):not(.cost):not(.amt),
html[data-theme="dark"] #order-standard_cart .text-muted,
html[data-theme="dark"] #order-standard_cart .domain-renewal-desc,
html[data-theme="dark"] #order-standard_cart .spotlight-tld span {
  color: var(--text-secondary) !important;
}

html[data-theme="dark"] #order-standard_cart .domain-checker-container,
html[data-theme="dark"] #order-standard_cart #DomainSearchResults .primary-domain-header,
html[data-theme="dark"] #order-standard_cart .suggested-domains .list-group-item,
html[data-theme="dark"] #order-standard_cart .view-cart-items .item,
html[data-theme="dark"] #order-standard_cart .products .product,
html[data-theme="dark"] #order-standard_cart .products .product header,
html[data-theme="dark"] #order-standard_cart .panel-addon,
html[data-theme="dark"] #order-standard_cart .secondary-cart-sidebar .order-summary,
html[data-theme="dark"] #order-standard_cart .summary-container {
  background-color: var(--bg-surface) !important;
  background: var(--bg-surface) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

html[data-theme="dark"] #order-standard_cart .input-group-box,
html[data-theme="dark"] #order-standard_cart input#inputDomain,
html[data-theme="dark"] #order-standard_cart .form-control {
  background-color: var(--bg-input) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

html[data-theme="dark"] #order-standard_cart input#inputDomain:focus,
html[data-theme="dark"] #order-standard_cart .form-control:focus {
  border-color: var(--brand-primary) !important;
  background-color: var(--bg-input) !important;
}

html[data-theme="dark"] #order-standard_cart .spotlight-tld {
  background-color: var(--bg-surface) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

html[data-theme="dark"] #order-standard_cart .view-cart-items .item:nth-child(even) {
  background-color: var(--bg-elevated) !important;
}

/* ── Global Client Area Dark Mode Overrides ── */
html[data-theme="dark"] body,
html[data-theme="dark"] #snbd-main,
html[data-theme="dark"] #snbd-main h1,
html[data-theme="dark"] #snbd-main h2,
html[data-theme="dark"] #snbd-main h3,
html[data-theme="dark"] #snbd-main h4,
html[data-theme="dark"] #snbd-main h5,
html[data-theme="dark"] #snbd-main h6,
html[data-theme="dark"] #snbd-main p,
html[data-theme="dark"] #snbd-main label,
html[data-theme="dark"] #snbd-main .text-dark,
html[data-theme="dark"] #snbd-main .text-secondary,
html[data-theme="dark"] #snbd-main .card-title,
html[data-theme="dark"] #snbd-main .card-body,
html[data-theme="dark"] #snbd-main .table,
html[data-theme="dark"] #snbd-main .table td,
html[data-theme="dark"] #snbd-main .table th,
html[data-theme="dark"] #snbd-main .list-group-item {
  color: var(--text-primary) !important;
}

html[data-theme="dark"] #snbd-main .text-muted,
html[data-theme="dark"] #snbd-main .small {
  color: var(--text-muted) !important;
}

html[data-theme="dark"] #snbd-main .card,
html[data-theme="dark"] #snbd-main .list-group-item,
html[data-theme="dark"] #snbd-main .card-header {
  background-color: var(--bg-surface) !important;
  border-color: var(--border-color) !important;
}

html[data-theme="dark"] #snbd-main .list-group-item-action:hover {
  background-color: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
}




/* ================================================================
   20. Global Dark Mode Overrides (catch-all)
   ================================================================ */

/* ── Layout chrome ── */
html[data-theme="dark"] body { background-color: var(--bg-body); }
html[data-theme="dark"] #snbd-sidebar { border-right-color: var(--border-color); }
html[data-theme="dark"] .snbd-brand-logo-container { border-bottom-color: var(--border-color); }
html[data-theme="dark"] .snbd-user-profile { border-top-color: var(--border-color); }
html[data-theme="dark"] .snbd-user-profile:hover { background: rgba(255, 255, 255, 0.04) !important; }
html[data-theme="dark"] .nav-section-label { color: var(--text-muted); }
html[data-theme="dark"] .nav-section-label::after { background: var(--border-color); }
html[data-theme="dark"] .snbd-nav-item { color: var(--text-secondary); }
html[data-theme="dark"] .snbd-nav-item i { color: var(--text-muted); }
html[data-theme="dark"] .snbd-nav-item:hover { background: var(--bg-elevated) !important; color: var(--text-primary) !important; }
html[data-theme="dark"] .snbd-nav-item:hover i { color: var(--text-primary) !important; }
html[data-theme="dark"] .snbd-nav-item.active { background: var(--brand-light) !important; color: var(--brand-primary) !important; border-left-color: var(--brand-primary); }
html[data-theme="dark"] .snbd-nav-item.active i { color: var(--brand-primary) !important; }
html[data-theme="dark"] .snbd-nav-toggle { background: transparent !important; }
html[data-theme="dark"] .snbd-nav-subitem { color: var(--text-muted); border-left-color: var(--border-color); }
html[data-theme="dark"] .snbd-nav-subitem:hover,
html[data-theme="dark"] .snbd-nav-subitem.active { background: var(--brand-light); color: var(--brand-primary) !important; }
html[data-theme="dark"] .snbd-nav-divider { border-color: var(--border-color); }
html[data-theme="dark"] .user-name { color: var(--text-primary); }
html[data-theme="dark"] .user-email { color: var(--text-muted); }

/* ── Topbar ── */
html[data-theme="dark"] #snbd-topbar { border-bottom-color: var(--border-color); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
html[data-theme="dark"] .toggle-sidebar-btn:hover,
html[data-theme="dark"] .topbar-icon-btn:hover { background: var(--bg-elevated) !important; color: var(--brand-primary) !important; }
html[data-theme="dark"] .popover-user-notifications {
  background: var(--bg-elevated);
  border-color: var(--border-color);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
html[data-theme="dark"] .popover-user-notifications .client-alerts li a {
  color: var(--text-primary);
}
html[data-theme="dark"] .popover-user-notifications .client-alerts li a:hover {
  background: var(--brand-light);
  color: var(--brand-primary);
}
html[data-theme="dark"] .popover-user-notifications .popover-inner,
html[data-theme="dark"] .popover-user-notifications .popover-header,
html[data-theme="dark"] .popover-user-notifications .popover-body {
  color: var(--text-primary);
  background: var(--bg-elevated);
  border-color: var(--border-color);
}
html[data-theme="dark"] .popover-user-notifications.bs-popover-bottom > .arrow::after,
html[data-theme="dark"] .popover-user-notifications.bs-popover-auto[x-placement^="bottom"] > .arrow::after {
  border-bottom-color: var(--bg-elevated);
}
html[data-theme="dark"] .popover-user-notifications.bs-popover-top > .arrow::after,
html[data-theme="dark"] .popover-user-notifications.bs-popover-auto[x-placement^="top"] > .arrow::after {
  border-top-color: var(--bg-elevated);
}
html[data-theme="dark"] .popover-user-notifications.bs-popover-left > .arrow::after,
html[data-theme="dark"] .popover-user-notifications.bs-popover-auto[x-placement^="left"] > .arrow::after {
  border-left-color: var(--bg-elevated);
}
html[data-theme="dark"] .popover-user-notifications.bs-popover-right > .arrow::after,
html[data-theme="dark"] .popover-user-notifications.bs-popover-auto[x-placement^="right"] > .arrow::after {
  border-right-color: var(--bg-elevated);
}
html[data-theme="dark"] .topbar-profile-btn,
html[data-theme="dark"] .topbar-profile-btn:hover,
html[data-theme="dark"] .topbar-profile-btn:focus,
html[data-theme="dark"] .topbar-profile.show .topbar-profile-btn {
  border: 0;
  box-shadow: none;
  color: var(--text-primary);
}
html[data-theme="dark"] .topbar-profile-heading { color: var(--text-primary); }
html[data-theme="dark"] .topbar-profile .dropdown-menu { background-color: var(--bg-elevated); border-color: var(--border-color); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }

/* ── Dropdowns (all) ── */
html[data-theme="dark"] .dropdown-menu { background-color: var(--bg-elevated); border-color: var(--border-color); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
html[data-theme="dark"] .dropdown-item,
html[data-theme="dark"] .topbar-profile .dropdown-item { color: var(--text-secondary); }
html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .dropdown-item:focus,
html[data-theme="dark"] .topbar-profile .dropdown-item:hover { background-color: var(--brand-light); color: var(--brand-primary); }
html[data-theme="dark"] .dropdown-item.text-danger { color: #f87171 !important; }
html[data-theme="dark"] .dropdown-divider { border-top-color: var(--border-color); }

/* Keep the shared hero's intentional contrast in dark mode. */
html[data-theme="dark"] #snbd-main .snbd-page-hero h1.text-white { color: #ffffff !important; }
html[data-theme="dark"] #snbd-main .snbd-page-hero .snbd-page-hero__eyebrow.text-white-50,
html[data-theme="dark"] #snbd-main .snbd-page-hero p.text-white-50 { color: rgba(255, 255, 255, 0.78) !important; }

/* ── Cards & panels (Bootstrap + page-specific classes) ── */
html[data-theme="dark"] #snbd-main [class*="card"]:not(.loyalty-card-premium):not([style*="linear-gradient"]),
html[data-theme="dark"] #snbd-main .service-card,
html[data-theme="dark"] #snbd-main .panel,
html[data-theme="dark"] #snbd-main .module-clientarea-wrap .panel {
  background-color: var(--bg-surface) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary);
}
html[data-theme="dark"] #snbd-main .dash-card-clean .card-header,
html[data-theme="dark"] #snbd-main .module-clientarea-wrap .panel-heading {
  background-color: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
  border-bottom-color: var(--border-color) !important;
}
html[data-theme="dark"] #snbd-main .stat-card-clean:hover { border-color: var(--border-color) !important; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35) !important; }
html[data-theme="dark"] #snbd-main .stat-card-clean .stat-value-clean { color: var(--text-primary) !important; }
html[data-theme="dark"] #snbd-main .stat-card-clean .stat-label-clean { color: var(--text-muted) !important; }
html[data-theme="dark"] #snbd-main .btn-outline-clean { background: var(--bg-elevated) !important; border-color: var(--border-color) !important; color: var(--text-secondary) !important; }
html[data-theme="dark"] #snbd-main .btn-outline-clean i { color: var(--text-muted); }
html[data-theme="dark"] #snbd-main .btn-outline-clean:hover { background: var(--brand-primary) !important; border-color: var(--brand-primary) !important; color: #ffffff !important; }
html[data-theme="dark"] #snbd-main .btn-outline-clean:hover i { color: #ffffff !important; }

/* ── Forms ── */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
  background-color: var(--bg-input) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
  background-color: var(--bg-input) !important;
  border-color: var(--brand-primary) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.15) !important;
}
html[data-theme="dark"] .form-control::placeholder { color: var(--text-muted) !important; }
html[data-theme="dark"] .form-control:disabled,
html[data-theme="dark"] .form-control[readonly] { background-color: var(--bg-elevated) !important; color: var(--text-muted) !important; }
html[data-theme="dark"] .input-group-text {
  background-color: var(--bg-elevated) !important;
  border-color: var(--border-color) !important;
  color: var(--text-secondary) !important;
}
html[data-theme="dark"] .form-check-input { background-color: var(--bg-input); border-color: var(--border-color); }
html[data-theme="dark"] .form-check-input:checked { background-color: var(--brand-primary); border-color: var(--brand-primary); }
html[data-theme="dark"] .form-text { color: var(--text-muted) !important; }
html[data-theme="dark"] .form-control:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-input) inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
}

/* ── Tables ── */
html[data-theme="dark"] .table {
  --bs-table-color: var(--text-primary);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--border-color);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
  --bs-table-striped-color: var(--text-primary);
  --bs-table-hover-bg: rgba(255, 255, 255, 0.04);
  --bs-table-hover-color: var(--text-primary);
  color: var(--text-primary);
}
html[data-theme="dark"] .table td,
html[data-theme="dark"] .table th { border-color: var(--border-color); }

/* ── Modals ── */
html[data-theme="dark"] .modal-content { background-color: var(--bg-surface); color: var(--text-primary); border-color: var(--border-color); }
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer { border-color: var(--border-color); }
html[data-theme="dark"] .btn-close { filter: invert(1) grayscale(1); }

/* ── Pagination ── */
html[data-theme="dark"] .page-link { background-color: var(--bg-surface); border-color: var(--border-color); color: var(--text-secondary); }
html[data-theme="dark"] .page-link:hover { background-color: var(--bg-elevated); border-color: var(--border-color); color: var(--brand-primary); }
html[data-theme="dark"] .page-item.active .page-link { background-color: var(--brand-primary); border-color: var(--brand-primary); color: #ffffff; }
html[data-theme="dark"] .page-item.disabled .page-link { background-color: var(--bg-elevated); border-color: var(--border-color); color: var(--text-muted); }

/* ── Light/neutral buttons ── */
html[data-theme="dark"] .btn-light,
html[data-theme="dark"] .btn-default,
html[data-theme="dark"] .btn-outline-secondary {
  background-color: var(--bg-elevated) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}
html[data-theme="dark"] .btn-light:hover,
html[data-theme="dark"] .btn-default:hover,
html[data-theme="dark"] .btn-outline-secondary:hover {
  background-color: var(--bg-input) !important;
  border-color: var(--brand-primary) !important;
  color: var(--brand-primary) !important;
}

/* ── Navs & tabs ── */
html[data-theme="dark"] .nav-tabs { border-bottom-color: var(--border-color); }
html[data-theme="dark"] .nav-tabs .nav-link { color: var(--text-secondary); }
html[data-theme="dark"] .nav-tabs .nav-link:hover { border-color: var(--border-color); color: var(--text-primary); }
html[data-theme="dark"] .nav-tabs .nav-link.active {
  background-color: var(--bg-surface);
  border-color: var(--border-color) var(--border-color) var(--bg-surface);
  color: var(--brand-primary);
}

/* ── Alerts (semantic, dark-friendly) ── */
html[data-theme="dark"] .alert-success { background-color: var(--success-bg) !important; border-color: rgba(var(--brand-primary-rgb), 0.4) !important; color: #4ade80 !important; }
html[data-theme="dark"] .alert-danger,
html[data-theme="dark"] .alert-error { background-color: var(--danger-bg) !important; border-color: rgba(220, 38, 38, 0.4) !important; color: #f87171 !important; }
html[data-theme="dark"] .alert-warning { background-color: var(--warning-bg) !important; border-color: rgba(217, 119, 6, 0.4) !important; color: #fbbf24 !important; }
html[data-theme="dark"] .alert-info { background-color: var(--info-bg) !important; border-color: rgba(var(--brand-primary-rgb), 0.3) !important; color: #4ade80 !important; }
html[data-theme="dark"] .snbd-survey-prompt { border-color: rgba(217, 119, 6, 0.4); background: linear-gradient(135deg, #3b2a0b 0%, #2d1d0b 100%); }
html[data-theme="dark"] .snbd-survey-prompt__icon { background: rgba(251, 191, 36, 0.14); color: #fbbf24; }
html[data-theme="dark"] .snbd-survey-prompt__title { color: #fef3c7; }
html[data-theme="dark"] .snbd-survey-prompt__text { color: #fde68a; }
html[data-theme="dark"] .snbd-deal-card { border-color: var(--border-color); box-shadow: 0 5px 18px rgba(0, 0, 0, 0.16); }
html[data-theme="dark"] .snbd-deal-card:hover { border-color: rgba(74, 222, 128, 0.45); box-shadow: 0 12px 25px rgba(0, 0, 0, 0.28); }

/* ── Misc ── */
html[data-theme="dark"] hr,
html[data-theme="dark"] .dropdown-divider { border-color: var(--border-color); opacity: 1; }
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .bg-light { background-color: var(--bg-surface) !important; }
html[data-theme="dark"] .text-dark { color: var(--text-primary) !important; }
html[data-theme="dark"] .border { border-color: var(--border-color) !important; }
html[data-theme="dark"] .border-bottom { border-bottom-color: var(--border-color) !important; }
html[data-theme="dark"] .border-top { border-top-color: var(--border-color) !important; }
html[data-theme="dark"] .shadow-sm,
html[data-theme="dark"] .shadow { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important; }

/* ── Inline-style catches: hardcoded dark text → light ── */
html[data-theme="dark"] #snbd-main [style*="color: #111"],
html[data-theme="dark"] #snbd-main [style*="color: #1a1a1a"],
html[data-theme="dark"] #snbd-main [style*="color: #222"],
html[data-theme="dark"] #snbd-main [style*="color: #333"],
html[data-theme="dark"] #snbd-main [style*="color: #444"],
html[data-theme="dark"] #snbd-main [style*="color: #000"] {
  color: var(--text-primary) !important;
}
html[data-theme="dark"] #snbd-main [style*="color: #555"],
html[data-theme="dark"] #snbd-main [style*="color: #666"],
html[data-theme="dark"] #snbd-main [style*="color: #757575"],
html[data-theme="dark"] #snbd-main [style*="color: #777"],
html[data-theme="dark"] #snbd-main [style*="color: #888"],
html[data-theme="dark"] #snbd-main [style*="color: #999"],
html[data-theme="dark"] #snbd-main [style*="color: #aaa"] {
  color: var(--text-muted) !important;
}

/* ── Inline-style catches: light panel backgrounds → elevated ── */
html[data-theme="dark"] #snbd-main [style*="background: #f5f5f5"],
html[data-theme="dark"] #snbd-main [style*="background: #f6f6f6"],
html[data-theme="dark"] #snbd-main [style*="background: #f6fef9"],
html[data-theme="dark"] #snbd-main [style*="background: #f0fdf4"],
html[data-theme="dark"] #snbd-main [style*="background: #fafafa"],
html[data-theme="dark"] #snbd-main [style*="background: #f4f4f5"],
html[data-theme="dark"] #snbd-main [style*="background: #f3f4f6"],
html[data-theme="dark"] #snbd-main [style*="background: #f4f5f7"],
html[data-theme="dark"] #snbd-main [style*="background: #eeeeee"],
html[data-theme="dark"] #snbd-main [style*="background-color: #f5f5f5"],
html[data-theme="dark"] #snbd-main [style*="background-color: #f6f6f6"],
html[data-theme="dark"] #snbd-main [style*="background-color: #f6fef9"],
html[data-theme="dark"] #snbd-main [style*="background-color: #f0fdf4"],
html[data-theme="dark"] #snbd-main [style*="background-color: #fafafa"],
html[data-theme="dark"] #snbd-main [style*="background-color: #f4f4f5"],
html[data-theme="dark"] #snbd-main [style*="background-color: #f3f4f6"],
html[data-theme="dark"] #snbd-main [style*="background-color: #f4f5f7"],
html[data-theme="dark"] #snbd-main [style*="background-color: #eeeeee"] {
  background-color: var(--bg-elevated) !important;
}

/* ── Universal text force ──
   Everything inside the client area renders light, EXCEPT elements that
   carry their own intentional color: icons, badges, buttons, status/semantic
   text classes, and elements with an inline color style. */
html[data-theme="dark"] #snbd-main *:not(i):not(svg):not(path):not(input):not(textarea):not(select):not(option):not(button):not(a)
  :not(.btn):not([class*="badge"]):not([class*="icon"]):not([class*="status"]):not([class*="accent"])
  :not(.text-success):not(.text-danger):not(.text-warning):not(.text-info)
  :not(.text-primary):not(.text-secondary):not(.text-muted):not(.text-white):not(.text-white-50)
  :not([style*="color"]) {
  color: var(--text-primary) !important;
}
html[data-theme="dark"] #snbd-main .text-secondary { color: var(--text-secondary) !important; }
html[data-theme="dark"] #snbd-main .text-muted,
html[data-theme="dark"] #snbd-main .small,
html[data-theme="dark"] #snbd-main small { color: var(--text-muted) !important; }

/* ================================================================
   27. Unified Bootstrap Button Treatment
   ----------------------------------------------------------------
   Keep each button variant's existing colors, while giving every
   Bootstrap button the same shape, weight, shadow, and hover motion
   as the primary button.
   ================================================================ */
.btn:not(.btn-link):not(.btn-close):not(.badge):not(.status-badge) {
  border-radius: 8px !important;
  font-weight: 500 !important;
  box-shadow: 0 2px 4px rgba(var(--brand-primary-rgb), 0.3) !important;
  transition: all 0.2s !important;
}

.btn:not(.btn-link):not(.btn-close):not(.badge):not(.status-badge):hover {
  box-shadow: 0 4px 12px rgba(var(--brand-primary-rgb), 0.4) !important;
  transform: translateY(-1px) !important;
}

/* ================================================================
   28. Client Services Portfolio
   ================================================================ */
.products-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}
.products-overview__intro { max-width: 510px; }
.products-overview__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
  color: var(--brand-primary);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.products-overview__eyebrow i { font-size: 1rem; }
.products-overview h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 750;
  letter-spacing: -0.035em;
}
.products-overview p {
  margin: 0.4rem 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.55;
}
.products-overview__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(88px, 1fr));
  min-width: 310px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-elevated);
  overflow: hidden;
}
.products-overview__stats--two {
  grid-template-columns: repeat(2, minmax(88px, 1fr));
  min-width: 220px;
}
.products-overview__stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  border-right: 1px solid var(--border-color);
}
.products-overview__stat:last-child { border-right: 0; }
.products-overview__stat-value {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1;
}
.products-overview__stat-label {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
}
.products-overview__stat--active .products-overview__stat-value { color: var(--brand-primary); }
.products-overview__stat--attention .products-overview__stat-value { color: var(--danger); }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.product-service-card {
  --service-accent: #64748b;
  --service-tint: rgba(100, 116, 139, 0.1);
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.035);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.product-service-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--service-accent);
  content: '';
}
.product-service-card:hover {
  border-color: color-mix(in srgb, var(--service-accent) 46%, var(--border-color));
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.09);
  transform: translateY(-3px);
}
.product-service-card--active { --service-accent: var(--brand-primary); --service-tint: var(--brand-light); }
.product-service-card--pending { --service-accent: #d97706; --service-tint: rgba(217, 119, 6, 0.1); }
.product-service-card--suspended { --service-accent: var(--danger); --service-tint: var(--danger-bg); }
.product-service-card--inactive { --service-accent: #64748b; --service-tint: rgba(100, 116, 139, 0.1); }
.product-service-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1.35rem 1.25rem 1rem;
}
.product-service-card__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.75rem;
}
.product-service-card__icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--service-tint);
  color: var(--service-accent);
  font-size: 1.25rem;
}
.product-service-card__title-wrap { min-width: 0; }
.product-service-card__label {
  display: block;
  margin-bottom: 0.18rem;
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.product-service-card h3 {
  overflow: hidden;
  margin: 0;
  color: var(--text-primary);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.018em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-service-card__status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 26px;
  padding: 0.25rem 0.5rem;
  border: 1px solid color-mix(in srgb, var(--service-accent) 24%, transparent);
  border-radius: 6px;
  background: var(--service-tint);
  color: var(--service-accent);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}
.product-service-card__domain {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  margin: 0 1.25rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
}
.product-service-card__domain i { flex: 0 0 auto; color: var(--service-accent); font-size: 0.95rem; }
.product-service-card__details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 1.25rem 1.25rem;
}
.product-service-card__details div { min-width: 0; }
.product-service-card__details dt {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.26rem;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.2;
}
.product-service-card__details dt i { color: var(--service-accent); font-size: 0.85rem; }
.product-service-card__details dd {
  overflow: hidden;
  margin: 0;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-service-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--bg-elevated) 55%, transparent);
}
.product-service-card__price { display: flex; flex-direction: column; gap: 0.18rem; }
.product-service-card__price span { color: var(--text-muted); font-size: 0.64rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.055em; }
.product-service-card__price strong { color: var(--text-primary); font-size: 0.95rem; font-weight: 750; letter-spacing: -0.025em; }
.product-service-card__manage {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 34px;
  padding: 0.45rem 0.65rem;
  border-radius: 7px;
  background: var(--service-tint);
  color: var(--service-accent);
  font-size: 0.73rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.product-service-card__manage:hover {
  background: var(--service-accent);
  color: #fff;
  transform: translateX(2px);
}
.products-empty-state {
  display: flex;
  grid-column: 1 / -1;
  flex-direction: column;
  align-items: center;
  padding: 3.5rem 1.5rem;
  border: 1px dashed var(--border-color);
  border-radius: 16px;
  background: var(--bg-surface);
  text-align: center;
}
.products-empty-state__icon {
  display: inline-flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border-radius: 16px;
  background: var(--brand-light);
  color: var(--brand-primary);
  font-size: 1.7rem;
}
.products-empty-state h2 { margin: 0; color: var(--text-primary); font-size: 1.1rem; font-weight: 700; }
.products-empty-state p { max-width: 420px; margin: 0.45rem 0 1.1rem; color: var(--text-muted); font-size: 0.85rem; }
.products-empty-state__action {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}
.products-empty-state__action:hover { background: var(--brand-hover); color: #fff; }
.products-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.products-pagination__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}
.products-pagination__link:hover { border-color: var(--brand-primary); background: var(--brand-light); color: var(--brand-primary); }
.products-pagination__link.is-disabled { pointer-events: none; opacity: 0.45; }
html[data-theme="dark"] .products-overview,
html[data-theme="dark"] .product-service-card,
html[data-theme="dark"] .products-empty-state,
html[data-theme="dark"] .products-pagination__link { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18); }
@media (max-width: 800px) {
  .products-overview { align-items: flex-start; flex-direction: column; }
  .products-overview__stats { width: 100%; min-width: 0; }
}
@media (max-width: 420px) {
  .products-overview { padding: 1.15rem; }
  .products-overview__stat { padding: 0.75rem 0.65rem; }
  .products-overview__stat-label { font-size: 0.62rem; }
  .product-service-card__header,
  .product-service-card__footer { padding-right: 1rem; padding-left: 1rem; }
  .product-service-card__domain { margin-right: 1rem; margin-left: 1rem; }
  .product-service-card__details { margin-right: 1rem; margin-left: 1rem; }
}

/* Services page: portfolio overview as the dedicated hero. */
.products-overview {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 150px;
  margin-bottom: 1.25rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: linear-gradient(125deg, #052e16 0%, #14532d 52%, #0f172a 100%);
  box-shadow: 0 14px 32px rgba(20, 83, 45, 0.18);
  color: #ffffff;
}
.products-overview::before,
.products-overview::after {
  position: absolute;
  z-index: 0;
  content: '';
  pointer-events: none;
}
.products-overview::before {
  inset: 0;
  background: radial-gradient(circle at 82% 20%, rgba(74, 222, 128, 0.3), transparent 28%), radial-gradient(circle at 10% 110%, rgba(255, 255, 255, 0.12), transparent 38%);
}
.products-overview::after {
  inset: 0;
  opacity: 0.16;
  background-image: linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
}
.products-overview__intro,
.products-overview__stats { position: relative; z-index: 1; }
.products-overview__intro { max-width: 540px; }
.products-overview__eyebrow { margin-bottom: 0.55rem; color: rgba(255, 255, 255, 0.76); }
.products-overview__eyebrow i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #bbf7d0;
}
.products-overview h2 { color: #ffffff; font-size: clamp(1.55rem, 2.5vw, 2.2rem); font-weight: var(--fw-extrabold); }
.products-overview p { color: rgba(255, 255, 255, 0.78); font-size: 0.9rem; }
.products-overview__stats {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}
.products-overview__stat { border-right-color: rgba(255, 255, 255, 0.16); }
.products-overview__stat-value { color: #ffffff; }
.products-overview__stat-label { color: rgba(255, 255, 255, 0.72); }
.products-overview__stat--active .products-overview__stat-value { color: #bbf7d0; }
.products-overview__stat--attention .products-overview__stat-value { color: #fecaca; }

/* Services page: operational service rows replace the card grid. */
.products-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}
.product-service-row {
  --service-row-accent: #64748b;
  --service-row-tint: rgba(100, 116, 139, 0.1);
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) auto minmax(340px, 1.2fr) auto;
  align-items: center;
  gap: 1rem;
  overflow: hidden;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-surface);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.product-service-row::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
  background: var(--service-row-accent);
  content: '';
}
.product-service-row:hover {
  border-color: color-mix(in srgb, var(--service-row-accent) 44%, var(--border-color));
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.075);
  transform: translateY(-2px);
}
.product-service-row--active { --service-row-accent: var(--brand-primary); --service-row-tint: var(--brand-light); }
.product-service-row--pending { --service-row-accent: #d97706; --service-row-tint: rgba(217, 119, 6, 0.1); }
.product-service-row--suspended,
.product-service-row--expired { --service-row-accent: var(--danger); --service-row-tint: var(--danger-bg); }
.product-service-row--inactive { --service-row-accent: #64748b; --service-row-tint: rgba(100, 116, 139, 0.1); }
.product-service-row__service {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.75rem;
}
.product-service-row__icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--service-row-tint);
  color: var(--service-row-accent);
  font-size: 1.25rem;
}
.product-service-row__identity { min-width: 0; }
.product-service-row__label {
  display: block;
  margin-bottom: 0.16rem;
  color: var(--text-muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.product-service-row h3 {
  overflow: hidden;
  margin: 0;
  color: var(--text-primary);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-service-row__domain {
  display: block;
  overflow: hidden;
  margin-top: 0.22rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-service-row__domain i { margin-right: 0.22rem; color: var(--service-row-accent); }
.product-service-row__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  padding: 0.3rem 0.52rem;
  border: 1px solid color-mix(in srgb, var(--service-row-accent) 24%, transparent);
  border-radius: 6px;
  background: var(--service-row-tint);
  color: var(--service-row-accent);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}
.product-service-row__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  min-width: 0;
  margin: 0;
}
.product-service-row__metrics div { min-width: 0; }
.product-service-row__metrics dt {
  margin-bottom: 0.25rem;
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  line-height: 1.2;
  text-transform: uppercase;
}
.product-service-row__metrics dd {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  overflow: hidden;
  margin: 0;
  color: var(--text-primary);
  font-size: 0.76rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-service-row__metrics dd i { flex: 0 0 auto; color: var(--service-row-accent); font-size: 0.9rem; }
.product-service-row__metrics .product-service-row__amount { color: var(--service-row-accent); font-size: 0.86rem; font-weight: 750; }
.product-service-row__manage {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.52rem 0.7rem;
  border-radius: 8px;
  background: var(--service-row-tint);
  color: var(--service-row-accent);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.product-service-row__manage:hover {
  background: var(--service-row-accent);
  color: #ffffff;
  transform: translateX(2px);
}
@media (max-width: 1220px) {
  .product-service-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .product-service-row__metrics {
    grid-column: 1 / -1;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-subtle);
  }
}
@media (max-width: 800px) {
  .products-overview { padding: 1.1rem; }
  .products-overview__stats { width: 100%; }
  .product-service-row { grid-template-columns: minmax(0, 1fr) auto; padding: 1rem; }
  .product-service-row__manage { grid-column: 1 / -1; width: 100%; }
}
@media (max-width: 520px) {
  .products-overview__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .products-overview__stats--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .products-overview__stat { padding: 0.7rem 0.55rem; }
  .products-overview__stat-label { font-size: 0.6rem; }
  .product-service-row { grid-template-columns: 1fr; gap: 0.8rem; }
  .product-service-row__status { justify-self: start; }
  .product-service-row__metrics { grid-template-columns: 1fr; gap: 0.65rem; }
  .product-service-row__manage { grid-column: auto; }
}

/* Invoice history pagination */
.invoice-pagination .pagination { gap: 0.35rem !important; }
.invoice-pagination .page-link {
  align-items: center;
  background: #f8faf9;
  color: #606b65;
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 700;
  height: 34px;
  justify-content: center;
  min-width: 34px;
  padding: 0 0.55rem;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.invoice-pagination .page-link:hover {
  background: var(--brand-light);
  color: var(--brand-primary);
  transform: translateY(-1px);
}
.invoice-pagination .page-item.active .page-link {
  background: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(var(--brand-primary-rgb), 0.2);
}
.invoice-pagination .page-item.disabled .page-link { opacity: 0.48; }
.invoice-pagination .page-item.disabled .page-link.bg-transparent { opacity: 0.7; }
html[data-theme="dark"] .invoice-pagination .page-link { background: var(--bg-elevated); }
html[data-theme="dark"] .invoice-pagination .page-item.active .page-link { background: var(--brand-primary); color: #ffffff; }

/* ================================================================
   29. Domains portfolio
   ================================================================ */
.domain-service-row { grid-template-columns: minmax(240px, 1.45fr) auto minmax(340px, 1.2fr) auto; }
@media (max-width: 1220px) {
  .domain-service-row { grid-template-columns: minmax(0, 1fr) auto auto; }
}
@media (max-width: 800px) {
  .domain-service-row { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (max-width: 520px) {
  .domain-service-row { grid-template-columns: 1fr; }
}

button.product-service-row__manage {
  font-family: inherit;
  cursor: pointer;
  border: 0;
}

.email-history-toolbar {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 0.85rem;
}
.email-history-search {
  position: relative;
  display: block;
  width: min(100%, 320px);
}
.email-history-search i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}
.email-history-search input {
  width: 100%;
  min-height: 42px;
  padding: 0.6rem 0.9rem 0.6rem 2.4rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.email-history-search input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.08);
}
.email-history-list {
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-surface);
}
.email-history-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.7rem 0.85rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  background: transparent;
  color: inherit;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.email-history-line.is-hidden { display: none; }
.email-history-line:last-child { border-bottom: 0; }
.email-history-line:hover { background: var(--bg-elevated); }
.email-history-line__icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--brand-light);
  color: var(--brand-primary);
  font-size: 0.95rem;
}
.email-history-line__subject {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.email-history-line__date {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 550;
  white-space: nowrap;
  margin-right: 1.75rem;
}
.email-history-line__action {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  color: var(--brand-primary);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}
.email-history-list .products-empty-state {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.email-history-empty-search[hidden] { display: none; }
.email-history-pagination {
  align-items: center;
}
.email-history-pagination .products-pagination__link {
  cursor: pointer;
  font-family: inherit;
}
.email-history-pagination__status {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}
@media (max-width: 720px) {
  .email-history-toolbar { justify-content: stretch; }
  .email-history-search { width: 100%; }
  .email-history-line {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.45rem 0.65rem;
  }
  .email-history-line__date {
    grid-column: 2;
    grid-row: 2;
    margin-right: 0;
    font-size: 0.72rem;
  }
  .email-history-line__subject { grid-column: 2; grid-row: 1; }
  .email-history-line__action { grid-row: 1 / span 2; }
}

/* ================================================================
   30. Email preview popup
   ================================================================ */
body.email-preview-page {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-body);
  font-family: var(--font-sans);
}
.email-preview {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-surface);
}
.email-preview__header {
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(125deg, #052e16 0%, #14532d 52%, #0f172a 100%);
  color: #ffffff;
}
.email-preview__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.email-preview__header h1 {
  margin: 0;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 750;
  line-height: 1.35;
}
.email-preview__attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}
.email-preview__attachments li {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.72rem;
}
.email-preview__body {
  flex: 1;
  padding: 0;
  background: var(--bg-body);
}
.email-preview__body iframe {
  display: block;
  width: 100%;
  height: calc(100vh - 168px);
  border: 0;
  background: #ffffff;
}
.email-preview__footer {
  display: flex;
  justify-content: flex-end;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
}
.email-preview__close {
  min-height: 36px;
  padding: 0.5rem 0.9rem;
  border: 0;
  border-radius: 8px;
  background: var(--brand-primary);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.email-preview__close:hover { background: var(--brand-hover); }

/* ================================================================
   31. Twenty-One fallback pages (account forms, leftover tables)
   ================================================================ */
.snbd-content .card {
  border: 1px solid var(--border-color) !important;
  border-radius: 14px !important;
  background: var(--bg-surface) !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}
.snbd-content .card-header,
.snbd-content .card-footer {
  background: var(--bg-surface) !important;
  border-color: var(--border-subtle) !important;
}
.snbd-content .card-title,
.snbd-content .card-header h3,
.snbd-content .card-header h2 {
  color: var(--text-primary);
  font-weight: 700;
}
.snbd-content .table-container,
.snbd-content .dataTables_wrapper {
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-surface);
}
.snbd-content table.table-list,
.snbd-content .dataTables_wrapper table {
  margin: 0;
}
.snbd-content table.table-list thead th,
.snbd-content .dataTables_wrapper thead th {
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-color);
}
.snbd-content .btn-primary,
.snbd-content .btn-info {
  background: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  color: #ffffff !important;
}
.snbd-content .btn-primary:hover,
.snbd-content .btn-info:hover {
  background: var(--brand-hover) !important;
  border-color: var(--brand-hover) !important;
}
.snbd-content .nav-tabs .nav-link.active {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}
html[data-theme="dark"] .email-preview__body iframe { background: var(--bg-surface); }

/* ================================================================
   27. Ticket Workspace
   ================================================================ */
.ticket-page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  min-height: 218px;
  margin: -0.5rem 0 1.5rem;
  padding: 2.25rem clamp(1.25rem, 4vw, 3.5rem);
  overflow: hidden;
  color: #fff;
  background: #14251d;
  border-radius: 0 0 22px 22px;
  box-shadow: 0 16px 34px rgba(20, 37, 29, 0.14);
}
.ticket-page-hero__texture {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image: linear-gradient(120deg, transparent 0 45%, rgba(255,255,255,.08) 45% 46%, transparent 46% 100%), radial-gradient(circle at 84% 10%, rgba(74, 222, 128, .34), transparent 28%);
}
.ticket-page-hero__content,
.ticket-page-hero__actions { position: relative; z-index: 1; }
.ticket-page-hero__content { display: flex; flex-direction: column; gap: 1.35rem; min-width: 0; }
.ticket-back-link { display: inline-flex; align-items: center; gap: .45rem; width: fit-content; color: rgba(255,255,255,.72); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.ticket-back-link:hover { color: #fff; }
.ticket-page-hero__heading { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.ticket-page-hero__icon { display: grid; place-items: center; flex: 0 0 52px; width: 52px; height: 52px; color: #14251d; background: #86efac; border-radius: 15px; font-size: 1.45rem; }
.ticket-page-hero__eyebrow { margin-bottom: .25rem; color: #86efac; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.ticket-page-hero__eyebrow span { color: rgba(255,255,255,.52); }
.ticket-page-hero h1 { max-width: min(760px, 70vw); margin: 0; overflow: hidden; color: #fff; font-size: clamp(1.5rem, 3vw, 2.35rem); font-weight: 750; line-height: 1.12; text-overflow: ellipsis; white-space: nowrap; }
.ticket-page-hero__meta { display: flex; flex-wrap: wrap; gap: .95rem; margin-top: .7rem; color: rgba(255,255,255,.7); font-size: .82rem; }
.ticket-page-hero__meta span { display: inline-flex; align-items: center; gap: .35rem; }
.ticket-page-hero__meta i { color: #86efac; }
.ticket-page-hero__actions { display: flex; align-items: center; gap: .55rem; flex-shrink: 0; }
.ticket-status { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .72rem; border: 1px solid transparent; border-radius: 999px; font-size: .76rem; font-weight: 750; white-space: nowrap; }
.ticket-status--open { color: #fecaca; background: rgba(220,38,38,.18); border-color: rgba(252,165,165,.25); }
.ticket-status--answered { color: #bbf7d0; background: rgba(22,163,74,.2); border-color: rgba(134,239,172,.24); }
.ticket-status--waiting { color: #fde68a; background: rgba(217,119,6,.2); border-color: rgba(253,230,138,.24); }
.ticket-status--closed { color: #e5e7eb !important; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.14); }
.ticket-status--closed span { color: #e5e7eb !important; }
.ticket-icon-button { display: grid; place-items: center; width: 36px; height: 36px; color: rgba(255,255,255,.78); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); border-radius: 10px; transition: background .18s, color .18s, transform .18s; }
.ticket-icon-button:hover { color: #fff; background: rgba(255,255,255,.2); transform: translateY(-1px); }
.ticket-hero-controls { align-items: center; flex-direction: row; flex-wrap: nowrap; width: max-content; max-width: 100%; gap: .65rem; }
.ticket-hero-controls .snbd-page-hero__cta { white-space: nowrap; }
.ticket-hero-icon-actions { display: flex; align-items: center; gap: .45rem; }
.ticket-workspace { display: grid; grid-template-columns: minmax(220px, 275px) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.25rem); width: 100%; max-width: none; margin: 0 0 3rem; }
.ticket-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.ticket-side-card, .ticket-side-note, .ticket-composer { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 14px; box-shadow: 0 8px 24px rgba(15,23,42,.045); }
.ticket-side-card { padding: 1.1rem; }
.ticket-side-card__label, .ticket-section-kicker { color: var(--brand-primary); font-size: .68rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.ticket-side-card__subject { margin: .55rem 0 1.1rem; color: var(--text-primary); font-size: .96rem; font-weight: 750; line-height: 1.35; }
.ticket-facts { display: grid; gap: .9rem; margin: 0; }
.ticket-facts div { display: flex; flex-direction: column; gap: .18rem; padding-bottom: .8rem; border-bottom: 1px solid var(--border-subtle); }
.ticket-facts div:last-child { padding-bottom: 0; border-bottom: 0; }
.ticket-facts dt { color: var(--text-muted); font-size: .68rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.ticket-facts dd { display: flex; align-items: center; gap: .35rem; margin: 0; color: var(--text-primary); font-size: .8rem; font-weight: 650; }
.ticket-facts dd i { color: var(--brand-primary); }
.ticket-side-card--actions { padding-bottom: .45rem; }
.ticket-side-action { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .7rem .1rem; color: var(--text-secondary); background: transparent; border: 0; border-bottom: 1px solid var(--border-subtle); font: inherit; font-size: .8rem; text-align: left; }
.ticket-side-action:last-child { border-bottom: 0; }
.ticket-side-action > i:first-child { color: var(--brand-primary); font-size: 1rem; }
.ticket-side-action > i:last-child { margin-left: auto; color: var(--text-muted); font-size: .85rem; }
.ticket-side-action:hover { color: var(--brand-primary); }
.ticket-side-note { display: flex; gap: .65rem; padding: .9rem; color: var(--text-secondary); background: var(--brand-light); border-color: rgba(var(--brand-primary-rgb), .16); box-shadow: none; }
.ticket-side-note > i { color: var(--brand-primary); font-size: 1.15rem; }
.ticket-side-note div { display: grid; gap: .25rem; }
.ticket-side-note strong { color: var(--text-primary); font-size: .76rem; }
.ticket-side-note span { font-size: .7rem; line-height: 1.45; }
.ticket-main-column { min-width: 0; }
.ticket-thread-toolbar, .ticket-composer__header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.ticket-thread-toolbar h2, .ticket-composer h2 { margin: .25rem 0 0; color: var(--text-primary); font-size: 1.18rem; font-weight: 750; }
.ticket-search { display: flex; align-items: center; gap: .45rem; min-width: 210px; padding: .45rem .65rem; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 9px; color: var(--text-muted); }
.ticket-search:focus-within { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), .1); }
.ticket-search input { min-width: 0; width: 100%; padding: .15rem; color: var(--text-primary); background: transparent; border: 0; outline: 0; font: inherit; font-size: .77rem; }
.ticket-search kbd { padding: .08rem .3rem; color: var(--text-muted); background: var(--bg-elevated); border: 1px solid var(--border-color); border-radius: 4px; font-size: .65rem; }
.ticket-timeline { position: relative; padding: .35rem 0 1rem; }
.ticket-message { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: .9rem; margin-bottom: 1.2rem; }
.ticket-message__rail { position: relative; display: flex; justify-content: center; }
.ticket-avatar { position: relative; z-index: 1; display: grid; place-items: center; width: max-content; min-width: 36px; height: 36px; padding: 0 .42rem; border-radius: 11px; font-size: .68rem; font-weight: 800; white-space: nowrap; }
.ticket-avatar--client { color: var(--brand-primary); background: var(--brand-light); border: 1px solid rgba(var(--brand-primary-rgb), .2); }
.ticket-avatar--staff { color: #fff; background: #14251d; border: 1px solid #1f5138; }
.ticket-timeline-line { position: absolute; top: 39px; bottom: -1.3rem; width: 1px; background: var(--border-color); }
.ticket-message:last-of-type .ticket-timeline-line { display: none; }
.ticket-message__content { min-width: 0; padding: 1.05rem 1.15rem; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 5px 18px rgba(15,23,42,.035); }
.ticket-message--client .ticket-message__content { border-left: 3px solid var(--brand-primary); }
.ticket-message--staff .ticket-message__content { border-left: 3px solid #1f5138; }
.ticket-message__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; padding-bottom: .7rem; border-bottom: 1px solid var(--border-subtle); }
.ticket-message__header div { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.ticket-message__header strong { color: var(--text-primary); font-size: .82rem; }
.ticket-message__header time { color: var(--text-muted); font-size: .7rem; white-space: nowrap; }
.ticket-message__role { padding: .18rem .45rem; color: var(--text-muted); background: var(--bg-elevated); border-radius: 4px; font-size: .63rem; font-weight: 700; }
.ticket-message__role--staff { color: var(--brand-primary); background: var(--brand-light); }
.ticket-message__body { color: var(--text-primary); font-size: .87rem; line-height: 1.75; overflow-wrap: anywhere; }
.ticket-message__body img { max-width: 100%; height: auto; }
.ticket-message__attachments { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--border-subtle); }
.ticket-attachments-label { width: 100%; color: var(--text-muted); font-size: .67rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.ticket-attachment { display: inline-flex; align-items: center; gap: .4rem; max-width: 100%; padding: .4rem .55rem; color: var(--text-secondary); background: var(--bg-elevated); border: 1px solid var(--border-color); border-radius: 7px; font-size: .72rem; }
.ticket-attachment span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-attachment i:last-child { color: var(--brand-primary); }
.ticket-attachment:hover { color: var(--brand-primary); border-color: rgba(var(--brand-primary-rgb), .4); }
.ticket-thread-end { display: flex; align-items: center; gap: .75rem; margin: .4rem 0 1.8rem 52px; color: var(--text-muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; }
.ticket-thread-end::before, .ticket-thread-end::after { content: ''; height: 1px; flex: 1; background: var(--border-color); }
.ticket-composer { padding: 1.25rem; }
.ticket-composer__header { align-items: center; margin-bottom: 1rem; }
.ticket-composer__hint { display: inline-flex; align-items: center; gap: .35rem; color: var(--text-muted); font-size: .72rem; }
.ticket-editor { overflow: hidden; border: 1px solid var(--border-color); border-radius: 10px; background: var(--bg-body); }
.ticket-editor:focus-within { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), .1); }
.ticket-editor textarea { display: block; width: 100%; min-height: 145px; padding: 1rem; resize: vertical; color: var(--text-primary); background: transparent; border: 0; outline: 0; font: inherit; font-size: .86rem; line-height: 1.65; }
.ticket-editor textarea::placeholder { color: var(--text-muted); }
.ticket-editor__footer { display: flex; justify-content: space-between; padding: .55rem .8rem; color: var(--text-muted); border-top: 1px solid var(--border-subtle); font-size: .67rem; }
.ticket-composer__footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .85rem; }
.ticket-upload { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; min-width: 0; }
.ticket-upload label { display: inline-flex; align-items: center; gap: .4rem; padding: .52rem .7rem; color: var(--text-secondary); border: 1px dashed var(--border-color); border-radius: 8px; cursor: pointer; font-size: .76rem; font-weight: 700; }
.ticket-upload label:hover { color: var(--brand-primary); border-color: var(--brand-primary); background: var(--brand-light); }
.ticket-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ticket-upload__hint { color: var(--text-muted); font-size: .68rem; }
.ticket-file-list { display: flex; flex-wrap: wrap; gap: .35rem; width: 100%; }
.ticket-file-chip { display: inline-flex; align-items: center; gap: .25rem; max-width: 190px; padding: .25rem .45rem; overflow: hidden; color: var(--brand-primary); background: var(--brand-light); border-radius: 5px; font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.ticket-send-button { display: inline-flex; align-items: center; gap: .7rem; padding: .7rem 1rem; color: #fff; background: var(--brand-primary); border: 0; border-radius: 8px; box-shadow: 0 5px 13px rgba(var(--brand-primary-rgb), .2); font-size: .8rem; font-weight: 750; transition: transform .18s, background .18s; }
.ticket-send-button:hover { color: #fff; background: var(--brand-hover); transform: translateY(-1px); }
.ticket-closed-panel { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.15rem; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 12px; }
.ticket-closed-panel__icon { display: grid; place-items: center; width: 36px; height: 36px; color: var(--text-secondary); background: var(--bg-elevated); border-radius: 10px; }
.ticket-closed-panel div:nth-child(2) { display: grid; gap: .2rem; }
.ticket-closed-panel strong { color: var(--text-primary); font-size: .8rem; }
.ticket-closed-panel span { color: var(--text-muted); font-size: .72rem; }
.ticket-closed-panel__link { margin-left: auto; color: var(--brand-primary); font-size: .75rem; font-weight: 750; white-space: nowrap; }
.ticket-message[hidden] { display: none; }

html[data-theme="dark"] .ticket-page-hero { background: #07140e; box-shadow: 0 16px 34px rgba(0,0,0,.3); }
html[data-theme="dark"] .ticket-avatar--staff { background: #0b2819; }
html[data-theme="dark"] .ticket-attachment,
html[data-theme="dark"] .ticket-search kbd { background: var(--bg-elevated); }
html[data-theme="dark"] .ticket-status--closed,
html[data-theme="dark"] .ticket-status--closed span { color: #f3f4f6 !important; }

@media (max-width: 900px) {
  .ticket-page-hero { align-items: flex-start; flex-direction: column; min-height: auto; padding: 1.6rem 1.25rem; }
  .ticket-page-hero__actions { width: 100%; }
  .ticket-workspace { grid-template-columns: 1fr; }
  .ticket-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .ticket-side-note { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .ticket-page-hero { margin-inline: -.75rem; border-radius: 0 0 18px 18px; }
  .ticket-page-hero h1 { max-width: 72vw; font-size: 1.35rem; }
  .ticket-page-hero__heading { align-items: flex-start; }
  .ticket-page-hero__icon { flex-basis: 42px; width: 42px; height: 42px; border-radius: 12px; font-size: 1.15rem; }
  .ticket-sidebar { display: flex; }
  .ticket-thread-toolbar { align-items: stretch; flex-direction: column; }
  .ticket-search { min-width: 0; }
  .ticket-message { grid-template-columns: 31px minmax(0, 1fr); gap: .55rem; }
  .ticket-avatar { width: max-content; min-width: 30px; height: 30px; padding-inline: .32rem; border-radius: 9px; font-size: .62rem; }
  .ticket-timeline-line { top: 33px; }
  .ticket-message__content { padding: .85rem; }
  .ticket-message__header { flex-direction: column; gap: .35rem; }
  .ticket-thread-end { margin-left: 38px; }
  .ticket-composer__header, .ticket-composer__footer { align-items: flex-start; flex-direction: column; }
  .ticket-send-button { width: 100%; justify-content: center; }
  .ticket-upload__hint { width: 100%; }
}
@media print {
  #snbd-sidebar, #snbd-topbar, .ticket-page-hero__actions, .ticket-sidebar, .ticket-thread-toolbar .ticket-search, .ticket-composer, .ticket-closed-panel__link { display: none !important; }
  .ticket-page-hero { margin: 0 0 1rem; color: #111; background: #fff; border: 1px solid #ddd; box-shadow: none; }
  .ticket-page-hero h1 { color: #111; white-space: normal; }
  .ticket-page-hero__meta { color: #555; }
  .ticket-workspace { display: block; max-width: none; }
  .ticket-message__content { break-inside: avoid; box-shadow: none; }
}
