/* ==========================================================================
   NEXTECH ADMIN PLATFORM — STRIPE / LINEAR / NOTION LEVEL DESIGN SYSTEM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;750;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Design System Lock (Light Theme as Primary Default) */
  --bg-page: #F6F8FB;
  --bg-app: #F6F8FB;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --bg-hover: #F8FAFC;
  --bg-sidebar: #FFFFFF;
  --bg-header: rgba(255, 255, 255, 0.92);
  --bg-zebra: #FAFCFE;

  --border: #E2E8F0;
  --border-color: #E2E8F0;
  --border-strong: #CBD5E1;
  --border-light: #F1F5F9;
  --border-focus: #0891B2;

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;

  /* Brand Accents */
  --accent: #0891B2;
  --accent-cyan: #0891B2;
  --accent-hover: #0E7490;
  --accent-soft: #ECFEFF;
  --accent-glow: rgba(8, 145, 178, 0.16);
  --accent-grad: linear-gradient(135deg, #0891b2 0%, #0284c7 100%);
  --accent-grad-hover: linear-gradient(135deg, #0e7490 0%, #0369a1 100%);

  /* Functional Status Colors */
  --success: #059669;
  --success-soft: #ECFDF5;
  --status-active-bg: #ECFDF5;
  --status-active-text: #059669;
  --status-active-border: #A7F3D0;

  --warning: #D97706;
  --warning-soft: #FFFBEB;
  --status-pending-bg: #FFFBEB;
  --status-pending-text: #D97706;
  --status-pending-border: #FDE68A;

  --danger: #DC2626;
  --danger-soft: #FEF2F2;
  --status-expired-bg: #FEF2F2;
  --status-expired-text: #DC2626;
  --status-expired-border: #FECACA;

  --status-revoked-bg: #F1F5F9;
  --status-revoked-text: #475569;
  --status-revoked-border: #CBD5E1;

  --info: #2563EB;
  --info-soft: #EFF6FF;
  --status-info-bg: #EFF6FF;
  --status-info-text: #2563EB;
  --status-info-border: #BFDBFE;

  /* Geometry */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Elevation & Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 20px 40px rgba(15, 23, 42, 0.12);

  /* Dimensions */
  --sidebar-w: 280px;
  --topbar-h: 72px;
  --content-max-width: 100%;

  /* Typography */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Transitions */
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s var(--ease-smooth);
}

/* Dark Theme Overrides */
body.theme-dark,
html.theme-dark {
  --bg-page: #0B0F19;
  --bg-app: #0B0F19;
  --bg-surface: #111827;
  --bg-subtle: #1E293B;
  --bg-hover: #172033;
  --bg-sidebar: #0E1422;
  --bg-header: rgba(14, 20, 34, 0.92);
  --bg-zebra: #131D2F;

  --border: #1E293B;
  --border-color: #1E293B;
  --border-strong: #334155;
  --border-light: #1E293B;
  --border-focus: #38BDF8;

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-inverse: #0F172A;

  --accent: #38BDF8;
  --accent-cyan: #38BDF8;
  --accent-hover: #0EA5E9;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --accent-glow: rgba(56, 189, 248, 0.2);
  --accent-grad: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
  --accent-grad-hover: linear-gradient(135deg, #0369a1 0%, #0891b2 100%);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.7);

  --status-active-bg: rgba(16, 185, 129, 0.15);
  --status-active-text: #34D399;
  --status-active-border: rgba(52, 211, 153, 0.3);

  --status-expired-bg: rgba(239, 68, 68, 0.15);
  --status-expired-text: #F87171;
  --status-expired-border: rgba(248, 113, 113, 0.3);

  --status-revoked-bg: rgba(100, 116, 139, 0.15);
  --status-revoked-text: #94A3B8;
  --status-revoked-border: rgba(148, 163, 184, 0.3);

  --status-pending-bg: rgba(245, 158, 11, 0.15);
  --status-pending-text: #FBBF24;
  --status-pending-border: rgba(251, 191, 36, 0.3);
}

/* ==========================================================================
   BASE & RESET
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

body.theme-dark,
html.theme-dark,
body.theme-dark *,
html.theme-dark * {
  scrollbar-color: rgba(148, 163, 184, 0.25) transparent;
}

/* Universal Custom Scrollbar (WebKit / Blink) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

body.theme-dark ::-webkit-scrollbar-thumb,
html.theme-dark ::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
}

body.theme-dark ::-webkit-scrollbar-thumb:hover,
html.theme-dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.45);
}

::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  /*
   * LAYOUT: body is a block container (not flex).
   * overflow-x:hidden lives HERE (not on admin-app) because
   * position:sticky on sidebar requires no overflow:hidden on any ancestor.
   */
  overflow-x: hidden;
}

/* Screen Reader / Accessibility Offscreen Utility */
.sr-only,
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ==========================================================================
   FULL-PAGE PRELOADER & TOP NOTIFICATION OVERLAYS
   ========================================================================== */

.admin-preloader {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  pointer-events: all;
}

.admin-preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px;
  max-width: 360px;
}

.preloader-logo-ring {
  position: relative;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-spinner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: preloaderSpin 0.9s cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite;
}

.preloader-icon {
  font-size: 24px;
  line-height: 1;
}

.preloader-title {
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.preloader-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.4;
}

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

/* Network Error Banner */
.network-error-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--danger);
  color: #ffffff;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: bannerSlideDown 0.3s var(--ease-smooth);
}

.net-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.net-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes bannerSlideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

.admin-app {
  /*
   * THE CORRECT FLEX LAYOUT ROOT.
   * Sidebar is a real flex child (flex: 0 0 280px), admin-main is flex: 1.
   * No overflow-x:hidden here — that would break position:sticky on sidebar.
   * overflow-x:hidden lives on body instead.
   */
  display: flex;
  align-items: flex-start;   /* critical: prevents sidebar from stretching to page height */
  min-height: 100vh;
}


/* ==========================================================================
   SIDEBAR (280px LINEAR / NOTION LEVEL ELEVATION)
   ========================================================================== */

.admin-sidebar {
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              min-width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              flex-basis 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.2s ease,
              border-color 0.25s ease;
  user-select: none;
  -webkit-user-select: none;
}

/* Sidebar Collapsed State */
.admin-app.sidebar-collapsed .admin-sidebar {
  flex: 0 0 0px !important;
  width: 0px !important;
  min-width: 0px !important;
  border-right-color: transparent !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  transform: translateX(-100%);
}

.sidebar-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.sidebar-collapse-btn svg {
  width: 17px;
  height: 17px;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.sidebar-collapse-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

.sidebar-collapse-btn:hover svg {
  color: var(--accent);
}

.sidebar-expand-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}

.sidebar-expand-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--accent);
}

.admin-app.sidebar-collapsed .sidebar-expand-btn {
  display: inline-flex !important;
}

.sidebar-header {
  height: var(--topbar-h);
  padding: 0 16px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.sidebar-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

/* Topbar Admin User Profile Card (Moved to Header) */
.topbar-user-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
  margin-right: 4px;
}

.topbar-user-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.topbar-user-card .user-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.topbar-user-card .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 750;
  font-size: 0.8rem;
  box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 3px var(--accent-soft);
}

.topbar-user-card .user-online-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  background: var(--success);
  border: 2px solid var(--bg-surface);
  border-radius: 50%;
}

.topbar-user-card .user-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
}

.topbar-user-card .user-name {
  font-size: 0.8rem;
  font-weight: 750;
  color: var(--text-primary);
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.topbar-user-card .user-role-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 0.62rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent);
  margin-top: 2px;
  border: 1px solid rgba(8, 145, 178, 0.2);
}

/* Sidebar Navigation Items */
.sidebar-nav {
  flex: 1;
  padding: 8px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-title {
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 12px;
  margin: 20px 0 6px;
}

.nav-item-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-item-btn svg {
  width: 19px;
  height: 19px;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  flex-shrink: 0;
}

.nav-item-btn:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item-btn:hover svg {
  color: var(--accent);
}

.nav-item-btn.active {
  background-color: var(--accent-soft);
  color: var(--accent);
  font-weight: 750;
}

.nav-item-btn.active svg {
  color: var(--accent);
}

.nav-item-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3.5px;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-surface);
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.theme-icon-sun { display: none; width: 18px; height: 18px; }
.theme-icon-moon { display: block; width: 18px; height: 18px; }
body.theme-dark .theme-icon-sun { display: block; }
body.theme-dark .theme-icon-moon { display: none; }

/* ==========================================================================
   TOPBAR (72px STICKY + TRANSLUCENT BACKDROP BLUR)
   ========================================================================== */

.admin-main {
  /*
   * CORRECT: No margin-left, no calc().
   * flex:1 1 auto automatically fills exactly viewport - sidebar width.
   * min-width:0 allows the item to shrink below content size (prevents overflow).
   */
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--bg-page);
}

.admin-topbar {
  height: var(--topbar-h);
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
  color: var(--text-primary);
  cursor: pointer;
}

.topbar-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

.topbar-breadcrumbs span.active {
  color: var(--text-primary);
  font-weight: 750;
}

/* Center Global Search with Keyboard Hint */
.topbar-search {
  position: relative;
  width: 380px;
  max-width: 420px;
}

.topbar-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.topbar-search-input {
  width: 100%;
  height: 40px;
  padding: 8px 58px 8px 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: var(--font);
  outline: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.topbar-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: #ffffff;
}

.kbd-hint {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.topbar-link:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border);
}

/* ==========================================================================
   MAIN CONTENT INNER WRAPPER & PAGE HEADERS
   ========================================================================== */

.dashboard-container,
.admin-content-inner {
  width: 100%;
  max-width: 100%;
  min-width: 0;   /* prevent flex child overflow */
  margin: 0;
  padding: 32px 44px 64px;
  flex: 1;
  box-sizing: border-box;
}

.tab-pane {
  display: none !important;
}

.tab-pane.active {
  display: block !important;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Section Header (Stripe / Vercel Typography & Alignment) */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 20px;
  flex-wrap: wrap;
}

.page-title-group h1 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.2;
}

.page-title-group h1 span {
  color: var(--accent);
}

.page-title-group p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ==========================================================================
   DASHBOARD LANDING & KPI CARDS
   ========================================================================== */

.welcome-banner {
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.06) 0%, rgba(37, 99, 235, 0.04) 50%, rgba(99, 102, 241, 0.06) 100%), var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.welcome-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.welcome-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

/* 4 KPI Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.kpi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-label {
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.kpi-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
}

.kpi-card.kpi-cyan .kpi-icon-badge {
  background: rgba(8, 145, 178, 0.08);
  color: var(--accent);
  border-color: rgba(8, 145, 178, 0.2);
}

.kpi-card.kpi-green .kpi-icon-badge {
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.2);
}

.kpi-card.kpi-blue .kpi-icon-badge {
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.2);
}

.kpi-card.kpi-amber .kpi-icon-badge {
  background: rgba(245, 158, 11, 0.08);
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.2);
}

.kpi-val-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 10px;
}

.kpi-val {
  font-size: 2.15rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.kpi-sparkline {
  width: 80px;
  height: 28px;
}

.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
  font-weight: 600;
}

.kpi-trend.positive { color: var(--success); }
.kpi-trend.neutral { color: var(--text-muted); }

/* 2-Column Analytics & Activity */
.analytics-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.chart-card, .activity-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.chart-header, .activity-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.chart-title-group h3 {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.chart-title-group p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.4;
}

.chart-toggle-group {
  display: inline-flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}

.chart-toggle-btn {
  border: none;
  background: transparent;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chart-toggle-btn:hover {
  color: var(--text-primary);
}

.chart-toggle-btn.active {
  background: var(--bg-surface);
  color: var(--accent);
  font-weight: 750;
  box-shadow: var(--shadow-xs);
}

.activity-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}

.svg-chart-container {
  width: 100%;
  height: 220px;
  position: relative;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 240px;
  padding-right: 6px;
  scrollbar-width: thin;
}

.activity-list::-webkit-scrollbar {
  width: 4px;
}

.activity-list::-webkit-scrollbar-track {
  background: transparent;
}

.activity-list::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}

body.theme-dark .activity-list::-webkit-scrollbar-thumb,
html.theme-dark .activity-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  transition: all var(--transition-fast);
}

.activity-item:hover {
  background: var(--bg-hover);
  border-color: var(--border);
}

.activity-icon-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

.activity-content {
  flex: 1;
  overflow: hidden;
}

.activity-text {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.mini-widget-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-height: 160px;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.mini-widget-card:hover {
  box-shadow: var(--shadow-md);
}

.mini-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.mini-widget-title {
  font-size: 0.92rem;
  font-weight: 750;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-widget-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-widget-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

/* ==========================================================================
   ADVANCED FILTER CARDS & TOOLBARS
   ========================================================================== */

.advanced-filter-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1.6fr auto;
  gap: 12px;
  align-items: flex-end;
}

.filter-field {
  display: flex;
  flex-direction: column;
}

.filter-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.date-range-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.date-range-group input[type="date"] {
  width: 100%;
  height: 40px;
  font-size: 0.78rem;
  font-family: var(--font);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  outline: none;
}

/* Segmented View Mode Toggle */
.view-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.view-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.view-mode-btn svg {
  color: currentColor;
  transition: transform 0.2s ease;
}

.view-mode-btn:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

body.theme-dark .view-mode-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.06);
}

.view-mode-btn.active {
  background: var(--bg-surface);
  color: var(--accent);
  font-weight: 750;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-light);
}

/* Customer Cards Grid View */
.cust-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.cust-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

.cust-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--accent-glow);
}

.cust-avatar-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(8, 145, 178, 0.2);
  flex-shrink: 0;
}

.badge-ltv {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-weight: 700;
  font-family: var(--font-mono);
}

body.theme-dark .badge-ltv {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

/* Sleek Centered Empty State */
.empty-state-box {
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
}

.empty-icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border: 1px solid rgba(8, 145, 178, 0.2);
}

.empty-state-title {
  font-size: 1.08rem;
  font-weight: 750;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-state-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 420px;
  line-height: 1.5;
  margin: 0 auto 20px;
}

/* ==========================================================================
   TABLES (STRIPE / LINEAR STANDARD, MIN 60px ROWS)
   ========================================================================== */

.card,
.table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  margin-bottom: 24px;
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th {
  background-color: var(--bg-subtle);
  height: 46px;
  padding: 10px 18px;
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 14px 18px;
  font-size: 0.88rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table tbody tr {
  transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
  background-color: var(--bg-hover);
}

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

/* Monospace Code Pill */
code.mono-pill {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--accent);
  border: 1px solid var(--border);
}

/* Seat Progress Container */
.seat-progress-container { width: 100%; max-width: 140px; }
.seat-progress-meta { display: flex; justify-content: space-between; font-size: 0.75rem; font-weight: 750; margin-bottom: 4px; }
.seat-progress-bar { height: 6px; background: var(--border); border-radius: var(--radius-full); overflow: hidden; }
.seat-progress-fill { height: 100%; border-radius: var(--radius-full); transition: width 0.3s ease; }
.seat-progress-fill.fill-green { background: var(--success); }
.seat-progress-fill.fill-amber { background: var(--warning); }
.seat-progress-fill.fill-red { background: var(--danger); }

/* Custom Checkboxes */
.custom-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  cursor: pointer;
  accent-color: var(--accent);
}

/* Badges & Chips */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-active { background-color: var(--status-active-bg); color: var(--status-active-text); border: 1px solid var(--status-active-border); }
.badge-expired { background-color: var(--status-expired-bg); color: var(--status-expired-text); border: 1px solid var(--status-expired-border); }
.badge-revoked { background-color: var(--status-revoked-bg); color: var(--status-revoked-text); border: 1px solid var(--status-revoked-border); }
.badge-pending { background-color: var(--status-pending-bg); color: var(--status-pending-text); border: 1px solid var(--status-pending-border); }
.badge-info { background-color: var(--status-info-bg); color: var(--status-info-text); border: 1px solid var(--status-info-border); }
.badge-ltv { background: var(--success-soft); color: var(--success); border: 1px solid var(--status-active-border); font-weight: 800; font-family: var(--mono); }

/* Sleek Action Code Pill */
.action-code-pill {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--info-soft);
  color: var(--info);
  border: 1px solid var(--status-info-border);
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  white-space: nowrap;
}

/* ==========================================================================
   BUTTONS (CLEAN BORDERS + CONSISTENT HEIGHTS)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-grad);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-grad-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  height: 46px;
  padding: 0 24px;
  font-size: 0.95rem;
}

.btn-icon-only {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   FORM CONTROLS (METICULOUSLY STYLED)
   ========================================================================== */

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 750;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  height: 42px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.88rem;
  outline: none;
  transition: all var(--transition-fast);
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 14px;
  padding-right: 34px !important;
  cursor: pointer;
}

.form-select option {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  padding: 6px;
}

body.theme-dark .form-select,
html.theme-dark .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.form-textarea {
  height: auto;
  min-height: 90px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ==========================================================================
   EMPTY STATES (BEAUTIFULLY CRAFTED ILLUSTRATIONS & CTA)
   ========================================================================== */

.empty-state,
.empty-state-box {
  text-align: center;
  padding: 56px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.empty-icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border: 1px solid rgba(8, 145, 178, 0.2);
}

.empty-state-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.empty-state-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto 16px;
  line-height: 1.45;
}

/* ==========================================================================
   PRODUCTS & PLANS SPLIT-VIEW (320px / 1fr) & SUB-TABS SUITE
   ========================================================================== */

.products-split-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .products-split-grid {
    grid-template-columns: 1fr;
  }
}

.product-catalogue-col {
  display: flex;
  flex-direction: column;
}

.product-catalogue-heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-left: 2px;
}

.product-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-sidebar-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}

.product-sidebar-card:hover {
  border-color: var(--accent);
  background: var(--bg-subtle);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.product-sidebar-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.product-sidebar-card.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
  border-top-left-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-lg);
}

.product-details-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.product-details-header {
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
}

.product-title-area {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.product-title-heading {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
}

.product-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-code-tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
}

.product-meta-sep {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.product-version-pill {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Product & Drawer Sub-Tabs Navigation Strip */
.product-subtabs-nav,
.cust-drawer-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.prod-subtab-btn,
.cust-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.prod-subtab-btn svg,
.cust-tab-btn svg {
  color: var(--text-muted);
  transition: color var(--transition-fast);
  flex-shrink: 0;
}

.prod-subtab-btn:hover,
.cust-tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
  border-color: var(--border);
}

.prod-subtab-btn:hover svg,
.cust-tab-btn:hover svg {
  color: var(--text-primary);
}

.prod-subtab-btn.active,
.cust-tab-btn.active {
  color: var(--accent);
  background: var(--bg-surface);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
  font-weight: 700;
}

.prod-subtab-btn.active svg,
.cust-tab-btn.active svg {
  color: var(--accent);
}

/* Sub-Tab Panes Display Toggle */
.prod-subtab-pane,
.cust-tab-pane {
  display: none;
  animation: fadeInPane 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.prod-subtab-pane.active,
.cust-tab-pane.active {
  display: block;
}

@keyframes fadeInPane {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-details-body {
  padding: 24px 26px;
}

/* General Sub-Tab Elements */
.product-desc-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.product-desc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.product-desc-header svg {
  color: var(--accent);
}

.product-desc-text {
  font-size: 0.92rem;
  color: var(--text-primary);
  line-height: 1.55;
  margin: 0;
}

.input-with-action {
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-with-action .form-input {
  flex: 1;
}

/* Subscription Plans Sub-Tab */
.plans-subtab-intro {
  margin-bottom: 16px;
}

.plans-subtab-intro p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0;
}

.product-plans-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan-card-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  background: var(--bg-surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
  position: relative;
}

.plan-card-item:hover {
  border-color: var(--accent);
  background: var(--bg-subtle);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.plan-feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 6px;
  margin-top: 6px;
  text-transform: capitalize;
  letter-spacing: 0.01em;
}

.plan-feature-tag::before {
  content: '✓';
  color: var(--success);
  font-weight: 800;
  font-size: 0.72rem;
}

.versions-table-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
}

/* ==========================================================================
   INQUIRIES READING PANE (PREMIUM FRONT / INTERCOM / LINEAR EMAIL INBOX)
   ========================================================================== */

.inbox-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  min-height: 720px;
  height: calc(100vh - 220px);
  max-height: 880px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  contain: layout;
}

.inbox-list-pane {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  height: 100%;
  overflow: hidden;
}

.inbox-header-area {
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-surface);
}

.inbox-search-wrap {
  position: relative;
  width: 100%;
}

.inbox-search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-muted);
}

.inbox-search-input {
  width: 100%;
  height: 38px;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  background: var(--bg-subtle);
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
}

.inbox-search-input:focus {
  border-color: var(--accent);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.inbox-status-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 2px 4px 2px;
}

.inbox-status-tabs::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.inbox-status-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.inbox-status-pill:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.inbox-status-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.inbox-bulk-toolbar {
  padding: 10px 16px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.inbox-scroll-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.inquiry-item-card {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition-fast);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-surface);
  box-sizing: border-box;
}

.inquiry-item-card:hover {
  background: var(--bg-hover);
}

.inquiry-item-card.active {
  background: var(--accent-soft);
}

/* Use pseudo-element so it doesn't shift/widen the card */
.inquiry-item-card.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.inquiry-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.inquiry-sender-info {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.inquiry-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.inquiry-sender-name {
  font-size: 0.88rem;
  font-weight: 750;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inquiry-sender-company {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inquiry-item-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 600;
}

.inquiry-item-subject {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.inquiry-item-snippet {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.inquiry-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.inbox-detail-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  background: var(--bg-surface);
}

.inbox-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
}

.inbox-empty-state svg {
  width: 56px;
  height: 56px;
  color: var(--text-muted);
  opacity: 0.4;
  margin-bottom: 16px;
}

.inbox-detail-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--bg-surface);
}

.inbox-sender-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.inbox-sender-meta h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.inbox-sender-meta span {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.inbox-detail-meta-strip {
  padding: 12px 24px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.inbox-meta-pill {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.inbox-meta-pill strong {
  color: var(--text-primary);
}

.inbox-message-content {
  padding: 24px;
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-surface);
}

.inbox-notes-section {
  padding: 18px 24px;
  background: #FFFBEB;
  border-bottom: 1px solid #FDE68A;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.inbox-notes-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 750;
  color: #92400E;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.inbox-notes-textarea {
  width: 100%;
  height: 70px;
  padding: 10px 14px;
  border: 1px solid #FCD34D;
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: #0F172A;
  font-family: var(--font);
  font-size: 0.84rem;
  resize: vertical;
  outline: none;
  transition: all var(--transition-fast);
}

.inbox-notes-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Dark Mode Overrides for Notes Section */
body.theme-dark .inbox-notes-section,
html.theme-dark .inbox-notes-section {
  background: rgba(245, 158, 11, 0.08);
  border-bottom-color: rgba(245, 158, 11, 0.2);
}

body.theme-dark .inbox-notes-title,
html.theme-dark .inbox-notes-title {
  color: #FBBF24;
}

body.theme-dark .inbox-notes-textarea,
html.theme-dark .inbox-notes-textarea {
  background: #111827;
  border-color: #334155;
  color: #F8FAFC;
}

body.theme-dark .inbox-notes-textarea:focus,
html.theme-dark .inbox-notes-textarea:focus {
  border-color: var(--accent);
  background: #0F172A;
}

.inbox-reply-section {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-surface);
}

.inbox-reply-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inbox-reply-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.88rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: all var(--transition-fast);
}

.inbox-reply-textarea:focus {
  border-color: var(--accent);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.inbox-reply-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   BACKUPS TAB STYLING
   ========================================================================== */

.backup-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 22px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow-xs);
}

.backup-schedule-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.backup-schedule-badge svg {
  color: var(--accent);
}

.storage-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.storage-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
}

.storage-stat-label {
  font-size: 0.74rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.storage-stat-val {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.storage-stat-sub {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ==========================================================================
   SETTINGS TAB STYLING
   ========================================================================== */

.settings-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

.settings-sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-xs);
}

.settings-nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
}

.settings-nav-btn svg {
  width: 17px;
  height: 17px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.settings-nav-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.settings-nav-btn:hover svg {
  color: var(--accent);
}

.settings-nav-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 750;
}

.settings-nav-btn.active svg {
  color: var(--accent);
}

.settings-nav-btn.danger-nav-btn {
  color: #ef4444;
}

.settings-nav-btn.danger-nav-btn svg {
  color: #ef4444;
}

.settings-content-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
}

.settings-subpane {
  display: none !important;
}

.settings-subpane.active {
  display: block !important;
  animation: fadeIn 0.2s ease-out;
}

.settings-pane-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.settings-pane-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.settings-pane-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.avatar-edit-box {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.profile-avatar-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

/* ==========================================================================
   DRAWERS & MODALS
   ========================================================================== */

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 950;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-overlay.active { opacity: 1; pointer-events: auto; }

.drawer-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: 540px;
  max-width: 92vw;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  box-shadow: -10px 0 30px rgba(15, 23, 42, 0.1);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s var(--ease-smooth);
  display: flex;
  flex-direction: column;
}

.drawer-panel.active { transform: translateX(0); }
.drawer-header { padding: 22px 26px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; background: var(--bg-surface); }
.drawer-title { font-size: 1.25rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.01em; }
.drawer-body { padding: 24px 26px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 22px; }
.drawer-footer { padding: 18px 26px; border-top: 1px solid var(--border-light); display: flex; align-items: center; justify-content: flex-end; gap: 10px; background: var(--bg-surface); }

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-section-title {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Key banner card */
.drawer-key-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: visible;
}

.drawer-key-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.drawer-key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.drawer-key-chip {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 750;
  color: var(--accent);
  letter-spacing: 0.04em;
  word-break: break-all;
  line-height: 1.4;
  display: block;
}

/* Meta Grid Cards */
.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.meta-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
}

.meta-item:hover {
  border-color: var(--border);
  background: var(--bg-surface);
}

.meta-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.meta-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-word;
}

/* Device card */
.device-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s ease;
}

.device-card:hover {
  border-color: var(--border);
  background: var(--bg-surface);
}

/* Timeline */
.timeline-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-event {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active { display: flex; }
.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 32px;
  position: relative;
  animation: modalSlideUp 0.25s var(--ease-smooth);
}

.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; border-bottom: 1px solid var(--border-light); padding-bottom: 16px; }
.modal-title { font-size: 1.35rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.01em; }
.modal-close { background: none; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; padding: 4px; }
.modal-close:hover { color: var(--text-primary); }

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

/* ==========================================================================
   WIZARD MODAL & STEPPER (LINEAR / STRIPE ENTERPRISE QUALITY)
   ========================================================================== */

.wizard-modal-content {
  max-width: 760px;
  width: 100%;
}

.wizard-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin: 4px 0 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.wizard-stepper::before {
  content: '';
  position: absolute;
  top: 17px;
  left: 48px;
  right: 48px;
  height: 2px;
  background: var(--border);
  z-index: 1;
}

.wizard-step-item {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  padding: 0 12px;
  user-select: none;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 2px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 750;
  transition: all var(--transition-fast);
}

.step-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.wizard-step-item.active .step-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.wizard-step-item.active .step-label {
  color: var(--accent);
  font-weight: 750;
}

.wizard-step-item.completed .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: #ffffff;
}

.wizard-step-item.completed .step-label {
  color: var(--text-primary);
  font-weight: 600;
}

.wizard-step-pane {
  display: none !important;
}

.wizard-step-pane.active {
  display: block !important;
  animation: fadeIn 0.2s ease-out;
}

.product-select-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 10px;
}

@media (max-width: 680px) {
  .product-select-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.product-card-option {
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 110px;
}

.product-card-option:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.product-card-option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.stepper-group {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
  height: 40px;
}

.stepper-btn {
  width: 38px;
  height: 100%;
  background: var(--bg-subtle);
  border: none;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.stepper-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.stepper-input {
  width: 65px;
  height: 100%;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 750;
  color: var(--text-primary);
  font-family: var(--font);
  outline: none;
  -moz-appearance: textfield;
}

.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Wizard & Renewal Term Duration Buttons */
.wiz-duration-btn,
.renew-duration-btn {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  font-weight: 600 !important;
  border: 1.5px solid var(--border) !important;
  color: var(--text-secondary) !important;
  background: var(--bg-surface) !important;
  cursor: pointer !important;
  border-radius: var(--radius-sm) !important;
  padding: 8px 10px !important;
  text-align: center !important;
}

.wiz-duration-btn:hover,
.renew-duration-btn:hover {
  border-color: var(--accent) !important;
  color: var(--text-primary) !important;
  background: var(--bg-hover) !important;
}

.wiz-duration-btn.active,
.renew-duration-btn.active {
  background: var(--accent) !important;
  color: #ffffff !important;
  border-color: var(--accent) !important;
  font-weight: 750 !important;
  box-shadow: 0 2px 8px var(--accent-glow), 0 0 0 2px var(--accent-soft) !important;
  transform: translateY(-1px);
}

.policy-card-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.policy-radio-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.policy-radio-card:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.policy-radio-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.review-summary-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.review-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.review-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
  padding-top: 8px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent);
}

#wizSuccessKeyBox {
  background: #0F172A;
  color: #38BDF8;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.5;
  border: 1px solid #1E293B;
  word-break: break-all;
}

/* Floating Toasts */
.toast-container { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 1100; pointer-events: none; }
.toast { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 14px 18px; font-size: 0.88rem; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 12px; min-width: 280px; max-width: 420px; pointer-events: auto; animation: toastSlideIn 0.3s var(--ease-smooth); }
.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error { border-left: 4px solid var(--danger); }
.toast.toast-warning { border-left: 4px solid var(--warning); }
.toast.toast-info { border-left: 4px solid var(--accent); }
.toast-hiding { opacity: 0; transform: translateX(30px); transition: all 0.25s ease; }
@keyframes toastSlideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

/* ==========================================================================
   FLOATING BULK ACTIONS BAR (LINEAR / NOTION STYLE)
   ========================================================================== */

.bulk-actions-bar {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(8, 145, 178, 0.12);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.bulk-actions-bar.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.bulk-count-badge {
  font-size: 0.82rem;
  font-weight: 750;
  color: var(--text-primary);
  padding: 4px 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

/* ==========================================================================
   UNIQUE ENTERPRISE LICENSES TABLE ENHANCEMENTS
   ========================================================================== */

.overview-table-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  margin-bottom: 28px;
  transition: box-shadow var(--transition-normal);
}

.overview-table-card:hover {
  box-shadow: 0 8px 30px -4px rgba(0, 0, 0, 0.08), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
}

.overview-toolbar {
  padding: 16px 24px;
  background: linear-gradient(to right, var(--bg-surface), var(--bg-subtle));
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.overview-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.overview-filter-chip {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.overview-filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.overview-filter-chip.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(8, 145, 178, 0.35);
}

.overview-filter-chip .chip-count {
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.12);
}

.overview-filter-chip.active .chip-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.overview-table-wrapper {
  overflow-x: auto;
  max-height: 560px;
  scrollbar-width: thin;
}

.overview-table-wrapper::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.overview-table-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}

.overview-table-modern {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.overview-table-modern thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-surface);
  padding: 12px 18px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.overview-row-card {
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}

.overview-row-card:hover {
  background: linear-gradient(to right, rgba(8, 145, 178, 0.04), rgba(99, 102, 241, 0.02), transparent);
  transform: translateY(-1px);
}

.overview-row-card:hover td:first-child {
  border-left: 3px solid var(--accent);
}

.overview-row-card td {
  padding: 14px 18px;
  font-size: 0.84rem;
  vertical-align: middle;
}

.row-index-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 0.74rem;
  font-weight: 750;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.company-avatar-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.15), rgba(99, 102, 241, 0.2));
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.88rem;
  border: 1px solid rgba(8, 145, 178, 0.25);
  box-shadow: 0 2px 6px rgba(8, 145, 178, 0.1);
  flex-shrink: 0;
}

.seat-badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.12), rgba(6, 182, 212, 0.18));
  color: #0891b2;
  border: 1px solid rgba(8, 145, 178, 0.3);
  letter-spacing: -0.01em;
}

.product-pill-modern {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 750;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-primary);
  white-space: nowrap;
}

.product-pill-modern.prod-office {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.25);
  color: #4f46e5;
}

.product-pill-modern.prod-security {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: #059669;
}

.product-pill-modern.prod-os {
  background: rgba(8, 145, 178, 0.08);
  border-color: rgba(8, 145, 178, 0.25);
  color: #0891b2;
}

.key-box-modern {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0f172a;
  color: #38bdf8;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid #1e293b;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.key-box-modern .key-text {
  letter-spacing: 0.04em;
}

.key-box-modern .key-copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 4px;
  padding: 2px 4px;
  cursor: pointer;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.key-box-modern .key-copy-btn:hover {
  background: #0891b2;
  color: #ffffff;
}

.seat-util-card {
  min-width: 120px;
}

.seat-util-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.seat-util-bar {
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.seat-util-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.seat-util-fill.fill-green {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.seat-util-fill.fill-amber {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.seat-util-fill.fill-red {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.hw-tag {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
}

.status-pill-modern {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.status-pill-modern.active {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pill-modern.pending {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-pill-modern.revoked {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.pulse-dot-active {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.table-action-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.table-btn-action {
  padding: 5px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.table-btn-action:hover {
  background: var(--bg-subtle);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.table-btn-action.btn-primary-action {
  background: var(--accent-soft);
  border-color: rgba(8, 145, 178, 0.25);
  color: var(--accent);
}

.table-btn-action.btn-primary-action:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

/* ==========================================================================
   PRODUCT HUB CARDS & GENERATION BUTTONS
   ========================================================================== */

.product-hub-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.product-hub-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.product-hub-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  opacity: 0.8;
  transition: height 0.2s ease, opacity 0.2s ease;
}

.product-hub-card.hub-office::before {
  background: linear-gradient(90deg, #0891b2, #06b6d4);
}

.product-hub-card.hub-security::before {
  background: linear-gradient(90deg, #10b981, #059669);
}

.product-hub-card.hub-os::before {
  background: linear-gradient(90deg, #6366f1, #3b82f6);
}

.product-hub-card.hub-pdf::before {
  background: linear-gradient(90deg, #E11D48, #FB7185);
}

.product-hub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.product-hub-card:hover::before {
  height: 5px;
  opacity: 1;
}

.product-hub-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow), var(--shadow-md);
  background: var(--bg-surface);
}

.product-hub-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.product-hub-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.product-hub-icon-wrap.office {
  background: rgba(8, 145, 178, 0.1);
  border: 1px solid rgba(8, 145, 178, 0.2);
}

.product-hub-icon-wrap.security {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.product-hub-icon-wrap.os {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.product-hub-icon-wrap.pdf {
  background: rgba(225, 29, 72, 0.1);
  border: 1px solid rgba(225, 29, 72, 0.2);
}

.product-hub-emoji {
  font-size: 1.5rem;
  line-height: 1;
}

.product-hub-meta {
  flex: 1;
  min-width: 0;
}

.product-hub-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.product-hub-name {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
}

.product-hub-badge {
  font-size: 0.65rem;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.product-hub-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-hub-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 16px;
  border: 1px solid var(--border-light);
}

.product-hub-stat {
  display: flex;
  flex-direction: column;
}

.product-hub-stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.product-hub-stat-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-top: 2px;
}

.product-hub-footer {
  margin-top: auto;
}

.product-hub-generate-btn {
  width: 100%;
  justify-content: center;
  font-weight: 750;
  font-size: 0.82rem;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.product-hub-generate-btn.office-btn {
  background: linear-gradient(135deg, #0891b2, #0284c7);
}

.product-hub-generate-btn.office-btn:hover {
  background: linear-gradient(135deg, #0e7490, #0369a1);
}

.product-hub-generate-btn.security-btn {
  background: linear-gradient(135deg, #059669, #10b981);
}

.product-hub-generate-btn.security-btn:hover {
  background: linear-gradient(135deg, #047857, #059669);
}

.product-hub-generate-btn.os-btn {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
}

.product-hub-generate-btn.os-btn:hover {
  background: linear-gradient(135deg, #4338ca, #4f46e5);
}

.product-hub-generate-btn.pdf-btn {
  background: linear-gradient(135deg, #E11D48, #F43F5E);
}

.product-hub-generate-btn.pdf-btn:hover {
  background: linear-gradient(135deg, #BE123C, #E11D48);
}

/* ==========================================================================
   MEDIA QUERIES (RESPONSIVE BEHAVIOR)
   ========================================================================== */

@media (max-width: 1200px) {
  .product-hub-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-grid { grid-template-columns: 1fr 1fr 1fr; }
  .dashboard-bottom-grid { grid-template-columns: 1fr; }
  .products-split-grid { grid-template-columns: 1fr; }
  .storage-overview-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-layout { grid-template-columns: 1fr; }
  .inbox-layout { grid-template-columns: 1fr; }
  .inbox-detail-pane { display: none; }
  .inbox-detail-pane.mobile-visible { display: flex; }
}

@media (max-width: 900px) {
  .analytics-grid { grid-template-columns: 1fr; }
  .product-hub-grid { grid-template-columns: 1fr; }

  /*
   * MOBILE: sidebar switches back to position:fixed for overlay behavior.
   * Since it's now out of the flex flow, admin-main fills 100% automatically.
   * No margin-left or width reset needed on admin-main.
   */
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    flex: 0 0 0;       /* takes zero space in flex flow when hidden */
    min-width: 0;
  }
  .admin-sidebar.sidebar-open {
    transform: translateX(0);
    flex: 0 0 var(--sidebar-w);
    min-width: var(--sidebar-w);
  }

  .mobile-menu-btn { display: block; }
  .admin-topbar { padding: 0 20px; }
  .dashboard-container, .admin-content-inner { padding: 24px 20px 48px; }
  .topbar-search { width: 220px; }
}

@media (max-width: 640px) {
  .product-hub-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .filter-grid { grid-template-columns: 1fr; }
  .storage-overview-grid { grid-template-columns: 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
  .product-select-grid { grid-template-columns: 1fr; }
  .topbar-search { display: none; }
}


