/* AER Support — shared styles */
:root {
  --navy: #312783;
  --navy-600: #282068;
  --navy-50: #eeedf7;
  --pink: #e71d73;
  --pink-600: #c9165f;
  --pink-50: #fdebf3;
  --ink: #23222b;
  --gray: #3c3c3b;
  --muted: #6b6a75;
  --line: #e4e3ec;
  --bg: #f6f6fa;
  --ok: #1f9d55;
  --warn: #d98b00;
  --bad: #d12b3a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 16, 60, .06), 0 8px 24px rgba(20, 16, 60, .06);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--navy); }
.hidden { display: none !important; }

/* language toggle (download page) */
html.lang-en [data-lang="nl"], html:not(.lang-en) [data-lang="en"] { display: none !important; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  border: 1px solid transparent; border-radius: 10px; padding: .6em 1.1em;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  background: var(--navy); color: #fff; transition: background .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: var(--navy-600); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.pink { background: var(--pink); }
.btn.pink:hover { background: var(--pink-600); }
.btn.ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn.ghost:hover { background: var(--navy-50); }
.btn.small { padding: .35em .8em; font-size: .875rem; border-radius: 8px; }
.btn.big { font-size: 1.15rem; padding: .9em 1.6em; border-radius: 12px; box-shadow: 0 6px 20px rgba(49, 39, 131, .25); }
input[type=text], input[type=password], input[type=search] {
  font: inherit; padding: .6em .8em; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); outline: none; min-width: 0;
}
input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(49, 39, 131, .12); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.dot { display: inline-block; width: .6em; height: .6em; border-radius: 50%; background: #bbb; vertical-align: middle; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(31, 157, 85, .15); }
.dot.busy { background: var(--pink); box-shadow: 0 0 0 3px rgba(231, 29, 115, .15); }
.badge { display: inline-block; font-size: .72rem; font-weight: 600; padding: .1em .55em; border-radius: 99px; background: var(--navy-50); color: var(--navy); }
.badge.pink { background: var(--pink-50); color: var(--pink); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* ---------- download page ---------- */
.dl-header { max-width: 980px; margin: 0 auto; padding: 28px 24px 0; display: flex; align-items: center; justify-content: space-between; }
.dl-header img { height: 44px; }
.lang-switch { font-size: .85rem; color: var(--muted); }
.lang-switch button { background: none; border: 0; font: inherit; color: var(--muted); cursor: pointer; padding: 2px 4px; }
.lang-switch button.active { color: var(--navy); font-weight: 700; }
.dl-hero { max-width: 980px; margin: 0 auto; padding: 56px 24px 24px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.dl-hero h1 { font-size: 2.6rem; line-height: 1.15; margin: 0 0 .4em; color: var(--navy); letter-spacing: -.02em; }
.dl-hero h1 em { font-style: normal; color: var(--pink); }
.dl-hero p.lead { font-size: 1.15rem; color: var(--gray); margin: 0 0 1.6em; }
.dl-meta { margin-top: .9em; color: var(--muted); font-size: .9rem; }
.dl-notice { margin-top: 1em; padding: .8em 1em; border-radius: 10px; background: #fff7e6; border: 1px solid #f3dca6; color: #6b4b00; font-size: .92rem; }
.mock { padding: 26px; text-align: center; position: relative; }
.mock .mock-logo { height: 28px; margin-bottom: 18px; }
.mock .mock-label { color: var(--muted); font-size: .85rem; }
.mock .mock-id { font-size: 2.1rem; font-weight: 700; color: var(--navy); letter-spacing: .04em; margin: .1em 0 .4em; }
.mock .mock-status { font-size: .85rem; color: var(--gray); }
.dl-steps { max-width: 980px; margin: 24px auto 0; padding: 0 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { padding: 22px; }
.step .num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--navy); margin-bottom: 12px; }
.step:nth-child(2) .num { background: var(--pink); }
.step h3 { margin: 0 0 .3em; font-size: 1.05rem; }
.step p { margin: 0; color: var(--gray); font-size: .95rem; }
.dl-trust { max-width: 980px; margin: 22px auto 0; padding: 0 24px; }
.dl-trust .card { padding: 22px 26px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 28px; }
.dl-trust h2 { grid-column: 1 / -1; margin: 0 0 4px; font-size: 1.1rem; color: var(--navy); }
.dl-trust div.item { display: flex; gap: .6em; color: var(--gray); font-size: .95rem; }
.dl-trust div.item::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--pink-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23e71d73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.dl-faq { max-width: 980px; margin: 22px auto 0; padding: 0 24px; }
.dl-faq details { padding: 16px 22px; }
.dl-faq summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.dl-faq details p { color: var(--gray); margin: .6em 0 0; }
.dl-footer { max-width: 980px; margin: 0 auto; padding: 36px 24px 48px; color: var(--muted); font-size: .88rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
@media (max-width: 820px) {
  .dl-hero { grid-template-columns: 1fr; padding-top: 32px; }
  .dl-hero h1 { font-size: 2rem; }
  .dl-steps { grid-template-columns: 1fr; }
  .dl-trust .card { grid-template-columns: 1fr; }
}

/* ---------- console ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login { width: 100%; max-width: 380px; padding: 32px; }
.login img { height: 36px; display: block; margin: 0 auto 6px; }
.login .sub { text-align: center; color: var(--muted); margin: 0 0 22px; font-size: .9rem; }
.login label { display: block; font-size: .85rem; font-weight: 600; margin: 12px 0 4px; color: var(--gray); }
.login input { width: 100%; }
.login .btn { width: 100%; margin-top: 20px; }
.err { color: var(--bad); font-size: .9rem; margin-top: 10px; min-height: 1.3em; }

.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar .in { max-width: 1180px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 16px; }
.topbar img { height: 30px; }
.topbar .title { font-weight: 600; color: var(--muted); border-left: 1px solid var(--line); padding-left: 16px; }
.topbar .spacer { flex: 1; }
.topbar .who { color: var(--muted); font-size: .9rem; }
.console { max-width: 1180px; margin: 0 auto; padding: 24px; display: grid; gap: 20px; }
.connect-bar { padding: 20px 22px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.connect-bar h2 { margin: 0; font-size: 1.1rem; color: var(--navy); margin-right: 8px; }
.connect-bar input { font-size: 1.15rem; width: 220px; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.connect-bar .hint { color: var(--muted); font-size: .88rem; flex: 1; min-width: 220px; text-align: right; }
.connect-bar .hint code { background: var(--navy-50); color: var(--navy); padding: .1em .4em; border-radius: 6px; }
.panel { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 1.05rem; color: var(--navy); }
.panel-head .spacer { flex: 1; }
.panel-head .meta { color: var(--muted); font-size: .88rem; }
table.list { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.list th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 22px; background: #fafafd; border-bottom: 1px solid var(--line); }
table.list td { padding: 11px 22px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.offline td { color: var(--muted); }
table.list td.actions { text-align: right; white-space: nowrap; }
table.list td.actions .btn { margin-left: 6px; }
.dev-name { font-weight: 600; color: var(--ink); }
tr.offline .dev-name { color: var(--muted); }
.dev-sub { color: var(--muted); font-size: .82rem; }
.empty { padding: 34px 22px; text-align: center; color: var(--muted); }
.linkbox { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; padding: 4px 2px; flex-wrap: wrap; }
.linkbox code { background: #fff; border: 1px solid var(--line); padding: .3em .6em; border-radius: 8px; color: var(--navy); }

/* ---------- viewer ---------- */
body.viewer { background: #15141d; color: #e9e8f2; overflow: hidden; height: 100vh; }
.vbar { position: fixed; top: 0; left: 0; right: 0; height: 48px; display: flex; align-items: center; gap: 6px; padding: 0 10px; background: #1f1d2b; border-bottom: 1px solid #2d2a3e; z-index: 10; user-select: none; }
.vbar .mark { width: 28px; height: 28px; background: #fff; border-radius: 7px; padding: 3px; }
.vbar .name { font-weight: 600; margin: 0 8px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.vbar .sep { width: 1px; height: 24px; background: #343146; margin: 0 6px; }
.vbar .spacer { flex: 1; }
.vbtn { background: transparent; color: #d8d6e6; border: 1px solid transparent; border-radius: 8px; padding: 6px 10px; font: inherit; font-size: .86rem; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.vbtn:hover { background: #2c2940; color: #fff; }
.vbtn.active { background: var(--navy); color: #fff; }
.vbtn.danger { background: var(--pink); color: #fff; }
.vbtn.danger:hover { background: var(--pink-600); }
.vbtn svg { width: 16px; height: 16px; }
.vbar select { background: #2a2739; color: #e9e8f2; border: 1px solid #3a3650; border-radius: 8px; padding: 5px 8px; font: inherit; font-size: .86rem; }
.stats { font-size: .78rem; color: #9a97ad; white-space: nowrap; font-variant-numeric: tabular-nums; margin-right: 6px; }
.menu { position: relative; }
.menu .menu-list { position: absolute; top: 40px; right: 0; background: #262338; border: 1px solid #3a3650; border-radius: 10px; padding: 6px; min-width: 220px; box-shadow: 0 10px 30px rgba(0,0,0,.4); z-index: 20; }
.menu .menu-list button { display: block; width: 100%; text-align: left; background: none; border: 0; color: #e9e8f2; font: inherit; font-size: .88rem; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.menu .menu-list button:hover { background: #343048; }
.menu .menu-list .note { font-size: .75rem; color: #8f8ca3; padding: 6px 10px 2px; }
.stage { position: fixed; top: 48px; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.stage.actual { overflow: auto; align-items: flex-start; justify-content: flex-start; }
#screen { display: block; background: #000; outline: none; cursor: default; touch-action: none; }
.overlay { position: fixed; inset: 48px 0 0 0; display: grid; place-items: center; background: rgba(21, 20, 29, .86); z-index: 5; }
.overlay .box { text-align: center; max-width: 460px; padding: 30px; }
.overlay h2 { margin: 0 0 8px; font-size: 1.35rem; color: #fff; }
.overlay p { margin: 0 0 18px; color: #b9b6cb; }
.overlay .btn.ghost { color: #fff; border-color: #4a4660; }
.overlay .btn.ghost:hover { background: #2c2940; }
.menu .menu-list hr { border: 0; border-top: 1px solid #3a3650; margin: 6px 4px; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid #3a3650; border-top-color: var(--pink); margin: 0 auto 18px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #2a2739; color: #fff; border: 1px solid #3a3650; padding: 9px 16px; border-radius: 10px; font-size: .9rem; z-index: 30; box-shadow: 0 8px 24px rgba(0,0,0,.35); transition: opacity .3s; }
.dropzone { position: fixed; inset: 48px 0 0 0; border: 3px dashed var(--pink); background: rgba(231, 29, 115, .12); z-index: 25; display: grid; place-items: center; font-size: 1.3rem; font-weight: 600; color: #fff; pointer-events: none; }
.banner { position: fixed; top: 56px; left: 50%; transform: translateX(-50%); background: #3a2a10; color: #ffd38a; border: 1px solid #6b5020; padding: 8px 16px; border-radius: 10px; font-size: .88rem; z-index: 6; }
.progress { position: fixed; bottom: 18px; right: 18px; background: #262338; border: 1px solid #3a3650; border-radius: 10px; padding: 10px 14px; z-index: 30; min-width: 260px; font-size: .85rem; }
.progress .bar { height: 6px; background: #3a3650; border-radius: 3px; margin-top: 6px; overflow: hidden; }
.progress .bar div { height: 100%; background: var(--pink); width: 0; transition: width .2s; }

/* ---------- v2 additions ---------- */
.dl-buttons { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.dl-alt { font-size: .9rem; color: var(--muted); margin-top: .8em; }
.dl-alt a { font-weight: 600; }
.os-tabs { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin-bottom: 18px; }
.os-tabs button { border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); padding: .4em 1em; border-radius: 8px; cursor: pointer; }
.os-tabs button.active { background: var(--navy); color: #fff; }
.mac-steps ol { margin: .4em 0 0; padding-left: 1.2em; color: var(--gray); }
.mac-steps li { margin: .35em 0; }
.mac-steps .card { padding: 20px 24px; }
.mac-steps h3 { margin: 0 0 .3em; color: var(--navy); font-size: 1.05rem; }
.video-wrap { position: fixed; top: 48px; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.video-wrap.actual { overflow: auto; align-items: flex-start; justify-content: flex-start; }
#screen { display: block; background: #000; outline: none; cursor: default; touch-action: none; }
.badge.relay { background: #3a2a10; color: #ffd38a; }
