/* Veyra ID — the state's digital identity. Deep navy of the emblem + the teal of the Veyra ID mark. */
:root {
  --night: #0E1D2E; --night-2: #14283D; --night-3: #1C3A55; --night-line: rgba(255,255,255,.1);
  --gold: #61D5D8; --gold-2: #8FE3E5; --gold-ink: #00646B; --teal: #007F88; --teal-50: #E3F4F5;
  --ink: #14273A; --muted: #5B6B7D; --line: #E3E8EC; --surface: #F2F5F6; --paper: #fff; --fill: #F1F4F6;
  --lapis: #007F88; --ok: #0F7A5A; --ok-bg: #E3F3EC; --err: #B3322B; --err-bg: #FBEAE8;
  --r-sm: 8px; --r: 12px; --r-lg: 20px;
  --display: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--paper); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--lapis); text-underline-offset: 3px; }
a:hover { color: var(--night); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: #fff; padding: 8px 14px; border-radius: 8px; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: .02em; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.block { display: block; }

/* Wordmark */
.home-link { text-decoration: none; color: inherit; }
.wm { display: inline-flex; align-items: center; }
.wm img { display: block; height: 46px; width: auto; margin: 0 -8px; }

/* ---------- Auth split ---------- */
.auth-shell { display: grid; grid-template-columns: minmax(400px, 44%) 1fr; min-height: 100vh; min-height: 100dvh; }
.night { position: relative; overflow: hidden; background: var(--night); color: #E6EAF6; padding: 36px clamp(28px, 4vw, 56px); display: flex; flex-direction: column; }
.night .rosette { position: absolute; width: 860px; right: -330px; top: 50%; transform: translateY(-46%); color: var(--gold); opacity: .22; pointer-events: none; animation: spin 240s linear infinite; }
@media (prefers-reduced-motion: reduce) { .night .rosette { animation: none; } }
@keyframes spin { to { transform: translateY(-46%) rotate(360deg); } }
.night-top { display: flex; justify-content: space-between; align-items: center; position: relative; }
.night-body { position: relative; margin: auto 0; max-width: 430px; padding: 48px 0; }
.night-h { font-family: var(--display); font-weight: 500; font-size: clamp(28px, 2.6vw, 38px); line-height: 1.14; letter-spacing: -.02em; margin: 0 0 18px; color: #fff; }
.night-p { color: #B6C3CF; margin: 0 0 28px; font-size: 16.5px; }
.where { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.where li { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.05); color: #C6D1DB; font-size: 15px; }
.where li img { width: 34px; height: 34px; flex: none; }
.where b { color: #fff; font-weight: 600; }
.night-foot { position: relative; font-size: 12.5px; color: #8697A8; margin: 0; max-width: 420px; }
.lang { font-size: 14px; font-weight: 600; text-decoration: none; padding: 6px 13px; border-radius: 999px; background: var(--fill); color: var(--ink); }
.lang-night { color: #E6EEF3; background: rgba(255,255,255,.08); }
.lang-night:hover { color: #fff; background: rgba(255,255,255,.16); }

.panel { display: flex; justify-content: center; align-items: center; padding: 48px clamp(20px, 5vw, 72px); }
.panel-inner { width: min(520px, 100%); }
.ph { font-family: var(--display); font-weight: 500; font-size: 28px; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 8px; }
.pp { color: var(--muted); margin: 0 0 26px; }
.alt { margin-top: 22px; color: var(--muted); font-size: 15px; }

/* Register aside: what the account opens */
.night-card { display: block; margin-top: 4px; width: min(330px, 100%); height: auto; border-radius: 12px; box-shadow: 0 24px 50px rgba(0,0,0,.35); transform: rotate(-3deg); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.form.narrow { max-width: 560px; }
fieldset { border: 0; padding: 0; margin: 0 0 6px; display: grid; gap: 14px; }
legend { font-weight: 700; font-size: 13px; color: var(--muted); margin-bottom: 10px; padding: 0; letter-spacing: .02em; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fld { display: grid; gap: 6px; }
.fld-l { font-weight: 600; font-size: 14.5px; }
.fld input, .search-row input, select {
  font: inherit; color: var(--ink); height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid transparent; background: var(--fill); width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.fld input:focus, .search-row input:focus, select:focus { outline: none; border-color: var(--teal); background: #fff; box-shadow: 0 0 0 4px rgba(0,127,136,.14); }
.fld.has-err input { border-color: var(--err); }
.fld-h { color: var(--muted); font-size: 13px; }
.fld-h-block { margin: -6px 0 0; }
.fld-e { color: var(--err); font-size: 13.5px; font-weight: 600; }
.code-input { font-family: var(--mono) !important; font-size: 22px !important; letter-spacing: .3em; text-align: center; max-width: 220px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--fill); border-radius: 12px; height: 48px; }
.seg label { display: flex; cursor: pointer; position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; left: 0; top: 0; margin: 0; }
.seg span { flex: 1; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; color: var(--muted); border-radius: 9px; }
.seg input:checked + span { background: #fff; color: var(--teal); box-shadow: 0 1px 2px rgba(20,39,58,.1), 0 2px 8px rgba(20,39,58,.06); }
.seg input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: -3px; }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--muted); cursor: pointer; }
.chk input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--night); flex: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 12px; font: inherit; font-weight: 700; font-size: 15.5px; cursor: pointer; text-decoration: none; border: 0; transition: background .15s, border-color .15s; }
.btn .ic { width: 18px; height: 18px; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: #006A72; color: #fff; }
.btn-ghost { background: var(--fill); color: var(--ink); }
.btn-ghost:hover { background: var(--teal-50); color: var(--teal); }
.btn-block { width: 100%; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.stack { display: grid; gap: 10px; }
.alert { background: var(--err-bg); color: #7E1F19; border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 18px; font-weight: 600; font-size: 15px; }
.flashes { display: grid; gap: 8px; margin-bottom: 18px; }
.flash { border-radius: var(--r-sm); padding: 12px 16px; font-weight: 600; font-size: 15px; }
.flash-ok { background: var(--ok-bg); color: #0B5A42; }
.flash-err { background: var(--err-bg); color: #7E1F19; }

/* Welcome */
.welcome { text-align: center; }
.ok-badge { display: inline-flex; width: 56px; height: 56px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); align-items: center; justify-content: center; margin-bottom: 14px; }
.ok-badge .ic { width: 30px; height: 30px; stroke-width: 2.2; }
.pn-card { background: var(--night); color: #fff; border-radius: 20px; padding: 22px 20px 20px; margin: 6px 0 22px; position: relative; overflow: hidden; }
.pn-card-l { font-size: 13px; color: #B6C3CF; font-weight: 600; }
.pn-big { font-family: var(--mono); font-size: clamp(26px, 6vw, 34px); margin: 6px 0 0; letter-spacing: .12em; font-weight: 500; }
.scopes { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.scopes li { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.scopes .ic { width: 20px; height: 20px; color: var(--ok); }

/* ---------- Account ---------- */
body.acct { background: var(--surface); }
.topbar { background: var(--night); color: #fff; position: sticky; top: 0; z-index: 5; }
.topbar-in { max-width: 1240px; margin: 0 auto; height: 66px; display: flex; align-items: center; gap: 28px; padding: 0 24px; }
.top-links { display: flex; gap: 22px; }
.top-links a { color: #C9D0E6; text-decoration: none; font-weight: 600; font-size: 15px; }
.top-links a:hover { color: #fff; }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.top-r form { margin: 0; }
.btn-link-night { background: none; border: 0; color: #C9D0E6; font: inherit; font-weight: 600; font-size: 15px; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; padding: 6px; }
.btn-link-night:hover { color: #fff; }
.btn-link-night .ic { width: 18px; height: 18px; }
.acct-shell { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 270px 1fr; gap: 32px; padding: 32px 24px 64px; }
.side { position: sticky; top: 98px; align-self: start; }
.side { background: #fff; border-radius: 22px; padding: 14px; box-shadow: 0 1px 2px rgba(20,39,58,.04); }
.me { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--surface); margin-bottom: 8px; }
.me b { display: block; font-size: 15.5px; }
.me .mono { color: var(--muted); font-size: 13px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--teal); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--display); font-size: 15px; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.xl { width: 132px; height: 164px; border-radius: 14px; font-size: 36px; }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; gap: 12px; align-items: center; padding: 11px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.side-nav a .ic { width: 20px; height: 20px; color: #8090A3; }
.side-nav a:hover { background: var(--surface); }
.side-nav a.on { background: var(--teal-50); color: var(--teal); }
.side-nav a.on .ic { color: var(--teal); }
.acct-main { min-width: 0; }
.h1 { font-family: var(--display); font-weight: 500; font-size: 28px; letter-spacing: -.02em; margin: 0 0 22px; }
.h2 { font-size: 18px; margin: 0 0 16px; font-weight: 700; }
.lead { color: var(--muted); margin: -10px 0 22px; max-width: 70ch; }
.card { background: #fff; border-radius: 22px; padding: 26px 28px; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(20,39,58,.04); }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.card-head .h2 { margin: 0; }
.card-head form { margin: 0; }
.note { color: var(--muted); font-size: 14px; margin: 18px 0 0; }
.id-card-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 160px 1fr; gap: 28px; }
.id-card-hero .note { grid-column: 1 / -1; position: relative; }
.rosette-sm { position: absolute; width: 520px; right: -200px; top: -200px; color: var(--gold); opacity: .22; pointer-events: none; }
.photo-col { display: grid; gap: 10px; justify-items: start; align-content: start; position: relative; }
.photo-form { margin: 0; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; position: relative; align-content: start; }
.facts dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.facts dd { margin: 2px 0 0; font-weight: 600; font-size: 16px; }
.pn-inline { font-family: var(--mono); letter-spacing: .06em; }
.pill { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; vertical-align: 1px; }
.pill-ok { background: var(--ok-bg); color: #0B5A42; }
.pill-off { background: var(--surface); color: var(--muted); }
.pill-err { background: var(--err-bg); color: #7E1F19; }
.totp { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: start; }
.totp img { border-radius: 12px; background: #fff; box-shadow: 0 0 0 8px var(--surface); }
.steps { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; font-weight: 600; }
.secret { font-family: var(--mono); background: var(--surface); padding: 3px 8px; border-radius: 6px; font-size: 13px; word-break: break-all; }
.inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 0; }
.inline-form .fld { min-width: 220px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 14px; align-items: center; padding: 14px 0; }
.list li + li { box-shadow: inset 0 1px 0 #EEF2F4; }
.list li form { margin: 0 0 0 auto; }
.list-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--teal-50); display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--teal); }
.list-ic .ic { width: 20px; height: 20px; }
.list-main { display: grid; gap: 2px; min-width: 0; }
.empty { color: var(--muted); margin: 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 700; padding: 12px 16px; background: var(--surface); }
.tbl td { padding: 12px 16px; vertical-align: middle; }
.tbl tr + tr td { box-shadow: inset 0 1px 0 #EEF2F4; }
.tbl select { height: 36px; width: auto; font-size: 14px; }
.search-row { display: flex; gap: 10px; margin-bottom: 16px; }
.search-row input { flex: 1; }
.ic { width: 22px; height: 22px; }

/* Signature */
.sig-now { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 4px 0 18px; padding: 12px 16px; border-radius: 16px; background: var(--surface); }
.sig-now img { width: 240px; height: 80px; }
.sig-now form { margin: 0 0 0 auto; }
.sig-pad { position: relative; aspect-ratio: 3 / 1; max-width: 640px; border-radius: 18px; background: #FBFAF6; box-shadow: inset 0 0 0 1px #E6E1D3; touch-action: none; }
.sig-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; border-radius: 18px; touch-action: none; }
.sig-line { position: absolute; left: 6%; right: 6%; bottom: 26%; height: 1px; background: #C9BFA4; pointer-events: none; }
.sig-ph { position: absolute; left: 6%; bottom: 12%; color: #A79D86; font-size: 14px; pointer-events: none; }
.sig-actions { display: flex; gap: 10px; margin-top: 12px; align-items: center; }
@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; }
  .night { padding: 22px 20px 26px; }
  .night .rosette { width: 520px; right: -230px; top: -120px; transform: none; animation: none; opacity: .3; }
  .night-body { padding: 26px 0 0; }
  .night-h { font-size: 24px; margin-bottom: 10px; }
  .night-p { font-size: 15px; margin-bottom: 0; }
  .where, .night-foot { display: none; }
  .night-card { display: none; }
  .panel { padding: 28px 20px 48px; align-items: flex-start; }
  .acct-shell { grid-template-columns: minmax(0, 1fr); padding: 18px 16px 48px; gap: 12px; }
  .side { position: static; min-width: 0; }
  .side-nav { grid-auto-flow: column; overflow-x: auto; scrollbar-width: none; }
  .side-nav a { white-space: nowrap; }
  .side { padding: 8px; }
  .me { display: none; }
  .top-links { display: none; }
  .topbar-in { padding: 0 16px; gap: 12px; }
  .btn-link-night span { display: none; }
}
@media (max-width: 640px) {
  .row2 { grid-template-columns: 1fr; }
  .id-card-hero { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .totp { grid-template-columns: 1fr; }
  .card { padding: 20px 18px; }
  .tbl { display: block; overflow-x: auto; white-space: nowrap; }
  .list li { flex-wrap: wrap; }
}
.pk-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.pk-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface, #F3F5F8); }
.pk-list li > span { display: grid; gap: 2px; }
.or-sep { display: flex; align-items: center; gap: 12px; color: #6B7684; font-size: 14px; margin: 18px 0 12px; }
.or-sep::before, .or-sep::after { content: ''; flex: 1; height: 1px; background: #E2E6EC; }
.pk-login[hidden] { display: none; }
