/* ===================================================================
   Enterprise IT Helpdesk Portal - Premium Executive Design System
   Brand Color Palette:
   - Primary: Midnight Navy (#110E2B), Strategic Gold (#EAAA21)
   - Secondary: Global Signal Blue (#1C5D99), Arctic Teal (#00B2D9),
                Steel Slate (#3B4358), Arctic Gray (#DDE2EC), Arctic White (#F8F9FC)
   - Neutral: Carbon (#111418)
   Typography: Plus Jakarta Sans + Inter + JetBrains Mono
   =================================================================== */

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

/* ── Enterprise Design Tokens ──────────────────────────────────────── */
:root {
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Brand Palette - Deep Midnight Navy */
  --midnight-navy:       #110E2B;
  --midnight-dark:       #0A081A;
  --midnight-surface:    #151136;
  --midnight-card:       #1B1544;
  --midnight-border:     rgba(221, 226, 236, 0.14);
  --midnight-border-sub: rgba(221, 226, 236, 0.08);

  /* Brand Palette - Strategic Gold */
  --strategic-gold:      #EAAA21;
  --gold-hover:          #D89613;
  --gold-dark:           #B37D0B;
  --gold-surface:        #FFFDF7;
  --gold-light:          rgba(234, 170, 33, 0.10);
  --gold-border:         #EAAA21;
  --gold-glow:           rgba(234, 170, 33, 0.22);
  --gold-glow-subtle:    rgba(234, 170, 33, 0.08);

  /* Brand Palette - Global Signal Blue */
  --signal-blue:         #1C5D99;
  --signal-blue-hover:   #154B7C;
  --signal-blue-surface: #F4F8FC;
  --signal-blue-light:   rgba(28, 93, 153, 0.09);
  --signal-blue-border:  #B8D6F2;
  --signal-blue-glow:    rgba(28, 93, 153, 0.18);

  /* Brand Palette - Arctic Teal */
  --arctic-teal:         #00B2D9;
  --arctic-teal-hover:   #009BBF;
  --arctic-teal-surface: #F0FBFE;
  --arctic-teal-light:   rgba(0, 178, 217, 0.10);
  --arctic-teal-border:  #99E4F4;
  --arctic-teal-glow:    rgba(0, 178, 217, 0.18);

  /* Neutrals & Steel - Strictly OSC Palette */
  --steel-slate:         #3B4358;
  --steel-slate-light:   #ECEEF3;
  --steel-slate-border:  #DDE2EC;
  --arctic-gray:         #DDE2EC;
  --arctic-white:        #F8F9FC;
  --carbon:              #111418;

  /* Surfaces & Canvas */
  --bg-canvas:           #F8F9FC;
  --bg-surface:          #FFFFFF;
  --bg-surface-elevated: #FFFFFF;
  --bg-muted:            #F8F9FC;
  --bg-hover:            #F1F5F9;

  /* High-Contrast Corporate Typography */
  --text-primary:        #110E2B;
  --text-secondary:      #3B4358;
  --text-muted:          #545D69;
  --text-dim:            #7E8794;

  /* Enterprise Borders */
  --border-subtle:       #DDE2EC;
  --border-mid:          #CBD5E1;
  --border-strong:       #3B4358;

  /* Radius - Professional, not bubbly */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 14px;
  --radius-pill: 9999px;

  /* Rich Enterprise Elevation Shadows */
  --shadow-xs: 0 1px 2px rgba(17, 14, 43, 0.04);
  --shadow-sm: 0 2px 4px rgba(17, 14, 43, 0.06);
  --shadow-md: 0 4px 14px rgba(17, 14, 43, 0.08);
  --shadow-lg: 0 10px 28px rgba(17, 14, 43, 0.10);
  --shadow-xl: 0 20px 45px rgba(17, 14, 43, 0.14);

  /* Dimensions */
  --sidebar-w:           256px;
  --sidebar-collapsed:   68px;
  --topbar-h:            64px;
}

/* ── Reset & Baseline ──────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(59, 67, 88, 0.25);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 67, 88, 0.45);
}

/* ── Rich Ambient Background Canvas ─────────────────────────────────── */
.app-bg {
  background-color: var(--arctic-white);
  background-image:
    radial-gradient(ellipse 65% 50% at 15% 0%, rgba(28, 93, 153, 0.06) 0%, transparent 65%),
    radial-gradient(ellipse 55% 40% at 85% 0%, rgba(234, 170, 33, 0.05) 0%, transparent 60%),
    linear-gradient(180deg, #F8F9FC 0%, #F1F4F9 100%);
}

/* ── Typography Utilities ──────────────────────────────────────────── */
.page-title {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 800;
  color: var(--midnight-navy);
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.section-label {
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94A3B8;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ── Surfaces & Card Containers ─────────────────────────────────────── */
.surface {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.surface-hover:hover {
  border-color: var(--border-mid);
  box-shadow: var(--shadow-md);
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover {
  border-color: var(--border-mid);
  box-shadow: var(--shadow-md);
  transform: translateY(-1.5px);
}

/* ── Bespoke Executive Sidebar ─────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: linear-gradient(180deg, #09071A 0%, #100C2A 50%, #140E36 100%);
  border-right: 1px solid var(--midnight-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  z-index: 30;
  position: relative;
}
.sidebar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 160px;
  background: radial-gradient(circle at 30% 0%, rgba(234, 170, 33, 0.16) 0%, transparent 70%);
  pointer-events: none;
}
.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

/* Navigation Items */
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 13px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: #CBD5E1;
  text-decoration: none;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  position: relative;
  border-left: 3px solid transparent;
}
.nav-item:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}
.nav-item.active {
  color: #FFFFFF;
  background: linear-gradient(90deg, rgba(234, 170, 33, 0.16) 0%, rgba(28, 93, 153, 0.08) 100%);
  border-left-color: var(--strategic-gold);
  font-weight: 700;
  box-shadow: inset 0 0 16px rgba(234, 170, 33, 0.06);
}
.nav-item.active svg {
  stroke: var(--strategic-gold);
  filter: drop-shadow(0 0 4px rgba(234, 170, 33, 0.4));
}
.nav-item svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.nav-item:hover svg {
  transform: scale(1.08);
}

/* Nav Badge Counter */
.nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.12);
  color: #E2E8F0;
  letter-spacing: 0.02em;
}
.nav-badge.gold {
  background: var(--strategic-gold);
  color: #110E2B;
}

/* ── Frosted Topbar (Command Center) ────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  flex-shrink: 0;
  z-index: 20;
}

/* ── Buttons & CTAs ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font-sans);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}
.btn:active {
  transform: scale(0.97);
}
.btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Strategic Gold Primary CTA */
.btn-primary {
  background: var(--strategic-gold);
  color: #110E2B;
  font-weight: 700;
  border: 1px solid rgba(234, 170, 33, 0.6);
  box-shadow: var(--shadow-xs);
}
.btn-primary:hover {
  background: var(--gold-hover);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

/* Clean Secondary Button */
.btn-secondary {
  background: #FFFFFF;
  color: var(--midnight-navy);
  border: 1px solid var(--border-mid);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--steel-slate);
  color: var(--midnight-navy);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

/* Global Signal Blue Action Button */
.btn-blue {
  background: var(--signal-blue);
  color: #FFFFFF;
  font-weight: 600;
  border: 1px solid var(--signal-blue-hover);
  box-shadow: var(--shadow-xs);
}
.btn-blue:hover {
  background: var(--signal-blue-hover);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

/* Danger / Delete Action Button */
.btn-danger {
  background: var(--midnight-navy);
  color: #FFFFFF;
  border: 1px solid var(--midnight-navy);
  box-shadow: var(--shadow-xs);
}
.btn-danger:hover {
  background: var(--midnight-dark);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 6px 10px;
}
.btn-ghost:hover {
  background: rgba(17, 14, 43, 0.05);
  color: var(--midnight-navy);
}

/* ── Badges & Status Indicators ─────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.35;
}

.status-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.badge-gold   { background: var(--gold-light); color: var(--gold-dark); border: 1px solid var(--strategic-gold); }
.badge-gold .status-dot { background: var(--strategic-gold); }

.badge-blue   { background: var(--signal-blue-light); color: var(--signal-blue); border: 1px solid var(--signal-blue-border); }
.badge-blue .status-dot { background: var(--signal-blue); }

.badge-teal   { background: var(--arctic-teal-light); color: #007C9A; border: 1px solid var(--arctic-teal-border); }
.badge-teal .status-dot { background: var(--arctic-teal); }

.badge-navy   { background: rgba(17, 14, 43, 0.08); color: var(--midnight-navy); border: 1px solid var(--midnight-navy); }
.badge-navy .status-dot { background: var(--midnight-navy); }

.badge-slate  { background: var(--steel-slate-light); color: var(--steel-slate); border: 1px solid var(--arctic-gray); }
.badge-slate .status-dot { background: var(--steel-slate); }

.badge-gray   { background: var(--bg-hover); color: var(--steel-slate); border: 1px solid var(--arctic-gray); }
.badge-gray .status-dot { background: var(--steel-slate); }

/* Compatibility aliases for templates */
.badge-green  { background: var(--arctic-teal-light); color: #007C9A; border: 1px solid var(--arctic-teal-border); }
.badge-green .status-dot { background: var(--arctic-teal); }

.badge-red    { background: rgba(17, 14, 43, 0.08); color: var(--midnight-navy); border: 1px solid var(--midnight-navy); }
.badge-red .status-dot { background: var(--midnight-navy); }

.badge-purple { background: var(--signal-blue-light); color: var(--signal-blue); border: 1px solid var(--signal-blue-border); }
.badge-purple .status-dot { background: var(--signal-blue); }

/* ── Linear-Style Priority Bar Indicators ───────────────────────────── */
.priority-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
}
.priority-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 11px;
}
.priority-bars span {
  width: 2.5px;
  background: currentColor;
  border-radius: 1px;
}
.priority-critical { color: var(--midnight-navy); background: rgba(17, 14, 43, 0.08); border: 1px solid var(--midnight-navy); }
.priority-high     { color: var(--gold-dark); background: var(--gold-light); border: 1px solid var(--strategic-gold); }
.priority-med      { color: var(--signal-blue); background: var(--signal-blue-light); border: 1px solid var(--signal-blue-border); }
.priority-low      { color: var(--steel-slate); background: var(--arctic-white); border: 1px solid var(--arctic-gray); }

/* ── Queue Metric Header Pills (Interactive Quick Tabs) ─────────────── */
.metric-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}
.metric-pill:hover {
  border-color: var(--border-mid);
  transform: translateY(-1.5px);
  box-shadow: var(--shadow-sm);
}
.metric-pill.active {
  background: var(--midnight-navy);
  color: #FFFFFF;
  border-color: var(--midnight-navy);
  box-shadow: 0 2px 8px rgba(17, 14, 43, 0.2);
}
.metric-pill.active .pill-count {
  background: var(--strategic-gold);
  color: #110E2B;
}
.pill-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  padding: 1.5px 7px;
  border-radius: 9999px;
  background: #F1F5F9;
  color: var(--midnight-navy);
}

/* ── Filter Pills Toolbar ───────────────────────────────────────────── */
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
}
.filter-pill:hover {
  color: var(--midnight-navy);
  border-color: var(--border-mid);
  background: var(--bg-hover);
}
.filter-pill.active-gold {
  background: linear-gradient(180deg, #F5B932 0%, #EAAA21 100%);
  color: #110E2B;
  font-weight: 700;
  border-color: #D99815;
  box-shadow: 0 1px 4px var(--gold-glow);
}
.filter-pill.active-blue {
  background: var(--signal-blue);
  color: #FFFFFF;
  font-weight: 600;
  border-color: var(--signal-blue);
}
.filter-pill.active-teal {
  background: var(--arctic-teal);
  color: #FFFFFF;
  font-weight: 700;
  border-color: var(--arctic-teal);
}
.filter-pill.active-amber {
  background: #FFF9ED;
  color: #9A6506;
  font-weight: 700;
  border-color: #FDE68A;
}
.filter-pill.active-gray {
  background: var(--steel-slate);
  color: #FFFFFF;
  font-weight: 600;
  border-color: var(--steel-slate);
}

/* ── Form Controls & Inputs (Linear / Raycast Style) ────────────────── */
.input {
  width: 100%;
  padding: 9px 13px;
  background: #FFFFFF;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  color: var(--midnight-navy);
  font-size: 13px;
  font-family: var(--font-sans);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}
.input:focus {
  border-color: var(--signal-blue);
  box-shadow: 0 0 0 3px rgba(28, 93, 153, 0.14), inset 0 1px 2px rgba(15, 23, 42, 0.03);
  background: #FFFFFF;
}
.input::placeholder {
  color: #94A3B8;
}
select.input {
  cursor: pointer;
  background-color: #FFFFFF;
}
textarea.input {
  resize: vertical;
  line-height: 1.6;
}

/* ── Data Tables (Card-Table Hybrid & Responsive Container) ─────────── */
.table-scroll-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: inherit;
}

.data-table {
  width: 100%;
  min-width: 1060px; /* Critical: guarantees columns and tags never crush or wrap */
  border-collapse: collapse;
  font-size: 13px;
  background: transparent;
}
.data-table thead tr {
  background: var(--card-inner-box);
  border-bottom: 1.5px solid var(--border-subtle);
}
.data-table th {
  padding: 13px 18px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}
.data-table tbody tr {
  transition: background 0.12s ease;
}
.data-table tbody tr:hover {
  background: var(--bg-hover);
}
.data-table tbody tr.clickable {
  cursor: pointer;
}

.table-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--border-subtle);
  background: var(--card-inner-box);
  border-radius: 0 0 inherit inherit;
}

/* Column Specific Constraints */
.data-table th.col-ticket, .data-table td.col-ticket {
  width: 140px;
  min-width: 140px;
  white-space: nowrap;
}
.data-table th.col-subject, .data-table td.col-subject {
  min-width: 250px;
}
.data-table th.col-requester, .data-table td.col-requester {
  width: 200px;
  min-width: 200px;
  white-space: nowrap;
}
.data-table th.col-status, .data-table td.col-status {
  width: 130px;
  min-width: 130px;
  white-space: nowrap;
}
.data-table th.col-priority, .data-table td.col-priority {
  width: 120px;
  min-width: 120px;
  white-space: nowrap;
}
.data-table th.col-tech, .data-table td.col-tech {
  width: 160px;
  min-width: 160px;
  white-space: nowrap;
}
.data-table th.col-date, .data-table td.col-date {
  width: 120px;
  min-width: 120px;
  white-space: nowrap;
}
.data-table th.col-actions, .data-table td.col-actions {
  width: 90px;
  min-width: 90px;
  text-align: right;
  white-space: nowrap;
}

/* Row Action Buttons */
.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}
.data-table tbody tr:hover .row-actions {
  opacity: 1;
}

/* ── Ticket Monospace Tag ───────────────────────────────────────────── */
.ticket-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: var(--capsule-bg);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  letter-spacing: -0.01em;
}

/* ── Avatar Chips ───────────────────────────────────────────────────── */
.avatar-chip {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  flex-shrink: 0;
  border: 1px solid transparent;
}
.avatar-chip.navy {
  background: var(--midnight-navy);
  color: var(--strategic-gold);
}
.avatar-chip.blue {
  background: var(--signal-blue-light);
  color: var(--signal-blue);
  border-color: var(--signal-blue-border);
}
.avatar-chip.gold {
  background: var(--gold-light);
  color: var(--gold-dark);
  border-color: var(--strategic-gold);
}

/* ── KPI Stat Cards (Rich Executive Finish) ────────────────────────── */
.stat-card {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFD 100%);
  border: 1px solid var(--arctic-gray);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(17, 14, 43, 0.04), 0 1px 2px rgba(17, 14, 43, 0.02);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  border-color: var(--signal-blue);
  box-shadow: 0 8px 24px rgba(17, 14, 43, 0.08), 0 2px 6px rgba(17, 14, 43, 0.04);
  transform: translateY(-2px);
}
.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stat-card-label {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.stat-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  border: 1px solid transparent;
}
.stat-card:hover .stat-card-icon {
  transform: scale(1.06);
}
.stat-card-icon svg {
  width: 20px;
  height: 20px;
}
.stat-card-value {
  font-family: var(--font-sans);
  font-size: 32px;
  font-weight: 800;
  color: var(--midnight-navy);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.stat-card-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
  font-weight: 500;
}

/* ── Timeline & Conversation Messages ───────────────────────────────── */
.msg-bubble {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}
.msg-bubble:hover {
  box-shadow: var(--shadow-sm);
}

/* Outbound Staff Message */
.msg-bubble.outbound {
  background: linear-gradient(180deg, #FFFFFF 0%, #F5F9FD 100%);
  border-color: var(--signal-blue-border);
  border-left: 4px solid var(--signal-blue);
}

/* Internal Private Note */
.msg-bubble.internal-note {
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFDF5 100%);
  border-color: var(--gold-border);
  border-left: 4px solid var(--strategic-gold);
}

/* Merged Ticket Event Message */
.msg-bubble.merged-event {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border-color: #CBD5E1;
  border-left: 4px solid #64748B;
}

/* ── Email Body Contrast & Styling ──────────────────────────────────── */
.email-body {
  font-size: 13.5px;
  color: var(--midnight-navy) !important;
  line-height: 1.65;
  word-break: break-word;
}
.email-body * {
  color: var(--midnight-navy);
  border-color: #E2E8F0;
}
.email-body p, .email-body div {
  color: var(--midnight-navy);
}
.email-body a {
  color: var(--signal-blue) !important;
  text-decoration: underline !important;
  font-weight: 500;
}
.email-body b, .email-body strong {
  color: var(--midnight-dark) !important;
  font-weight: 700;
}
.email-body blockquote {
  border-left: 3px solid var(--border-mid) !important;
  padding-left: 14px !important;
  margin: 10px 0 !important;
  color: var(--text-muted) !important;
}
.email-body code, .email-body pre {
  background-color: #F1F5F9 !important;
  color: var(--signal-blue) !important;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

/* ── Enterprise Modals & Dialogs ────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 28, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
  animation: fadeIn 0.15s ease-out;
}
.modal-box {
  background: var(--island-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--island-border);
  color: var(--text-main);
  border-radius: var(--radius-xl);
  padding: 26px 30px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: modalPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ── Flash Banners & Alerts ─────────────────────────────────────────── */
.alert-banner {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  animation: fadeIn 0.2s ease-out;
}
.alert-success {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #15803D;
}
.alert-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
}
.alert-warning {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #B45309;
}
.alert-info {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1D4ED8;
}

/* ── Merged Tickets Visual Card ─────────────────────────────────────── */
.merged-card {
  background: #F8FAFD;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.merged-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s ease;
}
.merged-item:hover {
  border-color: var(--signal-blue);
  box-shadow: var(--shadow-xs);
  transform: translateX(2px);
}

/* ── Live Autocomplete Box for Ticket Merging ───────────────────────── */
.autocomplete-box {
  position: relative;
}
.autocomplete-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--island-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 220px;
  overflow-y: auto;
  z-index: 60;
}
.autocomplete-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background 0.12s ease;
}
.autocomplete-item:last-child {
  border-bottom: none;
}
.autocomplete-item:hover {
  background: var(--bg-hover);
}

/* ── Utility Dividers ───────────────────────────────────────────────── */
.divider {
  border: none;
  height: 1px;
  background: var(--border-subtle);
  margin: 14px 0;
}

/* ── Ticket Monospace Tag Pill ───────────────────────────────────────── */
.ticket-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--signal-blue);
  background: var(--signal-blue-surface);
  border: 1px solid var(--signal-blue-border);
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 0.02em;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap !important;
  flex-shrink: 0;
  line-height: 1.2;
}
.ticket-tag:hover {
  background: var(--signal-blue-light);
  border-color: var(--signal-blue);
  box-shadow: 0 1px 3px var(--signal-blue-glow);
}

/* ── Initials Avatar Chip ───────────────────────────────────────────── */
.avatar-chip {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  text-transform: uppercase;
}
.avatar-chip.navy {
  background: var(--midnight-navy);
  color: var(--strategic-gold);
  border: 1px solid rgba(234, 170, 33, 0.3);
}
.avatar-chip.teal {
  background: var(--arctic-teal-light);
  color: var(--arctic-teal-hover);
  border: 1px solid var(--arctic-teal-border);
}
.avatar-chip.blue {
  background: var(--signal-blue-light);
  color: var(--signal-blue);
  border: 1px solid var(--signal-blue-border);
}

/* ── SLA Telemetry Meter ────────────────────────────────────────────── */
.sla-meter {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sla-meter-bar {
  height: 6px;
  background: #E2E8F0;
  border-radius: 999px;
  overflow: hidden;
}
.sla-meter-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* ── Timeline Activity Connector ────────────────────────────────────── */
.timeline-item {
  position: relative;
  padding-left: 28px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 32px;
  bottom: -16px;
  width: 2px;
  background: var(--border-subtle);
}

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

/* ── Responsive 4-Column Report Summary Grid ────────────────────────── */
.report-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 1024px) {
  .report-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .report-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ── Ticket Detail 2-Column Responsive Layout ──────────────────────── */
.ticket-detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}
@media (max-width: 1080px) {
  .ticket-detail-grid {
    grid-template-columns: 1fr 300px;
    gap: 16px;
  }
}
@media (max-width: 860px) {
  .ticket-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Metric Strip Grid ─────────────────────────────────────────────── */
.metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

/* ── Topbar Search Form Responsive ─────────────────────────────────── */
@media (max-width: 640px) {
  .topbar .search-form,
  .topbar form {
    max-width: 200px !important;
  }
  .topbar kbd {
    display: none !important;
  }
}

/* ── Utility Animations ──────────────────────────────────────────────── */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.animate-spin {
  animation: spin 0.85s linear infinite;
}

/* ===================================================================
   FLOATING GLASSMORPHISM ISLAND DESIGN SYSTEM (Pane / Linear Style)
   Color Palette: OSC Global (Midnight Navy #110E2B, Strategic Gold #EAAA21,
   Signal Blue #1C5D99, Arctic Teal #00B2D9, Steel Slate #3B4358)
   =================================================================== */

/* 1. Base Variables for Dark Theme (Default) */
:root, html[data-theme="dark"] {
  --canvas-bg: #090B12;
  --canvas-ambient: radial-gradient(circle at 18% 12%, rgba(28, 93, 153, 0.35) 0%, transparent 48%),
                    radial-gradient(circle at 85% 82%, rgba(234, 170, 33, 0.18) 0%, transparent 42%),
                    radial-gradient(circle at 50% 50%, rgba(17, 14, 43, 0.88) 0%, #07090F 100%);
  --island-bg: rgba(18, 22, 36, 0.82);
  --island-border: rgba(255, 255, 255, 0.09);
  --card-glass-bg: rgba(22, 27, 44, 0.76);
  --card-glass-border: rgba(255, 255, 255, 0.09);
  --card-glass-hover: rgba(30, 37, 58, 0.88);
  --card-inner-box: rgba(15, 18, 30, 0.72);
  --bg-canvas: #090B12;
  --bg-surface: rgba(22, 27, 44, 0.82);
  --bg-surface-elevated: rgba(28, 34, 54, 0.88);
  --bg-hover: rgba(255, 255, 255, 0.05);
  --bg-muted: rgba(255, 255, 255, 0.04);
  --text-main: #FFFFFF;
  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --text-sub: #94A3B8;
  --capsule-bg: rgba(255, 255, 255, 0.06);
  --capsule-border: rgba(255, 255, 255, 0.10);
  --capsule-hover: rgba(255, 255, 255, 0.12);
  --pill-active: rgba(255, 255, 255, 0.18);
  --brand-blue: #1C5D99;
  --brand-gold: #EAAA21;
  --brand-teal: #00B2D9;
  --brand-blue-accent: #60A5FA;
  --glass-blur: blur(28px) saturate(190%);
  --shadow-island: 0 24px 48px -12px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-mid: rgba(255, 255, 255, 0.15);
  --border-strong: rgba(255, 255, 255, 0.25);
  --steel-slate: #94A3B8;
  --signal-blue: #60A5FA;
}

/* Strategic Gold Palette (Dark) */
html[data-theme="dark"][data-palette="gold"] {
  --canvas-bg: #0C0A04;
  --canvas-ambient: radial-gradient(circle at 20% 15%, rgba(234, 170, 33, 0.32) 0%, transparent 48%),
                    radial-gradient(circle at 82% 85%, rgba(180, 125, 11, 0.22) 0%, transparent 42%),
                    radial-gradient(circle at 50% 50%, rgba(26, 20, 6, 0.90) 0%, #0A0803 100%);
  --card-glass-bg: rgba(26, 22, 14, 0.80);
  --island-bg: rgba(20, 16, 8, 0.88);
  --card-glass-border: rgba(234, 170, 33, 0.25);
  --card-inner-box: rgba(18, 14, 6, 0.78);
  --bg-surface: rgba(26, 22, 14, 0.80);
  --bg-surface-elevated: rgba(36, 30, 16, 0.88);
  --capsule-bg: rgba(234, 170, 33, 0.08);
  --capsule-border: rgba(234, 170, 33, 0.20);
  --capsule-hover: rgba(234, 170, 33, 0.16);
  --brand-blue-accent: #EAAA21;
}

/* Signal Blue Palette (Dark) */
html[data-theme="dark"][data-palette="blue"] {
  --canvas-bg: #050B16;
  --canvas-ambient: radial-gradient(circle at 22% 15%, rgba(37, 99, 235, 0.38) 0%, transparent 48%),
                    radial-gradient(circle at 80% 82%, rgba(28, 93, 153, 0.30) 0%, transparent 42%),
                    radial-gradient(circle at 50% 50%, rgba(10, 22, 45, 0.90) 0%, #040810 100%);
  --card-glass-bg: rgba(14, 25, 46, 0.80);
  --island-bg: rgba(10, 18, 36, 0.88);
  --card-glass-border: rgba(37, 99, 235, 0.28);
  --card-inner-box: rgba(8, 16, 32, 0.78);
  --bg-surface: rgba(14, 25, 46, 0.80);
  --bg-surface-elevated: rgba(18, 32, 60, 0.88);
  --capsule-bg: rgba(37, 99, 235, 0.09);
  --capsule-border: rgba(37, 99, 235, 0.22);
  --capsule-hover: rgba(37, 99, 235, 0.18);
  --brand-blue-accent: #60A5FA;
}

/* Arctic Teal Palette (Dark) */
html[data-theme="dark"][data-palette="teal"] {
  --canvas-bg: #040F14;
  --canvas-ambient: radial-gradient(circle at 22% 15%, rgba(0, 178, 217, 0.35) 0%, transparent 48%),
                    radial-gradient(circle at 82% 82%, rgba(0, 77, 94, 0.30) 0%, transparent 42%),
                    radial-gradient(circle at 50% 50%, rgba(6, 28, 36, 0.90) 0%, #030B0F 100%);
  --card-glass-bg: rgba(12, 28, 36, 0.80);
  --island-bg: rgba(8, 22, 28, 0.88);
  --card-glass-border: rgba(0, 178, 217, 0.28);
  --card-inner-box: rgba(6, 20, 26, 0.78);
  --bg-surface: rgba(12, 28, 36, 0.80);
  --bg-surface-elevated: rgba(16, 36, 46, 0.88);
  --capsule-bg: rgba(0, 178, 217, 0.09);
  --capsule-border: rgba(0, 178, 217, 0.22);
  --capsule-hover: rgba(0, 178, 217, 0.18);
  --brand-blue-accent: #2DD4BF;
}

/* 2. Base Variables for Light Theme */
html[data-theme="light"] {
  --canvas-bg: #F0F4F9;
  --canvas-ambient: radial-gradient(circle at 10% 10%, rgba(28, 93, 153, 0.09) 0%, transparent 45%),
                    radial-gradient(circle at 90% 90%, rgba(234, 170, 33, 0.07) 0%, transparent 42%),
                    linear-gradient(180deg, #F5F8FC 0%, #EBF1F7 100%);
  --island-bg: rgba(255, 255, 255, 0.88);
  --island-border: rgba(0, 0, 0, 0.08);
  --card-glass-bg: rgba(255, 255, 255, 0.92);
  --card-glass-border: rgba(215, 225, 238, 0.85);
  --card-glass-hover: #FFFFFF;
  --card-inner-box: #F8FAFC;
  --bg-canvas: #F0F4F9;
  --bg-surface: rgba(255, 255, 255, 0.92);
  --bg-surface-elevated: #FFFFFF;
  --bg-hover: #F1F5F9;
  --bg-muted: #F8FAFC;
  --text-main: #0F172A;
  --text-primary: #110E2B;
  --text-secondary: #3B4358;
  --text-muted: #545D69;
  --text-dim: #64748B;
  --text-sub: #64748B;
  --capsule-bg: rgba(0, 0, 0, 0.04);
  --capsule-border: rgba(0, 0, 0, 0.08);
  --capsule-hover: rgba(0, 0, 0, 0.08);
  --pill-active: #FFFFFF;
  --brand-blue: #1C5D99;
  --brand-gold: #EAAA21;
  --brand-teal: #00B2D9;
  --brand-blue-accent: #2563EB;
  --glass-blur: blur(28px) saturate(190%);
  --shadow-island: 0 20px 40px -15px rgba(17, 14, 43, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --shadow-card: 0 4px 18px rgba(17, 14, 43, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --border-subtle: #E2E8F0;
  --border-mid: #CBD5E1;
  --border-strong: #94A3B8;
  --steel-slate: #3B4358;
  --signal-blue: #1C5D99;
}

html[data-theme="light"][data-palette="gold"] {
  --canvas-bg: #FBF8F0;
  --canvas-ambient: radial-gradient(circle at 10% 10%, rgba(234, 170, 33, 0.14) 0%, transparent 42%),
                    radial-gradient(circle at 90% 90%, rgba(245, 185, 50, 0.09) 0%, transparent 40%),
                    linear-gradient(180deg, #FAF7EE 0%, #F3EEDF 100%);
  --card-glass-bg: rgba(255, 255, 255, 0.94);
  --island-bg: rgba(255, 255, 255, 0.92);
  --card-glass-border: rgba(234, 170, 33, 0.30);
  --bg-surface: rgba(255, 255, 255, 0.94);
}
html[data-theme="light"][data-palette="blue"] {
  --canvas-bg: #EFF6FF;
  --canvas-ambient: radial-gradient(circle at 10% 10%, rgba(37, 99, 235, 0.14) 0%, transparent 42%),
                    radial-gradient(circle at 90% 90%, rgba(28, 93, 153, 0.10) 0%, transparent 40%),
                    linear-gradient(180deg, #F0F7FF 0%, #E3EFFF 100%);
  --card-glass-bg: rgba(255, 255, 255, 0.94);
  --island-bg: rgba(255, 255, 255, 0.92);
  --card-glass-border: rgba(186, 215, 250, 0.90);
  --bg-surface: rgba(255, 255, 255, 0.94);
}
html[data-theme="light"][data-palette="teal"] {
  --canvas-bg: #ECFDFD;
  --canvas-ambient: radial-gradient(circle at 10% 10%, rgba(0, 178, 217, 0.14) 0%, transparent 42%),
                    radial-gradient(circle at 90% 90%, rgba(0, 140, 170, 0.10) 0%, transparent 40%),
                    linear-gradient(180deg, #F0FDFD 0%, #E0F7F7 100%);
  --card-glass-bg: rgba(255, 255, 255, 0.94);
  --island-bg: rgba(255, 255, 255, 0.92);
  --card-glass-border: rgba(165, 235, 245, 0.90);
  --bg-surface: rgba(255, 255, 255, 0.94);
}

/* Outer Canvas Layout */
body.island-layout {
  display: flex !important;
  height: 100vh !important;
  width: 100vw !important;
  padding: 14px 16px !important;
  gap: 14px !important;
  background: var(--canvas-ambient, var(--canvas-bg)) !important;
  background-color: var(--canvas-bg) !important;
  background-attachment: fixed !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  font-family: var(--font-sans) !important;
  color: var(--text-main) !important;
  transition: background 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

/* Floating Sidebar Island */
.floating-sidebar {
  width: 228px;
  height: calc(100vh - 28px);
  border-radius: 24px;
  background: var(--island-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--island-border);
  box-shadow: var(--shadow-island);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 16px 12px;
  box-sizing: border-box;
  position: relative;
  z-index: 40;
  transition: all 0.22s ease;
}

.sidebar-brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 14px 6px;
  text-decoration: none;
}
.sidebar-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1C5D99 0%, #2563EB 50%, #00B2D9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(28, 93, 153, 0.35);
  flex-shrink: 0;
}
.sidebar-brand-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

/* Nav Pills */
.island-nav-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 6px;
}
.island-nav-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  background: transparent;
  border: none;
  font-family: inherit;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.island-nav-pill:hover {
  color: var(--text-main);
  background: var(--capsule-hover);
}
.island-nav-pill.active {
  color: var(--text-main);
  font-weight: 600;
  background: var(--pill-active);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.island-nav-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 9999px;
  background: var(--capsule-bg);
  border: 1px solid var(--capsule-border);
  color: var(--text-dim);
}

/* Pinned Section */
.island-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-sub);
  padding: 18px 12px 6px 12px;
}
.pinned-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Bottom User Island Chip */
.user-island-chip {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: var(--capsule-bg);
  border: 1px solid var(--capsule-border);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.user-island-chip:hover {
  background: var(--capsule-hover);
}
.user-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #EAAA21 0%, #1C5D99 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #FFFFFF;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.user-role-label {
  font-size: 10.5px;
  color: var(--text-sub);
  font-weight: 600;
}

/* Main Canvas Island */
.floating-canvas {
  flex: 1;
  height: calc(100vh - 28px);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  padding: 18px 26px 28px 26px !important;
}

/* Top Greeting Bar */
.greeting-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.greeting-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-main);
  line-height: 1.15;
}
.greeting-subtitle {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
  margin-top: 4px;
}

/* Top Stat Capsules */
.stat-capsules-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.stat-capsule {
  display: flex;
  flex-direction: column;
  background: var(--capsule-bg);
  border: 1px solid var(--capsule-border);
  border-radius: 12px;
  padding: 6px 12px;
  min-width: 82px;
}
.stat-capsule-lbl {
  font-size: 10.5px;
  color: var(--text-sub);
  font-weight: 600;
}
.stat-capsule-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

/* Top Right Action Controls */
.top-action-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-pill-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--capsule-bg);
  border: 1px solid var(--capsule-border);
  border-radius: 12px;
  padding: 6px 12px;
  height: 36px;
  box-sizing: border-box;
  color: var(--text-dim);
}
.search-pill-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 13px;
  width: 140px;
}
.search-pill-box kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1px 5px;
  border-radius: 5px;
  color: var(--text-sub);
}
.action-icon-pill {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--capsule-bg);
  border: 1px solid var(--capsule-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.action-icon-pill:hover {
  background: var(--capsule-hover);
  color: var(--text-main);
}
.action-pill-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.action-pill-secondary {
  background: var(--capsule-bg);
  border: 1px solid var(--capsule-border);
  color: var(--text-main);
}
.action-pill-secondary:hover {
  background: var(--capsule-hover);
}
.action-pill-primary {
  background: linear-gradient(135deg, #1C5D99 0%, #2563EB 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.action-pill-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}
.bento-row-bottom {
  grid-column: span 3;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  margin-top: 2px;
}

/* Glass Bento Card Container */
.glass-bento-card {
  border-radius: 24px;
  background: var(--card-glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--card-glass-border);
  box-shadow: var(--shadow-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-bento-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 30px -6px rgba(0, 0, 0, 0.4);
}

.bento-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.bento-card-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-main);
}
.bento-card-subtitle {
  font-size: 11.5px;
  color: var(--text-sub);
  margin-top: 1px;
}
.bento-card-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-blue-accent);
  text-decoration: none;
}
.bento-card-link:hover {
  text-decoration: underline;
}

/* Activity Rings Card */
.activity-rings-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 4px;
}
.ring-legend-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}
.ring-legend-label {
  font-size: 11.5px;
  color: var(--text-dim);
  font-weight: 500;
}
.ring-legend-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.ring-legend-target {
  font-size: 11.5px;
  color: var(--text-sub);
  font-weight: 500;
}
.ring-accent-bar {
  width: 3px;
  height: 24px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Up Next Priority Card */
.upnext-hero-box {
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(28, 93, 153, 0.3) 0%, rgba(37, 99, 235, 0.22) 100%);
  border: 1px solid rgba(37, 99, 235, 0.35);
  padding: 14px 16px;
  margin-bottom: 12px;
  position: relative;
}
.upnext-tag-pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  color: #60A5FA;
  margin-bottom: 4px;
}
.upnext-hero-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #FFFFFF;
}
.upnext-hero-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
}
.upnext-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}
.upnext-avatars-group {
  display: flex;
  align-items: center;
}
.upnext-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #1E2235;
  margin-left: -6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #FFFFFF;
}
.upnext-avatar:first-child {
  margin-left: 0;
}
.btn-join-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #2563EB;
  color: #FFFFFF;
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}
.upnext-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.upnext-row-item:last-child {
  border-bottom: none;
}
.upnext-item-title {
  font-size: 12.5px;
  color: var(--text-main);
  font-weight: 500;
}
.upnext-item-time {
  font-size: 11.5px;
  color: var(--text-sub);
}

/* Focus Timer Card */
.focus-duration-pills {
  display: flex;
  gap: 4px;
  background: var(--capsule-bg);
  border: 1px solid var(--capsule-border);
  padding: 2px;
  border-radius: 9999px;
}
.focus-duration-pill {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-sub);
  padding: 2px 8px;
  border-radius: 9999px;
  cursor: pointer;
  background: transparent;
  border: none;
  transition: all 0.15s ease;
}
.focus-duration-pill.active {
  background: var(--pill-active);
  color: var(--text-main);
}
.inflow-dial-container {
  position: relative;
  width: 128px;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px auto 16px auto;
}
.inflow-dial-svg {
  width: 128px;
  height: 128px;
  transform: rotate(-90deg);
  overflow: visible;
}
.inflow-dial-track {
  stroke: var(--capsule-border, rgba(148, 163, 184, 0.2));
  transition: stroke 0.2s ease;
}
html[data-theme="dark"] .inflow-dial-track {
  stroke: rgba(255, 255, 255, 0.08);
}
html[data-theme="light"] .inflow-dial-track {
  stroke: rgba(15, 23, 42, 0.08);
}
.inflow-dial-arc {
  transition: stroke-dashoffset 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
html[data-theme="dark"] .inflow-dial-arc {
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.45));
}
html[data-theme="light"] .inflow-dial-arc {
  filter: drop-shadow(0 2px 4px rgba(16, 185, 129, 0.25));
}
.inflow-dial-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
  text-align: center;
}
.inflow-dial-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1;
}
.inflow-dial-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-sub);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-top: 4px;
}
.task-done {
  text-decoration: line-through !important;
  opacity: 0.55 !important;
}

.focus-dial-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
  position: relative;
}
.focus-dial-number {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1;
}
.focus-dial-status {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-sub);
  margin-top: 3px;
}
.focus-selector-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-inner-box);
  border: 1px solid var(--capsule-border);
  border-radius: 12px;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--text-main);
  margin-bottom: 10px;
}
.focus-btn-start {
  width: 100%;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1C5D99 0%, #2563EB 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
  transition: all 0.15s ease;
}
.focus-btn-start:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.focus-footer-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-sub);
}

/* My Tasks Checklist Card */
.mytasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mytasks-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--card-inner-box);
  border: 1px solid var(--capsule-border);
  transition: all 0.15s ease;
}
.mytasks-item:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: var(--card-glass-hover);
}
.mytasks-checkbox-btn {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.8px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  padding: 0;
}
.mytasks-checkbox-btn:hover {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.12);
}
.mytasks-checkbox-btn.checked {
  background: #10B981;
  border-color: #10B981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}
.mytasks-text {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  transition: color 0.15s ease;
}
.mytasks-text:hover {
  color: #60A5FA;
}
.mytasks-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  white-space: nowrap;
}
.mytasks-pill-p1 {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.mytasks-pill-p2 {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.mytasks-pill-p3 {
  background: rgba(37, 99, 235, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(37, 99, 235, 0.35);
}
.mytasks-pill-p4 {
  background: rgba(107, 114, 128, 0.15);
  color: #9CA3AF;
  border: 1px solid rgba(107, 114, 128, 0.35);
}
.mytasks-category {
  background: rgba(37, 99, 235, 0.12);
  color: #60A5FA;
  border: 1px solid rgba(37, 99, 235, 0.28);
}

/* My Tasks Empty State */
.mytasks-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
  background: var(--card-inner-box);
  border: 1px dashed var(--capsule-border);
  border-radius: 14px;
  margin-top: 4px;
}
.mytasks-empty-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  color: #10B981;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.mytasks-empty-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
}
.mytasks-empty-subtitle {
  font-size: 12px;
  color: var(--text-sub);
  max-width: 260px;
  line-height: 1.4;
  margin-bottom: 12px;
}
.mytasks-empty-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand-blue-accent);
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 9999px;
  background: var(--capsule-bg);
  border: 1px solid var(--capsule-border);
  transition: all 0.15s ease;
}
.mytasks-empty-action:hover {
  background: var(--capsule-hover);
  border-color: var(--brand-blue-accent);
}

/* This Week Throughput Card */
.thisweek-header-stat {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 12px;
}
.thisweek-delta {
  font-size: 11.5px;
  font-weight: 700;
  color: #10B981;
}
.weekly-barchart-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  align-items: flex-end;
  height: 90px;
  padding-top: 10px;
}
.bar-tube-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 6px;
}
.bar-tube-fill {
  width: 100%;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  transition: height 0.3s ease;
}
.bar-tube-fill.active {
  background: linear-gradient(180deg, #2563EB 0%, #1C5D99 100%);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}
.bar-day-lbl {
  font-size: 10px;
  color: var(--text-sub);
  font-weight: 600;
}

/* Settings View (Screenshot 2) */
.settings-grid {
  display: grid;
  grid-template-columns: 240px 1fr 1fr;
  gap: 14px;
  width: 100%;
}
.ios-toggle-switch {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}
.ios-toggle-switch.on {
  background: #2563EB;
}
.ios-toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.ios-toggle-switch.on::after {
  transform: translateX(20px);
}

/* Insights / Reports View (Screenshot 3 & Executive Dashboards) */
.reports-top-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
  flex-wrap: wrap;
}
.reports-timeframe-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.insights-kpis-flex {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  flex: 1;
  min-width: 320px;
}
@media (max-width: 1024px) {
  .insights-kpis-flex {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .insights-kpis-flex {
    grid-template-columns: 1fr;
  }
}
.insights-metric-card {
  border-radius: 16px;
  background: var(--card-glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--card-glass-border);
  box-shadow: var(--shadow-sm);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 72px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.insights-metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-mid);
  box-shadow: var(--shadow-md);
}
.insights-metric-label {
  font-size: 11px;
  color: var(--text-sub);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.insights-metric-val-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 3px;
}
.insights-metric-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.insights-metric-badge {
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 6px;
}
.insights-metric-badge.positive {
  color: #10B981;
  background: rgba(16, 185, 129, 0.12);
}
.insights-metric-badge.target {
  color: var(--strategic-gold);
  background: rgba(234, 170, 33, 0.12);
}
.insights-metric-badge.neutral {
  color: #3B82F6;
  background: rgba(59, 130, 246, 0.12);
}

.timeframe-pill-toggle {
  display: flex;
  align-items: center;
  background: var(--capsule-bg);
  border: 1px solid var(--capsule-border);
  border-radius: 9999px;
  padding: 3px;
}
.timeframe-pill-toggle a,
.timeframe-pill-toggle button {
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  padding: 4px 12px;
  border-radius: 9999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  line-height: 1.4;
  transition: all 0.15s ease;
}
.timeframe-pill-toggle a:hover,
.timeframe-pill-toggle button:hover {
  color: var(--text-main);
}
.timeframe-pill-toggle a.active,
.timeframe-pill-toggle button.active {
  background: var(--pill-active);
  color: var(--text-main);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* Reports Bento Grid Top & Bottom */
.reports-bento-grid-top {
  display: grid;
  grid-template-columns: 1.6fr 1.4fr;
  gap: 16px;
  margin-bottom: 16px;
}
.reports-bento-grid-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 1080px) {
  .reports-bento-grid-top {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .reports-bento-grid-bottom {
    grid-template-columns: 1fr;
  }
}

/* Throughput Chart Canvas & Elements */
.chart-canvas-wrap {
  width: 100%;
  position: relative;
  height: 180px;
  margin: 10px 0 6px 0;
}
.chart-svg-main {
  width: 100%;
  height: 100%;
  display: block;
}
.chart-gridline {
  stroke: var(--border-subtle);
  stroke-dasharray: 4 4;
  opacity: 0.8;
}
.chart-node-dot {
  cursor: pointer;
  transition: r 0.15s ease, fill 0.15s ease;
}
.chart-node-dot:hover {
  r: 5.5;
  fill: var(--strategic-gold);
}
.chart-x-axis-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-sub);
  padding: 0 4px;
}

/* Category Donut Card Layout */
.donut-card-body {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  padding: 6px 0;
}
@media (max-width: 600px) {
  .donut-card-body {
    flex-direction: column;
    align-items: center;
  }
}
.donut-graphic-box {
  position: relative;
  width: 136px;
  height: 136px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.donut-svg {
  width: 136px;
  height: 136px;
  transform: rotate(-90deg);
}
.donut-center-info {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
.donut-center-total {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  letter-spacing: -0.02em;
}
.donut-center-sub {
  font-size: 9.5px;
  color: var(--text-sub);
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 2px;
}
.donut-legend-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
  min-width: 0;
}
.donut-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  gap: 8px;
}
.donut-legend-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.donut-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.donut-legend-name {
  color: var(--text-main);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.donut-legend-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.donut-legend-count {
  font-weight: 800;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}
.donut-legend-pct {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-sub);
  background: var(--card-inner-box);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 1px 6px;
  min-width: 44px;
  text-align: center;
}

/* Reports Progress Track & Fills */
.report-progress-track {
  height: 6px;
  background: var(--card-inner-box);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  overflow: hidden;
  flex: 1;
  max-width: 140px;
}
.report-progress-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s ease;
}

@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-row-bottom {
    grid-template-columns: 1fr;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Dark Mode & Glass Aesthetic Comprehensive Overrides ─────────────────────── */
html[data-theme="dark"] .surface,
html[data-theme="dark"] .card,
html[data-theme="dark"] .table-card,
html[data-theme="dark"] .stat-card {
  background: var(--card-glass-bg) !important;
  border-color: var(--card-glass-border) !important;
  color: var(--text-main) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
}

html[data-theme="dark"] .page-title {
  color: var(--text-main) !important;
}

/* ── Metric Strip & Filter Tabs in Dark Theme ──────────────────────────── */
html[data-theme="dark"] .metric-pill {
  background: var(--card-glass-bg) !important;
  border-color: var(--card-glass-border) !important;
  color: var(--text-dim) !important;
}
html[data-theme="dark"] .metric-pill:hover {
  background: var(--card-glass-hover) !important;
  color: var(--text-main) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}
html[data-theme="dark"] .metric-pill.active {
  background: var(--pill-active) !important;
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .pill-count {
  background: rgba(255, 255, 255, 0.10) !important;
  color: var(--text-main) !important;
}
html[data-theme="dark"] .metric-pill.active .pill-count {
  background: var(--strategic-gold) !important;
  color: #110E2B !important;
}

/* ── Tickets Table in Dark Mode (High-Contrast Frosted Glass) ───────────── */
html[data-theme="dark"] .data-table {
  background: transparent !important;
}
html[data-theme="dark"] .data-table thead tr {
  background: rgba(15, 18, 30, 0.85) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
}
html[data-theme="dark"] .data-table th {
  background: transparent !important;
  color: var(--text-dim) !important;
  border-bottom-color: var(--border-subtle) !important;
}
html[data-theme="dark"] .data-table td {
  border-bottom-color: rgba(255, 255, 255, 0.06) !important;
  color: var(--text-main) !important;
}
html[data-theme="dark"] .data-table tr:hover td {
  background: rgba(255, 255, 255, 0.04) !important;
}

/* ── Ticket Monospace Tag in Dark Theme ────────────────────────────────── */
html[data-theme="dark"] .ticket-tag {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #F8FAFC !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}

/* ── Ticket Subject & Issue Summary ────────────────────────────────────── */
.ticket-subject-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
  transition: color 0.15s ease;
}
html[data-theme="dark"] .ticket-subject-title {
  color: #F8FAFC !important;
}
html[data-theme="dark"] .data-table tr:hover .ticket-subject-title {
  color: #60A5FA !important;
}

/* ── Unassigned Technician Badge ───────────────────────────────────────── */
.unassigned-chip {
  display: inline-flex;
  align-items: center;
  padding: 2.5px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--capsule-bg);
  border: 1px dashed var(--capsule-border);
  color: var(--text-dim);
}
html[data-theme="dark"] .unassigned-chip {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #94A3B8 !important;
}

/* ── Status Badges in Dark Mode (Luminous Frosted Indicators) ───────────── */
html[data-theme="dark"] .badge-gold {
  background: rgba(234, 170, 33, 0.16) !important;
  color: #FCD34D !important;
  border: 1px solid rgba(234, 170, 33, 0.40) !important;
}
html[data-theme="dark"] .badge-gold .status-dot {
  background: #FBBF24 !important;
}
html[data-theme="dark"] .badge-blue {
  background: rgba(37, 99, 235, 0.18) !important;
  color: #93C5FD !important;
  border: 1px solid rgba(59, 130, 246, 0.40) !important;
}
html[data-theme="dark"] .badge-blue .status-dot {
  background: #60A5FA !important;
}
html[data-theme="dark"] .badge-teal {
  background: rgba(0, 178, 217, 0.18) !important;
  color: #5EEAD4 !important;
  border: 1px solid rgba(0, 178, 217, 0.40) !important;
}
html[data-theme="dark"] .badge-teal .status-dot {
  background: #2DD4BF !important;
}
html[data-theme="dark"] .badge-navy {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #F1F5F9 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}
html[data-theme="dark"] .badge-navy .status-dot {
  background: #CBD5E1 !important;
}
html[data-theme="dark"] .badge-slate {
  background: rgba(148, 163, 184, 0.14) !important;
  color: #CBD5E1 !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
}
html[data-theme="dark"] .badge-slate .status-dot {
  background: #94A3B8 !important;
}
html[data-theme="dark"] .badge-gray {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #94A3B8 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
}
html[data-theme="dark"] .badge-gray .status-dot {
  background: #64748B !important;
}
html[data-theme="dark"] .badge-green {
  background: rgba(16, 185, 129, 0.16) !important;
  color: #6EE7B7 !important;
  border: 1px solid rgba(16, 185, 129, 0.40) !important;
}
html[data-theme="dark"] .badge-green .status-dot {
  background: #34D399 !important;
}
html[data-theme="dark"] .badge-red {
  background: rgba(239, 68, 68, 0.16) !important;
  color: #FCA5A5 !important;
  border: 1px solid rgba(239, 68, 68, 0.40) !important;
}
html[data-theme="dark"] .badge-red .status-dot {
  background: #F87171 !important;
}

/* ── Priority Indicators in Dark Theme ─────────────────────────────────── */
html[data-theme="dark"] .priority-critical {
  color: #FCA5A5 !important;
  background: rgba(239, 68, 68, 0.16) !important;
  border: 1px solid rgba(239, 68, 68, 0.40) !important;
}
html[data-theme="dark"] .priority-high {
  color: #FCD34D !important;
  background: rgba(234, 170, 33, 0.16) !important;
  border: 1px solid rgba(234, 170, 33, 0.40) !important;
}
html[data-theme="dark"] .priority-med {
  color: #93C5FD !important;
  background: rgba(37, 99, 235, 0.18) !important;
  border: 1px solid rgba(59, 130, 246, 0.40) !important;
}
html[data-theme="dark"] .priority-low {
  color: #94A3B8 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
}

/* ── Conversation Thread & Bubbles in Dark Theme ───────────────────────── */
html[data-theme="dark"] .msg-bubble {
  background: var(--card-glass-bg) !important;
  border: 1px solid var(--card-glass-border) !important;
  color: var(--text-main) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  box-shadow: var(--shadow-card) !important;
}
html[data-theme="dark"] .msg-bubble.outbound {
  background: rgba(28, 93, 153, 0.18) !important;
  border-color: rgba(59, 130, 246, 0.35) !important;
  border-left: 4px solid #3B82F6 !important;
}
html[data-theme="dark"] .msg-bubble.internal-note {
  background: rgba(234, 170, 33, 0.12) !important;
  border-color: rgba(234, 170, 33, 0.35) !important;
  border-left: 4px solid #EAAA21 !important;
}
html[data-theme="dark"] .msg-bubble.merged-event {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  border-left: 4px solid #94A3B8 !important;
}

/* ── Email Body Typography Contrast in Dark Mode (High-Contrast Fix) ────── */
html[data-theme="dark"] .email-body {
  color: #E2E8F0 !important;
}
html[data-theme="dark"] .email-body * {
  color: inherit !important;
  border-color: var(--border-subtle) !important;
}
html[data-theme="dark"] .email-body p,
html[data-theme="dark"] .email-body div,
html[data-theme="dark"] .email-body span,
html[data-theme="dark"] .email-body li,
html[data-theme="dark"] .email-body table,
html[data-theme="dark"] .email-body td {
  color: #E2E8F0 !important;
}
html[data-theme="dark"] .email-body a {
  color: #60A5FA !important;
  text-decoration: underline !important;
}
html[data-theme="dark"] .email-body b,
html[data-theme="dark"] .email-body strong,
html[data-theme="dark"] .email-body h1,
html[data-theme="dark"] .email-body h2,
html[data-theme="dark"] .email-body h3,
html[data-theme="dark"] .email-body h4 {
  color: #FFFFFF !important;
}
html[data-theme="dark"] .email-body blockquote {
  border-left: 3px solid rgba(255, 255, 255, 0.25) !important;
  color: #94A3B8 !important;
  background: rgba(255, 255, 255, 0.03) !important;
  padding: 8px 14px !important;
  border-radius: 0 8px 8px 0 !important;
}
html[data-theme="dark"] .email-body pre,
html[data-theme="dark"] .email-body code {
  background: rgba(0, 0, 0, 0.45) !important;
  color: #F8FAFC !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 6px !important;
  padding: 2px 6px !important;
}

/* ── Filter Pills (Reply / Note Tabs) ──────────────────────────────────── */
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--capsule-border);
  background: var(--capsule-bg);
  color: var(--text-dim);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.filter-pill:hover {
  color: var(--text-main);
  background: var(--capsule-hover);
}
.filter-pill.active-blue {
  background: rgba(37, 99, 235, 0.2) !important;
  border-color: rgba(59, 130, 246, 0.5) !important;
  color: #60A5FA !important;
}
.filter-pill.active-amber {
  background: rgba(234, 170, 33, 0.2) !important;
  border-color: rgba(234, 170, 33, 0.5) !important;
  color: #FCD34D !important;
}

/* ── Modals & Autocomplete Dialogs in Dark Theme ───────────────────────── */
html[data-theme="dark"] .modal-overlay {
  background: rgba(5, 7, 14, 0.78) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}
html[data-theme="dark"] .modal-box {
  background: var(--island-bg) !important;
  border-color: var(--island-border) !important;
  color: var(--text-main) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
}
html[data-theme="dark"] .autocomplete-results {
  background: #141828 !important;
  border-color: var(--border-mid) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6) !important;
}
html[data-theme="dark"] .autocomplete-item {
  border-bottom-color: var(--border-subtle) !important;
  color: var(--text-main) !important;
}
html[data-theme="dark"] .autocomplete-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

/* ── Flash Alerts in Dark Theme ────────────────────────────────────────── */
html[data-theme="dark"] .alert-warning {
  background: rgba(234, 170, 33, 0.14) !important;
  border-color: rgba(234, 170, 33, 0.35) !important;
  color: #FDE68A !important;
}
html[data-theme="dark"] .alert-info {
  background: rgba(37, 99, 235, 0.14) !important;
  border-color: rgba(59, 130, 246, 0.35) !important;
  color: #BFDBFE !important;
}
html[data-theme="dark"] .alert-success {
  background: rgba(16, 185, 129, 0.14) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
  color: #A7F3D0 !important;
}
html[data-theme="dark"] .alert-error {
  background: rgba(239, 68, 68, 0.14) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  color: #FECACA !important;
}

/* ── Form Controls & Select Options ────────────────────────────────────── */
html[data-theme="dark"] .input,
html[data-theme="dark"] select.input,
html[data-theme="dark"] textarea.input {
  background: var(--card-inner-box) !important;
  border-color: var(--capsule-border) !important;
  color: var(--text-main) !important;
}
html[data-theme="dark"] select.input option {
  background: #161B2C !important;
  color: #FFFFFF !important;
}
html[data-theme="light"] select.input option {
  background: #FFFFFF !important;
  color: #0F172A !important;
}
html[data-theme="dark"] .input::placeholder {
  color: var(--text-dim) !important;
}
html[data-theme="dark"] .input:focus {
  border-color: #3B82F6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

/* ── Action Buttons in Dark Theme ──────────────────────────────────────── */
html[data-theme="dark"] .btn-secondary {
  background: var(--capsule-bg) !important;
  border-color: var(--capsule-border) !important;
  color: var(--text-main) !important;
}
html[data-theme="dark"] .btn-secondary:hover {
  background: var(--capsule-hover) !important;
  border-color: var(--border-mid) !important;
}
html[data-theme="dark"] .btn-ghost {
  color: var(--text-dim) !important;
}
html[data-theme="dark"] .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #FFFFFF !important;
}

/* ── Merged Tickets Item ───────────────────────────────────────────────── */
html[data-theme="dark"] .merged-item {
  background: var(--card-inner-box) !important;
  border-color: var(--capsule-border) !important;
}
html[data-theme="dark"] .merged-item:hover {
  background: var(--capsule-hover) !important;
  border-color: rgba(96, 165, 250, 0.4) !important;
}

/* ── SLA Telemetry & Attachment Chips ──────────────────────────────────── */
html[data-theme="dark"] .sla-meter-bar {
  background: rgba(255, 255, 255, 0.12) !important;
}
.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--card-inner-box);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  text-decoration: none;
  font-size: 12px;
  transition: all 0.15s ease;
}
.attachment-chip:hover {
  background: var(--capsule-hover);
  border-color: var(--brand-blue-accent);
  color: var(--brand-blue-accent);
}
html[data-theme="dark"] .attachment-chip {
  background: var(--card-inner-box) !important;
  border-color: var(--capsule-border) !important;
  color: var(--text-main) !important;
}

/* ── Note Banner in Ticket Detail ──────────────────────────────────────── */
.note-banner {
  background: rgba(234, 170, 33, 0.10);
  border: 1px solid rgba(234, 170, 33, 0.28);
  color: var(--strategic-gold);
}
html[data-theme="light"] .note-banner {
  background: #FFF9ED;
  border-color: #FDE68A;
  color: #9A6506;
}

/* ── Merge Modal Target Cards ─────────────────────────────────────────── */
.merge-target-primary {
  padding: 10px 12px;
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 8px;
}
html[data-theme="light"] .merge-target-primary {
  background: #F0FDF4;
  border-color: #BBF7D0;
}
.merge-target-secondary {
  padding: 10px 12px;
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 8px;
}
html[data-theme="light"] .merge-target-secondary {
  background: #FEF2F2;
  border-color: #FECACA;
}

/* ── Brand Glass Palette Swatches & Segmented Controls ─────────────────── */
.palette-swatches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 12px;
  width: 100%;
}
.palette-swatch-card {
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 86px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.palette-swatch-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.swatch-navy {
  background: linear-gradient(135deg, #0A0D18 0%, #151B30 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.swatch-gold {
  background: linear-gradient(135deg, #181406 0%, #29210A 100%);
  border: 1px solid rgba(234, 170, 33, 0.25);
}
.swatch-blue {
  background: linear-gradient(135deg, #071329 0%, #0F2750 100%);
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.swatch-teal {
  background: linear-gradient(135deg, #03171C 0%, #06313C 100%);
  border: 1px solid rgba(0, 178, 217, 0.25);
}

.palette-swatch-card.swatch-navy.active {
  border: 2px solid #3B82F6 !important;
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.45) !important;
}
.palette-swatch-card.swatch-gold.active {
  border: 2px solid #EAAA21 !important;
  box-shadow: 0 0 18px rgba(234, 170, 33, 0.45) !important;
}
.palette-swatch-card.swatch-blue.active {
  border: 2px solid #60A5FA !important;
  box-shadow: 0 0 18px rgba(96, 165, 250, 0.45) !important;
}
.palette-swatch-card.swatch-teal.active {
  border: 2px solid #00B2D9 !important;
  box-shadow: 0 0 18px rgba(0, 178, 217, 0.45) !important;
}

.swatch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.swatch-accent-dot {
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.swatch-active-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 800;
}
.palette-swatch-card.swatch-navy .swatch-active-badge { color: #60A5FA; }
.palette-swatch-card.swatch-gold .swatch-active-badge { color: #FCD34D; }
.palette-swatch-card.swatch-blue .swatch-active-badge { color: #93C5FD; }
.palette-swatch-card.swatch-teal .swatch-active-badge { color: #67E8F9; }

.swatch-name {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.swatch-desc {
  font-size: 10.5px;
  color: #94A3B8;
  margin-top: 2px;
}
.palette-swatch-card.swatch-gold .swatch-desc { color: #D89613; }
.palette-swatch-card.swatch-blue .swatch-desc { color: #93C5FD; }
.palette-swatch-card.swatch-teal .swatch-desc { color: #5EEAD4; }

/* ── Theme Segmented Control ───────────────────────────────────────────── */
.theme-segmented-control {
  display: inline-flex;
  align-items: center;
  background: var(--capsule-bg);
  border: 1px solid var(--capsule-border);
  border-radius: 9999px;
  padding: 4px;
  gap: 4px;
  flex-shrink: 0;
}
.theme-segmented-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  color: var(--text-dim);
  border: none;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}
.theme-segmented-btn:hover {
  color: var(--text-main);
  background: var(--capsule-hover);
}
.theme-segmented-btn.active {
  background: var(--pill-active) !important;
  color: var(--text-main) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
html[data-theme="light"] .theme-segmented-btn.active {
  background: #FFFFFF !important;
  color: #0F172A !important;
  box-shadow: 0 2px 8px rgba(17, 14, 43, 0.12);
}
html[data-theme="dark"] .theme-segmented-btn.active {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* ── Text-Clipping Prevention & Typography Polish ────────────────── */
.page-title {
  padding-left: 4px !important;
  letter-spacing: -0.015em !important;
  overflow: visible !important;
}
.greeting-title {
  padding-left: 4px !important;
  letter-spacing: -0.02em !important;
  overflow: visible !important;
}

/* ── Mobile & Tablet Responsiveness ───────────────────────────────── */
.mobile-header-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: var(--card-glass-bg);
  border: 1px solid var(--card-glass-border);
  border-radius: 16px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-card);
}

.table-scroll-wrap {
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin;
}
.table-scroll-wrap::-webkit-scrollbar {
  height: 6px;
}
.table-scroll-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.table-scroll-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 4px;
}
html[data-theme="light"] .table-scroll-wrap::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
}

.metric-strip {
  overflow-x: auto !important;
  flex-wrap: nowrap !important;
  padding-bottom: 6px !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin;
}
.metric-pill {
  flex-shrink: 0 !important;
}

@media (max-width: 900px) {
  body.island-layout {
    padding: 8px !important;
    gap: 0 !important;
  }
  .floating-sidebar {
    position: fixed !important;
    top: 8px !important;
    bottom: 8px !important;
    left: 8px !important;
    z-index: 100 !important;
    transform: translateX(-120%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.75) !important;
  }
  .floating-sidebar.mobile-open {
    transform: translateX(0) !important;
  }
  .mobile-header-bar {
    display: flex !important;
  }
  .floating-canvas {
    padding: 10px 14px 24px 14px !important;
    height: calc(100vh - 16px) !important;
  }
  .greeting-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .top-action-bar {
    width: 100% !important;
    flex-wrap: wrap !important;
  }
  .search-pill-box {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
  .search-pill-box input {
    width: 100% !important;
  }
}

/* ── Enhanced Table Pagination & Direct Page Jump ───────────────────────── */
.table-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 18px;
  background: var(--card-inner-box);
  border-top: 1px solid var(--border-subtle);
}

.pagination-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.page-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  background: var(--capsule-bg);
  border: 1px solid var(--capsule-border);
  color: var(--text-main);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.16s ease;
}
.page-nav-pill:hover:not(.disabled) {
  background: var(--capsule-hover);
  border-color: var(--border-mid);
  color: var(--text-main);
}
.page-nav-pill.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.page-numbers-list {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.page-number-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.14s ease;
}
.page-number-btn:hover {
  background: var(--capsule-hover);
  color: var(--text-main);
}
.page-number-btn.active {
  background: var(--pill-active) !important;
  border-color: var(--border-mid) !important;
  color: var(--text-main) !important;
  font-weight: 800;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.page-ellipsis {
  font-family: var(--font-mono);
  color: var(--text-dim);
  padding: 0 3px;
  font-size: 12px;
}

.page-jump-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-jump-input {
  width: 56px;
  height: 28px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--capsule-border);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  transition: all 0.14s ease;
}
.page-jump-input:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.page-jump-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background: var(--capsule-bg);
  border: 1px solid var(--capsule-border);
  color: var(--text-main);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}
.page-jump-btn:hover {
  background: var(--capsule-hover);
  border-color: var(--border-mid);
}

/* Dark mode specific fine-tuning */
html[data-theme="dark"] .table-pagination-bar {
  background: rgba(14, 18, 30, 0.6) !important;
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-theme="dark"] .page-number-btn.active {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #FFFFFF !important;
}
html[data-theme="dark"] .page-jump-input {
  background: #121626 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #FFFFFF !important;
}
html[data-theme="light"] .page-jump-input {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
  color: #0F172A !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   MODERN & SUPERB FILTERING SUITE (TICKETS QUEUE)
   ═══════════════════════════════════════════════════════════════════════ */
.tickets-filter-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
}

.tickets-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-search-container {
  flex: 1 1 240px;
  min-width: 200px;
  position: relative;
  display: flex;
  align-items: center;
}

.filter-search-input {
  width: 100%;
  height: 38px;
  padding: 0 32px 0 36px;
  background: var(--capsule-bg);
  border: 1px solid var(--capsule-border);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: all 0.16s ease;
}

.filter-search-input:focus {
  border-color: var(--strategic-gold);
  box-shadow: 0 0 0 3px rgba(234, 170, 33, 0.15);
}

.filter-search-icon {
  position: absolute;
  left: 11px;
  color: var(--text-muted);
  pointer-events: none;
}

.filter-search-clear {
  position: absolute;
  right: 10px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 4px;
}
.filter-search-clear:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}

.filter-select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.filter-select-control {
  height: 38px;
  padding: 0 28px 0 12px;
  background: var(--capsule-bg);
  border: 1px solid var(--capsule-border);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 500;
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-select-control:hover {
  border-color: var(--border-mid);
  background: var(--capsule-hover);
}

.filter-select-control:focus {
  border-color: var(--strategic-gold);
  box-shadow: 0 0 0 2px rgba(234, 170, 33, 0.15);
}

.filter-select-arrow {
  position: absolute;
  right: 10px;
  color: var(--text-muted);
  pointer-events: none;
}

.filter-btn-submit {
  height: 38px;
  padding: 0 16px;
  background: var(--midnight-navy);
  color: #FFFFFF;
  border: 1px solid rgba(234, 170, 33, 0.35);
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.16s ease;
  box-shadow: 0 2px 8px rgba(17, 14, 43, 0.2);
}

.filter-btn-submit:hover {
  background: #19253d;
  border-color: var(--strategic-gold);
  transform: translateY(-1px);
}

.filter-btn-reset {
  height: 38px;
  padding: 0 14px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn-reset:hover {
  color: #EF4444;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.06);
}

/* ─── Active Filter Chips Strip ─────────────────────────────────────── */
.active-filters-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
}

.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3.5px 9px 3.5px 11px;
  background: rgba(234, 170, 33, 0.1);
  border: 1px solid rgba(234, 170, 33, 0.3);
  border-radius: 9999px;
  color: var(--text-main);
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.active-filter-chip:hover {
  background: rgba(234, 170, 33, 0.18);
  border-color: var(--strategic-gold);
}

.active-filter-chip .chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.15);
  color: var(--text-main);
  font-size: 10px;
  line-height: 1;
  transition: background 0.15s ease;
}

.active-filter-chip:hover .chip-remove {
  background: #EF4444;
  color: #FFFFFF;
}

.active-filters-clear-all {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-sub);
  text-decoration: underline;
  cursor: pointer;
  margin-left: 6px;
}
.active-filters-clear-all:hover {
  color: #EF4444;
}

/* Dark mode overrides */
html[data-theme="dark"] .filter-btn-submit {
  background: rgba(234, 170, 33, 0.15);
  color: var(--strategic-gold);
  border-color: rgba(234, 170, 33, 0.4);
}
html[data-theme="dark"] .filter-btn-submit:hover {
  background: rgba(234, 170, 33, 0.25);
  border-color: var(--strategic-gold);
}
html[data-theme="dark"] .active-filter-chip {
  background: rgba(234, 170, 33, 0.12);
  border-color: rgba(234, 170, 33, 0.28);
}

/* ===================================================================
   Operational Reports & Insights Suite
   =================================================================== */
.reports-top-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.insights-kpis-flex {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 280px;
}
.insights-metric-card {
  flex: 1 1 180px;
  min-width: 155px;
  background: var(--card-glass-bg, #FFFFFF);
  border: 1px solid var(--border-subtle, #E2E8F0);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.insights-metric-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}
.insights-metric-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim, #64748B);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.insights-metric-val-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.insights-metric-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main, #0F172A);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.insights-metric-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  white-space: nowrap;
}
.insights-metric-badge.positive {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.insights-metric-badge.target {
  background: rgba(37, 99, 235, 0.10);
  color: #2563EB;
  border: 1px solid rgba(37, 99, 235, 0.22);
}
.insights-metric-badge.neutral {
  background: var(--card-inner-box, #F1F5F9);
  color: var(--text-dim, #64748B);
  border: 1px solid var(--border-subtle, #CBD5E1);
}

.reports-timeframe-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.timeframe-pill-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--card-inner-box, #F1F5F9);
  border: 1px solid var(--border-subtle, #CBD5E1);
  border-radius: 9999px;
  padding: 3px;
  gap: 2px;
}
.timeframe-pill-toggle a {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dim, #64748B);
  padding: 4px 12px;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.timeframe-pill-toggle a:hover {
  color: var(--text-main, #0F172A);
}
.timeframe-pill-toggle a.active {
  background: var(--brand-blue-accent, #2563EB);
  color: #FFFFFF;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.35);
}

.reports-bento-grid-top {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.reports-bento-grid-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 960px) {
  .reports-bento-grid-top,
  .reports-bento-grid-bottom {
    grid-template-columns: 1fr;
  }
}

.glass-bento-card {
  background: var(--card-glass-bg, #FFFFFF);
  border: 1px solid var(--border-subtle, #E2E8F0);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.bento-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.bento-card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main, #0F172A);
  letter-spacing: -0.01em;
}
.bento-card-subtitle {
  font-size: 11.5px;
  color: var(--text-dim, #64748B);
  margin-top: 2px;
  font-weight: 500;
}
.bento-card-link {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--brand-blue-accent, #2563EB);
  text-decoration: none;
  transition: transform 0.15s ease;
}
.bento-card-link:hover {
  text-decoration: underline;
  transform: translateX(2px);
}

.chart-canvas-wrap {
  position: relative;
  width: 100%;
  height: 160px;
  margin: 8px 0 4px 0;
  overflow: visible;
}
.chart-svg-main {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chart-gridline {
  stroke: var(--border-subtle, #E2E8F0);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  opacity: 0.6;
}
.chart-node-dot {
  transition: transform 0.15s ease;
  cursor: pointer;
}
.chart-node-dot:hover {
  transform: scale(1.4);
}
.chart-x-axis-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-dim, #64748B);
  font-weight: 500;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle, #E2E8F0);
}

.donut-card-body {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.donut-graphic-box {
  position: relative;
  width: 130px;
  height: 130px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.donut-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  border-radius: 50%;
}
.donut-center-info {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.donut-center-total {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main, #0F172A);
  line-height: 1;
  letter-spacing: -0.02em;
}
.donut-center-sub {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim, #64748B);
  text-transform: uppercase;
  margin-top: 2px;
}
.donut-legend-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  min-width: 150px;
}
.donut-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  gap: 8px;
}
.donut-legend-left {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}
.donut-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.donut-legend-name {
  font-weight: 600;
  color: var(--text-main, #0F172A);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.donut-legend-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.donut-legend-count {
  font-weight: 700;
  color: var(--text-main, #0F172A);
}
.donut-legend-pct {
  font-size: 10.5px;
  color: var(--text-dim, #64748B);
  width: 34px;
  text-align: right;
}

.report-progress-track {
  height: 6px;
  width: 100%;
  background: var(--card-inner-box, #F1F5F9);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}
.report-progress-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}



