/* STORISMO VIP — design system
   Language taken from the live platform: pale-blue canvas, white cards with a thin gradient top edge,
   strong blue primary, soft bubbles, rounded tiles. Logical properties everywhere → RTL/LTR for free. */

:root {
  --bg: #eef5ff;
  --bg-2: #e4eefc;
  --card: #ffffff;
  --card-2: #f6f9ff;
  --text: #0f1b33;
  --muted: #5b6b86;
  --border: #dde8f7;
  --border-strong: #c7d8f0;
  --primary: #1f6feb;
  --primary-600: #0b4fd6;
  --primary-50: #e8f0fe;
  --primary-100: #d4e4fd;
  --sky: #38b6ff;
  --ok: #12a06b;
  --ok-50: #e2f6ee;
  --warn: #b7791f;
  --warn-50: #fdf3dc;
  --danger: #d6334a;
  --danger-50: #fdebee;
  --shadow-sm: 0 1px 2px rgba(20, 60, 140, .05);
  --shadow: 0 1px 2px rgba(20, 60, 140, .04), 0 8px 24px rgba(31, 111, 235, .07);
  --shadow-lg: 0 20px 50px rgba(15, 40, 100, .18);
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --font: "Cairo", "Tajawal", "Inter", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --sidebar-w: 260px;
}

:root[data-theme="dark"] {
  --bg: #0b1426;
  --bg-2: #0f1c34;
  --card: #111f38;
  --card-2: #142443;
  --text: #e8effc;
  --muted: #93a4c4;
  --border: #1e3153;
  --border-strong: #2a4272;
  --primary: #4a8bff;
  --primary-600: #2f6fe8;
  --primary-50: #15284d;
  --primary-100: #1b3466;
  --ok: #3ccf95;
  --ok-50: #0f2e28;
  --warn: #e6b04f;
  --warn-50: #33270f;
  --danger: #ff6b7d;
  --danger-50: #35151b;
  --shadow-sm: none;
  --shadow: 0 1px 0 rgba(255, 255, 255, .02), 0 8px 24px rgba(0, 0, 0, .3);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .55);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.65;
  border-top: 3px solid var(--sky);
  -webkit-font-smoothing: antialiased;
}
html[lang="fr"] body, html[lang="en"] body { font-family: "Inter", "Cairo", system-ui, sans-serif; }

/* Soft translucent bubbles (decorative, like the live platform) */
body::before, body::after {
  content: ""; position: fixed; z-index: 0; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.85), rgba(120,180,255,.22) 55%, rgba(120,180,255,.06));
}
body::before { width: 240px; height: 240px; inset-block-start: -70px; inset-inline-end: 6%; }
body::after { width: 190px; height: 190px; inset-block-end: -60px; inset-inline-start: 3%; }
:root[data-theme="dark"] body::before, :root[data-theme="dark"] body::after { opacity: .14; }

h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 700; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; display: inline-block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.icon { flex: none; vertical-align: middle; }

/* ── Layout shell ───────────────────────────────────── */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: calc(100vh - 3px); }
.sidebar {
  position: sticky; top: 0; align-self: start; height: 100vh; padding: 20px 14px;
  background: var(--card); border-inline-end: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.brand-name { font-weight: 800; font-size: 1.15rem; color: var(--primary); letter-spacing: .2px; }
.brand-sub { display: block; font-size: .72rem; color: var(--muted); font-weight: 600; margin-top: -4px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { padding: 14px 12px 4px; font-size: .75rem; color: var(--muted); font-weight: 700; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r);
  color: var(--text); font-weight: 600; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--primary-50); text-decoration: none; }
.nav a[aria-current="page"] { background: linear-gradient(135deg, var(--primary), var(--primary-600)); color: #fff; box-shadow: 0 6px 14px rgba(31,111,235,.28); }
.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: 10px 24px; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-title { font-weight: 700; color: var(--muted); font-size: .92rem; }
.topbar-title b { color: var(--text); }
.spacer { flex: 1; }
.content { padding: 28px 24px 56px; width: 100%; max-width: 1240px; margin-inline: auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { color: var(--muted); margin-top: 4px; max-width: 62ch; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.btn.menu-btn { display: none; }
.scrim { display: none; }

/* ── Cards ──────────────────────────────────────────── */
.card {
  position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); padding: 20px;
}
.card--accent::before {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: linear-gradient(90deg, var(--sky), var(--primary));
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }

.tile {
  width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-600)); box-shadow: 0 4px 10px rgba(31,111,235,.25);
}
.tile--soft { background: var(--primary-50); color: var(--primary); box-shadow: none; }

.stat { display: flex; align-items: center; gap: 14px; }
.stat b { display: block; font-size: 1.55rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .85rem; }

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px;
  border-radius: var(--r); border: 1px solid var(--border-strong); background: var(--card); color: var(--text);
  font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer; transition: transform .1s, box-shadow .15s, background .15s;
}
.btn:hover { background: var(--card-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-600)); border-color: transparent; color: #fff; box-shadow: 0 6px 14px rgba(31,111,235,.28); }
.btn-primary:hover { background: linear-gradient(135deg, #2d7bf5, var(--primary-600)); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); background: var(--danger-50); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { min-height: 34px; padding: 4px 12px; font-size: .85rem; }
.btn-icon { width: 38px; min-height: 38px; padding: 0; }
.btn[disabled], .btn.is-loading { opacity: .65; pointer-events: none; }
.btn.is-loading::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Badges / pills ─────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--primary-50); color: var(--primary); white-space: nowrap; }
.badge--ok { background: var(--ok-50); color: var(--ok); }
.badge--warn { background: var(--warn-50); color: var(--warn); }
.badge--danger { background: var(--danger-50); color: var(--danger); }
.badge--muted { background: var(--card-2); color: var(--muted); border: 1px solid var(--border); }
.pill-group { display: inline-flex; padding: 3px; gap: 2px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; }
.pill-group a { padding: 3px 9px; border-radius: 7px; font-size: .74rem; font-weight: 800; color: var(--muted); }
.pill-group a:hover { text-decoration: none; background: var(--primary-50); }
.pill-group a[aria-current="true"] { background: var(--primary); color: #fff; }

/* ── Forms ──────────────────────────────────────────── */
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-weight: 700; font-size: .88rem; }
.hint { color: var(--muted); font-size: .8rem; }
.field-error { color: var(--danger); font-size: .82rem; font-weight: 600; }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]), select, textarea {
  width: 100%; min-height: 42px; padding: 8px 12px; font: inherit; color: var(--text);
  background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--r);
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 84px; resize: vertical; }
input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
input[dir=ltr], .ltr { direction: ltr; text-align: start; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: 600; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--primary); flex: none; }
.check small { display: block; color: var(--muted); font-weight: 500; }
fieldset { border: 1px solid var(--border); border-radius: var(--r); padding: 14px; margin: 0; min-width: 0; }
legend { padding: 0 8px; font-weight: 700; font-size: .88rem; }
.lang-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.lang-tabs button { border: 1px solid var(--border); background: var(--card); border-radius: 8px; padding: 3px 10px; font: inherit; font-weight: 700; font-size: .8rem; cursor: pointer; color: var(--muted); }
.lang-tabs button[aria-selected="true"] { background: var(--primary); color: #fff; border-color: transparent; }
[data-lang-panel][hidden] { display: none; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .grow { flex: 1 1 220px; }
.toolbar select { width: auto; min-width: 150px; }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon > input { padding-inline-start: 38px !important; }

/* ── Tables (become cards on small screens) ─────────── */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: start; font-size: .78rem; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--card-2); }
.cell-main { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.cell-main b { display: inline; }
.cell-main small { display: block; }
.cell-main small { color: var(--muted); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.is-inactive { opacity: .6; }
.sort-link { color: inherit; display: inline-flex; align-items: center; gap: 4px; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 36px; padding: 6px 10px; text-align: center; border-radius: 9px; border: 1px solid var(--border); background: var(--card); font-weight: 700; font-size: .88rem; color: var(--text); }
.pagination [aria-current="page"] { background: var(--primary); color: #fff; border-color: transparent; }
.pagination a:hover { text-decoration: none; background: var(--primary-50); }

/* ── Alerts, empty, skeleton, progress ──────────────── */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--primary-50); color: var(--text); border: 1px solid var(--primary-100); }
.alert--warn { background: var(--warn-50); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.alert--danger { background: var(--danger-50); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.alert--ok { background: var(--ok-50); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.alert ul { margin: 4px 0 0; padding-inline-start: 18px; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .tile { width: 56px; height: 56px; border-radius: 16px; }
.empty h3 { color: var(--text); }
.skeleton { border-radius: 8px; background: linear-gradient(90deg, var(--border) 25%, var(--card-2) 37%, var(--border) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; min-height: 14px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.progress { height: 8px; border-radius: 999px; background: var(--primary-50); overflow: hidden; }
.progress > i { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--sky), var(--primary)); }

/* ── Modal (native <dialog>) & toasts ───────────────── */
dialog.modal { border: 0; padding: 0; border-radius: var(--r-lg); background: var(--card); color: var(--text); width: min(520px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(9, 20, 45, .5); backdrop-filter: blur(2px); }
.modal-body { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 0 22px 20px; flex-wrap: wrap; }
.toast-host { position: fixed; z-index: 100; inset-block-end: 20px; inset-inline-start: 20px; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 40px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--card); border: 1px solid var(--border); border-inline-start: 4px solid var(--primary); border-radius: var(--r); box-shadow: var(--shadow-lg); animation: toast-in .25s ease; }
.toast--ok { border-inline-start-color: var(--ok); } .toast--danger { border-inline-start-color: var(--danger); } .toast--warn { border-inline-start-color: var(--warn); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ── Money / price display ──────────────────────────── */
.price { font-weight: 800; white-space: nowrap; }
.price-lg { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.price-input { max-width: 150px; }
.tile-note { font-size: .8rem; color: var(--muted); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; }

/* ── Package editor matrix ──────────────────────────── */
.matrix { display: flex; flex-direction: column; gap: 8px; }
.matrix-row { display: grid; grid-template-columns: minmax(180px, 1.6fr) 150px 90px 130px; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--card); }
.matrix-row.is-off { background: var(--card-2); }
.matrix-head { font-size: .78rem; color: var(--muted); font-weight: 700; padding: 0 12px; }
.matrix-row input, .matrix-row select { min-height: 36px; padding: 4px 10px; }
.matrix-row [disabled] { opacity: .45; }

/* ── Auth pages ─────────────────────────────────────── */
.auth-wrap { position: relative; z-index: 1; min-height: calc(100vh - 3px); display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(440px, 100%); }
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 18px; text-align: center; }
.auth-logo img { width: 72px; height: 72px; border-radius: 50%; }
.auth-top { position: absolute; inset-block-start: 14px; inset-inline-end: 16px; display: flex; gap: 8px; z-index: 2; }

.error-page { text-align: center; max-width: 460px; }
.error-code { font-size: 4.5rem; font-weight: 800; line-height: 1; color: var(--primary); }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 60; width: min(290px, 86vw); transform: translateX(var(--drawer-x, 100%)); transition: transform .22s ease; box-shadow: none; }
  html[dir="ltr"] .sidebar { --drawer-x: -100%; }
  .sidebar.is-open { transform: none; box-shadow: var(--shadow-lg); }
  .scrim.is-open { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(9, 20, 45, .45); }
  .btn.menu-btn { display: inline-flex; }
  .topbar { padding-inline: 14px; }
  .content { padding: 20px 14px 48px; }
  .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .matrix-row { grid-template-columns: 1fr 1fr; }
  .matrix-row > :first-child { grid-column: 1 / -1; }
  .matrix-head { display: none; }

  table.data.stackable thead { display: none; }
  table.data.stackable, table.data.stackable tbody, table.data.stackable tr, table.data.stackable td { display: block; width: 100%; }
  table.data.stackable tr { margin-bottom: 12px; padding: 10px 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r); }
  table.data.stackable td { border: 0; padding: 6px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  table.data.stackable td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; font-weight: 700; flex: none; }
  table.data.stackable td.cell-first { display: block; }
  table.data.stackable td.cell-first::before, table.data.stackable td.no-label::before { display: none; }
  table.data.stackable .row-actions { justify-content: flex-start; }
}
@media (max-width: 480px) { h1 { font-size: 1.35rem; } .btn { width: auto; } .page-head .actions { width: 100%; } .toast-host { inset-inline: 12px; max-width: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
@media print { .sidebar, .topbar, .actions, .toast-host, body::before, body::after { display: none !important; } .shell { display: block; } body { border: 0; background: #fff; } }

/* ── Public join page ───────────────────────────────── */
.pub-top { position: relative; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 12px 24px; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.pub-wrap { position: relative; z-index: 1; width: 100%; max-width: 1180px; margin-inline: auto; padding: 28px 20px 96px; }
.pub-hero { text-align: center; max-width: 640px; margin: 8px auto 26px; }
.pub-hero h1 { font-size: 2rem; margin-bottom: 8px; }
.pub-hero p { color: var(--muted); }
.join-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.step { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.step-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; font-size: .85rem; font-weight: 800; flex: none; }

.pkg-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.pkg-choice { position: relative; cursor: pointer; display: block; }
.pkg-choice input { position: absolute; opacity: 0; inset: 0; }
.pkg-choice-body { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px; border: 2px solid var(--border); border-radius: var(--r); background: var(--card); transition: border-color .15s, box-shadow .15s; }
.pkg-choice input:checked + .pkg-choice-body { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); background: var(--primary-50); }
.pkg-choice input:focus-visible + .pkg-choice-body { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; }
.pkg-price { font-size: 1.35rem; font-weight: 800; color: var(--primary); }

.svc-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--card); margin-bottom: 8px; }
.svc-info { flex: 1; min-width: 0; }
.svc-info small { display: block; }
.stepper { display: inline-flex; align-items: center; gap: 8px; }
.stepper output { min-width: 26px; text-align: center; font-weight: 800; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch-track { position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong); transition: background .15s; }
.switch-track::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .15s; }
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { inset-inline-start: 23px; }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + .switch-track { opacity: .6; }
.switch input:focus-visible + .switch-track { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; }

.summary { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }
.sum-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: .9rem; }
.sum-lines li { display: flex; justify-content: space-between; gap: 10px; }
.sum-lines .neg { color: var(--ok); }
.sum-total { display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 1px solid var(--border); }
.sum-total .skeleton { color: transparent; min-width: 120px; min-height: 34px; }
.mobile-bar { display: none; }

@media (max-width: 900px) {
  .join-grid { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .pub-hero h1 { font-size: 1.5rem; }
  .mobile-bar { display: flex; position: fixed; inset-inline: 0; bottom: 0; z-index: 30; justify-content: space-between; align-items: center; padding: 10px 16px; background: var(--card); border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(20,60,140,.1); }
  .mobile-bar div { display: flex; flex-direction: column; line-height: 1.2; }
  .pub-top { padding-inline: 14px; }
}
.pkg-price { align-self: flex-start; }
