/* VALYO – luxe glass & gloss. Kleuren uit het logo: plum #3B1E48, magenta #FF00D6 → #F400AA → #D2007D */
:root {
  --plum: #3b1e48;
  --plum-deep: #1a0b22;
  --night: #0d0512;
  --magenta: #ff00d6;
  --magenta-2: #f400aa;
  --berry: #d2007d;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --faint: rgba(255, 255, 255, 0.5);
  --line: rgba(255, 255, 255, 0.16);
  --glass: linear-gradient(140deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.045));
  --glass-strong: linear-gradient(140deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.07));
  --ok: #4ff0b0;
  --warn: #ffc65c;
  --bad: #ff7a9c;
  --radius: 22px;
  --tabs-h: 74px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-label: "Saira", "Sora", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: #ff8ae9; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

/* ---------- Achtergrond ---------- */
.bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(120% 80% at 100% -10%, rgba(255, 0, 214, 0.35), transparent 55%),
    radial-gradient(90% 70% at -10% 110%, rgba(120, 40, 200, 0.35), transparent 60%),
    linear-gradient(170deg, #2b1236 0%, #160920 45%, #0b0410 100%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.55; }
.o1 { width: 340px; height: 340px; background: #ff00d6; top: -120px; right: -100px; opacity: 0.35; }
.o2 { width: 300px; height: 300px; background: #6a2bd9; bottom: -80px; left: -120px; opacity: 0.4; }
.o3 { width: 220px; height: 220px; background: #d2007d; top: 45%; right: -120px; opacity: 0.25; }
@media (prefers-reduced-motion: no-preference) {
  .o1 { animation: drift 18s ease-in-out infinite alternate; }
  .o2 { animation: drift 22s ease-in-out infinite alternate-reverse; }
}
@keyframes drift { to { transform: translate(-30px, 40px) scale(1.08); } }

/* ---------- Layout ---------- */
.app {
  max-width: 560px; margin: 0 auto;
  padding: calc(18px + var(--safe-t)) 16px calc(var(--tabs-h) + 28px + var(--safe-b));
}
.app.no-tabs { padding-bottom: 40px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.topbar .logo { height: 34px; width: auto; }
.page-title { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; margin: 6px 0 4px; }
.page-sub { color: var(--muted); margin: 0 0 18px; }
.label {
  font-family: var(--font-label); text-transform: uppercase; letter-spacing: 2.4px;
  font-size: 12px; font-weight: 500; color: var(--faint);
}
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.mt { margin-top: 18px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; word-break: break-all; }

/* ---------- Glass ---------- */
.glass {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(0, 0, 0, 0.2), 0 18px 40px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  padding: 18px;
  overflow: hidden;
}
.glass::before { /* gloss-reflectie bovenaan */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 46%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
  pointer-events: none; border-radius: var(--radius) var(--radius) 0 0;
}
.glass > * { position: relative; }
.glass.tap { cursor: pointer; transition: transform 0.15s ease, border-color 0.15s ease; text-decoration: none; color: inherit; display: block; }
.glass.tap:active { transform: scale(0.985); }
.glass.tap:hover { border-color: rgba(255, 255, 255, 0.3); }
.glass.strong { background: var(--glass-strong); }

/* ---------- Knoppen ---------- */
.btn {
  appearance: none; border: 0; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px; border-radius: 16px;
  font-weight: 600; font-size: 16px; color: #fff;
  position: relative; overflow: hidden; transition: transform 0.12s ease, filter 0.12s ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(180deg, #ff3ae4 0%, #e000a8 52%, #b5006c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -2px 6px rgba(80, 0, 50, 0.35), 0 10px 26px rgba(244, 0, 170, 0.45);
}
.btn-primary::after { /* glans */
  content: ""; position: absolute; left: 6%; right: 6%; top: 3px; height: 45%;
  border-radius: 12px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.btn-glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-danger { background: linear-gradient(180deg, rgba(255, 122, 156, 0.3), rgba(255, 122, 156, 0.12)); border: 1px solid rgba(255, 122, 156, 0.5); }
.btn-block { width: 100%; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 14px; border-radius: 13px; }
.icon-btn {
  appearance: none; cursor: pointer; width: 44px; height: 44px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.2); color: #fff;
}
.icon-btn svg, .btn svg { width: 20px; height: 20px; }

/* ---------- Formulieren ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; color: var(--muted); }
.input, select.input {
  width: 100%; min-height: 50px; padding: 0 16px; border-radius: 14px;
  background: rgba(10, 3, 16, 0.45); border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff; outline: none; box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}
.input:focus { border-color: var(--magenta); box-shadow: 0 0 0 3px rgba(255, 0, 214, 0.25); }
.input::placeholder { color: rgba(255, 255, 255, 0.45); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 14px) 22px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
select.input option { color: #111; }
.search { position: relative; }
.search svg { position: absolute; left: 16px; top: 15px; width: 20px; height: 20px; opacity: 0.7; }
.search .input { padding-left: 46px; }
.check { display: flex; gap: 12px; align-items: center; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--magenta); }
.error { color: #ffb3c6; font-size: 14px; }

/* ---------- Segment / chips ---------- */
.segment { display: flex; gap: 6px; padding: 5px; border-radius: 16px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); }
.segment button { flex: 1; min-height: 42px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; }
.segment button[aria-pressed="true"] { color: #fff; background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.08); white-space: nowrap; }
.chip.ok { color: var(--ok); border-color: rgba(79, 240, 176, 0.45); background: rgba(79, 240, 176, 0.1); }
.chip.warn { color: var(--warn); border-color: rgba(255, 198, 92, 0.45); background: rgba(255, 198, 92, 0.1); }
.chip.bad { color: var(--bad); border-color: rgba(255, 122, 156, 0.45); background: rgba(255, 122, 156, 0.1); }
.chip.pink { color: #ffb0f1; border-color: rgba(255, 0, 214, 0.5); background: rgba(255, 0, 214, 0.12); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- Lijsten ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; align-items: center; gap: 14px; min-height: 64px; }
.flag { width: 40px; height: 30px; border-radius: 6px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25), 0 4px 10px rgba(0, 0, 0, 0.3); background: rgba(255, 255, 255, 0.1); }
.flag.lg { width: 56px; height: 42px; border-radius: 8px; }
.region-badge { width: 40px; height: 30px; border-radius: 6px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: linear-gradient(135deg, #ff00d6, #6a2bd9); }
.item-title { font-weight: 600; }
.price { font-weight: 700; font-size: 18px; white-space: nowrap; }
.price small { font-size: 12px; font-weight: 500; color: var(--muted); }
.chev { opacity: 0.5; width: 18px; height: 18px; flex: none; display: inline-flex; }
.chev svg { width: 18px; height: 18px; }
.glass.item { display: flex; }
.region-badge svg { width: 18px; height: 18px; }

/* ---------- eSIM-kaart ---------- */
.esim-card { padding: 20px; }
.esim-card .big { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.meter { height: 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ff00d6, #f400aa 60%, #ff7be8); box-shadow: 0 0 12px rgba(255, 0, 214, 0.7); }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kv div { padding: 12px 14px; border-radius: 14px; background: rgba(0, 0, 0, 0.22); border: 1px solid rgba(255, 255, 255, 0.08); }
.kv b { display: block; font-size: 15px; }
.qr-wrap { background: #fff; border-radius: 20px; padding: 16px; width: 240px; max-width: 100%; margin: 0 auto; box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08), 0 20px 50px rgba(255, 0, 214, 0.35); }
.qr-wrap img { width: 100%; height: auto; }
.code-row { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.1); }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.steps b { color: #fff; }

/* ---------- Tabbalk ---------- */
.tabs {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b));
  width: min(528px, calc(100% - 24px)); height: var(--tabs-h);
  display: flex; justify-content: space-around; align-items: center; padding: 0 6px;
  border-radius: 26px; z-index: 20;
  background: linear-gradient(160deg, rgba(60, 25, 75, 0.72), rgba(20, 8, 28, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 20px 50px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
}
.tabs a {
  flex: 1; height: 58px; margin: 0 2px; border-radius: 18px; text-decoration: none; color: var(--faint);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 600;
}
.tabs a svg { width: 23px; height: 23px; }
.tabs a[aria-current="page"] { color: #fff; background: linear-gradient(180deg, rgba(255, 0, 214, 0.35), rgba(255, 0, 214, 0.08)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.tabs .badge { position: absolute; margin: -22px 0 0 26px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--magenta); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Sheet / modal ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(5, 0, 10, 0.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: min(560px, 100%); max-height: 92vh; overflow-y: auto;
  border-radius: 28px 28px 0 0; padding: 10px 18px calc(24px + var(--safe-b));
  background: linear-gradient(170deg, rgba(70, 30, 88, 0.96), rgba(22, 9, 30, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.16); border-bottom: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 -20px 60px rgba(0, 0, 0, 0.5);
}
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.3); margin: 4px auto 14px; }
.sheet h2 { margin: 0 0 4px; font-size: 21px; }

/* ---------- Login ---------- */
.login { min-height: calc(100vh - 60px); display: flex; flex-direction: column; justify-content: center; gap: 26px; }
.login .logo { width: 260px; max-width: 80%; margin: 0 auto; filter: drop-shadow(0 10px 30px rgba(255, 0, 214, 0.35)); }

/* ---------- Toast / loader / leeg ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabs-h) + 26px + var(--safe-b)); z-index: 60;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 16px; font-weight: 600; font-size: 14.5px;
  background: linear-gradient(180deg, rgba(80, 35, 100, 0.95), rgba(35, 14, 45, 0.95)); border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.toast.bad { border-color: rgba(255, 122, 156, 0.6); }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.2); border-top-color: var(--magenta); animation: spin 0.8s linear infinite; margin: 30px auto; }
.btn .spinner { width: 18px; height: 18px; margin: 0; border-width: 2px; border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 34px 18px; color: var(--muted); }
.empty svg { width: 44px; height: 44px; opacity: 0.7; margin: 0 auto 10px; display: block; }
.banner { padding: 12px 14px; border-radius: 14px; font-size: 14px; border: 1px solid rgba(255, 198, 92, 0.5); background: rgba(255, 198, 92, 0.1); color: #ffe2a8; }
.banner.pink { border-color: rgba(255, 0, 214, 0.5); background: rgba(255, 0, 214, 0.12); color: #ffd1f6; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table td { padding: 10px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }

/* Voortgang aanvraag */
.steps-bar { display: flex; gap: 4px; }
.steps-bar .step { flex: 1; min-width: 0; text-align: center; font-size: 10.5px; font-weight: 600; padding: 7px 2px 0; color: var(--faint); border-top: 3px solid rgba(255, 255, 255, 0.15); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps-bar .step.done { color: #fff; border-top-color: var(--magenta); box-shadow: 0 -6px 10px -8px rgba(255, 0, 214, 0.9); }
.steps-bar .step.next { color: #ffb0f1; border-top-color: rgba(255, 0, 214, 0.45); }
.steps-bar .step.bad { color: var(--bad); border-top-color: var(--bad); }
