/* ═══════════════════════════════════════════════
   PeoplePath — Design System & Global Styles
   ═══════════════════════════════════════════════ */

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

:root {
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;

  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --red-50:  #fff1f2;
  --red-100: #ffe4e6;
  --red-600: #dc2626;
  --red-700: #b91c1c;

  --green-50:  #f0fdf4;
  --green-600: #16a34a;
  --green-700: #166534;

  --blue-50:  #eff6ff;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;

  --amber-400: #facc15;

  --surface: #ffffff;
  --bg: #f1f5f9;
  --border: #e5e7eb;
  --border-dark: #d1d5db;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.06);

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: 150ms ease;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--gray-800);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════ TOP NAV ═══════════════════ */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  box-shadow: 0 2px 8px rgba(99,102,241,.35);
}
.brand-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -.3px;
}
.nav-meta { display: flex; align-items: center; gap: 12px; }
.today-badge {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--gray-600);
  background: var(--gray-100); border-radius: var(--radius-full);
  padding: 4px 12px;
}
.status-pill {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  background: var(--green-50); color: var(--green-700);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  border: 1px solid #bbf7d0;
  transition: var(--transition);
}
.status-pill.warn  { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.status-pill.error { background: var(--red-50); color: var(--red-700); border-color: var(--red-100); }
.status-pill.info  { background: var(--blue-50); color: #1e40af; border-color: #bfdbfe; }

/* ═══════════════════ WORKFLOW BAR ═══════════════════ */
.workflow-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.workflow-inner {
  max-width: 1800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 52px;
}
.workflow-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .6px;
  white-space: nowrap;
}
.tab-switcher,
.view-switcher {
  display: flex;
  gap: 4px;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  padding: 3px;
}
.tab-switch,
.view-switch {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  transition: var(--transition);
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.tab-switch:hover,  .view-switch:hover  { color: var(--gray-800); background: white; }
.tab-switch.active, .view-switch.active {
  background: white;
  color: var(--gray-900);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.view-switcher { margin-left: auto; }

/* ═══════════════════ MAIN CONTENT ═══════════════════ */
.main-content {
  max-width: 1800px;
  margin: 0 auto;
  padding: 24px;
}

/* ── Three column layout ── */
.three-col-layout {
  display: grid;
  grid-template-columns: 300px 380px 1fr;
  gap: 20px;
  align-items: start;
}
.form-panel {
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
.checklist-panel {
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
.cal-panel {
  position: sticky;
  top: 124px; /* nav + workflow bar */
}

/* ═══════════════════ PANEL CARDS ═══════════════════ */
.panel-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.panel-card.full-card { width: 100%; }

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.card-header.between {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.card-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--brand-50);
  color: var(--brand-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.card-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
}

/* ═══════════════════ CALENDAR ═══════════════════ */
.cal-placeholder {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px;
  padding: 32px 16px;
  color: var(--gray-400);
  text-align: center;
}
.cal-placeholder i { font-size: 40px; }
.cal-placeholder p { font-size: 13px; line-height: 1.6; }

.cal-month { margin-bottom: 20px; }
.cal-month-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 10px;
  text-align: center;
}
.cal-week-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}
.cal-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  padding: 3px 0;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-cell {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: default;
  transition: var(--transition);
}
.cal-cell.empty { }
.cal-cell.today {
  background: var(--blue-600);
  color: white;
  font-weight: 700;
}
.cal-cell.anchor {
  background: var(--amber-400);
  color: var(--gray-900);
  font-weight: 700;
}
.cal-cell.hr-due {
  background: var(--blue-600);
  color: white;
}
.cal-cell.itor-date {
  background: var(--red-600);
  color: white;
}
.cal-cell.new-hire {
  background: var(--gray-900);
  color: white;
}
.cal-cell.milestone {
  background: #10b981;
  color: white;
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--gray-600);
}
.legend-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 3px;
}

/* ═══════════════════ FORM ═══════════════════ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group.full  { grid-column: 1 / -1; }

/* city / state / zip on one row */
.city-state-zip-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 64px 96px;
  gap: 10px;
}

label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  white-space: nowrap;
}
.req { color: var(--red-600); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  color: var(--gray-900);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
input:hover:not(:focus), textarea:hover:not(:focus), select:hover:not(:focus) {
  border-color: var(--gray-400);
}
textarea { resize: vertical; min-height: 70px; line-height: 1.5; }

.section-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 18px 0 12px;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-divider span {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .6px;
  white-space: nowrap;
}

/* ── Tier Cards ── */
.tier-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.tier-card {
  display: flex; flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--gray-50);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.tier-card i { font-size: 18px; color: var(--gray-400); transition: var(--transition); }
.tier-name  { font-size: 12px; font-weight: 700; color: var(--gray-700); }
.tier-desc  { font-size: 10px; color: var(--gray-500); line-height: 1.3; }

.tier-card:hover { border-color: var(--brand-300, #a5b4fc); background: var(--brand-50); }
.tier-card:hover i { color: var(--brand-500); }

.tier-card.active {
  border-color: var(--brand-500);
  background: var(--brand-50);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.tier-card.active i   { color: var(--brand-600); }
.tier-card.active .tier-name { color: var(--brand-700); }

/* Priority = amber accent */
.tier-card[data-tier="priority"].active {
  border-color: #d97706;
  background: #fffbeb;
  box-shadow: 0 0 0 3px rgba(217,119,6,.12);
}
.tier-card[data-tier="priority"].active i   { color: #b45309; }
.tier-card[data-tier="priority"].active .tier-name { color: #92400e; }

/* Urgent = red accent */
.tier-card[data-tier="urgent"].active {
  border-color: var(--red-600);
  background: var(--red-50);
  box-shadow: 0 0 0 3px rgba(220,38,38,.12);
}
.tier-card[data-tier="urgent"].active i   { color: var(--red-600); }
.tier-card[data-tier="urgent"].active .tier-name { color: var(--red-700); }

/* ── Toggle group ── */
.toggle-group {
  display: flex;
  gap: 6px;
}
.toggle-btn {
  flex: 1;
  padding: 7px 10px;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.toggle-btn:hover { border-color: var(--brand-500); color: var(--brand-600); background: var(--brand-50); }
.toggle-btn.active {
  border-color: var(--brand-500);
  background: var(--brand-600);
  color: white;
  box-shadow: 0 1px 4px rgba(79,70,229,.3);
}

/* ═══════════════════ ACTION BAR BUTTONS ═══════════════════ */
.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.btn-action {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 1.5px solid transparent;
  white-space: nowrap;
  outline: none;
}
.btn-action:disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-icon-only {
  padding: 7px 9px !important;
  min-width: unset;
}

.btn-ghost {
  background: var(--gray-100);
  border-color: var(--border-dark);
  color: var(--gray-700);
}
.btn-ghost:hover { background: var(--gray-200); color: var(--gray-900); }

.btn-primary {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: white;
  box-shadow: 0 1px 4px rgba(79,70,229,.25);
}
.btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); }

.btn-outline {
  background: white;
  border-color: var(--brand-500);
  color: var(--brand-600);
}
.btn-outline:hover { background: var(--brand-50); }

.btn-danger {
  background: var(--red-50);
  border-color: var(--red-100);
  color: var(--red-700);
}
.btn-danger:hover { background: var(--red-100); border-color: #fca5a5; }

/* ═══════════════════ APPROVAL ROW ═══════════════════ */
.approval-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 12px;
}
.approval-info {
  display: flex; align-items: center; gap: 7px;
  color: #92400e;
  font-weight: 500;
}
.approval-btns { display: flex; gap: 8px; }

/* ═══════════════════ MILESTONES ═══════════════════ */
.milestones { display: flex; flex-direction: column; gap: 10px; }

.milestone-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  transition: all var(--transition);
}
.milestone-item:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.milestone-item.highlight-hire {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-color: #bae6fd;
}

.milestone-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.milestone-body { flex: 1; min-width: 0; }
.milestone-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
}
.milestone-sub {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}
.milestone-date-badge {
  background: var(--gray-200);
  color: var(--gray-700);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition);
}
.milestone-date-badge.large {
  font-size: 14px;
  padding: 7px 18px;
  background: var(--gray-900);
  color: white;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.milestone-date-badge.filled {
  background: var(--brand-600);
  color: white;
}

/* ═══════════════════ NOTIFICATION BAR ═══════════════════ */
.notification-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--gray-600);
  border: 1px solid var(--border);
}
.notification-bar.error { background: var(--red-50); color: var(--red-700); border-color: var(--red-100); }
.notification-bar.success { background: var(--green-50); color: var(--green-700); border-color: #bbf7d0; }
.notification-bar.warn  { background: #fffbeb; color: #92400e; border-color: #fde68a; }

/* ═══════════════════ CHEAT SHEET ═══════════════════ */
.muted-note {
  font-size: 12px;
  color: var(--gray-500);
}
.table-scroll {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.cheat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.cheat-table thead tr {
  background: var(--gray-50);
}
.cheat-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.cheat-table td {
  padding: 10px 16px;
  color: var(--gray-800);
  border-bottom: 1px solid var(--gray-100);
  white-space: nowrap;
}
.cheat-table tbody tr:last-child td { border-bottom: none; }
.cheat-table tbody tr:hover { background: var(--gray-50); }
.cheat-table td:first-child { font-weight: 600; color: var(--gray-600); }
.cheat-table td.is-today { font-weight: 700; color: var(--brand-600); }

/* ═══════════════════ OFFBOARDING PLACEHOLDER ═══════════════════ */
.offboarding-placeholder {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 80px 40px;
  gap: 14px;
}
.ob-icon {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: var(--gray-100);
  color: var(--gray-400);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
}
.offboarding-placeholder h2 { font-size: 22px; color: var(--gray-800); }
.offboarding-placeholder p  { font-size: 14px; color: var(--gray-500); max-width: 360px; line-height: 1.7; }

/* ═══════════════════ DATE PICKER MODAL ═══════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  padding: 20px;
}
.modal-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  animation: modal-in .18s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 0;
}
.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  display: flex; align-items: center; gap: 8px;
}
.modal-close {
  width: 30px; height: 30px;
  border: none; background: var(--gray-100);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--gray-500);
  font-size: 14px;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--gray-200); color: var(--gray-800); }
.modal-body { padding: 16px 22px; }
.modal-hint {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 12px;
}
.date-input-native {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: var(--font);
  color: var(--gray-900);
  background: var(--surface);
  outline: none;
  margin-bottom: 16px;
}
.date-input-native:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 0 22px 18px;
}

/* ═══════════════════ TOAST ═══════════════════ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  background: var(--gray-900);
  color: white;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  max-width: 360px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  display: flex; align-items: center; gap: 8px;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast.toast-success { background: #065f46; }
.toast.toast-error   { background: #991b1b; }
.toast.toast-warn    { background: #92400e; }

/* ═══════════════════ MONDAY SETTINGS MODAL ═══════════════════ */
.modal-card--wide { max-width: 620px; }

.monday-section {
  margin-bottom: 22px;
}
.monday-section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.monday-section-title i { color: var(--brand-500); }

.muted-label { font-weight: 400; color: var(--gray-400); font-size: 11px; }

code {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  background: var(--gray-100);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--gray-700);
}

/* Input with embedded action button */
.input-with-action {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-with-action:focus-within {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.input-with-action input {
  flex: 1;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 8px 12px;
}
.input-with-action input:focus { box-shadow: none !important; }
.btn-icon-toggle {
  background: var(--gray-100);
  border: none;
  border-left: 1px solid var(--border);
  padding: 0 12px;
  cursor: pointer;
  color: var(--gray-500);
  font-size: 13px;
  transition: var(--transition);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.btn-icon-toggle:hover { background: var(--gray-200); color: var(--gray-800); }

/* Crosswalk grid */
.crosswalk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 80px;
  gap: 6px 10px;
  align-items: center;
}
.crosswalk-header {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}
.crosswalk-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 6px;
}
.crosswalk-label i { color: var(--gray-400); font-size: 11px; }
.crosswalk-input {
  font-size: 12px !important;
  padding: 6px 10px !important;
  font-family: 'Courier New', monospace !important;
}
.crosswalk-kind {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  text-align: center;
  white-space: nowrap;
}
.crosswalk-kind.text   { background: var(--blue-50); color: #1e40af; }
.crosswalk-kind.date   { background: var(--green-50); color: var(--green-700); }
.crosswalk-kind.status { background: #fef3c7; color: #92400e; }

/* Test connection result */
.monday-test-result {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  margin-top: 6px;
}
.monday-test-result.success { background: var(--green-50); color: var(--green-700); border: 1px solid #bbf7d0; }
.monday-test-result.error   { background: var(--red-50); color: var(--red-700); border: 1px solid var(--red-100); }
.monday-test-result.loading { background: var(--blue-50); color: #1e40af; border: 1px solid #bfdbfe; }
.monday-test-result i { margin-top: 1px; flex-shrink: 0; }

.monday-modal-footer { display: flex; align-items: center; gap: 10px; }

/* Monday btn indicator in top action bar */
.btn-monday-configured {
  background: #e8f5e9 !important;
  border-color: #a5d6a7 !important;
  color: #2e7d32 !important;
}
.btn-monday-configured .monday-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #43a047;
  display: inline-block;
}

/* Sending spinner */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .8s linear infinite; display: inline-block; }

/* ═══════════════════ USER CHIP (top nav) ═══════════════════ */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 6px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-dark);
  background: var(--gray-50);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  white-space: nowrap;
}
.user-chip:hover {
  background: var(--brand-50);
  border-color: var(--brand-500);
  color: var(--brand-700);
}
.user-chip.has-user {
  background: var(--brand-50);
  border-color: var(--brand-100);
  color: var(--brand-700);
}
.user-chip.chip-warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.user-chip-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-600);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -.3px;
}
.user-chip.chip-warn .user-chip-avatar {
  background: #d97706;
}
.user-chip-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Manage Users button in nav */
.nav-manage-btn {
  font-size: 12px !important;
  padding: 5px 12px !important;
}

/* ═══════════════════ USER PROFILES MODAL ═══════════════════ */

/* Wide modal with constrained height + scroll */
.modal-card--wide {
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.modal-card--wide .modal-body {
  overflow-y: auto;
  flex: 1;
  padding-bottom: 0 !important;
}

/* User list section header */
.user-list-section {
  margin-bottom: 4px;
}
.user-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* Empty state */
.user-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 16px;
  color: var(--gray-400);
  text-align: center;
  border: 1.5px dashed var(--border-dark);
  border-radius: var(--radius-lg);
  background: var(--gray-50);
}
.user-list-empty i { font-size: 32px; }
.user-list-empty p { font-size: 13px; line-height: 1.6; }

/* User list items */
.user-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.user-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--gray-50);
  transition: all var(--transition);
}
.user-list-item:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-sm);
}
.user-list-item.active {
  border-color: var(--brand-500);
  background: var(--brand-50);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}

/* Avatar */
.uli-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: white;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -.3px;
}
.user-list-item.active .uli-avatar {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  box-shadow: 0 2px 8px rgba(99,102,241,.35);
}

/* Body */
.uli-body {
  flex: 1;
  min-width: 0;
}
.uli-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.uli-boards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.uli-board-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
}
.uli-board-badge.set {
  background: var(--green-50);
  color: var(--green-700);
  border-color: #bbf7d0;
}
.uli-board-badge.unset {
  background: var(--gray-100);
  color: var(--gray-400);
  border-color: var(--border);
}

/* Actions */
.uli-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.uli-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  white-space: nowrap;
}

/* Small button variant */
.btn-sm {
  padding: 5px 10px !important;
  font-size: 11px !important;
}

/* User Edit / Add form */
.user-edit-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 16px;
}
.user-edit-divider::before,
.user-edit-divider::after {
  content: '';
  flex: 1;
  height: 1.5px;
  background: var(--brand-100);
}
.user-edit-divider span {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-600);
  text-transform: uppercase;
  letter-spacing: .6px;
  white-space: nowrap;
}

/* Section sub-label (Onboarding / Offboarding headings inside form) */
.section-sublabel {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-700);
  padding: 6px 0 2px;
  border-bottom: 1px solid var(--border);
  width: 100%;
  margin-bottom: 2px;
}

/* Field hint text below input */
.field-hint {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 2px;
  display: block;
}

/* User form action row */
.user-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-bottom: 4px;
}

/* ═══════════════════ RESPONSIVE ═══════════════════ */

/* Thin scrollbars */
.form-panel::-webkit-scrollbar,
.checklist-panel::-webkit-scrollbar,
.table-scroll::-webkit-scrollbar { width: 5px; height: 5px; }
.form-panel::-webkit-scrollbar-track,
.checklist-panel::-webkit-scrollbar-track,
.table-scroll::-webkit-scrollbar-track { background: transparent; }
.form-panel::-webkit-scrollbar-thumb,
.checklist-panel::-webkit-scrollbar-thumb,
.table-scroll::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }

@media (max-width: 1280px) {
  .three-col-layout {
    grid-template-columns: 280px 340px 1fr;
  }
}

@media (max-width: 1024px) {
  .three-col-layout {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .cal-panel {
    grid-column: 1 / -1;
    /* Compact horizontal layout on tablet */
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: start;
  }
  #calendarContainer { grid-column: 1; }
  .cal-legend { grid-column: 2; flex-direction: column; }
}

@media (max-width: 768px) {
  .main-content { padding: 16px; }
  .three-col-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .cal-panel { display: block; }
  .workflow-inner { gap: 12px; }
  .view-switcher { margin-left: 0; }
  .nav-inner { padding: 0 12px; }
  .action-bar { gap: 6px; }
  .btn-action { padding: 6px 10px; font-size: 11px; }
  .tier-cards { grid-template-columns: 1fr; }
  .approval-row { flex-direction: column; align-items: flex-start; }
  .modal-card { max-width: 100%; }
  .modal-card--wide { max-width: 100%; max-height: 100vh; border-radius: 0; }

  /* Compress nav on tablet */
  .nav-manage-btn .fa-users-gear ~ * { display: none; } /* icon only */
  .user-chip-name { max-width: 100px; }
  .today-badge { display: none; }

  /* User list items stack actions below */
  .user-list-item { flex-wrap: wrap; }
  .uli-actions { width: 100%; justify-content: flex-end; padding-top: 6px; border-top: 1px solid var(--border); margin-top: 4px; }
}

@media (max-width: 540px) {
  /* Hide "Manage Users" text, show just icon */
  .nav-manage-btn { padding: 5px 8px !important; }
  .nav-manage-btn span { display: none; }
  /* Shrink user chip */
  .user-chip-name { display: none; }
  /* Stack workflow switcher */
  .workflow-inner { flex-wrap: wrap; height: auto; padding: 6px 0; }
  .view-switcher { margin-left: 0; width: 100%; }
}

@media (max-width: 480px) {
  .brand-name { font-size: 17px; }
  .milestone-item { flex-wrap: wrap; }
  .milestone-date-badge { margin-top: 4px; }
  .uli-boards { flex-direction: column; gap: 3px; }
}
