/* Semantik ERP — public sub-pages (support, demo request, legal, auth).
   Loads after semantik-landing.css and reuses its tokens and components. */

/* ---------- Minimal header ---------- */

.nav__end--minimal { margin-inline-start: auto; }
.nav__back { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; border-radius: var(--r-pill); color: var(--on-navy-2); text-decoration: none; font-size: .9375rem; transition: color .2s, background-color .2s; }
.nav__back:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav__back svg { width: 16px; height: 16px; }
[dir="rtl"] .nav__back svg { transform: scaleX(-1); }
@media (max-width: 1020px) {
  .site-header--minimal .nav__end { display: flex; }
}
@media (max-width: 520px) {
  .nav__back span { display: none; }
}

/* ---------- Page hero (compact navy band) ---------- */

.page-hero { position: relative; overflow: clip; padding-block: clamp(40px, 6vw, 80px) clamp(48px, 6vw, 88px); }
.page-hero::before {
  content: ""; position: absolute; pointer-events: none;
  width: 760px; height: 760px; inset-inline-end: -240px; top: -360px;
  background: radial-gradient(circle, rgba(33, 150, 243, .28), transparent 68%);
}
.page-hero .wrap { position: relative; }
.page-hero .h1 { font-size: clamp(2.25rem, 1.9rem + 2vw, 3.5rem); max-width: 18ch; }
.page-hero .lede { margin-top: 18px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; font-size: .875rem; color: var(--on-navy-2); }
.crumbs a { color: var(--on-navy-2); text-decoration: none; }
.crumbs a:hover { color: #fff; }
.crumbs li + li::before { content: "/"; margin-inline-end: 8px; color: var(--navy-line); }
.page-meta { margin: 20px 0 0; font-size: .875rem; color: var(--on-navy-2); }

.page-body { padding-block: clamp(48px, 6vw, 88px) var(--section); }
.page-body--lift { margin-top: clamp(-56px, -4vw, -32px); padding-top: 0; position: relative; z-index: 1; }

/* ---------- Form page layout ---------- */

.form-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: 20px; align-items: start; }
@media (max-width: 920px) { .form-layout { grid-template-columns: 1fr; } }

.panel { padding: clamp(24px, 3.4vw, 44px); border-radius: var(--r-card); background: #fff; border: 1px solid #E4EBF3; box-shadow: var(--shadow-2); }
.panel > .h3 { font-size: clamp(1.5rem, 1.3rem + .8vw, 1.875rem); }
.panel > p { margin: 10px 0 0; color: var(--ink-2); font-weight: 300; }

.aside { display: grid; gap: 14px; }
.aside-card { padding: 24px; border-radius: var(--r-card); background: var(--paper); border: 1px solid #E4EBF3; }
.aside-card--navy { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.aside-card h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.0625rem; font-weight: 600; line-height: 1.35; }
.aside-card h2 svg { width: 20px; height: 20px; flex: none; color: var(--blue); }
.aside-card--navy h2 svg { color: var(--blue-l); }
.aside-card p { margin: 8px 0 0; font-size: .9375rem; color: var(--ink-2); }
.aside-card--navy p { color: var(--on-navy-2); }
.aside-card .textlink { display: inline-block; margin-top: 10px; }
.aside-card--navy .textlink { color: #fff; text-decoration-color: var(--navy-line); }
.aside-card--navy .textlink:hover { text-decoration-color: #fff; }
.aside-card .btn { margin-top: 16px; }

/* ---------- Form controls (extends .form / .field) ---------- */

.required { color: var(--peach-ink); margin-inline-start: 2px; }
.field__hint { font-size: .8125rem; color: var(--muted); }
.field select {
  width: 100%; min-height: 50px; padding: 12px 44px 12px 16px;
  border-radius: 12px; border: 1px solid var(--line); background-color: var(--paper);
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5l5 5 5-5' stroke='%235B6678' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 18px; background-position: right 14px center;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
[dir="rtl"] .field select { padding: 12px 16px 12px 44px; background-position: left 14px center; }
.field select:hover { border-color: #B6C3D3; }
.field select:focus { outline: none; border-color: var(--blue); background-color: #fff; box-shadow: 0 0 0 4px rgba(30, 136, 229, .14); }
.field input.is-invalid, .field textarea.is-invalid, .field select.is-invalid,
.field textarea[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--peach-ink); box-shadow: 0 0 0 4px rgba(184, 67, 42, .1); }
.field input:disabled, .field textarea:disabled, .field select:disabled { opacity: .6; cursor: not-allowed; }

.segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: var(--r-pill); background: var(--ice); }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 18px; border-radius: var(--r-pill); font-size: .875rem; font-weight: 500; color: var(--ink-2); transition: background-color .2s, color .2s; }
.segmented input:checked + span { background: var(--navy-2); color: #fff; }
.segmented input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: .9375rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--blue-d); cursor: pointer; }

.input-wrap { position: relative; }
.input-wrap input { padding-inline-end: 52px; }
.input-wrap__btn { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.input-wrap__btn:hover { color: var(--ink); background: var(--ice); }
.input-wrap__btn svg { width: 20px; height: 20px; }
.input-wrap__btn[aria-pressed="true"] { color: var(--blue-d); }

.btn--block { width: 100%; }

/* Alerts */
.alert { display: flex; gap: 12px; align-items: flex-start; margin: 22px 0 0; padding: 14px 16px; border-radius: var(--r-panel); border: 1px solid; font-size: .9375rem; line-height: 1.5; }
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert--success { background: var(--mint-bg); border-color: var(--mint-line); color: var(--ink); }
.alert--success svg { color: var(--mint-d); }
.alert--error { background: var(--peach-bg); border-color: var(--peach-line); color: var(--ink); }
.alert--error svg { color: var(--peach-ink); }
.alert--info { background: var(--ice); border-color: var(--ice-line); color: var(--ink); }
.alert--info svg { color: var(--blue-d); }
.alert ul { margin: 6px 0 0; padding-inline-start: 18px; }

/* ---------- Long-form reading (legal, policies) ---------- */

.doc { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.toc { position: sticky; top: calc(96px + env(safe-area-inset-top, 0px)); }
.toc h2 { margin: 0 0 12px; font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
[dir="rtl"] .toc h2 { letter-spacing: 0; font-size: .875rem; }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; border-inline-start: 1px solid var(--line); }
.toc a { display: block; padding: 7px 14px; margin-inline-start: -1px; border-inline-start: 2px solid transparent; color: var(--ink-2); text-decoration: none; font-size: .9375rem; line-height: 1.4; transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--blue-dd); }
.toc a[aria-current="true"] { color: var(--ink); border-inline-start-color: var(--blue); font-weight: 500; }
@media (max-width: 900px) { .doc { grid-template-columns: 1fr; } .toc { position: static; } }

.prose { max-width: 70ch; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 2.4em 0 .6em; font-size: clamp(1.375rem, 1.2rem + .6vw, 1.75rem); line-height: 1.25; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; scroll-margin-top: 96px; }
.prose h3 { margin: 1.8em 0 .5em; font-size: 1.1875rem; line-height: 1.35; font-weight: 600; color: var(--ink); }
[dir="rtl"] .prose h2, [dir="rtl"] .prose h3 { letter-spacing: 0; }
.prose p { margin: 0 0 1.1em; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-inline-start: 1.3em; }
.prose li { margin: .35em 0; padding-inline-start: .2em; }
.prose li::marker { color: var(--blue); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--blue-dd); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--ice-line); }
.prose a:hover { text-decoration-color: currentColor; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .9375rem; }
.prose th, .prose td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.prose th { color: var(--ink); font-weight: 600; background: var(--paper); }
.table-scroll { overflow-x: auto; margin: 0 0 1.4em; }
.table-scroll table { margin: 0; min-width: 520px; }
.callout { margin: 0 0 1.4em; padding: 18px 20px; border-radius: var(--r-panel); background: var(--ice); border: 1px solid var(--ice-line); color: var(--ink); }
.callout--warn { background: var(--peach-bg); border-color: var(--peach-line); }
.callout p:last-child { margin-bottom: 0; }

.steps { counter-reset: step; list-style: none; padding: 0 !important; display: grid; gap: 12px; }
.steps li { counter-increment: step; position: relative; display: block; margin: 0; padding: 16px 18px 16px 62px; border-radius: var(--r-panel); background: #fff; border: 1px solid #E4EBF3; }
[dir="rtl"] .steps li { padding: 16px 62px 16px 18px; }
.steps li::before { content: counter(step); position: absolute; inset-inline-start: 16px; top: 14px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-2); color: #fff; font-size: .875rem; font-weight: 600; }

/* ---------- Auth (sign in, register, password) ---------- */

.auth { min-height: calc(100vh - 72px); min-height: calc(100dvh - 72px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--paper); }
.auth__aside { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: clamp(40px, 5vw, 72px); }
.auth__aside::before { content: ""; position: absolute; width: 760px; height: 760px; inset-inline-end: -320px; top: -300px; background: radial-gradient(circle, rgba(33, 150, 243, .30), transparent 68%); pointer-events: none; }
.auth__aside > * { position: relative; }
.auth__aside .h2 { max-width: 14ch; }
.auth__aside .list-check li { color: #fff; }
.auth__note { margin: 0; font-size: .875rem; color: var(--on-navy-2); }
.auth__main { display: flex; align-items: center; justify-content: center; padding: clamp(32px, 5vw, 72px) var(--gutter); }
.auth__card { width: 100%; max-width: 460px; }
.auth__card .h2 { font-size: clamp(1.875rem, 1.6rem + 1vw, 2.375rem); }
.auth__card > p { margin: 10px 0 0; color: var(--ink-2); font-weight: 300; }
.auth__form { display: grid; gap: 18px; margin-top: 30px; }
.auth__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.auth__alt { margin: 26px 0 0; padding-top: 22px; border-top: 1px solid var(--line); font-size: .9375rem; color: var(--ink-2); }
.auth__alt .textlink { margin-inline-start: 4px; }
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth__aside { display: none; }
}

/* Honeypot and other hidden helpers stay hidden */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.aside-card--wa h2 svg { color: #1DA851; }
