/* Colour tokens are defined in src/theme-*.css — link the chosen theme in index.html */

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#app { display: flex; height: 100vh; overflow: hidden; }

#app.boot-splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg-base);
  -webkit-app-region: drag;
}

#app.boot-splash > .sidebar,
#app.boot-splash > .main-content {
  display: none;
}

#app.boot-splash::before {
  content: "";
  width: 76px;
  height: 76px;
  border-radius: 16px;
  background: url("../assets/icon.png") center / contain no-repeat;
}

#app.boot-splash::after {
  content: "Enamio";
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
}

[data-theme="dark"] #app.boot-splash::before {
  box-shadow: 0 16px 40px rgba(0,0,0,0.34);
}

/* ── AUTH / LOCK SCREEN ── */
.auth-app {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  min-height: 100dvh;
  padding: 28px;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 35px,
      color-mix(in srgb, var(--border) 36%, transparent) 36px
    ),
    var(--bg-base);
  -webkit-app-region: drag;
}

.auth-window {
  width: min(430px, 100%);
  min-height: 0;
  display: block;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  -webkit-app-region: no-drag;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.auth-brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent);
}

.auth-brand span {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.auth-panel {
  padding: 30px 38px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-header {
  margin-bottom: 26px;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.16;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.auth-subtitle {
  max-width: 330px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.auth-form {
  max-width: 340px;
}

.auth-error {
  color: var(--red);
  font-size: 12px;
  min-height: 18px;
  margin-bottom: 14px;
}

.auth-notice {
  margin: -12px 0 16px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.auth-notice-success {
  border-color: color-mix(in srgb, var(--green) 32%, var(--border));
  background: color-mix(in srgb, var(--green) 8%, var(--bg-elevated));
  color: var(--text-primary);
}

.auth-account-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-base);
  font-size: 12px;
}

.auth-account-row span {
  color: var(--text-muted);
}

.auth-account-row strong {
  min-width: 0;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
  text-align: right;
}

.web-plan-list {
  display: grid;
  gap: 8px;
}

.web-plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-base);
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s, transform 0.14s;
}

.web-plan:hover,
.web-plan:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, var(--bg-base));
  outline: none;
}

.web-plan-selected {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-base));
}

.web-plan strong,
.web-plan small {
  display: block;
}

.web-plan strong {
  font-size: 13px;
  font-weight: 750;
}

.web-plan small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.35;
}

.web-plan-price {
  text-align: right;
  white-space: nowrap;
}

.web-plan-price b {
  display: block;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--accent);
}

.web-plan-price small {
  margin-top: 1px;
}

.auth-actions-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.auth-actions-row .btn {
  flex: 1;
  justify-content: center;
}

.auth-secondary-panel {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  color: var(--text-secondary);
  font-size: 12px;
}

.auth-secondary-panel summary {
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.auth-submit {
  width: 100%;
  height: 42px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  justify-content: center;
}

.auth-pin-input {
  text-align: center;
  font-size: 22px;
  letter-spacing: 8px;
  font-family: var(--font-mono);
  height: 54px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.auth-pin-input:focus,
.auth-pin-input:focus-visible {
  border-color: var(--border-bright);
  outline: none;
  box-shadow: none;
}

@media (max-width: 720px) {
  .auth-app {
    height: 100dvh;
    padding: max(18px, env(safe-area-inset-top, 0px)) 18px max(18px, env(safe-area-inset-bottom, 0px));
  }

  .auth-window {
    width: min(420px, 100%);
    transform: translateY(clamp(-56px, -6dvh, -28px));
  }

  .auth-panel {
    padding: 34px 32px 30px;
  }

  .auth-actions-row {
    flex-direction: column;
  }

  .auth-actions-row .btn {
    width: 100%;
  }
}

/* ── SIDEBAR ── */
.sidebar {
  width: 224px;
  min-width: 224px;
  background: var(--bg-base);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding-top: 30px;
  -webkit-app-region: drag; /* entire sidebar is draggable */
}

/* Interactive elements inside the sidebar must opt out of drag */
.sidebar button, .sidebar a, .sidebar select, .sidebar input {
  -webkit-app-region: no-drag;
}

.sidebar-header {
  padding: 12px 18px 14px;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.logo-icon,
.logo-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.logo-icon {
  object-fit: contain;
  border-radius: 6px;
  transform: none;
  clip-path: inset(0 round 6px);
}

.logo-mark {
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  font-weight: 300;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: none;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.logo-beta {
  display: none;
}

.logo-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: none;
  font-family: var(--font-body);
  padding-left: 36px;
}

.dentist-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin: 0;
  padding: 11px 18px 12px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}

.dentist-card::before {
  content: 'Dentist';
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
}

.dentist-avatar {
  display: none;
}

.dentist-info {
  min-width: 0;
  width: 100%;
}

.dentist-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 650;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dentist-abn {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav {
  flex: 1;
  padding: 4px 0;
  overflow-y: auto;
}

.nav-section-header {
  padding: 10px 18px 4px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-muted);
  text-transform: none;
  user-select: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin: 0;
  padding: 7px 18px;
  background: none;
  border: none;
  border-radius: 0;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  text-align: left;
  position: relative;
}

.nav-item:hover {
  background: transparent;
  color: var(--text-primary);
}

.nav-item.active {
  color: var(--text-primary);
  font-weight: 600;
  background: transparent;
  box-shadow: none;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  width: 4px;
  height: 4px;
  transform: translateY(-50%);
  background: var(--text-primary);
  border-radius: 50%;
}
.nav-icon { font-size: 15px; width: 18px; text-align: center; line-height: 1; color: var(--text-muted); }
.nav-item.active .nav-icon { color: var(--text-secondary); }
.web-only {
  display: none !important;
}
.web-platform .web-only.nav-item {
  display: flex !important;
}

.mobile-more-tab,
.mobile-more-menu {
  display: none;
}

.mobile-more-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 21px;
}

.mobile-more-ellipsis span {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.sidebar-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}

.sidebar-fy-selector {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sidebar-fy-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.sidebar-fy-select {
  width: 100%;
  appearance: none;
  background: var(--bg-hover);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%239ba3bf' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 28px 6px 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  outline: none;
  transition: border-color 0.14s;
}
.sidebar-fy-select:focus { border-color: var(--accent); }

.sidebar-actions {
  padding: 4px 0 8px;
}

.feedback-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin: 0;
  padding: 7px 18px;
  background: none;
  border: none;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.feedback-btn:hover {
  background: transparent;
  border-color: transparent;
  color: var(--text-primary);
}

/* ── MAIN ── */
.main-content { flex: 1; overflow-y: auto; background: var(--bg-base); }
#viewContainer { min-height: 100%; }
.mobile-fy-bar { display: none; }
.mobile-action-dock { display: none; }
.dashboard-inline-fy { display: none; }

/* ── PAGE HEADER ── */
.page-header {
  padding: 28px 36px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-base);
  z-index: 20;
}

.page-title { font-family: var(--font-display); font-size: 27px; font-weight: 800; letter-spacing: -0.5px; color: var(--text-primary); }
.page-blurb { font-size: 13px; color: var(--text-secondary); margin-top: 4px; line-height: 1.45; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }

/* ── BUTTONS ── */
button { cursor: pointer; font-family: var(--font-body); }
button:focus-visible,
.form-control:focus-visible,
.sidebar-fy-select:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 52%, transparent);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  border: none;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dim); }
.btn-secondary { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border-bright); }
.btn-secondary:hover { background: var(--bg-hover); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: var(--red-dim); }
.btn-danger-subtle { background: color-mix(in srgb, var(--red) 8%, transparent); color: var(--red); border: 1px solid color-mix(in srgb, var(--red) 20%, transparent); }
.btn-danger-subtle:hover { background: color-mix(in srgb, var(--red) 12%, transparent); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.btn-ghost { background: none; border: none; color: var(--text-secondary); padding: 4px 8px; font-size: 12px; }
.btn-ghost:hover { color: var(--accent); }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-active { background: var(--accent-glow); border: 1px solid var(--accent-border, var(--accent)); color: var(--accent-dim); }
.btn-icon { padding: 5px 7px; border-radius: 6px; background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text-secondary); font-size: 13px; }
.btn-icon:hover { color: var(--text-primary); border-color: var(--border-bright); }

/* ── CONTENT BODY ── */
.content-body { padding: 24px 36px; }

/* ── HELP ── */
.help-body {
  padding-bottom: 42px;
}
.help-disclaimer {
  margin-bottom: 18px;
  line-height: 1.55;
}
.help-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.help-jump-card {
  position: sticky;
  top: 116px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  padding: 14px;
}
.help-jump-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.help-jump-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.help-jump-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12px;
  line-height: 1.25;
  padding: 7px 8px;
  border-radius: 6px;
}
.help-jump-list a:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.help-jump-list i {
  width: 15px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}
.help-jump-list a:hover i {
  color: var(--accent);
}
.help-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.help-section {
  scroll-margin-top: 110px;
  margin-bottom: 0;
}
.help-section-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.help-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  font-size: 15px;
  flex-shrink: 0;
}
.help-section-body {
  padding: 16px 20px 18px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}
.help-section-body p {
  margin-bottom: 12px;
}
.help-section-body p:last-child {
  margin-bottom: 0;
}
.help-section-body ul {
  margin: 0;
  padding-left: 18px;
}
.help-section-body li + li {
  margin-top: 7px;
}
.help-section-body strong {
  color: var(--text-primary);
}
.help-reference-card {
  margin-top: 4px;
}
.help-reference-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.install-body {
  padding-bottom: 42px;
}
.install-note {
  margin-bottom: 18px;
  line-height: 1.55;
}
.inline-link {
  display: inline;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.inline-link:hover {
  color: var(--accent-dim);
  text-decoration: underline;
}
.install-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.install-option-card {
  margin-bottom: 0;
}
.install-card-kicker {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.install-card-body {
  padding: 16px 20px 18px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}
.install-card-body ol {
  margin: 0;
  padding-left: 20px;
}
.install-card-body li + li {
  margin-top: 7px;
}
.install-card-body p {
  margin-top: 12px;
  margin-bottom: 0;
}
.install-card-body strong,
.install-help-card strong {
  color: var(--text-primary);
}
.install-help-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 18px 20px;
}
.install-help-card p {
  margin: 7px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 920px) {
  .help-layout {
    grid-template-columns: 1fr;
  }
  .help-jump-card {
    position: static;
  }
  .help-jump-list {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .install-options-grid {
    grid-template-columns: 1fr;
  }
  .install-help-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ── STATS GRID ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  padding: 20px 36px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  position: relative;
}
.stat-card:has(.stat-value.accent) {
  border-color: var(--accent-border, var(--border));
  background: color-mix(in srgb, var(--accent) 4%, var(--bg-surface));
}

.stat-label { font-size: 11px; letter-spacing: 0; text-transform: none; color: var(--text-muted); font-family: var(--font-body); margin-bottom: 7px; }
.stat-value { font-family: var(--font-mono); font-size: 23px; font-weight: 600; letter-spacing: 0; line-height: 1.05; margin-bottom: 5px; }
.stat-value.green,
.stat-value.money-income  { color: var(--money-income); }
.stat-value.red,
.stat-value.money-expense { color: var(--money-expense); }
.stat-value.yellow,
.stat-value.money-gst-collected,
.stat-value.money-warning { color: var(--money-gst-collected); }
.stat-value.accent,
.stat-value.money-gst-credit { color: var(--money-gst-credit); }
.stat-value.chart-accent { color: var(--chart-accent, var(--accent)); }
.stat-value.neutral,
.stat-value.money-neutral { color: var(--money-neutral); }
.stat-sub { font-size: 11px; color: var(--text-muted); }

.stat-info-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid var(--text-muted);
  color: var(--text-muted);
  font-size: 9px;
  font-style: italic;
  font-family: Georgia, serif;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  z-index: 10;
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity 0.15s;
}
.stat-info-icon:hover { opacity: 1; }
.stat-tooltip { display: none; }
.stat-tooltip-fixed {
  position: fixed;
  display: none;
  width: 220px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 12.5px;
  font-style: normal;
  font-family: var(--font-body, sans-serif);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.55;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  z-index: 9999;
  white-space: normal;
  pointer-events: none;
}

/* ── CARD ── */
.card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }

.chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 22px 12px;
  margin: 0 36px;
  box-shadow: none;
}
.chart-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.chart-card-title { font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--text-secondary); }
.chart-legend { display: flex; gap: 8px; align-items: center; }
.chart-legend-item {
  display: flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--border) 86%, var(--accent));
  border-radius: 999px;
  background: rgba(255,255,255,0.62);
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.dashboard-chart-svg text { user-select: none; }
.chart-bottom-cards { display: flex; align-items: center; gap: 0; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.chart-stat { flex: 1; padding: 0 20px; }
.chart-stat:first-child { padding-left: 4px; }
.chart-stat-divider { width: 1px; height: 40px; background: var(--border); flex-shrink: 0; }
.card-header { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--text-secondary); }
.card-body { padding: 20px; }

/* ── TABLE ── */
.table-wrap { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: var(--bg-elevated);
  padding: 10px 14px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: color-mix(in srgb, var(--accent) 6%, var(--bg-surface)); }
.data-table th.practice-group-header { background: var(--bg-elevated); color: var(--accent); font-size: 11px; letter-spacing: 0; border-bottom: 2px solid var(--accent); padding-bottom: 8px; }
.data-table .mono { font-family: var(--font-mono); font-size: 12px; }
.data-table .muted { color: var(--text-secondary); }
.group-header-row td { background: var(--bg-elevated); border-top: 2px solid var(--border-bright); border-bottom: 1px solid var(--border-bright); padding: 6px 14px; }
.cat-drag-handle { cursor: grab; color: var(--text-muted); font-size: 16px; user-select: none; width: 28px; padding-right: 4px !important; }
.data-table tr.cat-dragging { opacity: 0.4; }
.data-table tr.cat-drag-over > td { background: var(--bg-hover) !important; box-shadow: inset 0 -2px 0 var(--accent); }
.group-header-row:first-child td { border-top: none; }
.group-header-row:hover td { background: var(--bg-elevated) !important; }
.group-header-month { font-size: 11px; font-weight: 700; color: var(--text-secondary); letter-spacing: 0.08em; text-transform: uppercase; margin-right: 12px; }
.group-header-count { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); margin-right: 10px; }
.group-header-total { font-size: 11px; color: var(--accent); font-family: var(--font-mono); font-weight: 600; }
.money-value { font-family: var(--font-mono); }
.money-income { color: var(--money-income); }
.money-expense { color: var(--money-expense); }
.money-gst-collected { color: var(--money-gst-collected); }
.money-gst-credit { color: var(--money-gst-credit); }
.money-neutral { color: var(--money-neutral); }
.money-reference { color: var(--money-reference); }
.money-warning { color: var(--money-warning); }

.col-green { color: var(--money-income); font-family: var(--font-mono); }
.col-red   { color: var(--money-expense); font-family: var(--font-mono); }
.col-yellow{ color: var(--money-gst-collected); font-family: var(--font-mono); }
.col-blue  { color: var(--money-gst-credit); font-family: var(--font-mono); }

/* ── MOBILE RECORD CARDS ── */
.record-card-list {
  display: none;
}

.record-card-group + .record-card-group {
  border-top: 1px solid var(--border);
}

.record-card-group-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 8px;
  color: var(--text-muted);
  font-size: 10.5px;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.record-card-group-head strong {
  color: var(--accent);
  white-space: nowrap;
}

.record-card {
  padding: 13px 14px;
  border-top: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  background: var(--bg-surface);
}

.record-card:first-child,
.record-card-group .record-card:first-of-type {
  border-top: none;
}

.record-card-auto {
  background: color-mix(in srgb, var(--accent) 4%, var(--bg-surface));
}

.record-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.record-card-title-block {
  min-width: 0;
}

.record-card-title {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.record-card-subtitle {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.35;
}

.record-card-amount {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.record-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
}

.record-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 11px;
}

.record-card-field {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  border-radius: 7px;
  background: var(--bg-base);
}

.record-card-field span {
  display: block;
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 10.5px;
  line-height: 1.15;
}

.record-card-field strong {
  display: block;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.record-card-field strong.money-income { color: var(--money-income); }
.record-card-field strong.money-expense { color: var(--money-expense); }
.record-card-field strong.money-gst-collected { color: var(--money-gst-collected); }
.record-card-field strong.money-gst-credit { color: var(--money-gst-credit); }
.record-card-field strong.money-reference { color: var(--money-reference); }
.record-card-field strong.money-warning { color: var(--money-warning); }

.record-card-note {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
  font-style: italic;
  overflow-wrap: anywhere;
}

.record-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 34px;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.record-card-actions .btn-icon {
  width: 34px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
}

.record-card-actions > .btn-icon:first-child {
  justify-self: start;
}

.record-card-lock {
  width: 34px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  color: var(--text-muted);
  font-size: 13px;
}

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-sfa     { background: rgba(124,58,237,0.10);  color: var(--sfa-color); }
.badge-ic      { background: rgba(2,132,199,0.10);   color: var(--ic-color); }
.badge-emp     { background: rgba(16,185,129,0.10);  color: var(--emp-color); }
.badge-income  { background: rgba(79,146,121,0.12);   color: var(--green); }
.badge-expense { background: rgba(220,38,38,0.10);   color: var(--red); }
.badge-gst     { background: rgba(184,121,36,0.10);   color: var(--accent2); }
.badge-gst-free{ background: rgba(90,98,130,0.10);   color: var(--text-secondary); }
.badge-auto    { background: rgba(16,185,129,0.10);  color: var(--emp-color); font-size: 9px; }
button.badge-gst, button.badge-gst-free { border: none; cursor: pointer; }
button.badge-gst:hover     { background: rgba(184,121,36,0.18); }
button.badge-gst-free:hover{ background: rgba(90,98,130,0.20); }
.badge-paid    { background: rgba(79,146,121,0.12);   color: var(--green); }
.badge-due     { background: rgba(184,121,36,0.11);   color: var(--accent2); }
.badge-pending { background: rgba(90,98,130,0.10);   color: var(--text-secondary); }

/* ── FORM ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); font-family: var(--font-mono); margin-bottom: 6px; }
.form-hint  { font-size: 11px; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }

.form-control {
  width: 100%;
  min-width: 0;
  background: var(--bg-base);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.14s;
}
.form-control:focus { border-color: var(--accent); }
.auth-pin-input:focus,
.auth-pin-input:focus-visible {
  border-color: var(--border-bright) !important;
  outline: none !important;
  box-shadow: none !important;
}
.form-control::placeholder { color: var(--text-muted); }

.editable-rate {
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--border);
  padding: 0 0 2px 2px;
  margin: 0;
  outline: none;
  -moz-appearance: textfield;
  appearance: textfield;
  field-sizing: content;
  min-width: 1ch;
  transition: border-color 0.14s, background 0.14s;
  cursor: text;
}
.editable-rate::-webkit-outer-spin-button,
.editable-rate::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.editable-rate:hover { border-bottom-color: var(--border-bright); }
.editable-rate:focus { border-bottom-color: var(--accent); background: var(--bg-base); }
.editable-rate-hint { opacity: 0; transition: opacity 0.14s; }
.editable-rate-group:hover .editable-rate-hint,
.editable-rate-group:focus-within .editable-rate-hint { opacity: 1; }

.input-dollar { position: relative; }
.input-dollar::before { content: '$'; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; pointer-events: none; z-index: 1; }
.input-dollar .form-control { padding-left: 22px; }
.input-percent { position: relative; }
.input-percent::after { content: '%'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; pointer-events: none; }
.input-percent .form-control { padding-right: 28px; font-family: var(--font-mono); text-align: right; }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%239ba3bf' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.form-row > *,
.form-row-3 > * { min-width: 0; }
.form-row-wrap { row-gap: 16px; }
.form-row-wrap > .form-group { margin-bottom: 0; }
.emp-pay-defaults > .form-group { margin-bottom: 0; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 8px 0;
}
.checkbox-label input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--accent); }

.accountant-pack-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.accountant-pack-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.35;
  cursor: pointer;
}

.accountant-pack-option input[type=checkbox] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

/* Contract type selector */
.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.field-label-row .form-label { margin-bottom: 0; }
.btn-help {
  padding: 3px 0;
  gap: 4px;
  font-size: 12px;
}
.contract-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.contract-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 58px;
  padding: 10px 12px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.14s;
  text-align: center;
}
.contract-option:hover { border-color: var(--accent); }
.contract-option .co-label { font-family: var(--font-display); font-size: 15px; font-weight: 800; }
.contract-option .co-desc  { font-size: 11px; color: var(--text-muted); line-height: 1.25; }
.contract-option.selected-sfa { border-color: var(--sfa-color); background: rgba(124,58,237,0.07); }
.contract-option.selected-sfa .co-label { color: var(--sfa-color); }
.contract-option.selected-ic  { border-color: var(--ic-color);  background: rgba(2,132,199,0.07); }
.contract-option.selected-ic  .co-label { color: var(--ic-color); }
.contract-option.selected-emp { border-color: var(--emp-color); background: rgba(16,185,129,0.07); }
.contract-option.selected-emp .co-label { color: var(--emp-color); }
.contract-help-popover {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(30,34,53,0.28);
  backdrop-filter: blur(3px);
}
.contract-help-popover.visible { display: flex; }
.contract-help-panel {
  width: min(780px, 96vw);
  max-height: min(760px, 88vh);
  overflow: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.contract-help-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.contract-help-sub {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}
.contract-help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 20px 12px;
}
.contract-help-card {
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}
.contract-help-code {
  width: max-content;
  min-width: 42px;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}
.contract-help-sfa { color: var(--sfa-color); background: rgba(124,58,237,0.09); }
.contract-help-ic { color: var(--ic-color); background: rgba(2,132,199,0.09); }
.contract-help-emp { color: var(--emp-color); background: rgba(16,185,129,0.09); }
.contract-help-name {
  margin-top: 10px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}
.contract-help-card ul {
  margin: 10px 0 14px;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}
.contract-help-card li + li { margin-top: 6px; }
.contract-help-card .btn { margin-top: auto; width: 100%; }
.contract-help-note {
  margin: 0 20px 20px;
  font-size: 12px;
  line-height: 1.45;
}
@media (max-width: 720px) {
  .contract-selector,
  .contract-help-grid {
    grid-template-columns: 1fr;
  }
  .contract-help-card {
    min-height: 0;
  }
}

/* ── MODAL ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(30,34,53,0.35); backdrop-filter: blur(4px); z-index: 100; display: flex; align-items: center; justify-content: center; -webkit-app-region: no-drag; }
.modal-overlay.hidden { display: none; }

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  width: 560px;
  max-width: 96vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  animation: modalIn 0.18s ease;
}
.modal-lg { width: 680px; }
.modal-xl { width: 1100px; }

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header { padding: 18px 22px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title  { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.modal-close  { background: none; border: none; color: var(--text-muted); font-size: 20px; line-height: 1; padding: 4px; cursor: pointer; }
.modal-close:hover { color: var(--text-primary); }
.modal-body   { padding: 22px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* Section divider inside modal */
.modal-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.modal-section-title {
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

@media (max-width: 760px) {
  .modal-overlay {
    align-items: center;
    justify-content: center;
    padding: max(10px, env(safe-area-inset-top, 0px)) 10px max(10px, env(safe-area-inset-bottom, 0px));
  }

  .modal,
  .modal-lg,
  .modal-xl {
    width: min(100%, 430px);
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - max(20px, env(safe-area-inset-top, 0px)) - max(20px, env(safe-area-inset-bottom, 0px)));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 8px;
  }

  .modal-header {
    flex: 0 0 auto;
    padding: 18px 20px 14px;
  }

  .modal-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 18px;
  }

  .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
  }

  .modal-footer {
    flex: 0 0 auto;
    display: flex;
    justify-content: stretch;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 20px max(12px, env(safe-area-inset-bottom, 0px));
  }

  .modal-footer .btn {
    flex: 1 1 0;
    min-width: min(132px, 100%);
    min-height: 44px;
    justify-content: center;
    padding-left: 10px;
    padding-right: 10px;
    white-space: nowrap;
  }

  .modal .form-row,
  .modal .form-row-3,
  .modal .form-row-wrap {
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr !important;
    gap: 0;
  }

  .modal .form-row > .form-group,
  .modal .form-row-3 > .form-group,
  .modal .form-row-wrap > .form-group,
  .modal .form-group {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-bottom: 14px !important;
  }

  .modal .form-row > .form-group:last-child,
  .modal .form-row-3 > .form-group:last-child,
  .modal .form-row-wrap > .form-group:last-child {
    margin-bottom: 0 !important;
  }

  .modal .form-label {
    margin-bottom: 7px;
    font-size: 10.5px;
    line-height: 1.25;
    white-space: normal;
  }

  .modal .form-hint {
    max-width: 30rem;
    margin-top: 5px;
    font-size: 11.5px;
  }

  .modal .form-control {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 16px;
    line-height: 1.25;
  }

  .modal select.form-control {
    padding-right: 36px;
    background-position: right 13px center;
  }

  .modal input[type="date"].form-control {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    text-align: left;
  }

  .modal input[type="date"].form-control::-webkit-date-and-time-value {
    min-height: 1.25em;
    text-align: left;
  }

  .modal .input-dollar::before {
    left: 12px;
    font-size: 16px;
  }

  .modal .input-dollar .form-control {
    padding-left: 28px;
  }

  .modal .checkbox-label {
    min-height: 44px;
    gap: 10px;
    font-size: 15px;
  }

  .modal .checkbox-label input[type=checkbox] {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
  }

  .modal details > summary {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start !important;
    padding: 10px 12px !important;
  }

  .modal details > summary > span {
    min-width: 0;
  }

  .modal details > summary > span:last-child {
    width: 100%;
    text-align: left !important;
    font-size: 12px !important;
    line-height: 1.35;
  }

  .modal-section {
    margin-top: 18px;
    padding-top: 14px;
  }

  .modal-section-title {
    margin-bottom: 10px;
  }
}

/* ── BAS SUMMARY ── */
.bas-period-nav {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-surface) 72%, var(--bg-base));
}
.bas-period-arrow {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--bg-elevated) 82%, transparent);
  color: var(--text-primary);
  font-size: 16px;
}
.bas-period-arrow:hover {
  background: var(--bg-hover);
  border-color: var(--border-bright);
  color: var(--accent);
}
.bas-period-current {
  min-width: 0;
  padding: 2px 6px;
}
.bas-period-kicker {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.bas-period-title {
  margin-top: 1px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.2;
}
.bas-quarter-switcher {
  justify-self: end;
  background: transparent;
  border-color: transparent;
  padding: 0;
  gap: 2px;
}
.bas-quarter-switcher button {
  min-width: 36px;
  padding: 6px 9px;
  border-radius: 8px;
}
.bas-block { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 20px; }
.bas-block-header { padding: 12px 18px; background: var(--bg-elevated); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.bas-block-title { font-family: var(--font-display); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); }

.bas-row { display: flex; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--border); }
.bas-block > .bas-row:last-child,
.bas-block > div:last-child > .bas-row:last-child { border-bottom: none; }
.bas-code  { font-family: var(--font-mono); font-size: 11px; color: var(--accent2); width: 34px; font-weight: 500; flex-shrink: 0; }
.bas-name  { flex: 1; font-size: 13px; color: var(--text-secondary); }
.bas-value { font-family: var(--font-mono); font-size: 15px; font-weight: 500; min-width: 130px; text-align: right; }
.bas-row.total { background: color-mix(in srgb, var(--green) 8%, var(--bg-surface)); }
.bas-row.total .bas-name  { color: var(--text-primary); font-weight: 600; }
.bas-row.total .bas-value { font-size: 18px; color: var(--money-gst-credit); }
.bas-row.owing  .bas-value { color: var(--money-gst-collected); }
.bas-row.refund .bas-value { color: var(--money-income); }
.bas-row.key { background: color-mix(in srgb, var(--accent) 6%, var(--bg-surface)); }
.bas-row.key .bas-name { color: var(--text-primary); font-weight: 500; }
.bas-row.offset { background: color-mix(in srgb, var(--accent) 4%, var(--bg-surface)); }
.bas-bottom-summary {
  --bas-summary-text-size: 13px;
  --bas-summary-line-height: 19px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent) 5%, var(--bg-surface));
}
.bas-bottom-summary-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: var(--bas-summary-line-height);
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
  color: var(--text-muted);
}
.bas-bottom-summary-icon i { display: block; line-height: 1; }
.bas-bottom-summary-text {
  font-size: var(--bas-summary-text-size);
  line-height: var(--bas-summary-line-height);
  font-weight: 700;
  color: var(--text-primary);
}
.bas-bottom-summary-detail {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}
.bas-bottom-summary.owing .bas-bottom-summary-icon { color: var(--money-gst-collected); }
.bas-bottom-summary.refund .bas-bottom-summary-icon { color: var(--money-income); }
.bas-bottom-summary.nil .bas-bottom-summary-icon { color: var(--green); }

details.card > summary.card-header { cursor: pointer; list-style: none; }
details.card > summary.card-header::-webkit-details-marker { display: none; }
details.card > summary.card-header::after { content: '▸'; color: var(--text-muted); font-size: 11px; margin-left: 8px; transition: transform 0.15s; }
details[open].card > summary.card-header::after { transform: rotate(90deg); }

.recurring-expenses-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.recurring-expenses-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.recurring-expenses-summary-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── EMPTY STATE ── */
.empty-state { text-align: left; padding: 28px 24px; }
.empty-icon  { display: none; }
.empty-title { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--text-secondary); margin-bottom: 4px; }
.empty-sub   { font-size: 12px; color: var(--text-muted); }


/* ── ONBOARDING WIZARD ── */
.ob-welcome {
  display: flex; align-items: center; justify-content: center;
  min-height: 80vh; padding: 40px 24px;
}
.ob-welcome-inner {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; max-width: 480px;
}
.ob-welcome-logo {
  width: 72px; height: 72px; object-fit: contain;
  border-radius: 18px; margin-bottom: 18px;
  box-shadow: none;
}
.ob-welcome-name {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.ob-welcome-headline {
  font-family: var(--font-display); font-size: 36px; font-weight: 800;
  color: var(--text-primary); line-height: 1.18; margin-bottom: 14px;
}
.ob-welcome-sub {
  font-size: 14px; color: var(--text-secondary); line-height: 1.65;
  margin-bottom: 28px; max-width: 400px;
}
.ob-feature-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px;
  margin-bottom: 34px; text-align: left; width: 100%;
}
.ob-feature-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-secondary);
}
.ob-feat-check { color: var(--accent); font-weight: 700; font-size: 14px; flex-shrink: 0; }

/* Wizard layout */
.ob-wizard {
  max-width: 580px; margin: 0 auto; padding: 36px 20px 48px;
}

/* Progress steps */
.ob-prog-wrap {
  display: flex; align-items: flex-start; justify-content: center;
  margin-bottom: 28px;
}
.ob-prog-step {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 90px;
}
.ob-prog-dot {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--border-bright); background: var(--bg-surface);
  color: var(--text-muted); display: flex; align-items: center;
  justify-content: center; font-size: 12px; font-weight: 700;
  transition: all 0.2s;
}
.ob-prog-step.ob-prog-current .ob-prog-dot {
  border-color: var(--accent); background: var(--accent); color: #fff;
}
.ob-prog-step.ob-prog-done .ob-prog-dot {
  border-color: var(--accent-border, var(--accent)); background: var(--bg-surface); color: var(--accent);
}
.ob-prog-label {
  font-size: 11px; color: var(--text-muted); text-align: center; font-weight: 500;
}
.ob-prog-step.ob-prog-current .ob-prog-label { color: var(--accent); font-weight: 600; }
.ob-prog-step.ob-prog-done    .ob-prog-label { color: var(--text-secondary); }
.ob-prog-line {
  flex: 1; height: 2px; background: var(--border); margin-top: 15px; min-width: 32px;
  transition: background 0.2s;
}
.ob-prog-line.ob-prog-line-done { background: var(--accent); }

/* Wizard card */
.ob-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: none; overflow: hidden;
}
.ob-card-heading {
  font-family: var(--font-display); font-size: 20px; font-weight: 700;
  color: var(--text-primary); padding: 26px 28px 0;
}
.ob-card-sub {
  font-size: 13px; color: var(--text-secondary); line-height: 1.5;
  padding: 5px 28px 20px; border-bottom: 1px solid var(--border);
}
.ob-card-body  { padding: 24px 28px; }
.ob-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 28px; border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

/* Done screen */
.ob-done {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 44px 28px 48px;
}
.ob-done-check {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--bg-surface); border: 2px solid var(--accent-border, var(--accent));
  color: var(--accent); font-size: 26px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.ob-done-title {
  font-family: var(--font-display); font-size: 26px; font-weight: 800;
  color: var(--text-primary); margin-bottom: 8px;
}
.ob-done-sub {
  font-size: 13px; color: var(--text-secondary); line-height: 1.55;
  margin-bottom: 28px; max-width: 380px;
}
.ob-done-summary {
  width: 100%; max-width: 420px; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 32px;
  text-align: left;
}
.ob-done-row {
  display: flex; gap: 16px; padding: 12px 16px;
  border-bottom: 1px solid var(--border); align-items: baseline;
}
.ob-done-row:last-child { border-bottom: none; }
.ob-done-label {
  color: var(--text-muted); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  width: 100px; flex-shrink: 0;
}
.ob-done-value { font-size: 13px; color: var(--text-secondary); }

/* ── QUICK ACTIONS ── */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.qa-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  cursor: pointer;
  text-align: left;
  transition: all 0.14s;
  color: var(--text-primary);
}
.qa-btn:hover { border-color: var(--accent-border, var(--accent)); background: color-mix(in srgb, var(--accent) 5%, var(--bg-surface)); }
.qa-icon  { font-size: 20px; margin-bottom: 8px; }
.qa-label { font-family: var(--font-display); font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.qa-sub   { font-size: 11px; color: var(--text-muted); }

/* ── PRACTICE TAG ── */
.practice-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--font-mono);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
}
.practice-tag-sfa { background: rgba(99,102,241,0.10); border-color: rgba(99,102,241,0.25); color: var(--sfa-color); }
.practice-tag-ic  { background: rgba(34,211,238,0.10); border-color: rgba(34,211,238,0.30); color: var(--ic-color); }
.practice-tag-emp { background: rgba(16,185,129,0.10); border-color: rgba(16,185,129,0.25); color: var(--emp-color); }

/* ── FILTER BAR ── */
.filter-bar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.filter-bar .form-control { width: auto; flex: 0 0 auto; min-width: 130px; }
.filter-search { flex: 1; min-width: 180px; }
.mobile-filter-toggle-input,
.mobile-filter-toggle,
.mobile-sort-row {
  display: none;
}
.dense-filter-bar {
  gap: 6px;
  flex-wrap: nowrap;
}
.dense-filter-bar .form-control {
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
}
.dense-filter-bar select.form-control {
  background-position: right 9px center;
  padding-right: 24px;
}
.dense-filter-bar .filter-search {
  flex: 0 1 150px;
  width: 150px;
  min-width: 136px;
}
.dense-filter-bar .filter-quarter {
  flex: 0 0 138px;
  width: 138px;
}
.dense-filter-bar .filter-practice {
  flex: 1 1 132px;
  width: 132px;
  max-width: 160px;
}
.dense-filter-bar .filter-category {
  flex: 1 1 132px;
  width: 132px;
  max-width: 158px;
}
.dense-filter-bar .filter-type {
  flex: 0 0 92px;
  width: 92px;
}
.dense-filter-bar .btn {
  flex: 0 0 auto;
  padding-left: 10px;
  padding-right: 10px;
}
.dense-filter-bar .income-filter-group {
  padding-left: 9px;
  padding-right: 9px;
}
@media (max-width: 1180px) {
  .dense-filter-bar {
    flex-wrap: wrap;
  }
  .dense-filter-bar .filter-search,
  .dense-filter-bar .filter-practice,
  .dense-filter-bar .filter-category {
    flex: 1 1 180px;
    max-width: none;
  }
}

@media (max-width: 760px) {
  html,
  body {
    overflow: hidden;
  }

  #app {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    order: 2;
    width: 100%;
    min-width: 0;
    max-height: none;
    padding: 0 12px calc(4px + env(safe-area-inset-bottom, 0px));
    background: transparent;
    border-right: none;
    border-bottom: none;
    -webkit-app-region: no-drag;
    pointer-events: none;
  }

  .sidebar-header {
    display: none;
  }

  .dentist-card {
    display: none;
  }

  .sidebar-nav {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    width: min(430px, 100%);
    min-height: 70px;
    margin: 0 auto;
    padding: 7px;
    background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-bright) 88%, transparent);
    border-radius: 28px;
    box-shadow: 0 12px 34px rgba(20, 24, 38, 0.22);
    backdrop-filter: blur(18px);
    pointer-events: auto;
  }

  .sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-section-header {
    display: none;
  }

  .nav-item {
    display: none;
  }

  .sidebar-nav > .nav-item[data-view="dashboard"],
  .sidebar-nav > .nav-item[data-view="income"],
  .sidebar-nav > .nav-item[data-view="expenses"],
  .mobile-more-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 100%;
    min-width: 0;
    min-height: 56px;
    margin: 0;
    padding: 6px 4px;
    border: none;
    border-radius: 22px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    transition: background 0.14s ease, color 0.14s ease;
  }

  .sidebar-nav > .nav-item[data-view="dashboard"].active,
  .sidebar-nav > .nav-item[data-view="income"].active,
  .sidebar-nav > .nav-item[data-view="expenses"].active,
  .mobile-more-tab.active {
    color: var(--text-primary);
    background: color-mix(in srgb, var(--bg-base) 84%, #ffffff 12%);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border-bright) 70%, transparent);
  }

  .nav-item.active::before {
    display: none;
  }

  .sidebar-nav .nav-icon,
  .mobile-more-tab .nav-icon {
    width: auto;
    font-size: 21px;
    color: currentColor;
  }

  .mobile-more-menu {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    z-index: 81;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: min(430px, calc(100vw - 24px));
    margin: 0 auto;
    padding: 10px;
    background: color-mix(in srgb, var(--bg-elevated) 94%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-bright) 88%, transparent);
    border-radius: 18px;
    box-shadow: 0 14px 38px rgba(20, 24, 38, 0.24);
    backdrop-filter: blur(18px);
    pointer-events: auto;
  }

  .mobile-more-menu.open {
    display: grid;
  }

  .mobile-more-item {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 700;
    text-align: left;
  }

  .mobile-more-item i {
    color: var(--text-muted);
    font-size: 17px;
  }

  .mobile-more-item.active {
    color: var(--text-primary);
    border-color: var(--border-bright);
    background: color-mix(in srgb, var(--accent) 7%, var(--bg-surface));
  }

  .web-platform .web-only.mobile-more-item {
    display: flex !important;
  }

  .sidebar-actions {
    display: none;
  }

  .sidebar-footer {
    display: none;
  }

  .main-content {
    min-height: 0;
    width: 100%;
    padding-bottom: calc(156px + env(safe-area-inset-bottom, 0px));
  }

  #viewContainer {
    overflow-x: hidden;
  }

  .mobile-fy-bar {
    display: flex;
    justify-content: flex-end;
    padding: 8px 16px 0;
    background: transparent;
  }

  .mobile-fy-bar.hidden {
    display: none;
  }

  .mobile-fy-bar .sidebar-fy-selector {
    width: auto;
    min-width: 126px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px;
    align-items: center;
    padding: 3px 5px 3px 8px;
    border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg-surface) 70%, transparent);
  }

  .mobile-fy-bar .sidebar-fy-label {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
  }

  .mobile-fy-bar .sidebar-fy-select {
    width: 100%;
    height: 26px;
    min-width: 80px;
    padding: 3px 22px 3px 7px;
    border: none;
    background-color: transparent;
    background-position: right 8px center;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
  }

  .page-header {
    position: static;
    padding: 12px 16px 13px;
    flex-direction: column;
    gap: 12px;
  }

  .dashboard-mobile-title-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .dashboard-inline-fy {
    display: block;
    flex: 0 0 auto;
  }

  .dashboard-inline-fy .sidebar-fy-selector {
    width: auto;
    min-width: 126px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px;
    align-items: center;
    padding: 3px 5px 3px 8px;
    border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg-surface) 70%, transparent);
  }

  .dashboard-inline-fy .sidebar-fy-label {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
  }

  .dashboard-inline-fy .sidebar-fy-select {
    width: 100%;
    height: 26px;
    min-width: 80px;
    padding: 3px 22px 3px 7px;
    border: none;
    background-color: transparent;
    background-position: right 8px center;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
  }

  .page-title {
    font-size: 23px;
  }

  .page-blurb {
    font-size: 12.5px;
  }

  .page-actions {
    display: none;
  }

  .mobile-action-dock {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    z-index: 79;
    width: min(430px, calc(100vw - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
    gap: 8px;
  }

  .mobile-action-dock[aria-hidden="true"] {
    display: none;
  }

  .mobile-action-dock:empty {
    display: none;
  }

  .mobile-action-dock .btn {
    width: 100%;
    min-height: 44px;
    padding-left: 12px;
    padding-right: 12px;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(20, 24, 38, 0.18);
  }

  .income-bulk-add-action {
    display: none;
  }

  .content-body {
    padding: 16px 16px 96px;
  }

  .tax-planning-body {
    overflow-x: hidden;
  }

  .tax-planning-body .tab-bar {
    margin-left: -16px;
    margin-right: -16px;
    padding: 0 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .bas-period-nav {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 8px;
    padding: 6px;
  }

  .bas-quarter-switcher {
    grid-column: 1 / -1;
  }

  .bas-period-current {
    order: 0;
  }

  .bas-quarter-switcher {
    justify-self: stretch;
    width: 100%;
    border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
    padding-top: 6px;
  }

  .bas-quarter-switcher button {
    flex: 1;
  }

  .tax-planning-payg-card .card-header,
  .tax-savings-month-card .card-header,
  .tax-savings-summary > .tax-savings-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .tax-planning-payg-card .card-body {
    grid-template-columns: 1fr !important;
    padding: 14px !important;
  }

  .tax-planning-payg-card .form-row {
    grid-template-columns: 1fr !important;
  }

  .tax-planning-payg-card .form-group {
    min-width: 0 !important;
  }

  .tax-planning-payg-card .card-body > div:last-child {
    justify-self: stretch !important;
  }

  .tax-planning-payg-card .card-body > div:last-child .form-control {
    max-width: none !important;
    width: 100%;
  }

  .tax-planning-payg-card .data-table,
  .tax-savings-allocation-table {
    min-width: 620px;
  }

  .tax-planning-payg-card > div:has(> .data-table),
  .tax-savings-month-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-filter-toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .mobile-filter-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
  }

  .mobile-filter-toggle span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
  }

  .mobile-filter-toggle span:last-child {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
  }

  .filter-bar,
  .dense-filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
  }

  .mobile-filter-toggle-input:not(:checked) + .mobile-filter-toggle + .filter-bar {
    display: none;
  }

  .mobile-filter-toggle-input:checked + .mobile-filter-toggle {
    border-color: var(--border-bright);
    background: var(--bg-elevated);
  }

  .filter-bar .form-control,
  .dense-filter-bar .form-control,
  .dense-filter-bar .filter-search,
  .dense-filter-bar .filter-quarter,
  .dense-filter-bar .filter-practice,
  .dense-filter-bar .filter-category,
  .dense-filter-bar .filter-type {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: none;
  }

  .form-control,
  .sidebar-fy-select,
  input,
  select,
  textarea {
    font-size: 16px;
  }

  .filter-search {
    grid-column: 1 / -1;
  }

  .mobile-sort-row {
    grid-column: 1 / -1;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 1px;
    scrollbar-width: none;
  }

  .mobile-sort-row::-webkit-scrollbar {
    display: none;
  }

  .mobile-sort-chip {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
  }

  .mobile-sort-chip.active {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
    background: color-mix(in srgb, var(--accent) 8%, var(--bg-surface));
  }

  .dense-filter-bar .btn {
    width: 100%;
    min-height: 36px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .income-filter-group,
  .expense-filter-service-fees,
  .income-filter-missing,
  .expense-filter-missing,
  .income-filter-clear,
  .expense-filter-clear {
    grid-column: 1 / -1;
  }

  .table-wrap,
  .card {
    border-radius: 8px;
  }

  .card-header {
    padding: 12px 14px;
    gap: 10px;
  }

  .recurring-expenses-summary {
    cursor: pointer;
  }

  .recurring-expenses-summary::after {
    content: '▸';
    flex: 0 0 auto;
    color: var(--text-muted);
    font-size: 12px;
    transition: transform 0.15s ease;
  }

  .recurring-expenses-summary-meta {
    margin-left: auto;
  }

  .recurring-expenses-toggle-input:not(:checked) + .recurring-expenses-summary + .recurring-expenses-body {
    display: none;
  }

  .recurring-expenses-toggle-input:checked + .recurring-expenses-summary::after {
    transform: rotate(90deg);
  }

  .record-table-desktop {
    display: none;
  }

  .record-card-list {
    display: block;
  }

  .record-card-group-head {
    padding: 10px 12px 6px;
    font-size: 10px;
  }

  .record-card {
    padding: 10px 12px;
  }

  .record-card-head {
    gap: 10px;
  }

  .record-card-title {
    font-size: 13px;
    line-height: 1.2;
  }

  .record-card-subtitle {
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.25;
  }

  .record-card-amount {
    font-size: 14px;
  }

  .record-card-tags {
    gap: 5px;
    margin-top: 7px;
  }

  .record-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 6px;
    margin-top: 8px;
  }

  .record-card-field {
    padding: 7px 8px;
    border-radius: 6px;
  }

  .record-card-field span {
    margin-bottom: 3px;
    font-size: 10px;
  }

  .record-card-field strong {
    font-size: 12px;
  }

  .record-card-note {
    margin-top: 7px;
    font-size: 11.5px;
    line-height: 1.35;
  }

  .record-card-actions {
    grid-template-columns: minmax(0, 1fr) 31px 31px;
    gap: 6px;
    margin-top: 8px;
  }

  .record-card-actions .btn-icon,
  .record-card-lock {
    width: 31px;
    height: 29px;
  }

  .attachment-alert {
    align-items: flex-start;
  }
}

/* ── NOTICE BOX ── */
.notice {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 14px;
}
.notice-info    { background: rgba(33,142,142,0.06);  border: 1px solid rgba(33,142,142,0.18);  color: var(--text-secondary); }
.notice-warning { background: rgba(184,121,36,0.07);  border: 1px solid rgba(184,121,36,0.18);  color: #8F5E1C; }
.notice-success { background: rgba(79,146,121,0.08);  border: 1px solid rgba(79,146,121,0.22);  color: var(--green-dim); }
.attachment-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s;
}
.attachment-alert:hover {
  background: rgba(184,121,36,0.10);
  border-color: rgba(184,121,36,0.28);
}
.attachment-alert-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(184,121,36,0.10);
  color: #8F5E1C;
  font-size: 15px;
}
.attachment-alert-copy {
  flex: 1;
  min-width: 0;
}
.attachment-alert-title {
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
  color: #7B5018;
}
.attachment-alert-detail {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 400;
  color: color-mix(in srgb, #8F5E1C 78%, var(--text-secondary));
}
.attachment-alert-action {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: #7B5018;
}
.attachment-alert-dismiss {
  color: inherit;
  opacity: 0.75;
  flex-shrink: 0;
}
.attachment-alert-dismiss:hover { opacity: 1; }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 22px; right: 22px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-primary);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
  animation: toastIn 0.18s ease;
}
@keyframes toastIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 10px; }

/* ── ANIMATIONS ── */
.fade-in { animation: fadeIn 0.18s ease; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

/* ── PRACTICE CARDS ── */
.practice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.practice-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.practice-card.sfa { --practice-color: var(--sfa-color); }
.practice-card.ic { --practice-color: var(--ic-color); }
.practice-card.emp { --practice-color: var(--emp-color); }
.practice-card.practice-archived { opacity: 0.6; }
.pc-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.pc-colour-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--practice-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--practice-color) 18%, transparent);
}
.pc-name-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.pc-type   { margin-bottom: 12px; }
.pc-meta   { font-size: 12px; color: var(--text-secondary); margin-bottom: 3px; }
.pc-meta span { color: var(--text-primary); font-family: var(--font-mono); }
.pc-contract-summary {
  display: grid;
  gap: 7px;
  margin: 12px 0;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.pc-meta-row {
  display: grid;
  grid-template-columns: minmax(86px, 0.5fr) minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  min-width: 0;
  font-size: 12px;
}
.pc-meta-row span {
  color: var(--text-muted);
}
.pc-meta-row strong {
  min-width: 0;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.pc-actions { display: flex; gap: 8px; margin-top: 14px; }

/* ── INCOME ENTRY DETAIL ── */
.income-breakdown {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 10px;
}
.ib-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 12px; }
.ib-label { color: var(--text-secondary); }
.ib-value { font-family: var(--font-mono); font-weight: 500; }
.ib-divider { height: 1px; background: var(--border); margin: 8px 0; }
.ib-total .ib-label { color: var(--text-primary); font-weight: 600; }
.ib-total .ib-value { color: var(--money-income); font-size: 14px; }

/* Attachment section */
.attachment-list { min-height: 24px; margin-bottom: 8px; }
.attachment-list a:hover { text-decoration: underline; }

/* ── SEGMENTED CONTROL ── */
.segmented-control {
  display: flex;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  padding: 2px;
  gap: 2px;
}
.segmented-control.segmented-fill {
  width: 100%;
  max-width: var(--segmented-max, none);
}
.segmented-control button {
  padding: 4px 12px;
  border-radius: 6px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.14s;
  white-space: nowrap;
}
.segmented-control.segmented-fill button { flex: 1; }
.segmented-control button:hover:not(.seg-active) { color: var(--text-primary); }
.segmented-control button.seg-active {
  background: var(--bg-surface);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(11,19,43,0.08);
}

/* ── PAGE TAB BAR ── */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.tab-bar button {
  padding: 10px 18px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: color 0.14s;
  white-space: nowrap;
}
.tab-bar button:hover:not(.tab-active) { color: var(--text-secondary); }
.tab-bar button.tab-active {
  color: var(--accent);
  font-weight: 600;
}
.tab-bar button.tab-active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

/* ── TAX SAVINGS ── */
.tax-savings-position,
.tax-savings-summary,
.tax-savings-month-card,
.tax-savings-setup,
.tax-savings-empty {
  margin-bottom: 20px;
}

.tax-savings-position {
  overflow: hidden;
}

.tax-savings-summary {
  overflow: hidden;
}

.tax-savings-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.tax-savings-section-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 3px;
}

.tax-savings-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.tax-savings-position-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  gap: 0;
}

.tax-savings-rate-card,
.tax-savings-current-card {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  min-width: 0;
  padding: 18px 20px 20px;
}

.tax-savings-rate-card {
  border-right: 1px solid var(--border);
}

.tax-savings-kicker {
  font-size: 12px;
  font-weight: 650;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.tax-savings-rate-value,
.tax-savings-rate-input,
.tax-savings-rate-suffix {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.tax-savings-rate-value {
  color: var(--accent);
}

.tax-savings-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.tax-savings-meta strong {
  color: var(--text-primary);
}

.tax-savings-current-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.tax-savings-current-head .tax-savings-kicker {
  margin-bottom: 0;
}

.tax-savings-edit-hint {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--text-muted);
}

.tax-savings-edit-row {
  display: flex;
  align-items: baseline;
  line-height: 1;
  white-space: nowrap;
  padding: 4px 0 6px;
}

.tax-savings-rate-input {
  width: 4.5ch;
  min-width: 4.5ch;
  flex: 0 0 4.5ch;
  text-align: right;
}

.tax-savings-rate-suffix {
  flex: 0 0 auto;
  margin-left: 4px;
  font-size: 30px;
  line-height: 1;
}

.tax-savings-status {
  margin-top: 12px;
  padding: 8px 11px;
}

.web-platform .tax-savings-section-header {
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
}

.web-platform .tax-savings-rate-card,
.web-platform .tax-savings-current-card {
  padding: 22px;
}

.web-platform .tax-savings-rate-card {
  display: grid;
  align-content: start;
}

.web-platform .tax-savings-current-card {
  display: flex;
  flex-direction: column;
}

.web-platform .tax-savings-kicker,
.web-platform .tax-savings-current-head {
  margin-bottom: 10px;
}

.web-platform .tax-savings-current-head .tax-savings-kicker {
  margin-bottom: 0;
}

.web-platform .tax-savings-edit-row {
  display: inline-flex;
  align-self: flex-start;
  padding: 0 0 6px;
}

.web-platform .tax-savings-rate-input {
  width: auto;
  min-width: 2ch;
  flex: 0 1 auto;
}

.web-platform .tax-savings-status {
  margin-top: 18px;
  padding: 10px 12px;
}

.tax-savings-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
}

.tax-savings-summary > .tax-savings-section-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.tax-savings-summary-metric {
  position: relative;
  min-width: 0;
  padding: 18px 20px;
}

.tax-savings-summary-metric + .tax-savings-summary-metric {
  border-left: 1px solid var(--border);
}

.tax-savings-allocation-table td,
.tax-savings-allocation-table th {
  padding-left: 16px;
  padding-right: 16px;
}

.tax-savings-total-row {
  background: var(--bg-elevated);
  border-top: 2px solid var(--border);
  font-weight: 700;
}

@media (max-width: 980px) {
  .tax-savings-section-header,
  .tax-savings-position-grid {
    grid-template-columns: 1fr;
  }

  .tax-savings-section-header {
    display: grid;
  }

  .tax-savings-actions {
    justify-content: flex-start;
  }

  .tax-savings-rate-card {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 760px) {
  .tax-savings-summary-grid {
    grid-template-columns: 1fr;
  }

  .tax-savings-summary-metric + .tax-savings-summary-metric {
    border-left: none;
    border-top: 1px solid var(--border);
  }
}

/* ── QUARTERLY BREAKDOWN STRIP ── */
.q-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.q-strip-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px 12px;
  cursor: pointer;
  transition: all 0.14s;
  position: relative;
  overflow: hidden;
}

.q-strip-card:hover {
  border-color: var(--accent-border, var(--accent));
  background: color-mix(in srgb, var(--accent) 4%, var(--bg-surface));
}

.q-strip-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 10px;
}

.q-strip-num {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.q-strip-label {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── REPORTS ── */
.reports-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.reports-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 16px;
  margin-bottom: 20px;
}

.reports-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.reports-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.reports-empty-note {
  padding: 18px 20px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}

.reports-compare-table td,
.reports-compare-table th {
  padding-left: 16px;
  padding-right: 16px;
}

.reports-readiness-list {
  display: grid;
  gap: 0;
}

.reports-readiness-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}

.reports-readiness-row.ready .reports-readiness-icon {
  color: var(--green);
  background: color-mix(in srgb, var(--green) 8%, var(--bg-surface));
  border-color: color-mix(in srgb, var(--green) 18%, var(--border));
}

.reports-readiness-row.needs-work .reports-readiness-icon {
  color: var(--money-warning);
  background: color-mix(in srgb, var(--money-warning) 8%, var(--bg-surface));
  border-color: color-mix(in srgb, var(--money-warning) 18%, var(--border));
}

.reports-readiness-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 14px;
}

.reports-readiness-title {
  font-size: 13px;
  font-weight: 650;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.reports-readiness-detail {
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--text-muted);
}

.reports-readiness-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--bg-elevated);
}

@media (max-width: 1180px) {
  .reports-snapshot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .reports-review-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .reports-snapshot-grid { grid-template-columns: 1fr; }
}

/* ── COLOUR SWATCH PICKER ── */
.colour-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.colour-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s, box-shadow 0.12s;
  outline: none;
  flex-shrink: 0;
}
.colour-swatch:hover { transform: scale(1.18); }
.colour-swatch.selected {
  box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px var(--text-primary);
  transform: scale(1.1);
}

/* ── TOGGLE SWITCH ── */
.toggle-btn {
  position: relative;
  width: 44px;
  height: 26px;
  background: var(--border-bright);
  border: none;
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
  padding: 0;
  -webkit-app-region: no-drag;
}
.toggle-btn.active { background: var(--accent); }
.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  display: block;
  box-shadow: 0 1px 4px rgba(0,0,0,0.22);
}
.toggle-btn.active .toggle-knob { transform: translateX(18px); }

/* ── DARK MODE ── */
[data-theme="dark"] {
  --brand-ink:     #DCE7E8;
  --brand-ink-2:   #A4C4C2;
  --brand-mint:    #12383D;
  --brand-mist:    #0D2428;
  --bg-base:       #0D1418;
  --bg-surface:    #121C21;
  --bg-elevated:   #172329;
  --bg-hover:      #1D2B31;
  --border:        #22343A;
  --border-bright: #365158;
  --accent:        #2A9A98;
  --accent-dim:    #23817F;
  --chart-accent:  #32AAA6;
  --accent-glow:   rgba(42,154,152,0.10);
  --accent-border: rgba(42,154,152,0.34);
  --accent2:       #C28A3A;
  --money-gst-credit: #9A8CE0;
  --green:         #61A98D;
  --green-dim:     #74B99F;
  --red:           #D05B51;
  --red-dim:       #B84D44;
  --text-primary:  #DCE7E8;
  --text-secondary:#8FAAA8;
  --text-muted:    #5D7473;
  --shadow:        0 8px 32px rgba(0,0,0,0.50);
}

/* Dark mode overrides for hardcoded rgba values */
[data-theme="dark"] select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%235a7a8a' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
}
[data-theme="dark"] .modal-overlay {
  background: rgba(0,0,0,0.60);
}
[data-theme="dark"] .logo-mark {
  box-shadow: none;
}
[data-theme="dark"] .logo-icon {
  transform: none;
  clip-path: none;
}
[data-theme="dark"] .logo-beta {
  background: rgba(255,255,255,0.04);
  border-color: var(--border-bright);
}
[data-theme="dark"] .bas-row.total {
  background: color-mix(in srgb, var(--green) 10%, var(--bg-surface));
}
[data-theme="dark"] .bas-row.key {
  background: color-mix(in srgb, var(--accent) 9%, var(--bg-surface));
}
[data-theme="dark"] .bas-row.offset {
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-surface));
}
[data-theme="dark"] .hero-stat-card.hero-tnr {
  background: var(--bg-surface);
}
[data-theme="dark"] .hero-stat-card.hero-net {
  background: var(--bg-surface);
}
[data-theme="dark"] .hero-stat-card.hero-proj {
  background: var(--bg-surface);
}
[data-theme="dark"] .notice-info {
  background: rgba(42,154,152,0.10);
  border-color: rgba(42,154,152,0.24);
}
[data-theme="dark"] .notice-warning {
  background: rgba(194,138,58,0.12);
  border-color: rgba(194,138,58,0.28);
}
[data-theme="dark"] .attachment-alert:hover {
  background: rgba(194,138,58,0.17);
  border-color: rgba(194,138,58,0.36);
}
[data-theme="dark"] .attachment-alert-icon {
  background: rgba(194,138,58,0.16);
  color: #D7A45D;
}
[data-theme="dark"] .attachment-alert-title,
[data-theme="dark"] .attachment-alert-action {
  color: #E0B36F;
}
[data-theme="dark"] .attachment-alert-detail {
  color: color-mix(in srgb, #D7A45D 72%, var(--text-secondary));
}
[data-theme="dark"] .notice-success {
  background: rgba(97,169,141,0.11);
  border-color: rgba(97,169,141,0.26);
}
[data-theme="dark"] .toast {
  background: var(--bg-elevated);
  border-color: var(--border-bright);
}
[data-theme="dark"] .sidebar {
  background: var(--bg-base);
}
[data-theme="dark"] .nav-item.active {
  background: transparent;
  box-shadow: none;
}
[data-theme="dark"] .dentist-avatar {
  background: #2d5a72;
}
[data-theme="dark"] .chart-card {
  background: var(--bg-surface);
  border-color: var(--border-bright);
  box-shadow: none;
}
[data-theme="dark"] .chart-legend-item {
  background: var(--bg-elevated);
  border-color: var(--border-bright);
}

.q-strip-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2px 0;
}

.q-strip-key {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}

.q-strip-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.q-strip-drill {
  font-size: 10px;
  color: var(--accent);
  margin-top: 10px;
  font-family: var(--font-mono);
  opacity: 0;
  transition: opacity 0.14s;
}

.q-strip-card:hover .q-strip-drill { opacity: 1; }

/* ── DASHBOARD INSTRUMENT LAYOUT ── */
.dashboard-obligations,
.first-actions-panel,
.dashboard-latest-activity,
.dashboard-workbench,
.dashboard-tax-strip,
.dashboard-month-ledger {
  margin: 18px 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top-color: color-mix(in srgb, var(--border-bright) 70%, var(--border));
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.dashboard-obligations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.dashboard-obligations.dashboard-obligations-single {
  grid-template-columns: 1fr;
}

.dashboard-obligations > .dashboard-section-title {
  grid-column: 1 / -1;
}

.dashboard-obligation-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 13px 16px;
  border-right: 1px solid var(--border);
}

.first-actions-panel {
  padding: 15px 16px 16px;
}

.first-actions-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.first-actions-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 750;
  color: var(--text-primary);
}

.first-actions-sub {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.first-actions-dismiss {
  flex-shrink: 0;
  background: transparent;
}

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

.first-action-item {
  display: grid;
  grid-template-rows: auto minmax(72px, 1fr) auto;
  gap: 9px;
  min-height: 154px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-base);
}

.first-action-item.complete {
  background: color-mix(in srgb, var(--green) 5%, var(--bg-base));
  border-color: color-mix(in srgb, var(--green) 18%, var(--border));
}

.first-action-status {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--accent-glow);
  font-size: 16px;
}

.first-action-item.complete .first-action-status {
  color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, transparent);
}

.first-action-copy {
  min-width: 0;
}

.first-action-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 4px;
}

.first-action-detail {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--text-muted);
}

.first-action-done {
  height: 28px;
  display: inline-flex;
  align-items: center;
  color: var(--green);
  font-size: 11.5px;
  font-weight: 700;
}

.dashboard-obligation-row:last-child { border-right: none; }
.dashboard-obligations-single .dashboard-obligation-row { border-right: none; }

.dashboard-obligation-link {
  cursor: pointer;
  transition: background-color 0.14s ease, box-shadow 0.14s ease;
}

.dashboard-obligation-link:hover {
  background: var(--bg-elevated);
}

.dashboard-obligation-link:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--accent);
}

.dashboard-obligation-row.dashboard-obligation-overdue {
  background: color-mix(in srgb, var(--money-warning) 8%, var(--bg-surface));
}

.dashboard-obligation-link.dashboard-obligation-overdue:hover {
  background: color-mix(in srgb, var(--money-warning) 12%, var(--bg-surface));
}

.dashboard-obligation-overdue .dashboard-obligation-status {
  color: var(--money-warning);
  font-weight: 650;
}

.dashboard-obligation-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 14px;
}

.dashboard-obligation-icon.bas {
  color: var(--text-muted);
  background: transparent;
}

.dashboard-obligation-label {
  font-size: 12px;
  color: color-mix(in srgb, var(--text-secondary) 82%, var(--text-muted));
  font-weight: 700;
}

.dashboard-obligation-detail {
  margin-top: 5px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 650;
}

.dashboard-obligation-meta {
  text-align: right;
  min-width: 132px;
}

.dashboard-obligation-amount {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.dashboard-obligation-amount.yellow,
.dashboard-obligation-amount.money-gst-collected,
.dashboard-obligation-amount.money-warning { color: var(--money-gst-collected); }
.dashboard-obligation-amount.green,
.dashboard-obligation-amount.money-income { color: var(--money-income); }
.dashboard-obligation-amount.red,
.dashboard-obligation-amount.money-expense { color: var(--money-expense); }
.dashboard-obligation-amount.neutral,
.dashboard-obligation-amount.money-neutral { color: var(--money-neutral); }

.dashboard-obligation-status {
  margin-top: 5px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.dashboard-section-title,
.dashboard-summary-label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 700;
}

.dashboard-section-title {
  padding: 9px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-activity-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-activity-row {
  appearance: none;
  width: 100%;
  min-width: 0;
  min-height: 76px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.14s ease, box-shadow 0.14s ease;
}

.dashboard-activity-row:last-child {
  border-right: none;
}

.dashboard-activity-row:hover {
  background: var(--bg-elevated);
}

.dashboard-activity-row:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--accent);
}

.dashboard-activity-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 14px;
}

.dashboard-activity-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dashboard-activity-label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 700;
}

.dashboard-activity-copy strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-activity-copy span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 11.5px;
}

.dashboard-activity-amount {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-activity-action {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
}

.dashboard-activity-empty {
  color: var(--text-muted);
}

.dashboard-summary-ledger {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard-summary-row {
  position: relative;
  min-height: 86px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 9px;
  padding: 13px 34px 13px 16px;
  border-right: 1px solid var(--border);
}

.dashboard-summary-row:last-child { border-right: none; }

.dashboard-summary-detail {
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--text-muted);
}

.dashboard-summary-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  color: color-mix(in srgb, var(--text-secondary) 86%, var(--text-muted));
}

.dashboard-summary-value.accent,
.dashboard-summary-value.green,
.dashboard-summary-value.money-income {
  color: color-mix(in srgb, var(--money-income) 62%, var(--text-secondary));
}
.dashboard-summary-value.red,
.dashboard-summary-value.money-expense {
  color: color-mix(in srgb, var(--money-expense) 62%, var(--text-secondary));
}
.dashboard-summary-value.yellow,
.dashboard-summary-value.money-gst-collected,
.dashboard-summary-value.money-warning { color: color-mix(in srgb, var(--money-warning) 82%, var(--text-primary)); }
.dashboard-summary-value.money-gst-credit {
  color: color-mix(in srgb, var(--money-gst-credit) 56%, var(--text-secondary));
}
.dashboard-summary-value.neutral,
.dashboard-summary-value.money-neutral { color: var(--money-neutral); }

.dashboard-tax-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-tax-row {
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 13px 16px;
  border-right: 1px solid var(--border);
}

.dashboard-tax-row:last-child { border-right: none; }

.dashboard-month-cards {
  display: flex;
  gap: 0;
  padding: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  background: var(--bg-surface);
}

.dashboard-month-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 300px;
  width: 300px;
  min-height: 0;
  background: var(--bg-surface);
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  scroll-snap-align: start;
}

.dashboard-month-card:last-child { border-right: none; }

.dashboard-month-card-muted {
  background: color-mix(in srgb, var(--bg-surface) 86%, var(--bg-base));
}

.dashboard-month-card-muted .dashboard-month-card-head {
  background:
    repeating-linear-gradient(
      135deg,
      transparent 0,
      transparent 9px,
      color-mix(in srgb, var(--text-muted) 7%, transparent) 9px,
      color-mix(in srgb, var(--text-muted) 7%, transparent) 10px
    ),
    color-mix(in srgb, var(--bg-elevated) 62%, var(--bg-base));
}

.dashboard-month-card-muted .dashboard-month-card-title,
.dashboard-month-card-muted .dashboard-month-card-practice-name,
.dashboard-month-card-muted .dashboard-month-card-line strong {
  color: color-mix(in srgb, var(--text-secondary) 58%, var(--text-muted));
}

.dashboard-month-card-muted .dashboard-month-card-total,
.dashboard-month-card-muted .dashboard-month-card-line.net strong {
  color: color-mix(in srgb, var(--money-income) 38%, var(--text-muted));
}

.dashboard-month-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 11px 14px 10px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.dashboard-month-card-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 750;
  color: color-mix(in srgb, var(--text-secondary) 88%, var(--text-muted));
}

.dashboard-month-card-sub {
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-muted);
}

.dashboard-month-card-sub span {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--text-muted) 28%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-muted) 10%, var(--bg-surface));
  color: color-mix(in srgb, var(--text-muted) 86%, var(--text-secondary));
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.dashboard-month-card-total {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: color-mix(in srgb, var(--money-income) 58%, var(--text-secondary));
  text-align: right;
  white-space: nowrap;
}

.dashboard-month-card-body {
  display: grid;
  grid-template-columns: 1fr;
}

.dashboard-month-card-practice {
  padding: 11px 14px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}

.dashboard-month-card-practice:last-child { border-bottom: none; }

.dashboard-month-card-practice-name {
  min-width: 0;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 700;
}

.dashboard-month-card-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
  font-size: 11.5px;
  color: var(--text-muted);
}

.dashboard-month-card-line strong {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 650;
  color: var(--text-secondary);
  white-space: nowrap;
}

.dashboard-month-card-line.net {
  margin-top: 4px;
  padding-top: 7px;
  border-top: 1px solid color-mix(in srgb, var(--border) 64%, transparent);
}

.dashboard-month-card-line.net strong {
  color: color-mix(in srgb, var(--money-income) 68%, var(--text-secondary));
  font-weight: 750;
}

.dashboard-chart-card {
  border-radius: var(--radius-lg);
  padding: 16px 20px 10px;
}

.dashboard-chart-card .chart-card-header {
  gap: 16px;
  align-items: flex-start;
}

.dashboard-chart-title-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.dashboard-chart-card .chart-card-title {
  color: color-mix(in srgb, var(--text-secondary) 82%, var(--text-muted));
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-chart-card .chart-legend {
  flex-wrap: wrap;
}

.dashboard-chart-card .chart-legend-item {
  min-height: 22px;
  padding: 0 7px;
  border-radius: 4px;
  background: transparent;
}

.dashboard-chart-toggle {
  flex-shrink: 0;
}

.dashboard-chart-toggle button {
  font-size: 11px;
  padding: 4px 9px;
}

.dashboard-chart-swatch {
  display: inline-block;
  width: 20px;
  height: 9px;
  margin-right: 6px;
  vertical-align: middle;
}

.dashboard-chart-swatch.trend-income {
  height: 3px;
  border-radius: 999px;
  background: var(--money-income);
}

.dashboard-chart-swatch.trend-expenses {
  height: 3px;
  border-radius: 999px;
  background: var(--money-expense);
}

.dashboard-chart-swatch.trend-received {
  height: 3px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, var(--chart-accent, var(--accent)) 0 5px, transparent 5px 9px);
}

.dashboard-practice-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(104px, 1fr));
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  font-size: 12.5px;
}

.dashboard-practice-row:last-child { border-bottom: none; }

.dashboard-practice-header {
  min-height: 34px;
  background: var(--bg-base);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard-practice-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-weight: 600;
}

.dashboard-practice-num {
  justify-self: end;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.dashboard-practice-num.green {
  color: var(--money-income);
  font-weight: 700;
}

@media (max-width: 1180px) {
  .dashboard-obligations,
  .dashboard-latest-activity,
  .dashboard-tax-strip {
    grid-template-columns: 1fr;
  }

  .first-actions-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-activity-list {
    grid-template-columns: 1fr;
  }

  .dashboard-obligation-row,
  .dashboard-activity-row,
  .dashboard-tax-row {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .dashboard-obligation-row:last-child,
  .dashboard-activity-row:last-child,
  .dashboard-tax-row:last-child {
    border-bottom: none;
  }

  .dashboard-summary-ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-summary-row {
    border-bottom: 1px solid var(--border);
  }

  .dashboard-summary-row:nth-child(2n) {
    border-right: none;
  }

  .dashboard-summary-row:last-child {
    border-bottom: none;
  }
}

@media (max-width: 860px) {
  .dashboard-obligations,
  .dashboard-latest-activity,
  .dashboard-workbench,
  .dashboard-tax-strip,
  .dashboard-month-ledger,
  .chart-card {
    margin-left: 20px;
    margin-right: 20px;
  }

  .dashboard-obligation-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .dashboard-obligation-meta {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .dashboard-summary-ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-summary-row,
  .dashboard-summary-row:nth-child(2n),
  .dashboard-summary-row:nth-child(odd) {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .dashboard-summary-ledger-five > .dashboard-summary-row:first-child {
    grid-column: 1 / -1;
  }

  .dashboard-summary-ledger-five > .dashboard-summary-row:nth-child(even) {
    border-right: 1px solid var(--border);
  }

  .dashboard-summary-ledger-five > .dashboard-summary-row:nth-last-child(-n + 2) {
    border-bottom: none;
  }

  .dashboard-tax-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-tax-row {
    grid-template-columns: 1fr;
    border-bottom: none;
    border-right: 1px solid var(--border);
  }

  .dashboard-tax-row:last-child {
    border-right: none;
  }

  .dashboard-practice-table {
    overflow-x: auto;
  }

  .dashboard-practice-row {
    min-width: 560px;
  }

  .dashboard-chart-card .chart-card-header {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-chart-toggle {
    width: 100%;
  }

  .dashboard-chart-toggle button {
    flex: 1;
  }
}

@media (max-width: 760px) {
  .dashboard-obligations,
  .dashboard-latest-activity,
  .dashboard-workbench,
  .dashboard-tax-strip,
  .dashboard-month-ledger,
  .chart-card,
  .worth-checking-card {
    margin-left: 16px;
    margin-right: 16px;
  }

  .dashboard-obligations,
  .dashboard-latest-activity,
  .dashboard-workbench,
  .dashboard-tax-strip,
  .dashboard-month-ledger {
    margin-top: 14px;
    margin-bottom: 14px;
    border-radius: 8px;
  }

  .dashboard-obligation-row,
  .dashboard-activity-row,
  .dashboard-tax-row {
    min-height: 0;
    padding: 12px 14px;
  }

  .dashboard-activity-list {
    grid-template-columns: 1fr;
  }

  .dashboard-activity-row {
    grid-template-columns: 26px minmax(0, 1fr) auto;
  }

  .dashboard-activity-amount {
    font-size: 15px;
  }

  .dashboard-summary-row {
    min-height: 0;
    padding: 12px 28px 12px 14px;
  }

  .dashboard-summary-value {
    font-size: 16px;
  }

  .dashboard-chart-card {
    padding: 14px 14px 10px;
    overflow-x: auto;
  }

  .dashboard-chart-svg {
    min-width: 0;
  }

  .dashboard-month-card {
    flex-basis: min(280px, 82vw);
    width: min(280px, 82vw);
  }

  .first-actions-panel {
    margin-left: 16px;
    margin-right: 16px;
  }
}

/* ── DASHBOARD HERO ── */
.dash-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 14px;
  padding: 22px 36px 20px;
}

.dash-hero-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dash-hero-right .hero-stat-card { flex: 1; }

.hero-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  position: relative;
}
.hero-stat-card.hero-tnr  { display: flex; flex-direction: column; }

.hero-value    { font-size: 34px !important; font-weight: 650 !important; letter-spacing: 0 !important; }
.hero-value-sm { font-size: 23px !important; }

.worth-checking-card {
  margin: 0 36px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}

.worth-checking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.worth-checking-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.worth-checking-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-muted);
}

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

.worth-checking-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-base);
}

.worth-checking-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--accent-glow);
  font-size: 15px;
}

.worth-checking-item.amber .worth-checking-icon {
  color: var(--accent2);
  background: color-mix(in srgb, var(--accent2) 11%, transparent);
}

.worth-checking-item.green .worth-checking-icon {
  color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, transparent);
}

.worth-checking-copy {
  min-width: 0;
}

.worth-checking-item-title {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 3px;
}

.worth-checking-item-detail {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

.worth-checking-dismiss {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  padding: 0;
}

.worth-checking-dismiss:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

@media (max-width: 1120px) {
  .first-actions-list { grid-template-columns: 1fr; }
  .first-action-item {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    grid-template-rows: auto;
    min-height: 72px;
    align-items: center;
  }
  .worth-checking-list { grid-template-columns: 1fr; }
  .worth-checking-item { grid-template-columns: 28px minmax(0, 1fr) auto 24px; }
}
