/* SANDOZ PRESENTING DECK — interface
   Direction: calm, product-page clarity in the spirit of apple.com — system type, generous space,
   large headlines, white cards with big radii and no borders, pill buttons, a translucent top bar.
   Accent: the compass blue from the Sandoz logo. */
:root {
  --bg: #f5f5f7; --surface: #ffffff; --surface-2: #fbfbfd; --ink: #1d1d1f; --muted: #6e6e73; --faint: #86868b;
  --line: rgba(0, 0, 0, .1); --soft: #f0f0f3; --field: #ffffff; --field-line: #d2d2d7;
  --brand: #1f56c2; --brand-hover: #174aa9; --brand-ink: #ffffff; --brand-soft: #e8effc;
  --nav: rgba(251, 251, 253, .78); --nav-ink: #1d1d1f;
  --danger: #d7372a; --danger-soft: #fdecea; --warn: #b25e00; --warn-soft: #fff3e0; --ok: #1a7f42; --ok-soft: #e6f4ea;
  --shadow: 0 2px 6px rgba(0, 0, 0, .04), 0 10px 30px rgba(0, 0, 0, .06);
  --shadow-hover: 0 6px 14px rgba(0, 0, 0, .06), 0 22px 50px rgba(0, 0, 0, .12);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, .25);
  --r-lg: 22px; --r: 16px; --r-sm: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --surface: #1c1c1e; --surface-2: #161617; --ink: #f5f5f7; --muted: #a1a1a6; --faint: #86868b;
    --line: rgba(255, 255, 255, .12); --soft: #2c2c2e; --field: #1c1c1e; --field-line: #424245;
    --brand: #5b8ef5; --brand-hover: #7aa4ff; --brand-ink: #ffffff; --brand-soft: #16243f;
    --nav: rgba(22, 22, 23, .78); --nav-ink: #f5f5f7;
    --danger: #ff6961; --danger-soft: #3a1715; --warn: #ffb340; --warn-soft: #3a2a0f; --ok: #30d158; --ok-soft: #0f2e18;
    --shadow: 0 0 0 1px rgba(255,255,255,.06); --shadow-hover: 0 0 0 1px rgba(255,255,255,.14), 0 20px 50px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --surface: #1c1c1e; --surface-2: #161617; --ink: #f5f5f7; --muted: #a1a1a6; --faint: #86868b;
  --line: rgba(255, 255, 255, .12); --soft: #2c2c2e; --field: #1c1c1e; --field-line: #424245;
  --brand: #5b8ef5; --brand-hover: #7aa4ff; --brand-ink: #ffffff; --brand-soft: #16243f;
  --nav: rgba(22, 22, 23, .78); --nav-ink: #f5f5f7;
  --danger: #ff6961; --danger-soft: #3a1715; --warn: #ffb340; --warn-soft: #3a2a0f; --ok: #30d158; --ok-soft: #0f2e18;
  --shadow: 0 0 0 1px rgba(255,255,255,.06); --shadow-hover: 0 0 0 1px rgba(255,255,255,.14), 0 20px 50px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.47 var(--font); letter-spacing: -.022em; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { text-wrap: balance; margin: 0; letter-spacing: -.02em; }
.muted { color: var(--muted); } .small { font-size: 14px; }
.err { color: var(--danger); font-size: 15px; min-height: 22px; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------- buttons & fields ---------------- */
button, .btn { appearance: none; border: 0; background: var(--soft); color: var(--ink); border-radius: 980px; padding: 9px 18px;
  font: 500 15px/1.2 var(--font); letter-spacing: -.01em; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap;
  transition: background .2s, color .2s, transform .1s, opacity .2s; }
button:hover, .btn:hover { background: color-mix(in srgb, var(--soft) 80%, var(--ink) 8%); text-decoration: none; }
button:active, .btn:active { transform: scale(.98); }
button:disabled { opacity: .4; cursor: default; transform: none; }
.primary { background: var(--brand); color: var(--brand-ink); }
.primary:hover { background: var(--brand-hover); }
.danger { color: var(--danger); }
.danger:hover { background: var(--danger-soft); }
.ghost { background: transparent; color: var(--brand); padding-inline: 10px; }
.ghost:hover { background: var(--brand-soft); }
.link { background: none; padding: 0; color: var(--brand); border-radius: 0; }
.link:hover { background: none; text-decoration: underline; }
.wide { width: 100%; padding: 13px; font-size: 17px; }
.btn.lg, button.lg { padding: 12px 24px; font-size: 17px; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=search], input:not([type]), select, textarea {
  font: 17px var(--font); letter-spacing: -.01em; color: var(--ink); background: var(--field); border: 1px solid var(--field-line); border-radius: var(--r-sm); padding: 11px 14px; min-width: 0;
  transition: border-color .2s, box-shadow .2s; }
select { padding-right: 34px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
button:focus-visible, .btn:focus-visible, a:focus-visible, summary:focus-visible { outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 35%, transparent); }
textarea { resize: vertical; width: 100%; }
label { color: var(--muted); font-size: 14px; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; }
input[type=color] { width: 40px; height: 32px; border: 1px solid var(--field-line); border-radius: 10px; padding: 2px; background: var(--field); }

/* ---------------- top bar (translucent, like a product site) ---------------- */
.topnav { position: sticky; top: 0; z-index: 40; background: var(--nav); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line); }
.topnav .in { max-width: 1180px; margin: 0 auto; height: 52px; display: flex; align-items: center; gap: 22px;
  padding-left: max(22px, env(safe-area-inset-left)); padding-right: max(22px, env(safe-area-inset-right)); }
.topnav .brand { display: flex; align-items: center; gap: 9px; color: var(--nav-ink); text-decoration: none; flex: none; }
.topnav .brand img { width: 28px; height: 28px; border-radius: 7px; background: #f1e9e6; }
.topnav .brand b { font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.topnav nav { display: flex; gap: 2px; flex: 1; justify-content: center; }
.topnav nav a { color: var(--nav-ink); opacity: .8; font-size: 13px; padding: 6px 11px; border-radius: 980px; white-space: nowrap; letter-spacing: -.01em; }
.topnav nav a:hover { opacity: 1; text-decoration: none; }
.topnav nav a.on { opacity: 1; font-weight: 600; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.topnav .right { display: flex; align-items: center; gap: 10px; flex: none; }
.topnav .me { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--nav-ink); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 12px; flex: none;
  background: linear-gradient(135deg, #5b8ef5, #1f3f8a); color: #fff; letter-spacing: 0; }
.iconbtn { width: 34px; height: 34px; padding: 0; background: transparent; color: var(--nav-ink); }
.iconbtn:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.menu-toggle { display: none; }
.menu-panel { display: none; }
@media (max-width: 1080px) {
  .topnav nav, .topnav .right .switches, .topnav .me .name { display: none; }
  .topnav .in { justify-content: space-between; }
  .menu-toggle { display: inline-flex; }
  .menu-panel { position: fixed; inset: 52px 0 0; z-index: 39; background: var(--bg); padding: 22px max(28px, env(safe-area-inset-left)) 40px; overflow-y: auto; }
  body.menu-open .menu-panel { display: block; animation: drop .25s ease; }
  body.menu-open { overflow: hidden; }
  .menu-panel nav { display: grid; gap: 2px; margin-bottom: 26px; }
  .menu-panel nav a { font-size: 28px; font-weight: 600; color: var(--ink); padding: 6px 0; letter-spacing: -.02em; }
  .menu-panel nav a.on { color: var(--brand); }
  .menu-panel .switches { margin-bottom: 18px; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }

/* ---------------- page ---------------- */
.main { max-width: 1180px; margin: 0 auto; padding: 44px max(22px, env(safe-area-inset-right)) 90px max(22px, env(safe-area-inset-left)); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 30px; }
.page-head h1 { font-size: clamp(34px, 4.6vw, 48px); font-weight: 700; line-height: 1.08; letter-spacing: -.03em; }
.page-head p { margin: 8px 0 0; color: var(--muted); font-size: clamp(17px, 1.7vw, 21px); letter-spacing: -.01em; max-width: 60ch; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------------- cards ---------------- */
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 26px 28px; margin-bottom: 22px; min-width: 0; }
.card > h2, .card-head h2 { font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.card > h2 { margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.hint { color: var(--muted); font-size: 15px; margin: 6px 0 0; }
.card > .hint:first-of-type { margin-top: -8px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px 22px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 22px; }
@media (max-width: 1080px) { .cols { grid-template-columns: 1fr; } }
.field { display: grid; gap: 7px; min-width: 0; }
.check { display: flex; gap: 10px; align-items: center; color: var(--ink); font-size: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.banner { border-radius: var(--r); padding: 14px 18px; margin-bottom: 20px; font-size: 15px; display: flex; gap: 10px; align-items: flex-start; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.ok { background: var(--ok-soft); color: var(--ok); }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; display: grid; justify-items: center; gap: 12px; font-size: 17px; }
.empty svg.i { width: 44px; height: 44px; color: var(--faint); stroke-width: 1.3; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-bottom: 22px; }
.kpi { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 22px 24px; display: grid; gap: 2px; }
.kpi .ic { color: var(--brand); margin-bottom: 10px; }
.kpi .ic svg.i { width: 26px; height: 26px; stroke-width: 1.6; }
.kpi b { font-size: 40px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.kpi span { color: var(--muted); font-size: 14px; letter-spacing: -.01em; }
.kpi.warn .ic, .kpi.warn b { color: var(--warn); }
.kpi.bad .ic, .kpi.bad b { color: var(--danger); }

/* tables */
.tablewrap { overflow-x: auto; margin: 0 -6px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; letter-spacing: -.01em; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.nowrap { white-space: nowrap; }
tr.fail td { background: color-mix(in srgb, var(--danger-soft) 65%, transparent); }
.status { white-space: nowrap; font-size: 13px; font-weight: 500; color: var(--ok); display: inline-flex; align-items: center; gap: 6px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.off { color: var(--faint); } .status.must { color: var(--warn); } .status.bad { color: var(--danger); }
.role { font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.role.admin { color: var(--brand); } .role.editor { color: var(--ok); }
.usercell { display: flex; align-items: center; gap: 12px; }
.usercell .avatar { width: 34px; height: 34px; font-size: 13px; }
.usercell b { display: block; font-weight: 600; }
.place { display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; }
.flag { font-size: 17px; line-height: 1; }
.evt { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-weight: 500; }
.evt .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--muted); }
.evt .dot svg.i { width: 15px; height: 15px; }
.evt.auth .dot { background: var(--brand-soft); color: var(--brand); }
.evt.deck .dot { background: var(--ok-soft); color: var(--ok); }
.evt.bad .dot { background: var(--danger-soft); color: var(--danger); }
.evt.user .dot, .evt.group .dot { background: color-mix(in srgb, #8e44d6 14%, var(--surface)); color: #8e44d6; }
.uact { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.uact button, td button { padding: 6px 13px; font-size: 13px; }

/* ---------------- presentations (product tiles) ---------------- */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 26px; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.search svg.i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search input { width: 100%; padding-left: 42px; border-radius: 980px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 8px 16px; font-size: 14px; background: var(--surface); box-shadow: var(--shadow); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.cat { font-size: 28px; font-weight: 700; margin: 10px 0 18px; letter-spacing: -.025em; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cat span { font-size: 17px; font-weight: 400; color: var(--muted); letter-spacing: -.01em; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 24px; margin-bottom: 44px; }
.dcard { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; min-width: 0;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
.dcard:hover { transform: scale(1.012); box-shadow: var(--shadow-hover); }
.dcard .cover { position: relative; display: block; aspect-ratio: 16 / 10.2; background: #e9e9ed center/cover no-repeat; margin: 12px 12px 0; border-radius: 14px; overflow: hidden; }
:root[data-theme="dark"] .dcard .cover { background-color: #2c2c2e; }
.dcard .lang { position: absolute; left: 10px; top: 10px; z-index: 1; background: rgba(255,255,255,.88); color: #1d1d1f; font-weight: 600; font-size: 12px; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 980px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.dcard .play { position: absolute; right: 12px; bottom: 12px; z-index: 1; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.9); color: #1d1d1f;
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: transform .25s, background .25s; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.dcard .play svg.i { width: 20px; height: 20px; fill: currentColor; stroke: none; margin-left: 3px; }
.dcard .cover:hover .play { transform: scale(1.08); background: #fff; }
.dcard .body { padding: 18px 22px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.dcard .kicker { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--warn); }
.dcard .kicker.ok { color: var(--ok); } .dcard .kicker.bad { color: var(--danger); }
.dcard .title { font-weight: 600; font-size: 21px; line-height: 1.2; letter-spacing: -.02em; overflow-wrap: anywhere; }
.dcard .meta { color: var(--muted); font-size: 14px; display: flex; gap: 4px 14px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.dcard .foot { display: flex; gap: 10px; align-items: center; margin-top: auto; padding-top: 12px; flex-wrap: wrap; }
.dcard .foot .grow { flex: 1; }
.dcard .foot button, .dcard .foot .btn { padding: 8px 16px; font-size: 14px; }

/* upload */
.uploader { margin-bottom: 30px; }
.upform { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.upform label { display: grid; gap: 7px; flex: 1; min-width: 220px; }
#drop { display: grid; justify-items: center; gap: 6px; border: 2px dashed var(--field-line); border-radius: var(--r-lg); background: var(--surface-2);
  padding: 38px 20px; text-align: center; color: var(--muted); cursor: pointer; transition: background .2s, border-color .2s; font-size: 15px; }
#drop:hover, #drop.over { border-color: var(--brand); background: var(--brand-soft); }
#drop .ic { color: var(--brand); margin-bottom: 6px; }
#drop .ic svg.i { width: 40px; height: 40px; stroke-width: 1.4; }
#drop b { color: var(--ink); font-size: 19px; font-weight: 600; }
#uploads { display: grid; gap: 10px; margin-top: 14px; }
#uploads:empty { display: none; }
.up { background: var(--surface-2); border-radius: var(--r-sm); padding: 12px 16px; font-size: 15px; }
.up .bar { height: 4px; background: var(--soft); border-radius: 2px; margin-top: 9px; overflow: hidden; }
.up .bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.up.err { color: var(--danger); }

/* settings inside dialogs */
.settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px 24px; font-size: 15px; }
.settings label { display: flex; gap: 10px; align-items: center; color: var(--ink); font-size: 15px; }
.settings label input[type=text], .settings label select { flex: 1; }
.url { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.url .base { color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.url input { flex: 1; min-width: 160px; }
.tag { font-size: 12px; font-weight: 500; color: var(--muted); background: var(--soft); border-radius: 980px; padding: 3px 10px; }
.tag.pub { color: var(--warn); background: var(--warn-soft); }

/* ---------------- dialogs (sheets) ---------------- */
dialog { border: 0; border-radius: 26px; padding: 0; background: var(--surface); color: var(--ink); max-width: min(94vw, 900px); width: 100%; box-shadow: var(--shadow-lg); }
dialog[open] { animation: sheet .3s cubic-bezier(.2,.8,.2,1); }
@keyframes sheet { from { opacity: 0; transform: translateY(14px) scale(.985); } }
dialog::backdrop { background: rgba(0, 0, 0, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 28px 6px; }
.dlg-head h2 { font-size: 24px; font-weight: 700; letter-spacing: -.025em; }
.dlg-head .x { width: 34px; height: 34px; padding: 0; }
.dlg-body { padding: 14px 28px 24px; max-height: min(72vh, 780px); overflow: auto; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 28px 22px; }
.dlg-body h3 { font-size: 19px; font-weight: 600; margin: 26px 0 12px; }
dialog.narrow { max-width: min(94vw, 580px); }
dialog.qr .dlg-body { text-align: center; }
dialog.qr img { width: 300px; max-width: 70vw; background: #fff; border-radius: 16px; padding: 14px; display: block; margin: 6px auto 14px; }
.rhead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 18px; }
.rhead h2 { margin: 2px 0; font-size: 26px; font-weight: 700; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--warn); }
.eyebrow.blue { color: var(--brand); }
.verdict { font-size: 17px; font-weight: 500; }
.okline { background: var(--ok-soft); color: var(--ok); border-radius: var(--r-sm); padding: 12px 16px; font-weight: 500; }
.issue { border-radius: var(--r); margin-bottom: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.issue summary { cursor: pointer; display: flex; gap: 12px; align-items: center; padding: 14px 18px; list-style: none; }
.issue summary::-webkit-details-marker { display: none; }
.issue .sev { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--soft); padding: 4px 9px; border-radius: 980px; }
.issue.error .sev { color: var(--danger); background: var(--danger-soft); } .issue.warning .sev { color: var(--warn); background: var(--warn-soft); }
.issue .it { flex: 1; font-weight: 500; } .issue .n { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.issue .advice { margin: 0 18px 10px; color: var(--muted); font-size: 15px; }
.issue ul { list-style: none; margin: 0; padding: 0 18px 14px; display: grid; gap: 5px; font-size: 15px; max-height: 300px; overflow: auto; }
.issue li { display: flex; gap: 12px; } .pg { font-weight: 600; min-width: 46px; }
.secret { font: 500 16px ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--soft); padding: 10px 14px; border-radius: var(--r-sm); user-select: all; overflow-wrap: anywhere; color: var(--ink); }
.tiles3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.tiles3 div { background: var(--surface-2); border-radius: var(--r); padding: 14px 16px; color: var(--muted); font-size: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.tiles3 b { display: block; font-size: 30px; font-weight: 700; color: var(--ink); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tiles3 .err b { color: var(--danger); } .tiles3 .warnt b { color: var(--warn); } .tiles3 .ok b { color: var(--ok); }

/* ---------------- groups, password rules, misc ---------------- */
.groupchecks { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 4px; min-width: 0; }
.groupchecks label { display: inline-flex; gap: 8px; align-items: flex-start; color: var(--ink); font-size: 15px; overflow-wrap: anywhere; min-width: 0; max-width: 100%; line-height: 1.35; }
.groupchecks label input { margin-top: 2px; flex: none; }
#groups td:nth-child(2) .groupchecks { flex-direction: column; gap: 5px; max-width: 290px; }
#ng { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 820px; gap: 16px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
#ng .field:last-child { justify-self: start; }
.pillset { display: flex; flex-wrap: wrap; gap: 5px; }
.pillset span { font-size: 13px; padding: 3px 10px; border-radius: 980px; background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.kind { font-size: 13px; font-weight: 500; color: var(--muted); }
.kind.manual { color: var(--brand); }
.pwrules { list-style: none; margin: 12px 0 0; padding: 14px 18px; display: grid; gap: 5px; font-size: 15px; color: var(--muted); background: var(--surface-2); border-radius: var(--r); max-width: 540px; box-shadow: inset 0 0 0 1px var(--line); }
.pwrules .ttl { color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.pwrules li span { display: inline-block; width: 20px; font-weight: 700; }
.pwrules li.ok { color: var(--ok); }
.pwwrap { position: relative; display: flex; width: 100%; }
.pwwrap input { flex: 1; width: 100%; padding-right: 48px; }
.eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: transparent; color: var(--faint); padding: 7px 9px; border-radius: 980px; }
.eye:hover, .eye[aria-pressed="true"] { color: var(--brand); background: var(--brand-soft); }
.eye:active { transform: translateY(-50%) scale(.96); }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 12px); background: color-mix(in srgb, var(--ink) 92%, transparent); color: var(--bg); padding: 12px 22px;
  border-radius: 980px; font-size: 15px; font-weight: 500; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; max-width: calc(100% - 32px); z-index: 100;
  box-shadow: var(--shadow-lg); backdrop-filter: blur(10px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* switches (RO|EN, Day|Night|Auto) */
.switches { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 2px; border-radius: 980px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.seg button { border-radius: 980px; padding: 4px 10px; background: transparent; color: var(--muted); font-weight: 500; font-size: 12px; gap: 4px; }
.seg button:hover { background: transparent; color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.topnav .seg-label { display: none; }

/* map + activity */
#map { height: 460px; border-radius: var(--r); overflow: hidden; background: var(--soft); z-index: 0; }
.mapnote { font-size: 13px; color: var(--faint); margin-top: 10px; }
.leaflet-container { font-family: var(--font); }
.leaflet-popup-content-wrapper { border-radius: 14px; }
.leaflet-popup-content { font-size: 14px; line-height: 1.45; margin: 12px 16px; }
.leaflet-popup-content b { font-size: 16px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.activity { display: grid; }
.activity .a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.activity .a:last-child { border-bottom: 0; }
.activity .a .what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity .a .what small { display: block; color: var(--muted); font-size: 13px; }
.activity .a .when { color: var(--faint); font-size: 13px; white-space: nowrap; }

/* ---------------- sign-in: Sandoz Compass wallpaper, frosted card on the left ---------------- */
.login-page { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: flex-start;
  padding: 40px max(24px, 6vw); background: #dfe9f6 url('/login-bg.jpg') 70% center / cover no-repeat; }
.login-card { width: min(430px, 100%); text-align: center; padding: 36px 38px 30px; border-radius: 30px;
  background: rgba(255, 255, 255, .74); backdrop-filter: saturate(170%) blur(24px); -webkit-backdrop-filter: saturate(170%) blur(24px);
  box-shadow: 0 30px 80px rgba(20, 50, 100, .28), inset 0 0 0 1px rgba(255, 255, 255, .6); color: #1d1d1f; }
:root[data-theme="dark"] .login-card { background: rgba(28, 28, 30, .72); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .login-card { background: rgba(28, 28, 30, .72); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.08); } }
.login-card .switches { justify-content: center; margin-bottom: 26px; }
.login-card .logo { width: 76px; height: 76px; border-radius: 19px; background: #f1e9e6; margin: 0 auto 18px; display: block; box-shadow: 0 10px 30px rgba(0,0,0,.14); }
.login-card .site { font-size: 13px; font-weight: 600; letter-spacing: .1em; color: var(--muted); }
.login-card h1 { font-size: 38px; font-weight: 700; letter-spacing: -.03em; margin: 6px 0 24px; }
.login-card form { display: grid; gap: 14px; text-align: left; }
.login-card label { display: grid; gap: 7px; }
.login-card input { width: 100%; padding: 14px 16px; font-size: 17px; border-radius: 14px; }
.login-card .err { min-height: 0; }
.login-card .err:empty { display: none; }
.login-card .wide { margin-top: 6px; }
.login-card .foot { margin: 20px 0 0; font-size: 14px; color: var(--muted); }
/* portrait iPad and phones: the wallpaper sits on top, the card below it */
@media (orientation: portrait) and (max-width: 1100px), (max-width: 760px) {
  .login-page { flex-direction: column; justify-content: flex-end; align-items: center; gap: 0;
    padding: 24px 16px max(28px, env(safe-area-inset-bottom)); background: linear-gradient(to bottom, rgba(178,200,226,0) 72%, #b2c8e2 99%) center top / 100% 63.6vw no-repeat,
      #b2c8e2 url('/login-bg.jpg') center top / 100% auto no-repeat; }
  .login-card { width: min(460px, 100%); }
}
@media (max-width: 560px) {
  .login-page { background: linear-gradient(to bottom, rgba(178,200,226,0) 70%, #b2c8e2 99%) center top / 100% 40% no-repeat,
      #b2c8e2 url('/login-bg-sm.jpg') 76% top / auto 40% no-repeat; }
  .login-card { padding: 26px 22px 22px; }
  .login-card h1 { font-size: 32px; margin-bottom: 18px; }
  .login-card .logo { width: 64px; height: 64px; margin-bottom: 12px; }
  .login-card .switches { margin-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) { *, dialog[open] { transition: none !important; animation: none !important; } }
/* compact controls inside tables */
td input[type=text], td select { font-size: 15px; padding: 7px 11px; border-radius: 10px; }
td select { padding-right: 30px; }
.uact { min-width: 0; max-width: 260px; margin-left: auto; }
#users td:nth-child(2) input { width: 140px !important; }
td.detail { min-width: 200px; max-width: 340px; overflow-wrap: anywhere; }
td.tgt { max-width: 220px; overflow-wrap: anywhere; }
/* map tiles (OpenStreetMap): calmer colours by day, inverted to a dark map by night */
.osm-tiles { filter: saturate(.55) brightness(1.04) contrast(.95); }
:root[data-theme="dark"] .osm-tiles { filter: invert(1) hue-rotate(180deg) saturate(.35) brightness(.85) contrast(.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .osm-tiles { filter: invert(1) hue-rotate(180deg) saturate(.35) brightness(.85) contrast(.9); } }
.leaflet-bar a { background: var(--surface); color: var(--ink); border-bottom-color: var(--line); }
.leaflet-bar a:hover { background: var(--soft); color: var(--ink); }
.leaflet-touch .leaflet-bar { border: 0; box-shadow: var(--shadow); border-radius: 10px; overflow: hidden; }
.leaflet-container .leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--muted); border-radius: 8px 0 0 0; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--ink); }
/* choosing presentations for a user / users for a presentation */
.picker { display: grid; gap: 6px; max-height: 340px; overflow: auto; padding: 4px 2px; }
.pick-cat { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); margin-top: 6px; }
.picker .groupchecks { flex-direction: column; gap: 6px; }
.pillset span.grp { background: var(--soft); color: var(--muted); }
.pillset span.none { background: var(--warn-soft); color: var(--warn); }
.whobox { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.who { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); cursor: pointer; font-size: 15px; }
.who:has(input:checked) { box-shadow: inset 0 0 0 2px var(--brand); background: var(--brand-soft); }
.who.fixed { cursor: default; opacity: .75; }
.who .avatar { width: 30px; height: 30px; font-size: 12px; }
.who small { display: block; color: var(--muted); font-size: 12px; }
