/* =========================================================================
   Vocis Awareness — design system
   Two moods: the "lure" (cool, clinical, credible) and the "reveal"
   (warm, human, editorial). Admin is a quiet control room.
   ========================================================================= */

:root {
  /* VOCIS brand palette: deep navy + leaf green + lavender. */
  --ink: #26314f;          /* body / dark slate-navy text                   */
  --ink-soft: #46527a;     /* secondary text                                */
  --muted: #7a84a3;        /* tertiary text                                 */
  --paper: #f5f7fc;        /* page background (cool)                         */
  --surface: #ffffff;
  --surface-2: #eef1f9;    /* subtle fills                                  */
  --line: #e2e6f1;         /* hairlines                                     */
  --line-strong: #cdd4e6;

  --teal: #16295c;         /* VOCIS navy — primary action / brand           */
  --teal-deep: #101e46;    /* hover / emphasis                              */
  --teal-wash: #e9ecfb;    /* lavender tint panel                           */

  --amber: #b9741a;        /* warnings                                      */
  --amber-wash: #fdf1df;
  --amber-line: #f0cf9b;

  --green: #83bd3e;        /* VOCIS leaf green — accents / success          */
  --green-deep: #6aa52d;
  --green-wash: #eef7e2;
  --green-line: #d0e8ad;

  --navy: #16295c;
  --navy-deep: #101e46;
  --lav: #e9ecfb;

  --red: #bb3b33;
  --red-wash: #fbeceb;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(19,35,45,.05), 0 10px 30px -18px rgba(19,35,45,.35);
  --shadow-lift: 0 2px 6px rgba(19,35,45,.08), 0 24px 48px -28px rgba(19,35,45,.45);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

a { color: var(--teal-deep); }

/* Accessible focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--teal) 45%, white);
  outline-offset: 2px;
}

/* ---- Shared buttons --------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; border: 1px solid transparent;
  padding: 12px 20px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 15px;
  text-decoration: none; line-height: 1;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-deep); }
.btn-ghost { background: transparent; color: var(--teal-deep); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--red-wash); color: var(--red); border-color: color-mix(in srgb, var(--red) 25%, white); }
.btn-danger:hover { background: color-mix(in srgb, var(--red) 12%, white); }
.btn-mini { padding: 7px 13px; font-size: 13px; border-radius: 8px; }
.btn svg { width: 18px; height: 18px; }
.btn-full { width: 100%; justify-content: center; padding: 14px 22px; font-size: 16px; }

.icon { width: 24px; height: 24px; display: inline-block; vertical-align: middle; }

/* =========================================================================
   PUBLIC — shared shell
   ========================================================================= */
.wrap { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 22px; border-bottom: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
}
.topbar .brandmark { width: 26px; height: 26px; color: var(--teal); }
.topbar b { font-weight: 700; letter-spacing: -0.01em; }
.topbar .sep { color: var(--line-strong); }
.topbar .where { color: var(--muted); font-size: 14px; }
.stage { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 40px 18px 56px; }
.foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 18px; }

/* ---- Lure: a credible internal document notice ------------------------ */
body.lure { background: linear-gradient(180deg, #eef3f4 0%, #f5f7f8 220px); }
.doc-card {
  width: 100%; max-width: 560px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden;
}
.doc-card .head { padding: 26px 30px 0; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--teal-wash); color: var(--teal-deep);
  border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600;
}
.chip svg { width: 14px; height: 14px; }
.doc-card h1 {
  font-size: 27px; line-height: 1.2; letter-spacing: -0.02em;
  margin: 16px 0 10px; color: var(--ink);
}
.doc-card .lede { color: var(--ink-soft); margin: 0 0 22px; }
.doc-meta {
  margin: 0 30px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.doc-meta .row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; }
.doc-meta .row + .row { border-top: 1px solid var(--line); }
.doc-meta .fil { width: 34px; height: 34px; color: var(--teal-deep); flex: none; }
.doc-meta .fname { font-weight: 600; color: var(--ink); font-size: 15px; }
.doc-meta .fsub { color: var(--muted); font-size: 13px; }
.doc-meta .mkey { color: var(--muted); font-size: 13px; min-width: 92px; }
.doc-meta .mval { color: var(--ink-soft); font-size: 13.5px; font-weight: 500; }
.doc-card .sheet { margin: 18px 30px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.doc-card .sheet table.grid th { background: var(--surface-2); }
.doc-card .cta { padding: 22px 30px 12px; }
.doc-card .warn { padding: 0 30px 26px; color: var(--muted); font-size: 12.5px; display: flex; gap: 8px; }
.doc-card .warn svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--amber); }

/* ---- Reveal: warm, human, editorial ----------------------------------- */
body.reveal { background: #fbf7f0; }
.reveal-head {
  background: linear-gradient(160deg, #8a4b12 0%, #b9741a 60%, #cf9336 100%);
  color: #fff6e9;
}
.reveal-head .inner { max-width: 640px; margin: 0 auto; padding: 34px 22px 30px; }
.reveal-badge { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; opacity: .95; }
.reveal-badge svg { width: 22px; height: 22px; }
.reveal-head h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: 32px; line-height: 1.18; letter-spacing: -0.01em;
  margin: 14px 0 8px; color: #fff;
}
.reveal-head p { margin: 0; color: #fdeccf; font-size: 16px; max-width: 54ch; }
.reveal-anim { animation: liftin .5s ease both; }
@keyframes liftin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.reveal-body { max-width: 640px; margin: 0 auto; padding: 30px 22px 10px; }
.reveal-body h2 {
  font-family: var(--serif); font-weight: 600; font-size: 22px;
  letter-spacing: -0.01em; margin: 30px 0 14px; color: var(--ink);
}
.flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.flags li {
  display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--amber);
  border-radius: var(--radius-sm); padding: 14px 16px;
}
.flags .fi { width: 22px; height: 22px; color: var(--amber); margin-top: 1px; }
.flags b { display: block; color: var(--ink); font-size: 15px; }
.flags span { color: var(--ink-soft); font-size: 14px; }

.steps { counter-reset: s; list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li {
  display: grid; grid-template-columns: 30px 1fr; gap: 14px; align-items: baseline;
  padding: 4px 0; color: var(--ink-soft);
}
.steps li::before {
  counter-increment: s; content: counter(s);
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--teal-wash); color: var(--teal-deep); font-weight: 700; font-size: 14px;
}
.steps b { color: var(--ink); }

.report-line {
  margin: 26px 0 8px; padding: 16px 18px; border-radius: var(--radius-sm);
  background: var(--teal-wash); color: var(--teal-deep);
  display: flex; gap: 11px; align-items: center; font-size: 14.5px;
}
.report-line svg { width: 20px; height: 20px; flex: none; }

.ack-zone { max-width: 640px; margin: 8px auto 0; padding: 18px 22px 44px; }
.ack-note { color: var(--muted); font-size: 12.5px; margin: 12px 2px 0; }

/* ---- Simple state pages (acknowledged / expired) ---------------------- */
.state {
  width: 100%; max-width: 520px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 40px 34px; text-align: center;
}
.state .seal { width: 64px; height: 64px; margin: 0 auto 18px; }
.state.ok .seal { color: var(--green); }
.state.gone .seal { color: var(--muted); }
.state h1 { font-size: 26px; letter-spacing: -0.02em; margin: 0 0 10px; }
.state p { color: var(--ink-soft); margin: 0 auto; max-width: 42ch; }
.state .tip { margin-top: 20px; padding: 14px 16px; background: var(--surface-2); border-radius: var(--radius-sm); color: var(--ink-soft); font-size: 14px; }

/* =========================================================================
   AUTH (login / setup)
   ========================================================================= */
body.auth { display: flex; min-height: 100dvh; align-items: center; justify-content: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 410px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lift);
  padding: 34px 32px;
}
.auth-card .brandmark { width: 34px; height: 34px; color: var(--teal); }
.auth-card h1 { font-size: 23px; letter-spacing: -0.02em; margin: 14px 0 4px; }
.auth-card .sub { color: var(--muted); margin: 0 0 18px; font-size: 14.5px; }

/* ---- Form controls ---------------------------------------------------- */
label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); margin: 16px 0 6px; }
input[type=text], input[type=email], input[type=password], textarea {
  width: 100%; padding: 11px 13px; font: inherit; font-size: 15px;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-wash); outline: none; }
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.field-hint { color: var(--muted); font-size: 12.5px; margin: 6px 2px 0; }

/* =========================================================================
   ADMIN CONSOLE
   ========================================================================= */
body.admin { background: var(--paper); }
.console-nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 4px;
  background: var(--ink); color: #dfeaed;
  padding: 0 18px;
}
.console-nav .brand { display: flex; align-items: center; gap: 9px; font-weight: 700; color: #fff; padding: 14px 10px 14px 4px; }
.console-nav .brand svg { width: 22px; height: 22px; color: #49c3cd; }
.console-nav a {
  color: #bcd0d6; text-decoration: none; font-size: 14.5px; font-weight: 500;
  padding: 18px 14px; border-bottom: 2px solid transparent;
}
.console-nav a:hover { color: #fff; }
.console-nav a.active { color: #fff; border-bottom-color: #49c3cd; }
.console-nav .spacer { flex: 1; }
.console-nav form { margin: 0; }
.console-nav .who { color: #8fb0b8; font-size: 13px; margin-right: 6px; }
.console-nav .btn-ghost { color: #cfe2e6; border-color: #35505a; padding: 8px 14px; }
.console-nav .btn-ghost:hover { background: #22323a; }

.console { max-width: 1120px; margin: 0 auto; padding: 26px 20px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 2px 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; letter-spacing: -0.02em; margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; max-width: 70ch; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 20px; }
.panel h2 { font-size: 17px; letter-spacing: -0.01em; margin: 0 0 4px; }
.panel .phelp { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }

/* Stat strip (not identical shadowed cards) */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.stats.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stats .cell { padding: 18px 20px; }
.stats .cell + .cell { border-left: 1px solid var(--line); }
.stats .n { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.stats .l { color: var(--muted); font-size: 13px; margin-top: 7px; }
.stats .cell.accent .n { color: var(--teal-deep); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th, table.grid td { text-align: left; padding: 11px 14px; vertical-align: middle; }
table.grid thead th { background: var(--surface-2); color: var(--ink-soft); font-weight: 600; font-size: 12.5px; letter-spacing: .01em; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid tbody tr + tr td { border-top: 1px solid var(--line); }
table.grid tbody tr:hover td { background: #fafcfc; }
table.grid td.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; color: var(--ink-soft); }
.rowacts { display: flex; gap: 6px; flex-wrap: wrap; }
.rowacts form { margin: 0; }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.yes { background: var(--green-wash); color: #1f7a50; }
.pill.no  { background: var(--surface-2); color: var(--muted); }
.pill.scan { background: var(--amber-wash); color: var(--amber); }
.pill.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.pending { background: var(--surface-2); color: var(--muted); }
.pill.sent { background: var(--teal-wash); color: var(--teal-deep); }
.pill.failed { background: var(--red-wash); color: var(--red); }

/* Copyable link field */
.copyrow { display: flex; gap: 8px; align-items: center; }
.copyrow input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--surface-2); }
.copyrow .btn-mini { flex: none; }
.copied { color: var(--green); font-size: 12.5px; font-weight: 600; }

/* User detail */
.detail-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); font-weight: 500; }

/* Event timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 18px 36px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .node { position: absolute; left: 3px; top: 1px; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--surface); }
.timeline .node.visit { background: var(--teal); }
.timeline .node.click { background: var(--amber); }
.timeline .node.ack { background: var(--green); }
.timeline .ev { font-weight: 600; color: var(--ink); font-size: 14.5px; }
.timeline .when { color: var(--muted); font-size: 12.5px; }
.timeline .meta { color: var(--amber); font-size: 12px; font-weight: 600; }
.empty { color: var(--muted); font-size: 14px; padding: 18px 2px; }

/* Flash + banners */
.flash { padding: 12px 15px; border-radius: var(--radius-sm); margin: 0 0 18px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.flash svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.flash-ok { background: var(--green-wash); color: #1f7a50; border: 1px solid var(--green-line); }
.flash-err { background: var(--red-wash); color: var(--red); border: 1px solid color-mix(in srgb, var(--red) 25%, white); }
.note { padding: 13px 16px; border-radius: var(--radius-sm); font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.note-amber { background: var(--amber-wash); color: #8a5712; border: 1px solid var(--amber-line); }
.note-teal { background: var(--teal-wash); color: var(--teal-deep); }

.mt { margin-top: 16px; }
.muted { color: var(--muted); }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.right { text-align: right; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }
.btnrow form { margin: 0; }
.btnrow.end { justify-content: flex-end; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: 13px; font-family: ui-monospace, Menlo, Consolas, monospace; }

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats .cell:nth-child(3) { border-left: none; }
  .stats .cell:nth-child(n+3) { border-top: 1px solid var(--line); }
  .detail-grid { grid-template-columns: 1fr; }
  .reveal-head h1 { font-size: 27px; }
  .doc-card h1 { font-size: 23px; }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-anim { animation: none; }
  * { transition: none !important; }
}

/* =========================================================================
   VOCIS brand chrome (public landing pages)
   ========================================================================= */
.vtop { background: var(--navy); color: #dfe6f5; font-size: 13px; }
.vtop-in, .vnav-in, .vfoot-in { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.vtop-in { display: flex; align-items: center; justify-content: space-between; min-height: 42px; gap: 14px; flex-wrap: wrap; }
.vcontact { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.vcontact a, .vcontact span { color: #dfe6f5; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; }
.vcontact svg { width: 15px; height: 15px; }
.vright { display: flex; align-items: center; gap: 14px; }
.vsocial { display: flex; gap: 7px; }
.vsocial .vsoc { width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.14); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.vsocial svg { width: 13px; height: 13px; }
.vhipaa-img { height: 34px; width: auto; display: block; border-radius: 5px; }

.vnav { background: #fff; border-bottom: 1px solid var(--line); }
.vnav-in { display: flex; align-items: center; justify-content: space-between; min-height: 78px; gap: 16px; flex-wrap: wrap; }
.vnav-in.vnav-center { justify-content: center; }
.vlogo { display: inline-flex; line-height: 0; }
.vlogo-img { height: 52px; width: auto; display: block; }

.vband { background: var(--lav); }
.vband-in { max-width: 920px; margin: 0 auto; padding: 30px 20px; text-align: center; color: #1f2b52; font-size: 20px; line-height: 1.5; font-weight: 500; }

.vfoot { background: var(--navy); color: #c7d1ea; margin-top: 40px; }
.vfoot-in { padding: 30px 20px; text-align: center; font-size: 13.5px; line-height: 1.6; }
.vfoot .fblurb { max-width: 760px; margin: 0 auto 12px; color: #dbe3f5; }
.vfoot .fmeta { color: #aab7d6; }
.vfoot a { color: #dbe3f5; text-decoration: none; }
.vfoot .fcopy { margin-top: 12px; color: #8fa0c8; font-size: 12px; }

/* public pages: lighter stage padding under the branded header */
body.lure .stage, body.done .stage, body.gone .stage { padding: 36px 18px 48px; }

@media (max-width: 680px) {
  .vtop-in { justify-content: center; }
  .vnav-in { justify-content: center; min-height: 0; padding-top: 14px; padding-bottom: 14px; }
  .vmenu { gap: 16px; font-size: 14px; }
  .vband-in { font-size: 17px; padding: 22px 18px; }
}
