/* Arrowsol8 — brand additions on top of Tailwind (CDN). Charcoal + crimson. */

:root {
  --brand: #b91c1c;
  --brand-dark: #991b1b;
  --charcoal: #111827;
}

/* IP-protection deterrent for module content (a speed bump; watermark is the real deterrent). */
.sop-content { user-select: none; -webkit-user-select: none; }
.sop-content h3 { font-size: 1.15rem; font-weight: 600; color: #1e293b; margin: 1.25rem 0 0.5rem; }
.sop-content h3:first-child { margin-top: 0; }
.sop-content .lead { color: #475569; font-weight: 500; margin: 0.25rem 0 0.5rem; }
.sop-content ul { list-style: disc; padding-left: 1.5rem; margin: 0.5rem 0 1rem; }
.sop-content li { margin: 0.35rem 0; color: #334155; line-height: 1.5; }
.sop-content .module-slide { padding-bottom: 1rem; border-bottom: 1px solid #f1f5f9; margin-bottom: 1rem; }
.sop-content .module-slide:last-child { border-bottom: none; }

/* Embedded slide screenshots */
.sop-content .module-figure { margin: 0.75rem 0; }
.sop-content .module-img {
  max-width: 100%; height: auto; display: block;
  border: 1px solid #e2e8f0; border-radius: 0.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
/* SmartArt diagram reconstruction (source slide is vector, not an image) */
.sop-content .module-diagram {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  padding: 0.85rem; margin: 0.75rem 0;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 0.5rem;
}
.sop-content .diagram-node {
  background: #fff; border: 1px solid #cbd5e1; border-radius: 0.375rem;
  padding: 0.35rem 0.7rem; font-size: 0.85rem; color: #1e293b; font-weight: 500;
}
.sop-content .diagram-node + .diagram-node::before { content: ""; }

/* Compliance guidelines: acceptable vs. not-acceptable phrasing blocks */
.sop-content .rule-bad, .sop-content .rule-good {
  border-left: 4px solid; border-radius: 0.375rem;
  padding: 0.5rem 0.85rem; margin: 0.4rem 0;
}
.sop-content .rule-bad { background: #fef2f2; border-color: #dc2626; }
.sop-content .rule-good { background: #f0fdf4; border-color: #16a34a; }
.sop-content .rule-bad .lbl { color: #b91c1c; font-weight: 600; }
.sop-content .rule-good .lbl { color: #15803d; font-weight: 600; }
.sop-content .rule-bad ul, .sop-content .rule-good ul { margin: 0.25rem 0 0; }
.sop-content .rule-note { color: #475569; font-size: 0.92rem; margin: 0.35rem 0 0.75rem; }
.sop-content .term-grid {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0 1rem;
}
.sop-content .term-grid .term {
  background: #fef2f2; border: 1px solid #fecaca; color: #991b1b;
  border-radius: 0.375rem; padding: 0.25rem 0.6rem; font-size: 0.85rem;
}
/* Comparison / reference tables inside module content */
.sop-content .m-table-wrap { overflow-x: auto; margin: 0.6rem 0 1rem; }
.sop-content table.m-table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.sop-content table.m-table th, .sop-content table.m-table td {
  border: 1px solid #e2e8f0; padding: 0.5rem 0.7rem; text-align: left; vertical-align: top;
}
.sop-content table.m-table th { background: #f8fafc; color: #1e293b; font-weight: 600; }
.sop-content table.m-table td { color: #334155; }
/* Definition chips for glossary terms */
.sop-content .defn { margin: 0.4rem 0; color: #334155; }
.sop-content .defn b { color: #111827; }

/* Per-user watermark overlay. */
.watermark {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 3.5rem 4rem;
  transform: rotate(-24deg) scale(1.4); opacity: 0.05;
}
.watermark span { font-size: 0.8rem; color: #0f172a; white-space: nowrap; }
main { position: relative; z-index: 1; }

/* Brand accents */
.brand-bar { background: var(--charcoal); }
.text-brand { color: var(--brand); }
.hover\:text-brand:hover { color: var(--brand); }

/* ---- App shell: sidebar + content column + pinned footer ---- */
.app-shell { display: flex; min-height: 100vh; }
.app-main-col { flex: 1 1 0%; display: flex; flex-direction: column; min-width: 0; }
/* The page's own <main> is a direct child — make it grow so the footer pins to the bottom. */
.app-main-col > main { flex: 1 0 auto; width: 100%; }

.app-sidebar { background: var(--charcoal); color: #cbd5e1; }
.app-topbar {
  height: 3.5rem; flex: none; display: flex; align-items: center;
  gap: 0.5rem; padding: 0 1rem; background: #fff;
  border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; z-index: 20;
}
@media (min-width: 768px) { .app-topbar { padding: 0 1.5rem; } }

.app-footer {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem 1.5rem; font-size: 0.72rem; color: #94a3b8;
  border-top: 1px solid #e2e8f0; background: #fff;
}

.side-link {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.55rem 0.75rem; border-radius: 0.5rem;
  font-size: 0.875rem; color: #cbd5e1; transition: background .15s, color .15s;
}
.side-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.side-link.active { background: var(--brand); color: #fff; font-weight: 500; }
.side-link.active:hover { background: var(--brand-dark); }

/* Auth / public hero background: subtle ink-splatter watermark of the target icon. */
.brand-hero {
  background-color: #0b0b0d;
  background-image:
    linear-gradient(to bottom, rgba(11,11,13,0.45), rgba(11,11,13,0.80)),
    url('/static/img/banner.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

/* ---- Identity photo capture: oval framing guide ---- */
.cam-frame {
  position: relative; display: inline-block; line-height: 0;
  border-radius: 0.5rem; overflow: hidden; border: 1px solid #e2e8f0;
}
.cam-frame video { display: block; }
/* Oval cut-out: dashed outline + dimmed surround so the face is centred. */
.cam-oval {
  position: absolute; inset: 0; margin: auto;
  width: 56%; height: 78%;
  border: 3px dashed rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.45);
  pointer-events: none;
}
.cam-hint {
  position: absolute; left: 0; right: 0; bottom: 6px;
  text-align: center; color: #fff; font-size: 11px; line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); pointer-events: none;
}
.cam-disabled { opacity: 0.5; cursor: not-allowed; }

/* Multi-step apply wizard */
.wizard-step { display: none; }
.wizard-step.active { display: block; }
.wizard-progress-bar { transition: width 0.25s ease; }
.q-required::after { content: " *"; color: var(--brand); }

/* ------------------------------------------------------------------ *
 * Data tables — one refined, aligned style used across the whole app. *
 * Text columns stay left; numeric/action columns shrink to content    *
 * and right-align so values line up in tidy vertical columns.         *
 * ------------------------------------------------------------------ */
.al-table-wrap { background: #fff; border: 1px solid #e2e8f0; border-radius: 0.5rem; overflow-x: auto; }
.al-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; line-height: 1.4; }
.al-table thead th {
  text-align: left; font-weight: 600; font-size: 0.7rem; letter-spacing: 0.05em;
  text-transform: uppercase; color: #64748b; background: #f8fafc;
  padding: 0.6rem 1rem; white-space: nowrap; vertical-align: middle;
  border-bottom: 1px solid #e2e8f0;
}
.al-table tbody td {
  padding: 0.7rem 1rem; vertical-align: middle; color: #334155;
  border-top: 1px solid #f1f5f9;
}
.al-table tbody tr:first-child td { border-top: 0; }
.al-table tbody tr:hover td { background: #f8fafc; }
.al-table tfoot td { border-top: 2px solid #e2e8f0; background: #f8fafc; padding: 0.7rem 1rem; }
.al-table td.primary { color: #1e293b; }
/* alignment helpers — put the SAME class on the matching <th> and <td> */
.al-table .num     { text-align: right;  font-variant-numeric: tabular-nums; white-space: nowrap; width: 1%; }
.al-table .center  { text-align: center; width: 1%; white-space: nowrap; }
.al-table .actions { text-align: right;  white-space: nowrap; width: 1%; }
.al-table .nowrap  { white-space: nowrap; }
.al-table .muted   { color: #64748b; }
.al-table .empty   { text-align: center; color: #94a3b8; padding: 2rem 1rem; }
