/* =====================================================================
   HigherTalent — global stylesheet
   Themes: slate · midnight · ivory · harbor  (Bootstrap 5.3 compatible)
   ===================================================================== */

/* ----------------------------- Tokens ----------------------------- */
:root, [data-theme="slate"] {
  --ht-accent: #33557c;
  --ht-accent-2: #4a7099;
  --ht-ink: #1d242e;
  --ht-muted: #5b6570;
  --ht-paper: #ffffff;
  --ht-nav: #171b21;
  --ht-line: #dde3ea;
  --ht-panel: #f5f7f9;
  --ht-ok: #2e6b45;
  --ht-warn: #8a611b;
}
[data-theme="midnight"] {
  --ht-accent: #274156;
  --ht-accent-2: #3d607a;
  --ht-ink: #16181c;
  --ht-muted: #575f69;
  --ht-paper: #ffffff;
  --ht-nav: #10141a;
  --ht-line: #d7dee4;
  --ht-panel: #f3f5f7;
}
[data-theme="ivory"] {
  --ht-accent: #5a5142;
  --ht-accent-2: #77694f;
  --ht-ink: #241f18;
  --ht-muted: #6a6154;
  --ht-paper: #fffdf8;
  --ht-nav: #211c14;
  --ht-line: #e4ddcf;
  --ht-panel: #f7f3ea;
}
[data-theme="harbor"] {
  --ht-accent: #1f5f5b;
  --ht-accent-2: #2f7d78;
  --ht-ink: #17201f;
  --ht-muted: #55605f;
  --ht-paper: #ffffff;
  --ht-nav: #0f1a19;
  --ht-line: #d5e0de;
  --ht-panel: #eff5f4;
}

html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ht-ink);
  background: var(--ht-paper);
}
a { color: var(--ht-accent); }
a:hover { color: var(--ht-accent-2); }

/* ----------------------------- Navigation ----------------------------- */
.ht-nav {
  background: var(--ht-nav);
  min-height: 64px;
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 6px 18px rgba(9,12,16,.22);
}
.ht-nav .nav-link { color: #cfd6de; font-weight: 500; }
.ht-nav .nav-link:hover, .ht-nav .nav-link:focus { color: #ffffff; }
.ht-nav .nav-link.active { color: #ffffff; position: relative; }
.ht-nav .nav-link.active::after {
  content: ""; position: absolute; left: .25rem; right: .25rem; bottom: 2px;
  height: 2px; background: #d8b64c; border-radius: 2px;
}
.ht-brand {
  color: #fff; font-weight: 650; letter-spacing: .02em; font-size: 1.15rem;
}
.ht-logo { display: block; }

.btn-accent {
  background: var(--ht-accent); border-color: var(--ht-accent); color: #fff; font-weight: 600;
}
.btn-accent:hover, .btn-accent:focus {
  background: var(--ht-accent-2); border-color: var(--ht-accent-2); color: #fff;
}
.btn-outline-accent {
  border-color: var(--ht-accent); color: var(--ht-accent); font-weight: 600;
}
.btn-outline-accent:hover {
  background: var(--ht-accent); border-color: var(--ht-accent); color: #fff;
}

/* ----------------------------- Heroes ----------------------------- */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 96px 0;
  overflow: hidden;
}
.hero:nth-of-type(odd)  { background: var(--ht-paper); }
.hero:nth-of-type(even) { background: var(--ht-panel); }
.hero-media {
  height: 62vh;
  max-height: 560px;
  min-height: 320px;
}
.hero-media img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.82) contrast(1.04);
  -webkit-mask-image: linear-gradient(to left, #000 45%, transparent 98%);
          mask-image: linear-gradient(to left, #000 45%, transparent 98%);
}
.hero.flip .hero-media img {
  -webkit-mask-image: linear-gradient(to right, #000 45%, transparent 98%);
          mask-image: linear-gradient(to right, #000 45%, transparent 98%);
}
.hero-kicker {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--ht-accent);
  margin-bottom: .9rem;
}
.hero h1, .hero h2 {
  font-weight: 750;
  letter-spacing: -.02em;
  line-height: 1.08;
  margin-bottom: 1.1rem;
}
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.hero p.lead-text {
  font-size: 1.13rem;
  color: var(--ht-muted);
  max-width: 33em;
}
.tick-list { list-style: none; margin: 0; padding: 0; }
.tick-list li {
  position: relative; padding-left: 2rem; margin-bottom: .7rem;
  color: var(--ht-ink); font-size: .98rem;
}
.tick-list li::before {
  content: "\2713";
  position: absolute; left: 0; top: 0;
  width: 1.35rem; height: 1.35rem; border-radius: 50%;
  background: color-mix(in srgb, var(--ht-accent) 12%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--ht-accent) 35%, #ffffff);
  color: var(--ht-accent); font-weight: 800; font-size: .8rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.how-list { list-style: none; counter-reset: how; margin: 0; padding: 0; }
.how-list li {
  counter-increment: how;
  position: relative; padding-left: 3.2rem; margin-bottom: 1.15rem;
  font-size: .96rem; color: var(--ht-muted);
}
.how-list li::before {
  content: counter(how);
  position: absolute; left: 0; top: -2px;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--ht-accent); color: #fff;
  font-weight: 750; display: inline-flex; align-items: center; justify-content: center;
}
.how-list li strong { display: block; color: var(--ht-ink); margin-bottom: .15rem; }

.stats-band {
  background: var(--ht-nav);
  color: #e8ecf1;
  padding: 84px 0;
}
.stat-num { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 750; letter-spacing: -.02em; }
.stat-cap { color: #aab4bf; font-size: .92rem; }

.cta-band {
  background: var(--ht-panel);
  padding: 88px 0;
  text-align: center;
}

/* ----------------------------- Sections / cards ----------------------------- */
.section-pad { padding: 72px 0; }
.ht-card {
  background: #fff;
  border: 1px solid var(--ht-line);
  border-radius: 10px;
}
.card-title-slim { font-weight: 700; letter-spacing: -.01em; }
.step-num {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--ht-accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; flex: 0 0 auto;
}
.form-label { font-weight: 600; font-size: .93rem; }
.form-control:focus, .form-select:focus {
  border-color: var(--ht-accent-2);
  box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--ht-accent) 18%, transparent);
}
.total-line {
  background: var(--ht-panel);
  border: 1px dashed var(--ht-line);
  border-radius: 8px;
  padding: .85rem 1rem;
  font-weight: 700;
}

/* Client dashboard request wizard */
.req-section { border-top: 1px dashed var(--ht-line); margin-top: 1.4rem; padding-top: 1.25rem; }
.req-first { border-top: 0; margin-top: 1.6rem; padding-top: 0; }
.req-head {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 700; margin-bottom: 1rem; letter-spacing: -.01em;
}
.flow-box {
  background: var(--ht-panel);
  border: 1px solid var(--ht-line);
  border-radius: 8px;
  padding: .85rem 1rem;
}
.mini-steps { list-style: none; counter-reset: ms; margin: 0; padding: 0; }
.mini-steps li {
  counter-increment: ms; position: relative;
  padding-left: 2.6rem; margin-bottom: .95rem;
  font-size: .9rem; color: var(--ht-muted);
}
.mini-steps li:last-child { margin-bottom: 0; }
.mini-steps li::before {
  content: counter(ms);
  position: absolute; left: 0; top: -2px;
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--ht-accent); color: #fff;
  font-weight: 750; font-size: .85rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.mini-steps li strong { display: block; color: var(--ht-ink); margin-bottom: .1rem; }
.chip {
  display: inline-block; padding: .28em .8em; border-radius: 999px;
  font-size: .78rem; font-weight: 700; letter-spacing: .02em;
}
.chip-warn { background: #fdf3e0; color: var(--ht-warn); border: 1px solid #ecd9b0; }
.chip-paid { background: #e7f3ec; color: var(--ht-ok);   border: 1px solid #bcdcc8; }
.chip-muted{ background: #eef0f2; color: var(--ht-muted);border: 1px solid var(--ht-line); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }

.success-panel {
  border: 1px solid #bcdcc8; background: #f2faf5; border-radius: 10px; padding: 2.4rem;
}

/* ----------------------------- Footer ----------------------------- */
.ht-footer {
  background: var(--ht-nav); color: #c6cdd5;
  padding: 56px 0 30px; margin-top: 40px;
}
.ht-footer a { display: block; color: #c6cdd5; text-decoration: none; padding: .18rem 0; }
.ht-footer a:hover { color: #fff; }
.ht-foot-h { color: #fff; text-transform: uppercase; font-size: .76rem; letter-spacing: .14em; margin-bottom: .7rem; }
.ht-foot-blurb { font-size: .93rem; color: #9aa4af; max-width: 34em; }
.ht-foot-rule { border-color: rgba(255,255,255,.12); margin: 2rem 0 1.2rem; }
.ht-foot-bottom { font-size: .88rem; color: #9aa4af; }
.ht-foot-bottom a { display: inline; color: #c6cdd5; }

/* =====================================================================
   RECEIPT — A4 evidentiary sheet (flat inks only; no gradients)
   ===================================================================== */
.receipt-body { background: #eceff2; margin: 0; }
#receipt-sheet {
  background: #ffffff;
  color: #20242a;
  width: 210mm;
  max-width: 210mm;
  margin: 26px auto;
  padding: 16mm 14mm;
  box-shadow: 0 10px 32px rgba(20,26,34,.16);
  font-size: 10.5pt;
  line-height: 1.5;
  -webkit-print-color-adjust: exact;
          print-color-adjust: exact;
}
.r-head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 10px; border-bottom: 1.5pt solid #20242a;
}
.r-star { width: 40px; height: 40px; }
.r-brand { font-size: 15pt; font-weight: 750; letter-spacing: .02em; color: #20242a; }
.r-meta { font-size: 8.5pt; color: #565d66; }
.r-stampwrap { margin-left: auto; }
.stamp {
  display: inline-block; padding: .3em .9em;
  border: 1.5pt solid currentColor; border-radius: 4px;
  font-weight: 800; letter-spacing: .12em; font-size: 8.5pt;
}
.stamp-paid    { color: #2e5c41; }
.stamp-pending { color: #7a6320; }
.stamp-muted   { color: #565d66; }
.r-title { font-size: 17pt; font-weight: 750; margin: 18px 0 2px; color: #20242a; }
.r-project { font-size: 12pt; margin-bottom: 14px; color: #3a4048; }
.r-section { margin-top: 16px; }
.r-section h2 {
  font-size: 9pt; text-transform: uppercase; letter-spacing: .12em;
  color: #33557c; border-bottom: .75pt solid #ccd2d9;
  padding-bottom: 4px; margin-bottom: 8px; font-weight: 750;
}
.r-kv { width: 100%; border-collapse: collapse; }
.r-kv th {
  text-align: left; vertical-align: top; white-space: nowrap;
  width: 34mm; font-weight: 600; color: #565d66; font-size: 9.5pt;
  padding: 3px 8px 3px 0;
}
.r-kv td { padding: 3px 0; font-size: 10pt; color: #20242a; }
.r-desc { font-size: 10pt; color: #33383f; margin: 8px 0 4px; }
.r-subhead { font-weight: 700; font-size: 9.5pt; margin: 10px 0 4px; color: #20242a; }
.r-quals { margin: 0 0 8px 18px; padding: 0; font-size: 9.5pt; color: #33383f; }
.r-quals li { margin-bottom: 2px; }
.r-totals { width: 100%; border-collapse: collapse; margin-top: 10px; border-top: .75pt solid #ccd2d9; }
.r-totals td { padding: 5px 0; font-size: 10pt; border-bottom: .5pt solid #e4e8ec; }
.r-totals td:first-child { color: #565d66; }
.r-num { text-align: right; font-variant-numeric: tabular-nums; }
.r-grand td { font-weight: 800; font-size: 11.5pt; color: #20242a; border-top: 1pt solid #20242a; border-bottom: 1pt solid #20242a; }
.r-dim { color: #8a9099; font-style: italic; font-size: 9.5pt; }
.r-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 8.5pt; word-break: break-all; }
.r-status { font-weight: 750; letter-spacing: .04em; }
.r-status-paid { color: #2e5c41; }
.r-status-awaiting_payment { color: #7a6320; }
.r-status-cancelled, .r-status-expired { color: #565d66; }
.r-audit { list-style: none; margin: 0; padding: 0; counter-reset: audit; }
.r-audit li {
  counter-increment: audit;
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 4px 10px;
  align-items: baseline;
  padding: 5px 0; border-bottom: .5pt dotted #d8dde2;
}
.r-audit li::before {
  content: counter(audit);
  font-weight: 750; font-size: 8.5pt; color: #565d66;
}
.r-audit-label { font-weight: 600; font-size: 9.8pt; color: #20242a; }
.r-audit-time { font-size: 9pt; color: #565d66; justify-self: end; white-space: nowrap; }
.r-audit-ref { grid-column: 2 / 4; color: #7c838c; font-size: 8pt; }
.r-foot {
  margin-top: 22px; padding-top: 10px; border-top: 1.5pt solid #20242a;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 8.5pt; color: #565d66;
}
.receipt-toolbar { max-width: 210mm; margin: 18px auto 40px; }

/* PDF export — suppress all browser headers/URL footers */
@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  body * { visibility: hidden; }
  #receipt-sheet, #receipt-sheet * { visibility: visible; }
  #receipt-sheet {
    position: absolute; inset: 0;
    margin: 0; box-shadow: none;
    padding: 16mm 14mm;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .receipt-toolbar, .navbar, .ht-footer { display: none !important; }
}

/* =====================================================================
   ADMIN
   ===================================================================== */
.admin-shell { display: flex; min-height: calc(100vh - 64px); }
.admin-side {
  flex: 0 0 240px;
  background: var(--ht-nav);
  padding: 22px 14px;
}
.admin-side a {
  display: flex; align-items: center; gap: 10px;
  color: #c6cdd5; text-decoration: none;
  padding: .58rem .8rem; border-radius: 8px; font-weight: 500; font-size: .95rem;
  margin-bottom: 2px;
}
.admin-side a:hover { color: #fff; background: rgba(255,255,255,.07); }
.admin-side a.active { color: #fff; background: var(--ht-accent); }
.admin-side .side-badge {
  margin-left: auto; background: #d8b64c; color: #171b21;
  font-size: .7rem; font-weight: 800; border-radius: 999px; padding: .1em .55em;
}
.admin-main { flex: 1 1 auto; padding: 28px 32px 60px; background: var(--ht-panel); min-width: 0; }
.stat-card {
  background: #fff; border: 1px solid var(--ht-line); border-radius: 10px;
  padding: 18px 20px;
}
.stat-card .sc-num { font-size: 1.7rem; font-weight: 750; letter-spacing: -.02em; }
.stat-card .sc-cap { color: var(--ht-muted); font-size: .86rem; text-transform: uppercase; letter-spacing: .08em; }
.ht-table { background: #fff; border: 1px solid var(--ht-line); border-radius: 10px; overflow: hidden; }
.ht-table table { margin-bottom: 0; }
.ht-table thead th {
  background: #f0f2f5; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .07em; color: var(--ht-muted); border-bottom: 1px solid var(--ht-line);
}
.row-click { cursor: pointer; }
.row-click:hover { background: #f6f8fa; }

.theme-swatch {
  width: 44px; height: 44px; border-radius: 8px; cursor: pointer;
  border: 2px solid transparent; position: relative; outline: 2px solid var(--ht-line);
}
.theme-swatch.selected { border-color: var(--ht-accent); outline-color: var(--ht-accent); }

/* Inbox (threaded) */
.inbox-wrap { display: grid; grid-template-columns: 340px 1fr; min-height: 70vh; background: #fff; border: 1px solid var(--ht-line); border-radius: 10px; overflow: hidden; }
.sender-list { border-right: 1px solid var(--ht-line); overflow-y: auto; max-height: 74vh; }
.sender-row { padding: 14px 16px; border-bottom: 1px solid var(--ht-line); cursor: pointer; }
.sender-row:hover { background: #f6f8fa; }
.sender-row.active { background: #eef3f8; }
.sender-name { font-weight: 700; font-size: .95rem; display:flex; align-items:center; gap:8px;}
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ht-accent); display:inline-block; }
.sender-preview { color: var(--ht-muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-pane { padding: 22px 26px; overflow-y: auto; max-height: 74vh; background: var(--ht-panel); }
.bubble {
  background: #fff; border: 1px solid var(--ht-line); border-radius: 12px;
  padding: 12px 16px; margin-bottom: 12px; max-width: 720px;
  box-shadow: 0 1px 2px rgba(20,26,34,.05);
}
.bubble-head { font-size: .78rem; color: var(--ht-muted); margin-bottom: 6px; }
.thread-empty { color: var(--ht-muted); text-align:center; padding: 80px 20px; }

@media (max-width: 991px) {
  .admin-shell { flex-direction: column; }
  .admin-side { flex-basis: auto; }
  .inbox-wrap { grid-template-columns: 1fr; }
  .sender-list { max-height: 260px; }
  .hero-media { height: 40vh; }
}

/* Legal pages */
.legal-page .legal-kicker {
  text-transform: uppercase; letter-spacing: .16em; font-size: .74rem;
  font-weight: 700; color: var(--ht-accent);
}
.legal-doc h1 { font-size: 1.9rem; font-weight: 750; letter-spacing: -.02em; margin: .4rem 0 1.4rem; }
.legal-doc h2 { font-size: 1.12rem; font-weight: 700; margin: 1.8rem 0 .6rem; }
.legal-doc p, .legal-doc li { color: #33383f; font-size: .98rem; line-height: 1.68; }
.legal-doc ul { padding-left: 1.3rem; }
.legal-updated { color: var(--ht-muted); font-size: .88rem; margin-bottom: 2rem; }
