*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: #f6f7fb;
  color: #1a1f2e;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.topbar {
  background: var(--brand, #0B2545);
  color: #fff;
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg, #FFD166, #EF476F);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.15);
}
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: 0.3px; }
.brand-sub { font-size: 13px; opacity: 0.75; margin-left: 6px; }
.navlink {
  color: #fff; opacity: 0.85; text-decoration: none; margin-left: 18px; font-size: 14px;
}
.navlink:hover { opacity: 1; text-decoration: underline; }

/* Layout */
main { flex: 1; max-width: 960px; margin: 0 auto; padding: 40px 24px 80px; width: 100%; }
footer {
  background: #ecedf3; color: #6b7280; text-align: center;
  padding: 14px; font-size: 13px;
}

/* Hero */
.hero { text-align: center; padding: 40px 0 24px; }
.hero h1 { font-size: 36px; margin: 0 0 14px; color: var(--brand); }
.lead { font-size: 17px; color: #4a5568; max-width: 560px; margin: 0 auto 24px; }
.note { font-size: 13px; color: #8b93a7; margin-top: 14px; }

/* CTA */
.cta {
  display: inline-block;
  background: var(--brand);
  color: #fff !important;
  padding: 14px 32px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 4px 14px rgba(11,37,69,0.25);
  transition: transform 0.08s, box-shadow 0.15s;
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(11,37,69,0.35); }
.cta.secondary { background: #fff; color: var(--brand) !important; border: 1.5px solid var(--brand); box-shadow: none; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Demo banner on /accounts */
.demo-banner {
  background: linear-gradient(135deg, #FFD166, #EF476F);
  color: #2c1a2e;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(239,71,105,0.2);
}

/* Simulated bank screens */
.bank-card {
  background: #fff;
  border: 1px solid #e4e7ef;
  border-radius: 14px;
  padding: 32px;
  max-width: 520px;
  margin: 0 auto;
  box-shadow: 0 2px 10px rgba(11,37,69,0.06);
}
.bank-header { border-bottom: 1px solid #eef0f5; padding-bottom: 18px; margin-bottom: 20px; }
.bank-logo { display: flex; align-items: center; gap: 14px; }
.bank-logo .shield {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, #0B2545, #1a3f70);
  color: #FFD166;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.bank-logo h1 { margin: 0; font-size: 20px; color: var(--brand); }
.bank-sub { font-size: 12px; color: #8b93a7; text-transform: uppercase; letter-spacing: 0.5px; }
.lead-small { font-size: 14px; color: #4a5568; margin: 0 0 22px; }

.bank-form { display: flex; flex-direction: column; gap: 14px; }
.bank-form label { display: flex; flex-direction: column; gap: 5px; }
.bank-form label > span { font-size: 12px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.bank-form input, .bank-form select {
  padding: 11px 13px; border: 1px solid #d5d9e3; border-radius: 8px;
  font-size: 15px; background: #fafbfd; color: #1a1f2e;
  font-family: inherit;
}
.bank-form input:read-only, .bank-form select:disabled { cursor: not-allowed; opacity: 0.85; }
.bank-form button { margin-top: 8px; border: none; cursor: pointer; font-family: inherit; }

.consent-list { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 10px; }
.consent-list li { display: flex; gap: 12px; padding: 12px 14px; background: #f9fafc; border-radius: 8px; }
.consent-list .ck {
  flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: #0a7a3b; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.consent-list strong { display: block; font-size: 14px; color: #1a1f2e; }
.consent-list small { font-size: 12px; color: #6b7280; }

.consent-accounts {
  background: #fff7e8; border: 1px solid #f0d79a; border-radius: 8px;
  padding: 12px 14px; margin-bottom: 18px; font-size: 13px;
}
.consent-accounts strong { display: block; margin-bottom: 3px; color: #7a5614; }
.consent-accounts span { color: #4a5568; }

/* SCA push-TAN stage */
.sca-card { max-width: 680px; }
.sca-stage { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; }
@media (max-width: 600px) { .sca-stage { grid-template-columns: 1fr; } }

.phone {
  width: 180px; height: 340px;
  background: #1a1f2e; border-radius: 28px;
  padding: 8px; box-shadow: 0 10px 30px rgba(11,37,69,0.25);
  position: relative;
}
.phone-notch {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 16px; background: #000; border-radius: 12px; z-index: 2;
}
.phone-screen {
  width: 100%; height: 100%;
  background: linear-gradient(160deg, #eef4ff, #fff);
  border-radius: 22px; overflow: hidden;
  padding: 30px 10px 10px;
}
.phone-app-head {
  font-size: 10px; color: #8b93a7; text-transform: uppercase;
  letter-spacing: 0.5px; text-align: center; margin-bottom: 10px;
}
.phone-alert {
  background: #fff; border-radius: 12px; padding: 10px 12px;
  box-shadow: 0 4px 12px rgba(11,37,69,0.12);
  font-size: 10.5px; color: #1a1f2e; line-height: 1.35;
}
.phone-alert strong { color: var(--brand); }
.phone-code { margin: 8px 0 10px; font-size: 11px; color: #4a5568; }
.phone-code b { font-size: 14px; color: var(--brand); letter-spacing: 1px; }
.phone-btns { display: flex; gap: 6px; }
.phone-btn-deny, .phone-btn-approve {
  flex: 1; text-align: center; padding: 5px 0; border-radius: 6px; font-size: 9.5px; font-weight: 600;
}
.phone-btn-deny { background: #eef0f5; color: #6b7280; }
.phone-btn-approve { background: #0a7a3b; color: #fff; }

.pulse { animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(11,37,69,0.12); transform: scale(1); }
  50% { box-shadow: 0 6px 24px rgba(10,122,59,0.35); transform: scale(1.02); }
}

.sca-side { display: flex; flex-direction: column; gap: 14px; }
.sca-wait { font-size: 17px; color: var(--brand); margin: 0; font-weight: 600; }
.sca-hint { font-size: 14px; color: #4a5568; margin: 0; line-height: 1.5; }
.sca-code {
  display: inline-block; background: var(--brand); color: #FFD166;
  padding: 1px 10px; border-radius: 4px; font-weight: 700; letter-spacing: 1px;
  font-family: "SF Mono", Menlo, monospace;
}
.sca-countdown {
  font-size: 12px; color: #8b93a7; background: #f9fafc;
  padding: 8px 12px; border-radius: 6px; text-align: center;
}
.sca-countdown #sca-sec { font-weight: 700; color: var(--brand); }

.dots::after {
  content: '';
  animation: dots 1.2s steps(4) infinite;
}
@keyframes dots {
  0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; }
  75% { content: '...'; } 100% { content: ''; }
}

/* Steps */
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-top: 56px;
}
.step {
  background: #fff; border-radius: 12px; padding: 22px;
  border: 1px solid #e4e7ef;
}
.step .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700;
  margin-bottom: 10px;
}
.step h3 { margin: 0 0 6px; font-size: 17px; color: var(--brand); }
.step p { margin: 0; color: #5b6579; font-size: 14px; }

/* Accounts */
.result-header { margin-bottom: 24px; }
.result-header h1 { color: var(--brand); margin: 0 0 4px; }
.empty { background: #fff; padding: 24px; border-radius: 10px; text-align: center; color: #6b7280; }

.account-card {
  background: #fff; border: 1px solid #e4e7ef; border-radius: 14px;
  padding: 22px; margin-bottom: 18px; box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.account-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 18px; border-bottom: 1px solid #eef0f5; padding-bottom: 16px; margin-bottom: 14px;
}
.account-head h2 { margin: 0 0 2px; font-size: 19px; color: var(--brand); }
.bank { font-size: 13px; color: #8b93a7; }
.balance { text-align: right; }
.balance .amount { display: block; font-size: 24px; font-weight: 700; color: var(--brand); }
.balance .currency { font-size: 14px; color: #6b7280; margin-left: 4px; }
.balance .label { display: block; font-size: 12px; color: #8b93a7; margin-top: 2px; }

.account-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 18px;
}
.account-meta > div { display: flex; flex-direction: column; gap: 2px; }
.account-meta .k { font-size: 11px; color: #8b93a7; text-transform: uppercase; letter-spacing: 0.5px; }
.account-meta .v { font-size: 14px; color: #1a1f2e; font-family: "SF Mono", Menlo, monospace; }

.error-inline { margin-top: 14px; padding: 10px 14px; background: #fff3f3; border-left: 3px solid #ef476f; border-radius: 4px; font-size: 13px; color: #7a1f2b; }

details { margin-top: 16px; }
summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: 14px; padding: 8px 0; }

.tx-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.tx-table th, .tx-table td { padding: 8px 10px; border-bottom: 1px solid #eef0f5; text-align: left; }
.tx-table th { background: #f9fafc; color: #6b7280; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; }
.tx-table td.right, .tx-table th.right { text-align: right; }
.tx-table td.pos { color: #0a7a3b; font-weight: 600; }
.tx-table td.neg { color: #c92a4a; font-weight: 600; }

.actions { margin-top: 20px; text-align: center; }

/* Error page */
.error-card { background: #fff; border-radius: 14px; padding: 40px; text-align: center; border: 1px solid #e4e7ef; }
.error-card h1 { color: #c92a4a; margin: 0 0 8px; }
.error-card pre { background: #f6f7fb; padding: 14px; border-radius: 8px; text-align: left; font-size: 12px; overflow-x: auto; }

@media (max-width: 640px) {
  .hero h1 { font-size: 28px; }
  .account-head { flex-direction: column; }
  .balance { text-align: left; }
}

/* ---------- Partner co-brand (VodafoneZiggo) ---------- */
/* Picked from partner's style3.css: primary red, light surfaces, white header.
   Vars override our --brand so existing components recolor automatically. */
:root {
  --partner-primary: #E60000;
  --partner-primary-variant: #B30000;
  --partner-bg: #f9f9fb;
  --partner-surface: #FAFAFC;
  --partner-on-surface: #606060;
  --partner-error: #df0000;
  --brand: var(--partner-primary);
}
body { background: var(--partner-bg); color: #1a1f2e; }

.partner-topbar {
  background: #FFFFFF;
  color: var(--partner-on-surface);
  border-bottom: 1px solid #e4e7ef;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.partner-topbar .partner-logo {
  height: 48px;
  width: auto;
  display: block;
}
.partner-topbar .brand-sub {
  color: var(--partner-on-surface);
  opacity: 1;
  font-size: 13px;
}
.partner-topbar .navlink { color: var(--partner-on-surface); }
.partner-topbar .navlink:hover { color: var(--partner-primary); opacity: 1; }

/* Hover state on primary CTA uses darker partner red */
.cta:not(.secondary):hover {
  box-shadow: 0 6px 18px rgba(230,0,0,0.30);
}

/* Recolor mock-flow shield from navy to Vodafone red */
.bank-logo .shield {
  background: linear-gradient(135deg, var(--partner-primary), var(--partner-primary-variant));
  color: #fff;
}

/* Sample-data banner — partner red gradient instead of yellow/pink */
.demo-banner {
  background: linear-gradient(135deg, var(--partner-primary), var(--partner-primary-variant));
  color: #fff;
  box-shadow: 0 2px 8px rgba(230,0,0,0.20);
}

/* Phone push-TAN approve button — partner red (was green) */
.phone-btn-approve { background: var(--partner-primary); }

/* Pulse glow uses partner red */
@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(230,0,0,0.18); transform: scale(1); }
  50%      { box-shadow: 0 6px 24px rgba(230,0,0,0.45); transform: scale(1.02); }
}

/* SCA inline code chip — red on white instead of yellow on navy */
.sca-code {
  background: var(--partner-primary);
  color: #fff;
}
