/**
 * OIMS v2 Theme - Aurora Design System
 * Glass morphism elegance with sidebar navigation
 * Version: 2.0.0
 */

/* ========================================================================
   CSS VARIABLES - DARK THEME (DEFAULT)
   ======================================================================== */

:root {
  /* Color palette - Aurora violet */
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  --primary-glow: rgba(124, 58, 237, 0.25);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.25);
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.25);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.25);
  --info: #06b6d4;
  --info-glow: rgba(6, 182, 212, 0.25);

  /* Background layers - Navy gradient with glass */
  --bg-base: #0a0d1a;
  --bg-surface: rgba(26, 32, 46, 0.8);
  --bg-elevated: rgba(36, 42, 58, 0.9);
  --bg-overlay: rgba(46, 52, 68, 0.95);
  --bg-sidebar: rgba(20, 24, 36, 0.85);

  /* Text colors */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-disabled: #64748b;

  /* Borders */
  --border-color: rgba(148, 163, 184, 0.1);
  --border-hover: rgba(148, 163, 184, 0.2);
  --border-focus: rgba(124, 58, 237, 0.4);

  /* Shadows - Aurora depth */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.16);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.24);
  --shadow-glow: 0 0 24px var(--primary-glow);
  --shadow-glow-success: 0 0 20px var(--success-glow);
  --shadow-glow-danger: 0 0 20px var(--danger-glow);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Spacing */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  /* Sidebar dimensions */
  --sidebar-width-collapsed: 64px;
  --sidebar-width-expanded: 240px;
}

/* ========================================================================
   CSS VARIABLES - LIGHT THEME
   ======================================================================== */

[data-bs-theme="light"] {
  /* Background layers - Clean white with glass */
  --bg-base: #f1f5f9;
  --bg-surface: rgba(255, 255, 255, 0.85);
  --bg-elevated: rgba(241, 245, 249, 0.9);
  --bg-overlay: rgba(226, 232, 240, 0.95);
  --bg-sidebar: rgba(248, 250, 252, 0.85);

  /* Text colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-disabled: #94a3b8;

  /* Borders */
  --border-color: rgba(15, 23, 42, 0.08);
  --border-hover: rgba(15, 23, 42, 0.15);
  --border-focus: rgba(124, 58, 237, 0.3);

  /* Shadows - Softer for light theme */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 10px 32px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.15);
  --shadow-glow-success: 0 0 16px rgba(16, 185, 129, 0.15);
  --shadow-glow-danger: 0 0 16px rgba(239, 68, 68, 0.15);

  /* Subtler glow effects */
  --primary-glow: rgba(124, 58, 237, 0.15);
  --success-glow: rgba(16, 185, 129, 0.15);
  --warning-glow: rgba(245, 158, 11, 0.15);
  --danger-glow: rgba(239, 68, 68, 0.15);
  --info-glow: rgba(6, 182, 212, 0.15);
}

/* ========================================================================
   BASE STYLES
   ======================================================================== */

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.875rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Tabular numbers for metrics */
.metric,
.stat-value,
.log-timestamp,
.table-numeric {
  font-variant-numeric: tabular-nums;
}

/* ========================================================================
   SIDEBAR NAVIGATION
   ======================================================================== */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-width-expanded);
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: width var(--transition-slow);
  z-index: 1040;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-collapsed {
  width: var(--sidebar-width-collapsed);
}

.sidebar-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 64px;
}

.sidebar-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.sidebar-brand {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text-primary);
  white-space: nowrap;
  opacity: 1;
  transition: opacity var(--transition-normal);
}

.sidebar-collapsed .sidebar-brand {
  opacity: 0;
  pointer-events: none;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.5rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar .nav-item {
  margin-bottom: 0.25rem;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-normal);
  position: relative;
  white-space: nowrap;
  font-weight: 500;
  font-size: 0.9375rem;
}

.sidebar .nav-link i {
  font-size: 1.25rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.sidebar .nav-link span {
  opacity: 1;
  transition: opacity var(--transition-normal);
}

.sidebar-collapsed .nav-link span {
  opacity: 0;
  pointer-events: none;
}

.sidebar .nav-link:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  transform: translateX(2px);
}

.sidebar .nav-link.active {
  background: rgba(124, 58, 237, 0.1);
  color: var(--primary);
  border-left: 3px solid var(--primary);
  padding-left: calc(1rem - 3px);
  box-shadow: inset 0 0 20px rgba(124, 58, 237, 0.15);
}

.sidebar .nav-link.active i {
  color: var(--primary);
}

.sidebar-footer {
  padding: 0.75rem 0.5rem;
  border-top: 1px solid var(--border-color);
}

.sidebar-toggle {
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.sidebar-toggle:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.sidebar-toggle i {
  transition: transform var(--transition-normal);
}

.sidebar-collapsed .sidebar-toggle i {
  transform: rotate(180deg);
}

/* Main content area with sidebar offset */
.main-content {
  margin-left: var(--sidebar-width-expanded);
  transition: margin-left var(--transition-slow);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sidebar-collapsed ~ .main-content {
  margin-left: var(--sidebar-width-collapsed);
}

/* Mobile sidebar - bottom nav or overlay */
@media (max-width: 768px) {
  .sidebar {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 64px;
    flex-direction: row;
    border-right: none;
    border-top: 1px solid var(--border-color);
  }

  .sidebar-header,
  .sidebar-footer {
    display: none;
  }

  .sidebar-nav {
    flex-direction: row;
    padding: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
  }

  .sidebar .nav-item {
    margin: 0;
    flex: 1;
  }

  .sidebar .nav-link {
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
  }

  .sidebar .nav-link i {
    font-size: 1.5rem;
  }

  .sidebar .nav-link span {
    font-size: 0.625rem;
    opacity: 1;
  }

  .sidebar .nav-link.active {
    border-left: none;
    border-top: 3px solid var(--primary);
    padding-left: 0.5rem;
    padding-top: calc(0.5rem - 3px);
  }

  .main-content,
  .sidebar-collapsed ~ .main-content {
    margin-left: 0;
    margin-bottom: 64px;
  }
}

/* ========================================================================
   NAVBAR
   ======================================================================== */

.navbar {
  background: var(--bg-surface) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-md);
  padding: 0.75rem 1.5rem;
}

.navbar-brand {
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text-primary) !important;
  font-size: 1.125rem;
}

.navbar-brand i {
  color: var(--primary);
  margin-right: 0.5rem;
}

.navbar-text {
  color: var(--text-secondary);
}

/* ========================================================================
   THEME TOGGLE BUTTON
   ======================================================================== */

.btn-theme-toggle {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-secondary);
  border-radius: 50%;
  transition: all var(--transition-normal);
  font-size: 1rem;
  cursor: pointer;
}

.btn-theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-glow);
  transform: rotate(15deg);
}

.btn-theme-toggle i {
  transition: transform var(--transition-normal);
}

/* ========================================================================
   CARDS - GLASS MORPHISM
   ======================================================================== */

.card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  animation: fadeSlideIn 0.3s ease-out both;
}

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

.card-header {
  background: var(--bg-elevated);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 1rem 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ========================================================================
   BUTTONS
   ======================================================================== */

.btn {
  border-radius: var(--radius-md);
  font-weight: 500;
  padding: 0.625rem 1.25rem;
  transition: all var(--transition-normal);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #5b21b6 100%);
  box-shadow: 0 4px 16px var(--primary-glow), var(--shadow-glow);
  transform: translateY(-2px);
  color: white;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color: white;
  box-shadow: 0 2px 8px var(--success-glow);
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 4px 16px var(--success-glow);
  transform: translateY(-2px);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 2px 8px var(--danger-glow);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 4px 16px var(--danger-glow);
  transform: translateY(-2px);
  color: white;
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
  color: white;
  box-shadow: 0 2px 8px var(--warning-glow);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  box-shadow: 0 4px 16px var(--warning-glow);
  transform: translateY(-2px);
  color: white;
}

.btn-info {
  background: linear-gradient(135deg, var(--info) 0%, #0891b2 100%);
  color: white;
  box-shadow: 0 2px 8px var(--info-glow);
}

.btn-info:hover {
  background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
  box-shadow: 0 4px 16px var(--info-glow);
  transform: translateY(-2px);
  color: white;
}

.btn-outline-primary {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn-outline-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-outline-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.btn:not(:disabled) {
  transform-origin: center;
}

.btn:not(:disabled):active {
  transform: scale(0.97);
}

.btn:disabled,
.btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: auto;
  transform: none !important;
  box-shadow: none !important;
}

[data-bs-theme="light"] .btn:disabled,
[data-bs-theme="light"] .btn.disabled {
  opacity: 0.5;
}

/* ========================================================================
   FORM CONTROLS
   ======================================================================== */

.form-control,
.form-select {
  background: var(--bg-surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 0.625rem 0.875rem;
  transition: all var(--transition-normal);
  font-size: 0.875rem;
}

.form-control:focus,
.form-select:focus {
  background: var(--bg-elevated);
  border-color: transparent;
  box-shadow: 0 0 0 3px var(--border-focus),
              0 0 20px var(--primary-glow);
  outline: none;
  transform: translateY(-1px);
}

.form-control::placeholder {
  color: var(--text-muted);
}

[data-bs-theme="light"] .form-control::placeholder {
  color: var(--text-muted);
}

.form-label {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.form-text {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* ========================================================================
   TABLES
   ======================================================================== */

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text-primary);
  border-color: var(--border-color);
  font-size: 0.875rem;
}

.table thead th {
  background: var(--bg-elevated);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.table tbody td {
  padding: 0.875rem 1rem;
  vertical-align: middle;
  border-color: var(--border-color);
}

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

.table-hover tbody tr:hover {
  background: var(--bg-elevated);
  box-shadow: inset 0 0 20px rgba(124, 58, 237, 0.05);
}

.table tbody tr:active {
  background: var(--bg-overlay) !important;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
}

@media (max-width: 768px) {
  .table {
    min-width: 600px;
    font-size: 0.8125rem;
  }

  .table thead th,
  .table tbody td {
    padding: 0.75rem;
  }
}

/* ========================================================================
   MODALS
   ======================================================================== */

.modal-content {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-color);
  border-radius: 1rem 1rem 0 0;
  padding: 1.25rem 1.5rem;
}

.modal-title {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  background: var(--bg-elevated);
  border-radius: 0 0 1rem 1rem;
}

.modal.fade .modal-dialog {
  transition: transform var(--transition-slow), opacity var(--transition-slow);
  transform: translateY(-20px) scale(0.95);
}

.modal.show .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-backdrop {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@media (max-width: 576px) {
  .modal-xl,
  .modal-lg {
    max-width: 95vw;
    margin: 0.5rem auto;
  }
}

/* ========================================================================
   TABS
   ======================================================================== */

.nav-tabs {
  border-bottom: 1px solid var(--border-color);
  gap: 0.5rem;
}

.nav-tabs .nav-link {
  border: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  color: var(--text-secondary);
  padding: 0.875rem 1.25rem;
  font-weight: 500;
  transition: all var(--transition-normal);
  position: relative;
  font-size: 0.9375rem;
}

.nav-tabs .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, #06b6d4 100%);
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.nav-tabs .nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.nav-tabs .nav-link.active {
  background: var(--bg-surface);
  color: var(--primary);
}

.nav-tabs .nav-link.active::after {
  transform: scaleX(1);
}

.nav-tabs .nav-link i {
  margin-right: 0.5rem;
}

.nav-tabs .nav-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  box-shadow: inset 0 0 0 1px var(--primary);
}

/* Sub-tab pills (used inside AWS tab) */
#awsSubTabs {
  gap: 0.5rem;
}
#awsSubTabs .nav-link {
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-normal);
}
#awsSubTabs .nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
  border-color: var(--text-secondary);
}
#awsSubTabs .nav-link.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.tab-pane.fade {
  transition: opacity var(--transition-normal);
}

.tab-pane.show {
  animation: fadeIn 0.25s ease-out;
}

@media (max-width: 768px) {
  .nav-tabs .nav-link {
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
  }

  .nav-tabs .nav-link span {
    display: none;
  }
}

@media (max-width: 576px) {
  #opsTabs .nav-link span:not(.badge) {
    display: none;
  }

  #opsTabs .nav-link i {
    margin-right: 0 !important;
    font-size: 1.2rem;
  }

  #opsTabs .nav-link .badge {
    margin-left: 0.25rem;
    font-size: 0.6rem;
  }
}

/* ========================================================================
   BADGES
   ======================================================================== */

.badge {
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.badge:hover {
  transform: scale(1.05);
}

.badge.bg-success,
.badge.bg-danger,
.badge.bg-warning,
.badge.bg-info,
.badge.bg-primary,
.badge.bg-secondary {
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.badge.bg-success {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%) !important;
  box-shadow: 0 2px 8px var(--success-glow);
}

.badge.bg-danger {
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%) !important;
  box-shadow: 0 2px 8px var(--danger-glow);
}

.badge.bg-warning {
  background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%) !important;
  box-shadow: 0 2px 8px var(--warning-glow);
}

.badge.bg-info {
  background: linear-gradient(135deg, var(--info) 0%, #0891b2 100%) !important;
  box-shadow: 0 2px 8px var(--info-glow);
}

.badge.bg-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%) !important;
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* ========================================================================
   STATUS BADGES & HEALTH INDICATORS
   ======================================================================== */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
}

.status-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-badge.idle::before {
  background: var(--text-muted);
  animation: none;
}

.status-badge.running::before {
  background: var(--info);
}

.status-badge.success::before {
  background: var(--success);
  animation: none;
}

.status-badge.error::before {
  background: var(--danger);
  animation: none;
}

.health-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px currentColor;
}

.health-indicator.healthy {
  background: var(--success);
  color: var(--success);
}

.health-indicator.warning {
  background: var(--warning);
  color: var(--warning);
}

.health-indicator.critical {
  background: var(--danger);
  color: var(--danger);
  animation: blink 1s infinite;
}

.health-indicator.unknown {
  background: var(--text-muted);
  color: var(--text-muted);
  border: 1px dashed var(--border-color);
  box-shadow: none;
}

/* ========================================================================
   TOAST NOTIFICATIONS
   ======================================================================== */

.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1100;
}

.toast {
  background: var(--bg-elevated);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 320px;
  animation: slideInRight 0.3s ease-out;
}

.toast.toast-success {
  border-left: 4px solid var(--success);
  box-shadow: var(--shadow-lg), -4px 0 12px var(--success-glow);
}

.toast.toast-error {
  border-left: 4px solid var(--danger);
  box-shadow: var(--shadow-lg), -4px 0 12px var(--danger-glow);
}

.toast.toast-warning {
  border-left: 4px solid var(--warning);
  box-shadow: var(--shadow-lg), -4px 0 12px var(--warning-glow);
}

.toast.toast-info {
  border-left: 4px solid var(--info);
  box-shadow: var(--shadow-lg), -4px 0 12px var(--info-glow);
}

.toast-header {
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  font-weight: 600;
}

.toast-body {
  color: var(--text-secondary);
  padding: 0.75rem 1rem;
}

.toast-header .bi.text-success { color: #34d399 !important; }
.toast-header .bi.text-danger  { color: #f87171 !important; }
.toast-header .bi.text-warning { color: #fbbf24 !important; }
.toast-header .bi.text-info    { color: #22d3ee !important; }

[data-bs-theme="light"] .toast-header .bi.text-success { color: #059669 !important; }
[data-bs-theme="light"] .toast-header .bi.text-danger  { color: #dc2626 !important; }
[data-bs-theme="light"] .toast-header .bi.text-warning { color: #d97706 !important; }
[data-bs-theme="light"] .toast-header .bi.text-info    { color: #0891b2 !important; }

.toast-header .btn-close {
  padding: 0.75rem;
  margin: -0.5rem -0.25rem -0.5rem 0;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================================================================
   LOG PANEL - TERMINAL STYLE
   ======================================================================== */

.log-panel {
  background: linear-gradient(180deg, #060810 0%, #0a0d1a 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #4ade80;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Menlo', 'Consolas', 'Courier New', monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
  padding: 1rem;
  overflow: auto;
  white-space: pre-wrap;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
  position: relative;
}

[data-bs-theme="light"] .log-panel {
  background: linear-gradient(180deg, #f5f5f5 0%, #fafafa 100%);
  color: #1a1a2e;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.log-panel::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.log-panel::-webkit-scrollbar-track {
  background: transparent;
}

.log-panel::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.log-panel::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

.log-details-cell {
  max-width: 300px;
  max-height: 100px;
  overflow: auto;
  font-size: 0.75em;
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 0.25rem;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
}

@media (max-width: 768px) {
  .log-panel {
    height: 250px;
    font-size: 0.75rem;
  }
}

/* ========================================================================
   LOADING OVERLAY & SPINNER
   ======================================================================== */

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.loading-overlay.show {
  opacity: 1;
  visibility: visible;
}

[data-bs-theme="light"] .loading-overlay {
  background: rgba(255, 255, 255, 0.8);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ========================================================================
   ACTION CARDS & STAT CARDS
   ======================================================================== */

.action-card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  display: block;
}

.action-card:hover {
  background: var(--bg-elevated);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.action-card i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
  display: block;
  transition: transform var(--transition-normal);
}

.action-card:hover i {
  transform: scale(1.1);
}

.action-card .title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.action-card .desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.stat-card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all var(--transition-normal);
}

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

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========================================================================
   ALERTS
   ======================================================================== */

.alert {
  border-radius: var(--radius-md);
  border: 1px solid;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem 1.25rem;
}

.alert-secondary {
  background: var(--bg-elevated);
  border-color: var(--border-color);
  color: var(--text-primary);
}

/* ========================================================================
   FOOTER
   ======================================================================== */

footer {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  padding: 1rem 0;
  margin-top: auto;
}

/* ========================================================================
   SCROLLBAR STYLES
   ======================================================================== */

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

*::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

[data-bs-theme="light"] * {
  scrollbar-color: rgba(15, 23, 42, 0.15) transparent;
}

[data-bs-theme="light"] *::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.15);
}

[data-bs-theme="light"] *::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.25);
}

/* ========================================================================
   ANIMATIONS & KEYFRAMES
   ======================================================================== */

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.spin {
  display: inline-block;
  animation: spin 1s linear infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========================================================================
   SKELETON LOADING
   ======================================================================== */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 25%,
    var(--bg-overlay) 50%,
    var(--bg-elevated) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ========================================================================
   ACCESSIBILITY
   ======================================================================== */

/* Focus visible styles */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.nav-link:focus-visible,
.action-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--border-focus);
}

/* Selection color */
::selection {
  background: var(--primary);
  color: white;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ========================================================================
   THEME TRANSITIONS
   ======================================================================== */

body,
.navbar,
.sidebar,
.card,
.card-header,
.modal-content,
.modal-header,
.form-control,
.form-select,
.log-panel,
.table thead th,
footer,
.toast,
.loading-overlay,
.action-card,
.stat-card,
.alert-secondary {
  transition: background-color var(--transition-normal),
              color var(--transition-normal),
              border-color var(--transition-normal),
              box-shadow var(--transition-normal);
}

/* ========================================================================
   LIGHT THEME SPECIFIC OVERRIDES
   ======================================================================== */

[data-bs-theme="light"] .btn-close-white {
  filter: none;
}

/* ========================================================================
   PRINT STYLES
   ======================================================================== */

@media print {
  .navbar,
  .sidebar,
  .nav-tabs,
  footer,
  .btn,
  .action-card {
    display: none !important;
  }

  .main-content,
  .sidebar-collapsed ~ .main-content {
    margin-left: 0;
  }

  .tab-pane {
    display: block !important;
    opacity: 1 !important;
  }

  .log-panel {
    background: #fff;
    color: #000;
    border: 1px solid #000;
  }

  .card {
    box-shadow: none;
    border: 1px solid #000;
  }
}

/* ========================================================================
   RESPONSIVE UTILITIES
   ======================================================================== */

@media (max-width: 768px) {
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }

  .card-body {
    padding: 1rem;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem;
  }
}

/* ========================================================================
   STATUS DASHBOARD - CARD GRID LAYOUT
   ======================================================================== */

/* --- Hero Overview Bar --- */
.status-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  margin-bottom: 1rem;
  position: relative;
  z-index: 10;
}

.status-hero-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: relative;
}

.status-hero-count {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.status-hero-count .total {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-muted);
}

.status-hero-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.status-pills {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.875rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  border: 1px solid;
  transition: all var(--transition-normal);
}

.status-pill i {
  font-size: 0.875rem;
}

.status-pill-success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.status-pill-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.status-pill-danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.status-pill[data-pill-status] {
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.status-pill[data-pill-status]:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.status-pill-danger.has-items {
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.2);
  animation: pulse 2s infinite;
}

/* Pill dropdown - affected instances list */
.pill-dropdown {
  position: absolute;
  z-index: 100;
  min-width: 260px;
  max-width: 360px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 0.5rem);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.pill-dropdown-header {
  padding: 0.5rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.pill-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s;
}

.pill-dropdown-item:last-child { border-bottom: none; }

.pill-dropdown-item:hover {
  background: rgba(124, 58, 237, 0.08);
  color: var(--text-primary);
}

.pill-dropdown-item > i:first-child { font-size: 0.875rem; flex-shrink: 0; }
.pill-dropdown-item > i:last-child { font-size: 0.75rem; color: var(--text-muted); margin-left: auto; flex-shrink: 0; }

.pill-dropdown-item-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.pill-dropdown-name {
  font-weight: 600;
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill-dropdown-detail {
  font-size: 0.6875rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-bs-theme="light"] .status-pill-success { color: #059669; }
[data-bs-theme="light"] .status-pill-warning { color: #d97706; }
[data-bs-theme="light"] .status-pill-danger  { color: #dc2626; }

.status-hero-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* --- Countdown Ring --- */
.refresh-timer {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.refresh-ring {
  width: 52px;
  height: 52px;
  transform: rotate(-90deg);
}

.refresh-ring-bg {
  fill: none;
  stroke: var(--bg-elevated);
  stroke-width: 3;
}

.refresh-ring-progress {
  fill: none;
  stroke: var(--primary);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 100.53;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
  filter: drop-shadow(0 0 6px var(--primary-glow));
}

.refresh-countdown {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

/* --- Controls Bar --- */
.status-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
}

.status-controls .form-select {
  max-width: 240px;
}

.status-controls .status-last-update {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* --- Group Section --- */
.status-group {
  margin-bottom: 1.5rem;
}

.status-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1.25rem;
  background: var(--bg-elevated);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  user-select: none;
}

.status-group-header:hover {
  background: var(--bg-overlay);
  border-color: var(--border-hover);
}

.status-group-header-left {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.status-group-header-left i.group-icon {
  font-size: 1.125rem;
  color: var(--primary);
  width: 24px;
  text-align: center;
}

.status-group-header-left h3 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.group-health-bar {
  height: 4px;
  background: var(--bg-overlay);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  width: 80px;
  margin-left: 0.75rem;
}

.group-health-bar > span {
  height: 100%;
  transition: width var(--transition-normal);
}

.group-health-bar .bar-healthy  { background: var(--success); }
.group-health-bar .bar-warning  { background: var(--warning); }
.group-health-bar .bar-danger   { background: var(--danger); }
.group-health-bar .bar-unknown  { background: var(--text-muted); }

.status-group-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.group-instance-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.group-collapse-icon {
  font-size: 1rem;
  color: var(--text-muted);
  transition: transform var(--transition-normal);
}

.status-group.collapsed .group-collapse-icon {
  transform: rotate(-90deg);
}

.status-group-body {
  overflow: hidden;
  max-height: 3000px;
  transition: max-height var(--transition-slow) ease-in-out,
              opacity var(--transition-normal);
  opacity: 1;
}

.status-group.collapsed .status-group-body {
  max-height: 0;
  opacity: 0;
}

/* --- Card Grid --- */
.status-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

/* --- Instance Card --- */
.status-card {
  position: relative;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.status-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

/* Top indicator strip */
.status-card-strip {
  height: 3px;
  width: 100%;
  flex-shrink: 0;
}

.status-card-highlight {
  animation: statusCardHighlight 3s ease-out;
}
@keyframes statusCardHighlight {
  0%, 20% { box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.6), 0 0 20px rgba(6, 182, 212, 0.3); }
  100% { box-shadow: none; }
}

.status-card-healthy .status-card-strip {
  background: var(--success);
  box-shadow: 0 0 10px var(--success-glow);
}

.status-card-degraded .status-card-strip {
  background: var(--warning);
  box-shadow: 0 0 10px var(--warning-glow);
}

.status-card-unhealthy .status-card-strip {
  background: var(--danger);
  box-shadow: 0 0 10px var(--danger-glow);
  animation: blink 1s infinite;
}

.status-card-unknown .status-card-strip {
  background: var(--text-muted);
}

/* Card header row */
.status-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 1rem 0.5rem;
}

.status-card-identity {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.status-icon-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.status-icon-wrap i {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

.status-card-healthy .status-icon-wrap i { color: var(--success); }
.status-card-degraded .status-icon-wrap i { color: var(--warning); }
.status-card-unhealthy .status-icon-wrap i { color: var(--danger); }

/* Pulse ring on icon */
.status-pulse {
  position: absolute;
  inset: -3px;
  border-radius: var(--radius-md);
  border: 2px solid var(--success);
  opacity: 0;
}

.status-card-healthy .status-pulse {
  animation: pulseRing 2.5s infinite;
  border-color: var(--success);
}

.status-card-unhealthy .status-pulse {
  animation: blinkRing 1s infinite;
  border-color: var(--danger);
}

@keyframes pulseRing {
  0%   { transform: scale(1); opacity: 0.6; }
  50%  { transform: scale(1.15); opacity: 0.2; }
  100% { transform: scale(1.3); opacity: 0; }
}

@keyframes blinkRing {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 0; }
}

.status-card-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-card-id {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* Status label badge */
.status-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.status-card-healthy .status-label {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

.status-card-degraded .status-label {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.status-card-unhealthy .status-label {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.status-card-unknown .status-label {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
}

[data-bs-theme="light"] .status-card-healthy .status-label { color: #059669; }
[data-bs-theme="light"] .status-card-degraded .status-label { color: #d97706; }
[data-bs-theme="light"] .status-card-unhealthy .status-label { color: #dc2626; }

/* Card metrics area */
.status-card-metrics {
  padding: 0.5rem 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
}

.status-metric-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  font-size: 0.8125rem;
}

.status-metric-row i {
  width: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.status-metric-row .metric-val {
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.status-metric-row .metric-lbl {
  color: var(--text-muted);
  margin-left: auto;
  font-size: 0.6875rem;
}

.status-metric-row.metric-warn .metric-val {
  color: var(--warning);
}

.status-metric-row.metric-danger .metric-val {
  color: var(--danger);
}

/* Error/warning message in card */
.status-card-error {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  color: #f87171;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.status-card-error i {
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.status-card-warning-msg {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  color: #fbbf24;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

[data-bs-theme="light"] .status-card-error { color: #dc2626; }
[data-bs-theme="light"] .status-card-warning-msg { color: #d97706; }

/* IIS pool badges */
.status-card-pools {
  padding: 0.5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.pool-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.pool-badge-started {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.pool-badge-stopped {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

[data-bs-theme="light"] .pool-badge-started { color: #059669; }
[data-bs-theme="light"] .pool-badge-stopped { color: #dc2626; }

/* Docker container badges */
.status-card-containers {
  padding: 0.5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.container-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-secondary);
}

/* Card footer */
.status-card-footer {
  padding: 0.625rem 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-elevated);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  min-height: 40px;
}

.status-card-footer .response-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.response-fast {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

.response-slow {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.response-critical {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

[data-bs-theme="light"] .response-fast     { color: #059669; }
[data-bs-theme="light"] .response-slow     { color: #d97706; }
[data-bs-theme="light"] .response-critical { color: #dc2626; }

/* Card action buttons */
.status-card-actions {
  display: flex;
  gap: 0.375rem;
}

.status-card-actions .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

/* Restart button prominence by status */
.status-card-unhealthy .btn-card-restart {
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 2px 8px var(--danger-glow);
  border: none;
}

.status-card-degraded .btn-card-restart {
  border: 1px solid var(--warning);
  color: var(--warning);
  background: transparent;
}

.status-card-healthy .btn-card-restart {
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  background: transparent;
}

/* Restarting state */
.status-card.restarting {
  opacity: 0.7;
  pointer-events: none;
}

.status-card.restarting .status-card-strip {
  background: var(--info);
  animation: shimmer 1.5s infinite;
  background-size: 200% 100%;
  background-image: linear-gradient(90deg, var(--info) 0%, transparent 50%, var(--info) 100%);
}

/* Refresh shimmer */
.status-card.refreshing::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.06), transparent);
  background-size: 200% 100%;
  animation: shimmer 1.2s;
  pointer-events: none;
  z-index: 5;
  border-radius: var(--radius-lg);
}

/* --- Skeleton Cards --- */
.status-card-skeleton {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 180px;
}

.status-card-skeleton .skeleton {
  border-radius: var(--radius-sm);
}

.skel-strip  { height: 3px; }
.skel-header { height: 40px; }
.skel-metric { height: 28px; }
.skel-footer { height: 32px; margin-top: auto; }

/* --- Empty & Error States --- */
.status-empty-state,
.status-error-state {
  text-align: center;
  padding: 3rem 2rem;
  border-radius: var(--radius-xl);
  margin: 1rem 0;
}

.status-empty-state {
  background: var(--bg-surface);
  border: 2px dashed var(--border-color);
}

.status-error-state {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-empty-state i,
.status-error-state i {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 1rem;
}

.status-empty-state i { color: var(--text-muted); }
.status-error-state i { color: var(--danger); }

.status-empty-state h4,
.status-error-state h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.status-empty-state p,
.status-error-state p {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto;
}

/* --- Responsive --- */
@media (max-width: 992px) {
  .status-hero {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .status-hero-right {
    width: 100%;
    justify-content: flex-end;
  }

  .status-controls {
    flex-wrap: wrap;
  }

  .status-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .status-hero-left {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }

  .status-pills {
    width: 100%;
  }

  .status-pill {
    flex: 1;
    justify-content: center;
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
  }

  .status-controls {
    flex-direction: column;
    gap: 0.75rem;
  }

  .status-controls .form-select {
    max-width: 100%;
  }

  .status-controls .status-last-update {
    margin-left: 0;
    text-align: center;
  }

  .status-cards-grid {
    grid-template-columns: 1fr;
  }

  .refresh-timer {
    width: 44px;
    height: 44px;
  }

  .refresh-ring {
    width: 44px;
    height: 44px;
  }
}

/* ========================================================================
   PROFILE MENU & DROPDOWN
   ======================================================================== */

.profile-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.btn-profile {
  background: none;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 0.3rem 0.65rem 0.3rem 0.35rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  border-radius: 100px;
  white-space: nowrap;
}

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

.profile-avatar-ring {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--bg-base), 0 0 0 3px rgba(124, 58, 237, 0.3);
}

.profile-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

/* Dropdown panel */
.profile-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 280px;
  background: var(--bg-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0, 0, 0, 0.05);
  z-index: 1050;
  overflow: visible;
  animation: profileDropIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes profileDropIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.profile-dropdown.show {
  display: block;
}

/* Subtle arrow pointing up */
.profile-dropdown-arrow {
  position: absolute;
  top: -6px;
  right: 18px;
  width: 12px;
  height: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-right: none;
  transform: rotate(45deg);
  z-index: 1;
}

/* User card */
.profile-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1rem 0.85rem;
}

.profile-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.profile-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.profile-card-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.profile-card-email {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.profile-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0 0.75rem;
}

/* Telegram section */
.profile-section {
  padding: 0.75rem 1rem;
}

.profile-section-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-disabled);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.profile-section-label .bi-telegram {
  color: #2AABEE;
  font-size: 0.8rem;
}

/* Generate link code button */
.btn-link-telegram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-link-telegram:hover {
  color: var(--text-primary);
  border-color: var(--primary);
  background: rgba(124, 58, 237, 0.08);
  box-shadow: 0 0 0 1px var(--primary-glow);
}

/* Linked state */
.telegram-linked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.telegram-linked-info {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.telegram-linked-info .bi-check-circle-fill {
  color: var(--success);
  font-size: 0.7rem;
}

.btn-unlink-telegram {
  background: none;
  color: var(--text-disabled);
  border: none;
  padding: 0.2rem 0.4rem;
  font-size: 0.7rem;
  cursor: pointer;
  transition: color var(--transition-fast);
  border-radius: var(--radius-sm);
}

.btn-unlink-telegram:hover {
  color: var(--danger);
}

/* Link code display */
.link-code-display {
  background: var(--bg-base);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  text-align: center;
}

.link-code-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--primary);
  user-select: all;
  text-shadow: 0 0 20px var(--primary-glow);
}

.link-code-hint {
  font-size: 0.68rem;
  color: var(--text-disabled);
  margin-top: 0.3rem;
  line-height: 1.4;
}

.link-code-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.btn-copy-code {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all var(--transition-fast);
}

.btn-copy-code:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.link-code-timer {
  font-size: 0.7rem;
  color: var(--text-disabled);
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
}

/* Responsive */
@media (max-width: 576px) {
  .profile-dropdown {
    width: calc(100vw - 2rem);
    right: -1rem;
  }
  .profile-name {
    display: none;
  }
  .btn-profile {
    padding: 0.3rem;
  }
}

/* ========================================================================
   NOTIFICATION BELL & DROPDOWN
   ======================================================================== */

.notification-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.btn-notification {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast);
  border-radius: var(--radius-sm);
}

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

.notification-badge {
  position: absolute;
  top: 2px;
  right: 0;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  pointer-events: none;
  box-shadow: 0 0 0 2px var(--bg-base);
}

.notification-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-height: 420px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1050;
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.notification-dropdown.show {
  display: flex;
  flex-direction: column;
}

.notification-header {
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  letter-spacing: 0.025em;
}

.notification-list {
  overflow-y: auto;
  max-height: 340px;
  scrollbar-width: thin;
}

.notification-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.notification-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-fast);
  cursor: default;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item:hover {
  background: var(--bg-overlay);
}

.notification-item.unread {
  background: rgba(124, 58, 237, 0.06);
  border-left: 3px solid var(--primary);
  padding-left: calc(1rem - 3px);
}

.notification-icon {
  flex-shrink: 0;
  font-size: 1rem;
  padding-top: 0.1rem;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

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

.notification-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-time {
  font-size: 0.7rem;
  color: var(--text-disabled);
  margin-top: 0.25rem;
}

/* Bell ring animation */
@keyframes bellRing {
  0% { transform: rotate(0); }
  15% { transform: rotate(14deg); }
  30% { transform: rotate(-14deg); }
  45% { transform: rotate(10deg); }
  60% { transform: rotate(-8deg); }
  75% { transform: rotate(4deg); }
  100% { transform: rotate(0); }
}

.bell-ring .btn-notification i {
  animation: bellRing 0.8s ease-in-out;
  display: inline-block;
}

/* Responsive */
@media (max-width: 576px) {
  .notification-dropdown {
    width: calc(100vw - 2rem);
    right: -1rem;
  }
}

/* ========================================================================
   ACTIONS TAB - COMMAND BRIDGE DESIGN
   ======================================================================== */

/* --- Header Bar --- */
.actions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  margin-bottom: 1.25rem;
}

.actions-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.actions-icon-badge {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  box-shadow: 0 4px 16px var(--primary-glow);
  flex-shrink: 0;
}

.actions-icon-badge i {
  font-size: 1.375rem;
  color: white;
}

.actions-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
}

.actions-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0;
}

/* --- Main Split Grid --- */
.actions-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.25rem;
  align-items: start;
}

/* --- Left Config Panel --- */
.actions-config-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 1rem;
}

.actions-section {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.actions-section:hover {
  border-color: var(--border-hover);
}

.actions-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 0.875rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
}

.actions-section-title i {
  color: var(--primary);
}

/* Quick Actions Grid */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.875rem 0.375rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.02em;
}

.quick-action-btn i {
  font-size: 1.375rem;
  color: var(--text-muted);
  transition: all var(--transition-normal);
}

.quick-action-btn:hover {
  background: var(--bg-overlay);
  border-color: var(--primary);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.quick-action-btn:hover i {
  color: var(--primary);
  transform: scale(1.1);
}

.quick-action-btn:active {
  transform: translateY(0);
}

.quick-action-btn.active {
  background: rgba(124, 58, 237, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: inset 0 0 20px rgba(124, 58, 237, 0.1);
}

.quick-action-btn.active i {
  color: var(--primary);
}

/* Form Groups */
.actions-form-group {
  margin-bottom: 1rem;
}

.actions-form-group:last-child {
  margin-bottom: 0;
}

.actions-form-group .form-label i {
  color: var(--primary);
}

/* Mission Briefing */
.actions-briefing {
  padding: 0;
  overflow: hidden;
}

.briefing-bar {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 0.875rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.briefing-bar i {
  color: var(--info);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.briefing-bar .briefing-ready {
  color: var(--success);
}

.briefing-bar .briefing-ready i {
  color: var(--success);
}

/* Launch Button */
.btn-launch {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.125rem 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  border: none;
  border-radius: var(--radius-lg);
  color: white;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 16px var(--primary-glow);
  position: relative;
  overflow: hidden;
}

.btn-launch::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.btn-launch:hover:not(:disabled)::before {
  transform: translateX(100%);
}

.btn-launch:hover:not(:disabled) {
  box-shadow: 0 6px 24px var(--primary-glow), var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-launch:active:not(:disabled) {
  transform: translateY(0);
}

.btn-launch:disabled {
  background: var(--bg-elevated);
  color: var(--text-disabled);
  cursor: not-allowed;
  box-shadow: none;
  border: 1px solid var(--border-color);
}

.btn-launch:disabled .launch-icon {
  background: transparent;
}

.launch-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  font-size: 1.375rem;
}

.launch-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.125rem;
  flex: 1;
}

.launch-text strong {
  font-size: 0.9375rem;
  line-height: 1.2;
}

.launch-text small {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.8;
}

.btn-launch.executing {
  background: linear-gradient(135deg, var(--info) 0%, #0891b2 100%);
  pointer-events: none;
}

.btn-launch.executing .launch-icon i {
  animation: spin 1.5s linear infinite;
}

/* --- Right Terminal Panel --- */
.actions-terminal-panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  min-height: 580px;
  max-height: calc(100vh - 200px);
  transition: border-color var(--transition-normal);
}

.actions-terminal-panel:hover {
  border-color: var(--border-hover);
}

/* Terminal Header */
.actions-terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1.25rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.actions-terminal-title {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.actions-terminal-title i {
  color: var(--success);
}

.actions-terminal-tools {
  display: flex;
  gap: 0.375rem;
}

.terminal-tool-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.875rem;
}

.terminal-tool-btn:hover {
  background: var(--bg-overlay);
  border-color: var(--primary);
  color: var(--primary);
}

.terminal-tool-btn:active {
  transform: scale(0.93);
}

/* Execution Metadata Bar */
.exec-metadata {
  display: flex;
  gap: 1.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.exec-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--text-secondary);
}

.exec-meta-item i {
  color: var(--text-muted);
  font-size: 0.6875rem;
}

.exec-meta-item span {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
}

/* Terminal Output */
.actions-log {
  flex: 1;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  min-height: 350px;
}

.actions-log:empty::before {
  content: '$ Awaiting command execution...\A\ASelect an action and instance, then press Execute.';
  color: var(--text-muted);
  font-style: italic;
  opacity: 0.5;
  white-space: pre-wrap;
}

[data-bs-theme="light"] .actions-log:empty::before {
  color: var(--text-secondary);
}

/* Recent Operations Footer */
.recent-ops {
  border-top: 1px solid var(--border-color);
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.recent-ops-header {
  padding: 0.625rem 1.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.recent-ops-list {
  max-height: 130px;
  overflow-y: auto;
}

.recent-op-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.75rem;
  transition: background var(--transition-fast);
}

.recent-op-item:last-child {
  border-bottom: none;
}

.recent-op-item:hover {
  background: var(--bg-overlay);
}

.recent-op-left {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  flex: 1;
}

.recent-op-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-overlay);
  flex-shrink: 0;
  font-size: 0.6875rem;
}

.recent-op-icon.op-success { color: var(--success); }
.recent-op-icon.op-error   { color: var(--danger); }
.recent-op-icon.op-pending { color: var(--warning); }
.recent-op-icon.op-running { color: var(--info); }

.recent-op-name {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-op-target {
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  margin-left: 0.375rem;
}

.recent-op-time {
  color: var(--text-disabled);
  font-size: 0.6875rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- Responsive --- */
@media (max-width: 1200px) {
  .actions-grid {
    grid-template-columns: 1fr;
  }

  .actions-config-panel {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .actions-briefing {
    grid-column: 1 / -1;
  }

  .btn-launch {
    grid-column: 1 / -1;
  }

  .actions-terminal-panel {
    min-height: 450px;
    max-height: 600px;
  }
}

@media (max-width: 768px) {
  .actions-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
  }

  .actions-header-right {
    align-self: flex-end;
  }

  .actions-config-panel {
    grid-template-columns: 1fr;
  }

  .quick-actions-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .exec-metadata {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .actions-terminal-panel {
    min-height: 350px;
    max-height: 500px;
  }

  .actions-log {
    min-height: 250px;
  }
}

@media (max-width: 576px) {
  .actions-title {
    font-size: 1.125rem;
  }

  .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quick-action-btn {
    padding: 0.75rem 0.375rem;
  }

  .quick-action-btn i {
    font-size: 1.125rem;
  }

  .btn-launch {
    padding: 1rem;
  }

  .launch-icon {
    width: 36px;
    height: 36px;
    font-size: 1.125rem;
  }
}

/* ========================================================================
   BACKUP TAB - DATABASE UPLOAD DESIGN
   ======================================================================== */

/* Backup Icon Badge (Green Theme) */
.backup-icon-badge {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  box-shadow: 0 4px 16px var(--success-glow);
  flex-shrink: 0;
}

.backup-icon-badge i {
  font-size: 1.375rem;
  color: white;
}

/* Success Launch Button (Green Gradient) */
.btn-launch-success {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  box-shadow: 0 4px 16px var(--success-glow);
}

.btn-launch-success:hover:not(:disabled) {
  box-shadow: 0 6px 24px var(--success-glow), var(--shadow-glow-success);
}

.btn-launch-success.uploading {
  background: linear-gradient(135deg, var(--info) 0%, #0891b2 100%);
  pointer-events: none;
}

.btn-launch-success.uploading .launch-icon i {
  animation: spin 1.5s linear infinite;
}

/* Workflow Progress Indicator */
.backup-workflow {
  padding: 1rem 1.25rem;
}

.workflow-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
}

.workflow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
}

.workflow-step-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  font-size: 1.125rem;
  transition: all var(--transition-normal);
}

.workflow-step-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color var(--transition-normal);
}

/* Workflow connector line */
.workflow-connector {
  flex: 1;
  height: 2px;
  background: var(--border-color);
  margin: 0 0.5rem;
  margin-bottom: 1.5rem;
  transition: background var(--transition-normal);
}

/* Active workflow step */
.workflow-step.active .workflow-step-icon {
  background: linear-gradient(135deg, var(--info) 0%, #0891b2 100%);
  border-color: var(--info);
  color: white;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.4);
  animation: pulse-workflow 2s ease-in-out infinite;
}

.workflow-step.active .workflow-step-label {
  color: var(--info);
}

.workflow-step.active ~ .workflow-connector {
  background: var(--border-color);
}

/* Completed workflow step */
.workflow-step.completed .workflow-step-icon {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  border-color: var(--success);
  color: white;
  box-shadow: 0 0 12px var(--success-glow);
}

.workflow-step.completed .workflow-step-label {
  color: var(--success);
}

.workflow-step.completed ~ .workflow-connector {
  background: linear-gradient(90deg, var(--success) 0%, var(--border-color) 100%);
}

/* When a step is completed, the connector before it (previous) should be green */
.workflow-connector:has(+ .workflow-step.completed),
.workflow-connector:has(+ .workflow-step.active) {
  background: var(--success);
}

/* Error workflow step */
.workflow-step.error .workflow-step-icon {
  background: linear-gradient(135deg, var(--danger) 0%, #b91c1c 100%);
  border-color: var(--danger);
  color: white;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.workflow-step.error .workflow-step-label {
  color: var(--danger);
}

/* Pulse animation for active step */
@keyframes pulse-workflow {
  0%, 100% {
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.4);
  }
  50% {
    box-shadow: 0 0 24px rgba(6, 182, 212, 0.6);
  }
}

/* ========================================================================
   LOGS TAB - AUDIT INTELLIGENCE (Amber Theme)
   ======================================================================== */

/* Amber Icon Badge */
.logs-icon-badge {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
  flex-shrink: 0;
}
.logs-icon-badge i {
  font-size: 1.375rem;
  color: white;
}

/* Amber Launch Button */
.logs-btn-launch {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25) !important;
}
.logs-btn-launch .launch-icon {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
}
.logs-btn-launch:hover:not(:disabled) {
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.35) !important;
}

/* Toggle Switch */
.logs-toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.logs-toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
}
.logs-toggle-label {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all var(--transition-normal);
  margin: 0;
}
.logs-toggle-slider {
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all var(--transition-normal);
}
.logs-toggle-input:checked + .logs-toggle-label {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
}
.logs-toggle-input:checked + .logs-toggle-label .logs-toggle-slider {
  transform: translateX(20px);
  background: #f59e0b;
}
.logs-toggle-label:hover {
  border-color: var(--border-hover);
}

/* Search Metadata Strip */
.logs-metadata {
  padding: 0.75rem 1.5rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.8125rem;
}
.logs-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
}
.logs-meta-item i {
  color: #f59e0b;
  font-size: 0.875rem;
}
.logs-meta-item span {
  font-weight: 500;
  color: var(--text-primary);
}

/* Results Area */
.logs-results-area {
  flex: 1;
  overflow: auto;
  background: var(--bg-base);
}

/* Logs Table */
.logs-table {
  min-width: 820px;
  table-layout: fixed;
}
.logs-table colgroup .col-time    { width: 80px; }
.logs-table colgroup .col-user    { width: 90px; }
.logs-table colgroup .col-ip      { width: 95px; }
.logs-table colgroup .col-action  { width: 170px; }
.logs-table colgroup .col-status  { width: 75px; }
.logs-table colgroup .col-details { width: auto; }

.logs-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.625rem 0.5rem;
  border: none;
  z-index: 10;
  white-space: nowrap;
}
.logs-table thead th i {
  opacity: 0.6;
}
.logs-table tbody tr {
  transition: all var(--transition-normal);
  border-left: 3px solid transparent;
}
.logs-table tbody tr:not(.logs-empty-state):hover {
  background: var(--bg-elevated);
  border-left-color: #f59e0b;
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}
.logs-table tbody td {
  padding: 0.5rem;
  border: none;
  color: var(--text-primary);
  font-size: 0.8125rem;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logs-table tbody td:first-child {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  padding: 0.5rem 0.625rem;
}
.log-date {
  display: block;
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.log-time {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.logs-table tbody td.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Empty state */
.logs-empty-state td {
  border: 1px dashed var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  background: var(--bg-surface) !important;
}

/* Pagination Strip */
.logs-pagination-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-color);
  gap: 1rem;
}
.logs-pagination-info {
  color: var(--text-muted);
  font-size: 0.875rem;
}
.logs-pagination-controls {
  display: flex;
  gap: 0.5rem;
}
.logs-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-normal);
}
.logs-nav-btn:hover:not(:disabled) {
  background: var(--bg-elevated);
  border-color: #f59e0b;
  color: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}
.logs-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===================================================================
   DASHBOARD TAB - Pulse Bento
   Accent: Cyan (#06b6d4) - monitoring/overview
   =================================================================== */

/* --- Tactical Status Bar --- */
.dash-status-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--info);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  z-index: 10;
}
.dash-bar-nominal { border-left-color: var(--success); box-shadow: 0 0 20px var(--success-glow); }
.dash-bar-degraded { border-left-color: var(--warning); box-shadow: 0 0 20px var(--warning-glow); }
.dash-bar-critical { border-left-color: var(--danger); box-shadow: 0 0 20px var(--danger-glow); animation: blink 1.5s ease-in-out infinite; }
.dash-bar-unknown { border-left-color: #64748b; }

.dash-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 220px;
}
.dash-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--info);
  flex-shrink: 0;
}
.dash-bar-nominal .dash-status-dot { background: var(--success); box-shadow: 0 0 8px var(--success); }
.dash-bar-degraded .dash-status-dot { background: var(--warning); box-shadow: 0 0 8px var(--warning); animation: pulse 2s infinite; }
.dash-bar-critical .dash-status-dot { background: var(--danger); box-shadow: 0 0 8px var(--danger); animation: pulse 1s infinite; }

.dash-status-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.dash-status-metrics {
  display: flex;
  gap: 0.75rem;
  flex: 1;
  justify-content: center;
}
.dash-metric-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.dash-metric-badge:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.dash-badge-healthy {
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
}
.dash-badge-degraded {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.25);
}
.dash-badge-unhealthy {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
}
.dash-status-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* --- Bento Grid --- */
.dash-bento-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 160px;
  gap: 1rem;
}

/* --- Card Base --- */
.dash-card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  animation: fadeSlideIn 0.4s ease-out both;
}
.dash-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem 0;
  gap: 0.5rem;
}
.dash-card-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.dash-card-title i {
  color: #06b6d4;
  font-size: 0.875rem;
}

/* --- Health Score Card (2×2) --- */
.dash-card-score {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  animation-delay: 50ms;
}
.dash-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
}
.dash-score-ring {
  position: relative;
  width: 120px;
  height: 120px;
}
.dash-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.dash-ring-bg {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 6;
}
.dash-ring-progress {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.33, 1, 0.68, 1), stroke 0.3s;
}
.dash-ring-good { stroke: var(--success); filter: drop-shadow(0 0 6px var(--success-glow)); }
.dash-ring-warn { stroke: var(--warning); filter: drop-shadow(0 0 6px var(--warning-glow)); }
.dash-ring-bad { stroke: var(--danger); filter: drop-shadow(0 0 6px var(--danger-glow)); }

.dash-score-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.dash-score-meta {
  text-align: center;
}
.dash-score-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.dash-score-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}
.dash-score-good { border-color: rgba(16, 185, 129, 0.3); box-shadow: 0 0 30px rgba(16, 185, 129, 0.08); }
.dash-score-warn { border-color: rgba(245, 158, 11, 0.3); box-shadow: 0 0 30px rgba(245, 158, 11, 0.08); }
.dash-score-bad { border-color: rgba(239, 68, 68, 0.3); box-shadow: 0 0 30px rgba(239, 68, 68, 0.08); }

/* --- Infrastructure Card (4×2) --- */
.dash-card-infra {
  grid-column: span 4;
  grid-row: span 2;
  animation-delay: 100ms;
}
.dash-heatmap-legend {
  display: flex;
  gap: 0.75rem;
  font-size: 0.6875rem;
  color: var(--text-muted);
}
.dash-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.dash-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
.dash-dot-healthy { background: var(--success); }
.dash-dot-degraded { background: var(--warning); }
.dash-dot-unhealthy { background: var(--danger); }
.dash-dot-unknown { background: #64748b; }

.dash-infra-list {
  padding: 0.25rem 0.75rem 0.5rem;
  overflow-y: auto;
  max-height: calc(100% - 40px);
}
.dash-infra-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 100%;
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.dash-infra-empty i {
  font-size: 2rem;
  opacity: 0.4;
}

/* Group headers within the infra list */
.dash-infra-group {
  margin-bottom: 0.25rem;
}
.dash-infra-group-header {
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #06b6d4;
  padding: 0.375rem 0 0.125rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.125rem;
}

/* Instance rows */
.dash-infra-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.375rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.dash-infra-row:hover {
  background: var(--bg-elevated);
}
.dash-infra-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Status dot */
.dash-infra-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dash-dot-healthy { background: var(--success); box-shadow: 0 0 4px var(--success-glow); }
.dash-dot-degraded { background: var(--warning); box-shadow: 0 0 4px var(--warning-glow); }
.dash-dot-unhealthy { background: var(--danger); box-shadow: 0 0 4px var(--danger-glow); }
.dash-dot-unknown { background: #64748b; }

/* Instance name */
.dash-infra-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

/* Memory bar */
.dash-infra-mem-wrap {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex: 1;
  min-width: 0;
}
.dash-infra-mem-bar {
  flex: 1;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  overflow: hidden;
  min-width: 40px;
}
.dash-infra-mem-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease-out;
}
.dash-fill-healthy { background: var(--success); }
.dash-fill-degraded { background: var(--warning); }
.dash-fill-unhealthy { background: var(--danger); }
.dash-fill-unknown { background: #64748b; }

.dash-infra-mem-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 28px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Response time badge */
.dash-infra-rt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.5625rem;
  color: var(--text-muted);
  min-width: 36px;
  text-align: right;
  flex-shrink: 0;
}

.dash-infra-chips {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.dash-infra-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.5625rem;
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.08);
  padding: 0.0625rem 0.3rem;
  border-radius: 3px;
}

.dash-infra-chip.dash-chip-warn {
  color: var(--warning);
  background: rgba(245, 158, 11, 0.1);
}

/* --- Quick Actions Card (2×2) --- */
.dash-card-actions {
  grid-column: span 2;
  grid-row: span 2;
  animation-delay: 150ms;
  display: flex;
  flex-direction: column;
}
.dash-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.375rem;
  padding: 0.5rem 0.75rem 0.625rem;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.dash-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.4rem 0.375rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0;
}
.dash-action-btn i {
  font-size: 1.125rem;
  color: #06b6d4;
}
.dash-action-btn span {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.dash-action-btn:hover {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
}
.dash-action-btn:hover i { color: #22d3ee; }
.dash-action-btn:active { transform: scale(0.96); }

.dash-action-nav i { color: var(--text-muted); }
.dash-action-nav:hover i { color: var(--primary); }
.dash-action-nav:hover { border-color: rgba(124, 58, 237, 0.3); background: rgba(124, 58, 237, 0.08); }

.dash-actions-empty {
  grid-column: span 2;
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* --- System Metrics Card (2×2) NEW --- */
.dash-card-metrics {
  grid-column: span 2;
  grid-row: span 2;
  animation-delay: 175ms;
}
.dash-metrics-body {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
}
.dash-metric-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
}
.dash-metric-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
}
.dash-metric-label i {
  color: #06b6d4;
  font-size: 0.75rem;
}
.dash-metric-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 48px;
}
.dash-metric-bar-wrap {
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}
.dash-metric-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease-out;
  background: var(--success);
}
.dash-metric-bar-cyan { background: #06b6d4; }
.dash-metric-bar-warn { background: var(--warning); }
.dash-metric-bar-purple { background: var(--primary); }

/* --- Activity Stream (2×2) --- */
.dash-card-activity {
  grid-column: span 2;
  grid-row: span 2;
  animation-delay: 200ms;
}
.dash-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #06b6d4;
  box-shadow: 0 0 6px #06b6d4;
  animation: pulse 2s infinite;
}
.dash-activity-list {
  overflow-y: auto;
  max-height: calc(100% - 40px);
  padding: 0.5rem 0;
}
.dash-activity-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 200px;
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.dash-activity-empty i { font-size: 1.5rem; opacity: 0.4; }

.dash-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}
.dash-activity-item:hover { background: var(--bg-elevated); }
.dash-activity-item:last-child { border-bottom: none; }

.dash-activity-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
  margin-top: 1px;
}
.dash-act-success { color: var(--success); }
.dash-act-warning { color: var(--warning); }
.dash-act-danger { color: var(--danger); }
.dash-act-info { color: #06b6d4; }

.dash-activity-content {
  flex: 1;
  min-width: 0;
}
.dash-activity-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-activity-detail {
  font-size: 0.6875rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-activity-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.625rem;
  color: var(--text-disabled);
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- Group Summary Cards (6×1 full width) --- */
.dash-card-groups {
  grid-column: span 6;
  grid-row: span 1;
  animation-delay: 250ms;
}
.dash-groups-row {
  display: flex;
  gap: 0.5rem;
  padding: 0 0.75rem 0.75rem;
  overflow-x: auto;
}
.dash-group-card {
  flex: 1;
  min-width: 100px;
  padding: 0.625rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-align: center;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.dash-group-good { border-top: 2px solid var(--success); }
.dash-group-warn { border-top: 2px solid var(--warning); }
.dash-group-bad { border-top: 2px solid var(--danger); }

.dash-group-name {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.dash-group-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.dash-group-bar {
  height: 3px;
  background: var(--border-color);
  border-radius: 2px;
  margin-top: 0.375rem;
  overflow: hidden;
}
.dash-group-fill {
  height: 100%;
  background: var(--success);
  border-radius: 2px;
  transition: width 0.6s ease-out;
}
.dash-group-warn .dash-group-fill { background: var(--warning); }
.dash-group-bad .dash-group-fill { background: var(--danger); }

/* --- Light Theme Overrides --- */
[data-bs-theme="light"] .dash-action-btn:hover { background: rgba(6, 182, 212, 0.08); }
[data-bs-theme="light"] .dash-infra-group-header { color: #0891b2; }

/* --- Responsive --- */
@media (max-width: 1200px) {
  .dash-bento-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .dash-card-infra { grid-column: span 4; }
  .dash-card-score { grid-column: span 2; grid-row: span 2; }
  .dash-card-actions { grid-column: span 2; }
  .dash-card-metrics { grid-column: span 2; }
  .dash-card-activity { grid-column: span 2; grid-row: span 2; }
  .dash-card-groups { grid-column: span 4; }
}

@media (max-width: 768px) {
  .dash-status-bar {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .dash-status-indicator { min-width: auto; }
  .dash-status-metrics { flex-wrap: wrap; gap: 0.375rem; }

  .dash-bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .dash-card-score,
  .dash-card-infra,
  .dash-card-actions,
  .dash-card-metrics,
  .dash-card-activity,
  .dash-card-groups {
    grid-column: span 1;
    grid-row: span 1;
  }
  .dash-card-score { min-height: 200px; }
  .dash-card-infra { min-height: 280px; }
  .dash-card-activity { min-height: 300px; }
  .dash-card-metrics { min-height: 220px; }

  .dash-actions-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 576px) {
  .dash-actions-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ========================================================================
   APPROVAL QUEUE (Maker/Checker)
   ======================================================================== */

.approval-queue-section {
  margin: 0 1.5rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.approval-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-fast);
}

.approval-queue-header:hover {
  background: var(--bg-elevated);
}

.approval-queue-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.approval-queue-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #fff;
  background: var(--danger);
  border-radius: 10px;
}

.approval-queue-chevron {
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.approval-queue-section.collapsed .approval-queue-chevron {
  transform: rotate(-90deg);
}

.approval-queue-section.collapsed .approval-queue-body {
  display: none;
}

.approval-queue-body {
  padding: 0 1.25rem 1.25rem;
}

.approval-queue-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.approval-tab {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.approval-tab:hover {
  color: var(--text-secondary);
}

.approval-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.approval-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.approval-empty-msg {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Approval Cards */
.approval-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  transition: border-color var(--transition-fast);
}

.approval-card:hover {
  border-color: var(--border-hover);
}

.approval-card.escalated {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 12px var(--danger-glow);
}

.approval-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.approval-label {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.approval-escalated {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--danger);
  background: rgba(239, 68, 68, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  animation: pulse-urgent 2s ease-in-out infinite;
}

@keyframes pulse-urgent {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.approval-card-body {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.approval-detail {
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.approval-detail i {
  font-size: 0.75rem;
  opacity: 0.7;
}

.approval-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-approve, .btn-deny {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-approve {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.btn-approve:hover {
  background: rgba(16, 185, 129, 0.3);
}

.btn-deny {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.btn-deny:hover {
  background: rgba(239, 68, 68, 0.3);
}

.approval-waiting {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

/* My Requests */
.my-request-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.my-request-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.my-request-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.my-request-instance {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.my-request-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.my-request-age {
  font-size: 0.75rem;
  color: var(--text-disabled);
}

.approval-approver {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-cancel-sm {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.btn-cancel-sm:hover {
  color: var(--danger);
}

/* My Requests Pagination */
.approval-my-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.approval-my-pagination-controls {
  display: flex;
  gap: 0.5rem;
}

.approval-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.approval-nav-btn:hover:not(:disabled) {
  background: var(--bg-elevated);
  border-color: #f59e0b;
  color: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.approval-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Approval Status Badges */
.approval-status {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.approval-status.pending {
  color: var(--warning);
  background: rgba(245, 158, 11, 0.15);
}

.approval-status.approved, .approval-status.executing {
  color: var(--info);
  background: rgba(6, 182, 212, 0.15);
}

.approval-status.completed {
  color: var(--success);
  background: rgba(16, 185, 129, 0.15);
}

.approval-status.denied, .approval-status.failed {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.15);
}

.approval-status.expired, .approval-status.cancelled {
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.1);
}

/* ── Break-Glass Emergency Override ─────────────────────────────── */

.btn-breakglass {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--danger);
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-breakglass:hover {
  background: rgba(239, 68, 68, 0.25);
  box-shadow: var(--shadow-glow-danger);
}

.breakglass-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.breakglass-modal {
  background: var(--bg-elevated);
  border: 1px solid var(--danger);
  border-radius: 16px;
  padding: 28px;
  width: 420px;
  max-width: 90vw;
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.2);
}

.breakglass-modal h3 {
  color: var(--danger);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breakglass-modal .subtitle {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 0 0 20px;
}

.breakglass-field {
  margin-bottom: 16px;
}

.breakglass-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.breakglass-field textarea,
.breakglass-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  resize: vertical;
}

.breakglass-field textarea:focus,
.breakglass-field input:focus {
  outline: none;
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.breakglass-otp-input {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.6rem !important;
  text-align: center;
  letter-spacing: 0.3em;
  padding: 12px !important;
}

.breakglass-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.08);
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin-bottom: 16px;
}

.breakglass-countdown .timer {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--danger);
  font-size: 1rem;
}

.breakglass-resend {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}

.btn-resend-otp {
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--info);
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--info);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-resend-otp:hover {
  background: rgba(59, 130, 246, 0.25);
}
.btn-resend-otp:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-sms-fallback {
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--warning);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-sms-fallback:hover {
  background: rgba(245, 158, 11, 0.25);
}
.btn-sms-fallback:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.breakglass-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.breakglass-actions .btn-submit {
  padding: 8px 20px;
  font-size: 0.82rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  background: var(--danger);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}
.breakglass-actions .btn-submit:hover {
  background: #dc2626;
  box-shadow: var(--shadow-glow-danger);
}
.breakglass-actions .btn-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.breakglass-actions .btn-cancel {
  padding: 8px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}
.breakglass-actions .btn-cancel:hover {
  background: var(--bg-surface);
}

.breakglass-status {
  text-align: center;
  padding: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.breakglass-status.error {
  color: var(--danger);
}

.breakglass-status.success {
  color: var(--success);
}

.approval-card .breakglass-row {
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  margin-top: 6px;
}

/* ========================================================================
   BIRT REPORT ANALYTICS - Aurora Glass Style
   Matches status-hero / approval-queue-section patterns
   ======================================================================== */

.birt-analytics-section {
  margin-top: 1.25rem;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

/* Header - matches approval-queue-header */
.birt-analytics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-fast);
}

.birt-analytics-header:hover {
  background: var(--bg-elevated);
}

.birt-analytics-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.birt-analytics-title i {
  color: var(--primary);
  font-size: 1.125rem;
}

.birt-analytics-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.birt-analytics-chevron {
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.birt-analytics-section.collapsed .birt-analytics-chevron {
  transform: rotate(-90deg);
}

.birt-analytics-section.collapsed .birt-analytics-body {
  display: none;
}

.birt-analytics-controls {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  flex-wrap: wrap;
}

.birt-analytics-controls .btn-check + .btn {
  font-size: 0.75rem;
  padding: 0.2rem 0.625rem;
  border-radius: var(--radius-sm);
  border-color: var(--border-color);
  color: var(--text-muted);
  background: transparent;
}

.birt-analytics-controls .btn-check:checked + .btn {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.birt-analytics-controls .btn-outline-info {
  border-color: var(--border-color);
  color: var(--text-muted);
}

.birt-analytics-controls .btn-outline-info:hover {
  background: var(--bg-elevated);
  color: var(--info);
}

/* Body */
.birt-analytics-body {
  padding: 1.25rem;
}

/* Summary stat cards grid */
.birt-summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.birt-stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  text-align: center;
  transition: all var(--transition-fast);
  width: 150px;
  flex: 0 0 150px;
}

.birt-stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.birt-stat-card i {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
  display: block;
}

.birt-stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.birt-stat-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 500;
}

.birt-stat-primary i { color: var(--primary); }
.birt-stat-info i    { color: var(--info); }
.birt-stat-success i { color: var(--success); }
.birt-stat-warning i { color: var(--warning); }
.birt-stat-danger i  { color: var(--danger); }

/* Filters row */
.birt-filters {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.birt-filters .form-select,
.birt-filters .form-control,
.birt-filters .input-group-text {
  background: var(--bg-elevated);
  border-color: var(--border-color);
  color: var(--text-primary);
  font-size: 0.8125rem;
}

/* Tabs - matches approval-queue-tabs pattern */
.birt-analytics-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.birt-tab {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.birt-tab:hover {
  color: var(--text-secondary);
}

.birt-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Table - Aurora theme */
.birt-table {
  width: 100%;
  font-size: 0.8125rem;
  border-collapse: separate;
  border-spacing: 0;
}

.birt-table thead th {
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
}

.birt-table thead th:hover {
  color: var(--text-primary);
}

.birt-table tbody td {
  padding: 0.5rem 0.75rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.birt-table tbody tr:hover td {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

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

/* Pagination */
.birt-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.birt-pagination .page-link {
  background: var(--bg-elevated);
  border-color: var(--border-color);
  color: var(--text-muted);
  font-size: 0.75rem;
}

.birt-pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.birt-pagination .page-link:hover {
  background: var(--bg-overlay);
  color: var(--text-primary);
}

/* Loading / empty state messages */
.birt-state-msg {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .birt-analytics-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .birt-analytics-controls {
    width: 100%;
  }
  .birt-stat-card {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }
  .birt-analytics-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .birt-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }
}
