/*-- Chart --*/
.c3 svg {
  font: 10px sans-serif;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.c3 path,
.c3 line {
  fill: none;
  stroke: #000;
}

.c3 text {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

.c3-legend-item-tile,
.c3-xgrid-focus,
.c3-ygrid,
.c3-event-rect,
.c3-bars path {
  shape-rendering: crispEdges;
}

.c3-chart-arc path {
  stroke: #fff;
}

.c3-chart-arc rect {
  stroke: white;
  stroke-width: 1;
}

.c3-chart-arc text {
  fill: #fff;
  font-size: 13px;
}

/*-- Axis --*/
/*-- Grid --*/
.c3-grid line {
  stroke: #aaa;
}

.c3-grid text {
  fill: #aaa;
}

.c3-xgrid,
.c3-ygrid {
  stroke-dasharray: 3 3;
}

/*-- Text on Chart --*/
.c3-text.c3-empty {
  fill: #808080;
  font-size: 2em;
}

/*-- Line --*/
.c3-line {
  stroke-width: 1px;
}

/*-- Point --*/
.c3-circle {
  fill: currentColor;
}

.c3-circle._expanded_ {
  stroke-width: 1px;
  stroke: white;
}

.c3-selected-circle {
  fill: white;
  stroke-width: 2px;
}

/*-- Bar --*/
.c3-bar {
  stroke-width: 0;
}

.c3-bar._expanded_ {
  fill-opacity: 1;
  fill-opacity: 0.75;
}

/*-- Focus --*/
.c3-target.c3-focused {
  opacity: 1;
}

.c3-target.c3-focused path.c3-line,
.c3-target.c3-focused path.c3-step {
  stroke-width: 2px;
}

.c3-target.c3-defocused {
  opacity: 0.3 !important;
}

/*-- Region --*/
.c3-region {
  fill: steelblue;
  fill-opacity: 0.1;
}

.c3-region text {
  fill-opacity: 1;
}

/*-- Brush --*/
.c3-brush .extent {
  fill-opacity: 0.1;
}

/*-- Select - Drag --*/
/*-- Legend --*/
.c3-legend-item {
  font-size: 12px;
}

.c3-legend-item-hidden {
  opacity: 0.15;
}

.c3-legend-background {
  opacity: 0.75;
  fill: white;
  stroke: lightgray;
  stroke-width: 1;
}

/*-- Title --*/
.c3-title {
  font: 14px sans-serif;
}

/*-- Tooltip --*/
.c3-tooltip-container {
  z-index: 10;
}

.c3-tooltip {
  border-collapse: collapse;
  border-spacing: 0;
  background-color: #fff;
  empty-cells: show;
  -webkit-box-shadow: 7px 7px 12px -9px #777777;
  -moz-box-shadow: 7px 7px 12px -9px #777777;
  box-shadow: 7px 7px 12px -9px #777777;
  opacity: 0.9;
}

.c3-tooltip tr {
  border: 1px solid #CCC;
}

.c3-tooltip th {
  background-color: #aaa;
  font-size: 14px;
  padding: 2px 5px;
  text-align: left;
  color: #FFF;
}

.c3-tooltip td {
  font-size: 13px;
  padding: 3px 6px;
  background-color: #fff;
  border-left: 1px dotted #999;
}

.c3-tooltip td>span {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
}

.c3-tooltip .value {
  text-align: right;
}

/*-- Area --*/
.c3-area {
  stroke-width: 0;
  opacity: 0.2;
}

/*-- Arc --*/
.c3-chart-arcs-title {
  dominant-baseline: middle;
  font-size: 1.3em;
}

.c3-chart-arcs .c3-chart-arcs-background {
  fill: #e0e0e0;
  stroke: #FFF;
}

.c3-chart-arcs .c3-chart-arcs-gauge-unit {
  fill: #000;
  font-size: 16px;
}

.c3-chart-arcs .c3-chart-arcs-gauge-max {
  fill: #777;
}

.c3-chart-arcs .c3-chart-arcs-gauge-min {
  fill: #777;
}

.c3-chart-arc .c3-gauge-value {
  fill: #000;
  /*  font-size: 28px !important;*/
}

.c3-chart-arc.c3-target g path {
  opacity: 1;
}

.c3-chart-arc.c3-target.c3-focused g path {
  opacity: 1;
}

/*-- Zoom --*/
.c3-drag-zoom.enabled {
  pointer-events: all !important;
  visibility: visible;
}

.c3-drag-zoom.disabled {
  pointer-events: none !important;
  visibility: hidden;
}

.c3-drag-zoom .extent {
  fill-opacity: 0.1;
}

/*-- Input --*/
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  margin-left: 0px !important;
}

.has-feedback .form-control {
  padding-right: 5px !important;
}

.svg-inline--fa {
  height: 1em;
  overflow: visible;
  vertical-align: -0.125em
}

.form-control-sm {
  min-height: calc(1.5em + 2px);
}

.form-select-sm {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  padding-left: 0.5rem;
}


.hide {
  display: none;
}

.app-card.border-left-decoration-danger {
  border-left: 5px solid red;
  background-color: rgba(219, 68, 55, 0.1);
}

.networth {
  background-color: dodgerblue;
  color: white;
}

.asset {
  background-color: mediumseagreen;
  color: white;
}

.asset th:first-child,
.liability th:first-child,
.networth th:first-child {
  padding-left: 10px;
}

.asset-subcat td:not(:first-child),
.liability-subcat td:not(:first-child),
.asset-cat td:not(:first-child),
.liability-cat td:not(:first-child) {
  padding-right: 10px;
}

.liability {
  background-color: coral;
  color: white;
}

.asset-cat,
.total {
  font-weight: bold;
}

.asset-cat.total,
.liability-cat.total {
  background-color: lightgrey;
}

.asset-cat td:first-child,
.liability-cat td:first-child {
  padding-left: 25px;
}

.asset-subcat td:first-child,
.liability-subcat td:first-child {
  padding-left: 40px;
}

.total {
  border-top-width: 1px !important;
  border-top: 1px solid grey;
}

/*-- Header Utilities --*/
.app-utility-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: #5d6778;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  vertical-align: middle;
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

.app-utility-btn:hover {
  color: #252930;
  text-decoration: none;
}

.app-utility-btn:focus,
.app-utility-btn:active {
  outline: none;
  box-shadow: none;
}

.app-utility-btn.is-refreshing .icon {
  animation: app-spin 0.8s linear infinite;
}

@keyframes app-spin {
  100% {
    transform: rotate(360deg);
  }
}

/*-- Zero-CLS Container Height Reservations & Skeleton Shimmers --*/
.networth-blocks {
  min-height: 220px;
}

@media (max-width: 991.98px) {
  .networth-blocks {
    min-height: 460px;
  }
}

#networth-home-graph {
  min-height: 320px;
  width: 100%;
}

#networth-home-graph-rel {
  min-height: 150px;
  width: 100%;
}

#networth-overview-graph,
#expense-graph,
#expenses-graph,
#expenses-budget-graph,
#cashflow-inflow-graph,
#cashflow-outflow-graph {
  min-height: 320px;
  width: 100%;
}

.skeleton-card {
  background: linear-gradient(90deg, #f0f2f5 25%, #e4e7eb 50%, #f0f2f5 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 0.25rem;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/*-- Sync Status Badge --*/
.sync-badge {
  font-size: 0.75rem;
  color: #828d9f;
  background: #f5f6fe;
  border: 1px solid #e7e9ed;
  border-radius: 12px;
  padding: 3px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.sync-badge.syncing {
  color: #15a362;
  border-color: #15a362;
  background: #edfdf6;
}

.sync-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #15a362;
}

.sync-badge.syncing .sync-dot {
  animation: pulse-dot 1s infinite alternate;
}

@keyframes pulse-dot {
  0% {
    opacity: 0.3;
    transform: scale(0.8);
  }

  100% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/*-- Top Loading Bar --*/
.app-top-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 9999;
  display: none;
}

.app-top-loader.active {
  display: block;
}

.app-top-loader-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #15a362, #8DDEB4, #15a362);
  background-size: 200% 100%;
  animation: loader-slide 1s infinite linear;
}

@keyframes loader-slide {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/*-- Notification Badge --*/
#notifications-dropdown-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-utility-item .icon-badge,
#notifications-dropdown-toggle .icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -4px;
  right: -7px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(220, 38, 38, 0.45);
  pointer-events: none;
  z-index: 10;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#notifications-dropdown-toggle:hover .icon-badge {
  transform: scale(1.1);
}

/* ========================================================
   Retirement & FI Calculator Styles & Enhanced Components
   ======================================================== */

/* Grid utilities that were purged */
@media (min-width: 768px) {
  .col-md-3 {
    flex: 0 0 auto;
    width: 25% !important;
  }

  .col-md-4 {
    flex: 0 0 auto;
    width: 33.33333333% !important;
  }

  .col-md-5 {
    flex: 0 0 auto;
    width: 41.66666667% !important;
  }

  .border-md-end {
    border-right: 1px solid #e2e8f0 !important;
  }
}

@media (min-width: 992px) {
  .col-lg-3 {
    flex: 0 0 auto;
    width: 25% !important;
  }

  .col-lg-4 {
    flex: 0 0 auto;
    width: 33.33333333% !important;
  }

  .col-lg-5 {
    flex: 0 0 auto;
    width: 41.66666667% !important;
  }
}

@media (min-width: 1200px) {
  .col-xl-5 {
    flex: 0 0 auto;
    width: 41.66666667% !important;
  }

  .col-xl-7 {
    flex: 0 0 auto;
    width: 58.33333333% !important;
  }
}

.gap-2 {
  gap: 0.5rem !important;
}

.gap-3 {
  gap: 1rem !important;
}

.gap-4 {
  gap: 1.5rem !important;
}

/* Missing padding utilities from PurgeCSS */
.p-4 {
  padding: 1.5rem !important;
}

.px-4 {
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

.py-4 {
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}

/* Retirement Hero Banner Card */
.ret-banner-card {
  padding: 1.75rem 2rem !important;
}

@media (max-width: 991.98px) {
  .ret-banner-card {
    padding: 1.25rem !important;
  }
}

@media (min-width: 768px) {
  .ret-banner-card .border-md-end {
    border-right: 1px solid #e2e8f0 !important;
    padding-right: 1.75rem !important;
  }

  .ret-banner-col-middle {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}

/* Display metric font size */
.ret-metric-display {
  font-size: 2.5rem !important;
  font-weight: 800 !important;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

/* Soft colored badges */
.bg-success-soft {
  background-color: rgba(16, 185, 129, 0.14) !important;
  color: #059669 !important;
}

.bg-danger-soft {
  background-color: rgba(239, 68, 68, 0.14) !important;
  color: #dc2626 !important;
}

.bg-warning-soft {
  background-color: rgba(245, 158, 11, 0.14) !important;
  color: #d97706 !important;
}

.bg-primary-soft {
  background-color: rgba(37, 99, 235, 0.14) !important;
  color: #2563eb !important;
}

.bg-info-soft {
  background-color: rgba(14, 165, 233, 0.14) !important;
  color: #0284c7 !important;
}

/* Milestone Target Cards */
.ret-milestones-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
}

.ret-milestone-card {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.75rem;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  transition: all 0.15s ease;
}

.ret-milestone-card:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

.ret-milestone-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ret-milestone-value {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a !important;
  margin-top: 0.2rem;
}

/* Allocation Visual Split Bar */
.ret-alloc-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  background-color: #f1f5f9;
}

.ret-alloc-bar-stock {
  background: #2563eb;
  transition: width 0.2s ease;
}

.ret-alloc-bar-bond {
  background: #0ea5e9;
  transition: width 0.2s ease;
}

.ret-alloc-bar-cash {
  background: #64748b;
  transition: width 0.2s ease;
}

/* Range Slider Layout & Styling */
.ret-slider-group {
  margin-bottom: 0.875rem;
}

.ret-slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.ret-slider-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ret-slider-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  line-height: 1.2;
}

input[type="range"].ret-range {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100% !important;
  height: 6px;
  border-radius: 9999px;
  background: #e2e8f0;
  outline: none;
  margin: 6px 0;
  cursor: pointer;
  border: none;
  padding: 0;
}

input[type="range"].ret-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

input[type="range"].ret-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

input[type="range"].ret-range:hover::-webkit-slider-thumb {
  transform: scale(1.15);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

input[type="range"].ret-range-stock::-webkit-slider-thumb {
  background: #2563eb;
}

input[type="range"].ret-range-stock::-moz-range-thumb {
  background: #2563eb;
}

input[type="range"].ret-range-bond::-webkit-slider-thumb {
  background: #0ea5e9;
}

input[type="range"].ret-range-bond::-moz-range-thumb {
  background: #0ea5e9;
}

input[type="range"].ret-range-cash::-webkit-slider-thumb {
  background: #64748b;
}

input[type="range"].ret-range-cash::-moz-range-thumb {
  background: #64748b;
}

input[type="range"].ret-range-primary::-webkit-slider-thumb {
  background: #15a362;
}

input[type="range"].ret-range-primary::-moz-range-thumb {
  background: #15a362;
}

/* Strategy callout card */
.ret-strategy-info-card {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #334155;
  margin-top: 0.5rem;
}

/* ========================================================
   Bootstrap Modal Restoration (PurgeCSS fixes)
   ======================================================== */
.modal-dialog {
  position: relative;
  width: auto;
  margin: 1.75rem auto;
  max-width: 500px;
  pointer-events: none;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #ffffff !important;
  background-clip: padding-box;
  border: 1px solid #cbd5e1;
  border-radius: 0.625rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  outline: 0;
  overflow: hidden;
}

.modal-header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  background-color: #ffffff;
}

.modal-header .modal-title {
  margin-bottom: 0;
  line-height: 1.5;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1.25rem;
  background-color: #ffffff;
}

.modal-footer {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid #e2e8f0;
  background-color: #f8fafc;
  gap: 0.5rem;
}

.btn-close {
  box-sizing: content-box;
  width: 0.875em;
  height: 0.875em;
  padding: 0.25em 0.25em;
  color: #64748b;
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2364748b'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.414 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
  border: 0;
  border-radius: 0.375rem;
  opacity: 0.7;
  cursor: pointer;
}

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

.btn-close:focus {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
  opacity: 1;
}

/* Cohort row table styling */
.cohort-row-success {
  transition: background-color 0.15s ease;
}

.cohort-row-failed {
  background-color: rgba(254, 242, 242, 0.5) !important;
}

.cohort-row-failed:hover {
  background-color: rgba(254, 226, 226, 0.7) !important;
}

#cohort-table-tbody tr {
  cursor: default;
}

#cohort-table-tbody tr:hover {
  background-color: #f8fafc;
}

/* Fan chart custom styling */
#retirement-trajectory-graph .c3-area {
  opacity: 0.25 !important;
}

#retirement-trajectory-graph .c3-line {
  stroke-width: 2px !important;
}

#retirement-trajectory-graph .c3-line-Median--50th- {
  stroke-width: 3.5px !important;
}

#retirement-spending-graph .c3-area {
  opacity: 0.22 !important;
}

#retirement-spending-graph .c3-line-Median-Spend {
  stroke-width: 3px !important;
}

/* Strategy param card animations */
.strategy-param-card {
  transition: all 0.2s ease-in-out;
}

/* Event List Scrollbar */
#ret-events-list::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

#ret-events-list::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

#ret-events-list::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

#ret-events-list::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ========================================================
   Big Decision / Life Event Sandbox Styles
   ======================================================== */
.decision-impact-card {
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid #334155;
  border-radius: 0.75rem;
  padding: 1.25rem;
  color: #f8fafc;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.15);
}

.decision-card-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.decision-return-badge {
  background-color: #334155;
  color: #38bdf8;
  font-weight: 600;
  font-size: 0.72rem;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  border: 1px solid #475569;
}

.decision-delta-hero {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #f87171 !important;
}

.decision-delta-hero.text-success {
  color: #4ade80 !important;
}

.decision-delta-subtext {
  font-size: 0.82rem;
  color: #cbd5e1;
}

.decision-comparison-box {
  background-color: rgba(15, 23, 42, 0.6);
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
}

.decision-comparison-box.decision-box {
  border-color: #f59e0b;
  background-color: rgba(245, 158, 11, 0.08);
}

.comparison-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  display: block;
  margin-bottom: 0.2rem;
}

.comparison-tag.tag-decision {
  color: #fbbf24;
}

.comparison-date {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff !important;
  display: block;
  line-height: 1.2;
}

.comparison-months {
  font-size: 0.75rem;
  color: #cbd5e1;
  display: block;
  margin-top: 0.15rem;
}

.comparison-goal-label {
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 500;
}

.comparison-goal-val {
  color: #f8fafc !important;
  font-size: 0.82rem;
  font-weight: 700;
}

.btn-decision-apply {
  background-color: #15a362 !important;
  color: #ffffff !important;
  border: 1px solid #15a362 !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  padding: 0.7rem 1.25rem !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 14px rgba(21, 163, 98, 0.4) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: block !important;
  text-align: center !important;
  text-decoration: none !important;
  letter-spacing: 0.02em !important;
}

.btn-decision-apply:hover {
  background-color: #128c54 !important;
  border-color: #128c54 !important;
  box-shadow: 0 6px 18px rgba(21, 163, 98, 0.5) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.decision-preset-pill {
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.55rem;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.decision-preset-pill:hover {
  background-color: #f1f5f9;
  border-color: #94a3b8;
  color: #1e293b;
}

.decision-preset-pill.active {
  background-color: #15a362;
  border-color: #15a362;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(21, 163, 98, 0.3);
}

.ret-dur-pill {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  padding: 0.25rem 0.65rem !important;
}

.ret-dur-pill.active {
  background-color: #0d6efd !important;
  border-color: #0d6efd !important;
  color: #ffffff !important;
}

.decision-scenario-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0d6efd;
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.decision-scenario-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.decision-scenario-item.delay-negative {
  border-left-color: #198754;
}

.decision-scenario-item.delay-positive {
  border-left-color: #dc3545;
}

.scenario-badge {
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 0.2rem 0.5rem !important;
  border-radius: 4px !important;
  background-color: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
  display: inline-block !important;
  line-height: 1.2 !important;
}

/* Cash Flows Card Header Buttons */
.btn-ret-flow {
  background-color: #f8fafc !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 600 !important;
  font-size: 0.82rem !important;
  padding: 0.35rem 0.75rem !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.btn-ret-flow:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

.btn-ret-scenario {
  background-color: #15a362 !important;
  color: #ffffff !important;
  border: 1px solid #15a362 !important;
  font-weight: 600 !important;
  font-size: 0.82rem !important;
  padding: 0.35rem 0.75rem !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px rgba(21, 163, 98, 0.2) !important;
  transition: all 0.15s ease !important;
}

.btn-ret-scenario:hover {
  background-color: #128c54 !important;
  border-color: #128c54 !important;
  color: #ffffff !important;
}

.scenario-metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  color: #475569;
  font-weight: 500;
}

.scenario-metric-chip strong {
  color: #0f172a;
}

.scenario-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.scenario-action-btn.edit-btn {
  color: #0d6efd;
  background-color: #eff6ff;
  border-color: #bfdbfe;
}

.scenario-action-btn.edit-btn:hover {
  background-color: #dbeafe;
  color: #1d4ed8;
}

.scenario-action-btn.delete-btn {
  color: #dc3545;
  background-color: #fef2f2;
  border-color: #fecaca;
}

.scenario-action-btn.delete-btn:hover {
  background-color: #fee2e2;
  color: #b91c1c;
}

/* Gap utilities purged by PurgeCSS */
.gap-1 {
  gap: 0.25rem !important;
}

.gap-2 {
  gap: 0.5rem !important;
}

.gap-3 {
  gap: 1rem !important;
}

/* Scenario Card Structure */
.scenario-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.scenario-title-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.scenario-action-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.scenario-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

/* Widescreen 2-column modal */
#bigDecisionModal .modal-dialog {
  max-width: 960px !important;
}

@media (min-width: 768px) {
  #bigDecisionModal .decision-modal-left {
    flex: 0 0 58.333333% !important;
    max-width: 58.333333% !important;
  }

  #bigDecisionModal .decision-modal-right {
    flex: 0 0 41.666667% !important;
    max-width: 41.666667% !important;
  }
}

/* ==========================================================================
   Restored Bootstrap Utilities & Missing Classes (Unpurged)
   ========================================================================== */

/* Backgrounds */
.bg-light {
  background-color: #f8fafc !important;
}

.bg-white {
  background-color: #ffffff !important;
}

.bg-primary {
  background-color: #15a362 !important;
}

.bg-secondary {
  background-color: #5d6778 !important;
}

.bg-warning {
  background-color: #ffc107 !important;
}

/* Typography & Text */
.text-secondary {
  color: #5d6778 !important;
}

.text-dark {
  color: #212529 !important;
}

.text-primary {
  color: #15a362 !important;
}

.text-info {
  color: #0284c7 !important;
}

.text-white {
  color: #ffffff !important;
}

.text-uppercase {
  text-transform: uppercase !important;
}

.text-end {
  text-align: right !important;
}

.fw-bold {
  font-weight: 700 !important;
}

.fw-normal {
  font-weight: 400 !important;
}

.fs-4 {
  font-size: 1.5rem !important;
}

.fs-6 {
  font-size: 1rem !important;
}

.tracking-wider {
  letter-spacing: 0.05em !important;
}

/* Layout & Flexbox */
.d-block {
  display: block !important;
}

.flex-wrap {
  flex-wrap: wrap !important;
}

.align-items-baseline {
  align-items: baseline !important;
}

.align-items-stretch {
  align-items: stretch !important;
}

.align-middle {
  vertical-align: middle !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Spacing & Gutters */
.mb-2 {
  margin-bottom: 0.5rem !important;
}

.me-1 {
  margin-right: 0.25rem !important;
}

.ms-1 {
  margin-left: 0.25rem !important;
}

.ms-2 {
  margin-left: 0.5rem !important;
}

.my-1 {
  margin-top: 0.25rem !important;
  margin-bottom: 0.25rem !important;
}

.my-3 {
  margin-top: 1rem !important;
  margin-bottom: 1rem !important;
}

.px-1 {
  padding-left: 0.25rem !important;
  padding-right: 0.25rem !important;
}

.px-2 {
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

.py-1 {
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
}

.pt-2 {
  padding-top: 0.5rem !important;
}

@media (min-width: 576px) {
  .col-sm-6 {
    flex: 0 0 auto !important;
    width: 50% !important;
  }
}

@media (min-width: 768px) {
  .ps-md-3 {
    padding-left: 1rem !important;
  }

  .p-md-4 {
    padding: 1.5rem !important;
  }
}

.g-2 {
  --bs-gutter-x: 0.5rem;
  --bs-gutter-y: 0.5rem;
}

.gx-2 {
  --bs-gutter-x: 0.5rem;
}

.g-3 {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
}

/* Borders & Shadows */
.border-0 {
  border: 0 !important;
}

.border-bottom {
  border-bottom: 1px solid #e7e9ed !important;
}

.shadow-lg {
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* Tables */
.table-striped>tbody>tr:nth-of-type(odd)>* {
  background-color: rgba(0, 0, 0, 0.02) !important;
}

.table-light {
  --bs-table-bg: #f8f9fa;
  --bs-table-striped-bg: #ecedee;
  --bs-table-color: #000;
  color: #212529 !important;
  background-color: #f8f9fa !important;
}

/* Buttons */
.btn-primary {
  color: #ffffff !important;
  background-color: #15a362 !important;
  border-color: #15a362 !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  color: #ffffff !important;
  background-color: #128c54 !important;
  border-color: #128c54 !important;
}

.btn-secondary {
  color: #ffffff !important;
  background-color: #5d6778 !important;
  border-color: #5d6778 !important;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
  color: #ffffff !important;
  background-color: #4b5463 !important;
  border-color: #4b5463 !important;
}

.btn-warning {
  --bs-btn-color: #000;
  --bs-btn-bg: #ffc107;
  --bs-btn-border-color: #ffc107;
  --bs-btn-hover-color: #000;
  --bs-btn-hover-bg: #ffca2c;
  --bs-btn-hover-border-color: #ffc720;
  --bs-btn-focus-shadow-rgb: 217, 164, 6;
  --bs-btn-active-color: #000;
  --bs-btn-active-bg: #ffcd39;
  --bs-btn-active-border-color: #ffc720;
  --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
  --bs-btn-disabled-color: #000;
  --bs-btn-disabled-bg: #ffc107;
  --bs-btn-disabled-border-color: #ffc107;
}

.btn-outline-primary {
  color: #15a362 !important;
  border: 1px solid #15a362 !important;
  background-color: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  color: #ffffff !important;
  background-color: #15a362 !important;
  border-color: #15a362 !important;
}

.btn-link {
  font-weight: 500;
  color: #15a362 !important;
  text-decoration: none;
  background-color: transparent !important;
  border: none !important;
}

.btn-link:hover {
  color: #128c54 !important;
  text-decoration: underline !important;
}

.btn-group,
.btn-group-vertical {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}

.btn-group>.btn {
  position: relative;
  flex: 1 1 auto;
}

.btn-group>.btn:not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: -1px;
}

.btn-group>.btn:not(:last-child):not(.dropdown-toggle) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.btn-group-sm>.btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.25rem;
}

/* Alerts */
.alert-success {
  color: #0f5132;
  background-color: #d1e7dd;
  border: 1px solid #badbcc;
  border-radius: 0.375rem;
  padding: 1rem 1rem;
}

/* Forms & Switches */
.form-group {
  margin-bottom: 1rem;
}

.input-group-prepend {
  display: flex;
}

.form-switch {
  padding-left: 2.5em;
}

.form-switch .form-check-input {
  width: 2em;
  margin-left: -2.5em;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");
  background-position: left center;
  background-repeat: no-repeat;
  background-size: contain;
  border-radius: 2em;
  transition: background-position 0.15s ease-in-out;
}

.form-switch .form-check-input:checked {
  background-position: right center;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
  background-color: #15a362;
  border-color: #15a362;
}

/* Modals */
.modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - 3.5rem);
}

.modal-dialog-scrollable {
  height: calc(100% - 3.5rem);
}

.modal-dialog-scrollable .modal-content {
  max-height: 100%;
  overflow: hidden;
}

.modal-dialog-scrollable .modal-body {
  overflow-y: auto;
}

@media (min-width: 1200px) {
  .modal-xl {
    max-width: 1140px;
  }
}

/* Semantic Indicator Dots */
.ret-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  min-width: 7px;
  min-height: 7px;
  max-width: 7px;
  max-height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  line-height: 1;
}

/* Milestone Dot Colors */
.ret-dot-lean {
  background-color: #f59e0b;
}

.ret-dot-fat {
  background-color: #ef4444;
}

.ret-dot-coast {
  background-color: #0284c7;
}

.ret-dot-barista {
  background-color: #10b981;
}

/* Allocation Dot Colors (Matched to distribution bar) */
.ret-dot-stock {
  background-color: #2563eb;
}

.ret-dot-bond {
  background-color: #0284c7;
}

.ret-dot-cash {
  background-color: #64748b;
}

/* Icons & Helpers */
.bi-circle-fill {
  display: inline-block !important;
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background-color: currentColor !important;
  vertical-align: middle !important;
  margin-right: 0.35rem !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
}

.bi-circle-fill::before {
  content: "" !important;
  display: none !important;
}

svg.bi,
i.bi {
  vertical-align: -0.125em;
}

.fa-heart::before {
  content: "❤";
  color: #dc3545;
}

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

.copyright {
  font-size: 0.8125rem;
}

.title {
  color: #252930;
}

/* Accessibility & Color Contrast Enhancements */
.app-nav .nav-link {
  color: #334155 !important;
}

.app-nav .nav-link:hover,
.app-nav .nav-link.active {
  color: #128c54 !important;
}

#sync-status-badge {
  color: #334155 !important;
}

#sync-status-text {
  color: #334155 !important;
  font-weight: 500 !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ==========================================================================
   CSV Transactions Uploader & Categorizer
   ========================================================================== */
.csv-dropzone {
  border: 2px dashed #cbd5e1 !important;
  background-color: #f8fafc;
  border-radius: 0.75rem;
  transition: all 0.25s ease-in-out;
  cursor: pointer;
}

.csv-dropzone:hover,
.csv-dropzone.dragover {
  border-color: #15a362 !important;
  background-color: #f0fdf4;
}

.csv-dropzone i {
  color: #64748b;
  transition: transform 0.2s ease-in-out;
}

.csv-dropzone:hover i,
.csv-dropzone.dragover i {
  color: #15a362;
  transform: translateY(-3px);
}

#csv-staging-table {
  font-size: 0.825rem;
}

#csv-staging-table tbody tr {
  transition: background-color 0.15s ease;
}

#csv-staging-table tbody tr.row-selected {
  background-color: #f0fdf4 !important;
}

#csv-staging-table tbody tr.row-uncategorized td.col-category select {
  border-color: #f59e0b;
  background-color: #fffbeb;
}

#csv-staging-table input.form-control-sm,
#csv-staging-table select.form-select-sm {
  font-size: 0.8125rem;
  padding: 0.25rem 0.4rem;
  height: 1.85rem;
}

#csv-staging-table .col-amount input {
  font-family: monospace;
  font-weight: 600;
  text-align: right;
}

#csv-bulk-actions-toolbar {
  animation: slideDownFade 0.2s ease-out;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 0.5rem !important;
  padding: 0.5rem 0.75rem !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Unified Staging Controls & Filters */
#csv-staging-container .form-check {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0;
}

#csv-staging-container .form-check-input {
  margin-top: 0;
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  border: 1.5px solid #94a3b8;
  border-radius: 0.25rem;
}

#csv-staging-container .form-check-input:checked {
  background-color: #15a362;
  border-color: #15a362;
}

#csv-staging-container .form-check-label {
  cursor: pointer;
  user-select: none;
  font-size: 0.8125rem;
  color: #334155;
  line-height: 1;
}

#csv-total-items-badge,
#csv-total-amount-badge,
#csv-uncategorized-badge {
  display: inline-flex;
  align-items: center;
  height: 1.65rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50rem;
}

#csv-staging-container .input-group-sm {
  height: 2.15rem;
}

#csv-staging-container .input-group-sm .input-group-text {
  height: 2.15rem;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-right: none;
  border-top-left-radius: 0.375rem;
  border-bottom-left-radius: 0.375rem;
  color: #64748b;
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
}

#csv-staging-container .input-group-sm input.form-control {
  height: 2.15rem;
  border: 1px solid #cbd5e1;
  border-left: none;
  border-top-right-radius: 0.375rem;
  border-bottom-right-radius: 0.375rem;
  padding: 0.35rem 0.65rem 0.35rem 0.25rem;
  font-size: 0.8125rem;
  color: #1e293b;
}

#csv-staging-container .input-group-sm:focus-within .input-group-text,
#csv-staging-container .input-group-sm:focus-within input.form-control {
  border-color: #15a362;
}

#csv-staging-container .input-group-sm:focus-within {
  box-shadow: 0 0 0 2px rgba(21, 163, 98, 0.15);
  border-radius: 0.375rem;
}

#csv-filter-status-select {
  height: 2.15rem !important;
  font-size: 0.8125rem !important;
  font-weight: 500;
  color: #334155 !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 0.375rem !important;
  padding: 0.35rem 2rem 0.35rem 0.65rem !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#csv-filter-status-select:focus {
  border-color: #15a362 !important;
  box-shadow: 0 0 0 2px rgba(21, 163, 98, 0.15) !important;
  outline: none;
}

#csv-selected-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.15rem;
  padding: 0 0.75rem;
  font-size: 0.775rem;
  font-weight: 600;
  border-radius: 0.375rem;
  background-color: #15a362 !important;
  color: #ffffff !important;
  white-space: nowrap;
}

#csv-bulk-actions-toolbar select.form-select {
  height: 2.15rem !important;
  font-size: 0.8125rem !important;
  font-weight: 500;
  color: #334155 !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 0.375rem !important;
  padding: 0.35rem 2rem 0.35rem 0.65rem !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#csv-bulk-actions-toolbar select.form-select:focus {
  border-color: #15a362 !important;
  box-shadow: 0 0 0 2px rgba(21, 163, 98, 0.15) !important;
  outline: none;
}

#csv-bulk-apply-btn {
  height: 2.15rem !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  padding: 0.35rem 0.85rem !important;
  border: 1px solid #15a362 !important;
  color: #15a362 !important;
  background-color: #ffffff !important;
  border-radius: 0.375rem !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: all 0.15s ease-in-out;
}

#csv-bulk-apply-btn:hover {
  background-color: #15a362 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(21, 163, 98, 0.2);
}

#csv-bulk-delete-btn {
  height: 2.15rem !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  padding: 0.35rem 0.75rem !important;
  border: 1px solid transparent !important;
  color: #475569 !important;
  background-color: transparent !important;
  border-radius: 0.375rem !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: all 0.15s ease-in-out;
}

#csv-bulk-delete-btn:hover {
  color: #dc2626 !important;
  background-color: #fef2f2 !important;
  border-color: #fecaca !important;
}

/* Missing border-radius utilities */
.rounded-2 {
  border-radius: 0.5rem !important;
}

.rounded-3 {
  border-radius: 0.75rem !important;
}

.rounded-pill {
  border-radius: 50rem !important;
}

/* Refined CSV Settings Bar */
#csv-default-settings-bar {
  /* background-color: #f8fafc !important; */
  /* border: 1px solid #e2e8f0 !important; */
  /* border-radius: 0.75rem !important; */
  padding: 1.15rem 1.25rem !important;
  /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03); */
  /* margin-bottom: 1.25rem !important; */
}

#csv-default-settings-bar .form-label {
  font-size: 0.775rem !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #475569 !important;
  margin-bottom: 0.4rem !important;
  display: block;
}

#csv-default-settings-bar select.form-select {
  border: 1px solid #cbd5e1 !important;
  border-radius: 0.5rem !important;
  background-color: #ffffff !important;
  padding: 0.45rem 2rem 0.45rem 0.75rem !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  color: #1e293b !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  height: 2.35rem !important;
  transition: all 0.15s ease-in-out;
}

#csv-default-settings-bar select.form-select:focus {
  border-color: #15a362 !important;
  box-shadow: 0 0 0 3px rgba(21, 163, 98, 0.15) !important;
  outline: none;
}

#csv-default-settings-bar .form-check {
  display: flex !important;
  align-items: center !important;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.45rem 0.75rem !important;
  margin-top: 1.45rem !important;
  margin-bottom: 0 !important;
  height: 2.35rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}

#csv-default-settings-bar .form-check:hover {
  border-color: #cbd5e1;
  background-color: #f1f5f9;
}

#csv-default-settings-bar .form-check:focus-within {
  border-color: #15a362;
  box-shadow: 0 0 0 2px rgba(21, 163, 98, 0.12);
}

#csv-default-settings-bar .form-check-input {
  float: none !important;
  margin-left: 0 !important;
  margin-top: 0 !important;
  margin-right: 0.55rem !important;
  width: 1.15rem !important;
  height: 1.15rem !important;
  cursor: pointer;
  flex-shrink: 0;
  border: 1.5px solid #94a3b8 !important;
  border-radius: 0.25rem !important;
}

#csv-default-settings-bar .form-check-input:checked {
  background-color: #15a362 !important;
  border-color: #15a362 !important;
}

#csv-default-settings-bar .form-check-label {
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  color: #334155 !important;
  cursor: pointer;
  user-select: none;
  margin-bottom: 0 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Refined Column Mapping Panel */
#csv-column-mapping-panel {
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

#csv-column-mapping-panel .form-label {
  font-size: 0.775rem !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #475569 !important;
}

#csv-column-mapping-panel select.form-select {
  border: 1px solid #cbd5e1 !important;
  border-radius: 0.5rem !important;
  background-color: #ffffff !important;
  font-size: 0.85rem !important;
  height: 2.35rem !important;
}

/* ==========================================================================
   Storage & Categorization Rules Modal Styling
   ========================================================================== */

/* Restore clean Bootstrap Tab styling lost from purged CSS */
#csvStorageManagerModal .nav-tabs {
  border-bottom: 1px solid #e2e8f0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  padding-left: 1.25rem !important;
  padding-right: 1.25rem !important;
  padding-top: 0.75rem !important;
  margin-bottom: 0 !important;
  list-style: none !important;
  background-color: #f8fafc !important;
  gap: 0.25rem !important;
}

#csvStorageManagerModal .nav-tabs .nav-item {
  margin-bottom: -1px !important;
}

#csvStorageManagerModal .nav-tabs .nav-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.55rem 1rem !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-top-left-radius: 0.5rem !important;
  border-top-right-radius: 0.5rem !important;
  cursor: pointer !important;
  outline: none !important;
  box-shadow: none !important;
  transition: all 0.15s ease-in-out !important;
}

#csvStorageManagerModal .nav-tabs .nav-link:hover {
  color: #1e293b !important;
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 #e2e8f0 transparent !important;
}

#csvStorageManagerModal .nav-tabs .nav-link.active {
  color: #0f172a !important;
  background-color: #ffffff !important;
  border-color: #e2e8f0 #e2e8f0 #ffffff !important;
  border-bottom: 1px solid #ffffff !important;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.02) !important;
}

#csvStorageManagerModal .nav-tabs .nav-link.active i {
  color: #15a362 !important;
}

/* Tab panes display management */
#csvStorageManagerModal .tab-content>.tab-pane {
  display: none !important;
}

#csvStorageManagerModal .tab-content>.tab-pane.active,
#csvStorageManagerModal .tab-content>.tab-pane.show.active {
  display: block !important;
}

/* Quick add rule bar alignment */
#csvStorageManagerModal .rule-quick-add-box {
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 0.5rem !important;
  padding: 0.85rem 1rem !important;
}

#csvStorageManagerModal .rule-quick-add-grid {
  display: grid !important;
  grid-template-columns: 5fr 4fr 3fr !important;
  gap: 0.75rem !important;
  align-items: flex-end !important;
}

@media (max-width: 768px) {
  #csvStorageManagerModal .rule-quick-add-grid {
    grid-template-columns: 1fr !important;
  }
}

#csvStorageManagerModal .rule-quick-add-grid .rule-input-group {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
}

#csvStorageManagerModal .rule-quick-add-grid .rule-action-group {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
}

#csvStorageManagerModal .rule-quick-add-grid input.form-control,
#csvStorageManagerModal .rule-quick-add-grid select.form-select,
#csvStorageManagerModal #add-new-rule-btn {
  height: 35px !important;
  font-size: 0.8125rem !important;
  margin: 0 !important;
}

/* JSON Syntax Highlighting Tokens (No Libraries) */
.json-highlight-viewer {
  background-color: #f8fafc !important;
  color: #1e293b !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
  font-size: 0.8125rem !important;
  tab-size: 2;
  border: 1px solid #e2e8f0 !important;
}

.json-highlight-viewer .json-key {
  color: #0369a1 !important;
  /* crisp dark cyan/blue */
  font-weight: 600 !important;
}

.json-highlight-viewer .json-string {
  color: #15803d !important;
  /* rich forest green */
}

.json-highlight-viewer .json-number {
  color: #d97706 !important;
  /* warm amber/orange */
}

.json-highlight-viewer .json-boolean {
  color: #b91c1c !important;
  /* crimson red */
  font-weight: 600 !important;
}

.json-highlight-viewer .json-null {
  color: #7c3aed !important;
  /* purple */
  font-weight: 600 !important;
}

#category-rules-table th,
#category-rules-table td {
  padding: 0.45rem 0.65rem;
  font-size: 0.8125rem;
}

#category-rules-table .rule-pattern-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.775rem;
  background-color: #f1f5f9;
  color: #0f172a;
  padding: 0.2rem 0.45rem;
  border-radius: 0.25rem;
  border: 1px solid #e2e8f0;
  display: inline-block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#inspector-keys-list .list-group-item {
  font-size: 0.8125rem;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.15s ease-in-out;
}

#inspector-keys-list .list-group-item:hover {
  background-color: #f8fafc;
}

#inspector-keys-list .list-group-item.active {
  background-color: #e6f4ea !important;
  color: #137333 !important;
  font-weight: 600;
  border-color: #15a362 !important;
  border-left: 3px solid #15a362 !important;
}

#inspector-json-editor {
  resize: vertical;
  min-height: 280px;
  line-height: 1.4;
  tab-size: 2;
}

/* Modal Stacking & Notification Elevation */
#csvNotificationModal {
  z-index: 1070 !important;
}

/* Only elevate backdrop when multiple modals are stacked (2nd backdrop dims 1st modal) */
.modal-backdrop+.modal-backdrop {
  z-index: 1065 !important;
}