@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700;800&display=swap');

/* SIVA demo look and feel: red #d4002a / dark #121212 / light grey #f1f1f1, Open Sans */
:root {
  --red: #d4002a;
  --red-dark: #a10020;
  --red-bar: #b00023;
  --ink: #121212;
  --asphalt: #222327;
  --grey: #6e6e6e;
  --line: #cccccc;
  --mist: #f1f1f1;
  --paper: #ffffff;
  --eu: #0b3d91;
  --eu-dark: #072a66;
  --eu-soft: #e8eef9;
  --eu-gold: #ffcc00;
  --ok: #37a800;
  --ok-text: #2a7d00;
  --ok-soft: #ecf5e4;
  --ko: #d4002a;
  --ko-soft: #fbe6ea;
  --font-display: 'Open Sans', Arial, sans-serif;
  --font-body: 'Open Sans', Arial, sans-serif;
  --radius-s: 4px;
  --radius-m: 10px;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--eu-gold); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: 68ch; }
.muted { color: var(--grey); }
.small { font-size: .875rem; }

/* ---------- Header (dark-red utility bar + red main bar with white logo) ---------- */
.topbar { background: var(--red-bar); color: #fff; font-size: .78rem; text-transform: uppercase; }
.topbar .wrap { display: flex; justify-content: flex-end; }
.topbar a { display: block; text-decoration: none; padding: .45rem 1rem; border-right: 1px solid rgba(255, 255, 255, .43); }
.topbar a:first-child { border-left: 1px solid rgba(255, 255, 255, .43); }
.topbar a:hover { background: #fff; color: var(--red); }
.topbar .demo-link a { border-left: 0; }
.lang-switch { display: flex; border-right: 1px solid rgba(255, 255, 255, .43); }
.lang-switch button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: .45rem .55rem; text-transform: uppercase; opacity: .8; }
.lang-switch button + button { border-left: 1px solid rgba(255, 255, 255, .25); }
.lang-switch button:hover { background: #fff; color: var(--red); opacity: 1; }
.lang-switch button[aria-pressed="true"] { opacity: 1; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.lang-switch button:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }

.site-header { background: var(--red); color: #fff; position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 2.5rem; min-height: 72px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 32px; width: auto; }
.main-nav { display: flex; gap: .25rem; flex: 1; }
.main-nav a { text-decoration: none; font-weight: 600; text-transform: uppercase; font-size: .875rem; padding: .55rem .9rem; border-radius: 30px; }
.main-nav a:hover, .main-nav a[aria-current] { background: #fff; color: var(--red); }
.account-link { display: flex; align-items: center; gap: .5rem; text-decoration: none; font-weight: 600; font-size: .875rem; text-transform: uppercase; border: 2px solid #fff; border-radius: 30px; padding: .4rem 1rem; }
.account-link:hover { background: #fff; color: var(--red); }
.account-link svg { width: 20px; height: 20px; }
.menu-toggle { display: none; background: none; border: 0; color: #fff; padding: .5rem; cursor: pointer; }

@media (max-width: 900px) {
  .main-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--red-dark); flex-direction: column; gap: 0; padding: .5rem 1.25rem 1rem; }
  .main-nav.open { display: flex; }
  .main-nav a { border-radius: 0; border-bottom: 1px solid rgba(255, 255, 255, .25); }
  .menu-toggle { display: block; order: -1; }
  .site-header .wrap { gap: 1rem; }
  .brand { flex: 1; }
  .account-link { border: 0; padding: .4rem; }
  .account-link span { display: none; }
}

/* ---------- Buttons & forms (pill CTAs, uppercase, 2px border) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .6rem 1.6rem; border-radius: 30px;
  border: 2px solid transparent; font-weight: 700; font-size: .9rem; text-transform: uppercase; letter-spacing: .01em;
  text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #fff; color: var(--ink); }
.btn-ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-wallet { background: var(--eu); border-color: var(--eu); color: #fff; text-transform: none; font-size: 1rem; }
.btn-wallet:hover { background: var(--eu-dark); border-color: var(--eu-dark); }
.btn-wallet svg, .btn svg { width: 22px; height: 22px; flex: none; }
.btn-link { background: none; border: 0; padding: 0; min-height: 0; color: var(--ink); text-decoration: underline; font-weight: 600; cursor: pointer; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-block { width: 100%; }

.field { display: flex; flex-direction: column; gap: .3rem; }
.field label, .field .label { font-weight: 600; font-size: .875rem; }
.input, select.input {
  min-height: 48px; padding: .55rem .9rem; border: 1px solid #b3b3b3; border-radius: var(--radius-s); background: #fff; width: 100%;
}
.input:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
.form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.check { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: .15rem; accent-color: var(--red); }

.alert { padding: .8rem 1rem; border-radius: var(--radius-s); border-left: 4px solid; margin: 0 0 1rem; }
.alert-error { background: var(--ko-soft); border-color: var(--ko); }
.alert-ok { background: var(--ok-soft); border-color: var(--ok); }
.alert-info { background: var(--eu-soft); border-color: var(--eu); }
.alert[hidden] { display: none; }

/* ---------- Home (red gradient backdrop + white rounded booking widget) ---------- */
.hero { position: relative; color: #fff; overflow: hidden; background: #82000f url('/img/hero.jpg') center / cover no-repeat; }
.hero .wrap { position: relative; padding: 2.75rem 0 3.25rem; }
.hero h1 { max-width: 24ch; color: #fff; }
.hero-sub { font-size: 1.1rem; margin-bottom: 1.75rem; }

.search-card { background: #fff; color: var(--ink); border-radius: var(--radius-m); padding: 1.5rem 1.75rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); max-width: 1000px; }
.search-grid { display: grid; gap: 1rem; grid-template-columns: 1.4fr 1.4fr 1fr 1fr; align-items: end; }
.search-grid .span-2 { grid-column: span 2; }
.search-foot { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; margin-top: 1.25rem; }
@media (max-width: 900px) { .search-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .search-grid { grid-template-columns: 1fr; } .search-grid .span-2 { grid-column: auto; } }

.usp { background: #fff; border-bottom: 1px solid #e3e3e3; }
.usp .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; padding: 2.25rem 0; }
.usp-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .6rem; }
.usp-item img { width: 56px; height: 56px; object-fit: contain; }
.usp-item strong { display: block; font-weight: 600; font-size: 1rem; }
.usp-item span { color: var(--grey); font-size: .9rem; }
@media (max-width: 900px) { .usp .wrap { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .usp .wrap { grid-template-columns: 1fr; } }

.section { padding: 3.5rem 0; }
.wallet-promo { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.wallet-promo ol { padding-left: 1.2rem; margin: 0 0 1.5rem; }
.wallet-promo li { margin-bottom: .5rem; }
@media (max-width: 860px) { .wallet-promo { grid-template-columns: 1fr; } }

.offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.offer { background: #fff; border-radius: var(--radius-m); padding: 1.5rem; display: flex; flex-direction: column; box-shadow: 0 2px 10px rgba(0, 0, 0, .08); }
.offer p { flex: 1; }
.offer a { font-weight: 700; color: var(--red); text-transform: uppercase; font-size: .875rem; }
@media (max-width: 860px) { .offers { grid-template-columns: 1fr; } }

/* ---------- Footer (light grey, uppercase bold headings, ruled link lists) ---------- */
.site-footer { background: var(--mist); color: var(--ink); font-size: .9rem; margin-top: 3rem; }
.site-footer .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; padding: 2.5rem 0 1.5rem; }
.site-footer h3 { font-size: .875rem; font-weight: 800; text-transform: uppercase; margin-bottom: .75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { border-top: 1px solid var(--line); padding: .55rem 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--red); text-decoration: underline; }
.site-footer .footer-logo { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 1.25rem 0; grid-template-columns: none; }
.footer-logo img { height: 34px; width: auto; }
.footer-legal { background: var(--ink); color: #d0d0d0; padding: 1rem 0 1.25rem; font-size: .8rem; }
.footer-legal .wrap { display: block; padding: 0; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } }

/* ---------- Booking ---------- */
.trip-bar { background: var(--ink); color: #fff; }
.trip-bar .wrap { display: flex; flex-wrap: wrap; gap: .5rem 2rem; padding: .9rem 0; align-items: center; }
.trip-bar strong { font-family: var(--font-display); }
.trip-bar a { margin-left: auto; color: #fff; font-weight: 600; }

.stepper { display: flex; list-style: none; margin: 0; padding: 1.5rem 0; gap: .5rem; counter-reset: step; }
.stepper li { flex: 1; display: flex; align-items: center; gap: .6rem; font-weight: 600; color: var(--grey); font-size: .95rem; }
.stepper li::before {
  counter-increment: step; content: counter(step);
  flex: none; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; background: #fff;
}
.stepper li::after { content: ''; flex: 1; height: 2px; background: var(--line); }
.stepper li:last-child::after { display: none; }
.stepper li.done { color: var(--ink); }
.stepper li.done::before { background: var(--ink); border-color: var(--ink); color: #fff; content: '✓'; }
.stepper li.current { color: var(--red); }
.stepper li.current::before { border-color: var(--red); color: var(--red); }
.stepper li.is-id::before { box-shadow: 0 0 0 3px var(--eu-soft); }
@media (max-width: 700px) { .stepper li span { display: none; } .stepper li.current span { display: inline; } }

.booking-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2rem; align-items: start; padding-bottom: 2rem; }
@media (max-width: 960px) { .booking-layout { grid-template-columns: 1fr; } }

.summary { position: sticky; top: 84px; border: 1px solid var(--line); border-radius: var(--radius-m); background: #fff; }
.summary-head { padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.summary-head h2 { font-size: 1.25rem; margin: 0; }
.summary-body { padding: 1rem 1.25rem; }
.summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; font-size: .95rem; }
.summary dt { color: var(--grey); }
.summary dd { margin: 0; text-align: right; }
.summary-lines { list-style: none; margin: 1rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--line); font-size: .95rem; }
.summary-lines li { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .35rem; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding: 1rem 1.25rem; background: var(--mist); border-radius: 0 0 var(--radius-m) var(--radius-m); }
.summary-total strong { font-family: var(--font-display); font-size: 1.75rem; }
.summary-id { margin: 1rem 0 0; padding: .7rem .8rem; border-radius: var(--radius-s); font-size: .9rem; display: flex; gap: .5rem; align-items: center; }
.summary-id.pending { background: var(--eu-soft); color: var(--eu-dark); }
.summary-id.ok { background: var(--ok-soft); color: var(--ok-text); }

.car-list { display: grid; gap: 1rem; }
.car {
  display: grid; grid-template-columns: 260px 1fr auto; gap: 1.5rem; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.25rem; background: #fff;
}
.car.selected { border: 2px solid var(--red); padding: calc(1.25rem - 1px); }
.car-art { background: var(--mist); border-radius: var(--radius-s); padding: .75rem; overflow: hidden; }
.car-art:has(> img) { padding: 0; background: #b9b9b9; }
.car-art > img { display: block; width: 100%; height: auto; aspect-ratio: 767 / 374; object-fit: cover; }
.car-cat { font-family: var(--font-display); font-weight: 750; font-size: 1.3rem; margin: 0; }
.car-model { color: var(--grey); margin: 0 0 .6rem; }
.car-specs { display: flex; flex-wrap: wrap; gap: .4rem 1rem; list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.car-specs li { display: flex; align-items: center; gap: .3rem; }
.car-req { font-size: .85rem; color: var(--grey); margin-top: .5rem; }
.car-price { text-align: right; }
.car-price strong { display: block; font-family: var(--font-display); font-size: 1.8rem; }
.car-price span { font-size: .85rem; color: var(--grey); display: block; margin-bottom: .6rem; }
@media (max-width: 1000px) {
  .car { grid-template-columns: 1fr auto; row-gap: 1rem; }
  .car > .car-art { grid-column: 1 / -1; max-width: 460px; }
}
@media (max-width: 760px) {
  .car { grid-template-columns: 1fr; }
  .car-price { text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
  .car-price span { margin: 0; }
}

.option-list { display: grid; gap: .75rem; }
.option { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1rem 1.25rem; cursor: pointer; }
.option:has(input:checked) { border-color: var(--ink); background: var(--mist); }
.option input { width: 22px; height: 22px; accent-color: var(--red); }
.option strong { display: block; }
.option .price { font-weight: 700; white-space: nowrap; }

.step-actions { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }
.panel { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.5rem; background: #fff; margin-bottom: 1.5rem; }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }

/* ---------- EUDI Wallet verification (signature element) ---------- */
.idcheck { background: var(--eu); color: #fff; border-radius: var(--radius-m); overflow: hidden; margin-bottom: 1.5rem; position: relative; }
.idcheck::before {
  content: ''; position: absolute; right: -70px; top: -70px; width: 280px; height: 280px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 260'%3E%3Cg fill='%23ffcc00'%3E%3Cpath transform='translate(130.0 30.0)' d='M0-9 2.1-2.9 8.6-2.8 3.4 1.1 5.3 7.3 0 3.6-5.3 7.3-3.4 1.1-8.6-2.8-2.1-2.9Z'/%3E%3Cpath transform='translate(180.0 43.4)' d='M0-9 2.1-2.9 8.6-2.8 3.4 1.1 5.3 7.3 0 3.6-5.3 7.3-3.4 1.1-8.6-2.8-2.1-2.9Z'/%3E%3Cpath transform='translate(216.6 80.0)' d='M0-9 2.1-2.9 8.6-2.8 3.4 1.1 5.3 7.3 0 3.6-5.3 7.3-3.4 1.1-8.6-2.8-2.1-2.9Z'/%3E%3Cpath transform='translate(230.0 130.0)' d='M0-9 2.1-2.9 8.6-2.8 3.4 1.1 5.3 7.3 0 3.6-5.3 7.3-3.4 1.1-8.6-2.8-2.1-2.9Z'/%3E%3Cpath transform='translate(216.6 180.0)' d='M0-9 2.1-2.9 8.6-2.8 3.4 1.1 5.3 7.3 0 3.6-5.3 7.3-3.4 1.1-8.6-2.8-2.1-2.9Z'/%3E%3Cpath transform='translate(180.0 216.6)' d='M0-9 2.1-2.9 8.6-2.8 3.4 1.1 5.3 7.3 0 3.6-5.3 7.3-3.4 1.1-8.6-2.8-2.1-2.9Z'/%3E%3Cpath transform='translate(130.0 230.0)' d='M0-9 2.1-2.9 8.6-2.8 3.4 1.1 5.3 7.3 0 3.6-5.3 7.3-3.4 1.1-8.6-2.8-2.1-2.9Z'/%3E%3Cpath transform='translate(80.0 216.6)' d='M0-9 2.1-2.9 8.6-2.8 3.4 1.1 5.3 7.3 0 3.6-5.3 7.3-3.4 1.1-8.6-2.8-2.1-2.9Z'/%3E%3Cpath transform='translate(43.4 180.0)' d='M0-9 2.1-2.9 8.6-2.8 3.4 1.1 5.3 7.3 0 3.6-5.3 7.3-3.4 1.1-8.6-2.8-2.1-2.9Z'/%3E%3Cpath transform='translate(30.0 130.0)' d='M0-9 2.1-2.9 8.6-2.8 3.4 1.1 5.3 7.3 0 3.6-5.3 7.3-3.4 1.1-8.6-2.8-2.1-2.9Z'/%3E%3Cpath transform='translate(43.4 80.0)' d='M0-9 2.1-2.9 8.6-2.8 3.4 1.1 5.3 7.3 0 3.6-5.3 7.3-3.4 1.1-8.6-2.8-2.1-2.9Z'/%3E%3Cpath transform='translate(80.0 43.4)' d='M0-9 2.1-2.9 8.6-2.8 3.4 1.1 5.3 7.3 0 3.6-5.3 7.3-3.4 1.1-8.6-2.8-2.1-2.9Z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  opacity: .9; pointer-events: none;
}
.idcheck-inner { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 2rem; padding: 2rem; align-items: center; }
.idcheck h2 { font-size: 1.7rem; max-width: 20ch; }
.idcheck p { opacity: .92; }
.idcheck ul.shared { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .45rem; }
.idcheck ul.shared li { display: flex; gap: .6rem; align-items: center; }
.idcheck ul.shared svg { width: 20px; height: 20px; flex: none; color: var(--eu-gold); }
.idcheck .btn-primary { background: #fff; color: var(--eu); }
.idcheck .btn-primary:hover { background: var(--eu-soft); }
.idcheck .eu-badge { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .9rem; margin-bottom: 1rem; }
.idcheck .eu-badge svg { width: 30px; height: 30px; }
.idcheck .powered { font-size: .85rem; opacity: .8; margin: 1rem 0 0; }
.idcheck-art { width: 190px; }
@media (max-width: 760px) { .idcheck-inner { grid-template-columns: 1fr; } .idcheck-art { display: none; } }

.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 700px) { .result-grid { grid-template-columns: 1fr; } }
.doc-card { border-radius: var(--radius-m); padding: 1.1rem 1.25rem; background: var(--eu-soft); border: 1px solid #c9d6ee; }
.doc-card h3 { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; color: var(--eu-dark); }
.doc-card h3 svg { width: 22px; height: 22px; }
.doc-card dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1rem; margin: 0; font-size: .95rem; }
.doc-card dt { color: var(--grey); }
.doc-card dd { margin: 0; font-weight: 600; }
.doc-card .issuer { font-size: .8rem; color: var(--grey); margin: .75rem 0 0; word-break: break-all; }

.checks { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .4rem; }
.checks li { display: grid; grid-template-columns: 24px 1fr auto; gap: .6rem; align-items: center; padding: .55rem .75rem; border-radius: var(--radius-s); background: var(--ok-soft); }
.checks li.ko { background: var(--ko-soft); }
.checks li svg { width: 20px; height: 20px; color: var(--ok-text); }
.checks li.ko svg { color: var(--ko); }
.checks li span.detail { font-size: .85rem; color: var(--grey); text-align: right; }

/* Wallet dialog */
.wdialog { border: 0; padding: 0; border-radius: var(--radius-m); width: min(94vw, 760px); box-shadow: 0 24px 60px rgba(0, 0, 0, .4); }
.wdialog::backdrop { background: rgba(20, 23, 31, .65); }
.wdialog-head { background: var(--eu); color: #fff; padding: 1rem 1.25rem; display: flex; align-items: center; gap: .75rem; }
.wdialog-head h2 { margin: 0; font-size: 1.2rem; flex: 1; }
.wdialog-head svg { width: 28px; height: 28px; }
/* EUDIW logo: dark text on a transparent background, so it sits on a white chip over blue backgrounds
   (wallet pop-in header, "Share your documents in one scan" block). */
.eudiw-logo { height: 52px; width: auto; flex: none; background: #fff; border-radius: 6px; padding: 4px 8px; }
.wdialog-close { background: none; border: 0; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: .25rem .5rem; }
.wdialog-body { display: grid; grid-template-columns: 260px 1fr; gap: 1.5rem; padding: 1.5rem; }
.wdialog-qr { border: 1px solid var(--line); border-radius: var(--radius-m); padding: .75rem; background: #fff; aspect-ratio: 1; display: grid; place-items: center; }
.wdialog-qr svg { width: 100%; height: auto; }
.wdialog-steps { margin: 0 0 1rem; padding-left: 1.2rem; }
.wdialog-steps li { margin-bottom: .4rem; }
.wstatus { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border-radius: var(--radius-s); background: var(--mist); font-weight: 600; margin-bottom: 1rem; }
.wstatus.pending { background: var(--eu-soft); color: var(--eu-dark); }
.wstatus.ok { background: var(--ok-soft); color: var(--ok-text); }
.wstatus.ko { background: var(--ko-soft); color: var(--ko); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: spin .9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.wdialog-foot { padding: 0 1.5rem 1.25rem; font-size: .85rem; color: var(--grey); }
@media (max-width: 640px) { .wdialog-body { grid-template-columns: 1fr; } .wdialog-qr { max-width: 240px; margin: 0 auto; } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } * { transition: none !important; } }

/* ---------- Auth & account ---------- */
.auth-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; padding: 3rem 0; align-items: start; }
@media (max-width: 860px) { .auth-layout { grid-template-columns: 1fr; } }
.auth-card { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 2rem; }
.or { display: flex; align-items: center; gap: 1rem; color: var(--grey); margin: 1.5rem 0; font-size: .9rem; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.demo-hint { background: var(--mist); border-radius: var(--radius-s); padding: .75rem 1rem; font-size: .9rem; margin-top: 1rem; }
.demo-hint code { font-size: .95em; }

.account-layout { display: grid; grid-template-columns: 240px 1fr; gap: 2.5rem; padding: 2.5rem 0; align-items: start; }
.account-nav { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.account-nav button { text-align: left; background: #fff; border: 0; border-left: 4px solid transparent; padding: .9rem 1rem; font-weight: 600; cursor: pointer; border-bottom: 1px solid var(--line); }
.account-nav button:last-child { border-bottom: 0; }
.account-nav button[aria-selected='true'] { border-left-color: var(--red); background: var(--mist); }
@media (max-width: 860px) { .account-layout { grid-template-columns: 1fr; } .account-nav { flex-direction: row; overflow-x: auto; } .account-nav button { border-left: 0; border-bottom: 4px solid transparent; white-space: nowrap; } .account-nav button[aria-selected='true'] { border-bottom-color: var(--red); } }

.kv { display: grid; grid-template-columns: 200px 1fr; gap: .5rem 1.5rem; margin: 0; }
.kv dt { color: var(--grey); }
.kv dd { margin: 0; font-weight: 600; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: .5rem; } }

.badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; background: var(--mist); color: var(--grey); vertical-align: middle; }
.badge.ok { background: var(--ok-soft); color: var(--ok-text); }
.badge.eu { background: var(--eu-soft); color: var(--eu-dark); }

.setting { display: grid; grid-template-columns: 1fr auto; gap: 1rem 2rem; align-items: start; }
.setting + .setting { border-top: 1px solid var(--line); padding-top: 1.5rem; margin-top: 1.5rem; }
.setting h3 { margin-bottom: .3rem; }
@media (max-width: 640px) { .setting { grid-template-columns: 1fr; } }

.wizard { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: .75rem; grid-column: 1 / -1; }
.wizard li { display: grid; grid-template-columns: 36px 1fr auto; gap: 1rem; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1rem; }
.wizard li .n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; border: 2px solid var(--line); }
.wizard li.done .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.wizard li.active { border-color: var(--eu); }
.wizard li.active .n { border-color: var(--eu); color: var(--eu); }
.wizard li p { margin: .2rem 0 0; font-size: .92rem; color: var(--grey); }
@media (max-width: 560px) { .wizard li { grid-template-columns: 36px 1fr; } .wizard li .btn { grid-column: 1 / -1; } }

table.list { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.list th, table.list td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: .85rem; color: var(--grey); font-weight: 700; }

/* Confirmation */
.confirm-head { background: var(--red); color: #fff; padding: 2.5rem 0; }
.confirm-head .ref { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; }
.confirm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: 2rem 0; }
@media (max-width: 760px) { .confirm-grid { grid-template-columns: 1fr; } }

/* Demo tools */
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 860px) { .demo-grid { grid-template-columns: 1fr; } }
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .8rem 1.25rem; border-radius: var(--radius-s); z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
