/* ============================================================
   Career Sentinel — employer.html styles
   Extends styles.css; does not override any global rules.
   Brand: Royal Blue #1d4ed8, bg royal-navy-black #0b1538→#030611
   Gold accents #d4a72c/#fcd34d. Desk-lamp voice.
   ============================================================ */

/* ── Nav extras ── */
.nav-back-link {
  color: var(--text-dim);
  font-size: 0.93rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-back-link:hover { color: var(--text); }
.nav-divider {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: var(--border);
  vertical-align: middle;
}
.nav-b2b-badge {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

/* ── Employer hero ── */
.emp-hero {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
  overflow: hidden;
}
.emp-hero-glow {
  position: absolute;
  top: -100px; left: 50%; transform: translateX(-50%);
  width: 700px; height: 400px;
  pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side, rgba(37,99,235,0.35), transparent 70%);
  filter: blur(40px); opacity: 0.6;
}
.emp-hero-inner {
  position: relative; z-index: 1;
  max-width: 780px;
}
.emp-hero-title {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin: 1rem 0 1.2rem;
}
.emp-hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text-dim);
  max-width: 60ch;
  margin-bottom: 1.5rem;
  line-height: 1.65;
}
.emp-hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.emp-hero-trust span {
  position: relative;
  padding-left: 1.1rem;
}
.emp-hero-trust span::before {
  content: "";
  position: absolute; left: 0; top: 0.55em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 8px var(--gold-border);
}

/* ── Shared section typography ── */
.emp-section-head {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.emp-section-sub {
  color: var(--text-dim);
  font-size: 0.97rem;
  margin-top: 0.35rem;
  max-width: 52ch;
}

/* ── Builder section ── */
.emp-builder {
  padding: 0 1.5rem 4rem;
}
.emp-builder-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}
.emp-builder-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
}

/* Sample button */
.emp-sample-btn {
  white-space: nowrap;
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  color: var(--gold-bright);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.emp-sample-btn:hover {
  background: rgba(212,167,44,0.2);
  border-color: var(--gold);
}

/* Company name */
.emp-company-row {
  margin-bottom: 1.2rem;
  max-width: 320px;
}
.emp-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}
.emp-company-input {
  width: 100%;
}

/* Roster */
.emp-roster-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.2rem;
}
.emp-roster-header {
  display: grid;
  grid-template-columns: 1fr 130px 160px 44px;
  gap: 0.8rem;
  padding: 0.7rem 1rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.emp-roster-rows {
  display: grid;
  gap: 0;
}

/* Individual roster row */
.emp-row {
  display: grid;
  grid-template-columns: 1fr 130px 160px 44px;
  gap: 0.8rem;
  align-items: start;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.emp-row:last-child {
  border-bottom: none;
}

/* Role autocomplete field */
.emp-role-field-wrap {
  position: relative;
}
.emp-role-input {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border-hover);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.emp-role-input::placeholder { color: var(--text-muted); }
.emp-role-input:focus {
  outline: none;
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 2px var(--blue-soft);
}
.emp-role-input.is-confirmed {
  border-color: rgba(52,211,153,0.4);
}

/* Role autocomplete dropdown */
.emp-ac-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #0d1a3a;
  border: 1px solid var(--blue-border);
  border-radius: 12px;
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}
.emp-ac-dropdown li {
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  color: var(--text-dim);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.emp-ac-dropdown li:last-child { border-bottom: none; }
.emp-ac-dropdown li:hover,
.emp-ac-dropdown li[aria-selected="true"] {
  background: var(--blue-soft);
  color: var(--text);
}
.emp-ac-dropdown li.emp-dd-empty {
  color: var(--text-muted);
  cursor: default;
  font-size: 0.85rem;
}
.emp-ac-dropdown mark {
  background: none;
  color: var(--blue-bright);
  font-weight: 700;
}

/* Number inputs (headcount, salary) */
.emp-number-input {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border-hover);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  transition: border-color 0.15s;
}
.emp-number-input::placeholder { color: var(--text-muted); }
.emp-number-input:focus {
  outline: none;
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 2px var(--blue-soft);
}

/* Remove row button */
.emp-remove-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  margin-top: 2px;
}
.emp-remove-btn:hover {
  color: var(--bad);
  border-color: rgba(248,113,113,0.35);
  background: rgba(248,113,113,0.08);
}

/* Roster actions bar */
.emp-roster-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.emp-add-row-btn {
  background: none;
  border: 1px solid var(--blue-border);
  color: var(--blue-bright);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.emp-add-row-btn:hover {
  background: var(--blue-soft);
  border-color: var(--blue-bright);
}
.emp-assess-wrap {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.emp-assess-btn {
  font-size: 1rem;
  padding: 0.8rem 1.6rem;
}
.emp-assess-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
  transform: none;
  box-shadow: none;
}
.emp-assess-note {
  font-size: 0.83rem;
  color: var(--text-muted);
}

/* ── Report section ── */
.emp-report {
  padding: 0 1.5rem 5rem;
}
.emp-report-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}

/* States: loading / error */
.emp-state {
  text-align: center;
  padding: 4rem 1rem;
}
.emp-state-msg {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.emp-state-sub {
  color: var(--text-muted);
  font-size: 0.93rem;
}
.emp-state-sub code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  background: var(--bg-card);
  padding: 0.1em 0.35em;
  border-radius: 5px;
  font-size: 0.88em;
}
.emp-state-error .emp-state-msg { color: var(--bad); }
.emp-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--blue-bright);
  border-radius: 50%;
  animation: emp-spin 0.8s linear infinite;
  margin: 0 auto 1.2rem;
}
@keyframes emp-spin { to { transform: rotate(360deg); } }
.emp-retry-btn {
  margin-top: 1.2rem;
  background: none;
  border: 1px solid var(--border-hover);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.emp-retry-btn:hover { border-color: var(--blue-bright); color: var(--text); }

/* Report header */
.emp-report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.emp-report-company {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0.4rem 0 0.2rem;
}
.emp-report-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
}
.emp-ghost-btn {
  background: none;
  border: 1px solid var(--border-hover);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.emp-ghost-btn:hover { border-color: var(--blue-bright); color: var(--text); }

/* ── Metric cards row ── */
.emp-metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}
.emp-metric-card {
  background: linear-gradient(165deg, rgba(11,21,56,0.9), rgba(7,13,36,0.7));
  border: 1px solid var(--blue-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 16px 48px -12px rgba(0,0,0,0.6);
}
.emp-metric-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 1rem;
}
.emp-metric-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.8rem;
  line-height: 1.5;
}

/* Readiness arc */
.emp-readiness-dial-wrap {
  display: flex;
  justify-content: center;
}
.emp-readiness-arc {
  position: relative;
  width: 160px;
}
.emp-arc-svg {
  width: 100%;
  overflow: visible;
}
.emp-arc-track {
  fill: none;
  stroke: rgba(255,255,255,0.08);
  stroke-width: 10;
  stroke-linecap: round;
}
.emp-arc-fill {
  fill: none;
  stroke: var(--blue-bright);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 189; /* circumference of the 60-radius arc */
  stroke-dashoffset: 189; /* fully hidden initially */
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4,0,0.2,1), stroke 0.6s;
}
.emp-arc-score-wrap {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  padding-bottom: 2px;
}
.emp-arc-score {
  display: block;
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}
.emp-arc-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Payroll card */
.emp-payroll-hero {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}
.emp-payroll-at-risk {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--bad);
}
.emp-payroll-of {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.emp-payroll-total {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dim);
}
.emp-payroll-pct-badge {
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(248,113,113,0.12);
  border: 1px solid rgba(248,113,113,0.3);
  color: var(--bad);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  margin-left: 0.2rem;
}
.emp-payroll-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Heatmap stacked bar */
.emp-heatmap-bar-wrap {
  display: flex;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.65rem;
  gap: 2px;
}
.emp-heatmap-segment {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(0,0,0,0.7);
  min-width: 0;
  overflow: hidden;
  transition: flex 0.8s cubic-bezier(0.4,0,0.2,1);
  border-radius: 6px;
}
.emp-heatmap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
}
.emp-legend-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.73rem;
  color: var(--text-muted);
}
.emp-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Heatmap colors: green → yellow → orange → red ramp */
.emp-band-low          { background: #34d399; }
.emp-band-moderate     { background: #a3e635; }
.emp-band-moderate-high{ background: #fbbf24; }
.emp-band-high         { background: #f97316; }
.emp-band-very-high    { background: #f87171; }

/* ── Sub-section shared ── */
.emp-sub-head {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 0.35rem;
}
.emp-sub-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

/* ── Reskill cards ── */
.emp-reskill-section {
  margin-bottom: 2.5rem;
}
.emp-reskill-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.emp-reskill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem 1.3rem;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}
.emp-reskill-card:hover {
  border-color: var(--blue-border);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.emp-reskill-card-icon {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  display: block;
}
.emp-reskill-narrative {
  font-size: 0.93rem;
  color: var(--text);
  line-height: 1.55;
}

/* ── Role table ── */
.emp-roles-section {
  margin-bottom: 2.5rem;
}
.emp-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.emp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.emp-table thead tr {
  background: rgba(255,255,255,0.035);
  border-bottom: 1px solid var(--border);
}
.emp-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.emp-col-num { text-align: right; }
.emp-col-expand { width: 36px; }
.emp-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.emp-table tbody tr:last-child {
  border-bottom: none;
}
.emp-table tbody tr:hover {
  background: rgba(255,255,255,0.02);
}
.emp-table td {
  padding: 0.75rem 1rem;
  color: var(--text-dim);
  vertical-align: top;
}
.emp-td-role {
  font-weight: 600;
  color: var(--text);
}
.emp-td-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}
.emp-exposure-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}
.emp-exposure-low          { background: rgba(52,211,153,0.12); color: #34d399; border: 1px solid rgba(52,211,153,0.3); }
.emp-exposure-moderate     { background: rgba(163,230,53,0.1);  color: #a3e635; border: 1px solid rgba(163,230,53,0.3); }
.emp-exposure-moderate-high{ background: rgba(251,191,36,0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.emp-exposure-high         { background: rgba(249,115,22,0.12); color: #f97316; border: 1px solid rgba(249,115,22,0.3); }
.emp-exposure-very-high    { background: rgba(248,113,113,0.12);color: #f87171; border: 1px solid rgba(248,113,113,0.3); }

/* Expand row button */
.emp-expand-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.3rem 0.4rem;
  border-radius: 6px;
  transition: color 0.12s, background 0.12s;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.emp-expand-btn:hover { color: var(--blue-bright); background: var(--blue-soft); }
.emp-expand-btn[aria-expanded="true"] { color: var(--blue-bright); }

/* Task expansion row */
.emp-tasks-row {
  background: rgba(7,13,36,0.6);
}
.emp-tasks-row td {
  padding: 0.6rem 1rem 0.9rem 1rem;
}
.emp-tasks-list {
  list-style: none;
  display: grid;
  gap: 0.35rem;
  margin-top: 0.3rem;
}
.emp-tasks-list li {
  font-size: 0.84rem;
  color: var(--text-muted);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.5;
}
.emp-tasks-list li::before {
  content: "·";
  position: absolute; left: 0.2rem;
  color: var(--bad);
  font-weight: 900;
}
.emp-tasks-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}

/* ── Caveats footer ── */
.emp-caveats {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  margin-top: 1rem;
}
.emp-caveats-head {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.7rem;
}
.emp-caveats-body {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.emp-caveats-body p {
  margin-bottom: 0.4rem;
}
.emp-caveats-body p:last-child {
  margin-bottom: 0;
}
.emp-caveats-disclaimer {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  font-style: italic;
  font-size: 0.82rem;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(11,21,56,0.95);
  border: 1px solid var(--blue-border);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.7rem 1.3rem;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  z-index: 200;
  backdrop-filter: blur(10px);
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.is-error { border-color: rgba(248,113,113,0.5); color: var(--bad); }
.toast.is-success { border-color: rgba(52,211,153,0.5); color: var(--good); }

/* ── Responsive ── */
@media (max-width: 860px) {
  .emp-metrics-row {
    grid-template-columns: 1fr;
  }
  .emp-reskill-list {
    grid-template-columns: 1fr;
  }
  .emp-builder-head-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .emp-roster-header,
  .emp-row {
    grid-template-columns: 1fr 90px 120px 36px;
  }
}
@media (max-width: 640px) {
  .emp-roster-header {
    display: none;
  }
  .emp-row {
    grid-template-columns: 1fr 80px 36px;
  }
  /* Hide salary column on small screens */
  .emp-row .emp-salary-cell { display: none; }
}

/* ── Employer hero auth CTA (create account / sign in) ──────────────── */
.emp-hero-auth {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}
.emp-hero-auth .cta-btn,
.emp-hero-auth .emp-ghost-btn {
  margin: 0;
}
.emp-hero-auth-note {
  flex-basis: 100%;
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--text-dim, #94a3b8);
}
