:root {
  --bg: #f4f4f5;
  --sheet: #ffffff;
  --ink: #09090b;
  --text: #27272a;
  --muted: #71717a;
  --line: #e4e4e7;
  --soft: #fafafa;
  --seal: #5b45ff;
  --pass: #15803d;
  --pass-soft: #ecfdf3;
  --fail: #b91c1c;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; border-radius: 6px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
code { font-family: var(--mono); font-size: 12.5px; }

.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--sheet); }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 16px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.wordmark img { display: block; border-radius: 7px; }
.wordmark i { width: 10px; height: 10px; border-radius: 3px; background: var(--seal); display: inline-block; }
.issuer-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; color: var(--ink); }
.issuer-brand img { display: block; max-height: 30px; max-width: 160px; width: auto; height: auto; }
.powered { font-size: 12.5px; color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; }
.powered:hover { color: var(--ink); }

.layout { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: 24px; padding: 24px; max-width: 1440px; margin: 0 auto; align-items: start; }

.summary { display: grid; gap: 16px; position: sticky; top: 16px; }
.eyebrow { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.summary h1 { font-size: 26px; line-height: 1.15; letter-spacing: -0.025em; font-weight: 600; color: var(--ink); margin: 0 0 4px; }
.summary h1 + p { margin: 0; }

.check, .respond { background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.check-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.check-head .am-seal { flex: none; }
.check-head p { margin: 0; }
.check-title { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; font-size: 16px; margin-bottom: 4px !important; }
.check-title .dot { width: 18px; height: 18px; background: var(--pass); display: inline-block; flex: none; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12.5l3 3 5-6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12.5l3 3 5-6'/%3E%3C/svg%3E") center / contain no-repeat; }
.check dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px 12px; margin: 0; font-size: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.check dt { color: var(--muted); }
.check dd { margin: 0; overflow-wrap: anywhere; color: var(--ink); }
.hash { font-size: 11.5px; color: var(--muted); }

.badge { display: inline-block; font-size: 12.5px; font-weight: 500; padding: 2px 9px; border-radius: 6px; }
.badge.good { background: var(--pass-soft); color: var(--pass); }
.badge.plain { background: #f4f4f5; color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font: 500 14.5px var(--font); text-decoration: none; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.btn:hover { background: #27272a; }
.btn.ghost { background: var(--sheet); color: var(--ink); border-color: var(--line); font-size: 13.5px; min-height: 36px; padding: 0 12px; }
.btn.ghost:hover { border-color: #a1a1aa; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.respond { display: grid; gap: 14px; }
.respond h2 { font-size: 17px; font-weight: 600; color: var(--ink); margin: 0; }
.respond p { margin: 0; }

.approvals { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.approvals li { border-left: 3px solid var(--line); padding: 2px 0 2px 10px; font-size: 14px; }
.approvals li.approved { border-color: var(--pass); }
.approvals li.changes { border-color: var(--fail); }
.approvals li p { color: var(--text); margin-top: 4px; }

#approval-form { display: grid; gap: 12px; }
.field { display: grid; gap: 5px; font-size: 13.5px; }
.field span { font-weight: 500; color: var(--ink); }
.field em { font-style: normal; color: var(--muted); font-weight: 400; }
.field input, .field textarea { font: 14.5px var(--font); color: var(--ink); padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--sheet); width: 100%; }
.field input:focus, .field textarea:focus { border-color: var(--seal); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--seal) 18%, transparent); }
.decision { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.decision legend { font-weight: 500; color: var(--ink); margin-bottom: 6px; font-size: 13.5px; }
.choice { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; cursor: pointer; font-size: 14px; }
.choice:has(input:checked) { border-color: var(--ink); background: var(--soft); }
#approval-form .btn { justify-self: start; }
.status { min-height: 1.4em; font-size: 14px; }
.status.ok { color: var(--pass); }
.status.bad { color: var(--fail); }

.report { background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.report iframe { display: block; width: 100%; height: calc(100vh - 100px); min-height: 640px; border: 0; }

.empty { max-width: 560px; margin: 96px auto; padding: 0 24px; display: grid; gap: 14px; }
.empty h1 { font-size: 30px; margin: 12px 0 0; letter-spacing: -0.025em; color: var(--ink); font-weight: 600; }

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; padding: 16px; }
  .summary { position: static; }
  .report iframe { height: 80vh; min-height: 520px; }
  .top { padding: 12px 16px; }
}

@media (max-width: 420px) {
  .decision { grid-template-columns: 1fr; }
}

.cmd { margin: 0; background: #0c0c0e; color: #e4e4e7; border-radius: 10px; padding: 14px 16px; }
.cmd code { font-size: 14px; }

.pay-card { background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; display: grid; gap: 12px; }
.pay-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pay-head h2 { font-size: 17px; font-weight: 600; color: var(--ink); margin: 0; }
.pay-head b { font-size: 22px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.pay-status { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; color: var(--muted); }
.pay-status .dot { width: 16px; height: 16px; background: #a1a1aa; flex: none; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E") center / contain no-repeat; }
.pay-status.ok { color: var(--pass); }
.pay-status.ok .dot { background: var(--pass); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12.5l3 3 5-6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12.5l3 3 5-6'/%3E%3C/svg%3E") center / contain no-repeat; }
.pay-status.wait { color: #a16207; }
.pay-status.wait .dot { background: #eab308; }
.pay-methods { display: grid; gap: 8px; }
.pay-btn { width: 100%; }
.pay-method { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--soft); font-size: 13.5px; }
.pay-method b { display: block; color: var(--ink); margin-bottom: 3px; }
.pay-method p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.pay-method img { display: block; width: 150px; height: 150px; object-fit: contain; background: #fff; border-radius: 6px; margin-top: 4px; }
#payment-form { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.pay-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#payment-form .btn { justify-self: start; }
@media (max-width: 420px) { .pay-fields { grid-template-columns: 1fr; } }

.profile { max-width: 980px; margin: 0 auto; padding: 32px 24px 64px; display: grid; gap: 20px; }
.profile-head { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; background: var(--sheet); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.profile-head h1 { font-size: 32px; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); margin: 0; }
.headline { margin: 6px 0 10px; font-size: 16px; color: var(--text); }
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--sheet); }
.tiles div { padding: 18px 20px; display: grid; gap: 2px; align-content: start; }
.tiles div + div { border-left: 1px solid var(--line); }
.tiles span, .tiles em { font-size: 12.5px; color: var(--muted); font-style: normal; }
.tiles b { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.folios { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.folios li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.folios li span:first-child { color: var(--ink); font-weight: 500; }
.badge-img { display: block; }
.cmd code { white-space: pre-wrap; word-break: break-all; font-size: 12px; }
@media (max-width: 760px) { .profile-head { grid-template-columns: 1fr; } .tiles { grid-template-columns: 1fr 1fr; } .tiles div:nth-child(3) { border-left: 0; } .tiles div:nth-child(n+3) { border-top: 1px solid var(--line); } .profile-grid { grid-template-columns: 1fr; } }

.org { max-width: 1200px; margin: 0 auto; padding: 28px 24px 64px; display: grid; gap: 18px; }
.org-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.org-head h1 { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); margin: 0 0 6px; }
.org-head p { margin: 0; max-width: 70ch; }
.org-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.org-actions .btn { min-height: 36px; font-size: 13.5px; padding: 0 12px; }
.org-actions .btn.ghost.on { border-color: var(--ink); }
.tiles5 { grid-template-columns: repeat(5, 1fr); }
.org-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.org table { width: 100%; border-collapse: collapse; font-size: 14px; }
.org th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; border-bottom: 1px solid var(--line); padding: 8px 12px 8px 0; }
.org td { border-bottom: 1px solid var(--line); padding: 10px 12px 10px 0; vertical-align: top; color: var(--ink); }
.org tr:last-child td { border-bottom: 0; }
.org .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.org .scroll { overflow-x: auto; }
.org-chart { display: block; width: 100%; height: auto; }
.legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; vertical-align: -1px; }
.legend .bar { background: var(--seal); }
.legend .ln { background: var(--ink); height: 2px; vertical-align: 3px; }
@media (max-width: 960px) { .tiles5 { grid-template-columns: 1fr 1fr; } .tiles5 div:nth-child(odd) { border-left: 0; } .tiles5 div:nth-child(n+3) { border-top: 1px solid var(--line); } .org-grid { grid-template-columns: 1fr; } }

.lang-split { border: 0; border-top: 1px solid var(--line, #e4e4e7); margin: 28px 0 20px; width: 100%; }

.top-right { display: inline-flex; align-items: center; gap: 12px; }
.top-right form { margin: 0; }
.lang-link { font-size: 13px; color: var(--muted); text-decoration: none; }
.lang-link:hover { color: var(--ink); }
.btn.sm { min-height: 32px; padding: 0 11px; font-size: 13px; }
.client-login { max-width: 460px; margin: 0 auto; padding: 72px 24px 64px; display: grid; gap: 16px; }
.client-login h1 { font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); margin: 0; }
.client-login p { margin: 0; }
.client-form { display: grid; gap: 14px; padding: 22px; background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; }
.client-step { display: grid; gap: 12px; }
.client-step[hidden] { display: none; }
.chip { display: inline-block; font-size: 12px; font-weight: 500; line-height: 1; padding: 5px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--sheet); white-space: nowrap; margin: 0 4px 4px 0; }
.chip.ok { color: #166534; background: #f0fdf4; border-color: #bbf7d0; }
.chip.warn { color: #9a3412; background: #fff7ed; border-color: #fed7aa; }
.chip.wait { color: #854d0e; background: #fefce8; border-color: #fde68a; }
.invite { align-content: start; background: var(--ink); color: #d4d4d8; border-radius: 14px; padding: 22px; }
.invite h2 { color: #fff; }
.invite .muted { color: #a1a1aa; }
.invite .btn { justify-self: start; background: #fff; color: var(--ink); border-color: #fff; }
.invite .btn:hover { background: #e4e4e7; }
.client-note { margin-top: 4px; }
