/* ========================================
   FINAEASE - Bootstrap 5 Optimized Styles
   Most layout and spacing now uses BS5 utility classes
   ======================================== */

/* ========================================
   GLOBAL STYLES
   ======================================== */
:root {
  color-scheme: light;
  --app-text-on-light: #0f1724;
  --app-text-on-dark: #ffffff;
  --app-text-default: var(--app-text-on-light);
  --app-text-inverse: var(--app-text-on-dark);
  --app-text-muted: #6b7280;
  /* Brand / theme — shared by marketing (fe-acquisition) and signed-in app */
  --fe-brand: #0d9488;
  --fe-brand-deep: #0f766e;
  --fe-brand-dark: #134e4a;
  --fe-brand-rgb: 13, 148, 136;
  --fe-page-bg: #faf8f5;
  --fe-warm-glow: rgba(245, 158, 11, 0.09);
  --fe-ink: #1c1917;
  --bs-primary: var(--fe-brand);
  --bs-primary-rgb: var(--fe-brand-rgb);
  --bs-link-color: var(--fe-brand-deep);
  --bs-link-hover-color: var(--fe-brand-dark);
  /* Main page column: wider band on all screens (was ~95vw / 1400px) */
  --fe-page-content-max: 1680px;
  --fe-page-content-vw: 98vw;
}

body {
  font-family:
    "Plus Jakarta Sans", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--fe-page-bg);
  color: var(--app-text-default);
}

/* Landing-style warm mint page wash site-wide (light mode); blue navbar/footer unchanged via overrides below */
body:not(.theme-dark) {
  background-image:
    radial-gradient(
      ellipse 110% 75% at 50% -18%,
      rgba(13, 148, 136, 0.16),
      transparent 52%
    ),
    radial-gradient(
      ellipse 70% 55% at 100% 0%,
      var(--fe-warm-glow),
      transparent 50%
    ),
    linear-gradient(180deg, #f0fdfa 0%, #faf8f5 42%, #f5f0e8 100%);
  color: var(--fe-ink);
}

body:not(.theme-dark) h1,
body:not(.theme-dark) h2,
body:not(.theme-dark) h3,
body:not(.theme-dark) .h1,
body:not(.theme-dark) .h2,
body:not(.theme-dark) .h3,
body:not(.theme-dark) .h4,
body:not(.theme-dark) .h5 {
  letter-spacing: -0.02em;
}

body:not(.theme-dark) ::selection {
  background-color: rgba(13, 148, 136, 0.28);
  color: inherit;
}

/* Main content column — wide band site-wide (matches public chrome via .fe-page-inner) */
.container {
  width: 100%;
  max-width: min(var(--fe-page-content-vw), var(--fe-page-content-max));
}

.marketing-container,
.legal-page {
  max-width: min(var(--fe-page-content-vw), var(--fe-page-content-max));
}

.container-fluid.fe-page-inner {
  max-width: min(var(--fe-page-content-vw), var(--fe-page-content-max));
  margin-left: auto;
  margin-right: auto;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--fe-brand-deep);
  outline-offset: 2px;
}

.app-flash-alert {
  margin-top: 0.75rem;
}

.finaease-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1080;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid rgba(15, 23, 36, 0.08);
  box-shadow: 0 -6px 24px rgba(15, 23, 36, 0.08);
}

.finaease-cookie-banner-inner {
  max-width: min(var(--fe-page-content-vw), var(--fe-page-content-max));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.finaease-cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 576px) {
  .finaease-cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }
}

.text-neutral {
  color: var(--app-text-default) !important;
}

.text-neutral-on-light {
  color: var(--app-text-on-light) !important;
}

.text-neutral-on-dark {
  color: var(--app-text-on-dark) !important;
}

.text-neutral-muted {
  color: var(--app-text-muted) !important;
}

/* Bootstrap overrides for better UX */
.table td,
.table th {
  vertical-align: middle;
}

/* ========================================
   NAVBAR & HEADER
   ======================================== */
.navbar {
  position: relative;
  padding-top: 0.05rem;
  padding-bottom: 0.05rem;
}

.navbar-brand {
  padding-left: 4px !important;
  margin-right: auto;
}

.navbar-brand .navbar-logo {
  height: 34px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

.navbar > .container-fluid {
  padding-left: 2px;
  padding-right: 2px;
}

.nav-link.active-page {
  color: #e6e6e6 !important;
  font-weight: 600;
}

.settings-btn {
  font-size: 1.25rem;
  padding: 0.25rem 0.5rem;
  line-height: 1;
}

/* Hide brand text on small screens */
@media (max-width: 575.98px) {
  .navbar-brand .brand-text {
    display: none;
  }
}

/* Signin error banner */
.signin-error-banner {
  position: absolute;
  top: 100%;
  right: 16px;
  transform: translateY(8px);
  background: #d92323;
  color: #ffeb3b;
  font-weight: 600;
  padding: 10px 18px;
  border: 2px solid #a80000;
  border-radius: 6px;
  max-width: 360px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  z-index: 1050;
  line-height: 1.2;
}

@media (max-width: 767.98px) {
  .signin-error-banner {
    right: 50%;
    left: 50%;
    transform: translate(-50%, 8px);
  }
}

/* Settings dropdown positioning */
.navbar .nav-item.dropdown .dropdown-menu.dropdown-menu-end {
  right: 12px !important;
  left: auto !important;
  min-width: 220px;
}

@media (max-width: 576px) {
  .navbar .nav-item.dropdown .dropdown-menu.dropdown-menu-end {
    right: 8px !important;
  }
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  font-size: 0.95rem;
}

/* Classic blue chrome: main app header + shared footer (buttons/widgets elsewhere stay brand teal via --bs-primary) */
nav.navbar.navbar-dark.bg-primary {
  background-color: #0d6efd !important;
}

.site-footer.bg-primary {
  background-color: #0d6efd !important;
}

/* ========================================
   FORMS & INPUTS
   ======================================== */
.form-control,
.form-select {
  background-color: #ffffff;
  color: var(--app-text-default);
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  box-shadow: none;
}

.form-control::placeholder {
  color: #94a3b8;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--fe-brand);
  box-shadow: 0 0 0 0.12rem rgba(var(--fe-brand-rgb), 0.18);
}

.form-control[readonly],
.form-control[disabled],
.form-select[disabled] {
  background-color: #f8fafc;
}

/* ========================================
   MODALS - Bootstrap 5 Standard Styling
   ======================================== */
.modal .modal-dialog {
  max-width: 860px;
}

.modal .modal-content {
  background: #fff;
  color: var(--app-text-default);
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.175);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal .modal-header {
  background: #fff;
  border-bottom: 1px solid #dee2e6;
  padding: 1rem 1.25rem;
  align-items: center;
}

.modal .modal-title {
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0;
  color: var(--app-text-default);
}

.modal .modal-body {
  padding: 1.25rem;
  background: #fff;
}

.modal .modal-footer {
  background: #fff;
  border-top: 1px solid #dee2e6;
  padding: 1rem 1.25rem;
}

.modal .form-control {
  background: #fff;
  color: var(--app-text-default);
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  box-shadow: none;
}

.modal .form-control:focus {
  outline: none;
  box-shadow: 0 0 0 0.25rem rgba(var(--fe-brand-rgb), 0.28);
  border-color: #5eead4;
}

.modal .form-select {
  background: #fff;
  color: var(--app-text-default);
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
}

.modal .form-select:focus {
  border-color: #5eead4;
  box-shadow: 0 0 0 0.25rem rgba(var(--fe-brand-rgb), 0.28);
}

.modal textarea.form-control {
  min-height: 80px;
}

.modal .form-label {
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--app-text-default);
}

.modal .btn-close {
  filter: none;
  opacity: 0.5;
}

.modal .btn-close:hover {
  opacity: 1;
}

@media (min-width: 992px) {
  .modal .modal-dialog {
    max-width: 920px;
  }
}

/* Signup Modal */
#signupModal .modal-dialog {
  max-width: 680px;
}

#signupModal .modal-content {
  max-height: calc(100vh - 48px);
  border-radius: 8px;
}

#signupModal .modal-body {
  overflow: auto;
  padding: 12px 18px;
}

#signupModal .mb-3 {
  margin-bottom: 0.5rem !important;
}

#signupModal .modal-title {
  font-size: 1.05rem;
}

@media (max-height: 700px) {
  #signupModal .modal-content {
    max-height: calc(100vh - 24px);
  }
  #signupModal .modal-body {
    padding: 10px;
  }
}

/* Account Modal */
#accountModal .modal-content,
#addAccountModal .modal-content {
  background-color: #fbfbfd;
  max-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
}

#accountModal .modal-body,
#addAccountModal .modal-body {
  overflow: auto;
  flex: 1 1 auto;
  padding-bottom: 0.5rem;
}

#accountModal .modal-footer,
#addAccountModal .modal-footer {
  flex-shrink: 0;
}

#addAccountModal .modal-dialog {
  max-width: 720px;
  margin: 20px auto;
}

@media (max-width: 767.98px) {
  #addAccountModal .modal-dialog {
    max-width: 96%;
    margin: 8px auto;
  }
  #addAccountModal .modal-content {
    max-height: calc(100vh - 12px);
  }
  #addAccountModal .modal-body {
    padding: 0.6rem;
  }
  #addAccountModal .modal-header,
  #addAccountModal .modal-footer {
    padding: 0.5rem 0.75rem;
  }
}

/* ========================================
   TRANSACTION MODAL - Bootstrap 5 Standard
   ======================================== */
.transaction-modal .modal-content,
#transactionModal .modal-content {
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}

.transaction-modal .modal-dialog,
#transactionModal .modal-dialog {
  margin: 1.75rem auto;
  max-width: 1000px;
}

/* App shell chrome (sidebar/nav/dropdowns up to ~1085) must sit below all modals */
body.fe-app-shell-layout .modal,
body.fe-admin-users-page .modal {
  --bs-modal-zindex: 1090;
  z-index: var(--bs-modal-zindex);
}

body.fe-app-shell-layout .modal-backdrop,
body.fe-admin-users-page .modal-backdrop {
  --bs-backdrop-zindex: 1085;
  z-index: var(--bs-backdrop-zindex);
}

/* When open, keep dialog above backdrop (Bootstrap may not raise variable on .show alone) */
body.fe-app-shell-layout .modal.show,
body.fe-admin-users-page .modal.show {
  z-index: var(--bs-modal-zindex, 1090);
}

body.fe-app-shell-layout .modal-backdrop.show,
body.fe-admin-users-page .modal-backdrop.show {
  z-index: var(--bs-backdrop-zindex, 1085);
}

.transaction-modal .modal-header,
#transactionModal .modal-header {
  background: #fff;
  color: var(--app-text-default);
  border-bottom: 1px solid #dee2e6;
  padding: 1rem 1.25rem;
}

.transaction-modal .modal-title,
#transactionModal .modal-title {
  margin: 0;
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--app-text-default);
}

.transaction-modal .modal-body,
#transactionModal .modal-body {
  background: #fff;
  padding: 1.25rem;
  overflow: auto;
  flex: 1 1 auto;
}

.transaction-modal .modal-footer,
#transactionModal .modal-footer {
  padding: 1rem 1.25rem;
  flex-shrink: 0;
  background: #fff;
  border-top: 1px solid #dee2e6;
}

.transaction-modal .form-select,
.transaction-modal .form-control,
#transactionModal .form-select,
#transactionModal .form-control {
  min-height: 38px;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
}

.transaction-modal .form-label,
#transactionModal .form-label {
  font-weight: 500;
  color: var(--app-text-default);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

/* Transaction modal responsive sizing */
@media (max-width: 991.98px) {
  .transaction-modal .modal-dialog,
  #transactionModal .modal-dialog {
    max-width: 95%;
  }
}

/* ========================================
   CHECKBOOK PAGE SPECIFIC
   ======================================== */
#transactionsCard {
  margin-top: 0.25rem;
}

#transactionsCard .card-header,
#transactionsCard .transactions-card-header {
  padding: 0.35rem 0.6rem 0.2rem;
}

/* App pages: wide content band with modest side inset (desktop) */
body.fe-app-shell-layout .checkbook-page-shell.container-fluid,
body.fe-app-shell-layout #main-content > .container-fluid {
  max-width: min(97.5vw, var(--fe-page-content-max));
}

@media (min-width: 992px) {
  /* Checkbook: register uses 94% of the light main column (viewport minus sidebar). */
  body.fe-app-shell-layout:has(#main-content .checkbook-page-shell) {
    --fe-checkbook-content-width: calc(
      (100vw - var(--fe-app-sidebar-width) - 0.7rem) * 0.94
    );
    padding-left: calc(var(--fe-app-sidebar-width) + 0.35rem);
    padding-right: 0.35rem;
  }

  body.fe-app-shell-layout.fe-sidebar-collapsed:has(
      #main-content .checkbook-page-shell
    ) {
    --fe-checkbook-content-width: calc((100vw - 0.7rem) * 0.94);
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  body.fe-app-shell-layout:has(#main-content .checkbook-page-shell)
    #main-content {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  body.fe-app-shell-layout:has(#main-content .checkbook-page-shell)
    #main-content
    > .container-fluid {
    width: 100%;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
  }

  body.fe-app-shell-layout .checkbook-page-shell.container-fluid {
    width: var(--fe-checkbook-content-width);
    max-width: var(--fe-checkbook-content-width);
    padding-left: 0;
    padding-right: 0;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
  }

  .checkbook-page-shell #transactionsCard,
  .checkbook-page-shell #transactionsCard .card-body,
  .checkbook-page-shell #transactionsCard .table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: visible;
  }

  .checkbook-page-shell .transactions-table {
    width: 100%;
    table-layout: fixed;
  }

  .checkbook-page-shell .balances-toolbar,
  .checkbook-page-shell .checkbook-balances-row-wrap {
    width: 100%;
    max-width: 100%;
  }

  .checkbook-page-shell .td-payee {
    max-width: none;
  }

  /* Register column widths (10 columns) — tuned for wide desktop layout */
  .checkbook-page-shell .transactions-table col.col-select {
    width: 2.25%;
  }
  .checkbook-page-shell .transactions-table col.col-actions {
    width: 3%;
  }
  .checkbook-page-shell .transactions-table col.col-date {
    width: 9%;
  }
  .checkbook-page-shell .transactions-table col.col-payee {
    width: 18%;
  }
  .checkbook-page-shell .transactions-table col.col-memo {
    width: 11%;
  }
  .checkbook-page-shell .transactions-table col.col-category {
    width: 18%;
  }
  .checkbook-page-shell .transactions-table col.col-status {
    width: 10%;
  }
  .checkbook-page-shell .transactions-table col.col-amount {
    width: 9%;
  }
  .checkbook-page-shell .transactions-table col.col-posted {
    width: 9%;
  }
  .checkbook-page-shell .transactions-table col.col-current {
    width: 9%;
  }

  .checkbook-page-shell .transactions-table thead th:nth-child(1),
  .checkbook-page-shell .transactions-table tbody td:nth-child(1) {
    width: 2.25%;
  }
  .checkbook-page-shell .transactions-table thead th:nth-child(2),
  .checkbook-page-shell .transactions-table tbody td:nth-child(2) {
    width: 3%;
  }
  .checkbook-page-shell .transactions-table thead th:nth-child(3),
  .checkbook-page-shell .transactions-table tbody td:nth-child(3) {
    width: 9%;
  }
  .checkbook-page-shell .transactions-table thead th:nth-child(4),
  .checkbook-page-shell .transactions-table tbody td:nth-child(4) {
    width: 18%;
  }
  .checkbook-page-shell .transactions-table thead th:nth-child(5),
  .checkbook-page-shell .transactions-table tbody td:nth-child(5) {
    width: 11%;
  }
  .checkbook-page-shell .transactions-table thead th:nth-child(6),
  .checkbook-page-shell .transactions-table tbody td:nth-child(6) {
    width: 18%;
  }
  .checkbook-page-shell .transactions-table thead th:nth-child(7),
  .checkbook-page-shell .transactions-table tbody td:nth-child(7) {
    width: 10%;
  }
  .checkbook-page-shell .transactions-table thead th:nth-child(8),
  .checkbook-page-shell .transactions-table tbody td:nth-child(8) {
    width: 9%;
  }
  .checkbook-page-shell .transactions-table thead th:nth-child(9),
  .checkbook-page-shell .transactions-table tbody td:nth-child(9) {
    width: 9%;
  }
  .checkbook-page-shell .transactions-table thead th:nth-child(10),
  .checkbook-page-shell .transactions-table tbody td:nth-child(10) {
    width: 9%;
  }

  .checkbook-page-shell .transactions-table thead th:nth-child(7),
  .checkbook-page-shell .transactions-table tbody td:nth-child(7) {
    text-align: center;
  }

  .checkbook-page-shell .transactions-table thead th:nth-child(8),
  .checkbook-page-shell .transactions-table tbody td:nth-child(8),
  .checkbook-page-shell .transactions-table thead th:nth-child(9),
  .checkbook-page-shell .transactions-table tbody td:nth-child(9),
  .checkbook-page-shell .transactions-table thead th:nth-child(10),
  .checkbook-page-shell .transactions-table tbody td:nth-child(10) {
    text-align: right;
    padding-left: 0.35rem !important;
    padding-right: 0.4rem !important;
  }

  .checkbook-page-shell .transactions-table tbody td:nth-child(6) {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.checkbook-page-shell #transactionsCard {
  width: 100%;
  max-width: 100%;
}

/* Mobile: same width band as checkbook register across app pages */
@media (max-width: 991.98px) {
  body.fe-app-shell-layout {
    --fe-page-edge: max(0.65rem, env(safe-area-inset-left, 0px));
    --fe-page-edge-right: max(0.65rem, env(safe-area-inset-right, 0px));
  }

  body.fe-app-shell-layout #main-content > .container-fluid {
    width: calc(100vw - var(--fe-page-edge) - var(--fe-page-edge-right));
    max-width: calc(100vw - var(--fe-page-edge) - var(--fe-page-edge-right));
    margin-left: calc(50% - 50vw + var(--fe-page-edge));
    margin-right: calc(50% - 50vw + var(--fe-page-edge-right));
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
  }

  body.fe-app-shell-layout #main-content > .container-fluid > .container,
  body.fe-app-shell-layout #main-content > .container-fluid > .container-fluid,
  body.fe-app-shell-layout #main-content .accounts-page-shell,
  body.fe-app-shell-layout #main-content .budget-page-shell,
  body.fe-app-shell-layout #main-content .settings-page-shell,
  body.fe-app-shell-layout #main-content .checkbook-page-shell,
  body.fe-app-shell-layout #main-content .admin-users-shell,
  body.fe-app-shell-layout #main-content .admin-dashboard-shell,
  body.fe-app-shell-layout #main-content .dashboard-page,
  body.fe-app-shell-layout #main-content .recurease-list-page,
  body.fe-app-shell-layout #main-content .fe-page-inner {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
  }

  body.fe-app-shell-layout #main-content .fe-tools-scope {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .checkbook-page-shell {
    margin-bottom: 1rem;
    padding-left: 0;
    padding-right: 0;
  }

  .checkbook-mobile-search,
  .checkbook-mobile-register.container-fluid {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

  #transactionSearchMobileWrap {
    margin-top: 0;
    margin-bottom: 0.35rem;
  }

  #transactionSearchMobileWrap + .mobile-checkbook {
    margin-top: 0.35rem;
  }

  .mobile-checkbook.container-fluid {
    margin-top: 0 !important;
    padding-top: 0;
  }

  .mobile-checkbook .card {
    margin-top: 0;
    width: 100%;
    max-width: 100%;
  }

  .mobile-checkbook .mobile-tx-item,
  .mobile-checkbook .mobile-tx-headers .tx-row-1,
  .mobile-checkbook .mobile-tx-headers .tx-row-2 {
    padding-left: 0.35rem;
    padding-right: calc(
      0.35rem + var(--fe-mobile-register-scroll-gutter, calc(1.85rem + 0.2rem))
    );
  }

  .mobile-checkbook .card-header {
    padding-left: 0.45rem;
    padding-right: 0.45rem;
  }
}

@media (max-width: 760px) {
  #transactionsCard {
    display: none !important;
  }
}

/* Desktop sticky header clone: never show below tablet breakpoint (table thead is hidden; clone width can collapse and overlap column labels). */
@media (max-width: 768.98px) {
  .sticky-header-wrapper {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

@media (max-width: 760px) {
  #actionRow {
    margin-bottom: 0 !important;
  }
  #transactionsCard {
    margin-top: 0 !important;
  }
  #transactionsCard .card-header {
    padding-top: 0.2rem !important;
    padding-bottom: 0.2rem !important;
  }
  #actionRow .btn,
  #actionRow a.btn {
    margin-bottom: 0 !important;
  }
}

/* Confirm Modal */
#confirmModal .modal-dialog {
  max-width: 380px;
}

#confirmModal .modal-body {
  padding: 0.75rem 1rem;
  text-align: center;
  font-weight: 600;
}

#confirmModal .modal-footer {
  padding: 0.4rem 0.6rem;
  justify-content: center;
  gap: 0.5rem;
}

#confirmModal .btn {
  padding: 0.35rem 0.6rem;
  font-size: 0.95rem;
}

/* ========================================
   TRANSACTIONS TABLE - RESPONSIVE
   ======================================== */

/* Desktop & Tablet: Traditional table view (769px and up) */
@media (min-width: 769px) {
  .transactions-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    display: table;
  }

  .transactions-table thead {
    display: table-header-group;
  }

  .transactions-table tbody {
    display: table-row-group;
  }

  .transactions-table tr {
    display: table-row;
  }

  .transactions-table th,
  .transactions-table td {
    display: table-cell;
  }

  .transactions-table th {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bs-light);
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.35rem 0.45rem;
    text-align: left;
  }

  /* Checkbook desktop: JS sticky-header clone handles pinning (CSS sticky here caused overlap at page top). */
  body.fe-app-shell-layout .checkbook-page-shell .transactions-table thead th {
    position: static;
    top: auto;
    z-index: auto;
  }

  .transactions-table td {
    padding: 0.45rem 0.5rem;
    vertical-align: middle;
    font-size: clamp(12px, 1.6vw, 14px);
  }

  .transactions-table tbody tr:nth-child(even) {
    background: #f8f9fa;
  }

  .transactions-table tbody tr:hover {
    background: #eef1f4;
  }

  .transactions-table th,
  .transactions-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Allow dropdown menus in action column to overflow */
  .transactions-table tbody td:nth-child(2) {
    overflow: visible;
  }

  /* Column widths */
  .transactions-table thead th:nth-child(1),
  .transactions-table tbody td:nth-child(1) {
    width: 28px;
  }
  .transactions-table thead th:nth-child(2),
  .transactions-table tbody td:nth-child(2) {
    width: 40px;
  }
  .transactions-table thead th:nth-child(3),
  .transactions-table tbody td:nth-child(3) {
    width: 110px;
  }
  .transactions-table thead th:nth-child(4),
  .transactions-table tbody td:nth-child(4) {
    width: 22%;
  }
  .transactions-table thead th:nth-child(5),
  .transactions-table tbody td:nth-child(5) {
    width: 28%;
  }
  .transactions-table thead th:nth-child(6),
  .transactions-table tbody td:nth-child(6) {
    width: 90px;
  }
  .transactions-table thead th:nth-child(7),
  .transactions-table tbody td:nth-child(7) {
    width: 130px;
  }
  .transactions-table thead th:nth-child(8),
  .transactions-table tbody td:nth-child(8) {
    width: 95px;
  }
  .transactions-table thead th:nth-child(9),
  .transactions-table tbody td:nth-child(9) {
    width: 95px;
  }
  .transactions-table thead th:nth-child(10),
  .transactions-table tbody td:nth-child(10) {
    width: 95px;
  }
  .transactions-table thead th:nth-child(11),
  .transactions-table tbody td:nth-child(11) {
    width: 110px;
  }

  /* Amount, Posted Balance, Current Balance - smaller font, right align, and minimal padding */
  .transactions-table thead th:nth-child(8),
  .transactions-table tbody td:nth-child(8),
  .transactions-table thead th:nth-child(9),
  .transactions-table tbody td:nth-child(9),
  .transactions-table thead th:nth-child(10),
  .transactions-table tbody td:nth-child(10) {
    font-size: 0.85rem;
    text-align: right;
    padding-left: 0.05rem !important;
    padding-right: 0.05rem !important;
  }
}

/* Tablet: Compact table header */
@media (min-width: 769px) and (max-width: 1200px) {
  .transactions-table th {
    padding: 0.25rem 0.35rem;
    font-size: 13px;
  }
}

/* Mobile: Card-based view (768px and below) */
@media (max-width: 768px) {
  .transactions-table,
  .transactions-table tbody {
    display: block;
    width: 100%;
  }

  .transactions-table thead {
    display: none;
  }

  .transactions-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    gap: 0.15rem 0.75rem;
    margin-bottom: 0.5rem;
    border: none;
    border-left: 3px solid #dee2e6;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    padding: 0.5rem 0.75rem;
    position: relative;
  }

  .transactions-table tr:hover {
    background: #f8f9fa;
  }

  /* All table cells as grid items */
  .transactions-table td {
    display: flex;
    align-items: center;
    padding: 0.15rem 0;
    border: none;
    white-space: normal;
    overflow: visible;
  }

  /* Remove all ::before labels */
  .transactions-table td::before {
    display: none;
  }

  /* Hide checkbox, memo, category, posted balance on mobile */
  .transactions-table td.td-select,
  .transactions-table td.td-memo,
  .transactions-table td.td-category,
  .transactions-table td.td-posted {
    display: none;
  }

  /* Position actions menu in top right */
  .transactions-table td.actions-cell {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: auto !important;
    padding: 0;
  }

  /* Grid positioning */
  .transactions-table td.td-date {
    grid-column: 1 / 2;
    grid-row: 1;
    font-size: 0.875rem;
    color: var(--app-text-default);
    font-weight: 400;
  }

  .transactions-table td.td-payee {
    grid-column: 1 / 2;
    grid-row: 2;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--app-text-default);
  }

  .transactions-table td.td-status {
    grid-column: 2 / 3;
    grid-row: 2;
    justify-self: end;
    align-self: center;
  }

  .transactions-table td.td-amount {
    grid-column: 1 / 2;
    grid-row: 3;
    font-weight: 700;
    font-size: 1rem;
  }

  .transactions-table td.td-current {
    grid-column: 2 / 3;
    grid-row: 3;
    justify-self: end;
    align-self: center;
    font-weight: 400;
    font-size: 0.9rem;
  }

  /* Status badge compact styling */
  .transactions-table td.td-status .status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-weight: 700;
  }

  /* Hide inline mobile elements */
  .transactions-table .payee-line .inline-amount,
  .transactions-table .payee-line .inline-current {
    display: none;
  }

  /* Payee text ellipsis if too long */
  .transactions-table td.td-payee .payee-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
}

/* Common styles for all screen sizes */
.transactions-table th[col-sz-small] {
  width: 36px;
}

.transactions-table th[col-sz-action] {
  width: 44px;
}

.transactions-table th[col-sz-date] {
  width: 72px;
}

.transactions-table th[col-sz-amount] {
  width: 90px;
}

.transactions-table th.status-header {
  text-align: center;
  vertical-align: middle;
}

.transactions-table td.td-status {
  text-align: center;
  vertical-align: middle;
  overflow: visible;
}

.transactions-table td .status-badge {
  white-space: nowrap;
  line-height: 1;
  font-size: 0.85rem;
  padding: 0.22rem 0.6rem;
}

.transactions-table tbody td .payee-line .inline-amount,
.transactions-table tbody td .payee-line .inline-current,
.transactions-table tbody td.td-date .td-current-inline {
  display: none !important;
}

/* Make dropdown menu touch the 3 dots */
.transactions-table .dropdown-menu {
  margin-top: 0 !important;
}

/* Status badge cursor */
.status-badge {
  cursor: pointer;
}

.status-badge.no-pointer,
.status-badge[disabled] {
  cursor: not-allowed;
}

/* Actions cell popover */
.actions-cell {
  position: relative;
}

.actions-popover {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translate(8px, -50%);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.25rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  display: none;
  z-index: 2000;
  min-width: 140px;
}

.actions-popover.show {
  display: block;
}

.actions-popover a,
.actions-popover button {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25;
  color: var(--app-text-default);
}

.actions-popover a.open-edit,
.actions-popover button.open-edit {
  font-weight: 400;
  color: #1f2937;
}

.actions-popover a.open-edit:hover,
.actions-popover button.open-edit:hover {
  background: rgba(0, 0, 0, 0.06);
}

.actions-popover a:hover,
.actions-popover button:hover {
  background: rgba(0, 0, 0, 0.04);
  text-decoration: none;
}

.actions-popover .delete-btn {
  color: #dc3545 !important;
}

.recurease-actions-popover {
  min-width: 230px;
  padding: 0.35rem 0;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(15, 23, 42, 0.1);
  position: fixed !important;
  transform: none !important;
}

.recurease-actions-popover.show {
  display: block !important;
}

.recurease-actions-header {
  padding: 0.65rem 1rem 0.5rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.recurease-actions-header .title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
}

.recurease-actions-header .meta {
  font-size: 0.8rem;
  color: #6b7280;
}

.recurease-actions-list button {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 1rem;
  font-size: 0.92rem;
  color: #1f2937;
}

.recurease-actions-list button:hover,
.recurease-actions-list button:focus {
  background: rgba(var(--fe-brand-rgb), 0.1);
}

.recurease-actions-list .delete-btn {
  color: #dc3545;
  font-weight: 600;
}

.recurease-row-active {
  position: relative;
  background-color: rgba(var(--fe-brand-rgb), 0.1) !important;
  box-shadow: inset 0 0 0 1px rgba(var(--fe-brand-rgb), 0.45);
}

/* ========================================
   BALANCE PILLS
   ======================================== */
.balances-row {
  padding: 0;
  gap: 0.35rem;
}

/* Checkbook mobile/tablet: 2×2 grid; desktop: single row (see @media min-width 992px) */
.checkbook-page-shell .balances-toolbar .balances-row--totals {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row;
  gap: 0.4rem 0.35rem;
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  align-items: stretch;
}

.checkbook-page-shell .balances-toolbar .balances-row--totals .balance-pill {
  flex: none;
  width: 100%;
  max-width: none;
  min-width: 0;
}

/* Primary action — document + icon chip (distinct from gradient balance pills) */
.checkbook-page-shell .balances-toolbar .checkbook-add-transaction-btn,
.checkbook-page-shell .balances-toolbar #openAddTransaction {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0.4rem 0.95rem 0.4rem 0.5rem;
  border: 1px solid #d0d7de;
  border-radius: 12px;
  background: #fff;
  color: var(--fe-brand-dark, #134e4a);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.15s ease;
}

.checkbook-page-shell
  .balances-toolbar
  .checkbook-add-transaction-btn
  .transaction-plus-icon {
  position: relative;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  color: var(--fe-brand, #0d9488);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.checkbook-page-shell
  .balances-toolbar
  .checkbook-add-transaction-btn
  .transaction-plus-icon
  svg {
  display: block;
  width: 22px;
  height: 22px;
}

.checkbook-page-shell
  .balances-toolbar
  .checkbook-add-transaction-btn
  .transaction-plus-badge {
  position: absolute;
  bottom: -2px;
  right: -3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(13, 148, 136, 0.45);
  color: var(--fe-brand, #0d9488);
  font-size: 0.7rem;
  line-height: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.checkbook-page-shell .balances-toolbar .checkbook-add-transaction-label {
  color: inherit;
  font-weight: 600;
}

.checkbook-page-shell .balances-toolbar .checkbook-add-transaction-btn:hover,
.checkbook-page-shell .balances-toolbar #openAddTransaction:hover {
  background: #f0fdfa;
  border-color: var(--fe-brand, #0d9488);
  box-shadow: 0 0 0 2px rgba(var(--fe-brand-rgb, 13, 148, 136), 0.14);
  transform: translateY(-1px);
}

.checkbook-page-shell
  .balances-toolbar
  .checkbook-add-transaction-btn:focus-visible,
.checkbook-page-shell .balances-toolbar #openAddTransaction:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--fe-brand-rgb, 13, 148, 136), 0.35);
}

body.theme-dark
  .checkbook-page-shell
  .balances-toolbar
  .checkbook-add-transaction-btn,
body.theme-dark .checkbook-page-shell .balances-toolbar #openAddTransaction {
  background: #1e293b;
  border-color: rgba(148, 163, 184, 0.45);
  color: #e2e8f0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

body.theme-dark
  .checkbook-page-shell
  .balances-toolbar
  .checkbook-add-transaction-btn
  .transaction-plus-icon {
  color: #2dd4bf;
}

body.theme-dark
  .checkbook-page-shell
  .balances-toolbar
  .checkbook-add-transaction-btn
  .transaction-plus-badge {
  background: #1e293b;
  border-color: rgba(45, 212, 191, 0.55);
  color: #5eead4;
}

body.theme-dark
  .checkbook-page-shell
  .balances-toolbar
  .checkbook-add-transaction-btn:hover,
body.theme-dark
  .checkbook-page-shell
  .balances-toolbar
  #openAddTransaction:hover {
  background: rgba(15, 118, 110, 0.35);
  border-color: #2dd4bf;
}

@media (min-width: 992px) {
  .checkbook-page-shell .checkbook-balances-row-wrap > .col-12 {
    min-width: 0;
    max-width: 100%;
  }

  .checkbook-page-shell .balances-toolbar {
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
  }

  .checkbook-page-shell .balances-toolbar .checkbook-add-transaction-btn,
  .checkbook-page-shell .balances-toolbar #openAddTransaction {
    flex: 0 0 auto;
    align-self: center;
    margin-right: 0.25rem;
  }

  .checkbook-page-shell .balances-toolbar .balances-row--totals {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.45rem;
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    width: auto;
    overflow: hidden;
    padding-left: 0.55rem;
    border-left: 1px solid rgba(15, 23, 42, 0.14);
  }

  body.theme-dark
    .checkbook-page-shell
    .balances-toolbar
    .balances-row--totals {
    border-left-color: rgba(248, 250, 252, 0.12);
  }

  .checkbook-page-shell .balances-toolbar .balances-row--totals .balance-pill {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: 100%;
    padding: 0.48rem 0.55rem;
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.2;
    overflow: hidden;
    box-sizing: border-box;
  }

  .checkbook-page-shell .balances-toolbar .balance-pill .label {
    font-size: 0.74rem;
    font-weight: 700;
    flex: 1 1 auto;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .checkbook-page-shell .balances-toolbar .balance-pill span[data-currency] {
    font-size: 0.86rem;
    font-weight: 800;
    flex: 0 0 auto;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: visible;
  }

  .checkbook-page-shell .balances-toolbar .balance-pill .label-full {
    display: inline;
  }

  .checkbook-page-shell .balances-toolbar .balance-pill .label-compact {
    display: none;
  }

  .checkbook-page-shell #transactionsCard .transactions-card-header h5 {
    font-size: 1.05rem;
    font-weight: 800;
  }

  .checkbook-page-shell .transactions-table th {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.3rem 0.42rem;
    line-height: 1.1;
  }

  .checkbook-page-shell .transactions-table td {
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.4rem 0.45rem;
    line-height: 1.25;
  }

  .checkbook-page-shell .transactions-table thead th:nth-child(8),
  .checkbook-page-shell .transactions-table tbody td:nth-child(8),
  .checkbook-page-shell .transactions-table thead th:nth-child(9),
  .checkbook-page-shell .transactions-table tbody td:nth-child(9),
  .checkbook-page-shell .transactions-table thead th:nth-child(10),
  .checkbook-page-shell .transactions-table tbody td:nth-child(10) {
    font-size: 0.78rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    padding-left: 0.35rem !important;
    padding-right: 0.4rem !important;
  }

  .checkbook-page-shell .transactions-table tbody td:nth-child(8) .tx-amount,
  .checkbook-page-shell .transactions-table tbody td:nth-child(9) .tx-amount,
  .checkbook-page-shell .transactions-table tbody td:nth-child(10) .tx-amount,
  .checkbook-page-shell
    .transactions-table
    tbody
    td:nth-child(8)
    [data-currency],
  .checkbook-page-shell
    .transactions-table
    tbody
    td:nth-child(9)
    [data-currency],
  .checkbook-page-shell
    .transactions-table
    tbody
    td:nth-child(10)
    [data-currency] {
    font-size: inherit;
    font-variant-numeric: tabular-nums;
  }

  .checkbook-page-shell .transactions-table .status-badge {
    font-size: 0.72rem;
    padding: 0.15rem 0.4rem;
  }

  .checkbook-page-shell .transactions-table .form-select,
  .checkbook-page-shell .transactions-table .form-control {
    font-size: 0.78rem;
    padding: 0.2rem 0.35rem;
    min-height: 1.65rem;
  }

  .checkbook-page-shell
    .transactions-table
    .actions-popover
    button.tx-register-action {
    font-size: 0.8125rem;
  }

  .checkbook-page-shell .transactions-table thead th {
    position: static;
    top: auto;
    z-index: auto;
  }
}

/* Medium desktop: shorter pill labels so amounts stay inside the balance card */
@media (min-width: 992px) and (max-width: 1399.98px) {
  .checkbook-page-shell .balances-toolbar .balance-pill .label-full {
    display: none;
  }

  .checkbook-page-shell .balances-toolbar .balance-pill .label-compact {
    display: inline;
  }
}

/* Fixed clone sits below shell chrome + register card header */
.sticky-header-wrapper {
  pointer-events: none;
  box-sizing: border-box;
  z-index: 1042;
  overflow: visible;
}

.sticky-register-scroll-btns {
  position: absolute;
  right: 0.35rem;
  bottom: 0.2rem;
  top: auto;
  transform: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  pointer-events: auto;
  z-index: 1075;
}

/* Desktop pinned register header: sit just right of the table (not over column labels). */
@media (min-width: 769px) {
  .sticky-header-wrapper .sticky-register-scroll-btns {
    right: auto;
    left: 100%;
    margin-left: 0.4rem;
    top: auto;
    bottom: 0.35rem;
    transform: none;
  }
}

.sticky-register-scroll-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0.2rem 0.45rem;
  font-size: 0.8rem;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.sticky-register-scroll-btn .bi {
  font-size: 1rem;
  line-height: 1;
}

.sticky-header-wrapper .sticky-header-table {
  pointer-events: none;
  background: var(--bs-light, #f8f9fa);
  border-collapse: collapse;
  table-layout: fixed;
}

.sticky-header-wrapper .sticky-header-table thead,
.sticky-header-wrapper .sticky-header-table thead * {
  pointer-events: auto;
}

.sticky-header-wrapper .sticky-header-table thead th {
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.1;
  vertical-align: middle;
  border-bottom-width: 1px;
  box-sizing: border-box;
}

.sticky-header-wrapper .sticky-header-select-all {
  pointer-events: auto;
  cursor: pointer;
}

body.fe-app-shell-layout.fe-sidebar-collapsed
  .sticky-header-wrapper
  .sticky-header-table
  thead
  th {
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

.checkbook-page-shell
  #transactionsCard
  .table-responsive.has-sticky-register-head {
  box-sizing: border-box;
}

.balance-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.42rem 0.62rem;
  border-radius: 0.65rem;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
  font-size: 0.82rem;
  min-width: 0;
  flex: 1 1 0;
  max-width: 10.5rem;
  line-height: 1.15;
}

.balance-pill .label {
  margin-right: 0.2rem;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 600;
}

.balance-pill span[data-currency] {
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

/* Match Dashboard balance stat cards (is-primary / is-success / is-accent / is-neutral) */
.pill-posted {
  background: linear-gradient(135deg, #1d4ed8 0%, #60a5fa 100%);
  color: #fff;
  border: none;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.pill-cleared {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  color: #fff;
  border: none;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.pill-entered {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  color: #fff;
  border: none;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.pill-planned {
  background: linear-gradient(135deg, #f8fafc 0%, #dbeafe 100%);
  color: #0f172a;
  border: none;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

/* Register row colors (.tx-amount) must not override balance pill text */
.balance-pill.pill-posted,
.balance-pill.pill-posted .label,
.balance-pill.pill-posted span[data-currency],
.balance-pill.pill-posted .tx-amount {
  color: #fff !important;
}

.balance-pill.pill-posted span[data-currency].negative,
.balance-pill.pill-posted .tx-amount.negative {
  color: #fecaca !important;
}

.balance-pill.pill-cleared,
.balance-pill.pill-cleared .label,
.balance-pill.pill-cleared span[data-currency],
.balance-pill.pill-cleared .tx-amount {
  color: #fff !important;
}

.balance-pill.pill-cleared span[data-currency].negative,
.balance-pill.pill-cleared .tx-amount.negative {
  color: #fecaca !important;
}

.balance-pill.pill-entered,
.balance-pill.pill-entered .label,
.balance-pill.pill-entered span[data-currency],
.balance-pill.pill-entered .tx-amount {
  color: #fff !important;
}

.balance-pill.pill-entered span[data-currency].negative,
.balance-pill.pill-entered .tx-amount.negative {
  color: #fecaca !important;
}

.balance-pill.pill-planned,
.balance-pill.pill-planned .label,
.balance-pill.pill-planned span[data-currency],
.balance-pill.pill-planned .tx-amount {
  color: #0f172a !important;
}

.balance-pill.pill-planned span[data-currency].negative,
.balance-pill.pill-planned .tx-amount.negative {
  color: #b91c1c !important;
}

@media (max-width: 767.98px) {
  .checkbook-page-shell .balances-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .checkbook-page-shell .balances-toolbar .checkbook-add-transaction-btn,
  .checkbook-page-shell .balances-toolbar #openAddTransaction {
    width: 100%;
    margin-bottom: 0.15rem;
    padding: 0.5rem 1rem;
    justify-content: center;
  }

  .checkbook-page-shell .balances-toolbar .balances-row--totals {
    padding-left: 0;
    border-left: none;
  }

  .checkbook-page-shell .balances-toolbar .balance-pill .label {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    opacity: 0.85;
  }

  .checkbook-page-shell .balances-toolbar .balance-pill.pill-planned .label {
    opacity: 0.72;
  }

  .checkbook-page-shell .balances-toolbar .balance-pill {
    flex: none;
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 0.36rem 0.48rem;
    font-size: 0.72rem;
    justify-content: space-between;
    gap: 0.22rem;
    line-height: 1.12;
  }

  .checkbook-page-shell .balances-toolbar .balance-pill .label {
    font-size: 0.64rem;
    margin-right: 0.12rem;
    flex: 1 1 auto;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .checkbook-page-shell .balances-toolbar .balance-pill span[data-currency] {
    font-size: 0.72rem;
    flex: 0 0 auto;
    flex-shrink: 0;
    text-align: right;
    white-space: nowrap;
    overflow: visible;
  }
}

@media (max-width: 575.98px) {
  .balance-pill {
    max-width: none;
    flex: 1 1 calc(33.333% - 0.35rem);
    min-width: 5.5rem;
    padding: 0.38rem 0.5rem;
  }

  .balance-pill .label {
    font-size: 0.68rem;
  }

  .checkbook-page-shell .balances-toolbar .balance-pill {
    flex: none;
    min-width: 0;
    padding: 0.34rem 0.42rem;
    font-size: 0.68rem;
  }

  .checkbook-page-shell .balances-toolbar .balance-pill .label {
    font-size: 0.6rem;
  }

  .checkbook-page-shell .balances-toolbar .balance-pill span[data-currency] {
    font-size: 0.68rem;
  }
}

/* ========================================
   ACCOUNT STRIPES & PILLS
   ======================================== */
.account-stripe {
  width: 8px;
  border-radius: 0 3px 3px 0;
  margin-right: 12px;
  display: inline-block;
  height: 40px;
  vertical-align: middle;
}

.account-stripe-left {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

.list-group-item.has-stripe {
  position: relative;
  padding-left: 16px;
}

.account-pill {
  background: transparent !important;
  font-weight: 600;
}

/* ========================================
   DASHBOARD - RECENT TRANSACTIONS
   ======================================== */
.dashboard-recent-tx-filtered-out {
  display: none !important;
}

.dashboard-recent-tx-filters .form-label {
  font-weight: 600;
}

.dashboard-recent-tx-limit-select {
  width: auto;
  min-width: 4.25rem;
}

.recent-item {
  gap: 0.25rem;
  min-height: 54px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.recent-left {
  min-width: 70px;
  flex-shrink: 0;
}

.recent-middle {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.recent-middle .fw-semibold {
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-middle .text-muted.small {
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-right {
  flex-shrink: 0;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.recent-right .account-pill-container {
  flex-shrink: 1;
  min-width: 0;
}

.recent-right .account-pill {
  font-size: 0.8rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-right .amount-value {
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.date-mobile {
  display: none;
}

@media (min-width: 1200px) {
  .recent-right {
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 0.25rem !important;
    min-width: 90px !important;
    margin-left: auto !important;
    display: flex !important;
  }

  .recent-right .amount-value {
    order: 0 !important;
    margin-top: 0 !important;
  }

  .recent-right .account-pill-container {
    order: 1 !important;
    align-self: flex-end !important;
    max-width: 160px !important;
    display: block !important;
  }
}

@media (max-width: 991px) {
  .recent-right .account-pill-container {
    display: none;
  }
}

@media (max-width: 767px) {
  .recent-item {
    min-height: 50px;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
  }
  .recent-left {
    min-width: 45px;
    font-size: 0.8rem;
  }
  .recent-middle .fw-semibold {
    font-size: 0.85rem;
  }
  .recent-middle .text-muted.small {
    font-size: 0.72rem;
  }
  .recent-right .amount-value {
    font-size: 0.9rem;
  }
  .date-desktop {
    display: none;
  }
  .date-mobile {
    display: inline;
  }
}

/* ========================================
   LANDING PAGE
   ======================================== */
.landing-logo {
  max-height: 192px;
  height: auto;
  width: auto;
  max-width: 100%;
  display: block;
  margin: 0 auto 16px;
}

.landing-tagline {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.landing-screenshots {
  text-align: center;
}

.landing-screenshots img,
.landing-screenshots svg {
  display: inline-block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 6px;
  box-shadow: 0 0.5rem 1rem rgba(2, 6, 23, 0.04);
  margin: 0 auto;
}

.landing-screenshots .col-md-6 {
  padding: 8px;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-delete {
  background-color: #c62828;
  color: #ffeb3b;
  font-weight: 800;
  border: 2px solid #b71c1c;
  padding-left: 1rem;
  padding-right: 1rem;
  text-decoration: none;
}

.btn-delete:hover,
.btn-delete:focus {
  background-color: #b71c1c;
  color: #fff59d;
  text-decoration: none;
}

/* ========================================
   AMOUNT & TRANSACTION STYLING
   ======================================== */
.tx-amount.negative {
  color: #dc3545 !important;
}

.tx-amount.positive {
  color: #198754 !important;
}

/* Toast center alignment */
.toast .toast-body {
  text-align: center;
}

.toast .d-flex {
  align-items: center;
  gap: 0.5rem;
}

/* ========================================
   CUSTOM BREAKPOINT COLUMNS
   ======================================== */
@media (min-width: 1200px) {
  .col-xl-35 {
    flex: 0 0 35%;
    max-width: 35%;
  }
  .col-xl-65 {
    flex: 0 0 65%;
    max-width: 65%;
  }
  .col-xl-40 {
    flex: 0 0 40%;
    max-width: 40%;
  }
  .col-xl-60 {
    flex: 0 0 60%;
    max-width: 60%;
  }
}

/* ========================================
   DARK THEME
   ======================================== */
body.theme-dark {
  color-scheme: dark;
  --app-text-on-light: #111827;
  --app-text-on-dark: #e5e7eb;
  --app-text-default: var(--app-text-on-dark);
  --app-text-inverse: var(--app-text-on-light);
  --app-text-muted: #9ca3af;
  background-color: #121417 !important;
  color: var(--app-text-default);
}

body.theme-dark .card,
body.theme-dark .modal-content,
body.theme-dark .dropdown-menu {
  background-color: #1e2328;
  color: var(--app-text-default);
  border-color: #2e353d;
}

body.theme-dark .table {
  color: var(--app-text-default);
}

body.theme-dark .table thead th {
  background: #1f2937;
  color: var(--app-text-default);
  border-color: #374151;
}

body.theme-dark .table-light {
  --bs-table-bg: #1f2937;
  --bs-table-color: #e5e7eb;
  --bs-table-border-color: #374151;
  background-color: #1f2937 !important;
  color: #e5e7eb !important;
  border-color: #374151 !important;
}

body.theme-dark .form-control,
body.theme-dark .form-select {
  background-color: #242b31;
  color: var(--app-text-default);
  border-color: #394048;
}

body.theme-dark .form-control:focus,
body.theme-dark .form-select:focus {
  border-color: var(--fe-brand);
  box-shadow: 0 0 0 0.15rem rgba(var(--fe-brand-rgb), 0.35);
}

body.theme-dark .navbar.bg-primary {
  background-color: #0d3d75 !important;
}

body.theme-dark .dropdown-item:hover,
body.theme-dark .actions-popover a:hover,
body.theme-dark .actions-popover button:hover {
  background-color: #2d343b;
}

body.theme-dark .site-footer {
  background: #0d3d75;
  color: var(--app-text-default);
}

body.theme-dark a {
  color: #93c5fd;
}

body.theme-dark a:hover {
  color: #bfdbfe;
}

body.theme-dark .dropdown-menu .dropdown-item {
  color: var(--app-text-default);
}

body.theme-dark .dropdown-menu .dropdown-item:hover {
  color: #ffffff;
  background-color: #2d343b;
}

body.theme-dark .text-muted {
  color: var(--app-text-muted) !important;
}

body.theme-dark .btn-outline-secondary {
  color: #e2e8f0;
  border-color: #94a3b8;
}

body.theme-dark .btn-outline-secondary:hover {
  background-color: #334155;
  color: #ffffff;
  border-color: #64748b;
}

body.theme-dark .transactions-table thead th {
  background: #1f2937 !important;
  color: var(--app-text-default) !important;
  border-bottom: 1px solid #374151 !important;
}

body.theme-dark .list-group-item {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
  color: var(--app-text-default) !important;
}

body.theme-dark .list-group-item .h6,
body.theme-dark .list-group-item h6,
body.theme-dark .list-group-item .mb-1 {
  color: var(--app-text-default) !important;
}

body.theme-dark .list-group-item p,
body.theme-dark .list-group-item .text-muted,
body.theme-dark .list-group-item small {
  color: var(--app-text-muted) !important;
}

body.theme-dark .list-group-item:hover {
  background-color: #253142 !important;
}

/* Mobile checkbook partial: scoped CSS uses fixed light-theme hex; restore contrast in dark mode */
body.theme-dark .mobile-checkbook .card-header {
  background: #1f2937 !important;
  border-bottom-color: #374151 !important;
}
body.theme-dark .mobile-checkbook #mobileTransactionRegisterHeader {
  color: var(--app-text-default) !important;
}
body.theme-dark .mobile-checkbook .mobile-tx-item {
  background: #1e2328 !important;
  border-bottom-color: #374151 !important;
}
body.theme-dark .mobile-checkbook .mobile-tx-item:hover {
  background: #253142 !important;
}
body.theme-dark .mobile-checkbook .tx-date,
body.theme-dark .mobile-checkbook .tx-payee,
body.theme-dark .mobile-checkbook .tx-current-balance,
body.theme-dark .mobile-checkbook .tx-posted-balance {
  color: var(--app-text-default) !important;
}
body.theme-dark .mobile-checkbook .tx-menu {
  color: #93c5fd !important;
}
body.theme-dark .mobile-checkbook .tx-status-title {
  color: var(--app-text-muted) !important;
}
body.theme-dark .mobile-checkbook .mobile-tx-headers {
  background: #1f2937 !important;
  border-bottom-color: #374151 !important;
}
body.theme-dark .mobile-checkbook .mobile-tx-headers .tx-date,
body.theme-dark .mobile-checkbook .mobile-tx-headers .tx-amount,
body.theme-dark .mobile-checkbook .mobile-tx-headers .tx-current-balance,
body.theme-dark .mobile-checkbook .mobile-tx-headers .tx-posted-balance,
body.theme-dark .mobile-checkbook .mobile-tx-headers .tx-payee {
  color: var(--app-text-default) !important;
}
body.theme-dark .mobile-checkbook .tx-headers-row .tx-current-balance.tx-header,
body.theme-dark .mobile-checkbook .tx-headers-row .tx-posted-balance.tx-header {
  color: var(--app-text-muted) !important;
}
body.theme-dark .mobile-checkbook .actions-popover {
  background: #1e2328 !important;
  border-color: #374151 !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45) !important;
}
body.theme-dark .mobile-checkbook .actions-popover button.tx-register-action {
  background: #1e2328 !important;
  color: var(--app-text-default) !important;
}
body.theme-dark
  .mobile-checkbook
  .actions-popover
  button.tx-register-action:hover {
  background: #253142 !important;
}
body.theme-dark
  .mobile-checkbook
  .actions-popover
  button.tx-register-action.delete-btn {
  color: #f87171 !important;
}

body.theme-dark .pill-posted {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: #fff;
  border: none;
}

body.theme-dark .pill-cleared {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  color: #fff;
  border: none;
}

body.theme-dark .pill-entered {
  background: linear-gradient(135deg, #020617 0%, #1e293b 100%);
  color: #fff;
  border: none;
}

body.theme-dark .pill-planned {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #e2e8f0;
  border: none;
}

body.theme-dark .balance-pill.pill-posted,
body.theme-dark .balance-pill.pill-posted .label,
body.theme-dark .balance-pill.pill-posted span[data-currency],
body.theme-dark .balance-pill.pill-posted .tx-amount,
body.theme-dark .balance-pill.pill-cleared,
body.theme-dark .balance-pill.pill-cleared .label,
body.theme-dark .balance-pill.pill-cleared span[data-currency],
body.theme-dark .balance-pill.pill-cleared .tx-amount,
body.theme-dark .balance-pill.pill-entered,
body.theme-dark .balance-pill.pill-entered .label,
body.theme-dark .balance-pill.pill-entered span[data-currency],
body.theme-dark .balance-pill.pill-entered .tx-amount {
  color: #fff !important;
}

body.theme-dark .balance-pill.pill-posted span[data-currency].negative,
body.theme-dark .balance-pill.pill-posted .tx-amount.negative,
body.theme-dark .balance-pill.pill-cleared span[data-currency].negative,
body.theme-dark .balance-pill.pill-cleared .tx-amount.negative,
body.theme-dark .balance-pill.pill-entered span[data-currency].negative,
body.theme-dark .balance-pill.pill-entered .tx-amount.negative {
  color: #fecaca !important;
}

body.theme-dark .balance-pill.pill-planned,
body.theme-dark .balance-pill.pill-planned .label,
body.theme-dark .balance-pill.pill-planned span[data-currency],
body.theme-dark .balance-pill.pill-planned .tx-amount {
  color: #e2e8f0 !important;
}

body.theme-dark .balance-pill.pill-planned span[data-currency].negative,
body.theme-dark .balance-pill.pill-planned .tx-amount.negative {
  color: #fecaca !important;
}

/* === BEGIN TRANSACTION MODAL - DARK THEME OVERRIDES === */
/* Dark theme transaction modal improvements */
body.theme-dark #transactionModal .form-select,
body.theme-dark #transactionModal .form-control {
  background-color: #242b31;
  color: #f8fafc;
  border-color: #4b5563;
}

body.theme-dark #transactionModal .form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23f8fafc' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3e%3cpath d='M4 6l4 4 4-4'/><\/svg>");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 16px;
  padding-right: 2.2rem;
}

body.theme-dark #transactionModal .form-select option {
  background-color: #1f2937;
  color: #f8fafc;
}
/* === END TRANSACTION MODAL - DARK THEME OVERRIDES === */

body.theme-dark #transactionModal .form-select:focus,
body.theme-dark #transactionModal .form-control:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 0.15rem rgba(96, 165, 250, 0.25);
}

body.theme-dark #transactionModal label.form-label.small {
  color: #e5e7eb;
}

body.theme-dark .dropdown-menu {
  color: #e5e7eb;
  background-color: #1f2937;
  border-color: #374151;
}

body.theme-dark .dropdown-item {
  color: #e5e7eb;
}

body.theme-dark .dropdown-item:hover {
  color: #ffffff;
  background-color: #334155;
}

/* Dark theme mobile transaction cards */
@media (max-width: 768px) {
  body.theme-dark .transactions-table tr {
    background: #1f2937;
    border-left-color: #4b5563;
  }

  body.theme-dark .transactions-table tr:hover {
    background: #374151;
  }

  body.theme-dark .transactions-table td {
    color: #f3f4f6;
  }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Desktop/Computer (large screens) */
@media (min-width: 1200px) {
  .container-fluid {
    max-width: min(var(--fe-page-content-vw), var(--fe-page-content-max));
    margin: 0 auto;
  }
  .transactions-table {
    font-size: 0.95rem;
  }
}

/* Tablet (769px to 1199px) */
@media (min-width: 769px) and (max-width: 1199px) {
  .balance-pill {
    max-width: 9.5rem;
    font-size: 0.8rem;
    padding: 0.4rem 0.55rem;
  }
  .transactions-table {
    font-size: 0.88rem;
  }
  .transactions-table th,
  .transactions-table td {
    padding: 0.5rem 0.4rem;
  }
  .transaction-modal .modal-dialog {
    max-width: 92%;
  }
}

/* Mobile and small tablets (up to 768px) */
@media (max-width: 768px) {
  .balance-pill {
    width: auto;
    max-width: none;
    margin: 0;
  }
  .btn {
    font-size: 0.9rem;
    padding: 0.45rem 0.9rem;
  }
  .transaction-modal .modal-dialog {
    max-width: 96%;
    margin: 12px auto;
  }

  /* Remove horizontal scroll on mobile since we use cards */
  .table-responsive {
    overflow-x: visible;
  }
}

/* Phone (below 576px) */
@media (max-width: 575.98px) {
  .navbar {
    padding-top: 0.12rem;
    padding-bottom: 0.12rem;
  }
  .balance-pill {
    font-size: 0.85rem;
    padding: 8px 12px;
    gap: 8px;
  }
  .btn {
    width: 100%;
    margin-bottom: 0.5rem;
    font-size: 0.88rem;
  }

  /* Dashboard header buttons remain inline */
  .dashboard-page .card-header .btn {
    width: auto !important;
    margin: 0 !important;
    padding: 0.28rem 0.5rem !important;
    font-size: 0.82rem !important;
    white-space: nowrap;
  }

  .accounts-page-shell > .d-flex .btn,
  .settings-page-shell .d-flex.gap-2 .btn,
  .budget-page-shell .d-flex.gap-2 .btn,
  .recurease-list-page .d-flex.gap-2 .btn {
    width: auto !important;
    margin-bottom: 0 !important;
  }

  /* === BEGIN TRANSACTION MODAL - SMALL-SCREEN TWEAKS === */
  .transaction-modal .modal-dialog {
    max-width: 98%;
    margin: 4px auto;
  }
  .transaction-modal .modal-content {
    max-height: calc(100vh - 8px);
  }

  /* Tighter card spacing on very small screens */
  .transactions-table tr {
    margin-bottom: 0.4rem;
    padding: 0.4rem 0.6rem;
    gap: 0.1rem 0.5rem;
  }

  .transactions-table td {
    padding: 0.1rem 0;
  }

  .transactions-table td.td-date {
    font-size: 0.8rem;
  }

  .transactions-table td.td-payee {
    font-size: 0.85rem;
  }

  .transactions-table td.td-amount {
    font-size: 0.95rem;
  }

  .transactions-table td.td-current {
    font-size: 0.85rem;
  }

  .transactions-table td.td-status .status-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }
}

/* Very small phones (below 400px) */
@media (max-width: 399.98px) {
  body {
    font-size: 0.88rem;
  }
  .balance-pill {
    font-size: 0.8rem;
    padding: 6px 10px;
  }
  .transaction-modal .modal-title {
    font-size: 0.92rem;
  }

  /* Even tighter transaction cards */
  .transactions-table tr {
    padding: 0.35rem 0.5rem;
    margin-bottom: 0.35rem;
    gap: 0.08rem 0.4rem;
  }

  .transactions-table td.td-date {
    font-size: 0.75rem;
  }

  .transactions-table td.td-payee {
    font-size: 0.8rem;
  }

  .transactions-table td.td-amount {
    font-size: 0.9rem;
  }

  .transactions-table td.td-current {
    font-size: 0.8rem;
  }

  .transactions-table td.td-status .status-badge {
    font-size: 0.65rem;
    padding: 0.18rem 0.45rem;
  }
}

/* Landscape orientation for phones/tablets */
@media (max-height: 500px) and (orientation: landscape) {
  .transaction-modal .modal-dialog {
    margin: 4px auto;
    max-width: 98%;
  }
  .transaction-modal .modal-content {
    max-height: calc(100vh - 8px);
  }
}
/* === END TRANSACTION MODAL - SMALL-SCREEN TWEAKS === */

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
  .navbar,
  .site-footer,
  .btn,
  .actions-cell,
  .modal {
    display: none !important;
  }
  .transactions-table {
    font-size: 10pt;
  }
  body {
    background: white;
    color: black;
  }
  .card {
    border: 1px solid #000;
    box-shadow: none;
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Bootstrap .text-body* tracks data-bs-theme; reinforce when using body.theme-dark */
body.theme-dark .text-body {
  color: var(--app-text-default) !important;
}
body.theme-dark .text-body-secondary {
  color: var(--app-text-muted) !important;
}
body.theme-dark .text-body-emphasis {
  color: #f9fafb !important;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 44px;
    padding: 0.6rem 1rem;
  }
  .nav-link {
    padding: 0.6rem 0.8rem;
  }
  .action-toggle {
    min-width: 44px;
    min-height: 44px;
  }
  .actions-popover a:hover,
  .actions-popover button:hover {
    background: transparent;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .form-control,
  .form-select {
    border-width: 2px;
  }
  .btn {
    border-width: 2px;
    font-weight: 700;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .modal.fade .modal-dialog {
    transition: none;
  }
}

/* ========================================
   ACQUISITION / MARKETING SHELL (body.fe-acquisition only)
   ======================================== */
body.fe-acquisition {
  --fe-accent: var(--fe-brand);
  --fe-accent-deep: var(--fe-brand-deep);
  --fe-accent-dark: var(--fe-brand-dark);
  --fe-muted: #57534e;
  --fe-surface: #ffffff;
  --fe-surface-soft: #f5f0e8;
}

body.fe-acquisition .navbar.navbar-light {
  background: rgba(255, 253, 250, 0.94) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(13, 148, 136, 0.12) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 4px 28px rgba(28, 25, 23, 0.06);
}

body.fe-acquisition .navbar.navbar-light .btn-primary.btn-sm {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
}

body.fe-acquisition .fe-page-hero {
  background: linear-gradient(145deg, #fffefb 0%, #f0fdfa 55%, #ecfdf5 100%);
  border: 1px solid rgba(13, 148, 136, 0.14);
  border-radius: 1rem;
  box-shadow:
    0 8px 36px rgba(13, 148, 136, 0.08),
    0 2px 12px rgba(28, 25, 23, 0.04);
}

body.fe-acquisition .fe-surface {
  background: var(--fe-surface);
  border: 1px solid rgba(13, 148, 136, 0.12);
  border-radius: 1rem;
  box-shadow: 0 6px 28px rgba(28, 25, 23, 0.06);
}

body.fe-acquisition .fe-surface-soft {
  background: linear-gradient(180deg, #faf8f5 0%, #f5f0e8 100%);
  border: 1px solid rgba(120, 113, 108, 0.12);
  border-radius: 1rem;
}

body.fe-acquisition .fe-auth-panel {
  background: var(--fe-surface);
  border: 1px solid rgba(13, 148, 136, 0.14);
  border-radius: 1rem;
  box-shadow:
    0 10px 44px rgba(13, 148, 136, 0.1),
    0 4px 16px rgba(28, 25, 23, 0.06);
}

body.fe-acquisition .fe-plan-card .card {
  border-radius: 1rem;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

body.fe-acquisition .fe-plan-card .card:hover {
  box-shadow: 0 14px 44px rgba(13, 148, 136, 0.12);
}

body.fe-acquisition .fe-surface > .card-body .card,
body.fe-acquisition .fe-surface .card-body .card {
  border-radius: 0.75rem;
  border: 1px solid rgba(13, 148, 136, 0.1);
  box-shadow: 0 2px 14px rgba(28, 25, 23, 0.05);
}

body.fe-acquisition .fe-step-tile {
  border-radius: 0.75rem;
  border: 1px solid rgba(120, 113, 108, 0.14);
  background: var(--fe-surface);
  box-shadow: 0 2px 14px rgba(28, 25, 23, 0.05);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

body.fe-acquisition .fe-step-tile:hover {
  border-color: rgba(13, 148, 136, 0.45);
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.12);
}

body.fe-acquisition .fe-landing-hero {
  padding: 2rem 1.25rem 2.25rem;
}

@media (min-width: 768px) {
  body.fe-acquisition .fe-landing-hero {
    padding: 2.75rem 2.5rem 3rem;
  }
}

body.fe-acquisition .fe-landing-final-cta {
  border-radius: 1rem;
  background: linear-gradient(
    135deg,
    var(--fe-accent) 0%,
    var(--fe-accent-dark) 100%
  );
  box-shadow: 0 14px 44px rgba(13, 148, 136, 0.38);
}

body.fe-acquisition .btn-primary:not(.disabled) {
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.3);
}

body.fe-acquisition .btn-primary:not(.disabled):hover {
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.4);
}

body.fe-acquisition .btn-lg {
  padding: 0.65rem 1.35rem;
  border-radius: 0.55rem;
}

body.fe-acquisition .landing-logo {
  filter: drop-shadow(0 4px 14px rgba(13, 148, 136, 0.15));
}

body.fe-acquisition .landing-screenshots img,
body.fe-acquisition .landing-screenshots svg {
  border-radius: 0.75rem;
  border: 1px solid rgba(13, 148, 136, 0.15);
  box-shadow: 0 14px 44px rgba(28, 25, 23, 0.1);
}

body.fe-acquisition .fe-trust-strip li {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.1);
  color: var(--fe-ink, #1c1917);
}

body.fe-acquisition .fe-testimonial {
  border-radius: 0.75rem;
  border: 1px solid rgba(13, 148, 136, 0.12);
  background: rgba(255, 255, 255, 0.92);
}

body.fe-acquisition .card.shadow-sm {
  box-shadow: 0 6px 28px rgba(28, 25, 23, 0.07) !important;
  border-radius: 1rem;
}

body.fe-acquisition .form-control,
body.fe-acquisition .form-select {
  border-radius: 0.5rem;
}

/* ========================================
   2026 VISUAL REDESIGN SYSTEM
   ======================================== */
:root {
  --fe-app-sidebar-width: 290px;
  --fe-shell-gap: 1.15rem;
  --fe-shell-radius: 1.5rem;
  --fe-shell-border: rgba(148, 163, 184, 0.22);
  --fe-shell-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --fe-app-surface: rgba(255, 255, 255, 0.88);
  --fe-app-surface-strong: rgba(255, 255, 255, 0.98);
  --fe-app-ink: #0f172a;
  --fe-app-muted: #64748b;
  --fe-app-accent: #2563eb;
  --fe-app-accent-strong: #1d4ed8;
  --fe-app-sidebar-bg: linear-gradient(
    180deg,
    #0f172a 0%,
    #142850 40%,
    #1d4ed8 100%
  );
  --fe-app-sidebar-ink: rgba(255, 255, 255, 0.92);
  --fe-app-sidebar-muted: rgba(255, 255, 255, 0.66);
  --fe-app-sidebar-active: rgba(255, 255, 255, 0.14);
  --fe-app-mobile-dock-bg: linear-gradient(
    90deg,
    #0f172a 0%,
    #142850 40%,
    #1d4ed8 100%
  );
  --fe-app-card-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
}

body.fe-app-shell-layout {
  /* Sticky register thead / similar: offset below fixed shell chrome (see max-width 991 + fe-sidebar-collapsed). */
  --fe-app-sticky-chrome-top: 0px;
  --fe-app-shell-logo-height: 48px;
  --fe-app-shell-header-band: var(--fe-app-shell-logo-height);
  --fe-app-shell-header-fade:
    radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.18), transparent 42%),
    radial-gradient(
      circle at 100% 0%,
      rgba(16, 185, 129, 0.12),
      transparent 36%
    ),
    linear-gradient(
      180deg,
      #f8fbff 0%,
      rgba(243, 246, 251, 0.82) 58%,
      transparent 100%
    );
  background-image:
    radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.18), transparent 34%),
    radial-gradient(
      circle at 100% 0%,
      rgba(16, 185, 129, 0.12),
      transparent 28%
    ),
    linear-gradient(180deg, #f8fbff 0%, #f3f6fb 42%, #eef3f9 100%);
  color: var(--fe-app-ink);
}

body.fe-app-shell-layout #main-content {
  padding-top: 0.35rem;
}

.fe-app-shell-top-band {
  display: none;
}

.fe-app-shell-collapsed-brand {
  display: none;
}

/* Collapsed sidebar + mobile: full-width header bar (site-header) */
body.fe-app-shell-layout.fe-sidebar-collapsed .fe-app-shell-top-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  z-index: 1038;
  box-sizing: border-box;
  margin: 0;
  line-height: 0;
  background-color: transparent;
  background-image: var(--fe-app-shell-header-fade);
  background-repeat: no-repeat;
  background-size: 100% calc(100% + 1.35rem);
  background-position: top center;
  padding: env(safe-area-inset-top, 0px)
    max(24px, env(safe-area-inset-right, 0px)) 0
    max(24px, env(safe-area-inset-left, 0px));
  border-bottom: none;
  box-shadow: none;
}

body.fe-app-shell-layout.fe-sidebar-collapsed
  .fe-app-shell-collapsed-brand.site-header {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  text-decoration: none;
}

body.fe-app-shell-layout.fe-sidebar-collapsed
  .fe-app-shell-collapsed-brand.site-header:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.5);
  outline-offset: -2px;
}

body.fe-app-shell-layout .fe-checkbook-header-balance-dock {
  display: none;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
  align-items: center;
  line-height: 1.2;
}

.checkbook-balance-scroll-sentinel {
  width: 100%;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
  visibility: hidden;
}

/* Checkbook balance pills docked in shell header or sidebar (compact chrome) */
.checkbook-balance-dock-chrome {
  display: none;
  align-items: center;
  gap: 0.22rem;
  max-width: 100%;
  min-width: 0;
}

.checkbook-balance-dock-chrome.active,
.navbar-balance-dock.checkbook-balance-dock-chrome.active {
  display: flex !important;
}

.checkbook-balance-dock-chrome .balances-row--header-dock {
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 0.18rem;
  flex: 0 1 auto;
  min-width: 0;
}

.checkbook-balance-dock-chrome .balance-pill {
  margin-bottom: 0;
  padding: 0.14rem 0.4rem;
  font-size: 0.62rem;
  font-weight: 800;
  min-width: 0;
  line-height: 1.1;
  gap: 0.2rem;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
}

.checkbook-balance-dock-chrome .balance-pill .label {
  font-size: 0.54rem;
  font-weight: 700;
  margin-right: 0.12rem;
  flex: 1 1 auto;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkbook-balance-dock-chrome .balance-pill .label-full {
  display: none;
}

.checkbook-balance-dock-chrome .balance-pill .label-compact {
  display: inline;
}

.checkbook-balance-dock-chrome .balance-pill span[data-currency] {
  font-size: 0.62rem;
  font-weight: 800;
  flex: 0 0 auto;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: visible;
}

body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
  .fe-checkbook-header-balance-dock {
  display: flex;
}

body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
  .fe-checkbook-header-balance-dock
  .checkbook-balance-dock-chrome {
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
  .fe-checkbook-header-balance-dock
  .balances-row--header-dock {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.28rem;
}

body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
  .fe-checkbook-header-balance-dock
  .balance-pill {
  width: auto;
  max-width: none;
  min-width: 0;
  flex: 0 1 auto;
  justify-content: space-between;
  padding: 0.2rem 0.48rem;
  font-size: 0.68rem;
  font-weight: 800;
  gap: 0.22rem;
}

body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
  .fe-checkbook-header-balance-dock
  .balance-pill
  .label {
  font-size: 0.58rem;
  font-weight: 700;
  flex: 1 1 auto;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
  .fe-checkbook-header-balance-dock
  .balance-pill
  span[data-currency] {
  font-size: 0.68rem;
  font-weight: 800;
  flex: 0 0 auto;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: visible;
}

body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
  .navbar.navbar-dark.bg-primary {
  display: none !important;
}

body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-sidebar-dock
  .fe-checkbook-sidebar-balance-dock {
  display: flex;
  overflow: visible;
  max-height: none;
}

body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-sidebar-dock
  .fe-checkbook-sidebar-balance-dock
  .checkbook-balance-dock-chrome {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  gap: 0.28rem;
  overflow: visible;
  max-height: none;
}

body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-sidebar-dock
  .fe-checkbook-sidebar-balance-dock
  .balances-row--header-dock {
  display: flex !important;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.28rem;
  width: 100%;
  overflow: visible;
  max-height: none;
}

body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-sidebar-dock
  .fe-checkbook-sidebar-balance-dock
  .balance-pill {
  padding: 0.34rem 0.48rem;
  font-size: 0.68rem;
  font-weight: 800;
  gap: 0.18rem;
  line-height: 1.15;
  min-width: 0;
  max-width: none;
  width: 100%;
  flex: none;
  white-space: normal;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
  justify-content: space-between;
}

body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-sidebar-dock
  .fe-checkbook-sidebar-balance-dock
  .balance-pill
  .label {
  font-size: 0.58rem;
  font-weight: 700;
  margin-right: 0.1rem;
  flex: 1 1 auto;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-sidebar-dock
  .fe-checkbook-sidebar-balance-dock
  .balance-pill
  span[data-currency] {
  font-size: 0.68rem;
  font-weight: 800;
  flex: 0 0 auto;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: visible;
}

body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-sidebar-dock
  .fe-checkbook-sidebar-balance-dock
  .balance-pill
  .label-full {
  display: none;
}

body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-sidebar-dock
  .fe-checkbook-sidebar-balance-dock
  .balance-pill
  .label-compact {
  display: inline;
}

.fe-app-shell-collapsed-brand.site-header .fe-app-shell-collapsed-brand-img {
  height: var(--fe-app-shell-logo-height);
  width: auto;
  max-width: min(18rem, 70vw);
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  object-fit: contain;
  object-position: left center;
}

body.fe-app-shell-layout .bg-body-tertiary.border-top.py-2 {
  background: transparent !important;
  border-color: transparent !important;
}

body.fe-app-shell-layout .card,
body.fe-app-shell-layout .modal-content,
body.fe-app-shell-layout .offcanvas,
body.fe-auth-page .card,
body.fe-acquisition .site-footer {
  border-radius: var(--fe-shell-radius);
}

body.fe-app-shell-layout .card,
body.fe-app-shell-layout .modal-content {
  border: 1px solid var(--fe-shell-border);
  background: var(--fe-app-surface);
  box-shadow: var(--fe-app-card-shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body.fe-app-shell-layout .card-header {
  background: transparent;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  padding: 1.1rem 1.25rem 0.95rem;
}

body.fe-app-shell-layout .card-body {
  padding: 1.25rem;
}

body.fe-app-shell-layout .list-group-item,
body.fe-app-shell-layout .table,
body.fe-app-shell-layout .table > :not(caption) > * > * {
  background: transparent;
}

body.fe-app-shell-layout .table thead th {
  background: rgba(37, 99, 235, 0.06);
  border-bottom-width: 1px;
}

body.fe-app-shell-layout .btn-primary,
body.fe-auth-page .btn-primary,
body.fe-acquisition .btn-primary:not(.disabled) {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #1d4ed8;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.24);
}

body.fe-app-shell-layout .btn-outline-primary,
body.fe-auth-page .btn-outline-primary,
body.fe-acquisition .btn-outline-primary {
  border-color: rgba(37, 99, 235, 0.28);
  color: #1d4ed8;
}

body.fe-app-shell-layout .btn-outline-primary:hover,
body.fe-auth-page .btn-outline-primary:hover,
body.fe-acquisition .btn-outline-primary:hover {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

body.fe-app-shell-layout .form-control,
body.fe-app-shell-layout .form-select,
body.fe-app-shell-layout .input-group-text,
body.fe-auth-page .form-control,
body.fe-auth-page .form-select {
  border-radius: 0.95rem;
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.fe-app-shell-layout .form-control:focus,
body.fe-app-shell-layout .form-select:focus,
body.fe-auth-page .form-control:focus,
body.fe-auth-page .form-select:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.12);
}

@media (min-width: 992px) {
  body.fe-app-shell-layout {
    padding-left: calc(var(--fe-app-sidebar-width) + 2rem);
  }

  body.fe-app-shell-layout.fe-sidebar-collapsed {
    padding-left: 1.25rem;
    --fe-app-sticky-chrome-top: calc(
      var(--fe-app-shell-header-band) + env(safe-area-inset-top, 0px)
    );
  }

  body.fe-app-shell-layout .navbar.navbar-dark.bg-primary {
    display: none;
    background: transparent !important;
    padding: 0;
  }

  body.fe-app-shell-layout .navbar.navbar-dark.bg-primary > .container-fluid {
    max-width: none;
    border: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.fe-app-shell-layout .navbar.navbar-dark.bg-primary .navbar-brand {
    display: none;
  }

  body.fe-app-shell-layout .navbar.navbar-dark.bg-primary .fe-app-topbar-title,
  body.fe-app-shell-layout .navbar.navbar-dark.bg-primary .navbar-toggler,
  body.fe-app-shell-layout
    .navbar.navbar-dark.bg-primary
    .app-nav-primary-route,
  body.fe-app-shell-layout .navbar.navbar-dark.bg-primary .navbar-collapse {
    display: none !important;
  }

  body.fe-app-shell-layout .navbar.navbar-dark.bg-primary .navbar-nav {
    margin-left: auto;
    gap: 0.45rem;
  }

  body.fe-app-shell-layout .navbar.navbar-dark.bg-primary .nav-link {
    color: var(--fe-app-ink) !important;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.7rem 1rem;
  }

  body.fe-app-shell-layout
    .navbar.navbar-dark.bg-primary
    .nav-link.dropdown-toggle,
  body.fe-app-shell-layout
    .navbar.navbar-dark.bg-primary
    .nav-link.nav-theme-toggle {
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.2);
  }

  body.fe-app-shell-layout .navbar.navbar-dark.bg-primary .nav-link:hover,
  body.fe-app-shell-layout .navbar.navbar-dark.bg-primary .nav-link:focus {
    background: rgba(37, 99, 235, 0.08);
    color: var(--fe-app-accent-strong) !important;
  }

  body.fe-app-shell-layout .navbar.navbar-dark.bg-primary .dropdown-menu {
    z-index: 1085;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  }

  body.fe-app-shell-layout .navbar.navbar-dark.bg-primary .navbar-balance-slot {
    flex: 1 1 auto;
    min-height: 0;
  }

  .fe-app-topbar-title {
    min-width: 12rem;
    margin-right: 1rem;
    color: var(--fe-app-ink);
  }

  .fe-app-topbar-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fe-app-muted);
    margin-bottom: 0.2rem;
  }

  body.fe-app-shell-layout.checkbook-balances-docked
    .navbar.navbar-dark.bg-primary {
    display: block;
    padding: 0.75rem 1.25rem 0.2rem;
  }

  body.fe-app-shell-layout.checkbook-balances-docked
    .navbar.navbar-dark.bg-primary
    > .container-fluid {
    align-items: center;
  }

  body.fe-app-shell-layout.fe-sidebar-collapsed.checkbook-balances-docked
    .navbar.navbar-dark.bg-primary
    > .container-fluid {
    padding-inline-start: 1.25rem;
  }

  body.fe-app-shell-layout.checkbook-balances-docked
    .navbar.navbar-dark.bg-primary
    .navbar-balance-slot {
    display: flex !important;
  }

  .fe-app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--fe-app-sidebar-width);
    padding: 0.5rem 0 0.72rem 0.625rem;
    z-index: 1036;
    transition: transform 0.22s ease;
    will-change: transform;
  }

  body.fe-app-shell-layout.fe-sidebar-collapsed .fe-app-sidebar {
    transform: translate3d(-100%, 0, 0);
    pointer-events: none;
  }

  body.fe-app-shell-layout.fe-sidebar-collapsed #main-content {
    padding-top: calc(
      var(--fe-app-shell-header-band) + env(safe-area-inset-top, 0px)
    );
  }
}

.fe-sidebar-expand-tab {
  display: none;
  position: fixed;
  left: 0.18rem;
  top: 50%;
  z-index: 1035;
  align-items: center;
  justify-content: center;
  width: 1.38rem;
  min-height: 2.7rem;
  margin-top: -1.35rem;
  padding: 0.32rem 0;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #2563eb;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.fe-sidebar-expand-tab:hover,
.fe-sidebar-expand-tab:focus-visible {
  background: rgba(255, 255, 255, 0.99);
  color: #1d4ed8;
  border-color: rgba(148, 163, 184, 0.4);
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.1);
  outline: none;
}

@media (min-width: 992px) {
  body.fe-app-shell-layout.fe-sidebar-collapsed .fe-sidebar-expand-tab {
    display: flex;
    left: 0.12rem;
  }
}

.fe-app-sidebar-inner {
  position: relative;
  overflow: visible;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem 0.65rem;
  color: var(--fe-app-sidebar-ink);
  background: var(--fe-app-sidebar-bg);
  border-radius: 0 1.55rem 1.55rem 0;
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.36);
}

.fe-app-sidebar-brand-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.22rem;
  width: 100%;
  margin: 0 0 0.15rem;
}

.fe-app-sidebar-brand {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: auto;
  margin: 0;
  padding: 0;
  color: #fff;
  text-decoration: none;
  overflow: visible;
}

.fe-checkbook-sidebar-balance-dock {
  display: none;
  width: 100%;
  min-width: 0;
  align-items: stretch;
  justify-content: flex-start;
  line-height: 1.05;
  overflow: visible;
}

body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-sidebar-dock
  .fe-app-sidebar-brand-row {
  gap: 0.35rem;
}

body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-sidebar-dock
  .fe-app-sidebar-brand-row
  .navbar-balance-dock.checkbook-balance-dock-chrome,
body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-sidebar-dock
  .fe-app-sidebar-brand-row
  .checkbook-balance-dock-chrome,
body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-sidebar-dock
  .fe-app-sidebar-brand-row
  .checkbook-balance-dock-chrome
  .balances-row--header-dock {
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: auto;
}

.fe-app-sidebar-brand:hover {
  color: #fff;
}

.fe-app-sidebar-brand::before,
.fe-app-sidebar-brand::after {
  display: none;
}

.fe-app-sidebar-lockup {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  margin: 0;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.16))
    drop-shadow(0 5px 12px rgba(4, 22, 52, 0.2));
}

.fe-app-sidebar-profile {
  padding: 0.62rem 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.06);
}

.fe-app-sidebar-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
}

.fe-app-sidebar-profile-head .fe-app-sidebar-kicker {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.fe-app-sidebar-kicker,
.fe-app-sidebar-label,
.fe-mobile-menu-label {
  font-size: 0.73rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fe-app-sidebar-kicker,
.fe-app-sidebar-label {
  color: rgba(255, 255, 255, 0.58);
}

.fe-app-sidebar-identity {
  margin-top: 0.14rem;
  font-weight: 700;
  color: #fff;
  word-break: break-word;
  font-size: 0.92rem;
}

.fe-app-sidebar-subtext {
  margin-top: 0.12rem;
  color: var(--fe-app-sidebar-muted);
  font-size: 0.78rem;
}

.fe-app-sidebar-profile-logout {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.3rem;
  padding: 0.28rem 0.52rem;
  border-radius: 0.8rem;
  color: #ff9f9f;
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.18);
  text-decoration: none;
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 700;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.fe-app-sidebar-profile-logout:hover,
.fe-app-sidebar-profile-logout:focus {
  color: #ffd3d3;
  background: rgba(220, 38, 38, 0.18);
  border-color: rgba(252, 165, 165, 0.3);
  transform: translateY(-1px);
}

.fe-app-sidebar-profile-logout i {
  font-size: 0.75rem;
}

/* Sign-out confirmation (fixed under clicked nav-logout-link) */
.fe-logout-confirm {
  position: fixed;
  z-index: 1085;
  max-width: min(14rem, calc(100vw - 0.75rem));
  padding: 0;
  border-radius: 0.4rem;
  box-shadow: 0 0.25rem 0.65rem rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  color: #212529;
}

.fe-logout-confirm.is-hidden {
  display: none !important;
}

.fe-logout-confirm-inner {
  padding: 0.4rem 0.5rem;
}

.fe-logout-confirm-title {
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  line-height: 1.25;
  color: #212529;
}

.fe-logout-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.fe-logout-confirm .fe-logout-confirm-btn {
  --bs-btn-padding-y: 0.15rem;
  --bs-btn-padding-x: 0.45rem;
  --bs-btn-font-size: 0.7rem;
  --bs-btn-line-height: 1.2;
  font-weight: 600;
}

.fe-logout-countdown {
  font-weight: 700;
}

body.theme-dark .fe-logout-confirm {
  background: #2b3035;
  border-color: rgba(255, 255, 255, 0.12);
  color: #e9ecef;
  box-shadow: 0 0.3rem 0.85rem rgba(0, 0, 0, 0.45);
}

body.theme-dark .fe-logout-confirm-title {
  color: #f8f9fa;
}

body.theme-dark .fe-logout-confirm .btn-outline-secondary {
  color: #e9ecef;
  border-color: rgba(255, 255, 255, 0.35);
}

body.theme-dark .fe-logout-confirm .btn-outline-secondary:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

.fe-app-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 auto;
  overflow: visible;
  padding-right: 0;
  min-height: 0;
  position: relative;
  z-index: 5;
  justify-content: flex-start;
}

.fe-app-sidebar-group + .fe-app-sidebar-group,
.fe-mobile-menu-group + .fe-mobile-menu-group {
  margin-top: 1rem;
}

.fe-app-sidebar-link,
.fe-app-sidebar-meta-link,
.fe-mobile-menu-link,
.fe-mobile-menu-sublink,
.fe-app-sidebar-sublink {
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.fe-app-sidebar-link,
.fe-app-sidebar-meta-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  border: 0;
  color: var(--fe-app-sidebar-ink);
  background: transparent;
  border-radius: 1rem;
  padding: 0.8rem 0.95rem;
  margin-top: 0.32rem;
  font-weight: 600;
}

.fe-app-sidebar-nav .fe-app-sidebar-label {
  font-size: 0.66rem;
  letter-spacing: 0.1em;
}

.fe-app-sidebar-nav .fe-app-sidebar-group + .fe-app-sidebar-group {
  margin-top: -0.18rem;
}

.fe-app-sidebar-nav > .fe-app-sidebar-group:last-of-type {
  margin-top: -0.18rem;
}

.fe-app-sidebar-nav
  > .fe-app-sidebar-group:last-of-type
  > .fe-app-sidebar-flyout
  > .fe-app-sidebar-disclosure {
  margin-top: 0;
}

/* Keep Manage directly under Tools — do not push the last group to the nav bottom when a flyout opens. */
.fe-app-sidebar-nav.fe-app-sidebar-nav--flyout-open
  > .fe-app-sidebar-group:last-of-type {
  margin-top: -0.18rem;
}

.fe-app-sidebar-flyout {
  position: relative;
}

.fe-app-sidebar-nav .fe-app-sidebar-link {
  gap: 0.62rem;
  padding: 0.5rem 0.7rem;
  margin-top: 0.06rem;
  border-radius: 0.88rem;
  font-size: 0.84rem;
  line-height: 1.2;
}

.fe-app-sidebar-nav .fe-app-sidebar-link i {
  font-size: 0.88rem;
}

.fe-app-sidebar-nav .fe-app-sidebar-disclosure > span {
  gap: 0.62rem !important;
}

.fe-app-sidebar-flyout > .fe-app-sidebar-flyout-panel.collapse,
.fe-app-sidebar-flyout > .fe-app-sidebar-flyout-panel.collapsing {
  position: absolute;
  left: 0.36rem;
  right: 0;
  top: calc(100% + 0.18rem);
  z-index: 80;
}

.fe-app-sidebar-flyout.is-dropup > .fe-app-sidebar-flyout-panel.collapse,
.fe-app-sidebar-flyout.is-dropup > .fe-app-sidebar-flyout-panel.collapsing {
  top: auto;
  bottom: calc(100% + 0.18rem);
}

/* Drop-up: nudge the trigger down slightly while a flyout is open so the panel clears the row above. */
.fe-app-sidebar-nav.fe-app-sidebar-nav--flyout-open
  .fe-app-sidebar-flyout.is-dropup
  > .fe-app-sidebar-disclosure {
  margin-top: 0.12rem;
}

.fe-app-sidebar-flyout-menu {
  padding: 0.34rem;
  margin-top: 0;
  padding-left: 0;
  gap: 0.18rem;
  border-radius: 0.88rem;
  background: linear-gradient(
    180deg,
    rgba(18, 33, 63, 0.98) 0%,
    rgba(11, 23, 48, 0.98) 100%
  );
  border: 1px solid rgba(132, 198, 255, 0.16);
  box-shadow: 0 16px 36px rgba(4, 12, 29, 0.34);
  backdrop-filter: blur(10px);
  overflow: visible;
  max-height: none;
}

.fe-app-sidebar-subflyout {
  position: relative;
}

.fe-app-sidebar-subflyout > .fe-app-sidebar-subflyout-panel.collapse,
.fe-app-sidebar-subflyout > .fe-app-sidebar-subflyout-panel.collapsing {
  position: absolute;
  left: 0.42rem;
  right: 0;
  z-index: 90;
}

.fe-app-sidebar-subflyout-up > .fe-app-sidebar-subflyout-panel.collapse,
.fe-app-sidebar-subflyout-up > .fe-app-sidebar-subflyout-panel.collapsing {
  bottom: calc(100% + 0.18rem);
}

.fe-app-sidebar-subflyout-menu {
  padding: 0.3rem;
  margin-top: 0;
  margin-left: 0;
  padding-left: 0;
  gap: 0.12rem;
  border-left: 0;
  border-radius: 0.82rem;
  background: linear-gradient(
    180deg,
    rgba(20, 38, 72, 0.99) 0%,
    rgba(11, 23, 48, 0.99) 100%
  );
  border: 1px solid rgba(132, 198, 255, 0.15);
  box-shadow: 0 14px 28px rgba(4, 12, 29, 0.3);
  overflow: visible;
  max-height: none;
}

.fe-app-sidebar-subnav-nested.fe-app-sidebar-subflyout-menu {
  margin-left: 0;
  padding-left: 0.3rem;
  border-left: 0;
}

.fe-app-sidebar-link i,
.fe-app-sidebar-meta-link i,
.fe-mobile-menu-link i {
  font-size: 1rem;
}

.fe-app-sidebar-link:hover,
.fe-app-sidebar-link:focus,
.fe-app-sidebar-meta-link:hover,
.fe-app-sidebar-meta-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.fe-app-sidebar-link.is-active {
  color: #fff;
  background: var(--fe-app-sidebar-active);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.fe-app-sidebar-disclosure {
  justify-content: space-between;
}

.fe-app-sidebar-disclosure[aria-expanded="true"] .fe-app-sidebar-chevron {
  transform: rotate(180deg);
}

.fe-app-sidebar-chevron {
  transition: transform 0.2s ease;
}

.fe-app-sidebar-subnav,
.fe-mobile-menu-subnav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-left: 0.5rem;
  margin-top: 0.3rem;
}

.fe-app-sidebar-sublink,
.fe-mobile-menu-sublink {
  display: block;
  padding: 0.55rem 0.8rem;
  border-radius: 0.85rem;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.92rem;
}

.fe-app-sidebar-nav .fe-app-sidebar-sublink {
  display: flex;
  align-items: center;
  gap: 0.52rem;
  width: 100%;
  padding: 0.38rem 0.62rem;
  border-radius: 0.72rem;
  font-size: 0.78rem;
}

.fe-app-sidebar-nav .fe-app-sidebar-sublink i {
  font-size: 0.82rem;
}

.fe-app-sidebar-sublink-button {
  border: 0;
  text-align: left;
  justify-content: space-between;
  background: transparent;
}

.fe-app-sidebar-sublink-button > span {
  gap: 0.52rem !important;
}

.fe-app-sidebar-subchevron {
  font-size: 0.72rem !important;
  transition: transform 0.2s ease;
}

.fe-app-sidebar-sublink-button[aria-expanded="true"]
  .fe-app-sidebar-subchevron {
  transform: rotate(180deg);
}

.fe-app-sidebar-subnav-nested {
  margin-top: 0.18rem;
  margin-left: 0.42rem;
  padding-left: 0.42rem;
  gap: 0.12rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.fe-app-sidebar-sublink-nested {
  padding: 0.32rem 0.52rem;
  font-size: 0.74rem;
}

.fe-app-sidebar-sublink:hover,
.fe-app-sidebar-sublink:focus,
.fe-mobile-menu-sublink:hover,
.fe-mobile-menu-sublink:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.fe-app-sidebar-sublink.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.fe-app-sidebar-subnav-divider {
  height: 1px;
  margin: 0.18rem 0.18rem 0.12rem;
  background: rgba(255, 255, 255, 0.12);
}

.fe-app-sidebar-empty {
  padding: 0.55rem 0.8rem;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.88rem;
}

.fe-app-sidebar-nav .fe-app-sidebar-empty {
  padding: 0.38rem 0.62rem;
  font-size: 0.76rem;
}

.fe-app-sidebar-tier {
  flex-shrink: 0;
  text-align: center;
  margin: 0.05rem 0.5rem 0 0.35rem;
  padding: 0 0.35rem;
  position: relative;
  z-index: 0;
}

.fe-app-sidebar-tier-line {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.5rem 0.65rem;
  width: 100%;
  margin-bottom: -0.72rem;
}

.fe-app-sidebar-tier-line .fe-app-sidebar-tier-label--free {
  letter-spacing: 0.12em;
}

.fe-app-sidebar-tier-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  padding: 0 0.15rem;
}

.fe-app-sidebar-tier-line--premium {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  width: 100%;
  margin-bottom: -0.72rem;
}

.fe-app-sidebar-tier-line--premium .fe-app-sidebar-tier-label--premium {
  margin-bottom: 0;
}

.fe-app-sidebar-tier-label--premium {
  margin-bottom: -0.85rem;
  color: #fde047;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.fe-app-sidebar-tier-trial {
  display: block;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: rgba(253, 224, 71, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  line-height: 1.3;
  max-width: 100%;
}

.fe-app-sidebar-tier-upgrade {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fffbeb;
  padding: 0.28rem 0.55rem;
  border-radius: 0.4rem;
  background: linear-gradient(
    135deg,
    rgba(250, 204, 21, 0.35) 0%,
    rgba(234, 88, 12, 0.32) 100%
  );
  border: 1px solid rgba(253, 224, 71, 0.55);
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.fe-app-sidebar-tier-upgrade:hover,
.fe-app-sidebar-tier-upgrade:focus-visible {
  color: #fff;
  background: linear-gradient(
    135deg,
    rgba(250, 204, 21, 0.55) 0%,
    rgba(234, 88, 12, 0.45) 100%
  );
  border-color: rgba(255, 251, 235, 0.75);
  transform: translateY(-1px);
  outline: none;
}

.fe-app-sidebar-edge-toggle-icon {
  line-height: 1;
  display: block;
  transition: transform 0.2s cubic-bezier(0.34, 1.45, 0.64, 1);
}

.fe-app-sidebar-edge-toggle .fe-app-sidebar-edge-toggle-icon {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  filter: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.fe-sidebar-expand-tab .fe-app-sidebar-edge-toggle-icon {
  font-size: 1.15rem;
  font-weight: 600;
  color: inherit;
  filter: none;
  text-shadow: none;
}

@media (min-width: 992px) {
  body.fe-app-shell-layout.fe-sidebar-collapsed .fe-app-sidebar-edge-toggle {
    display: none !important;
  }

  .fe-app-sidebar-edge-toggle {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translate(50%, -50%);
    z-index: 3;
    width: 1.08rem;
    min-height: 2.72rem;
    padding: 0.34rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: linear-gradient(180deg, #1a3f7a 0%, #0f2744 42%, #0c1929 100%);
    color: #fff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    transition:
      border-color 0.15s ease,
      box-shadow 0.15s ease,
      background 0.15s ease;
  }

  .fe-app-sidebar-edge-toggle:hover,
  .fe-app-sidebar-edge-toggle:focus-visible {
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: 2px 0 14px rgba(0, 0, 0, 0.3);
    background: linear-gradient(180deg, #1e4a8c 0%, #15355c 45%, #0f2038 100%);
    outline: none;
  }

  .fe-app-sidebar-edge-toggle:hover .fe-app-sidebar-edge-toggle-icon,
  .fe-app-sidebar-edge-toggle:focus-visible .fe-app-sidebar-edge-toggle-icon {
    transform: translateX(-1px);
  }
}

.fe-sidebar-expand-tab:hover .fe-app-sidebar-edge-toggle-icon,
.fe-sidebar-expand-tab:focus-visible .fe-app-sidebar-edge-toggle-icon {
  transform: translateX(2px);
}

.fe-mobile-menu-plan-tier {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fe-mobile-menu-plan-tier--premium {
  color: #fde047;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.fe-mobile-menu-plan-upgrade {
  flex-shrink: 0;
  white-space: nowrap;
  color: #fbbf24;
  letter-spacing: 0.04em;
}

.fe-mobile-menu-plan-upgrade:hover,
.fe-mobile-menu-plan-upgrade:focus-visible {
  color: #fcd34d;
  text-decoration: underline !important;
  outline: none;
}

.fe-app-sidebar-footer {
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.fe-app-sidebar-footer .fe-app-sidebar-meta-link {
  gap: 0.68rem;
  padding: 0.52rem 0.68rem;
  margin-top: 0;
  border-radius: 0.82rem;
  font-size: 0.82rem;
}

.fe-app-sidebar-footer .fe-app-sidebar-meta-link i {
  font-size: 0.88rem;
}

@media (max-width: 991.98px) {
  html:has(body.fe-app-shell-layout),
  body.fe-app-shell-layout {
    overflow-x: clip;
  }

  body.fe-app-shell-layout {
    padding-bottom: calc(4.42rem + env(safe-area-inset-bottom, 0px));
    --fe-app-sticky-chrome-top: calc(
      var(--fe-app-shell-header-band) + env(safe-area-inset-top, 0px)
    );
    --fe-mobile-register-scroll-gutter: calc(1.85rem + 0.2rem);
    --fe-mobile-register-scroll-right: 0;
  }

  body.fe-app-shell-layout.fe-mobile-dock-collapsed {
    padding-bottom: calc(1.68rem + env(safe-area-inset-bottom, 0px));
  }

  body.fe-app-shell-layout #main-content {
    min-width: 0;
    padding-top: calc(
      var(--fe-app-shell-header-band) + env(safe-area-inset-top, 0px)
    );
  }

  /* Bottom dock replaces the top bar: no blue navbar or hamburger; site-header lockup bar instead. */
  body.fe-app-shell-layout nav.navbar.navbar-expand-lg.navbar-dark.bg-primary {
    display: none !important;
  }

  body.fe-app-shell-layout .fe-app-shell-top-band,
  body.fe-app-shell-layout.fe-sidebar-collapsed .fe-app-shell-top-band {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    position: fixed;
    overflow: visible;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 1050;
    box-sizing: border-box;
    margin: 0;
    line-height: 0;
    background-color: transparent;
    background-image: var(--fe-app-shell-header-fade);
    background-repeat: no-repeat;
    background-size: 100% calc(100% + 1.35rem);
    background-position: top center;
    padding: env(safe-area-inset-top, 0px)
      max(24px, env(safe-area-inset-right, 0px)) 0
      max(24px, env(safe-area-inset-left, 0px));
    border-bottom: none;
    box-shadow: none;
  }

  body.fe-app-shell-layout .fe-app-shell-collapsed-brand.site-header {
    display: flex !important;
    align-items: center;
    flex: 0 1 auto;
    min-width: 0;
    text-decoration: none;
  }

  body.fe-app-shell-layout
    .fe-app-shell-collapsed-brand.site-header:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.5);
    outline-offset: -2px;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-app-shell-top-band {
    line-height: 1.15;
    align-items: center;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock {
    display: flex !important;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    line-height: 1.15;
    position: relative;
    z-index: 1;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock
    .checkbook-balance-dock-chrome {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock
    .balances-row--header-dock {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.26rem;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock
    .balance-pill {
    padding: 0.14rem 0.58rem;
    font-size: 0.56rem;
    font-weight: 500;
    line-height: 1.1;
    gap: 0.22rem;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
    max-width: 100%;
    width: 100%;
    flex: 0 0 auto;
    min-width: 0;
    justify-content: space-between;
    box-sizing: border-box;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock
    .balance-pill
    .label {
    font-size: 0.48rem;
    font-weight: 500;
    line-height: 1.1;
    opacity: 0.95;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock
    .balance-pill
    span[data-currency],
  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock
    .balance-pill
    .tx-amount {
    font-size: 0.56rem;
    font-weight: 500;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock
    .balance-pill.pill-posted,
  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock
    .balance-pill.pill-cleared,
  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock
    .balance-pill.pill-entered,
  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock
    .balance-pill.pill-planned,
  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock
    .balance-pill
    .label,
  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock
    .balance-pill
    span[data-currency],
  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock
    .balance-pill
    .tx-amount {
    font-weight: 500 !important;
  }

  /* Checkbook mobile header: logo | pills (max width) | add button column. */
  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-app-shell-top-band {
    display: grid !important;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr) 2.45rem;
    grid-template-rows: minmax(2.2rem, auto);
    align-items: stretch;
    justify-content: stretch;
    column-gap: 0.28rem;
    row-gap: 0;
    padding-bottom: 0.35rem;
    padding-right: calc(env(safe-area-inset-right, 0px) + 0.15rem);
    overflow: visible;
    position: fixed;
    line-height: 1.2;
    pointer-events: none;
    isolation: isolate;
    /* Above fixed register scroll buttons (1075) so header add tap target is not blocked. */
    z-index: 1080;
  }

  /* Catch taps on empty header band space; logo and add column stay interactive above this layer. */
  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-app-shell-top-band::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: auto;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-app-shell-top-band
    > * {
    position: relative;
    z-index: 1;
    pointer-events: auto;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-app-shell-collapsed-brand.site-header {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    flex: 0 0 auto;
    max-width: none;
    min-width: 0;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    pointer-events: auto;
    z-index: 1;
    cursor: default;
  }

  .fe-checkbook-header-balance-dock .fe-checkbook-header-add-transaction,
  .fe-app-shell-top-band .fe-checkbook-header-add-transaction {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: auto;
    aspect-ratio: 1;
    max-width: 2.2rem;
    padding: 0;
    margin: 0;
    border: 1px solid #d0d7de;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
    pointer-events: auto;
    z-index: 2;
    box-sizing: border-box;
  }

  .fe-checkbook-header-balance-dock
    .fe-checkbook-header-add-transaction
    .transaction-plus-icon {
    position: relative;
    width: 68%;
    height: 68%;
    max-width: 1.05rem;
    max-height: 1.15rem;
    color: #0d9488;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .fe-checkbook-header-balance-dock
    .fe-checkbook-header-add-transaction
    .transaction-plus-icon
    svg {
    display: block;
    width: 100%;
    height: 100%;
  }

  .fe-checkbook-header-balance-dock
    .fe-checkbook-header-add-transaction
    .transaction-plus-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(13, 148, 136, 0.45);
    color: #0d9488;
    font-size: 0.55rem;
    line-height: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .fe-checkbook-header-balance-dock .fe-checkbook-header-add-transaction:hover,
  .fe-checkbook-header-balance-dock .fe-checkbook-header-add-transaction:focus {
    background: #f0fdfa;
    border-color: #0d9488;
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.14);
  }

  .fe-checkbook-header-balance-dock
    .fe-checkbook-header-add-transaction:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.35);
  }

  /* Full grid column tap target; inner button is visual only when docked. */
  .fe-checkbook-header-add-transaction-slot {
    display: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-sizing: border-box;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-app-shell-top-band
    .fe-checkbook-header-add-transaction-slot {
    display: flex !important;
    align-items: center;
    justify-content: center;
    grid-column: 3;
    grid-row: 1;
    justify-self: stretch;
    align-self: stretch;
    width: 100%;
    height: 100%;
    min-width: 2.45rem;
    min-height: 2.2rem;
    margin: 0;
    padding: 0;
    z-index: 3;
    pointer-events: auto !important;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(13, 148, 136, 0.15);
    isolation: isolate;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-app-shell-top-band
    .fe-checkbook-header-add-transaction-slot:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(13, 148, 136, 0.45);
    border-radius: 9px;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-app-shell-top-band
    .fe-checkbook-header-add-transaction-slot:hover
    .fe-checkbook-header-add-transaction,
  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-app-shell-top-band
    .fe-checkbook-header-add-transaction-slot:focus-within
    .fe-checkbook-header-add-transaction {
    background: #f0fdfa;
    border-color: #0d9488;
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.14);
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-app-shell-top-band
    .fe-checkbook-header-add-transaction-slot
    .fe-checkbook-header-add-transaction {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    grid-column: auto;
    grid-row: auto;
    justify-self: auto;
    align-self: auto;
    inset: auto;
    right: auto;
    top: auto;
    flex: 0 0 auto;
    width: 2.2rem;
    height: 2.2rem;
    min-width: 2.2rem;
    min-height: 2.2rem;
    max-width: 2.2rem;
    max-height: 2.2rem;
    aspect-ratio: auto;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    z-index: 1;
    pointer-events: none !important;
    cursor: inherit;
    touch-action: inherit;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-app-shell-top-band
    .fe-checkbook-header-add-transaction-slot
    .fe-checkbook-header-add-transaction
    .transaction-plus-icon,
  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-app-shell-top-band
    .fe-checkbook-header-add-transaction-slot
    .fe-checkbook-header-add-transaction
    .transaction-plus-icon
    svg,
  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-app-shell-top-band
    .fe-checkbook-header-add-transaction-slot
    .fe-checkbook-header-add-transaction
    .transaction-plus-badge {
    pointer-events: none;
  }

  /* Direct child of top band (legacy placement without slot). */
  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-app-shell-top-band
    > .fe-checkbook-header-add-transaction {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    grid-column: 3;
    grid-row: 1;
    justify-self: stretch;
    align-self: stretch;
    inset: auto;
    right: auto;
    top: auto;
    width: 100%;
    height: 100%;
    min-width: 2.45rem;
    min-height: 2.2rem;
    max-width: none;
    max-height: none;
    aspect-ratio: auto;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    z-index: 3;
    pointer-events: auto !important;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(13, 148, 136, 0.15);
    isolation: isolate;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-app-shell-top-band
    > .fe-checkbook-header-add-transaction
    .transaction-plus-icon,
  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-app-shell-top-band
    > .fe-checkbook-header-add-transaction
    .transaction-plus-icon
    svg,
  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-app-shell-top-band
    > .fe-checkbook-header-add-transaction
    .transaction-plus-badge {
    pointer-events: none;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock
    .fe-checkbook-header-add-transaction {
    display: none;
  }

  body.theme-dark.fe-app-shell-layout
    .fe-checkbook-header-balance-dock
    .fe-checkbook-header-add-transaction {
    background: #1e293b;
    border-color: rgba(148, 163, 184, 0.45);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  }

  body.theme-dark.fe-app-shell-layout
    .fe-checkbook-header-balance-dock
    .fe-checkbook-header-add-transaction
    .transaction-plus-icon {
    color: #2dd4bf;
  }

  body.theme-dark.fe-app-shell-layout
    .fe-checkbook-header-balance-dock
    .fe-checkbook-header-add-transaction
    .transaction-plus-badge {
    background: #1e293b;
    border-color: rgba(45, 212, 191, 0.55);
    color: #5eead4;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-app-shell-collapsed-brand.site-header
    .fe-app-shell-collapsed-brand-img {
    height: 42px;
    max-width: min(8.25rem, 31vw);
    width: auto;
    object-position: left center;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
    padding-right: 0;
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: stretch;
    align-items: center;
    align-self: stretch;
    overflow: hidden;
    box-sizing: border-box;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock
    .checkbook-balance-dock-chrome {
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch;
    align-self: stretch;
    justify-content: center;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock
    .balances-row--header-dock {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    gap: 0.22rem;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock
    .balance-pill
    .label {
    min-width: 0;
    flex: 1 1 auto;
    flex-shrink: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock
    .balance-pill
    span[data-currency] {
    flex: 0 0 auto;
    flex-shrink: 0;
    overflow: visible;
    white-space: nowrap;
  }

  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock
    .checkbook-balance-dock-chrome,
  body.fe-app-shell-layout.checkbook-balances-docked.checkbook-balances-shell-dock
    .fe-checkbook-header-balance-dock
    .balances-row--header-dock {
    max-width: 100%;
  }

  /* Mobile register column headers: stick below fixed lockup (partial defaults top: 0). */
  body.fe-app-shell-layout .mobile-checkbook .mobile-tx-headers {
    top: var(--fe-app-sticky-chrome-top);
    z-index: 1040;
    padding-right: 0;
    overflow: visible;
    pointer-events: auto;
    isolation: isolate;
  }

  body.fe-app-shell-layout .mobile-checkbook .mobile-tx-headers::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: auto;
  }

  body.fe-app-shell-layout .mobile-checkbook .mobile-tx-headers::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--fe-mobile-register-scroll-gutter, calc(1.85rem + 0.2rem));
    z-index: 2;
    pointer-events: auto;
  }

  body.fe-app-shell-layout .mobile-checkbook .mobile-tx-headers .tx-row-1,
  body.fe-app-shell-layout .mobile-checkbook .mobile-tx-headers .tx-row-2 {
    position: relative;
    z-index: 1;
    pointer-events: auto;
  }

  body.fe-app-shell-layout
    .mobile-checkbook
    .mobile-tx-headers
    .tx-headers-row
    .tx-current-balance.tx-header,
  body.fe-app-shell-layout
    .mobile-checkbook
    .mobile-tx-headers
    .tx-headers-row
    .tx-posted-balance.tx-header {
    transform: none;
    text-align: right;
  }

  body.fe-app-shell-layout
    .mobile-checkbook
    .mobile-tx-item
    .tx-current-balance,
  body.fe-app-shell-layout
    .mobile-checkbook
    .mobile-tx-item
    .tx-posted-balance {
    margin-right: calc(
      -1 * var(--fe-mobile-register-scroll-gutter, calc(1.85rem + 0.2rem)) +
        0.2rem
    );
  }

  body.fe-app-shell-layout .mobile-register-card-header {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
  }

  body.fe-app-shell-layout .mobile-register-card-header__start {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }

  body.fe-app-shell-layout .mobile-register-card-header__sort .form-select {
    max-width: 11.5rem;
  }

  body.fe-app-shell-layout .mobile-checkbook .mobile-register-scroll-btns {
    position: absolute;
    right: var(--fe-mobile-register-scroll-right, 0);
    bottom: 0.12rem;
    top: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.2rem;
    z-index: 3;
    pointer-events: none;
  }

  body.fe-app-shell-layout
    .mobile-checkbook
    .mobile-register-scroll-btns
    > .mobile-register-scroll-btn {
    pointer-events: auto;
  }

  body.fe-app-shell-layout
    .mobile-checkbook
    .mobile-register-scroll-btns.mobile-register-scroll-btns--pinned {
    position: fixed !important;
    left: auto !important;
    right: env(safe-area-inset-right, 0px) !important;
    bottom: auto !important;
    z-index: 1075 !important;
    pointer-events: auto !important;
  }

  body.fe-app-shell-layout.checkbook-balances-shell-dock
    .mobile-checkbook
    .mobile-register-scroll-btns.mobile-register-scroll-btns--pinned {
    z-index: 1082 !important;
  }

  body.fe-app-shell-layout .mobile-checkbook .mobile-register-scroll-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto !important;
    width: 1.85rem !important;
    height: 1.85rem !important;
    min-width: 1.85rem !important;
    min-height: 1.85rem !important;
    max-width: 1.85rem !important;
    max-height: 1.85rem !important;
    padding: 0 !important;
    border-radius: 0.35rem;
    box-sizing: border-box;
    opacity: 1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  }

  body.fe-app-shell-layout .mobile-checkbook .mobile-register-scroll-btn .bi {
    font-size: 0.95rem;
    line-height: 1;
  }

  body.fe-mobile-nav-sheet-open {
    overflow: hidden;
  }

  .fe-mobile-nav-shell {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1045;
    pointer-events: none;
  }

  .fe-mobile-nav-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: rgba(2, 6, 23, 0.52);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.28s ease,
      visibility 0.28s ease;
    pointer-events: none;
  }

  .fe-mobile-nav-shell--open .fe-mobile-nav-sheet-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .fe-mobile-nav-sheet-column {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.12rem;
    pointer-events: none;
  }

  .fe-mobile-nav-shell--open .fe-mobile-nav-sheet-column {
    pointer-events: auto;
  }

  .fe-mobile-nav-sheet-panel {
    pointer-events: none;
    margin-left: 0.65rem;
    margin-right: 0.65rem;
    max-height: min(78vh, 28rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 1.15rem 1.15rem 0 0;
    background: var(--fe-app-sidebar-bg);
    color: var(--fe-app-sidebar-ink);
    border: 1px solid rgba(132, 198, 255, 0.18);
    border-bottom: 0;
    box-shadow:
      0 -16px 44px rgba(15, 23, 42, 0.4),
      0 -1px 0 rgba(132, 198, 255, 0.12);
    transform: translateY(calc(100% + 0.5rem));
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
    backface-visibility: hidden;
  }

  .fe-mobile-nav-shell--open .fe-mobile-nav-sheet-panel {
    pointer-events: auto;
    transform: translateY(0);
  }

  /* Avoid iOS tap grey flash and stray focus rings on sheet/dock controls. */
  #fe-mobile-nav-shell {
    -webkit-tap-highlight-color: transparent;
  }

  #fe-mobile-nav-shell a:focus:not(:focus-visible),
  #fe-mobile-nav-shell button:focus:not(:focus-visible) {
    outline: none;
  }

  #fe-mobile-nav-sheet-panel .collapse,
  #fe-mobile-nav-sheet-panel .collapsing {
    background: transparent;
  }

  .fe-mobile-nav-sheet-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.48rem 0.82rem 0.55rem;
  }

  .fe-mobile-nav-sheet-head {
    padding: 0 0 0.52rem;
    margin-bottom: 0.52rem;
  }

  .fe-mobile-nav-sheet-kicker {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    color: var(--fe-app-sidebar-muted);
    margin-bottom: 0.2rem;
  }

  .fe-mobile-nav-shell--dock-collapsed .fe-mobile-dock-bar {
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding-bottom: 0;
    min-height: 0;
  }

  .fe-mobile-nav-shell--dock-collapsed .fe-mobile-app-dock {
    display: none !important;
  }

  .fe-mobile-nav-shell--dock-collapsed .fe-mobile-dock-expand-tab {
    position: fixed;
    left: 50%;
    right: auto;
    top: auto;
    bottom: calc(0.06rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 1048;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .fe-mobile-dock-bar {
    display: block;
    width: 100%;
    pointer-events: auto;
    position: relative;
    z-index: 2;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    overflow: visible;
    background: var(--fe-app-mobile-dock-bg);
    border-top: 1px solid rgba(132, 198, 255, 0.22);
    box-shadow:
      0 -10px 32px rgba(15, 23, 42, 0.38),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .fe-mobile-dock-expand-tab {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -50%);
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.45rem;
    min-height: 1.28rem;
    margin: 0;
    padding: 0.22rem 0.38rem;
    border: 1px solid rgba(132, 198, 255, 0.28);
    border-radius: 999px;
    background: linear-gradient(90deg, #0c1929 0%, #15366d 42%, #2563eb 100%);
    color: #fff;
    box-shadow:
      0 2px 10px rgba(0, 0, 0, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition:
      opacity 0.22s ease,
      visibility 0.22s ease,
      transform 0.22s ease,
      border-color 0.15s ease,
      box-shadow 0.15s ease,
      background 0.15s ease;
  }

  .fe-mobile-dock-expand-tab:hover,
  .fe-mobile-dock-expand-tab:focus-visible,
  .fe-mobile-dock-expand-tab:active {
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow:
      0 3px 14px rgba(0, 0, 0, 0.32),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
    background: linear-gradient(90deg, #142850 0%, #1d4ed8 48%, #3b82f6 100%);
    color: #fff;
    outline: none;
  }

  .fe-mobile-dock-expand-tab-icon {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    display: block;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    transition: transform 0.22s ease;
  }

  .fe-mobile-app-dock {
    width: 100%;
    min-width: 0;
    pointer-events: auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.14rem;
    padding: 0.4rem 0.48rem 0.22rem;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .fe-mobile-app-dock-link {
    appearance: none;
    border: 0;
    background: transparent;
    min-height: 3.42rem;
    border-radius: 0.85rem;
    color: var(--fe-app-sidebar-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.16rem;
    text-decoration: none;
    font-size: clamp(0.6rem, 2.85vw, 0.82rem);
    font-weight: 600;
    line-height: 1.14;
    text-align: center;
    padding-inline: 0.1rem;
  }

  .fe-mobile-app-dock-link.is-active,
  .fe-mobile-app-dock-link:hover,
  .fe-mobile-app-dock-link:focus,
  .fe-mobile-app-dock-link:active {
    color: #fff;
    background-color: rgba(25, 52, 112, 0.9);
    background-image: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }

  .fe-mobile-app-dock .fe-mobile-app-dock-toggle {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
  }

  .fe-mobile-app-dock-toggle:focus-visible {
    outline: 2px solid rgba(96, 165, 250, 0.65);
    outline-offset: 2px;
  }

  .fe-mobile-dock-expand-tab:focus-visible {
    outline: 2px solid rgba(96, 165, 250, 0.55);
    outline-offset: 2px;
  }

  #mobileSheetManage .fe-mobile-sheet-manage-tier {
    margin: 0.55rem 0 0;
    width: 100%;
    text-align: center;
  }

  .fe-mobile-menu-drawer {
    background: var(--fe-app-sidebar-bg);
    color: var(--fe-app-sidebar-ink);
  }

  #fe-mobile-nav-sheet-panel[data-fe-mobile-exclusive-open="accounts"]
    .fe-mobile-sheet-exclusive[data-fe-mobile-exclusive="tools"],
  #fe-mobile-nav-sheet-panel[data-fe-mobile-exclusive-open="accounts"]
    .fe-mobile-sheet-manage-group {
    display: none !important;
  }

  #fe-mobile-nav-sheet-panel[data-fe-mobile-exclusive-open="tools"]
    .fe-mobile-sheet-exclusive[data-fe-mobile-exclusive="accounts"],
  #fe-mobile-nav-sheet-panel[data-fe-mobile-exclusive-open="tools"]
    .fe-mobile-sheet-manage-group {
    display: none !important;
  }

  #fe-mobile-nav-sheet-panel[data-fe-mobile-exclusive-open="manage"]
    .fe-mobile-sheet-exclusive[data-fe-mobile-exclusive="accounts"],
  #fe-mobile-nav-sheet-panel[data-fe-mobile-exclusive-open="manage"]
    .fe-mobile-sheet-exclusive[data-fe-mobile-exclusive="tools"] {
    display: none !important;
  }

  /* When a workspace section is expanded, show only that section's list (no sheet title, Workspace, Dashboard, or disclosure row). */
  #fe-mobile-nav-sheet-panel[data-fe-mobile-exclusive-open]
    .fe-mobile-nav-sheet-head,
  #fe-mobile-nav-sheet-panel[data-fe-mobile-exclusive-open]
    .fe-mobile-menu-label,
  #fe-mobile-nav-sheet-panel[data-fe-mobile-exclusive-open]
    a.fe-mobile-menu-link[href="/dashboard"] {
    display: none !important;
  }

  #fe-mobile-nav-sheet-panel[data-fe-mobile-exclusive-open="accounts"]
    .fe-mobile-sheet-exclusive[data-fe-mobile-exclusive="accounts"]
    > .fe-mobile-menu-disclosure,
  #fe-mobile-nav-sheet-panel[data-fe-mobile-exclusive-open="tools"]
    .fe-mobile-sheet-exclusive[data-fe-mobile-exclusive="tools"]
    > .fe-mobile-menu-disclosure,
  #fe-mobile-nav-sheet-panel[data-fe-mobile-exclusive-open="manage"]
    .fe-mobile-sheet-exclusive[data-fe-mobile-exclusive="manage"]
    > .fe-mobile-menu-disclosure {
    display: none !important;
  }

  #fe-mobile-nav-sheet-panel[data-fe-mobile-exclusive-open="manage"]
    .fe-mobile-menu-group:not(.fe-mobile-sheet-manage-group) {
    display: none !important;
  }

  #fe-mobile-nav-sheet-panel[data-fe-mobile-exclusive-open]
    .fe-mobile-nav-sheet-body {
    padding-top: 0.4rem;
  }

  .fe-mobile-menu-disclosure {
    width: 100%;
    justify-content: space-between;
    text-align: left;
  }

  .fe-mobile-menu-disclosure-chevron {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
    flex-shrink: 0;
  }

  .fe-mobile-menu-disclosure-chevron--sm {
    font-size: 0.72rem;
  }

  .fe-mobile-menu-disclosure[aria-expanded="true"]
    .fe-mobile-menu-disclosure-chevron,
  .fe-mobile-menu-sublink-button[aria-expanded="true"]
    .fe-mobile-menu-disclosure-chevron {
    transform: rotate(180deg);
  }

  .fe-mobile-menu-sublink-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
  }

  .fe-mobile-menu-subnav-nested {
    margin-top: 0.18rem;
    margin-left: 0.35rem;
    padding-left: 0.45rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
  }

  .fe-mobile-menu-sublink-nested {
    font-size: 0.82rem;
    padding: 0.45rem 0.62rem;
  }

  .fe-mobile-menu-subnav .fe-mobile-menu-sublink {
    display: flex;
    align-items: center;
    gap: 0.52rem;
  }

  .fe-mobile-menu-subnav .fe-mobile-menu-sublink i {
    flex-shrink: 0;
  }

  .fe-mobile-menu-profile {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.08);
  }

  .fe-mobile-menu-label {
    color: var(--fe-app-sidebar-muted);
    margin-bottom: 0.45rem;
  }

  .fe-mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border-radius: 1rem;
    color: var(--fe-app-sidebar-ink);
    margin-top: 0.28rem;
    font-weight: 600;
  }

  .fe-mobile-menu-drawer button.fe-mobile-menu-link,
  .fe-mobile-menu-drawer button.fe-mobile-menu-sublink-button {
    -webkit-appearance: none;
    appearance: none;
    background-color: transparent;
    color: var(--fe-app-sidebar-ink);
  }

  .fe-mobile-menu-link:hover,
  .fe-mobile-menu-link:focus,
  .fe-mobile-menu-link.is-active {
    color: #fff;
    background-color: rgba(25, 52, 112, 0.92);
    background-image: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }

  .fe-mobile-menu-link:active {
    color: #fff;
    background-color: rgba(19, 40, 86, 0.96);
    background-image: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }

  /* Mobile nav sheet: slightly larger type, tighter vertical rhythm so overall height stays similar. */
  #fe-mobile-nav-sheet-title.h6 {
    font-size: 1.05rem;
    line-height: 1.28;
  }

  .fe-mobile-menu-drawer .fe-mobile-menu-group + .fe-mobile-menu-group {
    margin-top: 0.82rem;
  }

  .fe-mobile-menu-drawer .fe-mobile-menu-label {
    font-size: 0.8rem;
    margin-bottom: 0.32rem;
  }

  .fe-mobile-menu-drawer .fe-mobile-menu-subnav {
    gap: 0.12rem;
    margin-top: 0.2rem;
    padding-left: 0.42rem;
  }

  .fe-mobile-menu-drawer .fe-mobile-menu-link {
    font-size: 1.02rem;
    line-height: 1.28;
    padding: 0.66rem 0.82rem;
    margin-top: 0.2rem;
  }

  .fe-mobile-menu-drawer .fe-mobile-menu-link i {
    font-size: 1.08rem;
  }

  .fe-mobile-menu-drawer .fe-mobile-menu-sublink {
    font-size: 1rem;
    line-height: 1.3;
    padding: 0.48rem 0.72rem;
  }

  .fe-mobile-menu-drawer .fe-mobile-menu-sublink-nested {
    font-size: 0.9rem;
    padding: 0.38rem 0.55rem;
  }

  .fe-mobile-menu-drawer .fe-mobile-menu-sublink:hover,
  .fe-mobile-menu-drawer .fe-mobile-menu-sublink:focus,
  .fe-mobile-menu-drawer .fe-mobile-menu-sublink:active {
    color: #fff;
    background-color: rgba(30, 58, 138, 0.58);
    background-image: none;
  }

  .fe-mobile-menu-drawer .fe-mobile-menu-sublink.is-active {
    color: #fff;
    background-color: rgba(25, 52, 112, 0.9);
    background-image: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  .fe-mobile-menu-drawer .fe-mobile-menu-disclosure-chevron {
    font-size: 0.92rem;
  }

  .fe-mobile-menu-drawer .fe-mobile-menu-disclosure-chevron--sm {
    font-size: 0.8rem;
  }

  .fe-mobile-menu-drawer .fe-app-sidebar-empty {
    font-size: 0.95rem;
    padding: 0.48rem 0.72rem;
  }

  #mobileSheetManage .fe-app-sidebar-profile .fe-app-sidebar-identity {
    font-size: 1.02rem;
  }

  #mobileSheetManage .fe-app-sidebar-profile .fe-app-sidebar-subtext {
    font-size: 0.84rem;
    line-height: 1.35;
  }

  #mobileSheetManage .fe-app-sidebar-profile .fe-app-sidebar-profile-logout {
    font-size: 0.78rem;
  }

  #mobileSheetManage .fe-app-sidebar-tier-label {
    font-size: 0.78rem;
  }

  #mobileSheetManage .fe-app-sidebar-tier-upgrade {
    font-size: 0.68rem;
  }
}

body.fe-app-shell-layout #siteFooter {
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%) !important;
}

body.fe-app-shell-layout .balances-toolbar,
body.fe-app-shell-layout .fe-page-hero,
body.fe-app-shell-layout .app-section-panel {
  border: 1px solid var(--fe-shell-border);
  border-radius: calc(var(--fe-shell-radius) + 0.2rem);
  box-shadow: var(--fe-shell-shadow);
  background: var(--fe-app-surface-strong);
}

.balance-pill-help-popover {
  max-width: min(18rem, 92vw);
  font-size: 0.88rem;
}

.balance-pill-help-popover .popover-header {
  font-size: 0.9rem;
  font-weight: 700;
}

body.fe-app-shell-layout .balances-toolbar {
  padding: 0.5rem 0.65rem;
  gap: 0.45rem;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

body.fe-app-shell-layout .balance-pill {
  border-radius: 0.65rem;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
}

body.fe-app-shell-layout .balance-pill.pill-posted {
  background: linear-gradient(135deg, #1d4ed8 0%, #60a5fa 100%);
  color: #fff;
  border: none;
}

body.fe-app-shell-layout .balance-pill.pill-cleared {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  color: #fff;
  border: none;
}

body.fe-app-shell-layout .balance-pill.pill-entered {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  color: #fff;
  border: none;
}

body.fe-app-shell-layout .balance-pill.pill-planned {
  background: linear-gradient(135deg, #f8fafc 0%, #dbeafe 100%);
  color: #0f172a;
  border: none;
}

body.fe-app-shell-layout .account-add-transaction {
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.18);
}

body.fe-app-shell-layout
  .checkbook-page-shell
  .balances-toolbar
  .checkbook-add-transaction-btn,
body.fe-app-shell-layout
  .checkbook-page-shell
  .balances-toolbar
  #openAddTransaction {
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

body.fe-app-shell-layout .checkbook-page-shell,
body.fe-app-shell-layout .accounts-page-shell,
body.fe-app-shell-layout .budget-page-shell,
body.fe-app-shell-layout .settings-page-shell,
body.fe-app-shell-layout .admin-dashboard-shell,
body.fe-app-shell-layout .admin-users-shell {
  position: relative;
}

body.fe-app-shell-layout .accounts-page-shell > .d-flex:first-child,
body.fe-app-shell-layout .admin-dashboard-shell > .row:first-child,
body.fe-app-shell-layout .admin-users-shell h2:first-of-type {
  margin-bottom: 1rem;
}

body.fe-acquisition .navbar.navbar-light .nav-link {
  border-radius: 999px;
  padding-inline: 0.95rem;
  font-weight: 600;
  color: #334155;
}

body.fe-acquisition .navbar.navbar-light .nav-link.active,
body.fe-acquisition .navbar.navbar-light .nav-link:hover,
body.fe-acquisition .navbar.navbar-light .nav-link:focus {
  color: #0f172a;
  background: rgba(13, 148, 136, 0.09);
}

body.fe-acquisition .navbar.navbar-light .btn-outline-secondary,
body.fe-acquisition .navbar.navbar-light .btn-outline-primary {
  border-radius: 999px;
}

body.fe-acquisition .fe-page-hero {
  overflow: hidden;
  position: relative;
}

body.fe-acquisition .fe-page-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% auto;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12), transparent 68%);
  pointer-events: none;
}

body.fe-acquisition .fe-surface,
body.fe-acquisition .fe-surface-soft,
body.fe-auth-page .fe-auth-panel {
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

body.fe-acquisition .site-footer.bg-primary,
body.fe-auth-page .site-footer.bg-primary {
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%) !important;
}

body.fe-admin-users-page {
  background-image: linear-gradient(180deg, #f8fbff 0%, #eef3f9 100%);
}

body.fe-admin-users-page .navbar.navbar-dark.bg-primary {
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%) !important;
}

body.fe-auth-page .fe-auth-panel {
  border: 1px solid rgba(37, 99, 235, 0.12);
}

body.fe-auth-page .fe-auth-panel .input-group .btn {
  border-radius: 0 0.95rem 0.95rem 0;
}

body.fe-acquisition .legal-page,
body.fe-auth-page .container {
  position: relative;
  z-index: 1;
}

.landing-dashboard-preview {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 0;
  min-height: 26rem;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.12);
  background: #fff;
  box-shadow: 0 26px 58px rgba(15, 23, 42, 0.16);
}

.landing-dashboard-preview--screenshot {
  display: block;
  min-height: 20rem;
  background: #f8fafc;
}

.landing-dashboard-preview-image {
  display: block;
  width: 100%;
  min-height: 20rem;
  object-fit: cover;
  object-position: left top;
}

@media (min-width: 768px) {
  .landing-dashboard-preview--screenshot {
    min-height: 28rem;
  }

  .landing-dashboard-preview-image {
    min-height: 28rem;
  }
}

@media (min-width: 992px) {
  .landing-dashboard-preview--screenshot {
    min-height: 34rem;
  }

  .landing-dashboard-preview-image {
    min-height: 34rem;
  }
}

.landing-dashboard-sidebar {
  padding: 1rem 0.75rem;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  border-right: 1px solid rgba(148, 163, 184, 0.16);
}

.landing-dashboard-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  color: #1d4ed8;
  margin-bottom: 1.1rem;
}

.landing-dashboard-brand img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.landing-dashboard-nav-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.85rem;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.landing-dashboard-nav-item.is-active {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.landing-dashboard-canvas {
  padding: 1.2rem;
  background:
    radial-gradient(
      circle at top right,
      rgba(37, 99, 235, 0.08),
      transparent 22%
    ),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.landing-dashboard-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.landing-dashboard-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
}

.landing-dashboard-copy,
.landing-dashboard-progress-foot,
.landing-dashboard-panel span,
.landing-dashboard-metric-row span {
  color: #64748b;
  font-size: 0.82rem;
}

.landing-dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.landing-dashboard-kpi,
.landing-dashboard-panel {
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.landing-dashboard-kpi {
  padding: 0.85rem 0.9rem;
}

.landing-dashboard-kpi strong {
  display: block;
  margin-top: 0.3rem;
  color: #0f172a;
  font-size: 1.2rem;
}

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

.landing-dashboard-panel {
  padding: 0.9rem;
}

.landing-dashboard-panel-title {
  margin-bottom: 0.65rem;
  font-weight: 700;
  color: #0f172a;
}

.landing-dashboard-progress-meta,
.landing-dashboard-metric-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.landing-dashboard-metric-row {
  align-items: flex-start;
}

.landing-dashboard-metric {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  text-align: center;
}

.landing-dashboard-metric strong {
  display: block;
  line-height: 1.2;
}

.landing-dashboard-progress-track {
  margin-top: 0.85rem;
  height: 0.6rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
  overflow: hidden;
}

.landing-dashboard-progress-track span,
.landing-dashboard-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #2563eb 0%, #14b8a6 100%);
}

.landing-dashboard-progress-foot {
  margin-top: 0.55rem;
}

.landing-dashboard-bar-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.55rem;
}

.landing-dashboard-bar {
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.landing-dashboard-mini-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  min-height: 8rem;
}

.landing-dashboard-mini-bars span {
  flex: 1 1 0;
  border-radius: 0.7rem 0.7rem 0.2rem 0.2rem;
  background: linear-gradient(
    180deg,
    rgba(20, 184, 166, 0.72) 0%,
    #14b8a6 100%
  );
}

@media (max-width: 991.98px) {
  .landing-dashboard-preview:not(.landing-dashboard-preview--screenshot) {
    grid-template-columns: 1fr;
  }

  .landing-dashboard-sidebar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  }

  .landing-dashboard-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767.98px) {
  .landing-dashboard-kpis,
  .landing-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

body.theme-dark.fe-app-shell-layout {
  --fe-app-shell-header-fade:
    radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.22), transparent 42%),
    radial-gradient(
      circle at 100% 0%,
      rgba(16, 185, 129, 0.1),
      transparent 36%
    ),
    linear-gradient(
      180deg,
      #0f172a 0%,
      rgba(11, 18, 32, 0.78) 58%,
      transparent 100%
    );
  background-image: linear-gradient(180deg, #0f172a 0%, #0b1220 100%);
}

body.theme-dark.fe-app-shell-layout .card,
body.theme-dark.fe-app-shell-layout .modal-content,
body.theme-dark.fe-app-shell-layout
  .navbar.navbar-dark.bg-primary
  > .container-fluid {
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(148, 163, 184, 0.16);
  color: #e5eefb;
}

body.theme-dark.fe-app-shell-layout .navbar.navbar-dark.bg-primary .nav-link,
body.theme-dark.fe-app-shell-layout .card-header,
body.theme-dark.fe-app-shell-layout .text-body,
body.theme-dark.fe-app-shell-layout .modal-title,
body.theme-dark.fe-app-shell-layout .table {
  color: #e5eefb !important;
}

body.theme-dark.fe-app-shell-layout .table thead th,
body.theme-dark.fe-app-shell-layout .list-group-item {
  background: rgba(15, 23, 42, 0.82);
  color: #e5eefb;
}

body.theme-dark.fe-app-shell-layout .balance-pill.pill-posted {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: #fff;
  border: none;
}

body.theme-dark.fe-app-shell-layout .balance-pill.pill-cleared {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  color: #fff;
  border: none;
}

body.theme-dark.fe-app-shell-layout .balance-pill.pill-entered {
  background: linear-gradient(135deg, #020617 0%, #1e293b 100%);
  color: #fff;
  border: none;
}

body.theme-dark.fe-app-shell-layout .balance-pill.pill-planned {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #e2e8f0;
  border: none;
}

body.theme-dark.fe-app-shell-layout .balance-pill.pill-planned .label,
body.theme-dark.fe-app-shell-layout
  .balance-pill.pill-planned
  span[data-currency] {
  color: #e2e8f0 !important;
}

body.theme-dark.fe-app-shell-layout
  .balance-pill.pill-planned
  span[data-currency].negative {
  color: #fecaca !important;
}

@media (min-width: 992px) {
  body.theme-dark.fe-app-shell-layout .fe-sidebar-expand-tab {
    background: rgba(30, 41, 59, 0.92);
    color: #93c5fd;
    border-color: rgba(148, 163, 184, 0.28);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
  }

  body.theme-dark.fe-app-shell-layout .fe-sidebar-expand-tab:hover,
  body.theme-dark.fe-app-shell-layout .fe-sidebar-expand-tab:focus-visible {
    background: rgba(51, 65, 85, 0.95);
    color: #bfdbfe;
  }
}

body.theme-dark.fe-app-shell-layout .fe-mobile-dock-expand-tab {
  border-color: rgba(147, 197, 253, 0.28);
  background: linear-gradient(90deg, #0f172a 0%, #1e3a5f 40%, #2563eb 100%);
  color: #e5eefb;
  box-shadow:
    0 2px 14px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.theme-dark.fe-app-shell-layout .fe-mobile-dock-expand-tab:hover,
body.theme-dark.fe-app-shell-layout .fe-mobile-dock-expand-tab:focus-visible {
  border-color: rgba(186, 230, 253, 0.4);
  background: linear-gradient(90deg, #142850 0%, #1d4ed8 45%, #3b82f6 100%);
  color: #fff;
}

body.theme-dark.fe-app-shell-layout .fe-mobile-dock-bar {
  background: linear-gradient(90deg, #0f172a 0%, #162e52 38%, #1d4ed8 100%);
  border-top-color: rgba(147, 197, 253, 0.22);
  box-shadow:
    0 -10px 32px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Dashboard overview insight panels (hero band on /dashboard) */
.dashboard-page .dashboard-overview-insight-panel {
  color: #0f172a;
}

.dashboard-page .dashboard-overview-insight-panel .text-body,
.dashboard-page .dashboard-overview-insight-panel .fw-semibold {
  color: #0f172a;
}

body.theme-dark .dashboard-page .dashboard-overview-insight-panel,
body.theme-dark.fe-app-shell-layout
  .dashboard-page
  .dashboard-overview-insight-panel {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.22);
  color: #e5eefb;
}

body.theme-dark .dashboard-page .dashboard-overview-insight-panel .text-body,
body.theme-dark .dashboard-page .dashboard-overview-insight-panel .fw-semibold,
body.theme-dark.fe-app-shell-layout
  .dashboard-page
  .dashboard-overview-insight-panel
  .text-body,
body.theme-dark.fe-app-shell-layout
  .dashboard-page
  .dashboard-overview-insight-panel
  .fw-semibold {
  color: #e5eefb;
}

body.theme-dark .dashboard-page .dashboard-overview-insight-panel .text-muted,
body.theme-dark.fe-app-shell-layout
  .dashboard-page
  .dashboard-overview-insight-panel
  .text-muted {
  color: #94a3b8 !important;
}

body.theme-dark .dashboard-page .dashboard-recurease-overview-ccy-label,
body.theme-dark.fe-app-shell-layout
  .dashboard-page
  .dashboard-recurease-overview-ccy-label {
  color: #94a3b8 !important;
}

body.theme-dark
  .dashboard-page
  .dashboard-recurease-overview-ccy-block
  + .dashboard-recurease-overview-ccy-block,
body.theme-dark.fe-app-shell-layout
  .dashboard-page
  .dashboard-recurease-overview-ccy-block
  + .dashboard-recurease-overview-ccy-block {
  border-top-color: rgba(148, 163, 184, 0.35);
}

body.theme-dark .dashboard-page .dashboard-hero-edge-tab,
body.theme-dark.fe-app-shell-layout .dashboard-page .dashboard-hero-edge-tab {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

body.theme-dark .dashboard-page .dashboard-hero-edge-tab:hover,
body.theme-dark .dashboard-page .dashboard-hero-edge-tab:focus-visible,
body.theme-dark.fe-app-shell-layout
  .dashboard-page
  .dashboard-hero-edge-tab:hover,
body.theme-dark.fe-app-shell-layout
  .dashboard-page
  .dashboard-hero-edge-tab:focus-visible {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
}

/* Dashboard monthly overview: full-width analytics, recent table, customize menu */
.dashboard-page .dashboard-overview-customize-menu {
  border-radius: 0.85rem;
}

.dashboard-page .dashboard-chart-wrap--tall {
  min-height: 300px;
}

.dashboard-page .dashboard-chart-wrap--short {
  min-height: 200px;
}

@media (max-width: 767.98px) {
  .dashboard-page .dashboard-chart-wrap--tall {
    min-height: 260px;
  }

  .dashboard-page .dashboard-chart-wrap--short {
    min-height: 180px;
  }
}

.dashboard-page .dashboard-recent-table .account-stripe-inline {
  display: inline-block;
  width: 4px;
  min-height: 1.15em;
  border-radius: 2px;
  vertical-align: -0.12em;
}

.dashboard-page .dashboard-top-payees-card {
  border-radius: 1.2rem;
}

body.theme-dark .dashboard-page .dashboard-chart-title,
body.dark-theme .dashboard-page .dashboard-chart-title,
body.theme-dark.fe-app-shell-layout .dashboard-page .dashboard-chart-title,
body.dark-theme.fe-app-shell-layout .dashboard-page .dashboard-chart-title {
  color: #e5eefb;
}

body.theme-dark .dashboard-page .dashboard-top-payees-table thead.table-light,
body.dark-theme .dashboard-page .dashboard-top-payees-table thead.table-light,
body.theme-dark.fe-app-shell-layout
  .dashboard-page
  .dashboard-top-payees-table
  thead.table-light,
body.dark-theme.fe-app-shell-layout
  .dashboard-page
  .dashboard-top-payees-table
  thead.table-light {
  --bs-table-bg: rgba(30, 41, 59, 0.92);
  --bs-table-color: #e5eefb;
  color: #e5eefb;
}

body.theme-dark .dashboard-page .dashboard-top-payees-table tbody td,
body.dark-theme .dashboard-page .dashboard-top-payees-table tbody td,
body.theme-dark.fe-app-shell-layout
  .dashboard-page
  .dashboard-top-payees-table
  tbody
  td,
body.dark-theme.fe-app-shell-layout
  .dashboard-page
  .dashboard-top-payees-table
  tbody
  td {
  color: #e5eefb;
  border-color: rgba(148, 163, 184, 0.22);
}

body.theme-dark .dashboard-page .dashboard-chart-card,
body.dark-theme .dashboard-page .dashboard-chart-card,
body.theme-dark.fe-app-shell-layout .dashboard-page .dashboard-chart-card,
body.dark-theme.fe-app-shell-layout .dashboard-page .dashboard-chart-card {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.22);
}

body.theme-dark .dashboard-page .dashboard-breakdown-card,
body.dark-theme .dashboard-page .dashboard-breakdown-card,
body.theme-dark.fe-app-shell-layout .dashboard-page .dashboard-breakdown-card,
body.dark-theme.fe-app-shell-layout .dashboard-page .dashboard-breakdown-card {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.22);
}

body.theme-dark .dashboard-page .dashboard-top-payees-card,
body.dark-theme .dashboard-page .dashboard-top-payees-card,
body.theme-dark.fe-app-shell-layout .dashboard-page .dashboard-top-payees-card,
body.dark-theme.fe-app-shell-layout .dashboard-page .dashboard-top-payees-card {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.22);
}
