/* Barko Loans theme: navy-to-royal-blue hero, bright blue pill buttons, yellow step badges,
   white soft-shadow cards on a cool light background, Ubuntu type. Logo colours for accents. */
:root {
  --navy: #0b1f5c;
  --navy-2: #13307e;
  --blue: #1d4ed8;
  --blue-bright: #2f5ff0;
  --blue-soft: #e8eefe;
  --yellow: #fbbf24;
  --yellow-ink: #ffffff;
  --logo-green: #13884a;
  --logo-red: #e0352b;
  --logo-yellow: #f6b81c;
  --logo-blue: #263a96;
  --coral: #e5483f;

  --bg: #f2f5fc;
  --surface: #ffffff;
  --surface-2: #f6f8fd;
  --ink: #101a3a;
  --muted: #5b6685;
  --line: #e3e8f4;
  --good: #15803d;
  --good-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --bad: #c0262d;
  --bad-soft: #fde4e4;

  --hero: radial-gradient(120% 140% at 85% 0%, #2a56e0 0%, #1739a8 38%, #0b1f5c 100%);
  --shadow: 0 2px 6px rgba(16, 26, 58, .05), 0 10px 30px rgba(16, 26, 58, .07);
  --shadow-blue: 0 10px 24px rgba(37, 79, 230, .35);
  --radius: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 Ubuntu, system-ui, -apple-system, "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
button, input, textarea { font: inherit; color: inherit; }
b, strong { font-weight: 700; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small-text { font-size: 12px; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 24px; background: var(--surface);
  flex: 0 0 auto; box-shadow: 0 1px 0 var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; margin-right: auto; min-width: 0; }
.brand-logo { height: 44px; width: auto; display: block; }
.brand-divider { width: 1px; height: 30px; background: var(--line); }
.brand-sub { display: flex; flex-direction: column; font-size: 14px; font-weight: 500; color: var(--navy); line-height: 1.2; white-space: nowrap; }
.poc { font-size: 11px; font-weight: 500; color: var(--warn); }
.brand-stripe { display: flex; height: 3px; flex: 0 0 auto; }
.brand-stripe span { flex: 1; }
.brand-stripe span:nth-child(1) { background: var(--logo-green); }
.brand-stripe span:nth-child(2) { background: var(--logo-red); }
.brand-stripe span:nth-child(3) { background: var(--logo-yellow); }
.brand-stripe span:nth-child(4) { background: var(--logo-blue); }

.tabs { display: none; gap: 2px; }
.tab {
  white-space: nowrap; border: 0; background: transparent; padding: 8px 10px; cursor: pointer;
  font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; border-radius: 0;
}
.tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--coral); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }

/* ---------- Buttons ---------- */
.btn, .ghost {
  border-radius: 999px; padding: 11px 22px; cursor: pointer; font-weight: 500; border: 1px solid transparent;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn { background: linear-gradient(180deg, var(--blue-bright), var(--blue)); color: #fff; box-shadow: var(--shadow-blue); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(37, 79, 230, .42); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.ghost { background: var(--surface); border-color: #c9d3ee; color: var(--navy); }
.ghost:hover { background: var(--blue-soft); }
.small { padding: 7px 14px; font-size: 13px; white-space: nowrap; }
.block { width: 100%; }
.link { color: var(--blue); font-weight: 500; }

/* ---------- Layout ---------- */
.layout { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 460px); min-height: 0; }
.chat { display: flex; flex-direction: column; min-height: 0; }
.office { position: relative; min-width: 0; display: flex; flex-direction: column; min-height: 0; background: var(--bg); border-left: 1px solid var(--line); }

/* ---------- Chat ---------- */
.messages { flex: 1 1 auto; overflow-y: auto; padding: 24px 20px 12px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: min(580px, 86%); padding: 11px 16px; border-radius: 18px; word-wrap: break-word; }
.msg-row { display: flex; align-items: flex-start; gap: 10px; max-width: min(620px, 92%); }
.msg-row .msg { max-width: 100%; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #fff; padding: 4px; box-shadow: var(--shadow); flex: 0 0 auto; }
.msg.consultant { background: var(--surface); border-top-left-radius: 6px; box-shadow: var(--shadow); }
.msg.customer {
  align-self: flex-end; background: linear-gradient(135deg, var(--blue-bright), var(--blue));
  color: #fff; border-top-right-radius: 6px; box-shadow: 0 6px 16px rgba(37, 79, 230, .25);
}
.msg p { margin: 0 0 6px; }
.msg p:last-child { margin-bottom: 0; }
.msg ul { margin: 4px 0 6px; padding-left: 18px; }
.msg .who { font-size: 11px; font-weight: 700; color: var(--blue); margin-bottom: 3px; letter-spacing: .02em; }
.msg.photo { display: flex; align-items: center; gap: 8px; }
.msg.photo img { width: 72px; height: 48px; object-fit: cover; border-radius: 8px; }
.event {
  align-self: center; font-size: 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--line);
  padding: 5px 12px; border-radius: 999px; max-width: 90%; text-align: center;
}
.event.good { color: var(--good); border-color: #bbf7d0; background: var(--good-soft); }
.typing { align-self: flex-start; margin-left: 44px; background: var(--surface); padding: 13px 16px; border-radius: 18px; border-top-left-radius: 6px; box-shadow: var(--shadow); display: flex; gap: 4px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: bounce 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; background: var(--logo-yellow); }
.typing span:nth-child(3) { animation-delay: .3s; background: var(--logo-red); }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .6; } 30% { transform: translateY(-4px); opacity: 1; } }

.composer { display: flex; align-items: flex-end; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); box-shadow: 0 -1px 0 var(--line); }
.input-wrap { flex: 1; display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 24px; padding: 10px 16px; }
.input-wrap:focus-within { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px var(--blue-soft); }
textarea { border: 0; outline: 0; background: transparent; resize: none; max-height: 140px; line-height: 1.4; }
.icon-btn, .send-btn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid #c9d3ee; background: var(--surface); display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; color: var(--navy); }
.icon-btn:hover { background: var(--blue-soft); }
.send-btn { background: linear-gradient(180deg, var(--blue-bright), var(--blue)); border-color: transparent; color: #fff; box-shadow: var(--shadow-blue); }
.send-btn:disabled { opacity: .5; box-shadow: none; }
.attachment { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.attachment img { width: 44px; height: 30px; object-fit: cover; border-radius: 6px; }
.attachment button { border: 0; background: transparent; cursor: pointer; font-size: 18px; color: var(--muted); }

/* ---------- Back office ---------- */
.office-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 18px 18px; background: var(--hero); color: #fff; }
.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #b9c8ff; }
.office-title { font-weight: 700; font-size: 17px; }
.stage { font-size: 12px; font-weight: 500; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); white-space: nowrap; color: #fff; }
.stage.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.stage.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.office-body { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.empty { color: var(--muted); font-size: 14px; padding: 28px 16px; text-align: center; }
.card { background: var(--surface); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 10px; font-size: 14px; font-weight: 700; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.card h3::before { content: ""; width: 4px; height: 14px; border-radius: 2px; background: var(--yellow); }
.card h3 .pill { margin-left: auto; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.pill { font-size: 11px; font-weight: 500; padding: 2px 9px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); white-space: nowrap; }
.pill.ok { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.fail { background: var(--bad-soft); color: var(--bad); }
.flags { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--warn); }
.calc { font-size: 13px; width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.calc td { padding: 3px 0; }
.calc td:last-child { text-align: right; }
.calc tr.total td { border-top: 1px solid var(--line); font-weight: 700; padding-top: 7px; color: var(--navy); }
.calc .note { color: var(--muted); font-size: 11px; }
.offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.offer { background: var(--surface-2); border-radius: 12px; padding: 7px 9px; font-size: 12px; color: var(--muted); }
.offer b { display: block; font-size: 14px; color: var(--navy); }
.reasons { margin: 0; padding-left: 16px; font-size: 13px; }
.reasons li { margin-bottom: 5px; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 13px; }
.timeline li { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: start; }
.dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--muted); }
.dot.ok { background: var(--good); } .dot.warn { background: var(--logo-yellow); } .dot.fail { background: var(--bad); } .dot.info { background: var(--blue); }
.timeline .t { color: var(--muted); font-size: 11px; white-space: nowrap; }
.timeline .d { color: var(--muted); font-size: 12px; }
.docs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.doc {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; width: 100%; text-align: left;
}
.doc:hover { border-color: var(--blue); background: var(--blue-soft); }
.doc.fresh { animation: flash 2.4s ease-out; }
@keyframes flash { 0% { background: #fff6d6; border-color: var(--yellow); } 100% { background: var(--surface); } }
.doc-icon { width: 32px; height: 38px; border-radius: 7px; background: var(--bad-soft); color: var(--bad); display: grid; place-items: center; font-size: 10px; font-weight: 700; flex: 0 0 auto; }
.doc-icon.img { background: var(--blue-soft); color: var(--blue); }
.doc-meta { min-width: 0; flex: 1; }
.doc-title { display: block; font-size: 13px; font-weight: 500; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-sub { display: block; font-size: 11px; color: var(--muted); }
.payout-steps { display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.payout-steps .step { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.payout-steps .step.done { color: var(--ink); }
.payout-steps .step .tick { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 11px; }
.payout-steps .step.done .tick { background: var(--good); border-color: var(--good); color: #fff; }
.payout-steps .step.current .tick { border-color: var(--blue); animation: pulse 1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px var(--blue-soft); } }

/* ---------- Viewer ---------- */
.viewer { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); z-index: 5; }
.viewer-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.viewer-title { flex: 1; font-weight: 500; color: var(--navy); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-body { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.viewer-body canvas, .viewer-body img { width: 100%; max-width: 820px; height: auto; background: #fff; box-shadow: var(--shadow); border-radius: 6px; }

/* ---------- Modals ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(11, 31, 92, .55); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border-radius: 22px; padding: 24px; box-shadow: 0 24px 70px rgba(11, 31, 92, .35); }
.modal.wide { max-width: 520px; }
.modal h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.15; }
.modal h2 { margin: 0 0 6px; font-size: 20px; color: var(--navy); }
.modal-icon { width: 54px; height: 54px; border-radius: 16px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; margin-bottom: 12px; }
.lead { margin: 0 0 10px; }
.consent-text { font-size: 13px; line-height: 1.55; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; max-height: 220px; overflow-y: auto; margin-bottom: 6px; color: var(--ink); }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.field label { font-size: 13px; font-weight: 500; }
.field input { padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); outline: 0; }
.field input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px var(--blue-soft); }
.error { color: var(--bad); background: var(--bad-soft); border-radius: 12px; padding: 8px 12px; font-size: 13px; margin: 8px 0; }
.fineprint { font-size: 11px; color: var(--muted); text-align: center; margin: 14px 0 0; }

/* Start screen: the barko.co.za hero */
.modal.start { padding: 0; max-width: 480px; }
.start-logo { padding: 18px 24px 14px; display: flex; justify-content: center; }
.start-logo img { height: 60px; width: auto; }
.start-hero { background: var(--hero); color: #fff; padding: 28px 26px 30px; }
.start-hero p { color: #d6defb; margin: 0 0 20px; }
.start-hero .field label { color: #fff; }
.start-hero .field input { background: rgba(255, 255, 255, .95); border-color: transparent; color: var(--ink); }
.hero-btn { padding: 14px 34px; font-size: 16px; min-width: 220px; }
.steps { list-style: none; margin: 0; padding: 18px 24px 4px; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; gap: 14px; align-items: center; background: var(--surface); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); }
.steps li div { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.steps li b { color: var(--ink); font-size: 15px; font-weight: 500; }
.step-no { width: 36px; height: 36px; border-radius: 10px; background: var(--yellow); color: var(--yellow-ink); display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; box-shadow: 0 6px 14px rgba(251, 191, 36, .35); }
.modal.start .personas, .modal.start .fineprint { margin-left: 24px; margin-right: 24px; }
.modal.start .fineprint { margin-bottom: 20px; }
.personas { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 13px; }
.personas summary { cursor: pointer; font-weight: 500; color: var(--navy); }
.persona { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.persona:last-child { border-bottom: 0; }
.persona .name { font-weight: 500; }
.persona .sub { font-size: 12px; color: var(--muted); }
.persona code { font-size: 12px; background: var(--blue-soft); color: var(--blue); padding: 3px 8px; border-radius: 8px; cursor: pointer; white-space: nowrap; }

.secure-chip { display: inline-block; font-size: 12px; font-weight: 500; color: var(--good); background: var(--good-soft); padding: 4px 12px; border-radius: 999px; margin-bottom: 10px; }
.bank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.bank-tile { border: 1px solid var(--line); border-radius: 14px; padding: 16px 10px; background: var(--surface); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; }
.bank-tile:hover { border-color: var(--blue); background: var(--blue-soft); }
.bank-mark { width: 38px; height: 38px; border-radius: 11px; color: #fff; display: grid; place-items: center; font-weight: 700; }
.bank-badge { width: 50px; height: 50px; border-radius: 14px; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 20px; margin-bottom: 10px; }
.phone { margin: 16px auto 8px; width: 220px; border: 8px solid #101a3a; border-radius: 30px; background: #101a3a; }
.phone-screen { background: var(--surface); border-radius: 22px; padding: 18px 14px; text-align: center; display: flex; flex-direction: column; gap: 8px; }
.phone-title { font-weight: 700; }
.phone-msg { font-size: 13px; }
.phone-small { font-size: 11px; color: var(--muted); }
.account-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.account { display: flex; justify-content: space-between; align-items: center; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--surface); width: 100%; text-align: left; }
.account:hover { border-color: var(--blue); background: var(--blue-soft); }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--blue-soft); border-top-color: var(--blue); animation: spin .8s linear infinite; margin: 8px auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
#bankStepWorking { text-align: center; }
.sign-summary { margin: 12px 0; border-radius: 16px; padding: 14px 16px; background: var(--surface-2); }
.sign-summary .big { font-size: 30px; font-weight: 700; color: var(--blue); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; margin: 14px 0 4px; cursor: pointer; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--blue); flex: 0 0 auto; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; pointer-events: none; }
.toast { background: var(--navy); color: #fff; padding: 11px 16px; border-radius: 14px; font-size: 13px; box-shadow: var(--shadow); max-width: 320px; animation: slide .2s ease-out; border-left: 4px solid var(--yellow); }
@keyframes slide { from { transform: translateY(8px); opacity: 0; } }

/* ---------- Narrow screens: tabs ---------- */
@media (max-width: 900px) {
  .tabs { display: flex; }
  .brand-sub, .brand-divider { display: none; }
  .brand-logo { height: 36px; }
  .topbar { gap: 8px; padding: 8px 12px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .office { border-left: 0; }
  .layout[data-view="chat"] .office { display: none; }
  .layout[data-view="office"] .chat { display: none; }
  .messages { padding: 16px 12px 10px; }
  .msg { max-width: 92%; }
  .offers { grid-template-columns: repeat(2, 1fr); }
  .toasts { left: 16px; right: 16px; bottom: 90px; align-items: center; }
  .modal h1 { font-size: 24px; }
}
@media (max-width: 400px) {
  .brand-logo { height: 30px; }
  .tab { padding: 8px 6px; font-size: 14px; }
  #restartBtn { padding: 6px 10px; }
}

/* ---------- Quick replies ---------- */
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin: -2px 0 4px 44px; max-width: min(620px, 92%); animation: slide .2s ease-out; }
.choice {
  border: 1.5px solid var(--blue); background: var(--surface); color: var(--blue); border-radius: 999px;
  padding: 8px 16px; font-weight: 500; cursor: pointer; transition: background .12s ease, color .12s ease, transform .12s ease;
}
.choice:hover { background: var(--blue); color: #fff; transform: translateY(-1px); }
.choice.other { border-style: dashed; border-color: #c9d3ee; color: var(--muted); }
.choice.other:hover { background: var(--blue-soft); color: var(--navy); }

/* ---------- Uploads ---------- */
.msg.upload { display: flex; align-items: center; gap: 10px; }
.msg.upload img { width: 88px; height: 56px; object-fit: cover; border-radius: 8px; border: 2px solid rgba(255, 255, 255, .5); }
.msg.upload .doc-icon { background: rgba(255, 255, 255, .2); color: #fff; }
.tips { margin: 4px 0 14px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tips li { font-size: 12px; color: var(--navy); background: var(--blue-soft); padding: 4px 10px; border-radius: 999px; }
.tips li::before { content: "✓ "; color: var(--good); font-weight: 700; }
.upload-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.upload-option {
  border: 1.5px dashed #c3cfee; border-radius: 16px; background: var(--surface-2); padding: 18px 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--blue); text-align: center;
}
.upload-option:hover { border-color: var(--blue); background: var(--blue-soft); }
.upload-option b { color: var(--navy); font-weight: 500; margin-top: 4px; }
.upload-option span { font-size: 12px; color: var(--muted); }
.upload-preview { border-radius: 14px; background: var(--surface-2); padding: 10px; display: flex; justify-content: center; }
.upload-preview img { max-width: 100%; max-height: 240px; border-radius: 10px; box-shadow: var(--shadow); }
.pdf-chip { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--navy); padding: 10px; }
.id-download {
  font-size: 12px; font-weight: 500; color: var(--blue); background: var(--blue-soft); padding: 5px 10px; border-radius: 999px;
  text-decoration: none; white-space: nowrap;
}
.id-download:hover { background: var(--blue); color: #fff; }
@media (max-width: 900px) { .choices { margin-left: 0; max-width: 100%; } }

/* ---------- DebiCheck: simulated banking app ---------- */
.dc-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; max-height: calc(100vh - 32px); }
.dc-hint { margin: 0; font-size: 12px; color: #dbe4ff; text-align: center; }
.dc-phone {
  width: 330px; max-width: calc(100vw - 32px); height: 640px; max-height: calc(100vh - 70px);
  background: #f4f5f7; border: 10px solid #0d1328; border-radius: 40px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45); display: flex; flex-direction: column; position: relative;
}
.dc-status { display: flex; justify-content: space-between; padding: 8px 20px 4px; font-size: 12px; font-weight: 700; color: #0d1328; }
.dc-notice {
  margin: 14px 10px; background: rgba(255, 255, 255, .96); border-radius: 18px; padding: 12px; display: flex; gap: 10px; align-items: flex-start;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .15); cursor: pointer; animation: drop .35s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes drop { from { transform: translateY(-40px); opacity: 0; } }
.dc-notice div { display: flex; flex-direction: column; font-size: 13px; line-height: 1.3; flex: 1; }
.dc-now { font-size: 11px; color: var(--muted); }
.dc-app { width: 36px; height: 36px; border-radius: 9px; color: #fff; display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }
.dc-app-screen { flex: 1; display: flex; flex-direction: column; min-height: 0; animation: fade .2s ease-out; }
.dc-bankbar { color: #fff; padding: 14px 18px; display: flex; justify-content: space-between; font-weight: 700; }
.dc-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.dc-title { font-size: 18px; font-weight: 700; color: #0d1328; }
.dc-sub { font-size: 13px; color: var(--muted); margin-top: -6px; }
.dc-amount { background: #fff; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; box-shadow: 0 2px 8px rgba(0, 0, 0, .05); }
.dc-amount span { font-size: 12px; color: var(--muted); }
.dc-amount b { font-size: 26px; color: #0d1328; }
.dc-rows { background: #fff; border-radius: 14px; padding: 10px 14px; margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; font-size: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, .05); }
.dc-rows dt { color: var(--muted); }
.dc-rows dd { margin: 0; text-align: right; font-weight: 500; color: #0d1328; word-break: break-word; }
.dc-timer { text-align: center; font-size: 12px; color: var(--warn); }
.dc-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }
.dc-buttons button { border: 0; border-radius: 12px; padding: 13px; font-weight: 700; cursor: pointer; font-size: 15px; }
.dc-reject { background: #e8eaef; color: #0d1328; }
.dc-approve { background: #15803d; color: #fff; }
.dc-approve:hover { filter: brightness(1.08); }

.mandate { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.mandate-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 6px; color: var(--navy); }
.payout-steps .step.failed { color: var(--bad); }
.payout-steps .step.failed .tick { background: var(--bad); border-color: var(--bad); color: #fff; }

/* ---------- Finished application ---------- */
.composer.closing { animation: sink .35s ease-in forwards; }
@keyframes sink { to { transform: translateY(100%); opacity: 0; } }
.complete {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  background: var(--surface); box-shadow: 0 -1px 0 var(--line); animation: rise .35s ease-out;
}
@keyframes rise { from { transform: translateY(30%); opacity: 0; } }
.complete-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--good-soft); color: var(--good); display: grid; place-items: center; font-size: 22px; font-weight: 700; flex: 0 0 auto; }
.complete-text { flex: 1; min-width: 200px; display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.complete-text b { color: var(--navy); font-size: 16px; }
.complete-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Loan accounts ---------- */
.account-card { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.account-card + .account-card { margin-top: 8px; }
.account-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; color: var(--navy); font-size: 13px; }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 10px 0 4px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--logo-green)); border-radius: 3px; }

/* ---------- Action cards (tap to open a popup) ---------- */
.action-card {
  display: flex; align-items: center; gap: 12px; margin-left: 44px; max-width: min(560px, 88%);
  background: var(--surface); border: 1.5px solid var(--blue); border-radius: 16px; padding: 12px 14px;
  box-shadow: var(--shadow); animation: slide .2s ease-out;
}
.action-card.done { border-color: var(--line); box-shadow: none; opacity: .75; }
.action-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; flex: 0 0 auto; }
.action-card.done .action-icon { background: var(--surface-2); color: var(--muted); }
.action-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.action-text b { font-size: 14px; font-weight: 500; color: var(--navy); }
.action-card .btn, .action-card .ghost { flex: 0 0 auto; }
@media (max-width: 900px) {
  .action-card { margin-left: 0; max-width: 100%; flex-wrap: wrap; }
  .action-card .btn, .action-card .ghost { width: 100%; }
}
