/* ============================================================
   Lauranka Comms Sigma — Design System
   Primary brand: #6366f1 (indigo)  |  Font: Inter
   Theme: Time Next family alignment
   ============================================================ */

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

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

:root {
  /* ── Blue (status badge only — not primary action) ── */
  --blue-50:  #EFF6FF;
  --blue-100: #DBEAFE;
  --blue-500: #1E90DC;
  --blue-600: #1A7EC4;
  --blue-700: #1568A3;

  /* ── Indigo — primary action / brand ── */
  --indigo-50:  #EEF2FF;
  --indigo-100: #E0E7FF;
  --indigo-500: #6366f1;
  --indigo-600: #4f46e5;
  --indigo-700: #4338ca;

  --gray-50:  #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;

  /* Pastel status palette (soft pill backgrounds w/ darker text & dot) */
  --green-50:  #ECFDF5;
  --green-100: #D1FAE5;
  --green-200: #A7F3D0;
  --green-600: #059669;
  --green-700: #047857;

  --red-50:    #FEF2F2;
  --red-100:   #FEE4E4;
  --red-200:   #FECACA;
  --red-600:   #DC2626;
  --red-700:   #B91C1C;

  --amber-50:  #FFFBEB;
  --amber-100: #FEF3C7;
  --amber-200: #FDE68A;
  --amber-600: #D97706;
  --amber-700: #B45309;

  --purple-50:  #FAF5FF;
  --purple-100: #F3E8FF;
  --purple-200: #E9D5FF;
  --purple-600: #9333EA;
  --purple-700: #7E22CE;

  --teal-50:   #F0FDFA;
  --teal-100:  #CCFBF1;
  --teal-600:  #0D9488;

  --sidebar-w: 224px;
  --header-h:  70px;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:    0 1px 3px 0 rgb(0 0 0 / .10), 0 1px 2px -1px rgb(0 0 0 / .10);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .10), 0 2px 4px -2px rgb(0 0 0 / .10);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .10), 0 4px 6px -4px rgb(0 0 0 / .10);
}

html, body {
  height: 100%;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: var(--gray-800);
  background: var(--gray-100);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
  border-right: 1px solid #0B1220;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
}

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-brand-logo {
  width: 36px; height: 36px;
  background: var(--indigo-500);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.sidebar-brand-logo svg { color: #fff; width: 20px; height: 20px; }

.sidebar-brand-text { line-height: 1.2; }
.sidebar-brand-name {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  letter-spacing: -.3px;
}
.sidebar-brand-sub {
  font-size: 10px;
  font-weight: 600;
  color: var(--indigo-500);
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* Nav */
.sidebar-nav { flex: 1; padding: 12px 0; }

.nav-section { margin-bottom: 4px; }

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  padding: 12px 16px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin: 1px 8px;
  border-radius: var(--radius);
  color: rgba(255,255,255,.7);
  font-size: 13.5px;
  font-weight: 500;
  transition: background .12s, color .12s;
  cursor: pointer;
  border: none;
  background: none;
  width: calc(100% - 16px);
  text-align: left;
  position: relative;
}

.nav-item svg {
  width: 17px; height: 17px;
  flex-shrink: 0;
  opacity: .7;
  transition: opacity .12s;
}

.nav-item:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}
.nav-item:hover svg { opacity: 1; }

.nav-item.active {
  background: var(--indigo-500);
  color: #fff;
  font-weight: 600;
}
.nav-item.active svg { opacity: 1; color: #fff; }

/* Sidebar footer */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius);
  cursor: default;
}

.sidebar-avatar {
  width: 32px; height: 32px;
  background: var(--indigo-500);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 11px;
  color: rgba(255,255,255,.45);
}

.btn-signout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 8px;
  margin-top: 4px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.6);
  font-size: 13px;
  font-weight: 500;
  transition: background .12s, color .12s;
}
.btn-signout svg { width: 15px; height: 15px; }
.btn-signout:hover { background: rgba(220,38,38,.18); color: #FCA5A5; }

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Page header */
.page-header {
  background: linear-gradient(135deg, #0c1018 0%, #0f172a 55%, #1a1535 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 32px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  overflow: hidden;
}

/* Ambient cyan glow — decorative only */
.page-header::before {
  content: '';
  position: absolute;
  top: -48px; left: -48px;
  width: 192px; height: 192px;
  border-radius: 50%;
  background: rgba(6,182,212,0.13);
  filter: blur(48px);
  pointer-events: none;
}

.page-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative; /* above glow */
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -.4px;
  line-height: 1.2;
}

.page-breadcrumb {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Ensure header action buttons stay above glow */
.page-header > div:last-child { position: relative; }

.page-body {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
}

.card-body { padding: 20px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 600;
  transition: background .12s, box-shadow .12s, opacity .12s;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary {
  background: var(--indigo-500);
  color: #fff;
}
.btn-primary:hover { background: var(--indigo-600); box-shadow: var(--shadow-sm); }
.btn-primary:active { background: var(--indigo-700); }

.btn-secondary {
  background: #fff;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-400); }

.btn-danger {
  background: #fff;
  color: var(--red-600);
  border: 1px solid var(--red-600);
}
.btn-danger:hover { background: var(--red-100); }

.btn-ghost {
  background: transparent;
  color: var(--gray-500);
}
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); }

.btn-lg { padding: 11px 22px; font-size: 15px; border-radius: var(--radius-lg); }
.btn-sm { padding: 5px 11px; font-size: 12px; }

.btn:disabled { opacity: .45; pointer-events: none; }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-hint {
  font-size: 11.5px;
  color: var(--gray-400);
  margin-top: 4px;
}

.form-input,
.form-select,
.form-textarea,
.form-control {
  width: 100%;
  padding: 0 12px;
  height: 36px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  color: var(--gray-900);
  font-size: 13px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  appearance: none;
  box-sizing: border-box;
}

.form-textarea,
textarea.form-control {
  height: auto;
  padding: 9px 12px;
  resize: vertical;
}

.form-input::placeholder,
.form-control::placeholder { color: var(--gray-400); }

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.form-control:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}

select.form-control,
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2394a3b8'%3E%3Cpath fill-rule='evenodd' d='M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 32px;
  cursor: pointer;
}

.form-textarea { min-height: 80px; }

.form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: 5px;
  letter-spacing: .2px;
  text-transform: uppercase;
}

.input-with-icon { position: relative; }
.input-with-icon svg {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--gray-400);
  pointer-events: none;
}
.input-with-icon .form-input { padding-left: 36px; }

/* Toggle */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0;
}

.toggle-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--gray-700);
}

.toggle-sub,
.toggle-hint {
  font-size: 11.5px;
  color: var(--gray-400);
  margin-top: 1px;
}

.toggle {
  position: relative;
  width: 40px; height: 22px;
  flex-shrink: 0;
}

.toggle input { display: none; }

.toggle-track {
  position: absolute; inset: 0;
  background: var(--gray-200);
  border-radius: 99px;
  cursor: pointer;
  transition: background .2s;
}

.toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform .2s;
  pointer-events: none;
}

.toggle input:checked ~ .toggle-track { background: var(--indigo-500); }
.toggle input:checked ~ .toggle-track .toggle-thumb { transform: translateX(18px); }

/* toggle-slider: alternate single-element variant used across pages
   (span.toggle-slider replaces div.toggle-track + div.toggle-thumb) */
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--gray-200);
  border-radius: 99px;
  cursor: pointer;
  transition: background .2s;
}
.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform .2s;
  pointer-events: none;
}
.toggle input:checked ~ .toggle-slider { background: var(--indigo-500); }
.toggle input:checked ~ .toggle-slider::after { transform: translateX(18px); }

/* ============================================================
   BADGES / STATUS PILLS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid transparent;
}

/* Pastel pills — soft tint + subtle ring, paired with a coloured dot */
.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.badge.badge-no-dot::before { display: none; }

.badge-green  { background: var(--green-50);  color: var(--green-700);  border-color: var(--green-200); }
.badge-red    { background: var(--red-50);    color: var(--red-700);    border-color: var(--red-200); }
.badge-amber  { background: var(--amber-50);  color: var(--amber-700);  border-color: var(--amber-200); }
.badge-blue   { background: var(--blue-50);   color: var(--blue-600);   border-color: var(--blue-100); }
.badge-purple { background: var(--purple-50); color: var(--purple-700); border-color: var(--purple-200); }
.badge-gray   { background: var(--gray-50);   color: var(--gray-500);   border-color: var(--gray-200); }

/* Legacy dot modifier — now a no-op; kept for backwards compatibility */
.badge-dot::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; }

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

thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--gray-400);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

tbody td {
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}

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

tbody tr {
  transition: background .1s;
  cursor: default;
}

tbody tr:hover { background: var(--gray-50); }

tbody tr.selected { background: var(--indigo-50); }

/* ============================================================
   STAT CARDS (dashboard)
   ============================================================ */
.stat-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -1px;
  line-height: 1;
}

.stat-sub {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 4px;
}

.stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
}
.stat-icon svg { width: 20px; height: 20px; }
.stat-icon.blue { background: var(--indigo-50); color: var(--indigo-500); }
.stat-icon.green { background: var(--green-100); color: var(--green-600); }
.stat-icon.amber { background: var(--amber-100); color: var(--amber-600); }
.stat-icon.red   { background: var(--red-100);   color: var(--red-600); }

/* ============================================================
   ACTION BUTTON GRID (dashboard)
   ============================================================ */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.action-tile {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
  box-shadow: var(--shadow-sm);
}

.action-tile:hover {
  border-color: var(--indigo-500);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.action-tile-icon {
  width: 36px; height: 36px;
  background: var(--indigo-50);
  color: var(--indigo-500);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
}
.action-tile-icon svg { width: 18px; height: 18px; }

.action-tile-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.3;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgb(0 0 0 / .4);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 480px;
  max-width: calc(100vw - 32px);
  transform: translateY(12px) scale(.98);
  transition: transform .2s;
}

.modal-backdrop.open .modal { transform: none; }

.modal-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
}

.modal-close {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  color: var(--gray-400);
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }
.modal-close svg { width: 15px; height: 15px; }

.modal-body { padding: 20px; }

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: var(--gray-900);
  color: #fff;
  padding: 13px 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  max-width: 360px;
  font-size: 13.5px;
  animation: toast-in .25s ease;
}

.toast svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.toast.success { background: var(--green-600); }
.toast.error   { background: var(--red-600); }
.toast.warning { background: var(--amber-600); }

@keyframes toast-in {
  from { transform: translateX(24px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ============================================================
   PROGRESS / SPINNER
   ============================================================ */
.spinner {
  width: 18px; height: 18px;
  border: 2.5px solid var(--gray-200);
  border-top-color: var(--indigo-500);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

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

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar-wrap {
  height: 6px;
  background: var(--gray-100);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--indigo-500);
  border-radius: 99px;
  transition: width .4s ease;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--gray-400); }
.text-danger { color: var(--red-600); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.divider { border: none; border-top: 1px solid var(--gray-200); margin: 20px 0; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #EEF2FF 0%, #F1F5F9 60%, #E0E7FF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgb(0 0 0 / .10), 0 4px 16px rgb(0 0 0 / .06);
  padding: 40px 40px 36px;
  width: 100%;
  max-width: 400px;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.login-logo-icon {
  width: 44px; height: 44px;
  background: var(--indigo-500);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
}
.login-logo-icon svg { color: #fff; width: 24px; height: 24px; }

.login-logo-text { line-height: 1.2; }
.login-logo-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -.4px;
}
.login-logo-product {
  font-size: 11px;
  font-weight: 700;
  color: var(--indigo-500);
  letter-spacing: .8px;
  text-transform: uppercase;
}

.login-heading {
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -.5px;
  margin-bottom: 4px;
}

.login-sub {
  font-size: 13.5px;
  color: var(--gray-400);
  margin-bottom: 28px;
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--gray-400);
  line-height: 1.6;
}

.forgot-link {
  font-size: 12.5px;
  color: var(--indigo-500);
  font-weight: 500;
  float: right;
  margin-top: -4px;
}
.forgot-link:hover { text-decoration: underline; }

/* ============================================================
   WORKER HEALTH DOT  (sidebar footer)
   ============================================================ */
.worker-health {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  margin: 0 8px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.06);
  font-size: 12px; color: rgba(255,255,255,.55);
  cursor: default;
}
.worker-health-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--gray-500);
  box-shadow: 0 0 0 0 transparent;
}
.worker-health-dot.alive    { background: var(--green-500); animation: pulse-green 2.5s infinite; }
.worker-health-dot.degraded { background: var(--amber-500); }
.worker-health-dot.dead     { background: var(--red-500); }

@keyframes pulse-green {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
  70%  { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* ============================================================
   ERROR HELP CARD
   ============================================================ */
.error-card {
  border: 1px solid var(--red-200, #fecaca);
  border-radius: var(--radius-md);
  background: var(--red-50, #fef2f2);
  overflow: hidden;
  margin: 12px 0;
}
.error-card-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--red-100, #fee2e2);
  border-bottom: 1px solid var(--red-200, #fecaca);
}
.error-card-icon { color: var(--red-600, #dc2626); flex-shrink: 0; }
.error-card-title { font-size: 13px; font-weight: 700; color: var(--red-800, #991b1b); }
.error-card-body  { padding: 12px 14px; }
.error-card-detail { font-size: 13px; color: var(--red-700, #b91c1c); margin: 0 0 8px; line-height: 1.5; }
.error-card-hint {
  display: flex; align-items: flex-start; gap: 5px;
  font-size: 12px; color: var(--gray-600); line-height: 1.5;
}
.error-card-hint svg { flex-shrink: 0; margin-top: 1px; color: var(--indigo-400); }
.error-card-raw {
  margin-top: 10px;
  font-size: 11.5px; color: var(--gray-500);
}
.error-card-raw summary {
  cursor: pointer; user-select: none; color: var(--gray-400);
}
.error-card-raw code {
  display: block; margin-top: 6px;
  background: var(--gray-100); border-radius: var(--radius-sm);
  padding: 6px 8px; font-size: 11px; word-break: break-all;
  color: var(--gray-600);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: none; }
  .main-content { margin-left: 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
