@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-darker: #090d16;
  --bg-dark: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.45);
  --border-glass: rgba(255, 255, 255, 0.08);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-cyan: #06b6d4;
  --accent-purple: #818cf8;
  --accent-purple-glow: rgba(129, 140, 248, 0.3);
  --accent-cyan-glow: rgba(6, 182, 212, 0.3);
  --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);
  --transition-speed: 0.3s;
}

/* Base resets & typography */
html {
  font-size: 14px;
}
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-darker);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.12) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Layout structural classes */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.sidebar {
  width: 260px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--border-glass);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition-speed);
}

.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 2.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.active {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
    padding: 1.5rem;
  }
}

/* Brand logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
  margin-bottom: 2.5rem;
  letter-spacing: -0.5px;
}
.brand-logo span {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-icon {
  font-size: 1.8rem;
  color: var(--accent-cyan);
}

/* Navigation */
.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.85rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 500;
  transition: all var(--transition-speed) ease;
}

.nav-item-link:hover, .nav-item-link.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item-link.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.05) 100%);
  border-left: 3px solid var(--accent-cyan);
  padding-left: calc(1rem - 3px);
  box-shadow: inset 5px 0 15px -5px var(--accent-purple-glow);
}

.nav-item-link i {
  font-size: 1.25rem;
  width: 20px;
}

/* User Profile Sidebar Info */
.user-profile-widget {
  margin-top: auto;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
}

/* Glass Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.6), 0 0 20px -5px var(--accent-purple-glow);
}

/* Page Headers */
.page-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* Stats Widgets */
.stat-widget {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stat-info {
  display: flex;
  flex-direction: column;
}
.stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  margin-top: 0.25rem;
  letter-spacing: -1px;
}
.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.stat-icon.cyan {
  color: var(--accent-cyan);
  box-shadow: 0 0 15px -3px var(--accent-cyan-glow);
}
.stat-icon.purple {
  color: var(--accent-purple);
  box-shadow: 0 0 15px -3px var(--accent-purple-glow);
}
.stat-icon.success {
  color: var(--success);
  box-shadow: 0 0 15px -3px var(--success-glow);
}
.stat-icon.warning {
  color: var(--warning);
  box-shadow: 0 0 15px -3px var(--warning-glow);
}

/* Tables */
.glass-table-container {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border-glass);
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(10px);
}

.glass-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text-primary);
  margin: 0;
}

.glass-table th {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-glass);
  padding: 1.15rem 1.5rem;
  font-weight: 600;
  text-align: left;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.glass-table td {
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border-glass);
  font-size: 0.95rem;
  vertical-align: middle;
}

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

.glass-table tr {
  transition: background var(--transition-speed);
}

.glass-table tr:hover {
  background: rgba(255, 255, 255, 0.015);
}

/* Forms & Inputs */
.glass-form-label {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.glass-input {
  background: rgba(15, 23, 42, 0.5) !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: 10px !important;
  color: var(--text-primary) !important;
  padding: 0.75rem 1rem !important;
  transition: all var(--transition-speed) !important;
  box-shadow: none !important;
}

.glass-input:focus {
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 0 3px var(--accent-cyan-glow) !important;
}

.glass-input::placeholder {
  color: #64748b;
}

.glass-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 1rem center !important;
  background-size: 1.2em !important;
  padding-right: 2.5rem !important;
}

.glass-select option {
  background-color: var(--bg-dark);
  color: var(--text-primary);
}

/* Custom Glass Checkbox */
.glass-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 6px !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all var(--transition-speed) ease;
}

.glass-checkbox:checked {
  background: var(--accent-cyan) !important;
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 8px var(--accent-cyan-glow) !important;
}

.glass-checkbox:checked::after {
  content: '\f00c'; /* FontAwesome Check Icon */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.8rem;
  color: var(--bg-darker);
}

.glass-checkbox:focus {
  outline: none;
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 0 3px var(--accent-cyan-glow) !important;
}

/* Status Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.25px;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge-status.running {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.2);
}

.badge-status.stopped {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-secondary);
  border-color: rgba(148, 163, 184, 0.2);
}

.badge-status.pending, .badge-status.starting {
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.2);
}

.badge-status.stopping {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.badge-status.warning, .badge-status.retrying {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.2);
}

/* Pulse Dot Animation for active events/starts */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}
.pulse-dot.running { background-color: var(--success); }
.pulse-dot.running::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: 50%;
  background-color: var(--success);
  animation: pulse-ring 1.5s infinite ease-in-out;
}
.pulse-dot.retrying { background-color: var(--warning); }
.pulse-dot.retrying::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: 50%;
  background-color: var(--warning);
  animation: pulse-ring 1.5s infinite ease-in-out;
}
.pulse-dot.starting { background-color: var(--accent-cyan); }
.pulse-dot.starting::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  animation: pulse-ring 1.5s infinite ease-in-out;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.85; }
  100% { transform: scale(3.2); opacity: 0; }
}

/* Premium Buttons */
.btn-glass {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  color: var(--text-primary) !important;
  border: none;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  border-radius: 10px;
  transition: all var(--transition-speed);
  box-shadow: 0 4px 15px -3px var(--accent-cyan-glow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-glass:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px -3px rgba(6, 182, 212, 0.45);
  opacity: 0.95;
}

.btn-glass-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-primary) !important;
  font-weight: 500;
  padding: 0.65rem 1.5rem;
  border-radius: 10px;
  transition: all var(--transition-speed);
}

.btn-glass-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-glass-danger {
  background: linear-gradient(135deg, #f43f5e, #ef4444);
  color: var(--text-primary) !important;
  border: none;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  border-radius: 10px;
  transition: all var(--transition-speed);
  box-shadow: 0 4px 15px -3px var(--danger-glow);
}
.btn-glass-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px -3px rgba(239, 68, 68, 0.45);
  opacity: 0.95;
}

.btn-action-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  transition: all var(--transition-speed);
  cursor: pointer;
}

.btn-action-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.btn-action-icon.start:hover {
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 10px -2px var(--success-glow);
}
.btn-action-icon.stop:hover {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 10px -2px var(--danger-glow);
}

/* Timelines and lists */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  padding-left: 1rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.timeline-item {
  position: relative;
  padding-left: 1.5rem;
}

.timeline-marker {
  position: absolute;
  left: -20px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--bg-darker);
  background-color: var(--accent-purple);
}

.timeline-marker.active {
  background-color: var(--accent-cyan);
  box-shadow: 0 0 0 4px var(--accent-cyan-glow);
}

.timeline-marker.success {
  background-color: var(--success);
  box-shadow: 0 0 0 4px var(--success-glow);
}

/* Authentication Page Tweaks */
.auth-container {
  max-width: 450px;
  margin: 5rem auto;
}

.auth-provider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-weight: 500;
  transition: all var(--transition-speed);
}

.auth-provider-btn:hover {
  background: rgba(255, 255, 255, 0.07);
}

/* Simulation banner indicator */
.simulation-banner {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
  color: #ffb020;
  text-align: center;
  padding: 0.65rem 1rem;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.25px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.simulation-toggle-card {
  border: 1px dashed rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.02);
}

/* Micro animations */
.hover-scale {
  transition: transform var(--transition-speed);
}
.hover-scale:hover {
  transform: scale(1.02);
}

/* Identity Page Overrides */
.card {
  background: var(--bg-card) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid var(--border-glass) !important;
  color: var(--text-primary) !important;
  border-radius: 16px !important;
}
.form-floating > label {
  color: var(--text-secondary) !important;
}
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: var(--accent-cyan) !important;
}
.form-floating > .form-control {
  background: rgba(15, 23, 42, 0.5) !important;
  border: 1px solid var(--border-glass) !important;
  color: var(--text-primary) !important;
  border-radius: 10px !important;
}
.form-floating > .form-control:focus {
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 0 3px var(--accent-cyan-glow) !important;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan)) !important;
  border: none !important;
  color: var(--text-primary) !important;
  font-weight: 600 !important;
  padding: 0.65rem 1.5rem !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 15px -3px var(--accent-cyan-glow) !important;
  transition: all var(--transition-speed) !important;
}
.btn-primary:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 25px -3px rgba(6, 182, 212, 0.45) !important;
  opacity: 0.95 !important;
}
.text-danger {
  color: #f87171 !important; /* Lighter red for visibility in dark theme */
}

/* Interactive Timeline Styling */
.timeline-outer {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  margin-bottom: 1.5rem;
}

.timeline-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(10px);
  flex-wrap: wrap;
  gap: 12px;
}

.timeline-controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-wrapper {
  display: flex;
  position: relative;
  overflow: hidden;
  user-select: none;
}

/* Y-Axis Sidebar: Instances */
.timeline-instances-sidebar {
  width: 170px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-glass);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  z-index: 5;
  display: flex;
  flex-direction: column;
}

.timeline-sidebar-header {
  height: 45px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
}

.timeline-sidebar-row {
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Viewport for the actual grid & timeline */
.timeline-viewport {
  flex-grow: 1;
  position: relative;
  overflow: hidden;
  cursor: grab;
}

.timeline-viewport:active {
  cursor: grabbing;
}

/* X-Axis Header: Time ticks */
.timeline-time-header {
  height: 45px;
  position: relative;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(15, 23, 42, 0.5);
}

.timeline-time-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  pointer-events: none;
}

.timeline-time-tick.day-tick {
  font-weight: 700;
  color: var(--accent-cyan);
  border-left: 1px solid rgba(6, 182, 212, 0.3);
}

/* Grid Rows */
.timeline-grid-rows {
  position: relative;
  display: flex;
  flex-direction: column;
}

.timeline-grid-row {
  height: 50px;
  position: relative;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.04);
}

.timeline-grid-row:hover {
  background: rgba(255, 255, 255, 0.01);
}

/* Vertical Gridlines (drawn behind events) */
.timeline-vertical-lines {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
}

.timeline-gridline {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.03);
}

.timeline-gridline.day-line {
  border-left: 1px dashed rgba(6, 182, 212, 0.1);
}

/* Red Live Now Indicator */
.timeline-now-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--danger);
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 0 8px var(--danger);
}

.timeline-now-label {
  position: absolute;
  top: 4px;
  transform: translateX(-50%);
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  font-weight: bold;
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
}

/* Event Blocks */
.timeline-event-bar {
  position: absolute;
  top: 10px;
  height: 30px;
  border-radius: 6px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
  cursor: pointer;
  box-sizing: border-box;
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.timeline-event-bar:hover {
  transform: scaleY(1.06) scaleX(1.01);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

/* Event States */
.state-scheduled {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.7), rgba(6, 182, 212, 0.7));
  box-shadow: inset 0 0 10px rgba(6, 182, 212, 0.2);
}

.state-starting {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.5), rgba(15, 23, 42, 0.6));
  border: 1px dashed var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan-glow);
  animation: pulse-border 2s infinite;
}

.state-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.75), rgba(4, 120, 87, 0.75));
  box-shadow: inset 0 0 10px rgba(16, 185, 129, 0.2);
}

.state-retrying {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.75), rgba(180, 83, 9, 0.75));
  box-shadow: inset 0 0 10px rgba(245, 158, 11, 0.2);
}

.state-failed {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.75), rgba(153, 27, 27, 0.75));
  box-shadow: inset 0 0 10px rgba(239, 68, 68, 0.2);
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 3px var(--accent-cyan-glow); }
  50% { box-shadow: 0 0 12px var(--accent-cyan-glow); }
  100% { box-shadow: 0 0 3px var(--accent-cyan-glow); }
}

/* Premium Glassmorphic Tooltip */
.timeline-tooltip {
  position: fixed;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 1rem;
  width: 290px;
  z-index: 1000;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  transform: translateY(5px);
}

.timeline-tooltip.active {
  opacity: 1;
  transform: translateY(0);
}

.timeline-tooltip-header {
  font-weight: 700;
  font-size: 1rem;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 6px;
  margin-bottom: 8px;
  color: white;
}

.timeline-tooltip-body {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.timeline-tooltip-body strong {
  color: var(--text-primary);
}

/* Premium External Login Provider Buttons styling */
form#external-account p {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* Base button override */
form#external-account .btn-primary,
.btn-primary[name="provider"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.75rem 1.5rem !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  border-radius: 12px !important;
  transition: all var(--transition-speed) ease !important;
  border: 1px solid var(--border-glass) !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
  flex-grow: 1;
  min-width: 130px;
}

/* Google Brand Override */
form#external-account .btn-primary[value="Google"],
.btn-primary[value="Google"] {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-primary) !important;
}
form#external-account .btn-primary[value="Google"]::before,
.btn-primary[value="Google"]::before {
  content: "\f1a0";
  font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands", sans-serif;
  font-size: 1.25rem;
  color: #ea4335; /* Google Red */
}
form#external-account .btn-primary[value="Google"]:hover,
.btn-primary[value="Google"]:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(66, 133, 244, 0.5) !important; /* Google Blue */
  box-shadow: 0 0 15px rgba(66, 133, 244, 0.25) !important;
  transform: translateY(-2px) !important;
}

/* GitHub Brand Override */
form#external-account .btn-primary[value="GitHub"],
.btn-primary[value="GitHub"] {
  background: rgba(36, 41, 46, 0.5) !important;
  color: var(--text-primary) !important;
}
form#external-account .btn-primary[value="GitHub"]::before,
.btn-primary[value="GitHub"]::before {
  content: "\f09b";
  font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands", sans-serif;
  font-size: 1.25rem;
  color: #ffffff;
}
form#external-account .btn-primary[value="GitHub"]:hover,
.btn-primary[value="GitHub"]:hover {
  background: rgba(36, 41, 46, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-2px) !important;
}

/* Microsoft Brand Override */
form#external-account .btn-primary[value="Microsoft"],
.btn-primary[value="Microsoft"] {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-primary) !important;
}
form#external-account .btn-primary[value="Microsoft"]::before,
.btn-primary[value="Microsoft"]::before {
  content: "\f3ca";
  font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands", sans-serif;
  font-size: 1.25rem;
  color: #00a4ef; /* Microsoft Blue */
}
form#external-account .btn-primary[value="Microsoft"]:hover,
.btn-primary[value="Microsoft"]:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(242, 80, 34, 0.5) !important; /* Microsoft Orange-Red */
  box-shadow: 0 0 15px rgba(242, 80, 34, 0.25) !important;
  transform: translateY(-2px) !important;
}

/* Sleek section header style */
h3:has(+ hr + form#external-account),
h3:has(+ form#external-account),
.card h3:last-of-type,
.auth-container h3:last-of-type {
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  color: var(--text-secondary) !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  margin-top: 2.2rem !important;
  margin-bottom: 0.5rem !important;
}

/* Sleek divider line below the header */
h3:has(+ hr + form#external-account) + hr,
h3:has(+ hr) + hr {
  border-top: 1px solid var(--border-glass) !important;
  opacity: 0.6 !important;
  margin-top: 0.5rem !important;
  margin-bottom: 1.2rem !important;
}