.budget-container {
  padding: 0.5rem;
  padding-bottom: 80px;
  max-width: 600px;
  margin: 0 auto;
}

/* Total Spending Section */
.total-spending-section {
  margin-bottom: 0.75rem;
}

/* Global Budget Card */
.global-budget-card {
  background: var(--white);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-left: 4px solid var(--primary-color);
}

.global-budget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.global-budget-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.global-budget-warning-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  background-color: rgba(220, 53, 69, 0.12);
  color: #c62828;
  text-transform: uppercase;
}

.global-budget-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.global-budget-main .budget-value-button {
  padding: 0.5rem 1rem;
  font-size: 1.25rem;
}

.global-budget-main .budget-value-button .amount-value {
  font-size: 1.25rem;
  font-weight: 700;
}

.global-budget-allocated {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.125rem;
}

.global-budget-allocated-label {
  font-size: 0.7rem;
  color: #6c757d;
  text-transform: uppercase;
}

.global-budget-allocated-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
}

.global-budget-allocated-value.text-negative {
  color: #c62828;
}

.total-spending-card {
  background: var(--white);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.budget-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.budget-summary-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-color);
}

.budget-summary-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.budget-summary-pill.is-over {
  background-color: rgba(220, 53, 69, 0.12);
  color: #c62828;
}

.budget-summary-pill.is-under {
  background-color: rgba(40, 167, 69, 0.12);
  color: #2e7d32;
}

.budget-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 520px) {
  .budget-summary-grid {
    grid-template-columns: 1fr;
  }
}

.budget-summary-metric {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 0.75rem;
}

.budget-summary-label {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 0.25rem;
}

.budget-summary-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
}

.text-positive {
  color: #2e7d32;
}

.text-negative {
  color: #c62828;
}

.budget-summary-status {
  font-size: 0.85rem;
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  line-height: 1.4;
}

.budget-summary-status--over {
  background-color: rgba(220, 53, 69, 0.08);
  color: #c62828;
}

.budget-summary-status--under {
  background-color: rgba(40, 167, 69, 0.08);
  color: #2e7d32;
}

/* Date Range Display */
.date-range-display {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.date-range-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
}

.date-range-value {
  font-size: 0.75rem;
  color: #1a1a1a;
  font-weight: 500;
}

/* Category Breakdown Section */
.category-breakdown-section {
  margin-bottom: 0.75rem;
}

.category-breakdown-section h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.5rem 0;
}

.category-table {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}

.category-table-header {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  font-size: 0.75rem;
  color: #6c757d;
  font-weight: 600;
  text-transform: uppercase;
}

.category-table-header span {
  flex: 1;
  text-align: right;
}

.category-table-header .header-label {
  text-align: left;
  flex: 1.4;
}

.category-row,
.subcategory-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
}

.category-row {
  cursor: pointer;
  transition: background-color 0.15s;
}

.category-row:hover {
  background-color: #f8f9fa;
}

.category-row:last-child {
  border-bottom: none;
}

.category-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.arrow {
  font-size: 0.625rem;
  color: #6c757d;
  width: 0.75rem;
  display: inline-block;
  text-align: center;
}

.arrow-placeholder {
  width: 0.75rem;
  display: inline-block;
}

.category-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1a1a1a;
}

.amount-group {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  justify-content: flex-end;
}

.amount-cell {
  text-align: right;
  min-width: 90px;
  flex: 1;
}

.amount-cell .amount-value {
  font-size: 0.8125rem;
  font-weight: 600;
}

.amount-cell--spent .amount-value {
  color: #212529;
}

.amount-cell--budget .amount-value {
  color: #0069d9;
}

.subcategory-row .amount-value {
  font-size: 0.75rem;
}

.budget-value-button {
  width: 100%;
  text-align: right;
  border: none;
  background: transparent;
  font-weight: 600;
  color: #0069d9;
  cursor: pointer;
  padding: 0;
}

.budget-value-button:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Subcategories */
.subcategory-rows {
  background-color: #f8f9fa;
  border-top: 1px solid #e0e0e0;
}

.subcategory-row {
  padding-left: 2rem;
}

.subcategory-row:last-child {
  border-bottom: 1px solid #f0f0f0;
}

.subcategory-cell {
  font-size: 0.75rem;
  color: #495057;
  flex: 1.4;
}

/* Modal */
.budget-allocation-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.budget-allocation-modal.is-visible {
  display: flex;
}

.budget-allocation-overlay {
  position: absolute;
  inset: 0;
}

.budget-allocation-panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  animation: modalFadeIn 0.2s ease;
  z-index: 1;
}

.budget-allocation-title {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.budget-allocation-form .form-group {
  margin-bottom: 1rem;
}

#budget-allocation-errors .budget-error {
  color: #d9534f;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.budget-error-actions {
  margin-top: 0.5rem;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ======================================
   BUDGET GAUGE STYLES
   ====================================== */
.budget-gauge-section {
  background: var(--white);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.budget-gauge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.budget-gauge-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color);
}

.budget-gauge-percentage {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

.budget-gauge-percentage.budget-gauge--healthy {
  background: rgba(40, 167, 69, 0.12);
  color: #2e7d32;
}

.budget-gauge-percentage.budget-gauge--warning {
  background: rgba(255, 152, 0, 0.12);
  color: #f57c00;
}

.budget-gauge-percentage.budget-gauge--over {
  background: rgba(220, 53, 69, 0.12);
  color: #c62828;
}

.budget-gauge-container {
  margin-top: 0.5rem;
}

.budget-gauge-track {
  height: 12px;
  background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 25%, #FFEB3B 50%, #FF9800 75%, #f44336 100%);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.budget-gauge-bar {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  background: #e0e0e0;
  transition: width 0.8s ease-out;
}

.budget-gauge-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  color: #6c757d;
}

/* ======================================
   BUDGET METRICS STYLES
   ====================================== */
.budget-metrics-section {
  margin-bottom: 0.75rem;
}

.budget-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.budget-metric-card {
  background: var(--white);
  border-radius: 10px;
  padding: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.budget-metric-card--wide {
  grid-column: span 2;
}

.budget-metric-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 0.25rem;
}

.budget-metric-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.125rem;
}

.budget-metric-sub {
  font-size: 0.7rem;
  color: #9e9e9e;
}

/* Comparison icons */
.comparison-icon {
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 0.25rem;
  vertical-align: middle;
}

.comparison-icon--increase {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 6px solid #c62828;
}

.comparison-icon--decrease {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #2e7d32;
}

/* ======================================
   CHART CONTAINER VARIANTS
   ====================================== */
.chart-container--doughnut {
  max-height: 280px;
  display: flex;
  justify-content: center;
  padding: 0.5rem;
}

.chart-container--doughnut canvas {
  max-height: 280px;
}

.chart-container--bar {
  min-height: 150px;
}

/* ======================================
   MOBILE RESPONSIVE
   ====================================== */
@media (max-width: 520px) {
  .budget-metrics-grid {
    grid-template-columns: 1fr;
  }

  .budget-metric-card--wide {
    grid-column: span 1;
  }

  .budget-gauge-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .budget-metric-value {
    font-size: 1.125rem;
  }
}

/* ======================================
   COMPACT BUDGET INFO TABLE STYLES
   ====================================== */
.budget-overview-section,
.budget-metrics-section {
  margin-bottom: 0.75rem;
}

.budget-overview-card,
.budget-metrics-card {
  background: var(--white);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.budget-overview-header,
.budget-metrics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.budget-overview-header h3,
.budget-metrics-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
}

.budget-overview-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.budget-overview-pill.is-over {
  background-color: rgba(220, 53, 69, 0.12);
  color: #c62828;
}

.budget-overview-pill.is-under {
  background-color: rgba(40, 167, 69, 0.12);
  color: #2e7d32;
}

/* Info Table (similar to receipts) */
.budget-info-table {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.budget-info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-color);
}

.budget-info-row:last-child {
  border-bottom: none;
}

.budget-info-row dt {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 400;
}

.budget-info-row dd {
  margin: 0;
  color: var(--text-color);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: right;
}

.budget-info-row dd.text-positive {
  color: #2e7d32;
}

.budget-info-row dd.text-negative {
  color: #c62828;
}

.budget-info-row dd.text-warning {
  color: #f57c00;
}

/* Budget Status Message */
.budget-overview-status {
  font-size: 0.85rem;
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  line-height: 1.4;
}

.budget-overview-status.budget-summary-status--over {
  background-color: rgba(220, 53, 69, 0.08);
  color: #c62828;
}

.budget-overview-status.budget-summary-status--under {
  background-color: rgba(40, 167, 69, 0.08);
  color: #2e7d32;
}

/* ======================================
   AI RECOMMENDATION STYLES
   ====================================== */

/* AI Button in Global Budget Card */
.global-budget-ai-action {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f0f0f0;
}

.btn-ai-recommend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 1rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, color-mix(in srgb, var(--primary-color) 80%, #000) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.btn-ai-recommend:hover {
  opacity: 0.9;
}

.btn-ai-recommend:active {
  transform: scale(0.98);
}

.btn-ai-recommend .icon-sparkle {
  flex-shrink: 0;
}

/* Recommendation Modal */
.budget-recommendation-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 2000;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.budget-recommendation-modal.is-visible {
  display: flex;
}

.budget-recommendation-overlay {
  position: absolute;
  inset: 0;
}

.budget-recommendation-panel {
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.3s ease;
  z-index: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.budget-recommendation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.budget-recommendation-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.budget-recommendation-header .btn-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  font-size: 1.25rem;
  color: #666;
  cursor: pointer;
  line-height: 1;
}

.budget-recommendation-header .btn-close:hover {
  background: #e0e0e0;
}

#budget-recommendation-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

/* Recommendation Form */
.recommendation-form-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.recommendation-description {
  font-size: 0.875rem;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

.recommendation-form .form-group {
  margin-bottom: 1rem;
}

.recommendation-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 0.5rem;
}

.recommendation-form .btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Preview Panel */
.recommendation-preview {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.recommendation-summary {
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 3px solid var(--primary-color);
}

.recommendation-summary p {
  margin: 0;
  font-size: 0.875rem;
  color: #333;
  line-height: 1.5;
}

.recommendation-budget-total {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: #666;
}

.recommendation-budget-total strong {
  color: var(--primary-color);
}

.recommendation-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.recommendation-category {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 0.75rem;
}

.recommendation-category .category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.recommendation-category .category-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
}

.recommendation-category .category-amount {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.recommendation-category .category-amount .amount-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-color);
}

.recommendation-category .category-amount .percentage {
  font-size: 0.75rem;
  color: #999;
}

.recommendation-category .category-reasoning {
  font-size: 0.75rem;
  color: #666;
  margin: 0.25rem 0 0 0;
  font-style: italic;
}

.recommendation-category .subcategory-list {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #e0e0e0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.recommendation-subcategory {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0.5rem;
  background: #f8f9fa;
  border-radius: 4px;
}

.recommendation-subcategory .subcategory-label {
  font-size: 0.75rem;
  color: #555;
}

.recommendation-subcategory .subcategory-amount {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.recommendation-subcategory .subcategory-amount .amount-value {
  font-size: 0.75rem;
  font-weight: 500;
  color: #333;
}

.recommendation-subcategory .subcategory-amount .percentage {
  font-size: 0.625rem;
  color: #999;
}

.recommendation-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
}

.recommendation-actions .btn {
  flex: 1;
}

/* Error State */
.recommendation-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 1rem;
  text-align: center;
}

.recommendation-error .error-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(220, 53, 69, 0.1);
  border-radius: 50%;
  color: #c62828;
}

.recommendation-error .error-message {
  font-size: 0.875rem;
  color: #666;
  margin: 0;
}

/* Loading State */
.recommendation-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 1rem;
}

.recommendation-loading p {
  font-size: 0.875rem;
  color: #666;
  margin: 0;
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e0e0e0;
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.recommendation-loading .spinner {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Desktop Styles */
@media (min-width: 768px) {
  .budget-recommendation-modal {
    align-items: center;
    padding: 1rem;
  }

  .budget-recommendation-panel {
    border-radius: 16px;
    max-height: 80vh;
  }

  @keyframes slideUp {
    from {
      opacity: 0;
      transform: scale(0.95);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }
}

/* ======================================
   RECOMMENDATION PAGE STYLES
   ====================================== */

.recommendation-page {
  padding-bottom: calc(100px + var(--nav-height));
}

.recommendation-container {
  padding: 0 0.5rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Summary Card */
.recommendation-summary-card {
  background: var(--white);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-left: 4px solid var(--primary-color);
}

.summary-header {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.summary-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, color-mix(in srgb, var(--primary-color) 80%, #000) 100%);
  border-radius: 10px;
  color: white;
  flex-shrink: 0;
}

.summary-text h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0 0 0.25rem 0;
}

.summary-description {
  font-size: 0.875rem;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

.summary-meta {
  padding: 0.5rem 0;
}

.summary-meta .generated-at {
  font-size: 0.75rem;
  color: #999;
}

.summary-budget {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
}

.summary-budget .budget-label {
  font-size: 0.8125rem;
  color: #666;
  font-weight: 500;
}

.summary-budget .budget-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Categories Section */
.recommendation-categories-section {
  margin-bottom: 1rem;
}

.recommendation-categories-section h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0 0 0.75rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.recommendation-categories-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.recommendation-category-card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8e8e8;
}

.category-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.875rem 1rem;
  gap: 1rem;
}

.category-info {
  flex: 1;
  min-width: 0;
}

.category-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-color);
  display: block;
}

.category-reason {
  font-size: 0.75rem;
  color: #888;
  margin: 0.25rem 0 0 0;
  font-style: italic;
  line-height: 1.4;
}

.category-allocation {
  text-align: right;
  flex-shrink: 0;
}

.allocation-amount {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--primary-color);
  display: block;
}

.allocation-percentage {
  font-size: 0.75rem;
  color: #999;
}

/* Subcategories (Recommendation Page) */
.subcategories-section {
  background: #f8f9fa;
  border-top: 1px solid #e8e8e8;
  padding: 0.5rem 1rem 0.5rem 1.5rem;
}

.subcategories-section .subcategory-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.375rem 0;
}

.subcategories-section .subcategory-row:not(:last-child) {
  border-bottom: 1px dashed #e0e0e0;
}

.subcategories-section .subcategory-name {
  font-size: 0.8125rem;
  color: #555;
}

.subcategories-section .subcategory-allocation {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.subcategories-section .subcategory-amount {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #333;
}

.subcategories-section .subcategory-percentage {
  font-size: 0.6875rem;
  color: #999;
}

/* Actions Section */
.recommendation-actions-section {
  position: fixed;
  bottom: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--white);
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.recommendation-actions-section .btn {
  flex: 1;
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
}

.recommendation-actions-section .btn-secondary {
  background: #f0f0f0;
  color: #333;
  border: none;
}

.recommendation-actions-section .btn-primary {
  background: var(--primary-color);
  color: white;
  border: none;
}

@media (min-width: 600px) {
  .recommendation-actions-section {
    position: static;
    box-shadow: none;
    padding: 1rem 0;
    background: transparent;
  }

  .recommendation-page {
    padding-bottom: 1rem;
  }
}

/* Pending State */
.recommendation-pending-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.pending-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-large {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

.pending-text {
  max-width: 280px;
}

.pending-text h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0 0 0.5rem 0;
}

.pending-text p {
  font-size: 0.875rem;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

.pending-budget {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
  width: 100%;
}

.pending-budget .budget-label {
  font-size: 0.75rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pending-budget .budget-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}
