/*
 * Standalone client-facing KYC stylesheet (D-12, R16). Rebrand 2026-08-31
 * (owner spec): the client surface looks like a typical varnavas.gr page --
 * white header with the blue wordmark, brand navy #002E6E, blue/white/gray
 * only (the former gold accent is removed), self-hosted Poppins.
 * Deliberately its own file: the client surface never extends
 * app/templates/base.html or loads app.css, so a future office-only style
 * change can never leak onto this page.
 */
:root { --navy: #002E6E; --navy2: #234E96; --bg: #eceff3; --border: #d5dbe3; --err: #c0392b; --ok: #1e7d46; }

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

body {
  /* Poppins is latin-only (self-hosted); non-latin text falls back to the
     system sans, same as varnavas.gr's own stack. */
  font-family: 'Poppins', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: #222;
  min-height: 100vh;
}

/* White varnavas.gr-style header: 3px navy accent across the very top,
   blue wordmark top-left, thin gray bottom border. Lives in
   public/base.html, so it renders on every client section page. */
.kyc-navbar {
  background: #fff;
  border-top: 3px solid var(--navy);
  border-bottom: 1px solid #e2e5ea;
  padding: 12px 22px;
}

.kyc-navbar .kyc-logo {
  height: 34px;
  width: auto;
  display: block;
}

.kyc-progress-wrap {
  background: #e3e6ea;
  height: 6px;
}

.kyc-progress-bar {
  background: var(--navy);
  height: 6px;
  transition: width 0.4s;
}

.kyc-progress-label {
  text-align: center;
  font-size: 11.5px;
  letter-spacing: 0.4px;
  color: #5a6570;
  background: #e3e6ea;
  padding: 4px 0 6px;
}

/* Fields whose visible_when selector is not currently satisfied stay in
   the DOM (for JS to reveal them without a round trip -- T-04-32) but
   never rendered -- belt-and-braces alongside the native `hidden`
   attribute, since some frameworks override element display rules. */
[hidden] {
  display: none !important;
}

.kyc-container {
  max-width: 720px;
  margin: 28px auto 60px;
  padding: 0 16px;
}

.kyc-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 32px;
  box-shadow: 0 1px 4px rgba(0, 46, 110, 0.06);
}

.kyc-card h1 {
  font-size: 22px;
  margin-bottom: 18px;
  color: var(--navy);
}

.kyc-hint {
  font-size: 13px;
  color: #5a6570;
  margin-bottom: 16px;
}

.kyc-field {
  margin-bottom: 16px;
}

.kyc-label {
  display: block;
  font-weight: 600;
  font-size: 13.5px;
  margin-bottom: 6px;
  color: #33404f;
}

.kyc-value {
  font-size: 14px;
  color: #222;
  padding: 8px 0;
}

.kyc-field input[type="text"],
.kyc-field input[type="date"],
.kyc-field input[type="email"],
.kyc-field input[type="tel"],
.kyc-field input[type="number"],
.kyc-field select,
.kyc-field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 14px;
  background: #fff;
  font-family: inherit;
}

.kyc-field textarea {
  resize: vertical;
}

.kyc-field input:focus,
.kyc-field select:focus,
.kyc-field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0, 46, 110, 0.12);
}

/* Transient keystroke-rejection flash (app/static/js/kyc-form.js) --
   matches demos/kyc_form_demo.html's `input.err` treatment. */
.kyc-field input.kyc-input-err {
  border-color: var(--err);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

.kyc-req {
  color: var(--err);
}

.kyc-error {
  color: var(--err);
  font-size: 12.5px;
  margin-top: 4px;
}

.kyc-btn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
}

.kyc-radio-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.kyc-radio-pill,
.kyc-checkbox-pill {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 16px;
  cursor: pointer;
  font-size: 14px;
  background: #fff;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.kyc-radio-pill:has(input:checked),
.kyc-checkbox-pill:has(input:checked) {
  border-color: var(--navy);
  background: #eef2f8;
  box-shadow: inset 0 0 0 1px var(--navy);
  font-weight: 600;
}

.kyc-checkbox-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.kyc-upload-zone {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 18px;
}

.kyc-upload-hint {
  font-size: 12.5px;
  color: #6c757d;
  margin-bottom: 10px;
  font-style: italic;
}

.kyc-declaration {
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 18px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #33404d;
  white-space: pre-line;
  max-height: 220px;
  overflow: auto;
}

.kyc-sig-canvas {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  touch-action: none;
  width: 100%;
  height: 160px;
  display: block;
  margin-top: 8px;
}

.kyc-sig-preview {
  max-width: 300px;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: block;
  margin: 8px 0;
}

.kyc-btn {
  border: none;
  border-radius: 6px;
  padding: 10px 22px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  margin-top: 8px;
}

.kyc-btn-primary {
  background: var(--navy);
  color: #fff;
}
.kyc-btn-primary:hover {
  background: var(--navy2);
}

/* Historical class name (kyc_section.html submit button); restyled to the
   primary brand blue in the 2026-08-31 rebrand — the gold accent is gone. */
.kyc-btn-gold {
  background: var(--navy);
  color: #fff;
}
.kyc-btn-gold:hover {
  background: var(--navy2);
}

.kyc-btn-ghost {
  background: #fff;
  color: var(--navy);
  border: 1.5px solid #c3ccd6;
}

.kyc-submit-form {
  margin-top: 10px;
}

.kyc-thank {
  text-align: center;
  padding: 30px 10px;
}

.kyc-tick {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e6f4ea;
  color: var(--ok);
  font-size: 34px;
  line-height: 64px;
  margin: 0 auto 16px;
}

/* Owner nav spec 2026-08-31: Save-for-later + Continue/Next pair */
.kyc-btn-group { display: flex; gap: 10px; }
.kyc-saved-notice { color: #1e7d46; font-weight: 600; }

/* Quotation acceptance + POA-choice steps (owner 2026-09-01, client chain) */
.kyc-title { font-size: 26px; font-weight: 600; color: var(--navy, #002E6E); margin-bottom: 8px; }
.kyc-choice { display: flex; align-items: center; gap: 9px; font-size: 14px; padding: 6px 0; cursor: pointer; }
.kyc-choice input { width: 16px; height: 16px; accent-color: #002E6E; flex: none; }
.kyc-poa-choice { margin: 18px 0 10px; padding: 14px; border: 1px solid #d5dbe3; background: #f8fafc; }
.kyc-accept-form input[type="text"] { max-width: 380px; }

/* Quotation signature pad (owner 2026-09-01) */
.qsig-wrap { border: 1.5px dashed #9aa7b6; background: #fff; position: relative; margin-top: 6px; }
.qsig-wrap .qsig-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #b7c0cb; font-size: 13px; pointer-events: none; }
#qsig-canvas { display: block; width: 100%; height: 130px; touch-action: none; cursor: crosshair; }

/* ---- Embedded quotation document (owner 2026-09-02: the quotation reads
   as on-site text, like the KYC form; the print PDF stays the owner's
   designed brochure). Editorial styling: navy headings, readable measure,
   tables with a navy header band; money cells emphasized. ---- */
.qdoc {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 30px 34px;
  margin: 18px 0 22px;
}
.qdoc > h2 {
  color: var(--navy);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  margin: 26px 0 10px;
}
.qdoc > h2:first-child { margin-top: 0; }
.qdoc > h2 + h2 { margin-top: 2px; }
.qdoc > p {
  font-size: 14.5px;
  line-height: 1.75;
  color: #333a44;
  margin: 0 0 12px;
  max-width: 72ch;
}
.qdoc-meta {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  background: #eef2f8;
  border: 1px solid #d8e0ec;
  border-radius: 6px;
  padding: 6px 12px;
  margin: 2px 8px 10px 0;
}
.qdoc-tablewrap { overflow-x: auto; margin: 14px 0 20px; }
.qdoc-tablewrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.55;
}
.qdoc-tablewrap th {
  background: var(--navy);
  color: #fff;
  text-align: left;
  font-weight: 600;
  padding: 10px 12px;
  border: 1px solid var(--navy);
}
.qdoc-tablewrap td {
  border: 1px solid #dfe4eb;
  padding: 9px 12px;
  vertical-align: top;
  color: #333a44;
}
.qdoc-tablewrap tr:nth-child(even) td { background: #f7f9fc; }
.qdoc-tablewrap td.qdoc-amount {
  white-space: nowrap;
  font-weight: 600;
  color: var(--navy);
  text-align: right;
}
@media (max-width: 640px) {
  .qdoc { padding: 20px 16px; }
  .qdoc-tablewrap td.qdoc-amount { white-space: normal; }
}
