/* base.css — shared layout for gov.pt + all bank clones (lab simulation) */
:root {
  --base-text: #1c2733;
  --base-muted: #66788c;
  --base-border: #d8e0ea;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; background: #f4f6f8; color: var(--base-text);
       font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

.wrap { max-width: 480px; margin: 26px auto; padding: 0 18px; }
.card { background: #fff; border-radius: var(--radius);
        box-shadow: 0 2px 12px rgba(12,40,80,.08); padding: 26px; }
.card.center { text-align: center; }
.card h1 { margin: 0 0 6px; font-size: 22px; }
.subtitle { font-size: 14px; color: var(--base-muted); margin: 4px 0 16px; line-height: 1.5; }

label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 5px; }
input[type=text], input[type=password], input[type=tel] {
  width: 100%; padding: 11px 12px; font-size: 15px;
  border: 1px solid #c4cfdb; border-radius: 7px; background: #fbfdff;
}
input:focus { outline: 2px solid #04345b33; outline-offset: 1px; }
.chk { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 13px; margin: 14px 0; }
.chk input { width: auto; }
.btn-primary { width: 100%; margin-top: 16px; padding: 12px; font-size: 16px;
  border: none; border-radius: 7px; font-weight: 700; cursor: pointer; color: #fff;
  background: #04345b; }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-secondary { display: block; text-align: center; margin-top: 12px; padding: 11px;
  border: 1.5px solid #04345b; color: #04345b; border-radius: 7px;
  text-decoration: none; font-weight: 600; font-size: 14px; width: 100%; }
.link { color: #114a8b; }
.hint { font-size: 12px; color: var(--base-muted); margin-top: 12px; }
.muted { color: var(--base-muted); }

.badge-secure { font-size: 12px; background: rgba(255,255,255,.12); padding: 4px 10px;
  border-radius: 20px; border: 1px solid rgba(255,255,255,.25); color: #fff; }

/* steps indicator */
.steps { display: flex; align-items: center; gap: 6px; margin: 6px 0 18px; }
.step { width: 26px; height: 26px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
  background: #eef2f7; color: #667; }
.step.active { background: #04345b; color: #fff; }
.step.done { background: #2e8b57; color: #fff; }
.sep { width: 22px; height: 2px; background: #d8e0ea; }
.steps-label { margin-left: 8px; font-size: 12px; color: var(--base-muted); }

/* code box */
.code-box { background: #f8f9fa; border: 2px dashed #d1d5db; border-radius: 10px;
  padding: 20px; text-align: center; font-family: Consolas, "Courier New", monospace;
  font-size: 36px; letter-spacing: .25em; font-weight: 700; margin: 18px 0 8px; }
.code-note { text-align: center; font-size: 12.5px; color: var(--base-muted); margin: 4px 0 12px; }

/* alert */
.alert-err { background: #fdecec; border: 1px solid #e08080; color: #a94442;
  padding: 9px 12px; border-radius: 7px; font-size: 13px; margin-bottom: 12px; }

/* payment summary */
.pay-summary { background: #f8fafc; border: 1px solid #e2e9f1; border-radius: 8px; padding: 14px 16px; margin: 14px 0; }
.pay-row { display: flex; justify-content: space-between; padding: 7px 0;
  border-bottom: 1px dashed #dde5ee; font-size: 14px; }
.pay-row:last-child { border-bottom: none; }
.pay-row.total { font-size: 17px; font-weight: 700; }

/* spinner / icons */
.spinner { width: 46px; height: 46px; border: 5px solid #e2e9f1; border-top-color: #04345b;
  border-radius: 50%; margin: 10px auto 20px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-circle { width: 64px; height: 64px; border-radius: 50%; margin: 6px auto 16px;
  display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; }
.icon-circle.ok { background: #e7f7ee; color: #1e8e4e; }
.icon-circle.warn { background: #fdf0e7; color: #c05621; }

/* dividers */
.divider { text-align: center; margin: 16px 0 10px; position: relative; font-size: 13px; color: #889; }
.divider::before, .divider::after { content: ""; display: inline-block; width: 40%;
  border-top: 1px solid #d8e0ea; vertical-align: middle; }

/* bank header generic */
.bank-header { display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: #fff; border-bottom: 1px solid #e2e9f1; }
.bank-logo { font-weight: 800; font-size: 18px; letter-spacing: .5px; }
.bank-footer { text-align: center; font-size: 12px; color: var(--base-muted); padding: 22px; }

/* safety strip (Millennium) */
.safety-strip { background: #fff7ed; border-left: 3px solid #e87722; padding: 9px 12px;
  border-radius: 6px; font-size: 12.5px; margin-bottom: 16px; }

/* tabs (Santander) */
.tabs { display: flex; gap: 6px; border-bottom: 2px solid #f1f3f7; margin-bottom: 16px; }
.tab { flex: 1; padding: 10px; background: none; border: none; font-size: 13.5px;
  cursor: pointer; color: #667; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab.active { color: #ec0000; border-bottom-color: #ec0000; font-weight: 700; }
.tab-panel.hidden { display: none; }

/* device mock (Santander push) */
.device-mock { width: 200px; height: 200px; margin: 14px auto; border: 2px solid #e2e9f1;
  border-radius: 24px; background: #fff; display: flex; align-items: center; justify-content: center; }
.device-screen { text-align: center; font-size: 13px; color: #667; }
.push-code { display: block; font-family: Consolas, monospace; font-size: 30px;
  letter-spacing: .3em; font-weight: 700; color: #ec0000; margin-top: 12px; }

/* bank selector grid */
.bank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.bank-card { display: flex; flex-direction: column; gap: 4px; padding: 18px;
  border: 1.5px solid #e2e9f1; border-radius: 10px; text-decoration: none;
  color: var(--base-text); transition: border-color .15s, transform .15s; }
.bank-card:hover { border-color: #04345b; transform: translateY(-2px); }
.bank-card .logo { font-weight: 800; font-size: 20px; }
.bank-card .bank-name { font-weight: 600; font-size: 14px; }
.bank-card .bank-hint { font-size: 11.5px; color: var(--base-muted); }
.bank-card.cgd .logo { color: #00529b; }
.bank-card.millennium .logo { color: #003a70; }
.bank-card.santander .logo { color: #ec0000; }
.bank-card.montepio .logo { color: #00843d; }

/* ============ gov.pt shell hooks (used by partials) ============ */
.gov-header { background: #fff; border-bottom: 1px solid #e2e9f1; }
.gov-header-inner { max-width: 1216px; margin: 0 auto; }
.accent-bar { height: 4px; background: #ffd100; }
.gov-footer { background: #03264a; color: #fff; }
.gov-footer a { color: #c9d9ec; }
