/* ==========================================================================
   Budget Calculator Styles - Exact Clone of Reference Images 1 & 2
   Responsive, Modern, Accessible & Multilingual Layout
   ========================================================================== */

:root {
  --bc-blue: #3b6998;
  --bc-blue-hover: #2e557d;
  --bc-dark-blue: #204d74;
  --bc-link-blue: #0844a4;
  --bc-sub-header-bg: #cad6e2;
  --bc-sub-header-text: #0f2d4a;
  --bc-green-btn: #3d8b37;
  --bc-green-btn-hover: #32752d;
  --bc-border: #dcdcdc;
  --bc-row-border: #e2e8f0;
  --bc-row-alt: #f8fafc;
  --bc-text: #333333;
  --bc-gray-btn: #88929b;
  --bc-gray-btn-hover: #737c84;
  --bc-chart-blue: #2b76d2;
  --bc-chart-green: #7ac143;
  --bc-chart-purple: #8b5cf6;
  --bc-chart-orange: #f97316;
  --bc-chart-teal: #14b8a6;
  --bc-chart-red: #ef4444;
  --bc-chart-yellow: #eab308;
  --bc-chart-cyan: #06b6d4;
  --bc-chart-pink: #ec4899;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--bc-text);
  background-color: #ffffff;
  font-size: 13px;
  line-height: 1.5;
}

.bc-page-container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 14px 16px 48px;
  box-sizing: border-box;
}

/* ==========================================================================
   Top Utility Bar & Breadcrumbs (Image 2)
   ========================================================================== */
.bc-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.bc-breadcrumbs {
  color: var(--bc-link-blue);
  font-size: 12px;
}

.bc-breadcrumbs a {
  color: var(--bc-link-blue);
  text-decoration: none;
}

.bc-breadcrumbs a:hover {
  text-decoration: underline;
}

.bc-breadcrumbs .sep {
  margin: 0 4px;
  color: #777777;
}

.bc-breadcrumbs .current {
  color: var(--bc-link-blue);
  font-weight: normal;
}

.bc-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bc-instant-link {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 2px 8px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.bc-instant-link:hover {
  background: #dcfce7;
  border-color: #86efac;
}

.bc-history-badge-btn {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 2px 8px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s ease;
}

.bc-history-badge-btn:hover {
  background: #f1f5f9;
}

.bc-print-link {
  color: var(--bc-link-blue);
  text-decoration: none;
  font-size: 12px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.bc-print-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Page Title & Introductory Text (Image 2)
   ========================================================================== */
.bc-page-title {
  color: #0f2d4a;
  font-size: 22px;
  font-weight: bold;
  margin: 6px 0 8px 0;
  line-height: 1.2;
}

.bc-intro-text {
  font-size: 13px;
  color: #333333;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

/* ==========================================================================
   Main Two-Column Layout (Image 2)
   ========================================================================== */
.bc-layout-grid {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.bc-main-col {
  flex: 1;
  min-width: 0;
}

.bc-sidebar {
  width: 230px;
  flex-shrink: 0;
}

/* ==========================================================================
   Budget Form & Tables (Exact Clone of Image 2)
   ========================================================================== */
.bc-table-container {
  border: 1px solid #bccad6;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 16px;
  background-color: #ffffff;
}

.bc-table-header-main {
  background-color: var(--bc-blue);
  color: #ffffff;
  font-weight: bold;
  font-size: 13px;
  padding: 7px 10px;
  letter-spacing: 0.2px;
}

.bc-table-header-sub {
  background-color: var(--bc-sub-header-bg);
  color: var(--bc-sub-header-text);
  font-weight: bold;
  font-size: 12px;
  padding: 6px 10px;
  border-top: 1px solid #bccad6;
  border-bottom: 1px solid #bccad6;
}

.bc-form-table {
  width: 100%;
  border-collapse: collapse;
}

.bc-form-table tr {
  border-bottom: 1px solid #edf2f7;
}

.bc-form-table tr:hover {
  background-color: #f8fafc;
}

.bc-form-table td {
  padding: 4px 8px;
  font-size: 12px;
  vertical-align: middle;
}

.bc-label-cell {
  width: 200px;
  color: #1f2937;
  font-size: 12px;
  font-weight: normal;
  white-space: nowrap;
}

.bc-input-cell {
  width: 180px;
  white-space: nowrap;
}

.bc-note-cell {
  font-size: 11px;
  color: #64748b;
  font-style: normal;
  padding-left: 6px;
}

.bc-currency-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bc-input-curr {
  width: 80px;
  height: 22px;
  padding: 1px 5px;
  font-size: 12px;
  font-family: inherit;
  border: 1px solid #7f9db9;
  border-radius: 2px;
  box-sizing: border-box;
  text-align: right;
  color: #111827;
}

.bc-input-curr:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb;
}

.bc-period-select {
  height: 22px;
  padding: 1px 4px;
  font-size: 11px;
  font-family: inherit;
  border: 1px solid #7f9db9;
  border-radius: 2px;
  background-color: #ffffff;
  color: #111827;
  box-sizing: border-box;
}

.bc-period-select:focus {
  outline: none;
  border-color: #2563eb;
}

.bc-slash {
  font-size: 12px;
  color: #555555;
  margin: 0 1px;
}

/* Action Buttons Row */
.bc-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 14px;
  background-color: #f1f5f9;
  border-top: 1px solid #bccad6;
}

.bc-calc-btn {
  background: linear-gradient(180deg, #4da446 0%, #357a2f 100%);
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  border: 1px solid #2b6b26;
  border-radius: 3px;
  padding: 4px 16px 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  transition: all 0.1s ease;
}

.bc-calc-btn:hover {
  background: linear-gradient(180deg, #57b850 0%, #3d8b37 100%);
}

.bc-calc-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.bc-clear-btn {
  background: linear-gradient(180deg, #a4b0ba 0%, #838e97 100%);
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  border: 1px solid #6b7780;
  border-radius: 3px;
  padding: 4px 14px 5px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  transition: all 0.1s ease;
}

.bc-clear-btn:hover {
  background: linear-gradient(180deg, #b0bcc6 0%, #8f9aa3 100%);
}

/* ==========================================================================
   Results & Visualizations Dashboard
   ========================================================================== */
.bc-results-panel {
  margin-top: 20px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  overflow: hidden;
}

.bc-results-header {
  background: #0f2d4a;
  color: #ffffff;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.bc-results-title {
  font-size: 15px;
  font-weight: bold;
}

.bc-timeframe-toggles {
  display: flex;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  padding: 2px;
}

.bc-time-toggle {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 2px;
  cursor: pointer;
}

.bc-time-toggle.active {
  background: #ffffff;
  color: #0f2d4a;
  font-weight: bold;
}

.bc-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  padding: 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.bc-metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 10px;
  text-align: center;
}

.bc-metric-label {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.bc-metric-val {
  font-size: 17px;
  font-weight: bold;
  color: #0f2d4a;
}

.bc-metric-val.surplus {
  color: #16a34a;
}

.bc-metric-val.deficit {
  color: #dc2626;
}

/* 50/30/20 Rule Box */
.bc-rule-box {
  padding: 14px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.bc-rule-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.bc-rule-title {
  font-weight: bold;
  font-size: 13px;
  color: #0f2d4a;
}

.bc-rule-progress-bar {
  display: flex;
  height: 20px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #e2e8f0;
}

.bc-rule-bar-needs {
  background: #2563eb;
  transition: width 0.3s ease;
}

.bc-rule-bar-wants {
  background: #f59e0b;
  transition: width 0.3s ease;
}

.bc-rule-bar-savings {
  background: #10b981;
  transition: width 0.3s ease;
}

.bc-rule-legend {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
}

.bc-rule-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* Charts Grid */
.bc-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.bc-chart-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 12px;
}

.bc-chart-title {
  font-size: 12px;
  font-weight: bold;
  color: #1e293b;
  margin-bottom: 8px;
  text-align: center;
}

.bc-pie-svg-wrap,
.bc-bar-svg-wrap {
  width: 100%;
  min-height: 220px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Category Table */
.bc-cat-table-wrap {
  padding: 14px;
}

.bc-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.bc-summary-table th {
  background: #f1f5f9;
  color: #334155;
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid #cbd5e1;
}

.bc-summary-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #f1f5f9;
}

.bc-summary-table tr:hover td {
  background: #f8fafc;
}

.bc-summary-table tr.total-row td {
  font-weight: bold;
  border-top: 2px solid #cbd5e1;
  border-bottom: 2px solid #cbd5e1;
  background: #f8fafc;
}

.bc-summary-table .num-col {
  text-align: right;
}

/* Results Actions */
.bc-results-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 14px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

/* ==========================================================================
   Fraction Arithmetic & Ratio Allocator Section (Requirement 1 & 5)
   ========================================================================== */
.bc-fraction-section {
  margin-top: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.bc-fraction-header {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.bc-fraction-title {
  font-size: 16px;
  font-weight: bold;
  color: #0f2d4a;
  margin: 0 0 4px 0;
}

.bc-fraction-desc {
  font-size: 12px;
  color: #64748b;
  margin: 0;
}

.bc-frac-solver-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px;
  background: #f8fafc;
  border-radius: 4px;
}

.bc-frac-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.bc-frac-input {
  width: 54px;
  height: 26px;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  border: 1px solid #94a3b8;
  border-radius: 3px;
}

.bc-frac-input:focus {
  outline: none;
  border-color: #2563eb;
}

.bc-frac-divider {
  width: 58px;
  height: 2px;
  background: #475569;
}

.bc-op-select {
  height: 32px;
  font-size: 18px;
  font-weight: bold;
  padding: 2px 8px;
  border: 1px solid #94a3b8;
  border-radius: 3px;
  background: #ffffff;
  color: #0f2d4a;
}

.bc-equals-sign {
  font-size: 20px;
  font-weight: bold;
  color: #475569;
}

.bc-frac-results-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.bc-frac-res-card {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 4px;
  padding: 8px;
  text-align: center;
}

.bc-frac-res-label {
  font-size: 11px;
  color: #166534;
  margin-bottom: 2px;
}

.bc-frac-res-val {
  font-size: 16px;
  font-weight: bold;
  color: #14532d;
}

/* Fraction Visualizers */
.bc-frac-vis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.bc-frac-vis-card {
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 10px;
}

.bc-vis-title {
  font-size: 11px;
  font-weight: bold;
  color: #475569;
  margin-bottom: 6px;
  text-align: center;
}

.bc-comp-bar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bc-comp-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.bc-comp-bar-label {
  width: 40px;
  text-align: right;
  font-weight: bold;
}

.bc-comp-bar-track {
  flex: 1;
  height: 12px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
}

.bc-comp-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.bc-numline-container {
  padding: 10px 4px 6px;
}

.bc-numline-axis {
  position: relative;
  height: 4px;
  background: #94a3b8;
  border-radius: 2px;
  margin-bottom: 18px;
}

.bc-numline-marker {
  position: absolute;
  top: -6px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: left 0.3s ease;
}

.bc-numline-dot {
  width: 14px;
  height: 14px;
  background: #2563eb;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.bc-numline-text {
  font-size: 10px;
  font-weight: bold;
  color: #1e3a8a;
  margin-top: 2px;
  white-space: nowrap;
}

/* Joint Budget Allocation Split Box */
.bc-split-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 12px;
}

.bc-split-title {
  font-size: 13px;
  font-weight: bold;
  color: #0f2d4a;
  margin: 0 0 4px 0;
}

.bc-split-desc {
  font-size: 11px;
  color: #64748b;
  margin: 0 0 10px 0;
}

.bc-split-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.bc-split-card {
  padding: 8px 10px;
  border-radius: 3px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
}

/* ==========================================================================
   Article & SEO / AEO / GEO Content (500+ words)
   ========================================================================== */
.bc-article-content {
  margin-top: 32px;
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
  color: #334155;
  line-height: 1.7;
}

.bc-article-content h2 {
  font-size: 18px;
  color: #0f2d4a;
  margin: 20px 0 10px;
}

.bc-article-content h3 {
  font-size: 15px;
  color: #0f2d4a;
  margin: 16px 0 8px;
}

.bc-article-content p {
  margin: 0 0 12px;
  font-size: 13px;
}

.bc-article-content ul,
.bc-article-content ol {
  margin: 0 0 14px 20px;
  padding: 0;
  font-size: 13px;
}

.bc-article-content li {
  margin-bottom: 6px;
}

.bc-faq-accordion {
  margin-top: 20px;
}

.bc-faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  margin-bottom: 8px;
  overflow: hidden;
}

.bc-faq-question {
  background: #f8fafc;
  padding: 10px 14px;
  font-weight: bold;
  font-size: 13px;
  color: #0f2d4a;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bc-faq-question:hover {
  background: #f1f5f9;
}

.bc-faq-answer {
  padding: 12px 14px;
  font-size: 12.5px;
  color: #475569;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  line-height: 1.6;
}

/* ==========================================================================
   Right Sidebar (Exact Clone of Image 2)
   ========================================================================== */
.bc-search-box {
  display: flex;
  position: relative;
  margin-bottom: 14px;
}

.bc-search-input {
  flex: 1;
  height: 24px;
  padding: 2px 6px;
  font-size: 12px;
  font-family: inherit;
  border: 1px solid #7f9db9;
  border-radius: 2px 0 0 2px;
  box-sizing: border-box;
}

.bc-search-input:focus {
  outline: none;
  border-color: #2563eb;
}

.bc-search-btn {
  background-color: var(--bc-blue);
  color: #ffffff;
  border: 1px solid var(--bc-blue);
  border-radius: 0 2px 2px 0;
  font-size: 12px;
  font-weight: bold;
  padding: 0 10px;
  height: 24px;
  cursor: pointer;
  box-sizing: border-box;
}

.bc-search-btn:hover {
  background-color: var(--bc-blue-hover);
}

.bc-search-dropdown {
  position: absolute;
  top: 26px;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #94a3b8;
  border-radius: 2px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  max-height: 250px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.bc-search-item {
  padding: 6px 10px;
  font-size: 12px;
  color: #1e293b;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bc-search-item:hover,
.bc-search-item.highlighted {
  background-color: #f1f5f9;
  color: #2563eb;
}

.bc-search-cat {
  font-size: 10px;
  color: #64748b;
  background: #e2e8f0;
  padding: 1px 4px;
  border-radius: 2px;
}

.bc-sidebar-card {
  border: 1px solid #bccad6;
  border-radius: 2px;
  overflow: hidden;
  background-color: #ffffff;
}

.bc-sidebar-card-header {
  background-color: var(--bc-blue);
  color: #ffffff;
  font-weight: bold;
  font-size: 12.5px;
  padding: 6px 10px;
}

.bc-sidebar-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px 10px;
  gap: 4px 12px;
}

.bc-sidebar-links-grid a {
  color: var(--bc-link-blue);
  text-decoration: none;
  font-size: 11.5px;
  line-height: 1.6;
}

.bc-sidebar-links-grid a:hover {
  text-decoration: underline;
}

.bc-sidebar-more-link {
  display: block;
  padding: 6px 10px;
  color: var(--bc-link-blue);
  text-decoration: none;
  font-size: 11.5px;
  border-top: 1px solid #edf2f7;
}

.bc-sidebar-more-link:hover {
  text-decoration: underline;
}

.bc-sidebar-card-footer {
  background-color: #edf2f7;
  padding: 6px 8px;
  font-size: 11px;
  color: #475569;
  border-top: 1px solid #bccad6;
  text-align: center;
}

.bc-sidebar-card-footer a {
  color: var(--bc-link-blue);
  text-decoration: none;
}

.bc-sidebar-card-footer a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Modals (Exact Clone of Image 1 & Features)
   ========================================================================== */
.bc-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.bc-modal-overlay.active {
  display: flex;
}

/* Instant Tool Modal (Image 1) */
.bc-modal-instant {
  width: 440px;
  max-width: 92vw;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  overflow: hidden;
  animation: bcModalFadeIn 0.15s ease-out;
}

@keyframes bcModalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.bc-modal-instant-header {
  background-color: var(--bc-dark-blue);
  color: #ffffff;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bc-modal-instant-title {
  font-size: 15px;
  font-weight: bold;
}

.bc-modal-instant-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.bc-modal-instant-body {
  padding: 16px 20px 20px;
}

.bc-instant-subtitle {
  font-size: 13px;
  color: #475569;
  margin: 0 0 14px 0;
}

.bc-instant-subtitle strong {
  color: #1e293b;
}

.bc-instant-form-group {
  margin-bottom: 12px;
}

.bc-instant-label {
  display: block;
  font-size: 12.5px;
  font-weight: bold;
  color: #334155;
  margin-bottom: 4px;
}

.bc-instant-input {
  width: 100%;
  height: 32px;
  padding: 4px 8px;
  font-size: 14px;
  border: 1px solid #7f9db9;
  border-radius: 3px;
  box-sizing: border-box;
}

.bc-instant-input:focus {
  outline: none;
  border-color: #204d74;
}

.bc-instant-compute-btn {
  width: 100%;
  background-color: var(--bc-dark-blue);
  color: #ffffff;
  border: none;
  border-radius: 3px;
  padding: 9px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 8px;
  transition: background-color 0.15s ease;
}

.bc-instant-compute-btn:hover {
  background-color: #183e60;
}

.bc-instant-res-box {
  margin-top: 14px;
  padding: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 4px;
  display: none;
}

/* Print & History Modals */
.bc-modal-container {
  width: 650px;
  max-width: 94vw;
  max-height: 88vh;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bc-modal-header {
  background: #0f2d4a;
  color: #ffffff;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 14px;
}

.bc-modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

.bc-modal-footer {
  padding: 10px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

/* Toast */
.bc-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  z-index: 10000;
  display: none;
  animation: bcToastSlide 0.2s ease-out;
}

@keyframes bcToastSlide {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 860px) {
  .bc-layout-grid {
    flex-direction: column;
  }
  .bc-sidebar {
    width: 100%;
  }
  .bc-charts-grid,
  .bc-frac-vis-grid {
    grid-template-columns: 1fr;
  }
  .bc-label-cell {
    width: auto;
  }
}

@media print {
  body * {
    visibility: hidden;
  }
  #bc-print-sheet-content,
  #bc-print-sheet-content * {
    visibility: visible;
  }
  #bc-print-sheet-content {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
}
