/* SplitTrip — mobile-first stylesheet (360px → 430px phones first, scales up). */

:root {
  --navy: #172a45;
  --navy-soft: #25405f;
  --teal: #0d9488;
  --teal-dark: #0b7a70;
  --teal-soft: #e7f7f5;
  --bg: #f4f6f9;
  --card: #ffffff;
  --ink: #16243a;
  --muted: #64748b;
  --line: #e5eaf1;
  --green: #15803d;
  --green-soft: #e9f8ef;
  --red: #c53030;
  --red-soft: #fff0f0;
  --amber: #b45309;
  --amber-soft: #fff7e6;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(20, 40, 70, .07), 0 10px 28px rgba(20, 40, 70, .05);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  overscroll-behavior-y: none;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
input { -webkit-appearance: none; appearance: none; }

.app-shell { min-height: 100%; }

/* ── Top bar ─────────────────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: calc(58px + var(--safe-top));
  padding: var(--safe-top) 14px 0;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 4px 18px rgba(15, 30, 55, .18);
}

.topbar .brand { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.topbar .brand-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(145deg, #21b6a8, #0d9488);
  font-size: 19px; font-weight: 700; color: #fff; flex: none;
}
.topbar .brand-text { min-width: 0; }
.topbar .brand-name { font-weight: 750; font-size: 17px; letter-spacing: -.3px; line-height: 1.1; }
.topbar .brand-sub { font-size: 11px; color: #a9c2d6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .top-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.icon-btn {
  min-width: 44px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 12px; border: 1px solid rgba(255,255,255,.22); border-radius: 12px;
  background: rgba(255,255,255,.09); color: #fff; font-size: 13px; font-weight: 650;
}
.icon-btn:active { transform: scale(.96); background: rgba(255,255,255,.18); }
.icon-btn.solid { background: var(--teal); border-color: var(--teal); }
.icon-btn .glyph { font-size: 16px; }

.back-btn {
  min-width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: rgba(255,255,255,.1); color: #fff; font-size: 20px; flex: none;
}

/* ── Page content ────────────────────────────────────────────────────────── */

.page {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 14px calc(112px + var(--safe-bottom));
}

.page-heading { margin: 4px 2px 14px; }
.page-heading h1 { margin: 0; font-size: 23px; letter-spacing: -.5px; }
.page-heading p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }

.section-label {
  display: flex; align-items: center; justify-content: space-between;
  margin: 18px 2px 9px; font-size: 12px; text-transform: uppercase;
  letter-spacing: .9px; font-weight: 750; color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 15px;
  margin-bottom: 12px;
}

.card-tap { width: 100%; text-align: left; border: 0; background: var(--card); }
.card-tap:active { transform: scale(.992); }

.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.small { font-size: 13px; }
.bold { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono-num { font-variant-numeric: tabular-nums; }

/* ── Buttons & controls (all ≥ 44px tap targets) ─────────────────────────── */

.btn {
  min-height: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 16px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-weight: 680; font-size: 14px;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.danger { background: #fff; border-color: #f3c7c7; color: var(--red); }
.btn.danger-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--teal); }
.btn.wide { width: 100%; }
.btn.sm { min-height: 44px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; }
.field > label { font-size: 13px; font-weight: 700; color: #334155; }
.field .hint { font-size: 12px; color: var(--muted); }

.input {
  width: 100%; min-height: 48px;
  padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; font-size: 16px; outline: none;
}
.input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.input::placeholder { color: #a7b2c2; }
.input.money-input { font-size: 20px; font-weight: 700; letter-spacing: -.3px; }

.input-wrap { position: relative; }
.input-wrap .rupee {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  font-size: 19px; font-weight: 700; color: var(--muted); pointer-events: none;
}
.input-wrap .input { padding-left: 34px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; display: inline-flex; align-items: center; gap: 8px;
  padding: 0 13px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; color: #334155; font-size: 14px; font-weight: 620;
}
.chip .check {
  width: 19px; height: 19px; border-radius: 50%; border: 1.5px solid #b6c2d1;
  display: grid; place-items: center; font-size: 12px; color: transparent; flex: none;
}
.chip.selected { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-dark); }
.chip.selected .check { background: var(--teal); border-color: var(--teal); color: #fff; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 750;
  background: var(--navy); color: #fff;
}
.avatar.teal { background: var(--teal); }
.avatar.lilac { background: #7c3aed; }
.avatar.amber { background: #d97706; }
.avatar.rose { background: #be185d; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 24px; padding: 2px 9px; border-radius: 999px;
  background: #eef2f7; color: #475569; font-size: 11px; font-weight: 700;
  white-space: nowrap;
}
.badge.self { background: var(--teal-soft); color: var(--teal-dark); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }

/* ── Trips list ──────────────────────────────────────────────────────────── */

.trip-card { margin-bottom: 12px; padding: 16px; }
.trip-card .trip-name { font-size: 18px; font-weight: 750; letter-spacing: -.3px; }
.trip-card .trip-total { font-size: 19px; font-weight: 780; color: var(--teal-dark); }
.avatar-stack { display: flex; align-items: center; padding-left: 4px; }
.avatar-stack .avatar { width: 30px; height: 30px; font-size: 11px; border: 2px solid #fff; margin-left: -6px; }

.empty-state {
  text-align: center; padding: 42px 22px; color: var(--muted);
  border: 1.5px dashed #cfd9e6; border-radius: var(--radius); background: #fff;
}
.empty-state .emoji { font-size: 38px; }
.empty-state h3 { margin: 10px 0 4px; color: var(--ink); font-size: 17px; }
.empty-state p { margin: 0 0 16px; font-size: 13px; }

/* ── Friends ─────────────────────────────────────────────────────────────── */

.profile-card {
  position: sticky; top: calc(58px + var(--safe-top)); z-index: 10;
  background: linear-gradient(140deg, var(--navy), var(--navy-soft));
  color: #fff; border: 0;
}
.profile-card .label { font-size: 11px; letter-spacing: 1px; color: #a9c2d6; font-weight: 700; }
.profile-card .name { font-size: 20px; font-weight: 750; }
.profile-card .avatar { width: 42px; height: 42px; background: var(--teal); font-size: 16px; }
.profile-card .edit { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.22); color: #fff; }

.friend-card { padding: 12px 14px; }
.friend-card .friend-name { font-weight: 700; font-size: 15px; }
.friend-card .friend-tag { color: var(--muted); font-size: 12px; }
.mini-btn {
  min-width: 44px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; font-size: 15px; display: grid; place-items: center;
}
.mini-btn.danger { color: var(--red); border-color: #f3c7c7; }

/* ── Trip dashboard summary ──────────────────────────────────────────────── */

.summary {
  position: sticky; top: calc(58px + var(--safe-top)); z-index: 20;
  background: linear-gradient(150deg, var(--navy), #1e3b5c);
  color: #fff; border-radius: 0 0 var(--radius) var(--radius);
  margin: -14px -14px 14px; padding: 14px 14px 12px;
  box-shadow: 0 10px 24px rgba(15, 30, 55, .2);
}
.summary .label { font-size: 11px; letter-spacing: 1px; color: #a9c2d6; font-weight: 750; text-transform: uppercase; }
.summary .total { font-size: clamp(30px, 9vw, 38px); font-weight: 800; letter-spacing: -1.2px; line-height: 1.12; }
.summary .meta { font-size: 12px; color: #a9c2d6; }
.paid-scroll {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 2px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.paid-scroll::-webkit-scrollbar { display: none; }
.paid-pill {
  flex: none; min-height: 40px; display: flex; align-items: center; gap: 7px;
  padding: 4px 11px; border-radius: 999px; background: rgba(255,255,255,.11);
  border: 1px solid rgba(255,255,255,.13); font-size: 12px;
}
.paid-pill .amount { font-weight: 750; color: #fff; }
.paid-pill .who { color: #bcd0e0; max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.settlement-card { padding: 12px 14px; margin-bottom: 9px; border-left: 4px solid var(--line); }
.settlement-card.owed { border-left-color: var(--green); background: var(--green-soft); }
.settlement-card.owes { border-left-color: var(--red); background: var(--red-soft); }
.settlement-card .sentence { font-size: 14px; font-weight: 680; }
.settlement-card.owed .sentence { color: var(--green); }
.settlement-card.owes .sentence { color: var(--red); }
.settlement-card .sentence strong { font-weight: 800; }
.settlement-card.neutral { background: var(--card); }

.action-strip { display: flex; gap: 9px; margin-bottom: 14px; }
.action-strip .btn { flex: 1; }

/* ── Expense feed ────────────────────────────────────────────────────────── */

.expense-card { padding: 0; overflow: hidden; margin-bottom: 11px; }
.expense-main {
  width: 100%; min-height: 64px; padding: 13px 14px;
  display: flex; flex-direction: column; align-items: stretch; gap: 6px;
  border: 0; background: transparent; text-align: left;
}
.expense-main > .row { display: flex; align-items: center; gap: 11px; }
.expense-main:active { background: #f8fafc; }
.expense-main .vendor { font-size: 15px; font-weight: 720; }
.expense-main .when { font-size: 11.5px; color: var(--muted); }
.expense-main .amount { font-size: 16px; font-weight: 780; white-space: nowrap; }
.expense-main .chev { color: var(--muted); font-size: 12px; transition: transform .15s; }
.expense-card.open .chev { transform: rotate(180deg); }

.expense-actions {
  display: flex; gap: 8px; padding: 0 14px 12px;
}
.expense-actions .btn { flex: 1; }

.breakdown { border-top: 1px solid var(--line); background: #fbfcfe; padding: 10px 14px 13px; }
.breakdown-label { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-bottom: 6px; }
.breakdown-row {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 34px; font-size: 13px; border-bottom: 1px dashed #e7ecf3;
}
.breakdown-row:last-child { border-bottom: 0; }
.breakdown-row .who { display: flex; align-items: center; gap: 8px; }

/* ── Floating action button & bottom nav ────────────────────────────────── */

.fab {
  position: fixed; z-index: 35;
  right: 16px; bottom: calc(78px + var(--safe-bottom));
  min-height: 52px; padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--teal); color: #fff; font-size: 15px; font-weight: 780;
  box-shadow: 0 8px 22px rgba(13, 148, 136, .42);
  display: inline-flex; align-items: center; gap: 7px;
}
.fab:active { transform: scale(.96); }

.bottom-nav {
  position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center; gap: 6px;
  padding: 7px 12px calc(7px + var(--safe-bottom));
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(20, 40, 70, .06);
  backdrop-filter: blur(12px);
}
.nav-inner { width: 100%; max-width: 500px; display: flex; }
.nav-tab {
  flex: 1; min-height: 50px; border: 0; border-radius: 12px; background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: 11px; font-weight: 700;
}
.nav-tab .icon { font-size: 19px; line-height: 1; }
.nav-tab.active { background: var(--teal-soft); color: var(--teal-dark); }

/* ── Bottom sheets ───────────────────────────────────────────────────────── */

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(12, 24, 42, .48);
  animation: fade-in .16s ease-out;
}
.sheet {
  position: fixed; z-index: 61; left: 0; right: 0; bottom: 0;
  max-width: 560px; margin: 0 auto;
  max-height: 94dvh; display: flex; flex-direction: column;
  background: #fff; border-radius: 22px 22px 0 0;
  box-shadow: 0 -14px 40px rgba(12, 24, 42, .28);
  animation: slide-up .22s cubic-bezier(.2,.8,.2,1);
}
@keyframes slide-up { from { transform: translateY(40px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: #d7dee8; margin: 9px auto 2px; flex: none; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 18px 10px; border-bottom: 1px solid var(--line); flex: none;
}
.sheet-head h2 { margin: 0; font-size: 18px; letter-spacing: -.3px; }
.sheet-close { width: 44px; height: 44px; border: 0; border-radius: 12px; background: #f1f5f9; font-size: 19px; color: #475569; }
.sheet-body { padding: 16px 18px 10px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
.sheet-foot {
  padding: 10px 18px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--line); background: #fff; flex: none;
}
.sheet-foot .btn { width: 100%; }

.amount-hero {
  display: flex; align-items: center; justify-content: center;
  padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 14px;
  background: #fbfcfe;
}
.amount-hero .rupee { font-size: 28px; font-weight: 700; color: var(--muted); }
.amount-hero input {
  width: 100%; min-height: 56px; border: 0; outline: 0; background: transparent;
  font-size: 32px; font-weight: 800; letter-spacing: -1px; padding: 0 6px;
}
.amount-hero:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }

.split-head { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 10px; }
.split-head .title { font-size: 13px; font-weight: 750; color: #334155; }
.link-btn { min-height: 44px; border: 0; background: transparent; color: var(--teal); font-weight: 700; font-size: 13px; padding: 0 4px; }

.split-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--line);
}
.split-row:last-child { border-bottom: 0; }
.split-row .who { flex: 1; min-width: 0; font-size: 14px; font-weight: 620; }
.split-row .input-wrap { width: 122px; flex: none; }
.split-row .input { min-height: 46px; padding: 8px 10px 8px 28px; font-size: 15px; font-weight: 700; text-align: right; }
.split-row .rupee { left: 10px; font-size: 15px; }

.status-pill {
  min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 999px; font-size: 13px; font-weight: 750; margin-bottom: 9px;
}
.status-pill.balanced { background: var(--green-soft); color: var(--green); }
.status-pill.unbalanced { background: var(--red-soft); color: var(--red); }

/* ── Dialogs, settings & toasts ──────────────────────────────────────────── */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 80; background: rgba(12, 24, 42, .55);
  display: grid; place-items: center; padding: 18px; animation: fade-in .15s;
}
.dialog {
  width: 100%; max-width: 400px; background: #fff; border-radius: 18px;
  padding: 20px; box-shadow: 0 20px 50px rgba(10, 22, 40, .3);
}
.dialog h3 { margin: 0 0 7px; font-size: 18px; }
.dialog p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.dialog .dialog-actions { display: flex; gap: 9px; margin-top: 16px; }
.dialog .dialog-actions .btn { flex: 1; }

.settings { margin-top: 6px; }
.settings summary {
  min-height: 52px; display: flex; align-items: center; gap: 8px;
  padding: 0 14px; list-style: none; cursor: pointer;
  color: var(--muted); font-size: 13px; font-weight: 700;
}
.settings summary::-webkit-details-marker { display: none; }
.settings summary::after { content: "⌄"; margin-left: auto; font-size: 18px; transition: transform .15s; }
.settings[open] summary::after { transform: rotate(180deg); }
.settings .settings-body { padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.settings .settings-body p { margin: 0 0 12px; color: var(--muted); font-size: 12.5px; }
.settings .settings-body .btn + .btn { margin-top: 9px; }

.toast-root { position: fixed; z-index: 100; left: 12px; right: 12px; bottom: calc(86px + var(--safe-bottom)); pointer-events: none; }
.toast {
  max-width: 460px; margin: 0 auto 8px; padding: 12px 14px; border-radius: 12px;
  background: var(--navy); color: #fff; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 10px 26px rgba(10, 22, 40, .3); animation: slide-up .18s;
}
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }

.loading { padding: 50px 10px; text-align: center; color: var(--muted); font-size: 14px; }
.hidden { display: none !important; }

/* ── Larger screens: same layout, a little more breathing room ──────────── */

@media (min-width: 640px) {
  body { font-size: 16px; }
  .page { padding: 20px 22px calc(120px + var(--safe-bottom)); }
  .summary { margin: -20px -22px 18px; padding: 18px 22px; }
  .summary .total { font-size: 42px; }
  .card { padding: 18px; }
  .sheet { max-height: 90dvh; }
  .split-row .input-wrap { width: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Stock avatars, settlement ticks & split indicators ──────────────────── */

.avatar-img {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  object-fit: cover; background: var(--teal-soft);
  border: 1px solid rgba(15, 30, 55, .08);
}
.avatar-img.sm { width: 26px; height: 26px; }
.avatar-img.lg { width: 42px; height: 42px; }
.avatar-stack .avatar-img {
  width: 30px; height: 30px; border: 2px solid #fff; margin-left: -6px;
}
.avatar-stack .avatar-img:first-child { margin-left: 0; }

.avatar-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.avatar-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 6px; scrollbar-width: none; }
.avatar-strip::-webkit-scrollbar { display: none; }
.avatar-option {
  min-height: 58px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; padding: 5px 3px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
}
.avatar-option img { width: 32px; height: 32px; border-radius: 50%; }
.avatar-option span {
  max-width: 54px; font-size: 9px; color: var(--muted); font-weight: 650;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.avatar-option.selected { border-color: var(--teal); background: var(--teal-soft); }
.avatar-option.selected span { color: var(--teal-dark); }

.split-row .who small {
  display: block; font-size: 10.5px; font-weight: 650; color: var(--muted);
}
.split-row .who small.up { color: var(--amber); }
.split-row .who small.down { color: #0284c7; }

.tick-btn {
  min-width: 44px; min-height: 44px; border-radius: 10px;
  border: 1.5px solid var(--line); background: #fff; color: #a1adbd;
  font-size: 17px; font-weight: 800; display: grid; place-items: center;
}
.tick-btn.settled { background: var(--green-soft); border-color: #a9dcbd; color: var(--green); }
.breakdown-row .status { font-size: 10px; font-weight: 750; color: var(--muted); }
.breakdown-row .status.settled { color: var(--green); }

.card-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge.up { background: var(--amber-soft); color: var(--amber); }
.badge.down { background: #e0f2fe; color: #0369a1; }
.badge.settled { background: var(--green-soft); color: var(--green); }

.settlement-party { display: inline-flex; align-items: center; gap: 6px; }
.settlement-party .avatar-img { width: 28px; height: 28px; }
.summary .outstanding { font-size: 11px; color: #fcd9a8; margin-top: 3px; }
.summary .paid-pill .avatar-img { width: 22px; height: 22px; }

/* ── Offline-first status & manual sync ────────────────────────────────────── */

.sync-pill {
  min-height: 36px; display: inline-flex; align-items: center; gap: 6px;
  padding: 0 9px; border-radius: 999px; white-space: nowrap;
  border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.09);
  color: #dbeafe; font-size: 10.5px; font-weight: 750;
}
.sync-pill:active { transform: scale(.97); background: rgba(255,255,255,.18); }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; flex: none; }
.sync-pill.offline { background: rgba(251,191,36,.16); border-color: rgba(251,191,36,.4); color: #fde68a; }
.sync-pill.offline .sync-dot { background: #fbbf24; }
.sync-pill.syncing .sync-dot { background: #7dd3fc; animation: sync-pulse 1s infinite alternate; }
.sync-arrow { font-size: 13px; opacity: .8; }
@keyframes sync-pulse { from { opacity: .35; } to { opacity: 1; } }

.sync-note {
  margin-top: 5px; padding: 5px 8px; border-radius: 8px;
  background: rgba(251,191,36,.16); color: #fcd9a8;
  font-size: 11px; font-weight: 700;
}

@media (max-width: 380px) {
  .topbar { gap: 7px; padding-left: 10px; padding-right: 10px; }
  .sync-pill { padding: 0 7px; gap: 4px; font-size: 9.5px; }
  .topbar .brand-name { font-size: 15px; }
  .topbar .brand-sub { font-size: 10px; }
  .icon-btn { padding: 0 9px; min-width: 40px; }
}
