@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0&display=swap');

/* ── Design System: Commo Communities ─────────────────────── */
/* See DESIGN.md for full palette. Colors from Bubble app.     */
/* Primary green, near-monochrome, system fonts, border-only.  */
/* All tokens defined as CSS custom properties below.          */

:root {
  /* Core */
  --primary: #43DA49;
  --primary-hover: #3DC642;
  --text: #171717;
  --text-secondary: #616161;
  --text-muted: #627084;
  --text-disabled: #767676;
  --card-fg: #1D2530;

  /* Surfaces */
  --bg: #fff;
  --bg-hover: #F9FAFB;
  --surface: #F5F5F5;
  --surface-hover: #EDEDED;
  --muted-bg: #EDF3ED;
  --muted-bg-hover: #E8EFE8;
  --muted-alt: #EDF0F3;

  /* Borders */
  --border: #E5E5E5;
  --border-dark: #D4D4D4;
  --border-light: #DAE0E7;
  --ring: #43DA49;

  /* Semantic */
  --success: #0C9C35;
  --success-light: #2EB867;
  --destructive: #B60909;
  --destructive-hover: #A00606;
  --destructive-bg: #FFF5F5;
  --alert: #E29B36;
  --alert-light: #EBA747;

  /* Sandbox */
  --sandbox-surface: #FFF8E1;
  --sandbox-text: #92400E;
  --sandbox-hover-bg: rgba(146, 64, 14, 0.1);
  --sandbox-border: #E8D5A8;

  /* Special */
  --avatar: #C2A9F6;
  --tertiary: #2F2F2E;
  --tertiary-hover: #252524;
  --alert-bg: #FFF8E1;
  --link: #2563EB;
  --back-btn-bg: #F1F2F4;
  --back-btn-bg-hover: #E5E7EB;
  --gc-badge-bg: #E8F5FF;
  --gc-badge-text: #0066CC;
  --gc-connect-bg: #1E1A15;
  --gc-connect-hover: #2A2620;
  --luma-color: #5046E5;

  /* Entity icon colors */
  --entity-plan: #4A90D9;
  --entity-duty: #2B9E9E;
  --entity-commitment: #D4882B;
  --entity-org: #6366B3;
  --entity-period: #D94A6B;
  --entity-card: #64748B;
  --entity-payment: #0C9C35;
  --entity-invoice: #D97B4A;
  --entity-subscription: #5B8BD9;
  --entity-member: #8B6CC1;

  /* Radius scale */
  --radius-badge: 5px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-pill: 999px;

  /* Shadow */
  --shadow-menu: 0 4px 12px rgba(0,0,0,0.1);

  /* Misc */
  --overlay: rgba(0, 0, 0, 0.35);

  /* Status alpha (25% opacity for badge backgrounds / danger borders) */
  --success-alpha: rgba(12, 156, 53, 0.25);
  --alert-alpha: rgba(226, 155, 54, 0.25);
  --destructive-alpha: rgba(182, 9, 9, 0.25);

  /* Primary subtle (20% opacity tint for CTA panels) */
  --primary-subtle: rgba(67, 218, 73, 0.2);
}

/* Squircle approximation (matches Commo app icon shape) */
.squircle { border-radius: 22.37%; overflow: hidden; }

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; margin: 0; background: var(--bg); color: var(--text); line-height: 1.4; font-size: 14px; }
header { background: var(--bg); color: var(--text); padding: 0 24px; min-height: 80px; display:flex; align-items:center; justify-content:flex-end; text-align:center; position: fixed; top: 0; left: 260px; right: 0; z-index: 10; border-bottom: 1px solid var(--border); }
.topHeaderLabel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 24px; font-weight: 600; color: var(--text); pointer-events: none; }
.topAvatarBtn {
  position: absolute;
  right: calc((100% - 992px) / 2);
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--avatar);
  color: #fff;
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.topAvatarBtn:hover { background: var(--avatar); }
.topAvatarMenu {
  position: absolute;
  right: calc((100% - 992px) / 2);
  top: calc(100% - 16px);
  width: 240px;
  max-width: min(92vw, 240px);
  background: #fff;
  color: var(--card-fg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-menu);
  z-index: 60;
  padding: 16px;
  box-sizing: border-box;
}
.topAvatarMenu .menuHeader { display:flex; gap:10px; align-items:center; padding: 0 8px 8px; overflow:hidden; text-align:left; }
.topAvatarMenu .menuAvatar { width:38px; height:38px; border-radius:var(--radius-pill); background:var(--avatar); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:600; font-size:14px; flex-shrink:0; }
.topAvatarMenu .menuName { font-weight:600; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.topAvatarMenu .menuEmail { color:var(--text-muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.topAvatarMenu hr { border:0; border-top:1px solid var(--border); margin:8px 0; }
.topAvatarMenu hr:last-of-type { margin-bottom:16px; }
.topAvatarMenu .menuItem { width:100%; text-align:left; background:#fff; color:var(--card-fg); border:0; padding:8px; border-radius:var(--radius); font-size:16px; font-weight:500; height:40px; display:flex; align-items:center; gap:10px; box-sizing:border-box; }
.topAvatarMenu .menuItem:hover { background:var(--bg-hover); }
.topAvatarMenu .menuItem .material-symbols-outlined { font-size:20px; color:var(--text-secondary); }
.topAvatarMenu .menuLogout { width:100%; background:#fff; color:var(--card-fg); border:1px solid var(--border); border-radius:var(--radius); padding:8px 16px; margin-top:0; font-size:16px; font-weight:500; height:44px; cursor:pointer; }
.topAvatarMenu .menuLogout:hover { background:var(--bg-hover); }
header h1 { margin: 0; font-size: 24px; width: 100%; text-align: center; }
header p { margin: 0; opacity: .92; }
main { padding: 128px 14px 24px; box-sizing: border-box; }

.sideNav {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 260px;
  background: var(--surface);
  color: var(--text);
  padding: 24px 16px 12px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-right: 1px solid var(--border);
  z-index: 20;
  box-sizing: border-box;
  overflow: hidden;
}
.sideNavTop { margin-bottom: 32px; display: flex; align-items: center; gap: 12px; padding-left: 12px; overflow: hidden; }
.orgLogo { width: 32px; height: 32px; background: var(--primary); color: #fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size: 12px; flex-shrink: 0; }
.orgLogo img { width:100%; height:100%; object-fit:cover; }
.orgName { font-size: 18px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.commoLogo { width: 32px; height: 32px; flex-shrink: 0; }
.commoName { font-size: 18px; font-weight: 600; color: var(--text); }
.sideNavLinks { display: flex; flex-direction: column; gap: 0; padding-bottom: 0; align-self: start; }
.sideNavSettings { width: 100% !important; max-width: none; }
.sideNavBottom { display: block; padding-bottom: 8px; }
.sideNavBtn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--text);
  border-radius: var(--radius);
  padding: 0 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
}
.sideNavBtn .material-symbols-outlined { font-size: 24px; color: var(--text-secondary); font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.sideNavBtn.active { background: #fff; color: var(--text); font-weight: 500; border: 1px solid var(--border); }
.sideNavBtn:hover { background: var(--surface-hover); color: var(--text); }
.sideNavBtn.active:hover { background: #fff; }

body main { margin-left: 260px; width: calc(100% - 260px); display: flex; flex-direction: column; align-items: center; }
body main > * { width: 100%; max-width: 992px; }

.demoBanner { background: var(--muted-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.demoBanner p { margin: 4px 0 0; color: var(--success); }
.pill { background: var(--success); color: #fff; border-radius: var(--radius-pill); padding: 4px 8px; font-size: 12px; white-space: nowrap; }

.callout { background: var(--muted-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; }
.callout.warning { background: var(--alert-bg); border-color: var(--alert); }
.table-loading-placeholder { padding: 48px 16px; text-align: center; color: var(--text-muted); font-size: 14px; }
.error { background: var(--destructive-bg); border-color: var(--destructive); display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 16px; }
#errorText { margin-top: 2px; font-size: 13px; color: var(--destructive); }

.dashboardTabsWrap { margin: 0 0 16px; }
.dashboardTabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}
.dashboardTab {
  background: transparent;
  color: var(--text-secondary);
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 10px 18px 12px;
  font-weight: 500;
  font-size: 16px;
  white-space: nowrap;
  height: auto;
}
.dashboardTab:hover { color: var(--text-secondary); background: linear-gradient(var(--surface), var(--surface)) no-repeat center top / calc(100%) calc(100% - 8px); border-radius: var(--radius) var(--radius) 0 0; }
.dashboardTab.active {
  color: var(--text);
  font-weight: 500;
  border-bottom-color: var(--primary);
}
.dashboardTabContent.isHidden { display: none; }

/* ── Root Tab Page Layout ─────────────────────────────────────────
   Canonical layout for sidebar-navigated pages.
   Title, tabs, and actions sit on white. Content goes in .panel.

   RULE: actions are always SIBLINGS of __content, never nested
   inside it. When a page has sub-tabs, each sub-tab's actions get
   their own __actions div between __tabs and __content, toggled
   by JS alongside the sub-panels.

   Structure:
     .rootTabPage
       .rootTabPage__title     (h1/h2)
       .rootTabPage__subtitle  (p.muted, optional)
       .rootTabPage__tabs      (wraps .dashboardTabs, optional)
       .rootTabPage__actions   (CTA buttons, optional, one per sub-tab)
       .rootTabPage__content   (wraps one or more .panel sections)

   Spacing: tabs and actions each provide 16px gap below. Panels
   inside __content use their own margin-top (16px default, 0 for
   first-child). No inline margin overrides needed.
   ────────────────────────────────────────────────────────────── */
.rootTabPage__title { margin: 0; }
.rootTabPage__subtitle { margin: 4px 0 0; }
.rootTabPage__tabs { margin: 0 0 16px; }
.rootTabPage__actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: 0 0 16px; }
.rootTabPage__content { margin-top: 0; }
.rootTabPage__content > .panel:first-child { margin-top: 0; }

@media (max-width: 900px) {
  .rootTabPage__actions { justify-content: stretch; }
  .rootTabPage__actions button { width: 100%; }
}

.cards { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 12px; margin-top: 16px; margin-bottom: 16px; }
.card { background: #fff; border-radius: var(--radius); padding: 16px; border: 1px solid var(--border); }
.card.ok .value { color: var(--success); }
.card.warn .value { color: var(--alert); }
.card.risk .value { color: var(--destructive); }
.card .label { font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.card .value { font-size: 20px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.card .hint { margin-top: 6px; color: var(--text-disabled); font-size: 12px; }

.panel { background: var(--surface); border-radius: var(--radius); padding: 32px; margin-top: 16px; border: 1px solid var(--border); box-sizing: border-box; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#plansTreasurerSection { grid-column: 1 / -1; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions.between { justify-content: flex-end; align-items: center; }
.actions.between > h3 { font-size:18px; font-weight:700; margin:0; flex:1; }
button { border: 0; border-radius: var(--radius); padding: 8px 16px; background: var(--primary); color: #fff; cursor: pointer; font: inherit; font-size: 16px; font-weight: 500; height: 44px; }
button:hover { background: var(--primary-hover); }
button:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
button.secondary { background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); }
button.secondary:hover { background: var(--bg-hover); }
button.tertiary { background: var(--tertiary); color: #fff; display: inline-flex; align-items: center; gap: 6px; }
button.tertiary:hover { background: var(--tertiary-hover); }
button.danger { background: var(--destructive); color: #fff; }
button.danger:hover { background: var(--destructive-hover); }
button.danger-outline { background: transparent; color: var(--destructive); border: 1px solid var(--destructive); border-radius: var(--radius); font-size: 14px; font-weight: 600; }
button.danger-outline:hover { background: var(--destructive-bg); }
button.danger-ghost { background: transparent; color: var(--destructive); border: 1px solid var(--destructive-alpha); border-radius: var(--radius); height: 32px; padding: 0 16px; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; }
button.danger-ghost:hover { background: var(--destructive-bg); }
button.save-outline { background: #fff; color: var(--text); border: 1px solid var(--text); border-radius: var(--radius); }
button.save-outline:hover { background: var(--bg-hover); }
button.stripe-outline { background: #fff; color: #635BFF; border: 1px solid #635BFF; border-radius: var(--radius); }
button.stripe-outline:hover { background: #F5F3FF; }
button.small-secondary { background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); height: 32px; padding: 0 12px; font-size: 12px; font-weight: 500; }
button.small-secondary:hover { background: var(--bg-hover); }
button:disabled { background: var(--border); color: var(--text-disabled); cursor: not-allowed; border-color: var(--border); }
button:disabled:hover { background: var(--border); }
form.stack, .stack { display: grid; gap: 8px; }
label { font-size: 13px; color: var(--text-secondary); display: grid; gap: 4px; }
label.inlineCheck { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-light); border-radius: var(--radius); padding: 8px 12px; background: #fff; }
input, select, textarea { border: 1px solid var(--border); border-radius: var(--radius); padding: 0 16px; height: 44px; font: inherit; font-size: 16px; box-sizing: border-box; width: 100%; }
select { -webkit-appearance: none; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23616161' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center; padding-right: 40px; }
textarea { border-radius: var(--radius); padding: 16px; height: auto; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ring); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface); color: var(--text-disabled); border-color: var(--border); box-shadow: none; cursor: not-allowed; }
input.error, select.error, textarea.error { border-color: var(--destructive); }
input.error:focus, select.error:focus, textarea.error:focus { border-color: var(--destructive); }
textarea { resize: vertical; min-height: 80px; }
#searchInput { min-width: 260px; }

.settingsNavGrid { display: grid; grid-template-columns: 3fr 2fr; gap: 12px; align-items: start; }
.settingsNavGrid > * { min-width: 0; }
.settingsCard { margin-top: 0; }
.settingsCardHead { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.gc-wordmark { height:20px; width:auto; }
.btn-gc-connect { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; padding:8px 16px; border-radius:var(--radius); background:var(--gc-connect-bg); color:#fff; font-weight:500; font-size:16px; height:44px; box-sizing:border-box; }
.btn-gc-connect:hover { background:var(--gc-connect-hover); }
.settingsOrgHead { display: flex; align-items: flex-start; gap: 16px; }
.settingsOrgLogo { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.logoPreviewCircle.has-logo { background: var(--avatar); }
.logoPreviewCircle.no-logo { background: transparent; border: 2px dashed var(--border); }
.logoPreviewCircle.no-logo:hover { border-color: var(--text-secondary); }
.settingsRightCol { display: flex; flex-direction: column; gap: 12px; }
.gcBadge { background:var(--gc-badge-bg); color:var(--gc-badge-text); padding:1px 6px; border-radius:var(--radius-badge); font-size:11px; }

/* ── Panel Header (standard bar: count + optional filters + optional actions) ── */
.panelHeader { display:flex; align-items:flex-end; gap:10px; padding:36px 16px 12px 16px; border-bottom:1px solid var(--border); }
.panelHeader__count { font-weight:700; font-size:18px; margin:0; white-space:nowrap; }
.panelHeader__spacer { flex:1; }
.panelHeader__filter { display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--text-secondary); cursor:pointer; user-select:none; }
.panelHeader__filter input[type="checkbox"] { margin:0; width:auto; height:auto; padding:0; }

.orgName { font-size:14px; font-weight:700; color:var(--text); }

.accountHead { margin-bottom: 10px; }
.avatarPreviewCircle.has-avatar { background: var(--avatar); }
.avatarPreviewCircle.no-avatar { background: transparent; border: 2px dashed var(--border); }
.avatarPreviewCircle.no-avatar:hover { border-color: var(--text-secondary); }


.profileCard { display:grid; grid-template-columns: 320px 1fr; gap:24px; align-items:center; }
.profileAvatarLarge { width:312px; height:312px; border-radius:var(--radius-pill); background:var(--avatar); color:#fff; display:flex; align-items:center; justify-content:center; font-size:100px; font-weight:800; }
.profileStats { margin-top:18px; display:grid; grid-template-columns: repeat(2, minmax(130px, 1fr)); gap:24px; }
.profileStat { text-align:center; }
.profileStatValue { font-size:36px; font-weight:700; line-height:1; margin-bottom:6px; font-variant-numeric: tabular-nums; }

/* ── Context Menu (shared template — matches avatar menu) ── */
.contextMenu { position:absolute; right:0; top:calc(100% + 4px); background:#fff; border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-menu); padding:8px; z-index:20; }
.contextMenu .menuItem, .contextMenu button { width:100%; text-align:left; background:#fff; color:var(--card-fg); border:0; padding:8px; border-radius:var(--radius); font-size:16px; font-weight:500; height:40px; display:flex; align-items:center; gap:10px; box-sizing:border-box; cursor:pointer; white-space:nowrap; margin:0; }
.contextMenu .menuItem:hover, .contextMenu button:hover { background:var(--bg-hover); }
.contextMenu .menuItem .material-symbols-outlined, .contextMenu button .material-symbols-outlined { font-size:20px; color:var(--text-secondary); }
.contextMenu .menuItem.danger, .contextMenu button.danger { color:var(--destructive); }
.contextMenu .menuItem.danger .material-symbols-outlined, .contextMenu button.danger .material-symbols-outlined { color:var(--destructive); }

/* ── Context Menu: radio filter pattern ── */
.contextMenu__section { padding:8px 8px 4px; font-size:11px; font-weight:600; color:var(--text-secondary); letter-spacing:0.5px; text-transform:uppercase; }
.contextMenu__divider { height:1px; background:var(--border); margin:4px 0; }
.contextMenu__dot { width:16px; height:16px; border-radius:50%; border:1.5px solid var(--border-dark); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.contextMenu__radio.selected .contextMenu__dot { border-color:var(--primary); }
.contextMenu__dot::after { content:''; width:8px; height:8px; border-radius:50%; background:transparent; }
.contextMenu__radio.selected .contextMenu__dot::after { background:var(--primary); }
.contextMenu__clearAll { color:var(--text-secondary) !important; }
.contextMenu__clearAll:hover { color:var(--card-fg) !important; }

/* ── Filter button active state (shared across all filter buttons) ── */
.subscriptionFilterBtn.active, .paymentsFilterBtn.active, .bankImportFilterBtn.active, .invoiceFilterBtn.active { background:var(--muted-bg); border-color:var(--muted-bg); color:var(--text); }
.subscriptionFilterBtn.active:hover, .paymentsFilterBtn.active:hover, .bankImportFilterBtn.active:hover, .invoiceFilterBtn.active:hover { background:var(--muted-bg-hover); }

.notifMenuWrap { position: relative; }
.notifMenu { position:absolute; right:0; top:calc(100% + 4px); background:#fff; border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-menu); padding:8px; z-index:20; }
.notifMenu button { white-space:nowrap; width:100%; text-align:left; background:#fff; border:0; padding:8px; border-radius:var(--radius); font-size:16px; font-weight:500; height:40px; display:flex; align-items:center; gap:10px; box-sizing:border-box; cursor:pointer; color:var(--card-fg); }
.notifMenu button:hover { background:var(--bg-hover); }
.notifMenu button.danger { color:var(--destructive); }


.checklist { display: grid; gap: 8px; margin-top: 12px; grid-template-columns: repeat(2, minmax(220px, 1fr)); }
.checkItem { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius); }
.checkItem.done { background: var(--muted-bg); color: var(--success); }
.checkItem input { margin: 0; }

.detailBox { margin-top: 8px; padding: 16px; background:var(--bg-hover); border:1px solid var(--border); border-radius:var(--radius); font-size:13px; display:grid; gap:4px; }

/* ── Detail Page Layout ─────────────────────────────────────── */
.detailPage__header { display: flex; align-items: center; gap: 16px; }
.detailPage__back { width: 64px; height: 64px; border-radius: var(--radius); background: var(--back-btn-bg); border: none; color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; text-decoration: none; padding: 0; }
.detailPage__back:hover { background: var(--back-btn-bg-hover); }
.detailPage__back .material-symbols-outlined { font-size: 32px; }
.detailPage__icon { width: 64px; height: 64px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.detailPage__icon .material-symbols-outlined { font-size: 32px; }
.detailPage__headerText { flex: 1; min-width: 0; }
.detailPage__title { font-size: 36px; font-weight: 600; color: var(--text); line-height: 43.2px; margin: 0; }
.detailPage__breadcrumbs { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }
.detailPage__breadcrumbs a { color: var(--text-secondary); text-decoration: none; }
.detailPage__breadcrumbs a:hover { color: var(--text); }
.detailPage__breadcrumbs .crumbSep { margin: 0 8px; color: var(--text-muted); }
.detailPage__headerActions { display: flex; align-items: center; gap: 8px; margin-left: auto; position: relative; }
.detailPage__preBody { margin-top: 20px; }

.detailPage__body { display: grid; grid-template-columns: 1fr 340px; gap: 24px; margin-top: 20px; }
.detailPage__body--hasTabs { grid-template-rows: auto 1fr; row-gap: 16px; }
.detailPage__body--hasTabs > .detailPage__preBodyGrid { grid-column: 1 / 2; grid-row: 1 / 2; margin: 0; min-width: 0; }
.detailPage__body--hasTabs > .detailPage__main { grid-column: 1 / 2; grid-row: 2 / 3; }
.detailPage__body--hasTabs > .detailPage__sidebar { grid-column: 2 / 3; grid-row: 2 / 3; }
.detailPage__main { min-width: 0; }
.detailPage__sidebar { display: flex; flex-direction: column; gap: 16px; }

.detailCard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.detailCard__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; position: relative; }
.detailCard__title { font-size: 20px; font-weight: 600; color: var(--text); margin: 0; }
.detailCard__fields { display: grid; gap: 16px; }
.detailCard__label { font-size: 13px; color: var(--text-secondary); margin-bottom: 2px; }
.detailCard__value { font-size: 14px; color: var(--text); font-weight: 500; }
.detailCard__link { color: var(--text); text-decoration: underline; text-decoration-color: var(--border); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-color 0.15s; }
.detailCard__link:hover { text-decoration-color: var(--text); }
.detailCard__link:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: var(--radius-badge); }
.preview { white-space: pre-wrap; background:var(--text); color:var(--border); border-radius:var(--radius); padding:12px; min-height:110px; font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace; font-size: 13px; }
.mono { font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace; font-size: 13px; }
.muted { color:var(--text-muted); }

.badge { display: inline-flex; align-items: center; border-radius: var(--radius-badge); padding: 1px 12px; font-size: 11px; font-weight: 500; }
.badge.good { background: var(--success-alpha); color: var(--success); border: 1px solid var(--success); }
.badge.warn { background: var(--alert-alpha); color: var(--alert); border: 1px solid var(--alert); }
.badge.risk { background: var(--destructive-alpha); color: var(--destructive); border: 1px solid var(--destructive); }
.badge.neutral { background: var(--bg-hover); color: var(--text-secondary); border: 1px solid var(--border); }

table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { color: var(--text-secondary); font-weight: 600; font-size: 13px; background: var(--surface); }
table { background: #fff; }
tbody tr { background: #fff; }
tr.clickableRow { cursor: pointer; }
tr.clickableRow:hover { background: var(--surface); }
tr.clickableRow:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
div.clickableRow:hover { background: var(--surface); }
div.clickableRow:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }

/* ── Cash Flow Runway ─────────────────────────────────────────── */
.runway-hero { padding: 32px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; transition: color 300ms, border-color 300ms; }
.runway-status-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.runway-status-value { font-size: 36px; font-weight: 600; line-height: 1.2; margin-bottom: 4px; }
.runway-status-detail { font-size: 16px; color: var(--text-secondary); font-weight: 500; }
.runway-confidence { font-size: 14px; color: var(--text-muted); margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.runway-hero.safe .runway-status-value { color: var(--success); }
.runway-hero.at-risk .runway-status-value { color: var(--alert); }
.runway-hero.danger .runway-status-value { color: var(--destructive); }

.runway-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.runway-metric { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px; }
.runway-metric dt { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.runway-metric dd { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; margin: 0; }
.runway-metric-sub { font-size: 14px; color: var(--text-muted); margin-top: 2px; }

.runway-timeline { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px; margin-bottom: 16px; }
.runway-timeline-bars { display: flex; gap: 3px; align-items: flex-end; height: 80px; }
.runway-timeline-bar { flex: 1; background: var(--muted-bg); border-radius: var(--radius-badge) var(--radius-badge) 0 0; min-height: 4px; }
.runway-timeline-bar.negative { background: var(--destructive-bg); border: 1px solid var(--destructive); border-bottom: none; }
.runway-timeline-labels { display: flex; gap: 3px; margin-top: 6px; }
.runway-timeline-labels span { flex: 1; font-size: 11px; color: var(--text-muted); text-align: center; }

.stale-balance-warning { background: var(--alert-bg); border: 1px solid var(--alert); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14px; color: var(--text); margin-bottom: 16px; }

.action-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.action-card:hover { background: var(--bg-hover); }
.action-card--empty { border-style: dashed; justify-content: center; color: var(--text-muted); padding: 24px; font-size: 14px; }
.action-card--empty:hover { background: none; }
.action-text { font-size: 14px; font-weight: 500; }
.action-amount { color: var(--destructive); font-weight: 600; font-variant-numeric: tabular-nums; }
.action-btn { background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.action-btn:hover { background: var(--bg-hover); border-color: var(--border-dark); }

.overview-skeleton { }
.skeleton-block { background: var(--surface); border-radius: var(--radius); }
.overview-dimmed { opacity: 0.5; pointer-events: none; transition: opacity 200ms; }

.commitments-freq-col { }
@media (max-width: 600px) {
  .runway-metrics { grid-template-columns: 1fr; }
  .commitments-freq-col { display: none; }
  .stale-balance-warning { order: -1; }
  .runway-timeline-bars { height: 60px; }
}


.toast { position: fixed; right: 12px; bottom: 12px; background: var(--tertiary); color: #fff; padding: 12px 16px; border-radius: var(--radius); opacity: 0; transform: translateY(8px); transition: all .15s ease-out; max-width: 360px; font-size: 14px; z-index: 1100; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.err { background: var(--destructive); color: #fff; }

.modal {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1090;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease-in;
}
.modal.open {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 150ms ease-out;
}

.modalCard {
  width: min(680px, 96vw);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-menu);
  transform: scale(0.96);
  opacity: 0;
  transition: transform 150ms ease-in, opacity 150ms ease-in;
}
.modal.open .modalCard {
  transform: scale(1);
  opacity: 1;
  transition: transform 200ms ease-out, opacity 200ms ease-out;
}
.modalCard--sm { width: auto; max-width: 400px; }
.modalCard--md { width: auto; max-width: 520px; }
.modalCard--lg { width: min(680px, 96vw); }

.modalClose {
  background: var(--border);
  color: var(--text);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.modalClose:hover { background: var(--border-dark); }
.modalClose .material-symbols-outlined { font-size: 20px; }


/* ── Page Title (matches Bubble) ───────────────────────────── */
.pageTitle { font-size: 36px; font-weight: 600; line-height: 43.2px; margin: 0 0 24px; }

/* ── Search Bar (matches Bubble) ──────────────────────────── */
.searchBar { display: flex; gap: 0; }
.searchBar input { flex: 1; border-radius: var(--radius) 0 0 var(--radius); border-right: 0; height: 44px; padding: 0 32px; font-size: 16px; }
.searchBar button { border-radius: 0 var(--radius) var(--radius) 0; padding: 8px 14px; background: #fff; color: var(--text-secondary); border: 1px solid var(--border-light); border-left: 0; height: 44px; }
.searchBar button:hover { background: var(--bg-hover); color: var(--text); }

/* ── Member Row (matches Bubble) ──────────────────────────── */
/* ── Table Avatars ───────────────────────────────────────── */
.tableAvatar { width: 40px; height: 40px; border-radius: var(--radius-pill); background: var(--avatar); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex-shrink: 0; overflow: hidden; }
.tableAvatar img { width: 100%; height: 100%; object-fit: cover; }
td.avatarCell { width: 44px; padding-right: 0; }

/* ── Entity Row ──────────────────────────────────────────── */
.entityRow__visual { width: 40px; padding-right: 0; vertical-align: middle; }
.entityRow__content { vertical-align: middle; padding-left: 12px; }
.entityRow__title { font-size: 16px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entityRow__subtitle { font-size: 14px; font-weight: 500; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entityRow__badge { text-align: right; white-space: nowrap; vertical-align: middle; padding-right: 0; }
.entityRow__actions { width: 32px; text-align: right; vertical-align: middle; padding-left: 12px; }

.entityIcon { width: 40px; height: 40px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.entityIcon .material-symbols-outlined { font-size: 20px; }
.entityIcon--plan { background: var(--entity-plan); }
.entityIcon--duty { background: var(--entity-duty); }
.entityIcon--commitment { background: var(--entity-commitment); }
.entityIcon--org { background: var(--entity-org); }
.entityIcon--period { background: var(--entity-period); }
.entityIcon--card { background: var(--entity-card); }
.entityIcon--payment { background: var(--entity-payment); }
.entityIcon--invoice { background: var(--entity-invoice); }
.entityIcon--subscription { background: var(--entity-subscription); }
.entityIcon--member { background: var(--entity-member); }
.entityIcon--sm { width: 23px; height: 23px; border-radius: var(--radius-sm); }
.entityIcon--sm .material-symbols-outlined { font-size: 14px; }

/* ── Timeline (shared: admin role history, community role history) ── */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timelineEntry { position: relative; padding: 8px 0; }
.timelineEntry::before { content: ''; position: absolute; left: -20px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--border); border: 2px solid var(--bg); }
.timelineEntry--current::before { background: var(--primary); }
.timelineEntry__name { font-size: 14px; font-weight: 500; color: var(--text); }
.timelineEntry__dates { font-size: 13px; color: var(--text-muted); }

/* ── Data Table Visual Cells ────────────────────────────── */
th.dataIcon, td.dataIcon { width: 23px; padding-right: 0; vertical-align: middle; }
td.memberCell { vertical-align: middle; }
td.memberCell .memberCellInner { display: flex; align-items: center; gap: 12px; }
td.memberCell .tableAvatar { width: 23px; height: 23px; font-size: 11px; flex-shrink: 0; }
td.memberCell .tableAvatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── Table Header Count Cell (shared by entity + data tables) ── */
thead th.panelHeader__countCell { font-weight: 700; font-size: 18px; color: var(--text); padding: 36px 16px 12px 16px; vertical-align: bottom; white-space: nowrap; }

/* ── Data Table Compact Rows ────────────────────────────── */
table.dataTable { table-layout: fixed; }
table.dataTable th, table.dataTable td { padding: 8px 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.dataTable tbody td { height: 48px; box-sizing: border-box; }
table.dataTable th.dataIcon, table.dataTable td.dataIcon { padding: 8px 0 8px 16px; width: 47px; overflow: visible; }
table.dataTable td.dataIcon + td { padding-left: 12px; }
table.dataTable thead th { padding: 36px 16px 12px 16px; vertical-align: bottom; }
table.dataTable thead th.dataIcon { padding: 36px 0 12px 16px; }

/* ── Empty State (matches Bubble) ─────────────────────────── */
tbody tr:has(.emptyState) { background: var(--surface); }
.emptyState { text-align: center; padding: 48px 24px; }
.emptyState .emptyIcon { width: 48px; height: 48px; margin: 0 auto 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 20px; }
.emptyState .emptyTitle { font-weight: 600; color: var(--text); margin: 0 0 4px; }
.emptyState .emptyDesc { color: var(--text-muted); font-size: 14px; margin: 0 0 16px; }

/* ── "..." More Button ───────────────────── */
.moreBtn { background: var(--border); color: var(--text); border: none; border-radius: 50%; width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.moreBtn:hover { background: var(--border-dark); }
.moreBtn .material-symbols-outlined { font-size: 22px; font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20; }

@media (max-width: 900px) {
  header { left: 0; position: static; min-height: 56px; }
  /* On mobile the header becomes static, so .topHeaderLabel (position:absolute)
     would escape to <body> and overlap main content. The page title already
     names the context, so the header label is redundant here. */
  .topHeaderLabel { display: none; }
  .sideNav { position: static; width: auto; top: auto; bottom: auto; border-right: 0; height: auto; display: block; }
  .sideNavLinks { padding-bottom: 0; height: auto; }
  .sideNavBottom { position: static; left: auto; right: auto; bottom: auto; }
  .sideNavSettings { position: static; width: 100% !important; max-width: none; }
  body main { margin-left: 0; width: 100%; padding-top: 24px; display: block; }
  .cards { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .grid { grid-template-columns: 1fr; }
  .actions.between { display: grid; gap: 6px; }
  .modalCard > .actions.between { display: flex; }
  .checklist { grid-template-columns: 1fr; }
  /* Touch-friendly buttons on mobile */
  button, .secondary, [type="button"] { min-height: 44px; }
  .settingsNavGrid { grid-template-columns: 1fr; }
  .profileCard { grid-template-columns: 1fr; }
  .profileAvatarLarge { width:180px; height:180px; font-size:48px; margin:0 auto; }
  .sandboxToolbar { padding: 0 12px; gap: 8px; height: 40px; bottom: 12px; left: 50%; max-width: calc(100vw - 16px); }
  .sandboxToolbar__title { display: none; }
  .sandboxToolbar__distance { display: none; }
  .sandboxToolbar__date { font-size: 13px; }
  .sandboxToolbar__hint--active { display: none; }
  .sandboxToolbar__ghost--sm { font-size: 12px; padding: 4px 8px; }
  #sandboxAdvance12 { display: none; }
  .sandboxSettingsPopover { width: min(280px, 90vw); right: -8px; }
  .sandboxScenarioPicker { width: min(280px, 90vw); }
  body.sandbox-active main { padding-bottom: 60px; }
  .detailPage__body { grid-template-columns: 1fr; }
  .detailPage__sidebar { order: -1; }
  /* The --hasTabs variant pins children to specific grid columns/rows for
     the 2-col desktop layout. Reset those pins on mobile so everything
     flows into the single column, sidebar-first. */
  .detailPage__body--hasTabs > .detailPage__preBodyGrid,
  .detailPage__body--hasTabs > .detailPage__main,
  .detailPage__body--hasTabs > .detailPage__sidebar { grid-column: 1 / 2; grid-row: auto; }
  .detailPage__title { font-size: 24px; line-height: 33.6px; }
  .detailPage__icon { width: 44px; height: 44px; }
  .detailPage__icon .material-symbols-outlined { font-size: 20px; }
  .detailPage__back { width: 36px; height: 36px; }
  .detailPage__back .material-symbols-outlined { font-size: 18px; }
  .detailPage__header { gap: 12px; }
  .detailPage__navbar { margin-bottom: 16px; }
  th, td { padding: 8px 8px; }
}

/* ── Sandbox Mode ──────────────────────────────────────────── */

.sandboxBanner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: var(--sandbox-surface);
  color: var(--sandbox-text);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  letter-spacing: 0.5px;
}

/* When sandbox banner is visible, push everything down */
body.sandbox-active header { top: 32px; }
body.sandbox-active .sideNav { top: 32px; height: calc(100vh - 32px); }
body.sandbox-active main { padding-bottom: 96px; } /* floating pill + gap */
body.sandbox-active .toast { bottom: 96px; }

/* Toolbar: floating pill */
.sandboxToolbar {
  position: fixed;
  bottom: 32px;
  left: calc(50% + 130px);
  transform: translateX(-50%);
  background: var(--sandbox-surface);
  border: 1px solid var(--sandbox-border);
  border-radius: var(--radius-pill);
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.16), 0 3px 8px rgba(0,0,0,0.08);
  z-index: 100;
}

.sandboxToolbar__title {
  font-size: 11px;
  font-weight: 600;
  color: var(--sandbox-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.sandboxToolbar__sep {
  width: 2px;
  height: 20px;
  background: var(--sandbox-border);
  flex-shrink: 0;
}

/* Ghost pill button — all interactive elements */
.sandboxToolbar__ghost {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--sandbox-text);
  padding: 0 12px;
  height: 30px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sandboxToolbar__ghost:hover { background: var(--sandbox-hover-bg); }
.sandboxToolbar__ghost--sm { font-size: 13px; padding: 0 10px; }
.sandboxToolbar__ghost--icon { font-size: 22px; padding: 0 8px; line-height: 1; }
.sandboxToolbar__ghost:disabled { opacity: 0.4; cursor: not-allowed; }
.sandboxToolbar__ghost:disabled:hover { background: transparent; }

.sandboxToolbar__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.sandboxToolbar__date {
  font-size: 14px;
  font-weight: 600;
  color: var(--sandbox-text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: opacity 150ms ease-out;
}
.sandboxToolbar__date--empty { font-size: 13px; font-weight: 500; opacity: 0.6; }
.sandboxToolbar__date--fading { opacity: 0.5; }

.sandboxToolbar__distance {
  font-size: 13px;
  font-weight: 500;
  color: var(--sandbox-text);
  opacity: 0.55;
  white-space: nowrap;
}

.sandboxToolbar__advanceBtns {
  display: flex;
  gap: 4px;
}

.sandboxToolbar__scenarioWrap { position: relative; }

.sandboxToolbar__hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--sandbox-text);
  display: none;
}
.sandboxToolbar__hint--active { display: inline; }

.sandboxToolbar__settingsWrap {
  position: relative;
}

/* Scenario picker popover */
.sandboxScenarioPicker {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: 280px;
  background: var(--sandbox-surface);
  border: 1px solid var(--sandbox-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-menu);
  padding: 16px;
  z-index: 1050;
}
.sandboxScenarioPicker__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--sandbox-text);
  margin-bottom: 12px;
}
.sandboxScenarioPicker__card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  margin-bottom: 8px;
}
.sandboxScenarioPicker__card:last-child { margin-bottom: 0; }
.sandboxScenarioPicker__card:hover { background: var(--bg-hover); }
.sandboxScenarioPicker__card--selected { border-color: var(--sandbox-text); background: #fff; }
.sandboxScenarioPicker__card--selected .sandboxScenarioPicker__cardName { color: var(--sandbox-text); }
.sandboxScenarioPicker__cardName { font-size: 14px; font-weight: 600; color: var(--text); }
.sandboxScenarioPicker__cardDesc {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Settings popover (matches avatar menu pattern) */
.sandboxSettingsPopover {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: var(--sandbox-surface);
  border: 1px solid var(--sandbox-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-menu);
  padding: 16px;
  z-index: 1050;
}
.sandboxSettingsPopover__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--sandbox-text);
  margin-bottom: 12px;
}
.sandboxSettingsPopover .sandboxSettingsPopover__btn {
  width: 100%;
  background: #fff;
}
.sandboxSettingsPopover__btn + .sandboxSettingsPopover__btn {
  margin-top: 8px;
}

.btn--sm { height: 44px; padding: 0 14px; font-size: 14px; font-weight: 500; border-radius: var(--radius); cursor: pointer; border: none; }
.btn--xs { height: 32px; padding: 0 12px; font-size: 12px; font-weight: 500; border-radius: var(--radius-sm); cursor: pointer; border: none; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); }
.btn--primary:disabled { background: var(--border); color: var(--text-secondary); cursor: not-allowed; }
.btn--secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn--secondary:hover { background: var(--bg-hover); }
.btn--danger-outline { background: transparent; color: var(--destructive); border: 1px solid var(--destructive-alpha); }
.btn--danger-outline:hover { background: var(--destructive-bg); }

/* Sandbox walkthrough tooltip */
/* Spinner for advancing */
.btn--loading { pointer-events: none; opacity: 0.7; }
.btn--loading::after {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 6px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
