html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background: linear-gradient(180deg, #f4f7fb 0%, #eef3f9 100%);
  color: #0f172a;
}

a {
  text-decoration: none;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
.sf-progress-positive {
	color: #1d8f0d;
	font-size: 0.85rem;
    margin-left:10px;
}
.sf-progress-negative {
    color: #f87171;
    font-size: 0.85rem;
    margin-left: 10px;
}
.sf-progress-positive::before {
    color: #1d8f0d;
    content: "▲ ";
}

.sf-progress-negative::before {
    color: #f87171;
    content: "▼ ";
}
.sf-progress-infinity {
    display:none;
}
.sf-app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sf-site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  padding: 1rem 0 0;
  backdrop-filter: blur(20px);
}

.sf-navbar {
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
}

.sf-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: #fff;
}

.sf-brand:hover,
.sf-brand:focus {
  color: #fff;
}

.sf-brand-mark {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.05em;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
}

.sf-brand-copy {
  display: grid;
  line-height: 1.1;
}

.sf-brand-copy strong {
  font-size: 1.05rem;
  font-weight: 700;
}

.sf-brand-copy small {
  color: rgba(226, 232, 240, 0.8);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.sf-navbar-toggler {
  border: 0;
  padding: 0.6rem 0.8rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.sf-navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.2);
}

.sf-navbar .navbar-toggler-icon {
  filter: invert(1);
}

.sf-nav-list {
  align-items: center;
  gap: 0.35rem;
}

.sf-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1rem !important;
  border-radius: 16px;
  color: rgba(226, 232, 240, 0.88);
  font-weight: 500;
  transition: all 0.2s ease;
}

.sf-nav-link:hover,
.sf-nav-link:focus,
.sf-nav-link.active,
.show > .sf-nav-link {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.sf-dropdown-menu {
  margin-top: 0.75rem;
  padding: 0.55rem;
  min-width: 14rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 40px rgba(15, 23, 42, 0.16);
}

.sf-dropdown-item {
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  color: #0f172a;
}

.sf-dropdown-item:hover,
.sf-dropdown-item:focus {
  color: #0f172a;
  background: #eff6ff;
}

.sf-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.sf-market-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.92rem;
}

.sf-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.15rem;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.32);
}

.sf-primary-action:hover,
.sf-primary-action:focus {
  color: #fff;
  transform: translateY(-1px);
}

.sf-main-shell {
  flex: 1 0 auto;
  padding-top: 1rem;
}

.sf-main-content {
  width: 100%;
}

.sf-site-footer {
  margin-top: 2rem;
  padding: 0 0 1.5rem;
}

.sf-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.sf-footer-inner p {
  margin: 0.2rem 0 0;
  color: #64748b;
}

.sf-footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sf-footer-links a {
  color: #334155;
  font-weight: 600;
}

.sf-footer-links a:hover,
.sf-footer-links a:focus {
  color: #2563eb;
}

.sf-dashboard {
  display: grid;
  gap: 1.5rem;
  padding: 1.5rem 0 2.5rem;
}

.sf-page {
  display: grid;
  gap: 1.5rem;
  padding: 1.5rem 0 2.5rem;
}

.sf-page-hero,
.sf-content-card,
.sf-delete-card,
.sf-empty-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.sf-page-hero {
  border-radius: 28px;
  padding: 1.75rem 2rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}

.sf-page-hero.is-dark {
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 52%, #38bdf8 100%);
  color: #fff;
}

.sf-page-hero.is-warning {
  background: linear-gradient(135deg, #7c2d12 0%, #c2410c 55%, #fb923c 100%);
  color: #fff;
}

.sf-page-kicker {
  display: inline-block;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
}

.sf-page-hero:not(.is-dark):not(.is-warning) .sf-page-kicker {
  color: #2563eb;
}

.sf-page-hero p {
  margin: 0.6rem 0 0;
  max-width: 46rem;
  color: #64748b;
}

.sf-page-hero.is-dark p,
.sf-page-hero.is-warning p,
.sf-page-hero.is-dark .sf-page-kicker,
.sf-page-hero.is-warning .sf-page-kicker {
  color: rgba(255, 255, 255, 0.82);
}

.sf-page-title {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
}

.sf-page-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.sf-content-card,
.sf-delete-card,
.sf-empty-card {
  border-radius: 28px;
  padding: 1.5rem 1.6rem;
}

.sf-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.sf-card-header h2,
.sf-card-header h3 {
  margin: 0;
  font-size: 1.15rem;
}

.sf-card-header p {
  margin: 0.25rem 0 0;
  color: #64748b;
}

.sf-btn-secondary,
.sf-btn-danger,
.sf-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.15rem;
  border-radius: 16px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.sf-btn-secondary {
  border: 0;
  background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.sf-btn-secondary:hover,
.sf-btn-secondary:focus {
  color: #fff;
  transform: translateY(-1px);
}

.sf-btn-danger {
  border: 0;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #fff;
  box-shadow: 0 16px 30px rgba(185, 28, 28, 0.24);
}

.sf-btn-danger:hover,
.sf-btn-danger:focus {
  color: #fff;
}

.sf-btn-ghost {
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
}

.sf-btn-ghost:hover,
.sf-btn-ghost:focus {
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.3);
}

.sf-table-wrapper {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: #fff;
}

.sf-data-table {
  margin-bottom: 0;
}

.sf-data-table thead th {
  border-bottom-width: 1px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1rem;
}

.sf-data-table tbody td {
  padding: 1rem;
  vertical-align: middle;
}

.sf-data-table tbody tr:last-child td {
  border-bottom: 0;
}

.sf-table-actions {
  display: flex;
  justify-content: end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sf-table-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
}

.sf-table-action.is-edit {
  background: #eff6ff;
  color: #1d4ed8;
}

.sf-table-action.is-view {
  background: #eefbf3;
  color: #047857;
}

.sf-table-action.is-delete {
  background: #fef2f2;
  color: #b91c1c;
}

.sf-inline-link {
  color: #0f172a;
  font-weight: 600;
  transition: color 0.2s ease;
}

.sf-inline-link:hover,
.sf-inline-link:focus {
  color: #2563eb;
}

.sf-form-shell {
  display: grid;
  gap: 1.5rem;
}

.sf-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.sf-form-section {
  display: grid;
  gap: 1rem;
}

.sf-field label,
.sf-form-section .form-label {
  font-weight: 700;
  color: #334155;
}

.sf-form-shell .form-control,
.sf-form-shell .form-select,
.sf-form-shell .input-group-text,
.sf-bulk-form .form-control,
.sf-bulk-form .form-select,
.sf-bulk-form .input-group-text {
  border-radius: 16px;
  border-color: rgba(148, 163, 184, 0.26);
  min-height: 3rem;
}

.sf-form-shell .input-group > .form-control,
.sf-form-shell .input-group > .form-select,
.sf-bulk-form .input-group > .form-control,
.sf-bulk-form .input-group > .form-select {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.sf-form-shell .input-group-text,
.sf-bulk-form .input-group-text {
  background: #f8fafc;
}

.sf-form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
}

.sf-delete-card {
  display: grid;
  gap: 1.25rem;
}

.sf-delete-warning {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.sf-definition-list {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0.85rem 1rem;
  margin: 0;
}

.sf-definition-list dt {
  color: #64748b;
  font-weight: 700;
}

.sf-definition-list dd {
  margin: 0;
  color: #0f172a;
  font-weight: 600;
}

.sf-badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
}

.sf-alert-stack {
  display: grid;
  gap: 1rem;
}

.sf-empty-card {
  text-align: center;
}

.sf-empty-card p {
  margin: 0.4rem 0 0;
  color: #64748b;
}

.sf-account-summary-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.sf-summary-tile {
  padding: 1.25rem 1.35rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.sf-summary-tile .sf-page-kicker {
  color: #2563eb;
}

.sf-summary-tile strong {
  display: block;
  font-size: 1.1rem;
  color: #0f172a;
}

.sf-hero,
.sf-panel,
.sf-kpi-card,
.sf-account-group {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.sf-hero {
  border-radius: 28px;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 52%, #38bdf8 100%);
  color: #fff;
}

.sf-eyebrow,
.sf-panel-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
}

.sf-hero h1,
.sf-panel h2,
.sf-account-group h3 {
  margin: 0;
}

.sf-hero p {
  margin: 0.75rem 0 0;
  max-width: 42rem;
  color: rgba(255, 255, 255, 0.84);
}

.sf-hero-total {
  min-width: 16rem;
  padding: 1.25rem 1.5rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.sf-hero-total span,
.sf-kpi-card span,
.sf-account-group p,
.sf-legend-values,
.sf-breakdown-meta {
  color: #64748b;
}

.sf-hero-total span {
  display: block;
  margin-bottom: 0.35rem;
  color: rgba(255, 255, 255, 0.8);
}

.sf-hero-total strong {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.sf-kpi-grid,
.sf-dashboard-grid {
  display: grid;
  gap: 1.5rem;
}

.sf-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.sf-kpi-card {
  border-radius: 22px;
  padding: 1.35rem 1.5rem;
}

.sf-kpi-card strong {
  display: block;
  margin-top: 0.5rem;
  font-size: 1.5rem;
}

.is-positive {
  color: #15803d;
}

.is-negative {
  color: #b91c1c;
}

.sf-dashboard-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr);
}

.sf-panel,
.sf-account-group {
  border-radius: 28px;
  padding: 1.75rem;
}

.sf-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1.5rem;
}

.sf-panel-label {
  display: block;
  margin-bottom: 0.35rem;
  color: #2563eb;
}

.sf-donut-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.sf-chart-stage {
  position: relative;
}

.sf-chart-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.sf-chart-shell {
  position: relative;
  min-height: 340px;
  padding: 1.5rem;
  border-radius: 28px;
  background: radial-gradient(circle at top, rgba(37, 99, 235, 0.12), rgba(255, 255, 255, 0.98) 55%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

#financeAllocationChart {
  width: 100% !important;
  height: 100% !important;
}

.sf-legend,
.sf-breakdown-list,
.sf-account-groups {
  display: grid;
  gap: 1rem;
}

.sf-legend-item,
.sf-breakdown-item {
  display: grid;
  gap: 0.6rem;
}

.sf-legend-item {
  grid-template-columns: auto 1fr;
  align-items: start;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.sf-legend-color {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
  margin-top: 0.25rem;
}

.sf-legend-values,
.sf-breakdown-meta,
.sf-breakdown-topline,
.sf-account-group-title,
.sf-bank-cell {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.sf-legend-values,
.sf-breakdown-meta {
  font-size: 0.95rem;
}

.sf-breakdown-title,
.sf-account-group-title {
  display: flex;
  align-items: start;
  gap: 0.75rem;
}

.sf-progress-track {
  height: 0.7rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.sf-progress-value {
  height: 100%;
  border-radius: inherit;
}

.sf-details-panel {
  padding-bottom: 1.2rem;
}

.sf-account-group-header {
  margin-bottom: 1rem;
}

.sf-account-group h3 {
  font-size: 1.15rem;
}

.sf-account-group p {
  margin: 0.2rem 0 0;
}

.sf-table thead th {
  border-bottom-width: 1px;
  color: #475569;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.sf-bank-cell {
  justify-content: start;
  align-items: center;
}

.sf-bank-logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.22);
  overflow: hidden;
}

.sf-bank-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sf-empty-state {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #64748b;
}

@media (max-width: 991.98px) {
  .sf-site-header {
    position: static;
  }

  .sf-navbar {
    padding: 1rem;
  }

  .sf-nav-list,
  .sf-nav-actions {
    align-items: stretch;
    width: 100%;
  }

  .sf-nav-list {
    padding-top: 1rem;
  }

  .sf-nav-actions {
    flex-direction: column;
    padding-top: 1rem;
  }

  .sf-market-pill,
  .sf-primary-action {
    justify-content: center;
    width: 100%;
  }

  .sf-dashboard-grid,
  .sf-donut-layout {
    grid-template-columns: 1fr;
  }

  .sf-hero {
    align-items: start;
    flex-direction: column;
  }

  .sf-hero-total {
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .sf-site-header {
    padding-top: 0.75rem;
  }

  .sf-navbar,
  .sf-footer-inner {
    border-radius: 20px;
  }

  .sf-footer-inner {
    flex-direction: column;
    align-items: start;
  }

  .sf-footer-links {
    flex-wrap: wrap;
  }

  .sf-dashboard {
    gap: 1rem;
  }

  .sf-hero,
  .sf-panel,
  .sf-kpi-card,
  .sf-account-group {
    border-radius: 22px;
    padding: 1.25rem;
  }

  .sf-chart-shell {
    min-height: 280px;
    padding: 1rem;
  }

  .sf-legend-values,
  .sf-breakdown-meta,
  .sf-breakdown-topline,
  .sf-account-group-title,
  .sf-bank-cell {
    flex-direction: column;
    align-items: start;
    gap: 0.35rem;
  }
}