/* ============================================================
   DashMon — Premium Monitoring Dashboard CSS
   Inspired by: Linear.app · Vercel · Stripe Dashboard
   ============================================================ */

/* ── CSS Custom Properties ────────────────────────────────── */
:root {
  /* Brand */
  --primary:        #6366f1;
  --primary-hover:  #4f46e5;
  --primary-light:  #818cf8;
  --primary-glow:   rgba(99,102,241,0.25);

  /* Semantic */
  --success:        #10b981;
  --success-dark:   #059669;
  --warning:        #f59e0b;
  --warning-dark:   #d97706;
  --danger:         #ef4444;
  --danger-dark:    #dc2626;
  --info:           #06b6d4;

  /* Sidebar */
  --sidebar-bg:           #0284c7;
  --sidebar-bg-alpha:     rgba(15,17,23,0.92);
  --sidebar-hover:        rgba(255,255,255,0.06);
  --sidebar-active-bg:    rgba(99,102,241,0.12);
  --sidebar-active:       #818cf8;
  --sidebar-text:         #64748b;
  --sidebar-text-hover:   #cbd5e1;
  --sidebar-text-active:  #e2e8f0;
  --sidebar-width:        260px;
  --sidebar-collapsed:    72px;

  /* Surface */
  --navbar-bg:      rgba(255,255,255,0.72);
  --navbar-height:  64px;
  --content-bg:     #f8fafc;
  --card-bg:        #ffffff;
  --text-primary:   #0f172a;
  --text-secondary: #64748b;
  --text-muted:     #94a3b8;
  --border-color:   #e2e8f0;
  --border-subtle:  rgba(0,0,0,0.04);

  /* Shadows (layered) */
  --shadow-xs:   0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:      0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-md:   0 10px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
  --shadow-lg:   0 20px 40px -12px rgba(0,0,0,0.12), 0 8px 16px -8px rgba(0,0,0,0.06);
  --shadow-xl:   0 25px 50px -12px rgba(0,0,0,0.18);
  --shadow-glow: 0 0 40px rgba(99,102,241,0.15);

  /* Radii */
  --radius:    10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 100px;

  /* Transitions */
  --ease:      cubic-bezier(.4,0,.2,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --transition: all 0.2s var(--ease);
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--content-bg);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.011em;
}

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

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── App Wrapper ──────────────────────────────────────────── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ──────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #0ea5e9, #0284c7);
  color: var(--sidebar-text);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease);
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid rgba(255,255,255,0.06);
}

/* Subtle gradient overlay on sidebar */
.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(99,102,241,0.04) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.sidebar > * { position: relative; z-index: 1; }

.sidebar-header {
  padding: 22px 20px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.02em;
  text-align: center;
}

.sidebar-logo i {
  color: var(--primary);
  font-size: 1.35rem;
  filter: drop-shadow(0 0 8px rgba(99,102,241,0.3));
}

.logo-highlight {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-close {
  background: none;
  border: none;
  color: var(--sidebar-text);
  font-size: 1.1rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: var(--transition);
}
.sidebar-close:hover {
  background: var(--sidebar-hover);
  color: white;
}

.sidebar-nav {
  list-style: none;
  padding: 8px 0;
  margin: 0;
  flex: 1;
}

.nav-section {
  padding: 18px 20px 6px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(100,116,139,0.6);
  user-select: none;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  color: var(--sidebar-text);
  text-decoration: none;
  transition: all 0.2s var(--ease);
  gap: 12px;
  font-size: 0.875rem;
  font-weight: 450;
  border-left: 3px solid transparent;
  margin: 1px 8px;
  border-radius: 0 var(--radius) var(--radius) 0;
  position: relative;
}

.sidebar-nav .nav-link:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-hover);
}

.sidebar-nav .nav-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active);
  border-left-color: var(--primary);
  font-weight: 500;
}

.sidebar-nav .nav-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 12px rgba(99,102,241,0.4);
}

.sidebar-nav .nav-link i {
  width: 20px;
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.7;
  transition: var(--transition);
}

.sidebar-nav .nav-link:hover i,
.sidebar-nav .nav-link.active i {
  opacity: 1;
}

.sidebar-footer {
  padding: 16px 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: auto;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius);
  transition: var(--transition);
}
.sidebar-user:hover {
  background: var(--sidebar-hover);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

.user-name { color: #e2e8f0; font-size: 0.85rem; font-weight: 500; }
.user-role { color: var(--sidebar-text); font-size: 0.7rem; margin-top: 1px; }

/* ── MAIN CONTENT ─────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  transition: margin-left 0.35s var(--ease);
}

/* ── TOP NAVBAR ───────────────────────────────────────────── */
.top-navbar {
  height: var(--navbar-height);
  background: var(--navbar-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-left { display: flex; align-items: center; gap: 16px; }
.navbar-right { display: flex; align-items: center; gap: 12px; }

.page-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.sidebar-toggle {
  color: var(--text-secondary);
  font-size: 1.15rem;
  padding: 6px 10px;
  text-decoration: none;
  border-radius: var(--radius);
  transition: var(--transition);
  border: none;
  background: none;
}
.sidebar-toggle:hover {
  background: rgba(0,0,0,0.04);
  color: var(--text-primary);
}

.navbar-date {
  color: var(--text-muted);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 450;
}

/* Navbar buttons */
.navbar-right .btn-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px;
  border-radius: var(--radius);
  transition: var(--transition);
  position: relative;
  border: none;
  background: none;
  font-size: 1.1rem;
}
.navbar-right .btn-link:hover {
  background: rgba(0,0,0,0.04);
  color: var(--text-primary);
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 0.55rem;
  padding: 2px 5px;
  min-width: 16px;
  text-align: center;
  font-weight: 600;
  background: var(--danger);
  color: white;
  border-radius: var(--radius-pill);
  border: 2px solid white;
  line-height: 1;
}

/* ── PAGE CONTENT ─────────────────────────────────────────── */
.page-content {
  padding: 28px;
  animation: fadeSlideUp 0.4s var(--ease);
}

/* ── KPI CARDS ────────────────────────────────────────────── */
.kpi-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
  cursor: default;
}

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

/* Gradient top accent */
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
}

.kpi-card.kpi-primary::before  { background: linear-gradient(90deg, #6366f1, #818cf8); }
.kpi-card.kpi-success::before  { background: linear-gradient(90deg, #10b981, #34d399); }
.kpi-card.kpi-warning::before  { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.kpi-card.kpi-danger::before   { background: linear-gradient(90deg, #ef4444, #f87171); }
.kpi-card.kpi-info::before     { background: linear-gradient(90deg, #06b6d4, #22d3ee); }

/* Colored ambient glow on hover */
.kpi-card.kpi-primary:hover  { box-shadow: var(--shadow-md), 0 0 30px rgba(99,102,241,0.08); }
.kpi-card.kpi-success:hover  { box-shadow: var(--shadow-md), 0 0 30px rgba(16,185,129,0.08); }
.kpi-card.kpi-warning:hover  { box-shadow: var(--shadow-md), 0 0 30px rgba(245,158,11,0.08); }
.kpi-card.kpi-danger:hover   { box-shadow: var(--shadow-md), 0 0 30px rgba(239,68,68,0.08); }
.kpi-card.kpi-info:hover     { box-shadow: var(--shadow-md), 0 0 30px rgba(6,182,212,0.08); }

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

.kpi-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition: transform 0.3s var(--ease-spring);
}
.kpi-card:hover .kpi-icon { transform: scale(1.1) rotate(-4deg); }

.kpi-icon.icon-primary { background: rgba(99,102,241,0.1); color: var(--primary); }
.kpi-icon.icon-success { background: rgba(16,185,129,0.1); color: var(--success); }
.kpi-icon.icon-warning { background: rgba(245,158,11,0.1); color: var(--warning); }
.kpi-icon.icon-danger  { background: rgba(239,68,68,0.1);  color: var(--danger); }
.kpi-icon.icon-info    { background: rgba(6,182,212,0.1);  color: var(--info); }

.kpi-value {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 8px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}
.kpi-trend.up   { color: var(--success-dark); background: rgba(16,185,129,0.08); }
.kpi-trend.down { color: var(--danger-dark);  background: rgba(239,68,68,0.08); }
.kpi-trend.stable { color: var(--text-muted); background: rgba(0,0,0,0.04); }

/* ── DASHBOARD CARDS ──────────────────────────────────────── */
.dashboard-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease);
}
.dashboard-card:hover {
  box-shadow: var(--shadow);
}

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

.card-header-custom h6 {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.card-body-custom {
  padding: 22px 24px;
}

/* ── RAG BADGES ───────────────────────────────────────────── */
.rag-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.rag-green { background: rgba(16,185,129,0.1); color: var(--success-dark); }
.rag-amber { background: rgba(245,158,11,0.1); color: var(--warning-dark); }
.rag-red   { background: rgba(239,68,68,0.1);  color: var(--danger-dark); }

.rag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rag-dot.green {
  background: var(--success);
  box-shadow: 0 0 6px rgba(16,185,129,0.4);
}
.rag-dot.amber {
  background: var(--warning);
  box-shadow: 0 0 6px rgba(245,158,11,0.4);
}
.rag-dot.red {
  background: var(--danger);
  box-shadow: 0 0 6px rgba(239,68,68,0.4);
  animation: ragPulse 2s infinite;
}

@keyframes ragPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(239,68,68,0.4); }
  50%      { box-shadow: 0 0 12px rgba(239,68,68,0.6); }
}

/* ── TABLES ───────────────────────────────────────────────── */
.dashboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.dashboard-table th {
  background: rgba(248,250,252,0.8);
  padding: 12px 16px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  white-space: nowrap;
}

.dashboard-table td {
  padding: 14px 16px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(226,232,240,0.5);
  color: var(--text-primary);
  transition: background 0.15s var(--ease);
}

.dashboard-table tbody tr {
  transition: background 0.15s var(--ease);
}

.dashboard-table tbody tr:hover {
  background: rgba(99,102,241,0.03);
}

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

/* ── CHARTS ───────────────────────────────────────────────── */
.chart-container {
  position: relative;
  width: 100%;
  padding: 8px 16px 16px;
}

.chart-container canvas {
  max-height: 350px;
}

/* ── GAUGE ────────────────────────────────────────────────── */
.gauge-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
}

.gauge-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.gauge-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ── PROGRESS BARS ────────────────────────────────────────── */
.progress-custom {
  height: 6px;
  border-radius: 3px;
  background: rgba(0,0,0,0.05);
  overflow: hidden;
}

.progress-bar-custom {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s var(--ease);
}

.progress-bar-custom.green { background: linear-gradient(90deg, #10b981, #34d399); }
.progress-bar-custom.amber { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.progress-bar-custom.red   { background: linear-gradient(90deg, #ef4444, #f87171); }
.progress-bar-custom.blue  { background: linear-gradient(90deg, #6366f1, #818cf8); }

/* ── STATUS BADGES ────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.status-active   { background: rgba(16,185,129,0.1); color: var(--success-dark); }
.status-pending  { background: rgba(245,158,11,0.1); color: var(--warning-dark); }
.status-critical { background: rgba(239,68,68,0.1);  color: var(--danger-dark); }
.status-completed { background: rgba(99,102,241,0.1); color: var(--primary); }

/* ── HEATMAP ──────────────────────────────────────────────── */
.heatmap-cell {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
  transition: transform 0.2s var(--ease);
}
.heatmap-cell:hover { transform: scale(1.1); }

.heat-low    { background: rgba(16,185,129,0.7); }
.heat-medium { background: rgba(245,158,11,0.7); }
.heat-high   { background: rgba(239,68,68,0.7); }

/* ── FORM ELEMENTS ────────────────────────────────────────── */
.form-control,
.form-select {
  border-radius: var(--radius);
  border: 1.5px solid var(--border-color);
  padding: 10px 14px;
  font-size: 0.875rem;
  transition: var(--transition);
  background: var(--card-bg);
  color: var(--text-primary);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  outline: none;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* Floating label styles */
.floating-label-group {
  position: relative;
  margin-bottom: 20px;
}

.floating-label-group .form-control {
  padding-top: 20px;
  padding-bottom: 6px;
}

.floating-label-group label {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  font-size: 0.875rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: all 0.2s var(--ease);
  background: transparent;
}

.floating-label-group .form-control:focus ~ label,
.floating-label-group .form-control:not(:placeholder-shown) ~ label {
  top: 10px;
  transform: translateY(0);
  font-size: 0.68rem;
  color: var(--primary);
  font-weight: 500;
}

.floating-label-group .input-group-text {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  z-index: 4;
  font-size: 0.9rem;
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  font-family: inherit;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.2s var(--ease);
  letter-spacing: -0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border: none;
  color: white;
  box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  box-shadow: 0 4px 16px rgba(99,102,241,0.35);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(99,102,241,0.2);
}

.btn-outline-primary {
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-outline-primary:hover {
  background: rgba(99,102,241,0.08);
  border-color: var(--primary);
  color: var(--primary-hover);
}

.btn-outline-secondary {
  border: 1.5px solid var(--border-color);
  color: var(--text-secondary);
  background: transparent;
}
.btn-outline-secondary:hover {
  background: rgba(0,0,0,0.03);
  border-color: #cbd5e1;
}

/* ── ALERTS / FLASH MESSAGES ──────────────────────────────── */
.alert {
  border-radius: var(--radius-lg);
  border: none;
  font-size: 0.875rem;
  font-weight: 450;
  padding: 14px 18px;
}

.alert-success {
  background: rgba(16,185,129,0.08);
  color: var(--success-dark);
  border-left: 3px solid var(--success);
}

.alert-danger {
  background: rgba(239,68,68,0.08);
  color: var(--danger-dark);
  border-left: 3px solid var(--danger);
}

.alert-warning {
  background: rgba(245,158,11,0.08);
  color: var(--warning-dark);
  border-left: 3px solid var(--warning);
}

.alert-info {
  background: rgba(6,182,212,0.08);
  color: #0891b2;
  border-left: 3px solid var(--info);
}

/* ── LOGIN PAGE ───────────────────────────────────────────── */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  overflow: hidden;
}

.login-left {
  flex: 1;
  background: linear-gradient(145deg, #0f0f23 0%, #1a1a3e 40%, #0f172a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
}

/* Animated gradient orbs */
.login-left::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, transparent 70%);
  top: -100px;
  left: -100px;
  animation: orbFloat 12s ease-in-out infinite;
}

.login-left::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139,92,246,0.15) 0%, transparent 70%);
  bottom: -50px;
  right: -50px;
  animation: orbFloat 15s ease-in-out infinite reverse;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -30px) scale(1.1); }
  66%      { transform: translate(-20px, 20px) scale(0.95); }
}

.login-left-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 360px;
}

.login-left-content .brand-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  font-size: 2rem;
  color: white;
  box-shadow: 0 8px 32px rgba(99,102,241,0.35);
}

.login-left-content h2 {
  color: white;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.login-left-content p {
  color: rgba(255,255,255,0.5);
  font-size: 0.95rem;
  line-height: 1.6;
}

.login-features {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
}

.login-feature i {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.login-right {
  width: 480px;
  min-width: 480px;
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.login-card {
  width: 100%;
  max-width: 360px;
}

.login-logo {
  text-align: center;
  margin-bottom: 36px;
}

.login-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.login-subtitle {
  color: var(--text-muted);
  text-align: center;
  font-size: 0.85rem;
}

.login-form {
  margin-bottom: 8px;
}

.login-form .form-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.login-form .form-control {
  border-radius: var(--radius);
  padding: 11px 14px;
  border: 1.5px solid var(--border-color);
  font-size: 0.875rem;
  transition: var(--transition);
}

.login-form .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.login-form .input-group {
  position: relative;
}

.login-form .input-group-text {
  background: transparent;
  border: 1.5px solid var(--border-color);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  color: var(--text-muted);
  padding: 11px 14px;
  font-size: 0.9rem;
}

.login-form .input-group .form-control {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.login-form .input-group .form-control:focus ~ .input-group-text,
.login-form .input-group:focus-within .input-group-text {
  border-color: var(--primary);
}

.login-btn {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  font-weight: 600;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border: none;
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
  margin-top: 4px;
  letter-spacing: -0.01em;
}

.login-btn:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  box-shadow: 0 6px 24px rgba(99,102,241,0.4);
  transform: translateY(-1px);
}

.login-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}

.login-footer {
  text-align: center;
  margin-top: 24px;
}

.login-footer p {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}

.demo-accounts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border-color);
  background: var(--content-bg);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.demo-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99,102,241,0.04);
}

.demo-btn i {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1200px) {
  .login-left { display: none; }
  .login-right {
    width: 100%;
    min-width: unset;
  }
}

@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.show {
    transform: translateX(0);
    box-shadow: 20px 0 60px rgba(0,0,0,0.3);
  }
  .main-content {
    margin-left: 0;
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
  }
  .sidebar-overlay.show {
    display: block;
  }
}

@media (max-width: 767px) {
  .page-content { padding: 16px; }
  .kpi-value { font-size: 1.35rem; }
  .top-navbar { padding: 0 16px; }
  .kpi-card { padding: 16px 18px; }
}

@media (max-width: 575px) {
  .kpi-value { font-size: 1.15rem; }
  .card-body-custom { padding: 14px 16px; }
  .card-header-custom { padding: 14px 16px; }
}

/* ── PRINT ────────────────────────────────────────────────── */
@media print {
  .sidebar, .top-navbar, .sidebar-toggle { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .page-content { padding: 10px !important; }
  .kpi-card, .dashboard-card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
}

/* ── ANIMATIONS ───────────────────────────────────────────── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.animate-in {
  animation: fadeSlideUp 0.45s var(--ease) both;
}

/* Stagger delays */
.animate-in[style*="animation-delay: 0.05s"] { animation-delay: 0.05s; }
.animate-in[style*="animation-delay: 0.1s"]  { animation-delay: 0.1s; }
.animate-in[style*="animation-delay: 0.15s"] { animation-delay: 0.15s; }
.animate-in[style*="animation-delay: 0.2s"]  { animation-delay: 0.2s; }
.animate-in[style*="animation-delay: 0.25s"] { animation-delay: 0.25s; }
.animate-in[style*="animation-delay: 0.3s"]  { animation-delay: 0.3s; }
.animate-in[style*="animation-delay: 0.35s"] { animation-delay: 0.35s; }
.animate-in[style*="animation-delay: 0.4s"]  { animation-delay: 0.4s; }
.animate-in[style*="animation-delay: 0.45s"] { animation-delay: 0.45s; }
.animate-in[style*="animation-delay: 0.5s"]  { animation-delay: 0.5s; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}
.loading { animation: pulse 1.5s infinite; }

/* ════════════════════════════════════════════════════════════
   EXECUTIVE / CEO DASHBOARD
   ════════════════════════════════════════════════════════════ */

/* ── Executive Header Bar ─────────────────────────────────── */
.exec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1a1d29;
  color: #ffffff;
  padding: 18px 28px;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.exec-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.exec-header-logo {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
  flex-shrink: 0;
}

.exec-header-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.exec-header-company {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  font-weight: 450;
}

.exec-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.exec-header-period {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.08);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

.exec-header-period strong {
  color: #ffffff;
}

.exec-header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.exec-header-date {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
}

/* ── LIVE Badge ───────────────────────────────────────────── */
.status-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: rgba(16,185,129,0.15);
  color: #34d399;
  border: 1px solid rgba(16,185,129,0.25);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16,185,129,0.5);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 0 6px rgba(16,185,129,0);
    opacity: 0.7;
  }
}

/* ── Executive KPI Strip ──────────────────────────────────── */
.exec-kpi-strip {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.exec-kpi-item {
  flex: 1;
  min-width: 170px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s var(--ease);
}

.exec-kpi-item:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.exec-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.exec-kpi-data {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.exec-kpi-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.exec-kpi-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 1px;
}

.exec-kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 3px;
}

.exec-kpi-trend.up { color: var(--success); }
.exec-kpi-trend.down { color: var(--danger); }
.exec-kpi-trend.stable { color: var(--text-muted); }

/* ── Executive Grid Layout ────────────────────────────────── */
.exec-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  gap: 16px;
}

/* Panel styling */
.exec-panel {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease);
  display: flex;
  flex-direction: column;
  max-height: 350px;
}

.exec-panel:hover {
  box-shadow: var(--shadow);
}

/* Wide panel (center) */
.exec-panel-wide {
  grid-column: 2;
  grid-row: 1 / 4;
}

/* Panel header - sky blue horizontal */
.exec-panel-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 10px 16px;
  background: linear-gradient(135deg, #0ea5e9, #38bdf8);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  gap: 8px;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
}

.exec-panel-header h6 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
}

.exec-panel-badge {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.75);
}

.exec-panel-badge-warning {
  background: rgba(245,158,11,0.2);
  color: #fbbf24;
}

.exec-panel-badge-danger {
  background: rgba(239,68,68,0.2);
  color: #f87171;
}

.exec-panel-link {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.exec-panel-link:hover {
  color: #ffffff;
}



/* ── Executive Tables ─────────────────────────────────────── */
.exec-table-wrapper {
  overflow-x: auto;
}

.exec-table {
  width: 100%;
  border-collapse: collapse;
}

.exec-table th {
  padding: 10px 16px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  background: rgba(248,250,252,0.6);
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  white-space: nowrap;
  position: sticky;
  top: 0;
}

.exec-table td {
  padding: 12px 16px;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(226,232,240,0.4);
  color: var(--text-primary);
  vertical-align: middle;
}

.exec-table tbody tr {
  transition: background 0.15s var(--ease);
}

.exec-table tbody tr:hover {
  background: rgba(99,102,241,0.03);
}

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

.exec-table-loading {
  text-align: center;
  padding: 24px !important;
  color: var(--text-muted) !important;
  font-size: 0.85rem;
}

.exec-table-empty {
  text-align: center;
  padding: 24px !important;
  color: var(--text-muted) !important;
}

/* Project table specifics */
.exec-project-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.82rem;
}

.exec-project-code {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.exec-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 120px;
}

.exec-progress-track {
  flex: 1;
  height: 6px;
  background: rgba(0,0,0,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.exec-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s var(--ease);
}

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

.exec-progress-amber {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.exec-progress-red {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.exec-progress-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 32px;
  text-align: right;
}

/* Timeline */
.exec-timeline {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.exec-timeline-arrow {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin: 1px 0;
}

/* Status badges */
.exec-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.exec-status-on-track {
  background: rgba(16,185,129,0.1);
  color: var(--success-dark);
}

.exec-status-delayed {
  background: rgba(245,158,11,0.1);
  color: var(--warning-dark);
}

.exec-status-behind {
  background: rgba(239,68,68,0.1);
  color: var(--danger-dark);
}

/* Staff table specifics */
.exec-staff-name {
  font-weight: 500;
}

.exec-staff-role {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.exec-hours {
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Task Deadlines ───────────────────────────────────────── */
.exec-task-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.exec-task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(226,232,240,0.4);
  transition: background 0.15s;
}

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

.exec-task-item:hover {
  background: rgba(99,102,241,0.03);
}

.exec-task-priority {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.exec-priority-critical {
  background: rgba(239,68,68,0.12);
  color: var(--danger);
}

.exec-priority-high {
  background: rgba(245,158,11,0.12);
  color: var(--warning);
}

.exec-priority-medium {
  background: rgba(6,182,212,0.12);
  color: var(--info);
}

.exec-priority-low {
  background: rgba(16,185,129,0.12);
  color: var(--success);
}

.exec-task-info {
  min-width: 0;
}

.exec-task-name {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exec-task-date {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.exec-task-date i {
  margin-right: 3px;
  font-size: 0.62rem;
}

/* ── KPI Scores & Gauge ──────────────────────────────────── */
.exec-kpi-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.exec-kpi-scores {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exec-kpi-score-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.exec-kpi-score-name {
  font-size: 0.72rem;
  color: var(--text-secondary);
  min-width: 110px;
  font-weight: 500;
}

.exec-kpi-score-bar {
  flex: 1;
  height: 6px;
  background: rgba(0,0,0,0.05);
  border-radius: 3px;
  overflow: hidden;
}

.exec-kpi-score-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s var(--ease);
}

.exec-kpi-score-val {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 30px;
  text-align: right;
}

/* ── Gauge Container ──────────────────────────────────────── */
.gauge-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 180px;
  margin: 0 auto;
}

.gauge-center-label {
  position: absolute;
  text-align: center;
  pointer-events: none;
}

.gauge-center-label .gauge-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.gauge-center-label .gauge-subtitle {
  display: block;
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 3px;
}

.exec-gauge-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Budget Legend ─────────────────────────────────────────── */
.exec-budget-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.exec-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.exec-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── HR Overview Stats ────────────────────────────────────── */
.exec-hr-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.exec-hr-stat {
  padding: 12px;
  background: rgba(0,0,0,0.02);
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  text-align: center;
}

.exec-hr-stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.exec-hr-unit {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
}

.exec-hr-stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 500;
  margin-top: 2px;
}

.exec-hr-stat-change {
  font-size: 0.65rem;
  font-weight: 600;
  margin-top: 4px;
}

.exec-hr-stat-change.up { color: var(--success); }
.exec-hr-stat-change.down { color: var(--danger); }
.exec-hr-stat-change.stable { color: var(--text-muted); }

.exec-hr-chart {
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

.exec-hr-chart-title {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}

/* ── Severity Bars (Issue Tracking) ──────────────────────── */
.severity-bar {
  height: 8px;
  background: rgba(0,0,0,0.05);
  border-radius: 4px;
  overflow: hidden;
  width: 100%;
}

.severity-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s var(--ease);
}

.exec-severity-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.exec-severity-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exec-severity-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-primary);
  font-weight: 500;
}

.exec-severity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.exec-severity-count {
  margin-left: auto;
  font-weight: 700;
  font-size: 0.82rem;
}

/* ── EXECUTIVE RESPONSIVE ─────────────────────────────────── */
@media (max-width: 1400px) {
  .exec-grid { grid-template-columns: 1fr 1.4fr 1fr; }
}

@media (max-width: 1200px) {
  .exec-grid { grid-template-columns: 1fr 1fr; }
  .exec-panel-wide {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

@media (max-width: 991px) {
  .exec-grid { grid-template-columns: 1fr; }
  .exec-panel-wide {
    grid-column: 1;
  }
  .exec-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .exec-kpi-strip {
    flex-wrap: nowrap;
  }
}

@media (max-width: 767px) {
  .exec-grid { grid-template-columns: 1fr !important; gap: 12px; }
  .exec-panel { max-height: none; }
  .exec-panel-body { max-height: 300px; overflow-y: auto; }
  .page-content { padding: 16px; }
  .exec-header {
    padding: 14px 16px;
  }
  .exec-kpi-item {
    min-width: 150px;
    padding: 12px 14px;
  }
  .exec-kpi-value {
    font-size: 1rem;
  }
  .exec-panel-header {
    padding: 10px 14px;
  }
}

/* ── DARK MODE (Executive) ────────────────────────────────── */
/* ── DARK MODE ────────────────────────────────────────────── */
[data-bs-theme="dark"] {
  --content-bg:    #0a0a0f;
  --card-bg:       #141420;
  --text-primary:  #e2e8f0;
  --text-secondary:#94a3b8;
  --text-muted:    #64748b;
  --border-color:  #1e293b;
  --border-subtle: rgba(255,255,255,0.04);
  --navbar-bg:     rgba(10,10,15,0.78);

  --shadow-xs:   0 1px 2px rgba(0,0,0,0.2);
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.3);
  --shadow:      0 4px 6px rgba(0,0,0,0.3);
  --shadow-md:   0 10px 25px rgba(0,0,0,0.35);
  --shadow-lg:   0 20px 40px rgba(0,0,0,0.4);
}

[data-bs-theme="dark"] .sidebar {
  border-right-color: rgba(255,255,255,0.06);
}

[data-bs-theme="dark"] .dashboard-table th {
  background: rgba(20,20,32,0.8);
}

[data-bs-theme="dark"] .login-right {
  background: #141420;
}

[data-bs-theme="dark"] .demo-btn {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #334155;
}

/* ── MISC UTILITIES ───────────────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-card {
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-lg);
}

/* Smooth link transitions */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}
a:hover {
  color: var(--primary-hover);
}

/* Focus visible for keyboard nav */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   EXECUTIVE DASHBOARD — Premium Multi-Panel Layout
   ═══════════════════════════════════════════════════════════════ */

/* ── Executive Header Bar ── */
.exec-header {
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
    color: white;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}
.exec-logo { display: flex; align-items: center; gap: 12px; }
.exec-logo i { font-size: 1.5rem; color: #818cf8; }
.exec-title { font-size: 1rem; font-weight: 700; letter-spacing: 1px; }
.exec-subtitle { font-size: 0.7rem; color: #94a3b8; margin-top: 2px; }
.exec-header-center { display: flex; align-items: center; gap: 12px; font-size: 0.85rem; color: #cbd5e1; }
.exec-sep { color: #475569; }
.exec-company { font-weight: 600; }
.exec-period i { margin-right: 4px; }
.exec-header-right { display: flex; align-items: center; gap: 16px; font-size: 0.85rem; }
.exec-date { color: #94a3b8; }
.exec-live { display: flex; align-items: center; gap: 6px; background: rgba(16,185,129,0.15); padding: 4px 12px; border-radius: 20px; color: #10b981; font-weight: 700; font-size: 0.75rem; }
/* ── KPI Strip ── */
.kpi-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi-strip-item { background: white; border-radius: 10px; padding: 14px; display: flex; align-items: center; gap: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); transition: transform 0.2s, box-shadow 0.2s; }
.kpi-strip-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.kpi-strip-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.kpi-strip-label { font-size: 0.7rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.kpi-strip-value { font-size: 1.1rem; font-weight: 700; color: #0f172a; }

.exec-panel-header i { font-size: 0.85rem; color: #818cf8; }
.exec-panel-body { padding: 16px; }

/* ── HR Stats ── */
.hr-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.hr-stat-card { background: #f8fafc; border-radius: 8px; padding: 12px; text-align: center; border: 1px solid #e2e8f0; }
.hr-stat-green { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.2); }
.hr-stat-green .hr-stat-value { color: #059669; }
.hr-stat-value { font-size: 1.4rem; font-weight: 700; color: #0f172a; }
.hr-stat-label { font-size: 0.65rem; color: #64748b; text-transform: uppercase; margin-top: 2px; }
.hr-chart-container { margin-top: 8px; }
.hr-chart-title { font-size: 0.7rem; color: #64748b; text-transform: uppercase; margin-bottom: 8px; font-weight: 600; }

/* ── Executive Tables ── */
.exec-table.compact th, .exec-table.compact td { padding: 6px 10px; }

/* ── Badge Pills ── */
.badge-pill { display: inline-block; padding: 3px 8px; border-radius: 12px; font-size: 0.65rem; font-weight: 600; letter-spacing: 0.5px; }
.badge-present { background: rgba(16,185,129,0.1); color: #059669; }
.badge-late { background: rgba(245,158,11,0.1); color: #d97706; }
.badge-absent { background: rgba(239,68,68,0.1); color: #dc2626; }

/* ── Trend Indicators ── */
.trend-up { color: #10b981; font-weight: 600; font-size: 0.78rem; }
.trend-warn { color: #f59e0b; font-weight: 600; font-size: 0.78rem; }

/* ── KPI Gauge ── */
.kpi-perf-grid { display: flex; gap: 16px; align-items: flex-start; }
.kpi-perf-list { flex: 1; }
.kpi-gauge-wrap { text-align: center; flex-shrink: 0; }
.gauge-label { font-size: 0.7rem; color: #64748b; text-transform: uppercase; font-weight: 600; margin-bottom: 4px; }
.gauge-value-text { font-size: 1.5rem; font-weight: 700; color: #10b981; margin-top: 4px; }

/* ── Status Pills ── */
.status-pill { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 0.7rem; font-weight: 600; }
.status-ontrack { background: rgba(16,185,129,0.1); color: #059669; }
.status-delayed { background: rgba(245,158,11,0.1); color: #d97706; }
.status-atrisk { background: rgba(239,68,68,0.1); color: #dc2626; }

/* ── Mini Progress Bar ── */
.mini-progress { display: inline-block; width: 60px; height: 6px; background: #e2e8f0; border-radius: 3px; vertical-align: middle; margin-right: 6px; }
.mini-progress-bar { height: 100%; border-radius: 3px; transition: width 0.6s ease; }

/* ── Priority Tags ── */
.priority-high { color: #dc2626; font-weight: 700; font-size: 0.7rem; }
.priority-medium { color: #d97706; font-weight: 600; font-size: 0.7rem; }
.priority-low { color: #059669; font-weight: 600; font-size: 0.7rem; }

/* ── Severity Bars ── */
.severity-bars { display: flex; flex-direction: column; gap: 10px; }
.severity-row { display: flex; align-items: center; gap: 10px; }
.severity-label { font-size: 0.75rem; color: #475569; font-weight: 500; width: 60px; }
.severity-bar-track { flex: 1; height: 20px; background: #f1f5f9; border-radius: 10px; overflow: hidden; }
.severity-bar-fill { height: 100%; border-radius: 10px; transition: width 0.8s ease; }
.severity-critical { background: linear-gradient(90deg, #dc2626, #ef4444); }
.severity-high { background: linear-gradient(90deg, #d97706, #f59e0b); }
.severity-medium { background: linear-gradient(90deg, #0284c7, #38bdf8); }
.severity-low { background: linear-gradient(90deg, #059669, #10b981); }
.severity-count { font-size: 0.8rem; font-weight: 700; color: #1e293b; width: 24px; text-align: right; }

/* ── Issue Summary ── */
.issue-summary { display: flex; gap: 12px; }
.issue-stat { flex: 1; text-align: center; background: #f8fafc; border-radius: 8px; padding: 10px; border: 1px solid #e2e8f0; }
.issue-stat-value { font-size: 1.3rem; font-weight: 700; }
.issue-stat-label { font-size: 0.6rem; color: #64748b; text-transform: uppercase; margin-top: 2px; }

/* ── Responsive ── */
@media (max-width: 1400px) { .kpi-strip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1200px) { .kpi-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 991px) {  .kpi-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .exec-header { flex-direction: column; text-align: center; } .kpi-strip { grid-template-columns: 1fr; } .kpi-perf-grid { flex-direction: column; } }


/* ── Chart Container Fixes ── */
.exec-panel-body canvas { max-height: 100% !important; }
.exec-panel-body div[style*="height"] { overflow: hidden; }
.chart-wrap { position: relative; width: 100%; overflow: hidden; }

/* ═══════ COMPANY LOGOS — BERCA & CARRIER ═══════ */
.company-logos { display: flex; align-items: center; gap: 10px; }
.berca-circle { width: 42px; height: 42px; background: #dc2626; border-radius: 50%; border: 2px solid white; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.berca-stripe { background: white; color: #0ea5e9; font-size: 0.5rem; font-weight: 800; letter-spacing: 0.5px; padding: 2px 4px; width: 100%; text-align: center; }
.carrier-oval { background: #0ea5e9; color: white; font-family: Georgia, serif; font-style: italic; font-size: 0.75rem; padding: 8px 14px; border-radius: 20px; border: 2px solid white; }
.company-name { color: white; font-size: 0.55rem; font-weight: 600; letter-spacing: 0.3px; text-align: center; line-height: 1.2; }


/* ═══════ TEXT COLOR FIXES ═══════ */
/* White text on colored backgrounds */
.sidebar-nav .nav-link.active,
.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link { color: white; }
.exec-panel-header i { color: white; opacity: 0.9; }
.user-role { color: rgba(255,255,255,0.7) !important; }
.user-name { color: white !important; }
.nav-section { color: rgba(255,255,255,0.5) !important; }
.kpi-strip-value { color: white; }
.kpi-strip-label { color: rgba(255,255,255,0.8); }
.exec-live { color: white; }
.exec-period { color: rgba(255,255,255,0.9); }
.exec-company { color: white; }
.exec-date { color: rgba(255,255,255,0.7); }
.exec-title { color: white; }
.exec-subtitle { color: rgba(255,255,255,0.8); }

/* ═══════ NOTIFICATION DROPDOWN ═══════ */
.notification-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 9999;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
.notification-dropdown.show { display: block; }
.notif-header { padding: 12px 16px; border-bottom: 1px solid #e2e8f0; font-size: 0.85rem; }
.notif-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; cursor: pointer; transition: background 0.2s; border-bottom: 1px solid #f1f5f9; }
.notif-item:hover { background: #f8fafc; }
.notif-item i { font-size: 1.1rem; flex-shrink: 0; }
.notif-item small { font-size: 0.8rem; color: #1e293b; }
.notif-footer { padding: 10px 16px; text-align: center; border-top: 1px solid #e2e8f0; }
.notif-footer a { color: #0ea5e9; text-decoration: none; font-size: 0.8rem; font-weight: 600; }

/* Profile Dropdown */
.profile-dropdown.show { display: block !important; }
.sidebar-user:hover { background: rgba(255,255,255,0.1); border-radius: 8px; }
