:root {
  --bg: #fff9fb;
  --surface: #ffffff;
  --surface-strong: #fff0f5;
  --ink: #26354b;
  --muted: #7f8997;
  --line: #f0dce5;
  --accent: #ff4f8b;
  --accent-dark: #f43f7e;
  --accent-soft: #ffe4ee;
  --notice: #2563eb;
  --notice-dark: #1d4ed8;
  --notice-soft: #eff6ff;
  --attention: #d97706;
  --attention-dark: #92400e;
  --attention-soft: #fffbeb;
  --gold: #f0a044;
  --warning: #9a5b15;
  --danger: #a73842;
  --shadow: 0 10px 30px rgba(92, 55, 71, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

button,
input,
select,
textarea,
a {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(145deg, #ff4f8b 0%, #ff739d 100%);
}

.login-card {
  width: min(440px, 100%);
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.segmented-control button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.segmented-control button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(80, 48, 62, 0.1);
}

.login-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.login-mode-panel,
.reset-password-fields {
  display: grid;
  gap: 14px;
}

.verification-heading {
  display: grid;
  gap: 6px;
}

.verification-heading strong {
  font-size: 16px;
}

.verification-timer {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.verification-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.input-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.input-with-action button {
  min-width: 108px;
}

.password-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.password-wrap .password-toggle {
  min-width: 56px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.password-wrap .password-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  margin-top: -2px;
}

.login-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.account-tabs {
  width: min(560px, 100%);
  margin-bottom: 18px;
}

.form-toolbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.file-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.form-error {
  min-height: 20px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #fff8fb 0%, #ffffff 36%, #fffafd 72%, #fff5f9 100%);
  color: var(--ink);
  box-shadow: 8px 0 28px rgba(184, 88, 120, 0.07);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand-row,
.job-card-header,
.record-header,
.resume-header,
.account-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.brand-row strong,
.brand-row span {
  display: block;
}

.brand-row span,
.sidebar-panel span {
  color: var(--muted);
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nav-badge,
.notification-count {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--notice);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.nav-item.active,
.nav-item:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.sidebar-panel {
  margin-top: auto;
  padding: 18px;
  border: 1px solid #ffd4e4;
  border-radius: 8px;
  background: var(--surface-strong);
}

.sidebar-panel strong {
  display: block;
  margin: 8px 0 16px;
  font-size: 28px;
}

.mini-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: 8px;
  height: 74px;
}

.mini-bars i {
  display: block;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--accent), #ffc9dc);
}

.mini-bars i:nth-child(1) {
  height: 38%;
}

.mini-bars i:nth-child(2) {
  height: 72%;
}

.mini-bars i:nth-child(3) {
  height: 54%;
}

.mini-bars i:nth-child(4) {
  height: 88%;
}

.main {
  padding: 30px;
  display: grid;
  align-content: start;
  gap: 22px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.account-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.account-chip {
  min-height: 48px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.notification-button {
  position: relative;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.notification-button > span:first-child {
  color: var(--notice);
  font-size: 12px;
}

.account-chip span {
  color: var(--muted);
  font-size: 12px;
}

.account-chip strong {
  font-size: 14px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
}

h3 {
  margin-bottom: 5px;
  font-size: 18px;
}

h4 {
  margin-bottom: 4px;
}

.primary-action,
.ghost-button,
.danger-button {
  box-sizing: border-box;
  min-height: 42px;
  border-radius: 8px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  text-decoration: none;
}

.primary-action {
  border: 0;
  background: var(--accent);
  color: #ffffff;
}

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

.ghost-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.danger-button {
  border: 1px solid #efc6ca;
  background: #fff5f6;
  color: var(--danger);
}

.link-button,
a {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  padding: 0;
  text-decoration: none;
}

.link-button:hover,
a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metrics article,
.panel,
.funnel-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.funnel-panel {
  padding: 20px 22px;
  min-width: 0;
}

.funnel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.funnel-heading > span {
  color: var(--muted);
  font-size: 13px;
}

.funnel-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.funnel-chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(92px, 1fr));
  gap: 10px;
  overflow-x: auto;
}

.funnel-step {
  min-width: 92px;
  display: grid;
  gap: 7px;
  align-content: end;
}

.funnel-step strong {
  font-size: 22px;
}

.funnel-bar-track {
  height: 74px;
  display: flex;
  align-items: end;
  border-radius: 6px;
  background: var(--surface-strong);
  overflow: hidden;
}

.funnel-bar {
  width: 100%;
  min-height: 4px;
  background: var(--accent);
}

.funnel-step:nth-child(2n) .funnel-bar {
  background: var(--gold);
}

.funnel-step span {
  color: var(--muted);
  font-size: 12px;
}

.metrics article {
  padding: 18px;
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.view {
  display: none;
  min-width: 0;
}

.view.active {
  display: block;
}

.panel {
  padding: 22px;
  min-width: 0;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.job-form,
.filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.job-form {
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffafd;
}

.filters {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(170px, 1fr);
  align-items: end;
  margin-bottom: 18px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.template-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 190px;
  align-items: stretch;
  gap: 10px;
  max-width: 100%;
  overflow-x: auto;
  flex-wrap: nowrap;
}

.template-actions > .primary-action,
.template-actions > .ghost-button {
  width: 190px;
  min-height: 42px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  padding: 11px 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 79, 139, 0.14);
}

input[readonly] {
  background: var(--surface-strong);
}

.wide {
  grid-column: 1 / -1;
}

.range-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.form-actions,
.job-actions,
.record-actions,
.resume-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.job-list,
.record-list,
.resume-list,
.account-list {
  display: grid;
  gap: 12px;
}

.job-card,
.record-card,
.resume-card,
.account-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.needs-attention {
  border-color: #fbbf24;
  box-shadow: inset 4px 0 0 var(--attention);
}

.attention-label {
  color: var(--attention-dark) !important;
  background: var(--attention-soft) !important;
}

.red-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--notice);
  box-shadow: 0 0 0 3px var(--notice-soft);
}

.attention-label .red-dot,
.needs-attention .red-dot {
  background: var(--attention);
  box-shadow: 0 0 0 3px var(--attention-soft);
}

.job-card-header,
.record-header,
.resume-header,
.account-row {
  justify-content: space-between;
}

.job-card p,
.record-card p,
.resume-card p,
.account-card p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.job-meta span,
.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.status-chip.hot {
  background: #f8e7d1;
  color: var(--warning);
}

.status-chip.priority {
  background: #f5dfe1;
  color: var(--danger);
}

.status-chip.status-open {
  background: #dff1e5;
  color: #17663a;
}

.status-chip.status-paused {
  background: #eeeeee;
  color: #555555;
}

.status-chip.status-closed {
  background: #e2e5e9;
  color: #454b54;
}

.status-chip.status-demand-closed {
  background: #dddfe3;
  color: #343942;
}

.status-chip.status-submitted {
  background: #e2ecf7;
  color: #245c91;
}

.status-chip.status-interview-pending {
  background: #fff0cf;
  color: #8a5b00;
}

.status-chip.status-interview-scheduled {
  background: #dff3f5;
  color: #176873;
}

.status-chip.status-interview-passed {
  background: #daf2df;
  color: #176b35;
}

.status-chip.status-interview-failed {
  background: #f7dcdf;
  color: #9b2634;
}

.status-chip.status-unmatched {
  background: #f4e1d9;
  color: #954329;
}

.status-chip.status-entry-pending {
  background: #ece4f5;
  color: #68418b;
}

.status-chip.status-returned {
  background: #f8e5cf;
  color: #8d4d13;
}

.status-chip.status-entry-confirmed {
  background: #d8eee9;
  color: #136658;
}

.status-chip.status-vendor-closed {
  background: #e6e0e8;
  color: #5e4b66;
}

.empty-state {
  padding: 30px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.resume-card {
  background: #fffafd;
}

.collapsed-submissions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.resume-note {
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-strong);
}

.checkbox-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.checklist-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.checklist-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

.checkbox-grid input {
  width: auto;
}

.field-title {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.time-range-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.time-range-row .field-title {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.time-range-row label {
  min-width: 0;
}

.inline-confirm-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.entry-time-picker {
  position: relative;
}

.entry-time-picker > input[readonly] {
  cursor: pointer;
  background: #fff;
}

.entry-time-popover {
  position: absolute;
  z-index: 45;
  top: calc(100% + 8px);
  left: 0;
  width: min(360px, 90vw);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.entry-time-popover.hidden {
  display: none;
}

.entry-time-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.slot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.slot-list span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  font-weight: 700;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1280px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 13px;
}

td {
  font-size: 14px;
  line-height: 1.5;
}

td .link-button,
td .status-chip {
  white-space: nowrap;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(460px, 92vw);
  height: 100vh;
  padding: 26px;
  background: var(--surface);
  box-shadow: -22px 0 55px rgba(92, 55, 71, 0.14);
  transform: translateX(105%);
  transition: transform 0.2s ease;
  z-index: 20;
  overflow-y: auto;
}

.notification-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  width: min(420px, 94vw);
  height: 100vh;
  padding: 24px;
  overflow-y: auto;
  background: #fff;
  box-shadow: -22px 0 55px rgba(92, 55, 71, 0.16);
  transform: translateX(105%);
  transition: transform 0.2s ease;
}

.notification-drawer.open {
  transform: translateX(0);
}

.notification-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-item {
  width: 100%;
  display: grid;
  gap: 7px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.notification-item.unread {
  border-color: #93c5fd;
  background: var(--notice-soft);
}

.notification-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.notification-item p,
.confirm-modal p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.notification-item time {
  color: var(--muted);
  font-size: 12px;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.drawer > .drawer-close {
  position: sticky;
  top: 0;
  z-index: 4;
  float: right;
  box-shadow: 0 3px 10px rgba(92, 55, 71, 0.1);
}

.detail-stack {
  clear: both;
  display: grid;
  gap: 16px;
}

.detail-stack h2 {
  padding-top: 20px;
}

.drawer-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.drawer-heading h2 {
  padding-top: 0;
}

.compact-button {
  min-height: 34px;
  padding: 0 12px;
}

.batch-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.batch-select-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

.row-check-inline {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  vertical-align: middle;
  cursor: pointer;
}

.row-check-inline input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

#submissionRows input[type="checkbox"],
#submissionRows .admin-only input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

#submissionsView thead th:first-child {
  width: 36px;
  text-align: center;
}

#submissionsView tbody td:first-child {
  text-align: center;
}

.detail-box {
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-strong);
  line-height: 1.7;
}

.detail-box span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.flow-list {
  list-style: none;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 4px 0 0;
}

.flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding-bottom: 18px;
}

.flow-step::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 22px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.flow-step:last-child::before {
  display: none;
}

.flow-dot {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  margin-top: 4px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.flow-step.done .flow-dot,
.flow-step.current .flow-dot {
  border-color: var(--accent);
  background: var(--accent);
}

.flow-step.current .flow-dot {
  box-shadow: 0 0 0 5px rgba(255, 79, 139, 0.14);
}

.flow-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.flow-step.current .flow-card {
  border-color: var(--accent);
}

.flow-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.flow-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.flow-step.pending .flow-card {
  color: var(--muted);
  background: var(--surface-strong);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(38, 53, 75, 0.42);
  z-index: 30;
}

.modal-backdrop.open {
  display: grid;
}

.modal {
  width: min(720px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 8px;
  background: var(--surface);
  padding: 24px;
  box-shadow: var(--shadow);
}

.job-editor-modal {
  width: min(980px, 100%);
}

.job-editor-modal .modal-heading {
  position: sticky;
  top: -24px;
  z-index: 3;
  padding: 20px 0 14px;
  background: var(--surface);
}

.job-editor-modal .job-form {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.confirm-modal {
  width: min(440px, 100%);
  display: grid;
  gap: 16px;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(38, 53, 75, 0.28);
}

.loading-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.toast-region {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 110;
  width: min(420px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
}

.toast {
  padding: 13px 15px;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--ink);
}

.toast.error {
  border-left-color: var(--danger);
}

@media (max-width: 1180px) {
  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .main,
  .sidebar {
    padding: 20px;
  }

  .topbar,
  .section-heading,
  .job-card-header,
  .record-header,
  .resume-header,
  .account-row {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics,
  .job-form,
  .funnel-filters,
  .checkbox-grid,
  .time-range-row,
  .inline-confirm-field {
    grid-template-columns: 1fr;
  }

  .segmented-control {
    grid-template-columns: 1fr;
  }

  .input-with-action {
    grid-template-columns: 1fr;
  }

  .funnel-chart {
    grid-template-columns: repeat(6, 92px);
  }

  .entry-time-popover {
    position: static;
    width: 100%;
    margin-top: 8px;
  }

  .form-actions,
  .job-actions,
  .record-actions,
  .resume-actions,
  .form-toolbar {
    flex-direction: column;
  }

  .file-trigger {
    width: 100%;
  }
}
