:root {
  --admin-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --bg-app: #0f172a;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-dark: #1e40af;
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --badge-bg: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --sidebar-width: 250px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--admin-font);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Control Tower Top Bar */
.admin-top-bar {
  background: #0f172a;
  color: #f8fafc;
  min-height: 60px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 10px clamp(12px, 3vw, 24px);
  border-bottom: 1px solid #1e293b;
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-bar-left, .top-bar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  min-width: 0;
  max-width: 100%;
}

.admin-logo {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-logo-mark {
  background: var(--primary);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.workspace-badge {
  background: #1e293b;
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid #334155;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.workspace-switcher {
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid #334155;
  padding: 8px 12px;
  min-height: 40px;
  max-width: 100%;
  min-width: 0;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}
.workspace-switcher:focus {
  border-color: var(--primary);
}

.admin-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.user-country-tag {
  background: #065f46;
  color: #6ee7b7;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.admin-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.admin-btn:hover {
  background: var(--primary-hover);
}
.admin-btn-secondary {
  background: #334155;
  color: #f1f5f9;
}
.admin-btn-secondary:hover {
  background: #475569;
}
.admin-btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}
.admin-btn-outline:hover {
  background: var(--bg-card-hover);
}
.admin-btn-danger {
  background: var(--danger);
  color: #fff;
}
.admin-btn-danger:hover {
  background: #dc2626;
}
.admin-btn-sm {
  padding: 4px 8px;
  font-size: 0.75rem;
}

/* App Container Layout */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 60px);
}

/* Sidebar */
.admin-sidebar {
  width: var(--sidebar-width);
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 0;
}

.sidebar-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 12px 20px 6px;
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav-item {
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #334155;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}
.sidebar-nav-item:hover {
  background: #f1f5f9;
  color: var(--primary);
}
.sidebar-nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.nav-badge {
  background: var(--badge-bg);
  color: #475569;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 9999px;
  font-weight: 700;
}
.nav-badge.danger {
  background: var(--danger-light);
  color: var(--danger);
}

/* Main Content Area */
.admin-main {
  flex: 1;
  padding: 24px 32px;
  overflow-x: hidden;
}

.page-header {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.page-title-wrap h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}
.page-subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 4px;
}

/* KPI Stat Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
}
.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 6px 0 2px;
}
.stat-desc {
  font-size: 0.78rem;
  color: var(--text-light);
}

/* Section Cards & Panels */
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafafa;
}
.card-header h2, .card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
}

.card-body {
  padding: 20px;
}

/* Search and Filters Bar */
.toolbar-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-input {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.85rem;
  width: 280px;
  outline: none;
}
.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.filter-select {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.85rem;
  background: #ffffff;
  outline: none;
  cursor: pointer;
}

/* Data Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #fff;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.admin-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  color: #1e293b;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: #f8fafc;
}

/* Badges & Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}
.status-pill.success {
  background: var(--success-light);
  color: var(--success);
}
.status-pill.warning {
  background: var(--warning-light);
  color: #d97706;
}
.status-pill.danger {
  background: var(--danger-light);
  color: var(--danger);
}
.status-pill.neutral {
  background: #f1f5f9;
  color: #64748b;
}

/* Floating Bulk Action Bar */
.bulk-action-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 90;
  animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
  from { transform: translate(-50%, 100%); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* Modal Dialogs */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.admin-modal {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
}
.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group-full {
  grid-column: span 2;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
}
.form-control {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.85rem;
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

/* Alert Banner */
.alert-banner {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-banner.success {
  background: var(--success-light);
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.alert-banner.error {
  background: var(--danger-light);
  color: #991b1b;
  border: 1px solid #fecaca;
}
.alert-banner.info {
  background: var(--primary-light);
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* Workspace Launcher Grid */
.workspace-launcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
  margin-top: 24px;
}

.workspace-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}
.workspace-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.workspace-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.workspace-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
}

.workspace-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 8px;
}

.workspace-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.workspace-metrics-pill {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.metric-tag {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
}
.metric-tag.highlight {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .admin-main {
    padding: 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-group-full {
    grid-column: span 1;
  }
}

/* ARI Dynamic Calendar Grid */
.ari-calendar-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.ari-calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.ari-date-cell {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.ari-date-cell:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.ari-date-cell.closed {
  background: #f8fafc;
  opacity: 0.85;
  border-style: dashed;
}

.ari-cell-date {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-main);
}

.ari-cell-day {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.ari-inventory-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.ari-inventory-badge.low {
  background: var(--warning-light);
  color: var(--warning);
}

.ari-inventory-badge.zero {
  background: var(--danger-light);
  color: var(--danger);
}

.ari-rate-row {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ari-restriction-tag {
  font-size: 0.68rem;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 1px 4px;
  border-radius: 2px;
}

/* Automotive & 120-Point Inspection UI Styles */
.grade-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.grade-badge.certified {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.grade-badge.good {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

.grade-badge.fair {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.grade-badge.needs_attention {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.inspection-matrix-category {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-weight: 600;
}

.category-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-slider-row input[type="range"] {
  flex: 1;
}

.category-score-val {
  font-weight: 700;
  min-width: 45px;
  text-align: right;
}

.vahan-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}

.vahan-status-pill.verified {
  background: #dcfce7;
  color: #166534;
}

.vahan-status-pill.pending {
  background: #fef3c7;
  color: #92400e;
}

/* Cold-Chain IoT & FEFO Healthcare Styles */
.temp-gauge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
}

.temp-gauge.optimal {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.temp-gauge.warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.temp-gauge.critical {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  animation: pulse-breach 2s infinite;
}

@keyframes pulse-breach {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.fefo-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.fefo-badge.optimal {
  background: #dcfce7;
  color: #166534;
}

.fefo-badge.near_expiry {
  background: #fef3c7;
  color: #92400e;
}

.fefo-badge.dispense_blocked {
  background: #fee2e2;
  color: #991b1b;
}

.fefo-badge.expired {
  background: #475569;
  color: #f8fafc;
}

.cold-chain-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* Recruitment & Careers UI Styles */
.match-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.8rem;
}

.match-score-pill.strong {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.match-score-pill.potential {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.match-score-pill.low {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.skill-tag {
  display: inline-block;
  padding: 2px 6px;
  background: #f1f5f9;
  color: #334155;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  margin: 1px 2px;
}

.skill-tag.matched {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* Xstore Play Streaming & HLS Health Styles */
.stream-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.stream-badge.hls {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #c4b5fd;
}

.stream-badge.mp4 {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

.stream-badge.trailer {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.stream-health-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.stream-health-indicator.healthy {
  background: #dcfce7;
  color: #15803d;
}

.stream-health-indicator.degraded {
  background: #fef3c7;
  color: #b45309;
}

.stream-health-indicator.unreachable {
  background: #fee2e2;
  color: #b91c1c;
}

/* Finance & Vendor Settlement Styles */
.finance-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.finance-badge.ready {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.finance-badge.on-hold {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.finance-badge.reconciled {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.sod-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.hash-pill {
  font-family: monospace;
  font-size: 0.72rem;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  color: #475569;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

.fee-waterfall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.fee-waterfall-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

.fee-waterfall-card.highlight {
  border-color: #6366f1;
  background: #f5f3ff;
}

.fee-waterfall-card.net-payout {
  border-color: #10b981;
  background: #ecfdf5;
}

/* Governance, Risk & Policy Engine Styles */
.mfa-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.mfa-badge.under-review {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.mfa-badge.approved {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.mfa-badge.executed {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.country-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.country-pill.allowed {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.country-pill.blocked {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.webhook-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

/* Cross-Vertical Unified Analytics & Funnel Styles */
.funnel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
  margin-top: 16px;
}

.funnel-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.funnel-stage-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.funnel-stage-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
}

.funnel-bar-track {
  width: 100%;
  height: 8px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}

.funnel-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #3b82f6, #6366f1);
  transition: width 0.4s ease;
}

.funnel-bar-fill.success {
  background: linear-gradient(90deg, #10b981, #059669);
}

.cadence-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #c4b5fd;
}

/* ==========================================
   SUPPORT & DISPUTE RESOLUTION STYLES
   ========================================== */
.sla-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.sla-badge.p0 {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #f87171;
  animation: pulseRed 2s infinite ease-in-out;
}
.sla-badge.p1 {
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #fdba74;
}
.sla-badge.p2 {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
}
.sla-badge.p3 {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.sla-badge.breached {
  background: #450a0a;
  color: #fef2f2;
  border: 1px solid #ef4444;
}

@keyframes pulseRed {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
}
.tier-badge.tier-1 {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.tier-badge.tier-2 {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.tier-badge.tier-3 {
  background: #faf5ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

.dispute-chat-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  height: 680px;
}

.chat-dispute-sidebar {
  border-right: 1px solid var(--border-color);
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.chat-dispute-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.15s ease;
}
.chat-dispute-item:hover {
  background: #f1f5f9;
}
.chat-dispute-item.active {
  background: #eff6ff;
  border-left: 4px solid var(--primary);
}

.chat-main-area {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.chat-thread-box {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fdfefe;
}

.chat-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
}
.chat-bubble.customer {
  align-self: flex-start;
  background: #f1f5f9;
  color: #1e293b;
  border-bottom-left-radius: 2px;
}
.chat-bubble.agent {
  align-self: flex-end;
  background: #2563eb;
  color: #ffffff;
  border-bottom-right-radius: 2px;
}
.chat-bubble.system {
  align-self: center;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-size: 0.8rem;
  max-width: 90%;
  text-align: center;
}

.chat-composer-bar {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 960px) {
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 12px;
  }
  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
  }
  .sidebar-nav-item {
    white-space: nowrap;
    min-height: 44px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
  }
  .dispute-chat-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .chat-dispute-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    max-height: 260px;
  }
  .chat-main-area {
    min-height: 420px;
  }
}

@media (max-width: 640px) {
  .admin-btn {
    min-height: 44px;
  }
  .workspace-switcher {
    width: 100%;
    min-height: 44px;
  }
  .chat-bubble {
    max-width: 92%;
  }
}
