/* ============================================================
   Chelsea Avondale HR - Global Styles
   ============================================================ */

:root {
  --primary: #26A499;
  --primary-dark: #1e8c83;
  --primary-light: #e0f5f4;
  --accent-pink: #EB1661;
  --accent-yellow: #FCB513;
  --accent-orange: #F26321;
  --sidebar-bg: #01313C;
  --sidebar-hover: #023f4d;
  --sidebar-active: #023f4d;
  --sidebar-text: #7da8b0;
  --sidebar-active-text: #ffffff;
  --sidebar-accent: #26A499;
  --gray-50: #f8f8f8;
  --gray-100: #F1F0F1;
  --gray-200: #e0e0e0;
  --gray-300: #CCCCCC;
  --gray-400: #B7B7B7;
  --gray-500: #696969;
  --gray-600: #696969;
  --gray-700: #7c7c7c;
  --gray-800: #3d3d3d;
  --gray-900: #01313C;
  --danger: #EB1661;
  --danger-light: #fce8f1;
  --warning: #FCB513;
  --warning-light: #fef5d9;
  --success: #26A499;
  --success-light: #e0f5f4;
  --info: #26A499;
  --info-light: #e0f5f4;
  --radius: 5px;
  --radius-lg: 10px;
  --shadow: rgb(99 99 99 / 20%) 0px 2px 8px 0px;
  --shadow-md: rgb(99 99 99 / 20%) 0px 2px 8px 0px;
  --shadow-lg: rgb(99 99 99 / 30%) 0px 4px 16px 0px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', 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; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ============================================================
   LAYOUT
   ============================================================ */

.app-layout {
  display: flex;
  min-height: 100vh;
}

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

.sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-logo .logo-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo .logo-icon {
  width: 64px;
  height: 64px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-logo .logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar-logo .logo-text {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}

.sidebar-logo .logo-sub {
  font-size: 11px;
  color: var(--sidebar-text);
  margin-top: 1px;
}

/* Mode switcher (Recruiting / Onboarding) */
.mode-switcher {
  position: relative;
}

.mode-switcher-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 8px;
  margin: -6px -8px;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.mode-switcher-btn:hover {
  background: var(--sidebar-hover);
}

.mode-switcher-text {
  min-width: 0;
}

.mode-switcher-caret {
  margin-left: auto;
  display: flex;
  color: var(--sidebar-text);
  transition: transform 0.15s;
}

.mode-switcher.open .mode-switcher-caret {
  transform: rotate(180deg);
}

.mode-switcher-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: var(--sidebar-hover);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 4px;
  z-index: 200;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}

.mode-switcher.open .mode-switcher-menu {
  display: block;
}

.mode-switcher-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  font-size: 13.5px;
  color: var(--sidebar-text);
  transition: all 0.15s;
}

.mode-switcher-option:hover {
  background: var(--sidebar-active);
  color: #e2e8f0;
}

.mode-switcher-option.active {
  color: var(--sidebar-active-text);
  font-weight: 500;
}

.mode-switcher-option .nav-icon {
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Mode-scoped elements, hidden when not in the matching mode */
.onboarding-only.is-hidden,
.recruiting-only.is-hidden {
  display: none !important;
}

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

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sidebar-text);
  padding: 16px 20px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 450;
  border-left: 3px solid transparent;
  transition: all 0.15s;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: #e2e8f0;
}

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-active-text);
  border-left-color: var(--sidebar-accent);
  font-weight: 500;
}

.icon { display: inline-block; vertical-align: -3px; flex-shrink: 0; }

.nav-item .nav-icon {
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: var(--sidebar-text);
}

.sidebar-footer .logout-btn {
  margin-top: 12px;
  width: 100%;
  padding: 8px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  color: var(--sidebar-text);
  font-size: 13px;
  transition: all 0.15s;
}

.sidebar-footer .logout-btn:hover {
  background: rgba(255,255,255,0.06);
  color: #e2e8f0;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */

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

.topbar {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-500);
}

.breadcrumb .current {
  color: var(--gray-800);
  font-weight: 500;
}

.breadcrumb-sep { color: var(--gray-300); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ============================================================
   TABS
   ============================================================ */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
  padding: 0 28px;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 13px 18px;
  margin-bottom: -1px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--gray-800);
}

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

.tab-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  min-width: 18px;
  text-align: center;
}

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

/* ============================================================
   PAGE HEADER
   ============================================================ */

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 13.5px;
  color: var(--gray-500);
  margin-top: 3px;
}

.page-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  border: none;
  transition: all 0.15s;
  white-space: nowrap;
  line-height: 1.4;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
  background: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover { background: #c01052; }

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border: none;
}

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

.btn-sm {
  padding: 5px 11px;
  font-size: 12.5px;
}

.btn-icon {
  font-size: 14px;
  line-height: 1;
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}

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

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

.card-body { padding: 22px; }

/* ============================================================
   STAT CARDS
   ============================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  margin-bottom: 8px;
}

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

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

.stat-card.green .stat-value { color: var(--primary); }
.stat-card.blue .stat-value { color: var(--info); }
.stat-card.active {
  border-color: var(--primary);
}

/* ============================================================
   TABLE
   ============================================================ */

.table-wrapper {
  overflow-x: auto;
}

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

th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  padding: 10px 16px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
  white-space: nowrap;
}

th:first-child { border-radius: var(--radius) 0 0 0; }
th:last-child { border-radius: 0 var(--radius) 0 0; }

td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  font-size: 13.5px;
  vertical-align: middle;
}

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

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

.table-link {
  color: var(--gray-900);
  font-weight: 500;
}

.table-link:hover { color: var(--primary); }

.table-meta {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 2px;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.badge-green { background: var(--success-light); color: #1a7a73; }
.badge-red { background: var(--danger-light); color: #c01052; }
.badge-yellow { background: var(--warning-light); color: #c48a00; }
.badge-blue { background: #dff0f5; color: #1a6a7a; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }
.badge-purple { background: #f3e8ff; color: #7c3aed; }
.badge-teal { background: var(--success-light); color: #1a7a73; }
.badge-orange { background: #fff0e6; color: #c24a00; }

/* Job status */
.status-open { background: var(--success-light); color: #1a7a73; }
.status-draft { background: var(--gray-100); color: var(--gray-600); }
.status-closed { background: var(--danger-light); color: #c01052; }
.status-paused { background: var(--warning-light); color: #c48a00; }

/* Onboarding task chips (My Tasks, profile Tasks card, new-hire portal) */
.task-category-chip {
  display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 20px;
  background: var(--primary-light); color: var(--primary-dark); font-weight: 500;
}
.task-required-badge {
  display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 20px;
  background: var(--warning-light); color: #a16207; font-weight: 500;
}
.task-blocked-badge {
  display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 20px;
  background: var(--gray-100); color: var(--gray-600); font-weight: 500;
}
.task-blocked { opacity: 0.55; }
.task-blocked .task-checkbox { cursor: not-allowed; }
.task-details-html { line-height: 1.5; }
.task-details-html p { margin: 0 0 6px; }
.task-details-html ul, .task-details-html ol { margin: 4px 0 6px 18px; padding: 0; }
.task-details-html a { color: var(--primary); }

/* ============================================================
   FORMS
   ============================================================ */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-grid.cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.span-2 { grid-column: span 2; }
.form-group.span-full { grid-column: 1 / -1; }

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

label .required {
  color: var(--danger);
  margin-left: 2px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"],
select,
textarea {
  padding: 9px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--gray-800);
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(38, 164, 153, 0.15);
}

textarea { resize: vertical; min-height: 100px; }

.file-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius);
  background: var(--gray-50, #fafafa);
  color: var(--gray-600);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.file-picker:hover {
  border-color: var(--primary);
  background: var(--success-light);
  color: var(--primary);
}
.file-picker.has-file {
  border-style: solid;
  border-color: var(--gray-200);
  background: white;
  color: var(--gray-800);
}
.file-picker .file-picker-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--success-light);
  color: var(--primary);
  flex-shrink: 0;
}
.file-picker.has-file .file-picker-icon {
  background: var(--gray-100);
  color: var(--gray-700);
}
.file-picker .file-picker-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.file-picker .file-picker-primary {
  font-weight: 500;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-picker .file-picker-hint {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}
.file-picker .file-picker-action {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  flex-shrink: 0;
}
.file-picker.has-file .file-picker-action {
  color: var(--gray-500);
}

select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
  opacity: 0.5;
  cursor: pointer;
}

.time-chip {
  padding: 4px 10px;
  border: 1px solid var(--gray-200);
  border-radius: 99px;
  background: white;
  font-size: 12px;
  color: var(--gray-600);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.time-chip:hover,
.time-chip.active {
  border-color: var(--primary);
  background: var(--success-light);
  color: var(--primary);
}

.interview-chip {
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 12px;
  border: 1px solid var(--gray-200);
  background: white;
  color: var(--gray-600);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.interview-chip:hover { border-color: var(--primary); color: var(--primary); }
.interview-chip.active-chip {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.datetime-preview {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--primary);
  min-height: 18px;
  margin-top: 2px;
}

.form-hint {
  font-size: 12px;
  color: var(--gray-400);
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-100);
}

/* ============================================================
   SEARCH + FILTERS BAR
   ============================================================ */

.filters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.search-input-wrap input {
  padding-left: 34px;
}

.filter-select {
  min-width: 100px;
  max-width: 130px;
}

/* ============================================================
   PIPELINE STAGE INDICATOR
   ============================================================ */

.stage-track {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 16px 0;
  overflow-x: auto;
}

.stage-step {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 80px;
}

.stage-step-inner {
  flex: 1;
  padding: 7px 12px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--gray-400);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.stage-step:first-child .stage-step-inner { border-radius: var(--radius) 0 0 var(--radius); }
.stage-step:last-child .stage-step-inner { border-radius: 0 var(--radius) var(--radius) 0; }

.stage-step-inner:hover {
  background: var(--gray-200);
  color: var(--gray-700);
}

.stage-step-inner.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.stage-step-inner.rejected {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger);
}

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

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(1, 49, 60, 0.55);
  backdrop-filter: blur(2px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.15s ease-out;
}

.modal-lg { max-width: 720px; }

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

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

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

.modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--gray-400);
  font-size: 18px;
  border-radius: var(--radius);
  transition: all 0.15s;
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ============================================================
   DOCUMENT / FILE UPLOAD
   ============================================================ */

.dropzone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--gray-50);
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.dropzone-icon {
  margin-bottom: 8px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone-text {
  font-size: 14px;
  color: var(--gray-500);
}

.dropzone-text strong {
  color: var(--primary);
}

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

.file-list { margin-top: 16px; }

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.file-icon { flex-shrink: 0; display: flex; align-items: center; color: var(--gray-500); }

.file-info { flex: 1; min-width: 0; }

.file-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  font-size: 11.5px;
  color: var(--gray-400);
  margin-top: 1px;
}

.file-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--gray-400);
}

.empty-state-icon { margin-bottom: 12px; display: flex; align-items: center; justify-content: center; color: var(--gray-300); }
.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 6px;
}
.empty-state-sub { font-size: 13.5px; }

/* ============================================================
   CANDIDATE PROFILE
   ============================================================ */

.profile-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #00A499);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  flex-shrink: 0;
}

.profile-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

.profile-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--gray-500);
}

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

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  color: white;
  box-shadow: var(--shadow-lg);
  max-width: 320px;
  pointer-events: all;
  animation: toastIn 0.2s ease-out;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast-success { background: var(--primary); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--info); }

/* ============================================================
   SCORE STARS
   ============================================================ */

.score-stars {
  display: flex;
  gap: 3px;
}

.score-stars .star {
  font-size: 16px;
  cursor: pointer;
  color: var(--gray-300);
  transition: color 0.1s;
}

.score-stars .star.filled { color: #f59e0b; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */

.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #01313C 0%, #025a6e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

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

.login-logo .icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.login-logo h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

.login-logo p {
  font-size: 14px;
  color: var(--gray-500);
  margin-top: 4px;
}

.login-form .form-group { margin-bottom: 16px; }

.login-form .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 11px;
  font-size: 14px;
  margin-top: 8px;
}

.login-error {
  background: var(--danger-light);
  color: #dc2626;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.login-error.show { display: block; }

/* ============================================================
   PUBLIC JOB BOARD
   ============================================================ */

.public-page {
  min-height: 100vh;
  background: var(--gray-50);
}

.public-header {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 20px 32px;
}

.public-header h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
}

.public-header p { font-size: 13.5px; color: var(--gray-500); margin-top: 2px; }

.public-content { max-width: 860px; margin: 0 auto; padding: 32px 24px; }

.job-card-public {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 14px;
  transition: box-shadow 0.15s;
  cursor: pointer;
}

.job-card-public:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.job-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 6px;
}

.job-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--gray-500);
}

.job-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.job-card-footer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  justify-content: flex-end;
}

/* ============================================================
   PROGRESS / LOADING
   ============================================================ */

.loading-row td {
  text-align: center;
  padding: 40px;
  color: var(--gray-400);
  font-style: italic;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

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

/* ============================================================
   PROGRESS BAR
   ============================================================ */

.progress-bar-wrap {
  background: var(--gray-200);
  border-radius: 4px;
  height: 6px;
  width: 120px;
  overflow: hidden;
  flex-shrink: 0;
}

.progress-bar-fill {
  background: var(--primary);
  border-radius: 4px;
  height: 6px;
  transition: width 0.3s ease;
  min-width: 0;
}

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

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid.cols-3 { grid-template-columns: 1fr; }
  .form-group.span-2 { grid-column: span 1; }
}

@media (max-width: 700px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-body { padding: 16px; }
}

/* ── Global sidebar search ─────────────────────────────────── */
.sidebar-search {
  position: relative;
  padding: 0 12px 10px;
}
.sidebar-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 7px 10px;
}
.sidebar-search-icon { color: rgba(255,255,255,0.45); flex-shrink:0; }
.sidebar-search-wrap input {
  background: none;
  border: none;
  outline: none;
  color: rgba(255,255,255,0.9);
  font-size: 12.5px;
  font-family: inherit;
  width: 100%;
}
.sidebar-search-wrap input::placeholder { color: rgba(255,255,255,0.35); }
.sidebar-search-dropdown {
  position: absolute;
  left: 12px;
  right: 12px;
  top: calc(100% - 4px);
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: rgb(99 99 99 / 20%) 0px 4px 12px 0px;
  z-index: 200;
  overflow: hidden;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  text-decoration: none;
  color: var(--gray-800);
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.1s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--gray-50); }
.search-result-icon { color: var(--gray-400); flex-shrink:0; }
.search-result-label { font-size: 13px; font-weight: 500; }
.search-result-sub { font-size: 11.5px; color: var(--gray-400); margin-top: 1px; }
.search-no-results { padding: 12px; text-align: center; font-size: 13px; color: var(--gray-400); }

/* ===== HIRING TEAMS (team.html, job-form, job-detail, jobs list) ===== */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.team-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: white;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.15s;
}
.team-card:hover { box-shadow: var(--shadow); }
.team-card-head { display: flex; align-items: center; gap: 10px; }
.team-icon-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  flex-shrink: 0;
}
.team-card-name { font-weight: 600; font-size: 14.5px; color: var(--gray-900); }
.team-card-desc { font-size: 12.5px; color: var(--gray-500); min-height: 16px; }
.team-card-members {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 4px;
}
.team-member-chip {
  display: inline-flex; align-items: center;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
}
.team-member-chip.more { background: var(--gray-50); color: var(--gray-500); font-style: italic; }
.team-card-actions { display: flex; gap: 6px; margin-top: auto; }
.team-card-actions .btn { flex: 1; }

/* Inline badge for "job assigned to team/person" */
.assign-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: white;
  white-space: nowrap;
}
.assign-badge .assign-badge-icon { display: inline-flex; }
.assign-badge.assign-person {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

/* Color + icon pickers in the team modal */
.color-picker, .icon-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.color-swatch {
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.1s;
}
.color-swatch:hover { transform: scale(1.08); }
.color-swatch.selected { border-color: var(--gray-900); }
.icon-swatch {
  width: 36px; height: 36px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--gray-600);
  background: white;
  transition: border-color 0.1s, color 0.1s;
}
.icon-swatch:hover { border-color: var(--gray-300); color: var(--gray-800); }
.icon-swatch.selected { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* ============================================================
   EMAILS PAGE
   ============================================================ */

.emails-card { margin-bottom: 20px; }
.emails-card .card-header { align-items: flex-start; }

.card-sub {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 4px;
  max-width: 720px;
  line-height: 1.5;
}

.emails-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 22px;
}

.emails-row-body { flex: 1; min-width: 0; }

.emails-row-title {
  font-size: 14px;
  color: var(--gray-900);
  font-weight: 500;
}

.emails-row-sub {
  font-size: 12.5px;
  color: var(--gray-500);
  margin-top: 2px;
  line-height: 1.5;
}

.emails-divider {
  border-top: 1px solid var(--gray-100);
  margin: 0;
}

.emails-field {
  padding: 18px 22px 22px;
}

.emails-field-label {
  font-size: 12px;
  color: var(--gray-500);
  display: block;
  margin-bottom: 6px;
  text-transform: none;
  letter-spacing: 0;
}

.emails-field-help {
  font-size: 12.5px;
  color: var(--gray-500);
  margin-top: 6px;
}

.emails-select {
  width: 360px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 13.5px;
  background: white;
  color: var(--gray-900);
}

.emails-list-head {
  display: grid;
  grid-template-columns: 100px 1fr 280px 100px;
  padding: 10px 22px;
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
  font-size: 11.5px;
  color: var(--gray-500);
  text-transform: none;
  font-weight: 500;
}

.emails-list-head-4col {
  grid-template-columns: 100px 1fr 280px 240px;
}

.emails-list-row {
  display: grid;
  grid-template-columns: 100px 1fr 280px 100px;
  align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid var(--gray-100);
}

.emails-list-row:last-child { border-bottom: none; }

.emails-list-row-4col {
  grid-template-columns: 100px 1fr 280px 240px;
}

.emails-col-delivery,
.emails-col-sendto {
  font-size: 13px;
  color: var(--gray-700);
}

.emails-col-actions {
  text-align: right;
}

.emails-empty {
  padding: 24px 22px;
  font-size: 13px;
  color: var(--gray-500);
  text-align: center;
}

.emails-status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-700);
}

.emails-status-dot .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
}

/* ============================================================
   GREENHOUSE-STYLE PILL TOGGLE (.gh-toggle)
   ============================================================ */

.gh-toggle {
  display: inline-block;
  position: relative;
  width: 38px;
  height: 22px;
  cursor: pointer;
  flex-shrink: 0;
}

.gh-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.gh-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-300);
  border-radius: 999px;
  transition: background 0.15s;
}

.gh-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  background: white;
  border-radius: 50%;
  transition: transform 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.gh-toggle input:checked + .gh-toggle-slider {
  background: var(--primary);
}

.gh-toggle input:checked + .gh-toggle-slider::before {
  transform: translateX(16px);
}

.gh-toggle input:disabled + .gh-toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================
   BTN OUTLINE PRIMARY (used by emails page)
   ============================================================ */

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

.btn-outline-primary:hover {
  background: var(--primary-light);
}

.btn-outline-primary:disabled {
  color: var(--gray-400);
  border-color: var(--gray-200);
  cursor: not-allowed;
}
