/* =========================================================
   Traverse — fintech theme
   Shell (sidebar + header) for every page that uses
   template/dashboard_layout, plus the dashboard home (.fx-dashboard).
   Loaded after custom.css so it wins without !important where possible.
========================================================= */

:root {
  --fx-ink: #15111f;
  --fx-text: #1a1530;
  --fx-muted: #66617a;
  --fx-subtle: #9a95a8;
  /* Warm neutrals shared with the public site (site.css round 3) */
  --fx-line: #e9e3d8;
  --fx-surface: #ffffff;
  --fx-canvas: #f7f4ef;
  --fx-canvas-2: #efe9e0;
  /* Landing pastels: flat colour blocks for icons and accents, never money figures */
  --fx-lime: #d6f45c;
  --fx-butter: #ffe382;
  --fx-lilac: #e6dcff;
  --fx-peach: #ffcdb5;
  --fx-mint-pastel: #c4efd6;
  --fx-sky: #cfe4ff;
  /* Brand: the palette defined in custom.css (--color-1/2/3). */
  --fx-brand: var(--color-1);          /* primary fills, active tabs, links */
  --fx-brand-hover: var(--color-2);    /* hover on primary fills */
  --fx-brand-soft: color-mix(in srgb, var(--color-3) 22%, #fff);  /* hover/active tint */
  --fx-mint: #12b981;
  --fx-mint-soft: #ddf5e7;
  --fx-amber: #d97706;
  --fx-amber-soft: #fff1c7;
  --fx-danger: #dc2626;
  --fx-radius: 20px;
  --fx-radius-sm: 12px;
  --fx-shadow: 0 1px 2px rgba(21, 17, 31, 0.04), 0 10px 28px -16px rgba(21, 17, 31, 0.14);

  /* Type system: Archivo for headings and figures, Outfit for everything else. */
  --fx-font-heading: "Archivo", "Outfit", ui-sans-serif, system-ui, sans-serif;
  --fx-font-body: "Outfit", ui-sans-serif, system-ui, sans-serif;
}

/* ---------------------------------------------------------
   Typography
   Headings  → Archivo, semi-wide, tight tracking
   Text      → Outfit 14px, ink
   Subtext   → Outfit 13px, muted
--------------------------------------------------------- */

body.fx-app {
  background: var(--fx-canvas);
  font-family: var(--fx-font-body);
  color: var(--fx-text);
}

.fx-app button,
.fx-app input,
.fx-app select,
.fx-app textarea,
.fx-app .menu,
.fx-app .btn {
  font-family: var(--fx-font-body);
}

.fx-app h1,
.fx-app h2,
.fx-app h3,
.fx-app h4,
.fx-app .modal-title,
.fx-app .card-title,
.fx-heading {
  font-family: var(--fx-font-heading);
  font-variation-settings: "wdth" 112;
  letter-spacing: -0.02em;
  color: var(--fx-ink);
}

.fx-text {
  font-family: var(--fx-font-body);
  font-size: 14px;
  color: var(--fx-text);
}

.fx-subtext {
  font-family: var(--fx-font-body);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--fx-muted);
}

.fx-label {
  font-family: var(--fx-font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fx-subtle);
}

/* ---------------------------------------------------------
   Shell
--------------------------------------------------------- */

.fx-app .aside {
  background: var(--fx-surface) !important;
  border: 0 !important;
  border-right: 1px solid var(--fx-line) !important;
  box-shadow: none;
}

.fx-app .aside .aside-logo {
  padding-bottom: 1.5rem !important;
}

.fx-app .aside .aside-logo img {
  max-height: 40px;
}

.fx-app .aside-menu .menu-content {
  color: var(--fx-subtle) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: .1em;
  text-transform: uppercase !important;
  padding-left: 1rem;
}

.fx-app .aside-menu .menu-item {
  padding: 1px 0;
}

.fx-app .aside-menu .menu-link {
  border-radius: var(--fx-radius-sm) !important;
  padding: .65rem 1rem !important;
  transition: background .15s ease, color .15s ease;
}

.fx-app .aside-menu .menu-link .menu-icon {
  color: var(--fx-subtle);
  font-size: 1.05rem !important;
}

.fx-app .aside-menu .menu-link .menu-title {
  color: var(--fx-muted);
  font-weight: 500 !important;
  font-size: 14px !important;
}

.fx-app .aside-menu .menu-link:hover:not(.active) {
  background: var(--fx-brand-soft) !important;
}

.fx-app .aside-menu .menu-link:hover:not(.active) .menu-title,
.fx-app .aside-menu .menu-link:hover:not(.active) .menu-icon {
  color: var(--fx-brand) !important;
}

.fx-app .aside-menu .menu-link.active {
  background: var(--fx-brand) !important;
}

.fx-app .aside-menu .menu-link.active .menu-title,
.fx-app .aside-menu .menu-link.active .menu-icon {
  color: #fff !important;
}

.fx-app .fx-aside-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: .65rem 1rem;
  border-radius: var(--fx-radius-sm);
  color: var(--fx-danger);
  font-family: var(--fx-font-body);
  font-size: 14px;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
}

.fx-app .fx-aside-logout i {
  width: 26px;
  text-align: center;
  color: inherit;
  font-size: 1.05rem;
}

.fx-app .fx-aside-logout:hover,
.fx-app .fx-aside-logout:focus-visible {
  background: color-mix(in srgb, var(--fx-danger) 10%, #fff);
  color: #b91c1c;
}

.fx-app .aside-footer > div {
  background: var(--fx-canvas) !important;
  border: 1px solid var(--fx-line);
  border-radius: 16px !important;
  padding-top: .7rem;
  padding-bottom: .7rem;
}

.fx-app .aside-footer .bg-purple {
  background: var(--fx-brand) !important;
  color: #fff;
}

.fx-app .aside-footer .fs-6 {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--fx-ink);
}

.fx-app .aside-footer .fs-7 {
  font-size: 12px !important;
  color: var(--fx-muted);
}

/* No backdrop-filter here: it makes the header the containing block for
   position:fixed children, which pushes the user dropdown off-screen. */
.fx-app .header {
  background: var(--fx-surface) !important;
  border-bottom: 1px solid var(--fx-line) !important;
}

.fx-app[data-kt-sticky-header=on] .header {
  box-shadow: 0 1px 0 var(--fx-line);
}

@media (min-width: 992px) {
  .fx-app .header {
    height: 72px;
  }
}

.fx-app #kt_activities_toggle {
  border-radius: 12px;
  background: var(--fx-surface);
  border: 1px solid var(--fx-line);
}

.fx-app #kt_header_user_menu_toggle .symbol img {
  border: 2px solid var(--fx-surface);
  box-shadow: 0 0 0 1px var(--fx-line);
}

.fx-app #kt_header_user_menu_toggle .menu-sub-dropdown {
  border: 1px solid var(--fx-line);
  border-radius: 16px;
  box-shadow: 0 16px 40px -16px rgba(18, 13, 35, .25);
}

.fx-app #kt_header_user_menu_toggle .menu-sub-dropdown .fs-5 {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--fx-ink);
}

.fx-app #kt_header_user_menu_toggle .menu-sub-dropdown .menu-link {
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fx-text);
}

/* ---------------------------------------------------------
   Shared components — one look for every section
   Primary   → color-1 fill, hover color-2
   Outline   → color-1 border/text, hover color-3 tint
   Neutral   → line border/ink text, hover color-3 tint + color-1 text
   Tabs      → active color-1, hover color-1 text on color-3 tint
--------------------------------------------------------- */

/* Buttons */
.fx-app .btn:not(.btn-icon) {
  border-radius: 999px;
  font-family: var(--fx-font-body);
  font-weight: 600;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.fx-app .btn.btn-icon {
  border-radius: 10px;
}

.fx-app .btn.btn-purple,
.fx-app .btn.btn-primary,
.fx-app .btn.create-btn,
.fx-app .btn.btn-light-purple {
  background: var(--fx-brand) !important;
  border: 1px solid var(--fx-brand) !important;
  color: #fff !important;
}

.fx-app .btn.btn-purple:hover:not(:disabled),
.fx-app .btn.btn-primary:hover:not(:disabled),
.fx-app .btn.create-btn:hover:not(:disabled),
.fx-app .btn.btn-light-purple:hover:not(:disabled),
.fx-app .btn.btn-purple:focus-visible,
.fx-app .btn.btn-primary:focus-visible {
  background: var(--fx-brand-hover) !important;
  border-color: var(--fx-brand-hover) !important;
  color: #fff !important;
}

.fx-app .btn.btn-purple i,
.fx-app .btn.btn-primary i,
.fx-app .btn.create-btn i {
  color: inherit !important;
}

.fx-app .btn.btn-outline-purple {
  background: var(--fx-surface) !important;
  border: 1px solid var(--fx-brand) !important;
  color: var(--fx-brand) !important;
}

.fx-app .btn.btn-light,
.fx-app .btn.btn-light.border {
  background: var(--fx-surface) !important;
  border: 1px solid var(--fx-line) !important;
  color: var(--fx-text) !important;
}

.fx-app .btn.btn-outline-purple:hover:not(:disabled),
.fx-app .btn.btn-outline-purple.active,
.fx-app .btn.btn-light:hover:not(:disabled) {
  background: var(--fx-brand-soft) !important;
  border-color: var(--fx-brand) !important;
  color: var(--fx-brand) !important;
}

.fx-app .btn.btn-outline-purple i,
.fx-app .btn.btn-light i:not(.text-danger) {
  color: inherit !important;
}

.fx-app .btn.card-action-btn {
  font-size: 13px;
  letter-spacing: 0;
}

/* Icon buttons (modal close, row actions) */
.fx-app .btn.btn-active-light-primary {
  color: var(--fx-muted);
}

.fx-app .btn.btn-active-light-primary:hover,
.fx-app .btn.btn-active-light-primary:active {
  background: var(--fx-brand-soft) !important;
  color: var(--fx-brand) !important;
}

.fx-app .btn.btn-active-light-primary:hover .svg-icon svg [fill]:not([fill=none]) {
  fill: var(--fx-brand);
}

/* Pill tabs (Accounts transactions, dashboard date range) */
.fx-app .transaction-tab,
.fx-dashboard .dashboard-date-range {
  display: inline-flex;
  gap: 4px;
  padding: 4px !important;
  background: var(--fx-surface) !important;
  border: 1px solid var(--fx-line) !important;
  border-radius: 999px !important;
}

.fx-app .transaction-tab .nav-link,
.fx-dashboard .range-btn {
  padding: 8px 16px;
  border: 0;
  border-radius: 999px !important;
  background: transparent;
  color: var(--fx-muted) !important;
  font-family: var(--fx-font-body);
  font-size: 13px;
  font-weight: 500;
  box-shadow: none !important;
  transition: background-color .15s ease, color .15s ease;
}

.fx-app .transaction-tab .nav-link:hover:not(.active),
.fx-dashboard .range-btn:hover:not(.active) {
  background: var(--fx-brand-soft) !important;
  color: var(--fx-brand) !important;
}

.fx-app .transaction-tab .nav-link.active,
.fx-dashboard .range-btn.active {
  background: var(--fx-brand) !important;
  color: #fff !important;
  font-weight: 600;
}

/* Underline tabs (Settings, customer details) */
.fx-app .account-settings-tabs .nav-link,
.fx-app .nav-line-tabs .nav-link {
  color: var(--fx-muted) !important;
  font-family: var(--fx-font-body);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2px solid transparent !important;
  background: transparent !important;
}

.fx-app .account-settings-tabs .nav-link:hover,
.fx-app .nav-line-tabs .nav-link:hover {
  color: var(--fx-brand) !important;
}

.fx-app .account-settings-tabs .nav-link.active,
.fx-app .nav-line-tabs .nav-link.active {
  color: var(--fx-brand) !important;
  font-weight: 600;
  border-bottom-color: var(--fx-brand) !important;
}

.fx-app .account-settings-tabs .nav-link.active::after {
  display: none;
}

/* Modals */
.fx-app .modal-content {
  border: 1px solid var(--fx-line) !important;
  border-radius: var(--fx-radius) !important;
  box-shadow: 0 24px 60px -24px rgba(18, 13, 35, .35) !important;
}

.fx-app .modal-header {
  align-items: flex-start;
  padding: 24px 24px 12px !important;
  border-bottom: 0 !important;
}

.fx-app .modal-title {
  font-size: 20px;
  font-weight: 600 !important;
}

.fx-app .modal-header .btn-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
}

.fx-app .modal-footer {
  gap: 10px;
  padding: 12px 24px 24px !important;
  border-top: 0 !important;
}

.fx-app .modal-footer > * {
  margin: 0;
}

.fx-app .modal-footer .btn:not(.btn-icon) {
  min-width: 110px;
  padding: 11px 22px;
}

/* ---------------------------------------------------------
   Dashboard home
--------------------------------------------------------- */

.fx-dashboard {
  padding-top: 8px;
  font-family: var(--fx-font-body);
  font-variant-numeric: tabular-nums;
}

.fx-dashboard .dashboard-header {
  align-items: flex-end;
  margin-bottom: 22px;
}

.fx-dashboard .fx-eyebrow {
  margin-bottom: 8px;
}

.fx-dashboard .dashboard-header h1 {
  font-size: 30px !important;
  font-weight: 600 !important;
}

.fx-dashboard .dashboard-header p {
  margin-top: 6px;
}

/* Onboarding banner */
.fx-dashboard .onboarding-card {
  background: var(--fx-surface);
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius);
  box-shadow: var(--fx-shadow);
  padding: 16px 18px;
}

.fx-dashboard .onboarding-icon {
  border-radius: 14px;
  background: var(--fx-brand-soft);
}

.fx-dashboard .onboarding-icon i {
  color: var(--fx-brand) !important;
}

.fx-dashboard .onboarding-title {
  font-family: var(--fx-font-heading);
  font-variation-settings: "wdth" 112;
  letter-spacing: -0.01em;
  font-size: 16px;
  font-weight: 600;
  color: var(--fx-ink);
}

.fx-dashboard .onboarding-description {
  font-size: 13px;
  color: var(--fx-muted);
}

.fx-dashboard .onboarding-progress {
  height: 6px;
  background: #efedf6;
}

.fx-dashboard .onboarding-progress-bar {
  background: var(--fx-brand);
}

.fx-dashboard .onboarding-progress-wrapper span {
  font-size: 12px;
  font-weight: 500;
  color: var(--fx-muted);
}

.fx-dashboard .onboarding-btn {
  background: var(--fx-brand);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px;
}

.fx-dashboard .onboarding-btn:hover {
  background: var(--fx-brand-hover);
  color: #fff;
  opacity: 1;
}

/* Onboarding steps: business info + Tier 1 submission */
.fx-dashboard .onboarding-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.fx-dashboard .onboarding-step a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border: 1px solid var(--fx-line);
  border-radius: 999px;
  background: var(--fx-surface);
  color: var(--fx-text);
  transition: border-color .15s ease, background-color .15s ease;
}

.fx-dashboard .onboarding-step a:hover {
  border-color: var(--fx-brand);
  background: var(--fx-brand-soft);
}

.fx-dashboard .onboarding-step-mark {
  display: inline-flex;
  flex: 0 0 26px;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--fx-canvas);
  color: var(--fx-subtle);
  font-size: 13px;
}

.fx-dashboard .onboarding-step.is-done .onboarding-step-mark {
  background: var(--fx-mint-soft);
  color: var(--fx-mint);
}

.fx-dashboard .onboarding-step.is-warn .onboarding-step-mark {
  background: #fdecec;
  color: var(--fx-danger);
}

.fx-dashboard .onboarding-step-mark i {
  color: inherit !important;
  font-size: inherit;
}

.fx-dashboard .onboarding-step-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.fx-dashboard .onboarding-step-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--fx-ink);
}

.fx-dashboard .onboarding-step-detail {
  font-size: 12px;
  color: var(--fx-muted);
}

.fx-dashboard .onboarding-step.is-warn .onboarding-step-detail {
  color: var(--fx-danger);
}

@media (max-width: 575.98px) {
  .fx-dashboard .onboarding-steps {
    flex-direction: column;
  }

  .fx-dashboard .onboarding-step a {
    border-radius: var(--fx-radius-sm);
  }
}

/* Balance overview card */
.fx-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 28px;
  margin-bottom: 20px;
  padding: 28px;
  background: var(--fx-surface);
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius);
  box-shadow: var(--fx-shadow);
}

.fx-hero-main {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.fx-hero-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fx-muted);
}

.fx-hero-label #heroPeriod {
  color: var(--fx-text);
}

.fx-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fx-mint);
  box-shadow: 0 0 0 4px var(--fx-mint-soft);
}

.fx-hero-amount {
  margin: 12px 0 4px;
  font-family: var(--fx-font-heading);
  font-variation-settings: "wdth" 112;
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--fx-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fx-hero-amount .fx-currency {
  margin-right: 4px;
  color: var(--fx-subtle);
  font-weight: 500;
}

.fx-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.fx-hero-tiles {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  min-width: 0;
}

.fx-tile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--fx-canvas);
  border: 1px solid var(--fx-line);
  border-radius: 16px;
  min-width: 0;
}

.fx-tile-icon {
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 18px;
}

.fx-tile-icon i {
  color: inherit !important;
}

.fx-tile-icon.mint {
  background: var(--fx-mint-soft);
  color: var(--fx-mint);
}

.fx-tile-icon.amber {
  background: var(--fx-amber-soft);
  color: var(--fx-amber);
}

.fx-tile-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--fx-muted);
}

.fx-tile-value {
  display: block;
  margin-top: 2px;
  font-family: var(--fx-font-heading);
  font-variation-settings: "wdth" 112;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--fx-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chart card */
.fx-dashboard .chart-card {
  background: var(--fx-surface);
  border: 1px solid var(--fx-line) !important;
  border-radius: var(--fx-radius) !important;
  box-shadow: var(--fx-shadow);
  padding: 26px 28px 22px;
}

.fx-dashboard .chart-header {
  flex-wrap: wrap;
}

.fx-dashboard .chart-header h2 {
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
}

.fx-dashboard .chart-summary {
  flex-wrap: wrap;
}

.fx-dashboard .chart-header p {
  font-size: 13px;
  color: var(--fx-muted);
}

.fx-dashboard .chart-summary {
  gap: 10px;
}

.fx-dashboard .chart-summary-item {
  gap: 10px;
  padding: 8px 14px 8px 12px;
  background: var(--fx-canvas);
  border: 1px solid var(--fx-line);
  border-radius: 12px;
}

.fx-dashboard .summary-dot {
  width: 8px;
  height: 8px;
}

.fx-dashboard .summary-dot.revenue {
  background: var(--fx-brand);
  box-shadow: 0 0 0 3px var(--fx-brand-soft);
}

.fx-dashboard .summary-dot.transactions {
  background: var(--fx-mint);
  box-shadow: 0 0 0 3px var(--fx-mint-soft);
}

/* Money out bar: --color-3, the lighter partner of the money-in purple */
.fx-dashboard .summary-dot.money-out {
  background: var(--color-3);
  box-shadow: 0 0 0 3px var(--fx-brand-soft);
}

/* Transaction count is not plotted (it is in the tooltip), so a hollow dot */
.fx-dashboard .summary-dot.count {
  background: transparent;
  border: 2px solid var(--fx-subtle);
  box-shadow: none;
}

.fx-dashboard .chart-empty {
  position: absolute;
  inset: 0 0 28px 48px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--fx-muted);
  pointer-events: none;
}

.fx-dashboard .chart-empty.show {
  display: flex;
}

.fx-dashboard .chart-summary-item small {
  font-size: 12px;
  color: var(--fx-muted);
}

.fx-dashboard .chart-summary-item strong {
  font-family: var(--fx-font-heading);
  font-variation-settings: "wdth" 112;
  font-size: 15px;
  font-weight: 600;
  color: var(--fx-ink);
}

.fx-dashboard .chart-container {
  height: 340px;
}

/* ---------------------------------------------------------
   Custom date range modal
--------------------------------------------------------- */

.fx-date-modal .modal-dialog {
  max-width: 480px;
}

.fx-date-modal .modal-body {
  padding: 8px 24px !important;
}

.fx-date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.fx-date-modal .date-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.fx-date-modal .date-field label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--fx-text);
}

.fx-date-modal .date-field .flatpickr-wrapper {
  width: 100%;
}

.fx-date-modal .date-field input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-canvas);
  color: var(--fx-text);
  font-size: 14px;
  outline: none;
}

.fx-date-modal .date-field input:focus {
  border-color: var(--fx-brand);
  background: var(--fx-surface);
  box-shadow: 0 0 0 3px var(--fx-brand-soft);
}

.fx-date-error {
  min-height: 20px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--fx-danger);
}

/* ---------------------------------------------------------
   Transaction PIN boxes
--------------------------------------------------------- */

.fx-pin {
  display: flex;
  gap: 12px;
}

.fx-pin-box {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-canvas);
  color: var(--fx-ink);
  font-family: var(--fx-font-heading);
  font-size: 28px;
  font-weight: 600;
  text-align: center;
  caret-color: var(--fx-brand);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.fx-pin-box:focus {
  border-color: var(--fx-brand);
  background: var(--fx-surface);
  box-shadow: 0 0 0 3px var(--fx-brand-soft);
}

.fx-pin-box::selection {
  background: transparent;
}

.fx-pin.is-complete .fx-pin-box {
  border-color: var(--fx-brand);
}

/* ---------------------------------------------------------
   Transfer flows (single, bulk, scheduled, groups)
   One modal per flow: steps -> details -> review -> PIN -> done.
--------------------------------------------------------- */

.fx-flow-dialog {
  max-width: 540px;
}

.fx-flow .modal-body {
  padding: 8px 24px 24px;
}

.fx-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 24px 16px;
}

.fx-step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fx-subtle);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.fx-step-dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--fx-line);
  border-radius: 50%;
  background: var(--fx-surface);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.fx-step-dot i {
  display: none;
  font-size: 14px;
  color: inherit !important;
}

.fx-step.is-active {
  color: var(--fx-ink);
}

.fx-step.is-active .fx-step-dot {
  border-color: var(--fx-brand);
  background: var(--fx-brand);
  color: #fff;
}

.fx-step.is-done {
  color: var(--fx-text);
}

.fx-step.is-done .fx-step-dot {
  border-color: var(--fx-brand-soft);
  background: var(--fx-brand-soft);
  color: var(--fx-brand);
}

.fx-step.is-done .fx-step-number {
  display: none;
}

.fx-step.is-done .fx-step-dot i {
  display: block;
}

.fx-step-line {
  flex: 1 1 auto;
  min-width: 12px;
  height: 1.5px;
  border-radius: 1px;
  background: var(--fx-line);
}

.fx-step.is-done + .fx-step-line {
  background: var(--fx-brand);
}

.fx-flow-alert {
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid #fecaca;
  border-radius: var(--fx-radius-sm);
  background: #fef2f2;
  color: var(--fx-danger);
  font-size: 13px;
}

.fx-field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--fx-text);
  font-size: 13px;
  font-weight: 500;
}

.fx-field-label.required::after {
  content: " *";
  color: var(--fx-danger);
}

.fx-field-hint {
  margin-top: 6px;
  color: var(--fx-muted);
  font-size: 12px;
}

.fx-section-title {
  color: var(--fx-ink);
  font-family: var(--fx-font-heading);
  font-size: 15px;
  font-weight: 600;
}

.fx-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.fx-app .btn.fx-link {
  color: var(--fx-brand) !important;
  font-size: inherit;
  vertical-align: baseline;
}

.fx-count-pill {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--fx-brand-soft);
  color: var(--fx-brand);
  font-size: 12px;
  font-weight: 600;
}

/* Source account */
.fx-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-canvas);
}

.fx-source-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--fx-brand-soft);
  color: var(--fx-brand);
  font-size: 16px;
}

.fx-source-icon i {
  color: inherit !important;
}

.fx-source-label {
  color: var(--fx-muted);
  font-size: 12px;
}

.fx-source-name,
.fx-source-balance {
  color: var(--fx-ink);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Verified account name under the account number */
.fx-verified {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--fx-mint-soft);
  color: #047857;
  font-size: 13px;
  font-weight: 600;
}

.fx-verified i {
  color: inherit !important;
}

.fx-verified.is-loading {
  background: var(--fx-canvas);
  color: var(--fx-muted);
  font-weight: 500;
}

.fx-verified.is-error {
  background: #fef2f2;
  color: var(--fx-danger);
  font-weight: 500;
}

.fx-amount-field .input-group-text {
  border: 1px solid var(--fx-line);
  background: var(--fx-canvas);
  color: var(--fx-muted);
  font-weight: 600;
}

/* Review */
.fx-review-hero {
  margin-bottom: 16px;
  padding: 20px 16px;
  border-radius: var(--fx-radius-sm);
  background: var(--fx-canvas);
  text-align: center;
}

.fx-review-amount {
  margin: 4px 0;
  color: var(--fx-ink);
  font-family: var(--fx-font-heading);
  font-size: 32px;
  font-weight: 700;
  font-variation-settings: "wdth" 112;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.fx-review-to {
  color: var(--fx-muted);
  font-size: 14px;
}

.fx-review-to strong {
  color: var(--fx-ink);
  font-weight: 600;
}

.fx-review-list {
  padding: 0 16px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
}

.fx-review-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--fx-line);
  font-size: 14px;
}

.fx-review-row:last-child {
  border-bottom: 0;
}

.fx-review-row > span {
  color: var(--fx-muted);
}

.fx-review-row > strong {
  color: var(--fx-ink);
  font-weight: 600;
  text-align: right;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}

.fx-review-row.is-total > span {
  color: var(--fx-text);
  font-weight: 500;
}

.fx-review-row.is-total > strong {
  font-size: 16px;
}

.fx-review-recipients {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
}

.fx-review-recipient {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--fx-line);
}

.fx-review-recipient:last-child {
  border-bottom: 0;
}

.fx-review-recipient strong {
  display: block;
  color: var(--fx-ink);
  font-size: 14px;
  font-weight: 600;
}

.fx-review-recipient span {
  color: var(--fx-muted);
  font-size: 12px;
}

.fx-review-recipient .fx-review-recipient-amount {
  flex-shrink: 0;
  color: var(--fx-ink);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* PIN step */
.fx-pin-step {
  padding: 8px 0 4px;
  text-align: center;
}

.fx-pin-step .fx-notice-icon {
  margin: 0 auto 16px;
}

.fx-pin-step .fx-pin {
  justify-content: center;
}

.fx-pin-label {
  margin-bottom: 8px;
  color: var(--fx-text);
  font-size: 13px;
  font-weight: 500;
}

.fx-pin-error {
  min-height: 20px;
  margin-top: 12px;
  color: var(--fx-danger);
  font-size: 13px;
}

.fx-pin.is-invalid .fx-pin-box {
  border-color: var(--fx-danger);
}

/* Done */
.fx-result {
  padding: 16px 0 4px;
  text-align: center;
}

.fx-result-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--fx-mint-soft);
  color: var(--fx-mint);
  font-size: 30px;
}

.fx-result-icon i {
  color: inherit !important;
}

.fx-result-icon.is-failed {
  background: #fef2f2;
  color: var(--fx-danger);
}

.fx-result-ref {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--fx-canvas);
  color: var(--fx-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.fx-flow-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.fx-flow-actions .btn {
  min-width: 110px;
  padding: 11px 22px;
}

/* Bulk: group picker, apply-to-all, recipient table, totals */
.fx-group-picker {
  display: flex;
  gap: 8px;
}

.fx-group-select {
  flex: 1 1 auto;
  min-width: 0;
}

.fx-group-picker .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.fx-apply-all {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.fx-apply-all .input-group {
  flex: 0 0 170px;
}

.fx-apply-all > .form-control {
  flex: 1 1 auto;
}

.fx-apply-all .btn {
  flex-shrink: 0;
}

.fx-recipient-table {
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
}

.fx-recipient-table thead th {
  padding-top: 10px;
  padding-bottom: 10px;
  background: var(--fx-canvas);
  color: var(--fx-muted);
  font-size: 12px;
  font-weight: 500;
}

.fx-recipient-table tbody td {
  padding-top: 10px;
  padding-bottom: 10px;
  border-color: var(--fx-line);
  font-size: 13px;
}

.fx-recipient-table tbody tr:last-child td {
  border-bottom: 0;
}

.fx-recipient-name {
  color: var(--fx-ink);
  font-weight: 600;
}

.fx-recipient-meta {
  color: var(--fx-muted);
  font-size: 12px;
}

.fx-recipient-table .input-group {
  width: 140px;
}

.fx-recipient-table .fx-narration-input {
  min-width: 150px;
}

.fx-recipient-empty {
  padding: 28px 16px !important;
  color: var(--fx-muted);
  text-align: center;
}

.fx-recipient-empty i {
  display: block;
  margin-bottom: 6px;
  color: var(--fx-brand) !important;
  font-size: 24px;
}

.fx-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--fx-radius-sm);
  background: var(--fx-canvas);
}

.fx-summary-strip span {
  display: block;
  color: var(--fx-muted);
  font-size: 12px;
}

.fx-summary-strip strong {
  color: var(--fx-ink);
  font-family: var(--fx-font-heading);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 575.98px) {
  .fx-steps {
    gap: 6px;
  }

  .fx-step:not(.is-active) .fx-step-label {
    display: none;
  }

  .fx-group-picker,
  .fx-apply-all,
  .fx-section-head {
    flex-wrap: wrap;
  }

  .fx-group-select,
  .fx-apply-all > .input-group,
  .fx-apply-all > .form-control {
    flex: 1 1 100% !important;
  }

  .fx-recipient-table td:nth-child(2) {
    min-width: 170px;
  }

  .fx-review-amount {
    font-size: 28px;
  }

  .fx-pin-box {
    width: 52px;
    height: 52px;
  }
}

/* ---------------------------------------------------------
   Notice modal (same size wherever it is shown)
--------------------------------------------------------- */

.fx-notice-dialog {
  max-width: 440px;
}

.fx-notice-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--fx-brand-soft);
  color: var(--fx-brand);
  font-size: 22px;
}

.fx-notice-icon i {
  color: inherit !important;
}

/* ---------------------------------------------------------
   Settings › Business logo upload
--------------------------------------------------------- */
.fx-app .fx-logo-upload {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  border: 1.5px dashed color-mix(in srgb, var(--fx-brand) 35%, var(--fx-line));
  border-radius: var(--fx-radius);
  background: var(--fx-canvas);
  cursor: pointer;
  outline: none;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.fx-app .fx-logo-upload:hover,
.fx-app .fx-logo-upload.is-dragover {
  border-color: var(--fx-brand);
  background: var(--fx-brand-soft);
}

.fx-app .fx-logo-upload:focus-visible {
  border-color: var(--fx-brand);
  box-shadow: 0 0 0 3px var(--fx-brand-soft);
}

.fx-app .fx-logo-upload.has-logo {
  border-style: solid;
  border-color: var(--fx-line);
  background: var(--fx-surface);
}

.fx-app .fx-logo-upload.has-logo:hover {
  background: var(--fx-surface);
}

.fx-app .fx-logo-tile {
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  border-radius: var(--fx-radius-sm);
  overflow: hidden;
}

.fx-app .fx-logo-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: var(--fx-surface);
  border: 1px solid var(--fx-line);
  border-radius: inherit;
  color: var(--fx-brand);
  font-size: 30px;
}

.fx-app .fx-logo-placeholder i {
  color: inherit;
  font-size: 28px !important;
}

.fx-app .fx-logo-preview {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 8px;
  background: var(--fx-surface);
  border: 1px solid var(--fx-line);
  border-radius: inherit;
}

.fx-app .fx-logo-preview.d-none {
  display: none !important;
}

.fx-app .fx-logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.fx-app .fx-logo-body {
  min-width: 0;
  flex: 1 1 auto;
}

.fx-app .fx-logo-title {
  font-family: var(--fx-font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--fx-ink);
}

.fx-app .fx-logo-body .fx-subtext {
  margin-top: 2px;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fx-app .fx-logo-upload.has-logo .fx-subtext {
  white-space: nowrap;
}

.fx-app .fx-logo-title-filled,
.fx-app .fx-logo-upload.has-logo .fx-logo-title-empty {
  display: none;
}

.fx-app .fx-logo-upload.has-logo .fx-logo-title-filled {
  display: inline;
}

.fx-app .fx-logo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.fx-app .fx-logo-actions .btn {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 6px 14px;
  font-size: 13px;
}

.fx-app .fx-logo-actions .btn i {
  font-size: 13px;
  margin-right: 4px;
}

.fx-app .fx-logo-remove {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--fx-danger);
  font-family: var(--fx-font-body);
  font-size: 13px;
  font-weight: 600;
  transition: background-color .15s ease;
}

.fx-app .fx-logo-remove i {
  color: inherit;
}

.fx-app .fx-logo-remove:hover {
  background: color-mix(in srgb, var(--fx-danger) 10%, #fff);
}

.fx-app .fx-logo-upload.has-logo .fx-logo-remove {
  display: inline-flex;
}

.fx-app .fx-logo-progress {
  margin-top: 10px;
}

@media (max-width: 575.98px) {
  .fx-app .fx-logo-upload {
    gap: 14px;
    padding: 14px;
  }

  .fx-app .fx-logo-tile {
    width: 64px;
    height: 64px;
  }

  .fx-app .fx-logo-actions {
    gap: 4px;
  }
}

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */

@media (max-width: 1100px) {
  .fx-hero {
    grid-template-columns: 1fr;
  }

  .fx-hero-tiles {
    grid-template-rows: none;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1000px) {
  .fx-dashboard .dashboard-header {
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .fx-dashboard .dashboard-header h1 {
    font-size: 24px !important;
  }

  .fx-dashboard .dashboard-date-range {
    width: 100%;
    overflow-x: auto;
  }

  .fx-dashboard .range-btn {
    flex: 0 0 auto;
  }

  .fx-hero {
    padding: 22px;
    gap: 20px;
  }

  .fx-hero-tiles {
    grid-template-columns: 1fr;
  }

  .fx-dashboard .chart-card {
    padding: 20px 18px 16px;
  }

  .fx-dashboard .chart-header {
    flex-direction: column;
  }

  .fx-dashboard .chart-container {
    height: 260px;
  }

  .fx-date-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------
   Settings › Verification & limits
   Segmented KYC/KYB switch reuses the pill-tab look.
--------------------------------------------------------- */

.fx-app .fx-segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--fx-surface);
  border: 1px solid var(--fx-line);
  border-radius: 999px;
}

.fx-app .fx-segmented .nav-link {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 9px 16px;
  border-radius: 999px;
  color: var(--fx-muted);
  font-family: var(--fx-font-body);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.fx-app .fx-segmented .nav-link i {
  color: inherit;
  font-size: 15px;
}

.fx-app .fx-segmented .btn-check:not(:checked) + .nav-link:hover {
  background: var(--fx-brand-soft);
  color: var(--fx-brand);
}

.fx-app .fx-segmented .btn-check:checked + .nav-link {
  background: var(--fx-brand);
  color: #fff;
  font-weight: 600;
}

.fx-app .fx-segmented .btn-check:focus-visible + .nav-link {
  outline: 2px solid var(--color-3);
  outline-offset: 2px;
}

.fx-app .fx-tier-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 24px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-canvas);
}

.fx-app .fx-tier-summary-name,
.fx-app .fx-tier-name {
  font-family: var(--fx-font-heading);
  font-variation-settings: "wdth" 112;
  letter-spacing: -0.02em;
  color: var(--fx-ink);
  font-weight: 600;
}

.fx-app .fx-tier-summary-name {
  font-size: 20px;
}

.fx-app .fx-tier-name {
  font-size: 16px;
}

.fx-app .fx-tier-card {
  height: 100%;
  padding: 20px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface);
}

/* Individual accounts: the business-only tiers, collapsed into one upgrade card */
.fx-app .fx-tier-card--locked {
  border-style: dashed;
  background: var(--fx-canvas);
}

.fx-app .fx-tier-card.is-current {
  border-color: var(--fx-brand);
  box-shadow: 0 0 0 3px var(--fx-brand-soft);
}

.fx-app .fx-tier-limits {
  margin: 0;
  padding-top: 12px;
  border-top: 1px dashed var(--fx-line);
}

.fx-app .fx-tier-limits > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  font-size: 13px;
}

.fx-app .fx-tier-limits dt {
  font-weight: 400;
  color: var(--fx-muted);
}

.fx-app .fx-tier-limits dd {
  margin: 0;
  font-weight: 600;
  color: var(--fx-text);
}

.fx-app .fx-tier-progress {
  margin-top: 14px;
}

.fx-app .fx-tier-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--fx-line);
  overflow: hidden;
}

.fx-app .fx-tier-progress-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--fx-brand);
}

.fx-app .fx-verification-form {
  padding: 24px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
}

.fx-app .fx-requirement {
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--fx-line);
}

.fx-app .fx-requirement > * {
  padding-left: 0;
}

.fx-app .fx-owner-card {
  padding: 16px 20px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-canvas);
}

/* File dropzones (file-dropzone.js): KYC/KYB uploads */
.fx-dropzone {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 26px 20px;
  border: 1.5px dashed #d6cfc2;
  border-radius: var(--fx-radius-sm);
  background: var(--fx-canvas);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}

.fx-dropzone:hover,
.fx-dropzone:focus-within,
.fx-dropzone.is-dragover {
  border-color: var(--fx-brand);
  background: #fff;
}

.fx-dropzone.is-dragover {
  border-style: solid;
}

.fx-dropzone.is-invalid {
  border-color: var(--fx-danger);
}

.fx-dropzone.is-disabled {
  cursor: not-allowed;
  opacity: .6;
}

.fx-dropzone.has-file {
  padding: 14px 16px;
  border-style: solid;
  background: #fff;
  text-align: left;
}

.fx-dropzone-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.fx-dropzone-icon {
  display: block;
  margin-bottom: 6px;
  color: var(--fx-muted);
  font-size: 22px;
}

.fx-dropzone-title {
  color: var(--fx-ink);
  font-weight: 600;
  font-size: 14px;
}

.fx-dropzone-hint {
  margin-top: 2px;
  color: var(--fx-muted);
  font-size: 12.5px;
}

.fx-dropzone-file {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fx-dropzone-file-icon {
  color: var(--fx-mint);
  font-size: 22px;
}

.fx-dropzone-file-text {
  flex: 1;
  min-width: 0;
}

.fx-dropzone-file-name {
  overflow: hidden;
  color: var(--fx-ink);
  font-weight: 600;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-dropzone-error {
  margin-top: 8px;
  color: var(--fx-danger);
  font-size: 12.5px;
  text-align: center;
}

.fx-app .fx-upload-guidance {
  margin: 6px 0 12px;
  padding: 0;
  list-style: none;
  color: var(--fx-muted);
  font-size: 13px;
}

.fx-app .fx-upload-guidance li::before {
  content: "·";
  margin-right: 8px;
}

.fx-app .fx-person {
  margin-top: 12px;
  border: 1px solid var(--fx-line);
  border-radius: 16px;
  background: #fff;
}

.fx-app .fx-person-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
}

.fx-app .fx-person.is-open .fx-person-summary {
  display: none;
}

.fx-app .fx-person-form {
  display: none;
  padding: 20px;
}

.fx-app .fx-person.is-open .fx-person-form {
  display: block;
}

.fx-app .fx-person-summary-text {
  min-width: 0;
}

.fx-app .fx-person-subtitle {
  overflow: hidden;
  color: var(--fx-muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-app .fx-person-actions {
  display: flex;
  flex-shrink: 0;
  gap: 18px;
}

.fx-app .fx-person-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--fx-ink);
  font-weight: 500;
  font-size: 14px;
}

.fx-app .fx-person-link:hover {
  text-decoration: underline;
}

.fx-app .fx-person-link-muted {
  color: var(--fx-muted);
}

.fx-app .fx-person-link:disabled {
  opacity: .5;
  text-decoration: none;
}

.fx-app .fx-person-add {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 18px;
  border: 1.5px dashed #d6cfc2;
  border-radius: 16px;
  background: transparent;
  color: var(--fx-ink);
  font-weight: 500;
  font-size: 14px;
}

.fx-app .fx-person-add:hover:not(:disabled) {
  border-color: var(--fx-brand);
  background: #fff;
}

.fx-app .fx-person-add:disabled {
  opacity: .5;
}

.fx-app .fx-person-title {
  color: var(--fx-ink);
  font-weight: 600;
  font-size: 14px;
}

.fx-app .fx-person-section {
  margin: 14px 0 -6px;
  color: var(--fx-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.fx-app .fx-reviewer-note {
  padding: 8px 12px;
  border-radius: 10px;
  background: #fdecec;
  color: var(--fx-danger);
  font-size: 13px;
}

@media (max-width: 575.98px) {
  .fx-app .account-settings-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .fx-app .account-settings-tabs .nav-link {
    white-space: nowrap;
  }

  .fx-app .fx-verification-form {
    padding: 16px;
  }

  .fx-app .fx-segmented .nav-link {
    padding: 9px 10px;
    font-size: 13px;
  }
}

/* ---------------------------------------------------------
   Hide / show balance (balance-privacy.js)
--------------------------------------------------------- */
.fx-balance-hidden .fx-money-value {
  display: none !important;
}

.fx-balance-hidden .fx-money::after {
  content: "₦••••••";
  letter-spacing: .06em;
}

.fx-app .fx-balance-toggle {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: 2px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fx-muted);
  transition: background-color .15s ease, color .15s ease;
}

.fx-app .fx-balance-toggle i {
  color: inherit;
  font-size: 16px;
}

.fx-app .fx-balance-toggle:hover,
.fx-app .fx-balance-toggle:focus-visible {
  background: var(--fx-brand-soft);
  color: var(--fx-brand);
}

/* ---------------------------------------------------------
   Customer details (Customers > View details)
--------------------------------------------------------- */
.fx-app .fx-customer-card {
  padding: 24px 28px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius);
  background: var(--fx-surface);
  box-shadow: var(--fx-shadow);
}

.fx-app .fx-customer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.fx-app .fx-customer-avatar {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--fx-brand-soft);
  color: var(--fx-brand);
  font-family: var(--fx-font-heading);
  font-size: 22px;
  font-weight: 700;
}

.fx-app .fx-customer-name {
  margin: 0;
  color: var(--fx-ink);
  font-size: 22px;
  font-weight: 650;
}

.fx-app .fx-customer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fx-app .fx-customer-actions .btn {
  white-space: nowrap;
}

.fx-app .fx-customer-actions .btn i {
  margin-right: 4px;
  color: inherit;
}

.fx-app .fx-customer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 24px;
  margin: 22px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--fx-line);
}

.fx-app .fx-customer-grid dt {
  margin-bottom: 4px;
  color: var(--fx-muted);
  font-size: 12px;
  font-weight: 500;
}

.fx-app .fx-customer-grid dd {
  margin: 0;
  overflow: hidden;
  color: var(--fx-ink);
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-app .fx-customer-grid dd a {
  color: inherit;
}

.fx-app .fx-customer-grid dd a:hover,
.fx-app .fx-customer-link:hover {
  color: var(--fx-brand);
}

.fx-app .fx-customer-link {
  color: inherit;
}

.fx-app .card-summary-stats.fx-stats-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fx-app .fx-customer-tabs {
  padding: 4px 24px 0;
  border-bottom: 1px solid var(--fx-line);
}

.fx-app .fx-customer-tabs .nav-link {
  display: inline-flex;
  align-items: center;
}

.fx-app .fx-customer-tabs .fx-count-pill {
  padding: 2px 8px;
  font-size: 11px;
}

.fx-app .fx-customer-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 20px 4px;
}

.fx-app .fx-customer-toolbar > .form-control {
  flex: 1 1 260px;
  max-width: 420px;
}

.fx-app .fx-customer-toolbar > .form-select,
.fx-app .fx-customer-toolbar > .select2-container {
  flex: 0 0 200px;
  width: 200px !important;
}

@media (max-width: 1199.98px) {
  .fx-app .card-summary-stats.fx-stats-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 0;
  }

  .fx-app .card-summary-stats.fx-stats-4 .card-metric:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .fx-app .card-summary-stats.fx-stats-4 .card-metric:nth-child(2) {
    padding-right: 0;
  }

  .fx-app .fx-customer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .fx-app .card-summary-stats.fx-stats-4 {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .fx-app .card-summary-stats.fx-stats-4 .card-metric {
    padding: 0;
  }
}

@media (max-width: 575.98px) {
  .fx-app .fx-customer-card {
    padding: 20px;
  }

  .fx-app .fx-customer-actions {
    width: 100%;
  }

  .fx-app .fx-customer-actions .btn {
    flex: 1 1 0;
    padding-right: 12px !important;
    padding-left: 12px !important;
  }

  .fx-app .fx-customer-grid {
    grid-template-columns: 1fr;
  }

  .fx-app .fx-customer-tabs {
    padding: 4px 16px 0;
  }

  .fx-app .fx-customer-toolbar {
    padding: 16px 16px 4px;
  }

  .fx-app .fx-customer-toolbar > .form-control,
  .fx-app .fx-customer-toolbar > .form-select,
  .fx-app .fx-customer-toolbar > .select2-container {
    flex: 1 1 100%;
    max-width: none;
    width: 100% !important;
  }
}

/* ---------------------------------------------------------
   Debts: create/edit form choices, details page
--------------------------------------------------------- */
.fx-app .fx-choice-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.fx-app .fx-choice-options-stack {
  grid-template-columns: 1fr;
  gap: 10px;
}

.fx-app .fx-choice {
  --fx-tone: var(--fx-brand);
  --fx-tone-soft: var(--fx-brand-soft);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.fx-app .fx-choice[data-tone="LOW"] { --fx-tone: #0ea5e9; --fx-tone-soft: #e8f6fd; }
.fx-app .fx-choice[data-tone="MEDIUM"],
.fx-app .fx-choice[data-tone="PENDING"] { --fx-tone: var(--fx-amber); --fx-tone-soft: var(--fx-amber-soft); }
.fx-app .fx-choice[data-tone="HIGH"],
.fx-app .fx-choice[data-tone="OVERDUE"] { --fx-tone: var(--fx-danger); --fx-tone-soft: #fdecec; }
.fx-app .fx-choice[data-tone="PAID"] { --fx-tone: var(--fx-mint); --fx-tone-soft: var(--fx-mint-soft); }

.fx-app .fx-choice:hover {
  border-color: color-mix(in srgb, var(--fx-brand) 35%, var(--fx-line));
}

.fx-app .fx-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.fx-app .fx-choice:has(input:checked) {
  border-color: var(--fx-brand);
  background: var(--fx-brand-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fx-brand) 12%, transparent);
}

.fx-app .fx-choice:has(input:focus-visible) {
  outline: 2px solid var(--fx-brand);
  outline-offset: 2px;
}

.fx-app .fx-choice-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fx-ink);
  font-size: 14px;
}

.fx-app .fx-choice-head strong {
  font-weight: 650;
}

.fx-app .fx-choice-dot {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--fx-tone);
  box-shadow: 0 0 0 3px var(--fx-tone-soft);
}

.fx-app .fx-choice-text {
  color: var(--fx-muted);
  font-size: 12px;
  line-height: 1.5;
}

.fx-app .fx-choice-current {
  display: none;
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--fx-canvas);
  color: var(--fx-muted);
  font-size: 11px;
  font-weight: 600;
}

.fx-app .fx-choice.is-current .fx-choice-current {
  display: inline-block;
}

.fx-app .fx-debt-recipient {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  color: var(--fx-muted);
  font-size: 13px;
}

.fx-app .fx-debt-recipient i {
  margin-top: 1px;
  color: var(--fx-brand);
}

.fx-app .fx-debt-recipient strong {
  color: var(--fx-ink);
}

.fx-app .fx-debt-recipient.is-missing,
.fx-app .fx-debt-recipient.is-missing i {
  color: var(--fx-danger);
}

/* Details page */
.fx-app .fx-debt-ref {
  margin-bottom: 4px;
  color: var(--fx-brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.fx-app .fx-debt-amount {
  margin: 0;
  color: var(--fx-ink);
  font-family: var(--fx-font-heading);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.fx-app .fx-debt-due {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
}

.fx-app .fx-tone-muted { color: var(--fx-muted); }
.fx-app .fx-tone-brand { color: var(--fx-brand); }
.fx-app .fx-tone-success { color: var(--fx-mint); }
.fx-app .fx-tone-warning { color: var(--fx-amber); }
.fx-app .fx-tone-danger { color: var(--fx-danger); }

.fx-app .fx-btn-danger-soft,
.fx-app .fx-btn-danger-soft i {
  color: var(--fx-danger) !important;
}

.fx-app .fx-btn-danger-soft:hover {
  background: #fdecec !important;
}

.fx-app .fx-panel {
  height: 100%;
  padding: 24px 28px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius);
  background: var(--fx-surface);
  box-shadow: var(--fx-shadow);
}

.fx-app .fx-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.fx-app .fx-panel-head h3 {
  margin: 2px 0 0;
  color: var(--fx-ink);
  font-size: 18px;
  font-weight: 650;
}

.fx-app .fx-panel-text {
  color: var(--fx-text);
  font-size: 14px;
  line-height: 1.6;
}

.fx-app .fx-panel-subhead {
  margin: 22px 0 10px;
  color: var(--fx-muted);
  font-family: var(--fx-font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.fx-app .fx-inline-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--fx-radius-sm);
  background: var(--fx-canvas);
  color: var(--fx-text);
  font-size: 13px;
  line-height: 1.5;
}

.fx-app .fx-inline-notice i {
  margin-top: 1px;
  color: var(--fx-brand);
}

.fx-app .fx-inline-notice a {
  color: var(--fx-brand);
  font-weight: 600;
}

.fx-app .fx-inline-notice.fx-tone-success { background: var(--fx-mint-soft); }
.fx-app .fx-inline-notice.fx-tone-success i { color: var(--fx-mint); }
.fx-app .fx-inline-notice.fx-tone-warning { background: var(--fx-amber-soft); }
.fx-app .fx-inline-notice.fx-tone-warning i { color: var(--fx-amber); }
.fx-app .fx-inline-notice.fx-tone-danger { background: #fdecec; }
.fx-app .fx-inline-notice.fx-tone-danger i { color: var(--fx-danger); }
.fx-app .fx-inline-notice.fx-tone-success,
.fx-app .fx-inline-notice.fx-tone-warning,
.fx-app .fx-inline-notice.fx-tone-danger { color: var(--fx-text); }

.fx-app .fx-reminder-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fx-app .fx-reminder-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--fx-line);
  font-size: 14px;
}

.fx-app .fx-reminder-list li:last-child {
  border-bottom: 0;
}

.fx-app .fx-reminder-date {
  color: var(--fx-ink);
  font-weight: 600;
  white-space: nowrap;
}

.fx-app .fx-reminder-type {
  color: var(--fx-muted);
  text-align: right;
}

.fx-app .fx-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fx-app .fx-timeline-item {
  position: relative;
  display: flex;
  gap: 14px;
  padding-bottom: 20px;
}

.fx-app .fx-timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 36px;
  bottom: 4px;
  left: 17px;
  width: 1px;
  background: var(--fx-line);
}

.fx-app .fx-timeline-item:last-child {
  padding-bottom: 0;
}

.fx-app .fx-timeline-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--fx-canvas);
  font-size: 15px;
}

.fx-app .fx-timeline-icon i {
  color: inherit;
}

.fx-app .fx-timeline-icon.fx-tone-brand { background: var(--fx-brand-soft); }
.fx-app .fx-timeline-icon.fx-tone-success { background: var(--fx-mint-soft); }
.fx-app .fx-timeline-icon.fx-tone-warning { background: var(--fx-amber-soft); }

.fx-app .fx-timeline-body {
  min-width: 0;
  padding-top: 6px;
}

.fx-app .fx-timeline-title {
  color: var(--fx-ink);
  font-size: 14px;
  font-weight: 600;
}

.fx-app .fx-timeline-text {
  margin-top: 2px;
  color: var(--fx-text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.fx-app .fx-timeline-meta {
  margin-top: 4px;
  color: var(--fx-subtle);
  font-size: 12px;
}

@media (max-width: 767.98px) {
  .fx-app .fx-choice-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .fx-app .fx-debt-amount {
    font-size: 26px;
  }

  .fx-app .fx-panel {
    padding: 20px;
  }

  .fx-app .fx-debt-card .fx-customer-actions .fx-btn-danger-soft {
    flex: 0 0 auto;
  }
}

/* Activity Logs drawer (header icon); rendered by activity-logs.js */
.fx-app #kt_activities_toggle {
  position: relative;
}

.fx-app .fx-activity-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fx-brand);
  box-shadow: 0 0 0 2px var(--fx-surface);
}

.fx-app #kt_activities > .card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* The list fills whatever the header, filters and (optional) Load more leave */
.fx-app #kt_activities #kt_activities_body {
  flex: 1 1 auto;
  min-height: 0;
}

.fx-app #kt_activities #kt_activities_scroll {
  height: 100% !important;
}

.fx-app #kt_activities #kt_activities_footer {
  flex-shrink: 0;
}

.fx-app #kt_activities .card-header {
  align-items: center;
  min-height: 76px;
  border-bottom: 1px solid var(--fx-line);
}

.fx-app #kt_activities .card-title h3 {
  font-family: var(--fx-font-heading);
  font-size: 18px;
  color: var(--fx-ink) !important;
}

.fx-app .fx-activity-filters {
  display: flex;
  flex-shrink: 0;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 14px 2.25rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--fx-line);
  scrollbar-width: none;
}

.fx-app .fx-activity-filters::-webkit-scrollbar {
  display: none;
}

.fx-app .fx-activity-chip {
  flex-shrink: 0;
  padding: 6px 12px;
  border: 1px solid var(--fx-line);
  border-radius: 999px;
  background: var(--fx-surface);
  color: var(--fx-muted);
  font-family: var(--fx-font-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.fx-app .fx-activity-chip:hover {
  border-color: var(--color-3);
  background: var(--fx-brand-soft);
  color: var(--fx-brand);
}

.fx-app .fx-activity-chip.active {
  border-color: var(--fx-brand);
  background: var(--fx-brand);
  color: #fff;
}

.fx-app .fx-activity-day {
  margin: 4px 0 12px;
  color: var(--fx-subtle);
  font-family: var(--fx-font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.fx-app .fx-activity-list .fx-timeline + .fx-activity-day {
  margin-top: 24px;
}

.fx-app .fx-timeline-icon.fx-tone-danger { background: #fdecec; }

.fx-app a.fx-activity-body {
  display: block;
  flex: 1;
  margin: -4px -8px 0;
  padding: 10px 8px 6px;
  border-radius: var(--fx-radius-sm);
  transition: background-color .15s ease;
}

.fx-app a.fx-activity-body:hover {
  background: var(--fx-canvas);
}

.fx-app .fx-activity-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 48px 16px;
  text-align: center;
}

.fx-app .fx-activity-empty .fx-timeline-icon {
  margin-bottom: 6px;
}

.fx-app .fx-activity-skeleton {
  display: flex;
  gap: 14px;
  padding-bottom: 20px;
}

.fx-app .fx-activity-skeleton span,
.fx-app .fx-activity-skeleton i {
  display: block;
  border-radius: 999px;
  background: var(--fx-canvas);
  animation: fx-activity-pulse 1.2s ease-in-out infinite;
}

.fx-app .fx-activity-skeleton span {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}

.fx-app .fx-activity-skeleton div {
  flex: 1;
  padding-top: 6px;
}

.fx-app .fx-activity-skeleton i {
  height: 10px;
  margin-bottom: 8px;
}

.fx-app .fx-activity-skeleton i + i {
  width: 55%;
}

@keyframes fx-activity-pulse {
  50% { opacity: .5; }
}

@media (max-width: 991.98px) {
  .fx-app .fx-activity-filters {
    padding: 12px 1.5rem;
  }
}

/* ---------------------------------------------------------
   Invoices: form, details page, preview sheet
--------------------------------------------------------- */
.fx-app .fx-choice[data-tone="DRAFT"] { --fx-tone: var(--fx-subtle); --fx-tone-soft: var(--fx-canvas); }

.fx-app .fx-choice.is-disabled {
  cursor: not-allowed;
  opacity: .5;
}

.fx-app .fx-choice.is-disabled:hover {
  border-color: var(--fx-line);
}

.fx-app .fx-invoice-items {
  color: var(--fx-text);
  font-size: 14px;
}

.fx-app .fx-invoice-items thead th {
  padding: 0 0 10px;
  border-bottom: 1px solid var(--fx-line);
  color: var(--fx-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.fx-app .fx-invoice-items tbody td {
  padding: 14px 0;
  border-bottom: 1px solid var(--fx-line);
}

.fx-app .fx-invoice-items th + th,
.fx-app .fx-invoice-items td + td {
  padding-left: 16px;
}

.fx-app .fx-invoice-items tfoot td {
  padding: 8px 0 0;
  border: 0;
  color: var(--fx-muted);
}

.fx-app .fx-invoice-items tfoot td + td {
  color: var(--fx-ink);
  font-weight: 600;
}

.fx-app .fx-invoice-items tfoot tr:first-child td {
  padding-top: 16px;
}

.fx-app .fx-invoice-items .fx-invoice-grand td {
  padding-top: 12px;
  color: var(--fx-ink);
  font-family: var(--fx-font-heading);
  font-size: 18px;
  font-weight: 700;
}

.fx-app .fx-invoice-sheet {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 56px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius);
  background: var(--fx-surface);
  box-shadow: var(--fx-shadow);
  color: var(--fx-text);
}

.fx-app .fx-invoice-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--fx-line);
}

.fx-app .fx-invoice-sheet-business {
  margin-bottom: 6px;
  color: var(--fx-ink);
  font-family: var(--fx-font-heading);
  font-size: 22px;
  font-weight: 700;
}

.fx-app .fx-invoice-sheet-title {
  color: var(--fx-brand);
  font-family: var(--fx-font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.fx-app .fx-invoice-sheet-number {
  margin-top: 4px;
  color: var(--fx-ink);
  font-family: var(--fx-font-heading);
  font-size: 18px;
  font-weight: 650;
}

.fx-app .fx-invoice-sheet-meta {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 24px;
  padding: 28px 0 32px;
}

.fx-app .fx-invoice-sheet-label {
  margin-bottom: 6px;
  color: var(--fx-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.fx-app .fx-invoice-sheet-strong {
  color: var(--fx-ink);
  font-size: 15px;
  font-weight: 600;
}

.fx-app .fx-invoice-sheet-due {
  font-family: var(--fx-font-heading);
  font-size: 20px;
}

.fx-app .fx-invoice-sheet-muted {
  color: var(--fx-muted);
  font-size: 13px;
  line-height: 1.6;
}

.fx-app .fx-invoice-sheet-note {
  margin-top: 32px;
  padding: 18px 20px;
  border-radius: var(--fx-radius-sm);
  background: var(--fx-canvas);
  font-size: 14px;
  line-height: 1.6;
}

.fx-app .fx-invoice-sheet-foot {
  margin-top: 32px;
  color: var(--fx-subtle);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 767.98px) {
  .fx-app .fx-invoice-sheet {
    padding: 28px 20px;
  }

  .fx-app .fx-invoice-sheet-head {
    flex-direction: column;
  }

  .fx-app .fx-invoice-sheet-meta {
    grid-template-columns: 1fr 1fr;
  }
}

/* Preview: Print / Save as PDF prints only the invoice */
@media print {
  .fx-app #kt_aside,
  .fx-app #kt_header,
  .fx-app #kt_activities,
  .fx-app .d-print-none {
    display: none !important;
  }

  .fx-app .wrapper,
  .fx-app #kt_content {
    padding: 0 !important;
    margin: 0 !important;
  }

  .fx-app,
  .fx-app #kt_content {
    background: #fff !important;
  }

  .fx-app .fx-invoice-sheet {
    max-width: none;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
}

/* ---------------------------------------------------------
   Teams: business switcher, team page, invitations
--------------------------------------------------------- */

.fx-app .fx-business-avatar {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--fx-brand);
  color: #fff;
  font-family: var(--fx-font-heading);
  font-weight: 700;
  font-size: 15px;
}

.fx-app .fx-business-avatar-lg { width: 48px; height: 48px; border-radius: 14px; font-size: 20px; }
.fx-app .fx-business-avatar-xl { width: 64px; height: 64px; border-radius: 18px; font-size: 26px; }

.fx-app .fx-business-switch-wrap { margin-bottom: 8px; }

.fx-app .fx-business-switch,
.fx-app .fx-business-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface);
  color: var(--fx-text);
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease;
}

.fx-app .fx-business-switch:hover,
.fx-app .fx-business-switch:focus-visible,
.fx-app button.fx-business-option:hover,
.fx-app button.fx-business-option:focus-visible {
  border-color: var(--fx-brand);
  background: var(--fx-brand-soft);
  outline: none;
}

.fx-app .fx-business-switch > .bi-chevron-expand { margin-left: auto; color: var(--fx-subtle); }

.fx-app .fx-business-switch-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }

.fx-app .fx-business-switch-text strong {
  overflow: hidden;
  font-family: var(--fx-font-heading);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.fx-app .fx-business-switch-text small { color: var(--fx-muted); font-size: 12px; }

.fx-app .fx-business-switch-dot {
  position: absolute;
  top: 8px;
  left: 38px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--fx-surface);
  border-radius: 50%;
  background: var(--fx-danger);
}

.fx-app .fx-business-list { display: flex; flex-direction: column; gap: 8px; }

.fx-app .fx-business-option.is-active { border-color: var(--fx-brand); background: var(--fx-brand-soft); }
.fx-app .fx-business-option.is-loading { opacity: .6; pointer-events: none; }
.fx-app .fx-business-option.is-invite { flex-wrap: wrap; background: var(--fx-canvas); }
.fx-app .fx-invite-actions { display: flex; gap: 8px; margin-left: auto; }

/* "Create a new business" at the foot of the switcher */
.fx-app .fx-business-create {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px dashed var(--fx-line);
  border-radius: var(--fx-radius-sm);
  background: transparent;
  color: var(--fx-text);
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease;
}

.fx-app .fx-business-create:hover,
.fx-app .fx-business-create:focus-visible {
  border-color: var(--fx-brand);
  background: var(--fx-brand-soft);
  outline: none;
}

.fx-app .fx-business-create-icon {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--fx-brand-soft);
  color: var(--fx-brand);
  font-size: 16px;
}

.fx-app .fx-form-error {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--fx-radius-sm);
  background: #fdecec;
  color: var(--fx-danger);
  font-size: 13px;
}

/* Dashboard for a member whose role has no balances */
.fx-app .fx-member-welcome {
  padding: 28px;
  border: 1px solid var(--fx-line);
  background: var(--fx-surface);
  box-shadow: var(--fx-shadow);
}

.fx-app .fx-member-welcome-head { display: flex; align-items: center; gap: 16px; }
.fx-app .fx-member-welcome h2 { font-family: var(--fx-font-heading); font-size: 22px; font-weight: 700; }

.fx-app .fx-member-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.fx-app .fx-member-shortcut {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
  color: var(--fx-text);
}

.fx-app .fx-member-shortcut:hover { border-color: var(--fx-brand); background: var(--fx-brand-soft); color: var(--fx-text); }
.fx-app .fx-member-shortcut > .bi:first-child { font-size: 20px; color: var(--fx-brand); }
.fx-app .fx-member-shortcut > span { display: flex; flex-direction: column; }
.fx-app .fx-member-shortcut small { color: var(--fx-muted); font-size: 12px; }

/* Team page */
.fx-app .fx-team-tabs .fx-count {
  display: inline-block;
  min-width: 22px;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--fx-canvas);
  color: var(--fx-muted);
  font-size: 12px;
  text-align: center;
}

.fx-app .fx-team-tabs .nav-link.active .fx-count { background: var(--fx-brand-soft); color: var(--fx-brand); }

.fx-app .fx-team-table td { vertical-align: middle; }
.fx-app .fx-row-muted td { opacity: .65; }
.fx-app .fx-row-muted td:last-child { opacity: 1; }

.fx-app .fx-member {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
}

.fx-app button.fx-member:not(:disabled):hover strong { color: var(--fx-brand); }

.fx-app .fx-member-avatar {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--fx-brand-soft);
  color: var(--fx-brand);
  font-family: var(--fx-font-heading);
  font-size: 14px;
  font-weight: 700;
}

.fx-app .fx-member-avatar.is-invite { background: var(--fx-canvas); color: var(--fx-muted); }
.fx-app .fx-member-avatar-lg { width: 52px; height: 52px; font-size: 18px; }

.fx-app .fx-member-text { display: flex; flex-direction: column; min-width: 0; }
.fx-app .fx-member-text strong { font-weight: 600; }
.fx-app .fx-member-text small { color: var(--fx-muted); font-size: 12px; }

.fx-app .fx-role-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--fx-canvas);
  color: var(--fx-text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.fx-app .fx-role-chip.is-owner { background: var(--fx-brand); color: #fff; }

.fx-app .fx-role-intro {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--fx-radius-sm);
  background: var(--fx-canvas);
  color: var(--fx-text);
  font-size: 13px;
}

.fx-app .fx-role-intro i { color: var(--fx-brand); }

.fx-app .fx-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.fx-app .fx-role-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius);
  background: var(--fx-surface);
  box-shadow: var(--fx-shadow);
}

.fx-app .fx-role-card header { display: flex; justify-content: space-between; gap: 12px; }
.fx-app .fx-role-card h3 { margin: 0 0 2px; font-family: var(--fx-font-heading); font-size: 17px; font-weight: 700; }

.fx-app .fx-role-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--fx-muted); font-size: 12px; }
.fx-app .fx-role-meta i { margin-right: 4px; }

.fx-app .fx-role-perm-group { display: flex; flex-direction: column; gap: 6px; }
.fx-app .fx-role-perm-group .fx-label { font-size: 11px; }
.fx-app .fx-role-perms { display: flex; flex-wrap: wrap; gap: 6px; }

.fx-app .fx-perm-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--fx-brand-soft);
  color: var(--fx-brand);
  font-size: 12px;
  font-weight: 500;
}

.fx-app .fx-perm-chip.is-locked { background: var(--fx-canvas); color: var(--fx-subtle); text-decoration: line-through; }
.fx-app .fx-perm-chip.is-locked i { text-decoration: none; }

.fx-app .fx-role-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 48px 20px;
  border: 1px dashed var(--fx-line);
  border-radius: var(--fx-radius);
  background: var(--fx-surface);
  text-align: center;
}

.fx-app .fx-role-templates { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fx-app .fx-role-templates .fx-label { margin-right: 4px; }

.fx-app .fx-role-template {
  padding: 6px 14px;
  border: 1px solid var(--fx-line);
  border-radius: 999px;
  background: var(--fx-surface);
  color: var(--fx-text);
  font-size: 13px;
  font-weight: 500;
}

.fx-app .fx-role-template:hover { border-color: var(--fx-brand); color: var(--fx-brand); }
.fx-app .fx-role-template.active { border-color: var(--fx-brand); background: var(--fx-brand); color: #fff; }

.fx-app .fx-permission-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.fx-app .fx-permission-group {
  margin: 0;
  padding: 12px 14px 6px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
}

.fx-app .fx-permission-group legend {
  float: none;
  width: auto;
  margin: 0 0 6px;
  padding: 0;
  font-family: var(--fx-font-heading);
  font-size: 14px;
  font-weight: 700;
}

.fx-app .fx-permission {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--fx-line);
  cursor: pointer;
}

.fx-app .fx-permission:first-of-type { border-top: 0; }
.fx-app .fx-permission .form-check-input { flex-shrink: 0; margin-top: 2px; }
.fx-app .fx-permission .form-check-input:checked { background-color: var(--fx-brand); border-color: var(--fx-brand); }
.fx-app .fx-permission > span { display: flex; flex-direction: column; }
.fx-app .fx-permission strong { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; }
.fx-app .fx-permission small { color: var(--fx-muted); font-size: 12px; }
.fx-app .fx-permission.is-locked { cursor: not-allowed; }
.fx-app .fx-permission.is-locked strong { color: var(--fx-muted); }

.fx-app .fx-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--fx-amber-soft);
  color: var(--fx-amber);
  font-size: 11px;
  font-weight: 600;
}

.fx-app .fx-role-options { display: flex; flex-direction: column; gap: 8px; }

.fx-app .fx-role-option {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
  cursor: pointer;
}

.fx-app .fx-role-option:has(input:checked) { border-color: var(--fx-brand); background: var(--fx-brand-soft); }
.fx-app .fx-role-option .form-check-input:checked { background-color: var(--fx-brand); border-color: var(--fx-brand); }
.fx-app .fx-role-option > span { display: flex; flex-direction: column; }
.fx-app .fx-role-option small { color: var(--fx-muted); font-size: 12px; }

.fx-app .fx-member-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
  padding: 14px;
  border-radius: var(--fx-radius-sm);
  background: var(--fx-canvas);
}

.fx-app .fx-member-facts dt { color: var(--fx-subtle); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.fx-app .fx-member-facts dd { margin: 2px 0 0; font-size: 13px; font-weight: 600; }

@media (max-width: 575.98px) {
  .fx-app .fx-member-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fx-app .fx-member-welcome { padding: 20px; }
  .fx-app .fx-member-welcome-head { align-items: flex-start; }
  .fx-app .fx-invite-actions { width: 100%; justify-content: flex-end; }
}

/* Invitation link page */
.fx-invite-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px 16px;
  background: var(--fx-canvas) !important;
  font-family: var(--fx-font-body);
}

.fx-invite-card {
  width: 100%;
  max-width: 440px;
  padding: 32px 28px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius);
  background: var(--fx-surface);
  box-shadow: var(--fx-shadow);
  text-align: center;
}

.fx-invite-logo { display: block; margin-bottom: 28px; }
.fx-invite-logo img { height: 32px; }

.fx-invite-card h1 {
  margin: 6px 0 8px;
  font-family: var(--fx-font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--fx-ink);
}

.fx-invite-icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: #fdecec;
  font-size: 26px;
}

.fx-invite-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0 24px;
  padding: 14px;
  border-radius: var(--fx-radius-sm);
  background: var(--fx-canvas);
  text-align: left;
}

.fx-invite-facts dt { color: var(--fx-subtle); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.fx-invite-facts dd { margin: 2px 0 0; font-weight: 600; }
.fx-invite-note { margin: 12px 0 4px; }
.fx-invite-card .fx-inline-notice { text-align: left; }
.fx-app .fx-btn-quiet { color: var(--fx-muted) !important; font-weight: 500; }
.fx-app .fx-btn-quiet:hover { color: var(--fx-brand) !important; }

/* Inactivity sign-out warning (public/assets/js/app/session-timeout.js) */
.fx-idle-modal { z-index: 1095; }
.modal-backdrop.fx-idle-backdrop { z-index: 1090; }
.fx-idle-modal .modal-dialog { max-width: 400px; }
.fx-idle-modal .modal-body { padding: 32px 28px 28px !important; text-align: center; }
.fx-idle-ring { position: relative; width: 84px; height: 84px; margin: 0 auto 18px; }
.fx-idle-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.fx-idle-ring circle { fill: none; stroke-width: 6; }
.fx-idle-ring__track { stroke: var(--fx-line, #ebeaf2); }
.fx-idle-ring__bar {
  stroke: var(--fx-brand, var(--color-1));
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}
.fx-idle-ring__value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--fx-font-heading, inherit);
  font-size: 26px;
  font-weight: 600;
  color: var(--fx-ink, #120d23);
  font-variant-numeric: tabular-nums;
}
.fx-idle-title {
  margin: 0 0 8px;
  font-family: var(--fx-font-heading, inherit);
  font-size: 20px;
  font-weight: 600;
  color: var(--fx-ink, #120d23);
}
.fx-idle-text { margin: 0 0 24px; color: var(--fx-muted, #6b6785); }
.fx-idle-text strong { color: var(--fx-ink, #120d23); font-variant-numeric: tabular-nums; }
.fx-idle-actions { display: flex; gap: 10px; }
.fx-idle-actions .btn { flex: 1 1 0; }
@media (max-width: 400px) {
  .fx-idle-actions { flex-direction: column-reverse; }
}

/* ---------------------------------------------------------
   Brand refresh: the public site's look, calmer for money screens
   Shares the landing page's cream #F7F4EF canvas, warm lines, flat
   pastel icon blocks, lime marker and glossy pill navbar. Leaves out
   its stickers, hard shadows and ink outlines so balances, transfers
   and tables stay quick to scan. Buttons, tabs and active states keep
   the --color-1 brand purple; destructive actions stay red.
--------------------------------------------------------- */

/* Tailwind-style tokens used by the module views (dashboard.css) */
body.fx-app {
  --background: var(--fx-canvas);
  --border: var(--fx-line);
  --input: var(--fx-line);
  --muted: var(--fx-canvas);
  --secondary: var(--fx-canvas);
}

.fx-app ::selection {
  background: var(--fx-lime);
  color: var(--fx-ink);
}

/* Sidebar sits on the same cream as the page */
.fx-app .aside {
  background: var(--fx-canvas) !important;
}

.fx-app .aside-menu .menu-link.active {
  position: relative;
}

/* Lime marker on the current page, like the .hl highlight on the site */
.fx-app .aside-menu .menu-link.active::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--fx-lime);
}

.fx-app .aside-menu .menu-link:hover:not(.active) {
  background: rgba(255, 255, 255, .8) !important;
}

.fx-app .fx-aside-logout:hover,
.fx-app .fx-aside-logout:focus-visible {
  background: #fff;
}

.fx-app .aside-footer > div,
.fx-app .fx-business-switch {
  background: var(--fx-surface) !important;
  border-color: var(--fx-line) !important;
}

.fx-app .fx-business-avatar {
  background: var(--fx-lime);
  color: var(--fx-ink);
}

.fx-app .aside-footer .bg-purple {
  background: var(--fx-lilac) !important;
  color: var(--fx-brand);
}

/* Glossy pill navbar. The bar itself stays a plain cream strip with no
   backdrop-filter or transform (either one traps the fixed user dropdown);
   the gloss is on the inner container, which needs no blur because the
   cream strip behind it is opaque. */
.fx-app .header {
  background: var(--fx-canvas) !important;
  border-bottom: 0 !important;
}

.fx-app[data-kt-sticky-header=on] .header {
  box-shadow: none;
}

.fx-app .header > .container-fluid {
  flex: 1 1 auto;
  min-width: 0;
  margin: 10px 12px 0;
  width: auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(21, 17, 31, .04),
    0 10px 30px -14px rgba(21, 17, 31, .22);
}

@media (min-width: 992px) {
  .fx-app .header {
    height: 84px;
  }

  .fx-app .header > .container-fluid {
    margin: 14px 30px 0;
    height: 60px;
    padding-right: 10px;
  }
}

.fx-app #kt_activities_toggle {
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  border-color: var(--fx-line);
}

.fx-app #kt_activities_toggle:hover {
  background: var(--fx-lime) !important;
}

/* Surfaces: white cards on cream, warm hairlines, soft shadow */
.fx-app .form-control.form-control-solid,
.fx-app .form-select.form-select-solid {
  background-color: #fbfaf7;
  border-color: var(--fx-line) !important;
}

.fx-app .table > thead > tr,
.fx-app .table > :not(caption) > * > * {
  border-color: var(--fx-line);
}

/* Date line above the greeting: a small pill with a lime dot */
.fx-dashboard .fx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--fx-line);
  border-radius: 999px;
  background: var(--fx-surface);
  color: var(--fx-muted);
  letter-spacing: .06em;
}

.fx-dashboard .fx-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fx-lime);
  box-shadow: 0 0 0 1px rgba(21, 17, 31, .12);
}

/* Pastel icon blocks: flat colour, darker glyph, no gradients */
.fx-tile-icon.mint,
.fx-app .metric-success {
  background: var(--fx-mint-pastel);
  color: #0f6b47;
}

.fx-tile-icon.amber,
.fx-app .metric-warning {
  background: var(--fx-butter);
  color: #8a5a00;
}

.fx-app .card-metric-icon:not(.metric-success):not(.metric-warning) {
  background: var(--fx-lilac);
}

.fx-app .metric-success i,
.fx-app .metric-warning i {
  color: inherit !important;
}

.fx-app .fx-tile {
  background: var(--fx-canvas);
}

/* Accounts transfer shortcuts: lilac / sky / peach blocks, brand fill on hover */
.fx-app .bg-brand-soft.text-primary {
  background: var(--fx-lilac);
  border-color: transparent !important;
}

.fx-app a:nth-child(2) > .bg-brand-soft.text-primary,
.fx-app button:nth-child(2) > .bg-brand-soft.text-primary {
  background: var(--fx-sky);
}

.fx-app a:nth-child(3) > .bg-brand-soft.text-primary,
.fx-app button:nth-child(3) > .bg-brand-soft.text-primary {
  background: var(--fx-peach);
}

.fx-app .group:hover > .bg-brand-soft.text-primary {
  background: var(--fx-brand);
  color: #fff !important;
}

/* The icon carries .text-purple (!important), which would sit purple on the purple fill */
.fx-app .group:hover > .bg-brand-soft.text-primary i {
  color: #fff !important;
}

/* ---------------------------------------------------------
   Account plans (individual vs business, Plan & billing)
   Pastel blocks for icons and badges; money figures stay ink.
--------------------------------------------------------- */

.fx-app .fx-plan-choice {
  margin: 0;
  padding: 0;
  border: 0;
}

.fx-app .fx-plan-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 575.98px) {
  .fx-app .fx-plan-choice-grid {
    grid-template-columns: 1fr;
  }
}

.fx-app .fx-plan-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  height: 100%;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fx-app .fx-plan-option:hover {
  border-color: color-mix(in srgb, var(--fx-brand) 40%, var(--fx-line));
}

.fx-app .btn-check:checked + .fx-plan-option {
  border-color: var(--fx-brand);
  box-shadow: 0 0 0 3px var(--fx-brand-soft);
}

.fx-app .btn-check:focus-visible + .fx-plan-option {
  outline: 2px solid var(--fx-brand);
  outline-offset: 2px;
}

.fx-app .fx-plan-option-icon {
  display: inline-flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--fx-ink);
  font-size: 18px;
}

.fx-app .fx-plan-option-icon i {
  color: inherit;
}

.fx-app .fx-plan-option-icon--sky { background: var(--fx-sky); }
.fx-app .fx-plan-option-icon--lilac { background: var(--fx-lilac); }

.fx-app .fx-plan-option-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.fx-app .fx-plan-option-text strong {
  color: var(--fx-ink);
  font-size: 15px;
}

.fx-app .fx-plan-option-text small {
  color: var(--fx-muted);
  font-size: 13px;
  line-height: 1.45;
}

.fx-app .fx-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--fx-ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.fx-app .fx-plan-badge i {
  color: inherit;
}

.fx-app .fx-plan-badge--individual { background: var(--fx-sky); }
.fx-app .fx-plan-badge--business { background: var(--fx-lilac); }

.fx-app .fx-plan-perks {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fx-app .fx-plan-perks li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--fx-text);
  font-size: 14px;
}

.fx-app .fx-plan-perks i {
  color: var(--fx-mint);
  font-size: 16px;
  line-height: 1.2;
}

.fx-app .fx-plan-price {
  padding: 16px;
  border-radius: var(--fx-radius-sm);
  background: var(--fx-canvas);
}

.fx-app .fx-plan-price strong {
  margin-right: 6px;
  color: var(--fx-ink);
  font-family: var(--fx-font-heading);
  font-size: 26px;
}

.fx-app .fx-plan-price span {
  color: var(--fx-muted);
}

.fx-app .fx-plan-current {
  padding: 20px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface);
}

.fx-app .fx-plan-current-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.fx-app .fx-plan-current-price {
  display: block;
  color: var(--fx-ink);
  font-family: var(--fx-font-heading);
  font-size: 24px;
  letter-spacing: -0.02em;
}

.fx-app .fx-plan-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--fx-line);
}

.fx-app .fx-usage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

@media (max-width: 991.98px) {
  .fx-app .fx-usage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
  .fx-app .fx-usage-grid,
  .fx-app .fx-plan-figures { grid-template-columns: 1fr; }
}

.fx-app .fx-usage {
  padding: 16px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface);
}

.fx-app .fx-usage-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.fx-app .fx-usage-count {
  color: var(--fx-muted);
  font-size: 13px;
}

.fx-app .fx-usage-count strong {
  color: var(--fx-ink);
  font-size: 16px;
}

.fx-app .fx-usage-bar {
  height: 8px;
  margin-bottom: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--fx-canvas-2);
}

.fx-app .fx-usage-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--fx-brand);
}

.fx-app .fx-usage.is-near .fx-usage-bar span { background: var(--fx-amber); }
.fx-app .fx-usage.is-full .fx-usage-bar span { background: var(--fx-danger); }
.fx-app .fx-usage.is-full .fx-subtext { color: var(--fx-danger); }

.fx-app .fx-plan-upsell {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-end;
  padding: 24px;
  border-radius: var(--fx-radius);
  background: color-mix(in srgb, var(--fx-lilac) 45%, #fff);
}

.fx-app .fx-plan-upsell-price {
  display: flex;
  flex-direction: column;
  min-width: 220px;
}

.fx-app .fx-plan-upsell-price strong {
  color: var(--fx-ink);
  font-family: var(--fx-font-heading);
  font-size: 30px;
  letter-spacing: -0.02em;
}

.fx-app .fx-plan-notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--fx-radius-sm);
  background: var(--fx-amber-soft);
  color: var(--fx-text);
  font-size: 14px;
}

.fx-app .fx-plan-notice i {
  color: var(--fx-amber);
  font-size: 18px;
}

.fx-app .fx-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.fx-app .fx-pill--success { background: var(--fx-mint-soft); color: #0b7a55; }
.fx-app .fx-pill--warning { background: var(--fx-amber-soft); color: #92400e; }
.fx-app .fx-pill--danger { background: #fdecec; color: var(--fx-danger); }
.fx-app .fx-pill--info { background: var(--fx-sky); color: var(--fx-ink); }
.fx-app .fx-pill--muted { background: var(--fx-canvas-2); color: var(--fx-muted); }

.fx-app .fx-plan-table th {
  color: var(--fx-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fx-app .fx-plan-table td {
  border-color: var(--fx-line);
  font-size: 14px;
}

.fx-app .fx-plan-seat-note {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--fx-radius-sm);
  background: var(--fx-canvas);
  color: var(--fx-text);
  font-size: 13px;
}

.fx-app .fx-plan-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--fx-line);
  background: var(--fx-surface);
}

.fx-app .fx-plan-strip-items {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--fx-muted);
  font-size: 13px;
}

.fx-app .fx-plan-strip-item strong {
  color: var(--fx-ink);
}

.fx-app .fx-plan-strip-item.is-full,
.fx-app .fx-plan-strip-item.is-full strong {
  color: var(--fx-danger);
}

/* Account status strip: KYC/KYB, active and approval (partials/account_status.php) */
.fx-app .fx-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--fx-line);
  background: var(--fx-surface);
}

.fx-app .fx-status-strip.is-compact {
  background: var(--fx-canvas);
}

.fx-app .fx-status-strip-head {
  display: flex;
  flex: 1 1 260px;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.fx-app .fx-status-strip-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--fx-butter);
  color: var(--fx-ink);
  font-size: 18px;
}

.fx-app .fx-status-strip-icon.is-ok {
  background: var(--fx-mint-pastel);
}

.fx-app .fx-status-strip-icon i {
  color: inherit;
}

.fx-app .fx-status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fx-app .fx-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--fx-line);
  border-radius: 999px;
  background: var(--fx-surface);
  color: var(--fx-muted);
  font-size: 13px;
  white-space: nowrap;
}

.fx-app .fx-status-pill strong {
  color: var(--fx-ink);
  font-weight: 600;
}

.fx-app .fx-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fx-subtle);
}

.fx-app .fx-status-pill.is-success .fx-status-dot { background: var(--fx-mint); }
.fx-app .fx-status-pill.is-warning .fx-status-dot { background: var(--fx-amber); }
.fx-app .fx-status-pill.is-danger .fx-status-dot { background: var(--fx-danger); }
.fx-app .fx-status-pill.is-danger strong { color: var(--fx-danger); }

.fx-app .fx-status-strip-action {
  flex: none;
}

@media (max-width: 575.98px) {
  .fx-app .fx-status-strip-action {
    width: 100%;
  }
}

/* ---------------------------------------------------------
   Reports (app/Modules/Reports, reports.js). Money screen:
   brand palette, no stickers or hard shadows.
--------------------------------------------------------- */

.fx-reports .fx-report-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: opacity 0.15s ease;
}

.fx-reports .fx-report-grid.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.fx-reports .fx-report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.fx-reports .fx-report-export {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.fx-reports .fx-report-change {
  font-weight: 600;
}

.fx-reports .fx-report-change.is-up { color: var(--fx-mint); }
.fx-reports .fx-report-change.is-down { color: var(--fx-amber); }
.fx-reports .fx-report-change.is-flat { color: var(--fx-muted); }

.fx-reports .card-metric-bottom {
  flex-wrap: wrap;
  row-gap: 4px;
}

.fx-reports .fx-report-chart {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--fx-line);
}

.fx-reports .fx-report-chart .chart-summary {
  margin-bottom: 12px;
  gap: 20px;
  flex-wrap: wrap;
}

.fx-reports .fx-report-chart .chart-container {
  height: 280px;
}

.fx-reports .fx-report-subhead {
  margin: 24px 0 8px;
  color: var(--fx-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fx-reports .fx-report-list {
  display: flex;
  flex-direction: column;
}

.fx-reports .fx-report-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid var(--fx-line);
}

.fx-reports .fx-report-row:first-child {
  border-top: 0;
}

.fx-reports .fx-report-row-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fx-reports .fx-report-row-main strong {
  overflow: hidden;
  color: var(--fx-ink);
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-reports .fx-report-row-main small {
  color: var(--fx-muted);
  font-size: 12px;
}

.fx-reports .fx-report-row-amount {
  flex: none;
  color: var(--fx-ink);
  font-size: 14px;
  font-weight: 600;
}

.fx-reports .fx-report-row.is-in .fx-report-row-amount { color: var(--fx-mint); }

.fx-reports .fx-report-empty {
  margin: 0;
  padding: 10px 0;
  color: var(--fx-muted);
  font-size: 13px;
}

.fx-reports .fx-report-footnote {
  margin: 20px 0 0;
  font-size: 12px;
}

.fx-reports .fx-report-alert {
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid color-mix(in srgb, var(--fx-danger) 30%, transparent);
  border-radius: var(--fx-radius-sm);
  background: color-mix(in srgb, var(--fx-danger) 6%, #fff);
  color: var(--fx-danger);
  font-size: 14px;
}

.fx-reports .fx-report-locked {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  max-width: 640px;
  padding: 28px;
  border: 1px solid var(--fx-line);
  background: var(--fx-surface);
}

.fx-reports .fx-report-locked h2 {
  margin: 6px 0 0;
  color: var(--fx-ink);
  font-size: 20px;
  font-weight: 650;
}

.fx-reports .fx-report-locked p {
  margin: 0 0 6px;
}

@media (max-width: 575.98px) {
  .fx-reports .fx-report-head {
    flex-direction: column;
  }

  .fx-reports .fx-report-chart .chart-container {
    height: 220px;
  }
}

/* =========================================================
   Table row action menus (the "..." button on every table)
   One look for transactions, schedules, invoices, debts,
   customers, team and the backoffice lists.
========================================================= */

.fx-app .table-action {
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.fx-app .table-action:hover,
.fx-app .table-action:focus-visible,
.fx-app .table-action[aria-expanded="true"] {
  background: var(--fx-brand-soft) !important;
  border-color: color-mix(in srgb, var(--color-3) 45%, #fff);
  color: var(--fx-brand);
}

.fx-app .table-action ~ .dropdown-menu {
  min-width: 200px;
  padding: 6px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface);
  box-shadow: 0 12px 32px -12px rgba(21, 17, 31, 0.22), 0 2px 6px rgba(21, 17, 31, 0.06);
  font-family: var(--fx-font-body);
  z-index: 1060;
}

.fx-app .table-action ~ .dropdown-menu > li {
  padding: 0 !important;
}

.fx-app .table-action ~ .dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--fx-text);
  font-size: 14px !important;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
}

.fx-app .table-action ~ .dropdown-menu .dropdown-item > i {
  width: 16px;
  margin: 0 !important;
  color: var(--fx-muted);
  font-size: 15px;
  text-align: center;
}

.fx-app .table-action ~ .dropdown-menu .dropdown-item:hover,
.fx-app .table-action ~ .dropdown-menu .dropdown-item:focus-visible {
  background: var(--fx-brand-soft);
  color: var(--fx-brand);
}

.fx-app .table-action ~ .dropdown-menu .dropdown-item:hover > i,
.fx-app .table-action ~ .dropdown-menu .dropdown-item:focus-visible > i {
  color: var(--fx-brand);
}

/* Destructive actions stay red, with a red tint on hover */
.fx-app .table-action ~ .dropdown-menu .dropdown-item.text-danger,
.fx-app .table-action ~ .dropdown-menu .dropdown-item.text-danger > i {
  color: var(--fx-danger) !important;
}

.fx-app .table-action ~ .dropdown-menu .dropdown-item.text-danger:hover,
.fx-app .table-action ~ .dropdown-menu .dropdown-item.text-danger:focus-visible {
  background: color-mix(in srgb, var(--fx-danger) 9%, #fff);
}

.fx-app .table-action ~ .dropdown-menu .dropdown-divider {
  margin: 5px 6px;
  border-color: var(--fx-line);
  opacity: 1;
}

/* ---------------------------------------------------------
   Expense management: business accounts on the Accounts page
   (partials/business-accounts.php, business-accounts.js) and
   the Expenses page. Money screens: no stickers or hard shadows.
--------------------------------------------------------- */

.fx-accounts-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.fx-acct-table td {
  vertical-align: middle;
}

.fx-acct-row {
  cursor: pointer;
}

.fx-acct-row:hover > td,
.fx-acct-row:focus-visible > td {
  background: var(--fx-brand-soft);
}

.fx-acct-row:focus-visible {
  outline: 2px solid var(--fx-brand);
  outline-offset: -2px;
}

.fx-acct-row .fx-acct-name,
.fx-acct-row .fx-acct-purpose {
  max-width: 260px;
}

.fx-acct-icon {
  display: grid;
  flex: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: var(--fx-canvas-2);
  color: var(--fx-ink);
  font-size: 18px;
}

.fx-acct-icon.is-primary {
  background: var(--fx-lilac);
  color: var(--fx-brand);
}

.fx-acct-name {
  overflow: hidden;
  color: var(--fx-ink);
  font-family: var(--fx-font-heading);
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-acct-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--fx-brand);
  color: #fff;
  font-family: var(--fx-font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  vertical-align: 2px;
}

.fx-acct-purpose {
  overflow: hidden;
  color: var(--fx-muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-acct-number {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fx-ink);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.fx-acct-number.is-empty {
  color: var(--fx-subtle);
  font-weight: 500;
  letter-spacing: 0;
}

.fx-acct-number .copy-account-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--fx-brand);
}

.fx-acct-access {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fx-muted);
  font-size: 13px;
}

/* One account's view (?account=) */
.fx-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fx-brand);
  font-weight: 600;
}

.fx-back-link:hover {
  text-decoration: underline;
}

.fx-acct-view .business-balance-header {
  gap: 12px;
  flex-wrap: wrap;
}

.fx-acct-view-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fx-acct-locked {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px dashed var(--fx-line);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface);
}

.fx-acct-locked-icon {
  display: grid;
  flex: none;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--fx-canvas-2);
  color: var(--fx-muted);
}

.fx-flow-dialog-sm {
  max-width: 480px;
}

.fx-check-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface);
  cursor: pointer;
}

.fx-check-card .form-check-input {
  flex: none;
  margin-top: 3px;
}

.fx-check-card:has(.form-check-input:checked) {
  border-color: var(--fx-brand);
  background: var(--fx-brand-soft);
}

.fx-choice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fx-member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 2px;
  border-top: 1px solid var(--fx-line);
  cursor: pointer;
}

.fx-member-row:first-of-type {
  border-top: 0;
}

/* Pay from picker inside the transfer flows */
.fx-source-select {
  max-width: 260px;
  margin-top: 2px;
  padding-top: 4px;
  padding-bottom: 4px;
  border-color: var(--fx-line);
  background-color: var(--fx-surface);
  color: var(--fx-ink);
  font-weight: 600;
}

.fx-approval-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--fx-radius-sm);
  background: var(--fx-amber-soft);
  color: var(--fx-ink);
  font-size: 13px;
}

.fx-approval-note i {
  color: var(--fx-amber);
  font-size: 16px;
}

/* Category colour dot (Expenses page and the Reports expenses card) */
.fx-category-dot {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--fx-subtle);
}

.fx-report-row-main strong .fx-category-dot {
  margin-right: 8px;
  vertical-align: 1px;
}

/* Expenses page: header tools, tabs, pager and the Waiting / All switch on small screens */
.fx-expenses .fx-expense-tools {
  min-width: 0;
  max-width: 100%;
}

.fx-expenses .dashboard-date-range,
.fx-expenses .fx-expense-tabs {
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.fx-expenses .dashboard-date-range::-webkit-scrollbar,
.fx-expenses .fx-expense-tabs::-webkit-scrollbar {
  display: none;
}

.fx-expenses .range-btn,
.fx-expenses .fx-expense-tabs .nav-item {
  flex: 0 0 auto;
}

.fx-expenses .range-btn,
.fx-expenses .fx-expense-tabs .nav-link {
  white-space: nowrap;
}

.fx-expenses .fx-pager {
  display: inline-flex;
  gap: 8px;
}

.fx-expenses .fx-pager-btn {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--fx-line);
  border-radius: 999px;
  background: var(--fx-surface);
  color: var(--fx-brand);
  font-size: 14px;
  transition: background-color .15s ease, border-color .15s ease;
}

.fx-expenses .fx-pager-btn:hover:not(:disabled) {
  border-color: var(--fx-brand);
  background: var(--fx-brand-soft);
}

.fx-expenses .fx-pager-btn:disabled {
  color: var(--fx-subtle);
  cursor: default;
  opacity: .55;
}

.fx-expenses .fx-segment {
  display: inline-flex;
  flex: none;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--fx-line);
  border-radius: 999px;
  background: var(--fx-surface);
}

.fx-expenses .fx-segment-btn {
  padding: 6px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--fx-muted);
  font-size: 13px;
  font-weight: 500;
  transition: background-color .15s ease, color .15s ease;
}

.fx-expenses .fx-segment-btn:hover:not(.active) {
  background: var(--fx-brand-soft);
  color: var(--fx-brand);
}

.fx-expenses .fx-segment-btn.active {
  background: var(--fx-brand);
  color: #fff;
  font-weight: 600;
}

@media (max-width: 1000px) {
  .fx-expenses .fx-expense-tools {
    width: 100%;
    align-items: flex-start !important;
  }
}

@media (max-width: 640px) {
  .fx-expenses .fx-expense-actions {
    width: 100%;
  }

  .fx-expenses .fx-expense-actions .btn {
    flex: 1 1 0;
    justify-content: center;
  }

  .fx-expenses .range-btn,
  .fx-expenses .fx-expense-tabs .nav-link {
    padding: 8px 12px;
  }
}

.fx-expenses .card-summary.is-loading {
  opacity: 0.55;
}

.fx-expense-filters {
  display: grid;
  grid-template-columns: minmax(200px, 2fr) repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.fx-expenses .fx-clickable-row {
  cursor: pointer;
}

.fx-expenses .fx-clickable-row:hover td {
  background: var(--fx-brand-soft);
}

.fx-expenses .fx-clickable-row.is-reversed td {
  color: var(--fx-subtle) !important;
  text-decoration: line-through;
}

.fx-tab-count {
  margin-left: 4px;
  background: var(--fx-amber);
  color: #fff;
  font-size: 11px;
}

.fx-request-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fx-request {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface);
}

.fx-request-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fx-request-amount {
  color: var(--fx-ink);
  font-family: var(--fx-font-heading);
  font-size: 17px;
}

.fx-request-note {
  margin-top: 6px;
  padding: 6px 10px;
  border-left: 3px solid var(--fx-line);
  color: var(--fx-text);
  font-size: 13px;
}

.fx-request-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fx-empty-card {
  padding: 28px 16px;
  border: 1px dashed var(--fx-line);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface);
  color: var(--fx-muted);
  text-align: center;
}

.fx-budget-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fx-budget-form .form-select {
  width: auto;
  min-width: 170px;
}

.fx-budget-form .input-group {
  width: 190px;
}

.fx-budget-month {
  min-width: 130px;
  text-align: center;
}

.fx-budget {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 0;
  border-top: 1px solid var(--fx-line);
}

.fx-budget:first-child {
  border-top: 0;
}

.fx-budget-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--fx-canvas-2);
}

.fx-budget-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--fx-mint);
}

.fx-budget-bar.is-near span { background: var(--fx-amber); }
.fx-budget-bar.is-over span { background: var(--fx-danger); }

.fx-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid var(--fx-line);
}

.fx-category-row:first-child {
  border-top: 0;
}

.fx-receipt-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fx-receipt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
}

.fx-receipt > i {
  color: var(--fx-brand);
  font-size: 20px;
}

.fx-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fx-swatch input {
  position: absolute;
  opacity: 0;
}

.fx-swatch span {
  display: block;
  width: 28px;
  height: 28px;
  border: 3px solid var(--fx-surface);
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px var(--fx-line);
  cursor: pointer;
}

.fx-swatch input:checked + span {
  box-shadow: 0 0 0 2px var(--fx-ink);
}

.fx-swatch input:focus-visible + span {
  outline: 2px solid var(--fx-brand);
  outline-offset: 2px;
}

.fx-rules {
  max-width: 640px;
}

@media (max-width: 575.98px) {
  .fx-expense-filters {
    grid-template-columns: 1fr;
  }

  .fx-budget-form .form-select,
  .fx-budget-form .input-group {
    width: 100%;
  }
}

/* ---------------------------------------------------------
   Select2: every dropdown in the dashboard and backoffice
   (public/assets/js/app/select2-setup.js). The field keeps the
   select's own classes; this styles text, focus and the list.
--------------------------------------------------------- */
.fx-app .select2-container--bootstrap5 .select2-selection--single .select2-selection__rendered,
.fx-app .select2-container--bootstrap5 .select2-selection--single.form-select-solid .select2-selection__rendered {
  color: var(--fx-text);
}

.fx-app .select2-container--bootstrap5 .select2-selection--single .select2-selection__placeholder,
.fx-app .select2-container--bootstrap5 .select2-selection--single.form-select-solid .select2-selection__placeholder {
  color: var(--fx-subtle);
}

.fx-app .select2-container--bootstrap5.select2-container--focus .form-select,
.fx-app .select2-container--bootstrap5.select2-container--open .form-select {
  background-color: var(--fx-surface);
  border-color: var(--fx-brand) !important;
  box-shadow: 0 0 0 3px var(--fx-brand-soft) !important;
}

.fx-app .select2-container--bootstrap5.select2-container--disabled .form-select {
  background-color: var(--fx-canvas);
  color: var(--fx-muted);
  cursor: not-allowed;
  opacity: 1;
}

.fx-app .select2-container--bootstrap5.select2-container--disabled .select2-selection__rendered {
  color: var(--fx-muted) !important;
}

.fx-app .select2-container--bootstrap5 .select2-selection__clear {
  opacity: .5;
}

.fx-app .select2-container--bootstrap5 .select2-dropdown {
  margin-top: 4px;
  padding: 6px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface);
  box-shadow: var(--fx-shadow);
  font-family: var(--fx-font-body);
}

.fx-app .select2-container--bootstrap5 .select2-dropdown--above {
  margin-top: -4px;
}

.fx-app .select2-container--bootstrap5 .select2-dropdown .select2-search {
  padding: 2px 2px 6px;
  margin: 0;
}

.fx-app .select2-container--bootstrap5 .select2-dropdown .select2-search .select2-search__field {
  padding: 8px 12px;
  border: 1px solid var(--fx-line);
  border-radius: 10px;
  background: #fbfaf7;
  color: var(--fx-text);
  font-size: 14px;
}

.fx-app .select2-container--bootstrap5 .select2-dropdown .select2-search .select2-search__field:focus {
  border-color: var(--fx-brand);
  box-shadow: 0 0 0 3px var(--fx-brand-soft);
}

.fx-app .select2-container--bootstrap5 .select2-dropdown .select2-results__options {
  max-height: 260px;
}

.fx-app .select2-container--bootstrap5 .select2-dropdown .select2-results__option {
  margin: 1px 0;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--fx-text);
  font-size: 14px;
}

.fx-app .select2-container--bootstrap5 .select2-dropdown .select2-results__option.select2-results__option--highlighted {
  background-color: var(--fx-brand-soft);
  color: var(--fx-ink);
  font-weight: 500;
}

.fx-app .select2-container--bootstrap5 .select2-dropdown .select2-results__option.select2-results__option--selected {
  padding-right: 34px;
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23593B98'%3e%3cpath d='M13.485 3.929a1 1 0 0 1 .086 1.411l-6 6.75a1 1 0 0 1-1.48.04l-3.25-3.25a1 1 0 1 1 1.414-1.414l2.5 2.5 5.32-5.951a1 1 0 0 1 1.41-.086z'/%3e%3c/svg%3e") no-repeat right 12px center / 14px;
  color: var(--fx-brand);
  font-weight: 600;
}

.fx-app .select2-container--bootstrap5 .select2-dropdown .select2-results__option.select2-results__option--selected.select2-results__option--highlighted {
  background-color: var(--fx-brand-soft);
}

.fx-app .select2-container--bootstrap5 .select2-dropdown .select2-results__option.select2-results__option--disabled {
  color: var(--fx-subtle);
}

.fx-app .select2-container--bootstrap5 .select2-dropdown .select2-results__option.select2-results__message {
  color: var(--fx-muted);
  font-weight: 400;
}

/* A required select2 the browser rejected on submit (select2-setup.js) */
.fx-app .select2-container--bootstrap5 .select2-selection.is-invalid {
  border-color: var(--fx-danger) !important;
}

/* Fields that sit in a row instead of filling it */
.fx-source .select2-container {
  max-width: 260px;
}

.fx-budget-form > .select2-container {
  width: auto !important;
  min-width: 170px;
}

@media (max-width: 575.98px) {
  .fx-budget-form > .select2-container {
    width: 100% !important;
  }
}

/* ---------------------------------------------------------
   Flatpickr: every date field (public/assets/js/app/flatpickr-setup.js)
--------------------------------------------------------- */
.fx-app .flatpickr-calendar {
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface);
  box-shadow: var(--fx-shadow);
  font-family: var(--fx-font-body);
}

.fx-app .flatpickr-calendar.arrowTop::before,
.fx-app .flatpickr-calendar.arrowTop::after,
.fx-app .flatpickr-calendar.arrowBottom::before,
.fx-app .flatpickr-calendar.arrowBottom::after {
  display: none;
}

.fx-app .flatpickr-months .flatpickr-month,
.fx-app .flatpickr-current-month .flatpickr-monthDropdown-months,
.fx-app .flatpickr-current-month input.cur-year {
  color: var(--fx-ink);
  font-weight: 600;
}

.fx-app .flatpickr-months .flatpickr-prev-month:hover svg,
.fx-app .flatpickr-months .flatpickr-next-month:hover svg {
  fill: var(--fx-brand);
}

.fx-app span.flatpickr-weekday {
  color: var(--fx-muted);
  font-weight: 500;
}

.fx-app .flatpickr-day {
  color: var(--fx-text);
}

.fx-app .flatpickr-day:hover,
.fx-app .flatpickr-day:focus,
.fx-app .flatpickr-day.inRange {
  border-color: transparent;
  background: var(--fx-brand-soft);
  color: var(--fx-ink);
}

.fx-app .flatpickr-day.today {
  border-color: var(--fx-brand);
  background: transparent;
  color: var(--fx-brand);
  font-weight: 600;
}

.fx-app .flatpickr-day.today:hover,
.fx-app .flatpickr-day.today:focus {
  border-color: var(--fx-brand);
  background: var(--fx-brand-soft);
  color: var(--fx-brand);
}

.fx-app .flatpickr-day.selected,
.fx-app .flatpickr-day.selected:hover,
.fx-app .flatpickr-day.selected:focus,
.fx-app .flatpickr-day.startRange,
.fx-app .flatpickr-day.endRange {
  border-color: var(--fx-brand);
  background: var(--fx-brand);
  color: #fff;
}

.fx-app .flatpickr-day.flatpickr-disabled,
.fx-app .flatpickr-day.flatpickr-disabled:hover,
.fx-app .flatpickr-day.prevMonthDay,
.fx-app .flatpickr-day.nextMonthDay {
  background: transparent;
  color: var(--fx-subtle);
}

/* A picker in a modal sits in a wrapper (static: true); keep the field full width */
.fx-app .modal .flatpickr-wrapper {
  display: block;
  width: 100%;
}

/* ---------------------------------------------------------
   Account settings: section sidebar + cards made of
   "title on the left, fields on the right" sections.
   Small screens: the sidebar turns into a scrolling row.
--------------------------------------------------------- */
.fx-app .fx-settings-head {
  margin-bottom: 24px;
}

.fx-app .fx-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

@media (min-width: 992px) {
  .fx-app .fx-settings-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 32px;
  }

  .fx-app .fx-settings-aside {
    position: sticky;
    top: 110px;
  }
}

.fx-app .fx-settings-me {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px 16px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--fx-line);
}

.fx-app .fx-settings-avatar {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--fx-lilac);
  color: var(--fx-brand);
  font-family: var(--fx-font-heading);
  font-size: 14px;
  font-weight: 700;
}

.fx-app .fx-settings-me-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--fx-ink);
}

.fx-app .fx-settings-nav {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 2px;
}

.fx-app .fx-settings-nav-group {
  padding: 16px 12px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fx-subtle);
}

.fx-app .fx-settings-nav-group:first-child {
  padding-top: 4px;
}

.fx-app .fx-settings-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--fx-radius-sm);
  background: transparent;
  color: var(--fx-muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}

.fx-app .fx-settings-nav .nav-link i {
  font-size: 16px;
  line-height: 1;
  color: var(--fx-subtle);
}

.fx-app .fx-settings-nav .nav-link:hover {
  background: var(--fx-canvas-2);
  color: var(--fx-ink);
}

.fx-app .fx-settings-nav .nav-link.active {
  background: var(--fx-brand-soft);
  color: var(--fx-brand);
  font-weight: 600;
}

.fx-app .fx-settings-nav .nav-link.active i {
  color: var(--fx-brand);
}

.fx-app .fx-settings-nav .nav-link:focus-visible {
  outline: 2px solid var(--fx-brand);
  outline-offset: 2px;
}

@media (max-width: 991.98px) {
  .fx-app .fx-settings-me,
  .fx-app .fx-settings-nav-group {
    display: none;
  }

  .fx-app .fx-settings-nav {
    flex-direction: row;
    gap: 8px;
    margin: 0 -16px;
    padding: 0 16px 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .fx-app .fx-settings-nav::-webkit-scrollbar {
    display: none;
  }

  .fx-app .fx-settings-nav .nav-link {
    flex-shrink: 0;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--fx-line);
    border-radius: 999px;
    background: var(--fx-surface);
  }

  .fx-app .fx-settings-nav .nav-link.active {
    border-color: transparent;
  }
}

.fx-app .fx-settings-card {
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius);
  background: var(--fx-surface);
  box-shadow: var(--fx-shadow);
}

.fx-app .fx-settings-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--fx-line);
}

.fx-app .fx-settings-title {
  margin-bottom: 4px;
  font-size: 20px;
  font-weight: 700;
}

.fx-app .fx-settings-card-body {
  padding: 24px 28px 28px;
}

.fx-app .fx-settings-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px 32px;
  padding: 24px 28px;
}

.fx-app .fx-settings-section + .fx-settings-section {
  border-top: 1px solid var(--fx-line);
}

@media (min-width: 1200px) {
  .fx-app .fx-settings-section {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }
}

.fx-app .fx-settings-section-intro h3 {
  margin-bottom: 4px;
  font-family: var(--fx-font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  font-variation-settings: normal;
}

.fx-app .fx-settings-section-intro p {
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--fx-muted);
}

.fx-app .fx-settings-section-fields .form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--fx-text);
}

.fx-app .fx-settings-section-fields .form-text {
  font-size: 12px;
  color: var(--fx-muted);
}

.fx-app .fx-optional {
  margin-left: 4px;
  font-size: 12px;
  font-weight: 400;
  color: var(--fx-subtle);
}

.fx-app .fx-settings-card-foot {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 28px;
  border-top: 1px solid var(--fx-line);
  border-radius: 0 0 var(--fx-radius) var(--fx-radius);
  background: color-mix(in srgb, var(--fx-canvas) 55%, #fff);
}

.fx-app .fx-settings-qr {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-canvas);
}

.fx-app .fx-settings-qr img {
  width: 112px;
  height: 112px;
  flex-shrink: 0;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

@media (max-width: 575.98px) {
  .fx-app .fx-settings-card-head,
  .fx-app .fx-settings-card-body,
  .fx-app .fx-settings-section,
  .fx-app .fx-settings-card-foot {
    padding-left: 20px;
    padding-right: 20px;
  }

  .fx-app .fx-settings-card-foot .btn {
    flex: 1;
  }
}

/* =========================================================
   AI assistant (/ask)
   Conversations on the left, the chat on the right. Answers
   are Markdown (headings, lists, tables) on a white card.
========================================================= */

.fx-assistant .fx-assistant-head-actions {
  display: flex;
  gap: 8px;
}

.fx-assistant .fx-assistant-locked {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  max-width: 640px;
  padding: 28px;
  border: 1px solid var(--fx-line);
  background: var(--fx-surface);
}

.fx-assistant .fx-assistant-locked h2 {
  margin: 6px 0 0;
  color: var(--fx-ink);
  font-size: 20px;
  font-weight: 650;
}

.fx-assistant .fx-assistant-locked p {
  margin: 0 0 6px;
}

.fx-assistant-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  height: calc(100vh - 230px);
  min-height: 520px;
}

/* Conversations */
.fx-assistant-history {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 16px 10px 10px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius);
  background: var(--fx-surface);
}

.fx-assistant-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 10px;
  color: var(--fx-muted);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.fx-assistant-threads {
  flex: 1;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.fx-assistant-threads-empty {
  padding: 10px 8px;
  color: var(--fx-subtle);
  font-size: 13px;
}

.fx-assistant-thread {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: var(--fx-radius-sm);
}

.fx-assistant-thread:hover,
.fx-assistant-thread.is-active {
  background: var(--fx-canvas);
}

.fx-assistant-thread.is-active {
  box-shadow: inset 3px 0 0 var(--fx-brand);
}

.fx-assistant-thread-open {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 9px 34px 9px 12px;
  border: 0;
  background: none;
  text-align: left;
}

.fx-assistant-thread-title {
  overflow: hidden;
  color: var(--fx-text);
  font-size: 13.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-assistant-thread-time {
  color: var(--fx-subtle);
  font-size: 12px;
}

.fx-assistant-thread-delete {
  position: absolute;
  right: 6px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--fx-subtle);
  opacity: 0;
}

.fx-assistant-thread:hover .fx-assistant-thread-delete,
.fx-assistant-thread-delete:focus-visible {
  opacity: 1;
}

.fx-assistant-thread-delete:hover {
  background: color-mix(in srgb, var(--fx-danger) 10%, #fff);
  color: var(--fx-danger);
}

/* Chat */
.fx-assistant-chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius);
  background: var(--fx-surface);
  box-shadow: var(--fx-shadow);
}

.fx-assistant-scroll {
  flex: 1;
  min-height: 0;
  padding: 28px 28px 8px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.fx-assistant-welcome {
  max-width: 760px;
  margin: 24px auto 0;
  text-align: center;
}

.fx-assistant-welcome h2 {
  margin: 18px 0 8px;
  font-size: 24px;
  font-weight: 650;
}

.fx-assistant-welcome > p {
  max-width: 560px;
  margin: 0 auto 26px;
}

.fx-assistant-orb {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--fx-lime);
  color: var(--fx-ink);
  font-size: 24px;
  box-shadow: 0 0 0 1px rgba(21, 17, 31, .08);
}

.fx-assistant-suggestions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  text-align: left;
}

.fx-assistant-suggestion {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--fx-line);
  border-radius: 16px;
  background: #fbfaf7;
  color: var(--fx-text);
  text-align: left;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.fx-assistant-suggestion:hover,
.fx-assistant-suggestion:focus-visible {
  border-color: color-mix(in srgb, var(--fx-brand) 35%, var(--fx-line));
  background: var(--fx-surface);
  transform: translateY(-1px);
}

.fx-assistant-suggestion strong {
  display: block;
  margin-bottom: 2px;
  color: var(--fx-ink);
  font-size: 14px;
  font-weight: 600;
}

.fx-assistant-suggestion span > span {
  display: block;
  color: var(--fx-muted);
  font-size: 13px;
  line-height: 1.45;
}

.fx-assistant .fx-tile-icon.lilac { background: var(--fx-lilac); color: #4b2fa8; }
.fx-assistant .fx-tile-icon.mint { background: var(--fx-mint-pastel); color: #0f6b47; }
.fx-assistant .fx-tile-icon.peach { background: var(--fx-peach); color: #9a3412; }
.fx-assistant .fx-tile-icon.sky { background: var(--fx-sky); color: #1d4f91; }
.fx-assistant .fx-tile-icon.butter { background: var(--fx-butter); color: #7a5300; }

.fx-assistant-messages {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 820px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.fx-assistant-msg.is-user {
  align-self: flex-end;
  max-width: 78%;
}

.fx-assistant-msg.is-user .fx-assistant-bubble {
  padding: 11px 16px;
  border-radius: 18px 18px 4px 18px;
  background: var(--fx-brand-soft);
  color: var(--fx-ink);
  font-size: 14.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.fx-assistant-msg.is-assistant {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.fx-assistant-avatar {
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--fx-lime);
  color: var(--fx-ink);
  font-size: 15px;
  box-shadow: 0 0 0 1px rgba(21, 17, 31, .08);
}

.fx-assistant-answer {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
  color: var(--fx-text);
  font-size: 14.5px;
  line-height: 1.65;
}

.fx-assistant-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 6px 12px;
  border: 1px solid var(--fx-line);
  border-radius: 999px;
  background: #fbfaf7;
  color: var(--fx-muted);
  font-size: 13px;
}

.fx-assistant-dots {
  display: inline-flex;
  gap: 3px;
}

.fx-assistant-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--fx-brand);
  animation: fx-assistant-dot 1.2s infinite ease-in-out;
}

.fx-assistant-dots i:nth-child(2) { animation-delay: .15s; }
.fx-assistant-dots i:nth-child(3) { animation-delay: .3s; }

@keyframes fx-assistant-dot {
  0%, 80%, 100% { opacity: .25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .fx-assistant-dots i { animation: none; opacity: .7; }
  .fx-assistant-scroll { scroll-behavior: auto; }
}

.fx-assistant-steps {
  margin-bottom: 10px;
  color: var(--fx-muted);
  font-size: 13px;
}

.fx-assistant-steps summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
}

.fx-assistant-steps summary::-webkit-details-marker {
  display: none;
}

.fx-assistant-steps summary i {
  color: var(--fx-mint);
}

.fx-assistant-steps ul {
  margin: 6px 0 0;
  padding-left: 22px;
}

.fx-assistant-body > :first-child { margin-top: 0; }
.fx-assistant-body > :last-child { margin-bottom: 0; }

.fx-assistant-body p,
.fx-assistant-body ul,
.fx-assistant-body ol {
  margin: 0 0 12px;
}

.fx-assistant-body ul,
.fx-assistant-body ol {
  padding-left: 22px;
}

.fx-assistant-body ul { list-style: disc; }
.fx-assistant-body ol { list-style: decimal; }

.fx-assistant-orb .bi,
.fx-assistant-avatar .bi {
  color: inherit;
  font-size: inherit;
  line-height: 1;
}

.fx-assistant-body li + li {
  margin-top: 4px;
}

.fx-assistant-body h1,
.fx-assistant-body h2,
.fx-assistant-body h3,
.fx-assistant-body h4 {
  margin: 20px 0 8px;
  color: var(--fx-ink);
  font-size: 16px;
  font-weight: 650;
}

.fx-assistant-body strong {
  color: var(--fx-ink);
  font-weight: 600;
}

.fx-assistant-body a {
  color: var(--fx-brand);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fx-assistant-body code {
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--fx-canvas);
  color: var(--fx-ink);
  font-size: 13px;
}

.fx-assistant-body blockquote {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-left: 3px solid var(--fx-lime);
  border-radius: 0 10px 10px 0;
  background: #fbfaf7;
}

.fx-assistant-table {
  margin: 4px 0 14px;
  overflow-x: auto;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
}

.fx-assistant-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.fx-assistant-table th,
.fx-assistant-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--fx-line);
  white-space: nowrap;
}

.fx-assistant-table th {
  background: #fbfaf7;
  color: var(--fx-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
  text-align: left;
  text-transform: uppercase;
}

.fx-assistant-table tr:last-child td {
  border-bottom: 0;
}

.fx-assistant-tools {
  margin-top: 6px;
}

.fx-assistant-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--fx-subtle);
  font-size: 12.5px;
}

.fx-assistant-copy:hover {
  background: var(--fx-canvas);
  color: var(--fx-text);
}

.fx-assistant-error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--fx-danger) 30%, transparent);
  border-radius: var(--fx-radius-sm);
  background: color-mix(in srgb, var(--fx-danger) 6%, #fff);
  color: var(--fx-danger);
  font-size: 13.5px;
}

/* Composer */
.fx-assistant-composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  width: calc(100% - 40px);
  max-width: 820px;
  margin: 8px auto 0;
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--fx-line);
  border-radius: 18px;
  background: #fbfaf7;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.fx-assistant-composer:focus-within {
  border-color: color-mix(in srgb, var(--fx-brand) 45%, var(--fx-line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--fx-brand) 10%, transparent);
  background: var(--fx-surface);
}

.fx-assistant-composer textarea {
  flex: 1;
  min-height: 24px;
  max-height: 180px;
  padding: 8px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fx-ink);
  font-size: 15px;
  line-height: 1.5;
  resize: none;
}

.fx-assistant-send {
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--fx-brand);
  color: #fff;
  font-size: 18px;
  transition: background .15s ease, opacity .15s ease;
}

.fx-assistant-send:hover:not(:disabled) {
  background: var(--fx-brand-hover);
}

.fx-assistant-send:disabled {
  opacity: .35;
}

.fx-assistant-foot {
  max-width: 820px;
  margin: 8px auto 14px;
  padding: 0 24px;
  color: var(--fx-subtle);
  font-size: 12px;
  text-align: center;
}

.fx-assistant-foot a {
  color: inherit;
  text-decoration: underline;
}

/* Dashboard home: ask box */
.fx-dashboard .fx-ask-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 10px 10px 10px 14px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius);
  background: var(--fx-surface);
  box-shadow: var(--fx-shadow);
}

.fx-dashboard .fx-ask-card .fx-assistant-avatar {
  flex-basis: 36px;
  width: 36px;
  height: 36px;
}

.fx-dashboard .fx-ask-card input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fx-ink);
  font-size: 15px;
}

.fx-dashboard .fx-ask-card input::placeholder {
  color: var(--fx-subtle);
}

@media (max-width: 991.98px) {
  .fx-assistant-shell {
    grid-template-columns: minmax(0, 1fr);
    height: calc(100vh - 200px);
  }

  .fx-assistant-history {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1060;
    width: min(320px, 86vw);
    border-radius: 0 var(--fx-radius) var(--fx-radius) 0;
    box-shadow: 0 20px 60px -20px rgba(21, 17, 31, .35);
    transform: translateX(-105%);
    transition: transform .2s ease;
  }

  .fx-assistant-history.is-open {
    transform: none;
  }

  .fx-assistant-thread-delete {
    opacity: 1;
  }
}

@media (max-width: 575.98px) {
  .fx-assistant .dashboard-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px;
  }

  .fx-assistant-scroll {
    padding: 18px 14px 6px;
  }

  .fx-assistant-suggestions {
    grid-template-columns: minmax(0, 1fr);
  }

  .fx-assistant-msg.is-user {
    max-width: 90%;
  }

  .fx-assistant-avatar {
    display: none;
  }

  .fx-assistant-composer {
    width: calc(100% - 20px);
  }

  .fx-assistant-foot {
    padding: 0 12px;
  }
}

/* ---------------------------------------------------------
   CSV import wizard (Import/Views/import-modal.php, import.js)
--------------------------------------------------------- */

.fx-import-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: fx-import-step;
}

.fx-import-steps li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: var(--fx-canvas);
  color: var(--fx-subtle);
  font-size: 12.5px;
  font-weight: 600;
  counter-increment: fx-import-step;
}

.fx-import-steps li::before {
  content: counter(fx-import-step);
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  color: var(--fx-muted);
  font-size: 11px;
}

.fx-import-steps li.is-active {
  background: var(--fx-brand-soft);
  color: var(--fx-ink);
}

.fx-import-steps li.is-active::before {
  background: var(--fx-brand);
  color: #fff;
}

.fx-import-steps li.is-done {
  color: var(--fx-muted);
}

.fx-import-steps li.is-done::before {
  content: "\2713";
  background: var(--fx-mint-soft);
  color: var(--fx-mint);
}

.fx-import-tips {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--fx-radius-sm);
  background: var(--fx-canvas);
  font-size: 13px;
}

.fx-import-tips strong {
  display: block;
  color: var(--fx-ink);
}

.fx-import-tips span {
  color: var(--fx-muted);
}

.fx-import-tips .btn {
  flex-shrink: 0;
}

.fx-import-dateformat {
  max-width: 320px;
}

.fx-import-map {
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
  overflow: hidden;
}

.fx-import-map-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: center;
  padding: 10px 14px;
}

.fx-import-map-row + .fx-import-map-row {
  border-top: 1px solid var(--fx-line);
}

.fx-import-map-field label {
  display: block;
  color: var(--fx-ink);
  font-size: 13.5px;
}

.fx-import-map-field label.required::after {
  content: " *";
  color: var(--fx-danger);
}

.fx-import-map-field small,
.fx-import-sample {
  display: block;
  color: var(--fx-muted);
  font-size: 12px;
}

.fx-import-sample {
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-import-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.fx-import-stat {
  padding: 12px 14px;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
  background: #fff;
}

.fx-import-stat strong {
  display: block;
  color: var(--fx-ink);
  font-family: var(--fx-font-heading);
  font-size: 22px;
  line-height: 1.1;
}

.fx-import-stat span {
  color: var(--fx-muted);
  font-size: 12.5px;
}

.fx-import-stat.is-ok {
  border-color: transparent;
  background: var(--fx-mint-soft);
}

.fx-import-stat.is-error {
  border-color: transparent;
  background: #fde8e8;
}

.fx-import-note {
  padding: 10px 14px;
  border-radius: var(--fx-radius-sm);
  background: var(--fx-amber-soft);
  color: var(--fx-text);
  font-size: 13px;
}

.fx-import-table-wrap {
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
}

.fx-import-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--fx-canvas);
  font-size: 12px;
}

.fx-import-table td,
.fx-import-table th {
  padding-top: 9px;
  padding-bottom: 9px;
}

.fx-import-done {
  padding: 18px 0 8px;
  text-align: center;
}

.fx-import-done-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--fx-mint-soft);
  color: var(--fx-mint);
}

.fx-import-done-icon i {
  font-size: 26px;
  line-height: 1;
}

.fx-import-reminders {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--fx-radius-sm);
  background: var(--fx-canvas);
  font-size: 13px;
}

.fx-import-reminders strong {
  display: block;
  color: var(--fx-ink);
}

.fx-import-reminders span {
  color: var(--fx-muted);
}

.fx-import-reminders .btn {
  flex-shrink: 0;
}

@media (max-width: 575.98px) {
  .fx-import-map-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .fx-import-tips,
  .fx-import-reminders {
    flex-direction: column;
    align-items: stretch;
  }
}
