/* =========================================================
   1. Design tokens and themes
   ========================================================= */
:root {
  color-scheme: light;
  --bg: #FFF6EF;
  --surface: #fffcf9;
  --surface-muted: #f7ece3;
  --border: #eedfd3;
  --text: #1c2a29;
  --muted: #6b7876;
  --primary: #206B6A;
  --primary-hover: #1a5958;
  --primary-text: #206B6A;
  --primary-soft: #e2efed;
  --primary-border: #bfd9d6;
  --on-primary: #ffffff;
  --success: #2c7651;
  --success-soft: #e2f0e7;
  --danger: #b0413a;
  --danger-soft: #f9e3e0;
  --shadow: 0 1px 2px rgba(28, 42, 41, 0.04), 0 4px 14px rgba(28, 42, 41, 0.05);
  --shadow-lg: 0 18px 40px rgba(16, 32, 30, 0.22);
  --radius: 16px;
  --app-width: 480px;
  --nav-height: 68px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1514;
  --surface: #16201f;
  --surface-muted: #1d2a28;
  --border: #263533;
  --text: #e6eeec;
  --muted: #93a29f;
  --primary: #1f746d;
  --primary-hover: #26867e;
  --primary-text: #6cc9bf;
  --primary-soft: #1a302d;
  --primary-border: #2b4b47;
  --success: #74cf9f;
  --success-soft: #173229;
  --danger: #f08c83;
  --danger-soft: #3b201e;
  --shadow: none;
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body.modal-open { overflow: hidden; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
a { color: var(--primary-text); }

:focus-visible {
  outline: 2px solid var(--primary-text);
  outline-offset: 2px;
}

.icon { flex-shrink: 0; display: block; }
.muted { color: var(--muted); }

.app {
  width: 100%;
  max-width: var(--app-width);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
}

@media (min-width: 520px) {
  body { background: var(--surface-muted); }
  .app { box-shadow: 0 0 0 1px var(--border); }
}

/* =========================================================
   2. Headers
   ========================================================= */
.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 12px 18px 20px;
  background: var(--primary);
  color: var(--on-primary);
}

.app-bar-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.app-bar-title h1 {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.3px;
}

.page-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(22px + env(safe-area-inset-top, 0px)) 20px 4px;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.4px;
}

.page {
  padding: 16px 16px calc(var(--nav-height) + 28px + var(--safe-bottom));
}

/* =========================================================
   3. Buttons, search, chips
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline {
  background: var(--surface);
  border-color: var(--primary-border);
  color: var(--primary-text);
}
.btn-outline:hover { background: var(--primary-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-outline {
  background: var(--surface);
  border-color: var(--danger-soft);
  color: var(--danger);
}
.btn-block { width: 100%; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
}
.icon-btn:hover { background: var(--surface-muted); color: var(--text); }
.icon-btn.on-primary { color: var(--on-primary); }
.icon-btn.on-primary:hover { background: rgba(255, 255, 255, 0.14); }

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.toolbar .btn-outline { flex: 1; min-width: 0; }

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
}
.search:focus-within {
  border-color: var(--primary-text);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}
.search input::placeholder { color: var(--muted); }

.chips {
  display: flex;
  gap: 8px;
  margin: 0 -16px;
  padding: 12px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.chip.active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
}

.list-count {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12.5px;
}

/* =========================================================
   4. Stats, lists and cards
   ========================================================= */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card, .card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.icon-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-text);
}

.stat-label {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.stat-value {
  margin-top: 2px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 10px;
}
.section-head h2 { font-size: 16px; font-weight: 650; }

.list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }

.item-card {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.item-main {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 12px;
  min-width: 0;
  padding: 12px 12px 12px 14px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  text-align: left;
}
.item-card:hover { background: var(--surface-muted); }

.avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-text);
  font-size: 18px;
  font-weight: 600;
}

.item-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.item-title, .truncate {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.item-title { font-size: 15px; font-weight: 650; }

.item-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.chevron { color: var(--muted); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Expandable customer card */
.customer-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.customer-card.expanded { border-color: var(--primary-border); }

.cc-head {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "avatar body stb menu";
  align-items: center;
  column-gap: 12px;
  padding: 12px 8px 12px 14px;
  border-radius: inherit;
}
.cc-head:has(.cc-toggle:hover) { background: var(--surface-muted); }
.customer-card.expanded .cc-head { border-radius: var(--radius) var(--radius) 0 0; }

/* The toggle covers the whole header; the STB chip and menu sit above it. */
.cc-toggle {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
}
.cc-head > :not(.cc-toggle) { position: relative; pointer-events: none; }
.cc-head > .stb-chip, .cc-head > .icon-btn { pointer-events: auto; }

.cc-head .avatar { grid-area: avatar; }
.cc-body { grid-area: body; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cc-head .stb-chip { grid-area: stb; }
.cc-menu { grid-area: menu; }
.cc-indicator { display: grid; place-items: center; width: 32px; color: var(--muted); }
.cc-indicator .icon { transition: transform 0.2s ease; }
.customer-card.expanded .cc-indicator .icon { transform: rotate(180deg); }

.stb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--primary-border);
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-text);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
button.stb-chip:hover { border-color: var(--primary-text); }
.stb-chip .copy-icon { opacity: 0.6; }
.stb-chip.empty {
  border-color: var(--border);
  background: var(--surface-muted);
  color: var(--muted);
}

.cc-details {
  margin: 0 16px;
  padding: 6px 0 14px;
  border-top: 1px solid var(--border);
}

.cc-row {
  display: grid;
  grid-template-columns: 20px 118px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px 0;
  font-size: 14px;
  line-height: 1.45;
}
.cc-row .icon { margin-top: 1px; color: var(--muted); }
.cc-label { color: var(--muted); font-size: 13px; }
.cc-value { overflow-wrap: anywhere; white-space: pre-wrap; }
.cc-value.is-empty { color: var(--muted); font-style: italic; }

.cc-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn-soft {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  color: var(--primary-text);
}
.cc-actions .cc-collapse { margin-left: auto; }
.cc-collapse .icon { transform: rotate(180deg); }

@media (max-width: 400px) {
  .cc-head {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "avatar body menu" "avatar stb menu";
    row-gap: 6px;
  }
  .cc-head .stb-chip { justify-self: start; }
  .cc-row { grid-template-columns: 20px minmax(0, 1fr); row-gap: 2px; }
  .cc-value { grid-column: 2; }
}

.stb-card .item-main { gap: 10px; padding: 14px 10px 14px 16px; }
.stb-number {
  flex: 1;
  min-width: 0;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.badge {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}
.badge-available { background: var(--success-soft); color: var(--success); }
.badge-assigned { background: var(--danger-soft); color: var(--danger); }
.kebab { color: var(--muted); }

.empty {
  padding: 34px 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}
.empty .icon-badge { margin: 0 auto; }
.empty h3 { margin-top: 12px; font-size: 15px; font-weight: 650; }
.empty p { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.empty .btn { margin-top: 14px; }

/* =========================================================
   5. Settings
   ========================================================= */
.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-head h2 { font-size: 16px; font-weight: 650; }
.card-head p { margin-top: 3px; color: var(--muted); font-size: 13px; }

.backup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.tile-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 92px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  font-size: 14.5px;
  font-weight: 600;
}
.tile-btn:hover { border-color: var(--primary-border); }
.tile-btn.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
}
.tile-btn.primary:hover { background: var(--primary-hover); }

.settings-list { display: grid; gap: 10px; margin-top: 16px; }

.settings-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
}
.settings-item:hover { background: var(--surface-muted); }
.settings-text { flex: 1; min-width: 0; }
.settings-title { display: block; font-size: 15px; font-weight: 600; }
.settings-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }

/* =========================================================
   6. Bottom navigation and toast
   ========================================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  max-width: var(--app-width);
  padding: 8px 8px calc(8px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  background: var(--surface);
  transform: translateX(-50%);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.nav-item.active { color: var(--primary-text); font-weight: 650; }
.nav-item.active .icon { stroke-width: 2.4; }

.toast {
  position: fixed;
  bottom: calc(var(--nav-height) + 16px + var(--safe-bottom));
  left: 50%;
  z-index: 40;
  width: min(calc(100% - 32px), 448px);
  padding: 12px 16px;
  border-radius: 12px;
  background: #17302d;
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: var(--shadow-lg);
  transform: translateX(-50%);
  animation: toast-in 0.2s ease-out;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
}

/* =========================================================
   7. Modal sheets and forms
   ========================================================= */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    calc(20px + env(safe-area-inset-top, 0px)) 16px
    calc(20px + var(--safe-bottom));
  background: rgba(10, 22, 20, 0.55);
  animation: fade-in 0.15s ease-out;
}

.sheet {
  width: 100%;
  max-width: 440px;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 18px 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  animation: sheet-in 0.2s ease-out;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.sheet-head h2 { font-size: 18px; font-weight: 650; overflow-wrap: anywhere; }
.sheet-head p { margin-top: 4px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.sheet-head .icon-btn { margin: -6px -8px 0 0; }

.sheet-actions { display: flex; gap: 10px; margin-top: 20px; }
.sheet-actions > * { flex: 1; }

.sheet-options { display: grid; gap: 8px; }
.sheet-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}
.sheet-option:hover { background: var(--surface-muted); }
.sheet-option .icon { color: var(--primary-text); }
.sheet-option.danger, .sheet-option.danger .icon { color: var(--danger); }

@keyframes fade-in { from { opacity: 0; } }
@keyframes sheet-in { from { transform: scale(0.96); opacity: 0; } }

@media (max-width: 360px) {
  .backdrop { padding-left: 10px; padding-right: 10px; }
  .sheet { padding: 18px 14px; }
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.span-2 { grid-column: 1 / -1; }

@media (max-width: 400px) {
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
}

.field { min-width: 0; }
.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.optional { font-weight: 400; }
.required-mark { color: var(--danger); }

.input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
}
textarea.input { min-height: 90px; padding: 12px 14px; resize: vertical; }
.input:focus {
  border-color: var(--primary-text);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.hint { margin-top: 6px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.form-note { margin-top: 14px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }

.detail-list {
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.detail-row { padding: 12px 0; border-bottom: 1px solid var(--border); }
.detail-row:last-child { border-bottom: 0; }
.detail-row.inline { display: flex; justify-content: space-between; gap: 12px; }
.detail-label { color: var(--muted); font-size: 12.5px; }
.detail-value {
  margin-top: 4px;
  font-size: 15px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.detail-row.inline .detail-value { margin-top: 0; font-weight: 600; }

.info-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
}

.warning {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.55;
}

.choice-list { display: grid; gap: 8px; }
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  font-size: 15px;
  cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--primary-text); }
.choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }

/* =========================================================
   8. Accounts, sign-in and connection state
   ========================================================= */
body.signed-out .bottom-nav { display: none; }

.btn:disabled { opacity: 0.6; cursor: progress; }

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.boot {
  display: grid;
  place-items: center;
  gap: 14px;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--muted);
  font-size: 14px;
}
.boot .spinner { width: 28px; height: 28px; color: var(--primary-text); }

.auth-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px 20px calc(32px + var(--safe-bottom));
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  text-align: center;
}
.auth-logo .icon-badge {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--primary);
  color: var(--on-primary);
}
.auth-logo h1 { font-size: 24px; font-weight: 700; }
.auth-logo p { color: var(--muted); font-size: 14px; line-height: 1.5; }

.auth-card {
  display: grid;
  gap: 16px;
  padding: 22px 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.auth-card .btn { width: 100%; }

.notice {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary-text);
  font-size: 13px;
  line-height: 1.55;
}
.notice.error { background: var(--danger-soft); color: var(--danger); }

.offline-banner {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 25;
  display: none;
  width: 100%;
  max-width: var(--app-width);
  padding: calc(6px + env(safe-area-inset-top, 0px)) 12px 6px;
  background: var(--danger);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transform: translateX(-50%);
}
body.is-offline .offline-banner { display: block; }

.account-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}
.account-card .avatar { width: 48px; height: 48px; font-size: 18px; }
.account-info { flex: 1; min-width: 0; }
.account-info .item-title { display: block; }
.account-info .item-meta { margin-top: 4px; }

.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-text);
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.role-badge.inactive { background: var(--danger-soft); color: var(--danger); }

.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  text-align: left;
}
button.user-row:hover { background: var(--surface-muted); }
.user-row .item-body { flex: 1; }

.activity-list { display: grid; }
.activity-row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.activity-row:last-child { border-bottom: 0; }
.activity-row .icon { margin-top: 2px; color: var(--primary-text); }
.activity-text { flex: 1; min-width: 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.activity-meta { margin-top: 3px; color: var(--muted); font-size: 12.5px; }

.backup-actions.single { grid-template-columns: 1fr; }

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