/* Heder – design system (mobile first) */
:root {
  --primary: #1d4ed8;
  --primary-600: #1e40af;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --success: #15803d; --success-bg: #dcfce7;
  --warning: #b45309; --warning-bg: #fef3c7;
  --danger: #b91c1c;  --danger-bg: #fee2e2;
  --info: #0369a1;    --info-bg: #e0f2fe;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .12);
  --sidebar: 250px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; } h4 { font-size: .95rem; }
p { margin: 0 0 .75rem; }
img { max-width: 100%; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.text-danger { color: var(--danger); } .text-success { color: var(--success); } .text-warning { color: var(--warning); }
.text-right { text-align: right; } .text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }
.bold { font-weight: 600; }
.hidden { display: none !important; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; } .flex-wrap { flex-wrap: wrap; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; } .grow { flex: 1; }
.w-full { width: 100%; }

/* ---------- Layout ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: 56px;
  display: flex; align-items: center; gap: .75rem; padding: 0 1rem;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.topbar .brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--text); font-size: 1.05rem; }
.topbar .brand img { height: 32px; width: auto; border-radius: 6px; }
.topbar .brand .logo-fallback { width: 32px; height: 32px; border-radius: 8px; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; }
.topbar .spacer { flex: 1; }
.burger { display: inline-flex; border: 0; background: none; padding: .4rem; cursor: pointer; color: var(--text); border-radius: 8px; }
.burger:hover { background: var(--bg); }
.shell { display: flex; flex: 1; }
.sidebar {
  position: fixed; inset: 56px auto 0 0; width: var(--sidebar); z-index: 35;
  background: var(--surface); border-right: 1px solid var(--border);
  transform: translateX(-100%); transition: transform .2s ease; overflow-y: auto;
  padding: .75rem .6rem 5rem;
}
.sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
.sidebar-backdrop { position: fixed; inset: 56px 0 0 0; background: rgba(15,23,42,.35); z-index: 34; display: none; }
.sidebar-backdrop.open { display: block; }
.nav-section { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: .9rem .75rem .35rem; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: .65rem; padding: .55rem .75rem; border-radius: var(--radius-sm);
  color: var(--text); font-weight: 500; font-size: .93rem;
}
.nav a:hover { background: var(--bg); text-decoration: none; }
.nav a.active { background: var(--primary-50); color: var(--primary-600); }
.nav a svg { width: 19px; height: 19px; flex: none; opacity: .8; }
.nav a .badge { margin-left: auto; }
.main { flex: 1; min-width: 0; padding: 1rem; padding-bottom: 5rem; }
@media (min-width: 1024px) {
  .sidebar { transform: none; box-shadow: none; }
  .sidebar-backdrop { display: none !important; }
  .burger { display: none; }
  .main { margin-left: var(--sidebar); padding: 1.5rem 2rem 3rem; }
  .bottom-nav { display: none; }
}
.container { max-width: 1100px; margin: 0 auto; }
.container.narrow { max-width: 720px; }

.page-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; }
.page-header h1 { margin: 0; }
.page-header .sub { color: var(--muted); margin: .15rem 0 0; }
.page-header .actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Bottom navigation (mobile) */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; height: 60px;
  display: flex; background: var(--surface); border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .68rem; color: var(--muted); font-weight: 500; position: relative; }
.bottom-nav a svg { width: 22px; height: 22px; }
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a:hover { text-decoration: none; }
.bottom-nav .dot { position: absolute; top: 8px; right: calc(50% - 14px); width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1rem; }
.card-body { padding: 1.1rem 1.25rem; }
.card-header { padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.card-header h2, .card-header h3 { margin: 0; }
.card-footer { padding: .8rem 1.25rem; border-top: 1px solid var(--border); background: #fafbfc; border-radius: 0 0 var(--radius) var(--radius); }
.grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } .grid-main { grid-template-columns: 2fr 1fr; } }

.stat { padding: 1rem 1.15rem; }
.stat .label { font-size: .8rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 1.65rem; font-weight: 700; margin-top: .15rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat .hint { font-size: .82rem; color: var(--muted); margin-top: .2rem; }
.stat.danger .value { color: var(--danger); }
.stat.success .value { color: var(--success); }
.stat.warning .value { color: var(--warning); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .55rem 1rem; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; line-height: 1.2;
  background: var(--primary); color: #fff; white-space: nowrap; transition: background .15s, box-shadow .15s;
}
.btn:hover { background: var(--primary-600); text-decoration: none; color: #fff; }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn svg { width: 17px; height: 17px; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--bg); color: var(--text); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--primary-50); color: var(--primary-600); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #991b1b; }
.btn-danger-outline { background: var(--surface); color: var(--danger); border-color: #fca5a5; }
.btn-danger-outline:hover { background: var(--danger-bg); color: var(--danger); }
.btn-success { background: var(--success); }
.btn-success:hover { background: #166534; }
.btn-sm { padding: .35rem .7rem; font-size: .83rem; }
.btn-lg { padding: .8rem 1.4rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn-icon { padding: .45rem; }
form.inline { display: inline; }

/* ---------- Forms ---------- */
.field { margin-bottom: 1rem; }
label, .label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .3rem; }
.help { font-size: .82rem; color: var(--muted); margin-top: .3rem; }
.input, select, textarea, input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], input[type=search], input[type=time], input[type=url] {
  width: 100%; padding: .6rem .8rem; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s; min-height: 42px;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6l3.5 3.5L11.5 6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; padding-right: 2.2rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29, 78, 216, .15); }
input.error, select.error, textarea.error { border-color: var(--danger); }
.error-msg { color: var(--danger); font-size: .82rem; margin-top: .3rem; }
.checkbox { display: flex; align-items: flex-start; gap: .6rem; font-weight: 500; cursor: pointer; }
.checkbox input { width: 18px; height: 18px; margin-top: .15rem; accent-color: var(--primary); min-height: 0; }
.form-row { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } .form-row.three { grid-template-columns: 1fr 1fr 1fr; } }
.input-group { display: flex; }
.input-group input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .addon { display: flex; align-items: center; padding: 0 .8rem; border: 1px solid var(--border-strong); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--bg); color: var(--muted); font-weight: 600; }
.form-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.25rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
legend { font-weight: 700; margin-bottom: .6rem; font-size: 1rem; }
.switch { position: relative; display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 42px; height: 24px; border-radius: 12px; background: var(--border-strong); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(18px); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: #fafbfc; white-space: nowrap; }
.table tbody tr:hover { background: #f8fafc; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table a.row-link { color: inherit; font-weight: 600; }
.card > .table-wrap .table { border-radius: var(--radius); }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
.empty svg { width: 40px; height: 40px; opacity: .35; margin-bottom: .5rem; }

/* ---------- Badges & alerts ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; line-height: 1.4; white-space: nowrap; background: var(--border); color: var(--text); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-primary { background: var(--primary-100); color: var(--primary-600); }
.badge-muted { background: #f1f5f9; color: var(--muted); }
.badge-count { background: var(--danger); color: #fff; min-width: 20px; justify-content: center; padding: .1rem .4rem; }
.alert { padding: .85rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid transparent; display: flex; gap: .6rem; align-items: flex-start; }
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: #bbf7d0; }
.alert-error, .alert-danger { background: var(--danger-bg); color: var(--danger); border-color: #fecaca; }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: #fde68a; }
.alert-info { background: var(--info-bg); color: var(--info); border-color: #bae6fd; }
.flashes { position: fixed; top: 66px; right: 1rem; left: 1rem; z-index: 60; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
@media (min-width: 640px) { .flashes { left: auto; width: 380px; } }
.flashes .alert { box-shadow: var(--shadow-lg); pointer-events: auto; animation: slidein .25s ease; }
@keyframes slidein { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Misc components ---------- */
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-100); color: var(--primary-600); display: inline-grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.2rem; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: .75rem 0; border-bottom: 1px solid var(--border); display: flex; gap: .75rem; align-items: center; }
.list li:last-child { border-bottom: 0; }
.list .body { flex: 1; min-width: 0; }
.list .title { font-weight: 600; }
.list .meta { font-size: .82rem; color: var(--muted); }
.list a.item { color: inherit; display: flex; gap: .75rem; align-items: center; flex: 1; min-width: 0; }
.list a.item:hover { text-decoration: none; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; overflow-x: auto; }
.tabs a { padding: .6rem .9rem; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--primary); border-color: var(--primary); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.pills { display: flex; gap: .4rem; flex-wrap: wrap; }
.pills a { padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text); font-size: .85rem; font-weight: 500; background: var(--surface); }
.pills a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pills a:hover { text-decoration: none; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: .35rem; z-index: 50; display: none; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button { display: flex; width: 100%; text-align: left; align-items: center; gap: .5rem; padding: .5rem .7rem; border-radius: 6px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; font-size: .9rem; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--bg); text-decoration: none; }
.dropdown-menu .danger { color: var(--danger); }
.dropdown-menu hr { border: 0; border-top: 1px solid var(--border); margin: .3rem 0; }
.progress { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; }
.progress > div { height: 100%; background: var(--success); border-radius: 4px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding-left: 1.4rem; padding-bottom: 1rem; border-left: 2px solid var(--border); margin-left: .4rem; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--border-strong); border: 2px solid #fff; }
.timeline li.done::before { background: var(--success); }
.timeline li.late::before { background: var(--danger); }
.timeline li.next::before { background: var(--primary); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; font-size: .93rem; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; }
.notice { background: var(--primary-50); border: 1px dashed var(--primary-100); padding: .9rem 1rem; border-radius: var(--radius-sm); font-size: .9rem; }
.searchbar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.searchbar input, .searchbar select { min-width: 0; }
.searchbar > * { flex: 1 1 160px; }
.searchbar .btn { flex: 0 0 auto; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 70; display: none; align-items: flex-end; justify-content: center; padding: 0; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: var(--radius) var(--radius) 0 0; padding: 1.25rem; animation: up .2s ease; }
@media (min-width: 640px) { .modal-backdrop { align-items: center; padding: 1rem; } .modal { border-radius: var(--radius); } }
@keyframes up { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h2 { margin-bottom: 1rem; }
.modal .close { float: right; border: 0; background: none; font-size: 1.4rem; cursor: pointer; color: var(--muted); line-height: 1; }

/* Messaging */
.thread { display: flex; flex-direction: column; gap: .75rem; }
.bubble { max-width: 85%; padding: .7rem .95rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.bubble.mine { align-self: flex-end; background: var(--primary); color: #fff; border-color: var(--primary); }
.bubble .who { font-size: .75rem; font-weight: 600; opacity: .75; margin-bottom: .2rem; }
.bubble .when { font-size: .72rem; opacity: .65; margin-top: .3rem; text-align: right; }
.bubble p { margin: 0; white-space: pre-wrap; word-wrap: break-word; }
.bubble a { color: inherit; text-decoration: underline; }
.composer { position: sticky; bottom: 60px; background: var(--bg); padding-top: .75rem; }
@media (min-width: 1024px) { .composer { bottom: 0; } }
.composer textarea { min-height: 70px; }
.attach-list a { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; padding: .25rem .6rem; border-radius: 6px; background: rgba(0,0,0,.06); margin: .3rem .3rem 0 0; color: inherit; }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal .dow { font-size: .72rem; text-transform: uppercase; color: var(--muted); text-align: center; padding: .3rem 0; font-weight: 600; }
.cal .day { min-height: 64px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: .25rem .3rem; font-size: .78rem; }
.cal .day.other { opacity: .4; }
.cal .day.today { border-color: var(--primary); }
.cal .day .n { font-weight: 600; }
.cal .ev { display: block; margin-top: 2px; padding: 1px 4px; border-radius: 4px; background: var(--primary-100); color: var(--primary-600); font-size: .68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .ev.holiday { background: var(--warning-bg); color: var(--warning); }
.cal .ev.meeting { background: var(--info-bg); color: var(--info); }
.cal .ev.trip { background: var(--success-bg); color: var(--success); }
@media (max-width: 639px) { .cal .day { min-height: 44px; } .cal .ev { font-size: 0; padding: 0; height: 5px; border-radius: 3px; } }

/* Auth pages */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem 1rem; background: linear-gradient(160deg, var(--primary-50), var(--bg) 60%); }
.auth .card { width: 100%; max-width: 420px; }
.auth .brand { text-align: center; margin-bottom: 1.25rem; }
.auth .brand img { max-height: 64px; }
.auth .brand h1 { margin-top: .5rem; }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .8rem; margin: 1rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

/* Print */
@media print {
  .topbar, .sidebar, .bottom-nav, .flashes, .no-print { display: none !important; }
  .main { margin: 0; padding: 0; }
  .card { box-shadow: none; border: 0; }
  body { background: #fff; }
}
.print-only { display: none; }
@media print { .print-only { display: block; } }

/* Roll call */
.roll { display: grid; gap: .5rem; }
.roll .row { display: flex; align-items: center; gap: .75rem; padding: .6rem .8rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.roll .row .name { flex: 1; font-weight: 600; }
.roll .seg { display: flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; }
.roll .seg label { margin: 0; padding: .4rem .7rem; font-size: .8rem; cursor: pointer; font-weight: 600; color: var(--muted); border-right: 1px solid var(--border-strong); }
.roll .seg label:last-child { border-right: 0; }
.roll .seg input { display: none; }
.roll .seg input:checked + span { color: #fff; }
.roll .seg label:has(input:checked) { background: var(--muted); color: #fff; }
.roll .seg label.p:has(input:checked) { background: var(--success); }
.roll .seg label.a:has(input:checked) { background: var(--danger); }
.roll .seg label.r:has(input:checked) { background: var(--warning); }

.child-card { display: flex; gap: .9rem; align-items: center; }
.child-card .avatar { width: 48px; height: 48px; font-size: 1rem; }
.big-number { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pay-cta { background: linear-gradient(135deg, var(--primary), #4f46e5); color: #fff; border-radius: var(--radius); padding: 1.25rem; }
.pay-cta .btn { background: #fff; color: var(--primary-600); }
.pay-cta .btn:hover { background: var(--primary-50); }
.pay-cta .muted { color: rgba(255,255,255,.8); }
.method-choice { display: grid; gap: .75rem; }
@media (min-width: 640px) { .method-choice { grid-template-columns: 1fr 1fr; } }
.method-choice button { text-align: left; padding: 1rem; border: 2px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; font: inherit; color: inherit; }
.method-choice button:hover { border-color: var(--primary); }
.method-choice .t { font-weight: 700; display: block; margin-bottom: .2rem; }
.method-choice .d { font-size: .85rem; color: var(--muted); }
.method-choice .reco { float: right; }

/* ---------- fixes / overrides ---------- */
@media (min-width: 1024px) { .bottom-nav { display: none !important; } }
.list > li > svg, .list .item > svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.alert svg { width: 20px; height: 20px; }
.hidden-sm { display: none; } @media (min-width: 640px) { .hidden-sm { display: inline; } }
.burger svg { width: 24px; height: 24px; }
.topbar .btn-icon svg { width: 20px; height: 20px; }
