/* ============================================================
   RecruitIQ — shared styles
   Palette: ink navy / paper / cobalt / verify green
   Type: Archivo (display) · Inter (body) · IBM Plex Mono (data)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@600;700;800&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --ink: #0E1A2B;
  --ink-soft: #1B2A40;
  --paper: #FAFBFC;
  --white: #FFFFFF;
  --cobalt: #2553E9;
  --cobalt-dark: #1B3FB8;
  --cobalt-tint: #EDF1FE;
  --verify: #14976B;
  --verify-tint: #E6F6F0;
  --slate: #45526B;
  --muted: #7A869C;
  --line: #E3E8F0;
  --danger: #C8463C;
  --danger-tint: #FBEDEC;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(14, 26, 43, 0.08);
  --font-display: 'Archivo', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cobalt); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 800; font-size: 20px; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo .iq { color: var(--cobalt); }
.nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.nav .btn-cta { margin-left: 4px; }
.nav a { color: var(--slate); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a.active { color: var(--ink); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600; font-size: 15px;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  text-align: center;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--cobalt); color: var(--white); }
.btn-primary:hover { background: var(--cobalt-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-cta { background: transparent; color: var(--cobalt); border-color: var(--cobalt); font-weight: 600; }
.btn-cta:hover { background: var(--cobalt); color: var(--white); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 8px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--cobalt); outline-offset: 2px;
}

/* ---------- Hero ---------- */
.hero { padding: 88px 0 72px; background: var(--white); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--cobalt); margin-bottom: 18px;
}
h1 {
  font-family: var(--font-display);
  font-weight: 800; font-size: 46px; line-height: 1.12; letter-spacing: -0.025em;
  margin-bottom: 18px;
}
.hero p.lede { font-size: 18px; color: var(--slate); margin-bottom: 30px; max-width: 46ch; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Record card (signature element) ---------- */
.record-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 22px 24px;
  font-size: 14px;
}
.record-card .rc-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.record-card .rc-company {
  font-family: var(--font-display); font-weight: 700; font-size: 17px;
}
.record-card dl { display: grid; grid-template-columns: 110px 1fr; row-gap: 9px; }
.record-card dt { color: var(--muted); font-size: 13px; }
.record-card dd { font-family: var(--font-mono); font-size: 13.5px; color: var(--ink-soft); overflow-wrap: anywhere; }
.record-stack { position: relative; }
.record-stack .record-card:nth-child(2) {
  position: absolute; inset: 14px -14px -14px 14px; z-index: -1; opacity: 0.5;
}

.badge-verified {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--verify-tint); color: var(--verify);
  font-size: 12.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
}
.badge-verified::before { content: "✓"; font-weight: 700; }
.badge-unverified {
  display: inline-flex; align-items: center;
  background: #F1F3F7; color: var(--muted);
  font-size: 12.5px; font-weight: 500;
  padding: 4px 10px; border-radius: 999px;
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 30px; letter-spacing: -0.02em; margin-bottom: 12px;
}
.section-sub { color: var(--slate); max-width: 60ch; margin-bottom: 40px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
}
.feature h3 { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--slate); font-size: 15px; }
.feature .field-tag {
  font-family: var(--font-mono); font-size: 12.5px;
  background: var(--cobalt-tint); color: var(--cobalt-dark);
  padding: 2px 8px; border-radius: 6px; display: inline-block; margin: 2px 2px 0 0;
}

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 14px; padding: 30px 26px;
  display: flex; flex-direction: column;
}
.plan.featured { border-color: var(--cobalt); box-shadow: var(--shadow); position: relative; }
.plan.featured::before {
  content: "Most popular";
  position: absolute; top: -12px; left: 26px;
  background: var(--cobalt); color: var(--white);
  font-size: 12px; font-weight: 600; padding: 3px 12px; border-radius: 999px;
}
.plan h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.plan .price {
  font-family: var(--font-display); font-weight: 800; font-size: 40px;
  letter-spacing: -0.02em; margin: 12px 0 2px;
}
.plan .price-note { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }
.plan ul { list-style: none; margin-bottom: 26px; flex: 1; }
.plan li { padding: 7px 0; font-size: 14.5px; color: var(--slate); border-bottom: 1px solid var(--line); }
.plan li:last-child { border-bottom: none; }
.plan li::before { content: "✓  "; color: var(--verify); font-weight: 700; }

/* ---------- Forms / cards ---------- */
.auth-card {
  max-width: 420px; margin: 64px auto;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 14px; padding: 34px; box-shadow: var(--shadow);
}
.auth-card h2 { font-family: var(--font-display); font-weight: 700; font-size: 24px; margin-bottom: 6px; }
.auth-card .sub { color: var(--slate); font-size: 14.5px; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field .field-hint { color: var(--muted); font-size: 12.5px; margin-top: 5px; margin-bottom: 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], select {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--font-body); font-size: 15px; color: var(--ink);
  background: var(--white);
}
input:focus, select:focus { border-color: var(--cobalt); outline: none; }
.form-msg { font-size: 14px; margin-top: 14px; padding: 11px 13px; border-radius: 8px; display: none; }
.form-msg.ok { display: block; background: var(--verify-tint); color: var(--verify); }
.form-msg.err { display: block; background: var(--danger-tint); color: var(--danger); }
.auth-toggle { text-align: center; font-size: 14px; color: var(--slate); margin-top: 18px; }

/* ---------- Database table ---------- */
.toolbar {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  margin-bottom: 18px;
}
.toolbar input[type="text"] { max-width: 320px; }
.toolbar select { max-width: 240px; width: auto; }
.toolbar .spacer { flex: 1; }
.count-note { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

.table-wrap {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow-x: auto;
}
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 900px; }
table.data th {
  text-align: left; font-weight: 600; font-size: 13px;
  color: var(--slate); background: var(--paper);
  padding: 11px 14px; border-bottom: 1px solid var(--line);
  white-space: nowrap; cursor: pointer; user-select: none;
}
table.data th .arrow { color: var(--cobalt); }
table.data td {
  padding: 11px 14px; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.data tr:last-child td { border-bottom: none; }
table.data td.mono { font-family: var(--font-mono); font-size: 13px; overflow-wrap: anywhere; }
table.data td .co { font-weight: 600; }

.pager { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.pager .count-note { flex: 1; text-align: right; }

/* ---------- Locked / status screens ---------- */
.locked-card {
  max-width: 520px; margin: 64px auto; text-align: center;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 14px; padding: 44px 36px; box-shadow: var(--shadow);
}
.locked-card .lock-ico { font-size: 34px; margin-bottom: 14px; }
.locked-card h2 { font-family: var(--font-display); font-weight: 700; font-size: 24px; margin-bottom: 10px; }
.locked-card p { color: var(--slate); margin-bottom: 22px; }

/* ---------- Admin ---------- */
.admin-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px;
}
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(14,26,43,0.45);
  display: none; align-items: flex-start; justify-content: center;
  padding: 48px 16px; z-index: 100; overflow-y: auto;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--white); border-radius: 14px; padding: 30px;
  width: 100%; max-width: 560px; box-shadow: var(--shadow);
}
.modal h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; margin-bottom: 18px; }
.modal .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.row-actions { white-space: nowrap; }
.row-actions button {
  background: none; border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 10px; font-size: 13px; cursor: pointer; margin-right: 6px;
  font-family: var(--font-body);
}
.row-actions button:hover { border-color: var(--ink); }
.row-actions button.del:hover { border-color: var(--danger); color: var(--danger); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); background: var(--white);
  padding: 30px 0; margin-top: 72px;
}
.site-footer .container {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; color: var(--muted); flex-wrap: wrap; gap: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  h1 { font-size: 34px; }
  .feature-grid, .pricing-grid { grid-template-columns: 1fr; }
  .record-stack .record-card:nth-child(2) { display: none; }
  .modal .grid2 { grid-template-columns: 1fr; }
  .site-header .container { height: auto; min-height: 56px; padding-top: 8px; padding-bottom: 8px; }
  .nav { gap: 12px; row-gap: 8px; justify-content: flex-end; }
  .nav a { font-size: 14px; }
  .nav .btn-sm { padding: 7px 12px; }
}
@media (max-width: 480px) {
  .nav { gap: 10px; }
  .nav .btn-cta { margin-left: 2px; }
}

/* ============================================================
   AG Grid integration — Clay-style clean finish, RecruitIQ brand
   ============================================================ */

/* Wider container for the data pages so the grid has room to breathe */
.container-wide { max-width: 1320px; }

/* The grid surface */
.riq-grid {
  width: 100%;
  height: 70vh;
  min-height: 460px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
}

/* Theme tokens — map AG Grid's Quartz theme onto the RecruitIQ palette */
.ag-theme-quartz.riq-grid {
  --ag-font-family: var(--font-body);
  --ag-font-size: 14px;
  --ag-foreground-color: var(--ink);
  --ag-background-color: var(--white);
  --ag-header-background-color: #F5F7FB;
  --ag-header-foreground-color: var(--slate);
  --ag-header-column-separator-display: none;
  --ag-border-color: var(--line);
  --ag-row-border-color: var(--line);
  --ag-row-hover-color: var(--cobalt-tint);
  --ag-selected-row-background-color: var(--cobalt-tint);
  --ag-cell-horizontal-padding: 18px;
  --ag-borders: none;
  --ag-wrapper-border-radius: 0;
  --ag-header-height: 46px;
}

/* Headers: tighter, uppercase, quietly authoritative */
.ag-theme-quartz.riq-grid .ag-header-cell-text {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Keep every cell on one line — truncate with … and show full text on hover */
.ag-theme-quartz.riq-grid .ag-cell {
  display: flex;
  align-items: center;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pinned company column gets a subtle divider so it reads as an anchor */
.ag-theme-quartz.riq-grid .ag-pinned-left-cols-container {
  box-shadow: 1px 0 0 var(--line);
}

/* Two-line cell (company + website, contact + LinkedIn) without breaking row height */
.cell-stack {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.25;
  overflow: hidden;
}
.cell-stack .cell-strong { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-stack .cell-sub {
  font-size: 12px; color: var(--cobalt);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cell-stack .cell-sub:hover { text-decoration: underline; }

/* Monospace for data fields (emails, numbers) — aligns and reads cleanly */
.cell-mono {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--slate);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
a.cell-mono { color: var(--cobalt); }
a.cell-mono:hover { text-decoration: underline; }

/* Empty / loading overlay text */
.grid-empty { color: var(--muted); font-size: 14px; }

/* Admin row actions inside the grid */
.row-actions .link-btn {
  background: none; border: none; padding: 0 10px 0 0;
  font-family: var(--font-body); font-size: 13px; cursor: pointer;
  color: var(--cobalt);
}
.row-actions .link-btn:hover { text-decoration: underline; }
.row-actions .link-danger { color: var(--danger); }

/* Toolbar: let the count note sit inline before the export button */
.toolbar .count-note { font-size: 13px; color: var(--muted); }

@media (max-width: 880px) {
  .riq-grid { height: 64vh; }
}

/* ---------- Coming-soon pricing cards ---------- */
.plan-soon { position: relative; opacity: 0.72; }
.plan-soon .price { color: var(--muted); }
.plan-soon button[disabled] {
  cursor: default; opacity: 0.6; pointer-events: none;
}
.soon-tag {
  position: absolute; top: 14px; right: 14px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--slate); background: #EEF1F6;
  padding: 4px 9px; border-radius: 999px;
}

/* ---------- Pricing: limited-time tag + monthly price suffix ---------- */
.soon-tag-hot {
  color: #fff; background: var(--cobalt);
}
.price-per { font-size: 18px; font-weight: 500; color: var(--muted); }
.featured .soon-tag-hot { top: 14px; right: 14px; }
