@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg-primary: #faf9f7;
  --bg-secondary: #ffffff;
  --bg-warm: #f5f0eb;
  --text-primary: #2d3436;
  --text-secondary: #636e72;
  --text-muted: #a0a8ab;
  --accent-blue: #6c9eb4;
  --accent-blue-light: #e8f2f6;
  --accent-green: #7fb069;
  --accent-green-light: #eef6eb;
  --accent-coral: #e07a5f;
  --accent-coral-light: #fdf0ed;
  --accent-amber: #dda15e;
  --accent-amber-light: #fdf6ed;
  --border-light: #e8e4e0;
  --shadow-soft: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-medium: 0 4px 16px rgba(0,0,0,0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Nunito', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  padding: 32px 24px;
  line-height: 1.5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 32px;
}

.header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.header p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* Cards */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-soft);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Friendly Alerts */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.alert-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}

.alert-text {
  font-size: 14px;
  line-height: 1.5;
}

.alert-info {
  background: var(--accent-blue-light);
  border: 1px solid var(--accent-blue);
}

.alert-info .alert-title {
  color: #4a7c91;
}

.alert-info .alert-text {
  color: #5a8a9e;
}

.alert-warning {
  background: var(--accent-amber-light);
  border: 1px solid var(--accent-amber);
}

.alert-warning .alert-title {
  color: #a67c3d;
}

.alert-warning .alert-text {
  color: #b8894a;
}

.alert-danger {
  background: var(--accent-coral-light);
  border: 2px solid var(--accent-coral);
}

.alert-danger .alert-title {
  color: #c4604a;
}

.alert-danger .alert-text {
  color: #d47460;
}

.alert-success {
  background: var(--accent-green-light);
  border: 1px solid var(--accent-green);
}

.alert-success .alert-title {
  color: #5a8f4a;
}

.alert-success .alert-text {
  color: #6a9c5a;
}

.alert-purple {
  background: #f3e8ff;
  border: 2px solid #9333ea;
}

.alert-purple .alert-title {
  color: #7c3aed;
}

.alert-purple .alert-text {
  color: #8b5cf6;
}

/* Data Banner */
.data-banner {
  background: linear-gradient(135deg, var(--bg-warm) 0%, #f0ebe5 100%);
  border: 1px solid #e0d8cf;
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Data Warning Banner */
.data-warning-banner {
  background: linear-gradient(135deg, var(--accent-amber-light) 0%, #fef3e8 100%);
  border: 2px solid var(--accent-amber);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 4px 12px rgba(221, 161, 94, 0.15);
}

.data-banner-icon {
  font-size: 28px;
}

.data-banner-text {
  flex: 1;
  min-width: 200px;
}

.data-banner-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 14px;
}

.data-banner-desc {
  color: var(--text-secondary);
  font-size: 13px;
}

.data-banner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Setup Welcome */
.setup-welcome {
  background: linear-gradient(135deg, var(--accent-blue-light) 0%, #dceef4 100%);
  border: 2px solid var(--accent-blue);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 24px;
  text-align: center;
}

.setup-welcome-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.setup-welcome h2 {
  font-size: 22px;
  font-weight: 700;
  color: #4a7c91;
  margin-bottom: 8px;
}

.setup-welcome p {
  color: #5a8a9e;
  margin-bottom: 20px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.setup-steps {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.setup-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.setup-step-num {
  width: 32px;
  height: 32px;
  background: var(--accent-blue);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.setup-step-text {
  font-size: 13px;
  color: #5a8a9e;
  font-weight: 600;
}

/* Cash Reminder */
.cash-reminder {
  background: var(--accent-amber-light);
  border: 1px solid var(--accent-amber);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cash-reminder-icon {
  font-size: 22px;
}

.cash-reminder-text {
  color: #a67c3d;
  font-size: 14px;
  font-weight: 600;
}

/* Export Reminder */
.export-reminder {
  background: linear-gradient(135deg, var(--accent-blue-light) 0%, #dceef4 100%);
  border: 1px solid var(--accent-blue);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.export-reminder-icon {
  font-size: 20px;
}

.export-reminder-text {
  flex: 1;
  color: #4a7c91;
  font-size: 13px;
  font-weight: 600;
  min-width: 200px;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-size: 14px;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent-blue);
  color: white;
}

.btn-primary:hover {
  background: #5a8da3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 158, 180, 0.3);
}

.btn-secondary {
  background: var(--bg-warm);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: #ebe5df;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Action buttons group - compact inline style */
.action-buttons {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.btn-action {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  font-family: inherit;
  white-space: nowrap;
}

.btn-action-secondary {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-light);
}

.btn-action-secondary:hover {
  background: var(--bg-warm);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.btn-action-danger {
  background: transparent;
  color: var(--accent-coral);
  border-color: var(--accent-coral);
}

.btn-action-danger:hover {
  background: var(--accent-coral-light);
}

.btn-danger {
  background: var(--accent-coral-light);
  color: var(--accent-coral);
  border: 1px solid var(--accent-coral);
}

.btn-danger:hover {
  background: #f9e4df;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Inputs */
.input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(108, 158, 180, 0.15);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.input-highlight .input {
  border: 2px solid var(--accent-blue) !important;
  background: var(--accent-blue-light);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

/* Metrics */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.metrics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.metrics-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.metrics-timeframe {
  display: flex;
  align-items: center;
  gap: 10px;
}

.metrics-timeframe-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.metrics-timeframe select {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.metrics-timeframe select:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.custom-date-range {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.custom-date-range input {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 12px;
  font-family: inherit;
  width: 130px;
}

.custom-date-range input:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.custom-date-range span {
  color: var(--text-muted);
  font-size: 12px;
}

.metric-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.metric-card.highlight {
  background: var(--accent-blue-light);
  border-color: var(--accent-blue);
}

.metric-label {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 6px;
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--text-primary);
}

.metric-sub {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
}

.positive {
  color: var(--accent-green);
}

.negative {
  color: var(--accent-coral);
}

.warning {
  color: var(--accent-amber);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-warm);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.tab {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 14px;
}

.tab:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.5);
}

.tab.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: var(--shadow-soft);
}

/* View Toggle */
.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-warm);
  padding: 3px;
  border-radius: var(--radius-sm);
}

.view-toggle-btn {
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.view-toggle-btn.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: var(--shadow-soft);
}

.view-toggle-btn:hover:not(.active) {
  color: var(--text-primary);
}

/* Chart */
.chart-container {
  height: 200px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  position: relative;
  border: 1px solid var(--border-light);
}

.chart-scale {
  position: absolute;
  left: 8px;
  top: 16px;
  bottom: 16px;
  width: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
  padding-right: 8px;
}

.chart-svg-container {
  position: absolute;
  left: 70px;
  right: 16px;
  top: 16px;
  bottom: 16px;
}

.chart-tooltip {
  position: absolute;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  pointer-events: none;
  z-index: 100;
  display: none;
  box-shadow: var(--shadow-medium);
}

.chart-tooltip-date {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.chart-tooltip-balance {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 18px;
  font-weight: 700;
}

/* Entries */
.entry-header {
  display: grid;
  grid-template-columns: 40px 90px 1fr 90px 90px 100px 150px;
  align-items: center;
  padding: 10px 16px;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 8px;
}

.entry-row {
  display: grid;
  grid-template-columns: 40px 90px 1fr 90px 90px 100px 150px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  gap: 12px;
  transition: background 0.15s;
}

.entry-row:hover {
  background: var(--bg-warm);
}

.entry-row.selected {
  background: var(--accent-blue-light);
  border: 1px solid var(--accent-blue);
}

.entry-date {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--text-secondary);
}

.entry-desc {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-weight: 500;
}

.entry-badge {
  padding: 3px 8px;
  background: var(--accent-blue-light);
  border-radius: 4px;
  font-size: 10px;
  color: var(--accent-blue);
  text-transform: uppercase;
  font-weight: 700;
}

.entry-badge.end-condition {
  background: #f3e8ff;
  color: #9333ea;
}

.entry-type {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  text-align: center;
}

.entry-type.revenue {
  background: var(--accent-green-light);
  color: var(--accent-green);
}

.entry-type.expense {
  background: var(--accent-coral-light);
  color: var(--accent-coral);
}

.entry-type.loc_draw {
  background: #e8e0f0;
  color: #7c3aed;
}

.entry-type.loc_paydown {
  background: #dbeafe;
  color: #2563eb;
}

.forecast-entry.loc_draw {
  background: #e8e0f0;
}

.forecast-entry.loc_paydown {
  background: #dbeafe;
}

.entry-amount {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  text-align: right;
}

/* Checkbox */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-light);
  border-radius: 5px;
  background: var(--bg-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.checkbox:hover {
  border-color: var(--accent-blue);
}

.checkbox.checked {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

.checkbox.checked::after {
  content: '\2713';
  color: white;
  font-size: 12px;
  font-weight: bold;
}

/* Batch Actions */
.batch-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--accent-coral-light);
  border: 1px solid var(--accent-coral);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.batch-actions-text {
  color: var(--accent-coral);
  font-size: 14px;
  font-weight: 600;
}

/* Form */
.add-form {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border-light);
}

.add-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.add-form-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
}

.end-condition-row {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* Forecast Header */
.forecast-header {
  display: grid;
  grid-template-columns: 90px 1fr 100px 120px;
  align-items: center;
  padding: 10px 16px;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-warm);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Forecast Row */
.forecast-row {
  display: grid;
  grid-template-columns: 90px 1fr 100px 120px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  gap: 12px;
}

.forecast-row:hover {
  background: var(--bg-warm);
}

.forecast-entries {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.forecast-entry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.forecast-entry.revenue {
  background: var(--accent-green-light);
}

.forecast-entry.expense {
  background: var(--accent-coral-light);
}

/* Table View */
.table-view {
  overflow-x: auto;
}

.cf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.cf-table th {
  text-align: left;
  padding: 14px 16px;
  background: var(--bg-warm);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-light);
}

.cf-table th:not(:first-child) {
  text-align: right;
}

.cf-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
}

.cf-table td:not(:first-child) {
  text-align: right;
  font-family: 'IBM Plex Mono', monospace;
}

.cf-table tr:hover td {
  background: var(--bg-warm);
}

.cf-table .row-label {
  color: var(--text-secondary);
}

.cf-table .row-label.indent {
  padding-left: 32px;
}

.cf-table .row-total {
  font-weight: 700;
}

/* Checklist */
.checklist-item {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.checklist-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
  font-size: 14px;
  font-weight: 700;
}

.info-box {
  margin-top: 24px;
  padding: 20px;
  background: var(--bg-warm);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent-blue);
}

.info-box-title {
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent-blue);
}

.info-box-text {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 14px;
}

/* Modal */
.confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.confirm-dialog {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.confirm-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--accent-coral);
}

.confirm-message {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

.confirm-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.cleanup-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.cleanup-dialog {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 550px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.cleanup-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.cleanup-subtitle {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 14px;
}

.cleanup-section {
  margin-bottom: 20px;
}

.cleanup-section-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cleanup-count {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
}

.cleanup-list {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 13px;
  max-height: 150px;
  overflow-y: auto;
}

.cleanup-item {
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.cleanup-item:last-child {
  border-bottom: none;
}

.cleanup-item-name {
  color: var(--text-primary);
}

.cleanup-item-detail {
  color: var(--text-muted);
  font-size: 12px;
}

.cleanup-empty {
  color: var(--text-muted);
  font-style: italic;
  padding: 8px 0;
}

.cleanup-summary {
  background: var(--accent-amber-light);
  border: 1px solid var(--accent-amber);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #a67c3d;
}

/* Pagination Controls */
.pagination-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin-top: 16px;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-info {
  color: var(--text-secondary);
  font-size: 13px;
}

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

.pagination-select {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.pagination-select:focus {
  outline: none;
  border-color: var(--accent-blue);
}

/* Data Cleanup Section */
.data-cleanup-section {
  margin-top: 32px;
  background: var(--bg-warm);
}

.cleanup-info {
  margin-bottom: 20px;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 14px;
}

.cleanup-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.scroll-container {
  max-height: 500px;
  overflow-y: auto;
}

input[type="file"] {
  display: none;
}

/* Responsive Design */
@media (max-width: 900px) {
  .entry-row,
  .entry-header {
    grid-template-columns: 40px 1fr 1fr;
    gap: 8px;
  }

  .entry-header {
    display: none;
  }

  .forecast-header {
    display: none;
  }

  .forecast-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .setup-steps {
    gap: 16px;
  }

  .tabs {
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  body {
    padding: 16px;
  }

  .entry-row {
    grid-template-columns: 30px 1fr;
  }

  .data-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .setup-welcome {
    padding: 20px;
  }
}

/* ==================== CALCULATED ENTRIES ==================== */

/* Amount Type Toggle */
.amount-type-toggle {
  display: flex;
  gap: 16px;
  margin-top: 4px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
}

.radio-label input[type="radio"] {
  cursor: pointer;
  accent-color: var(--accent-blue);
}

.radio-label span {
  font-weight: 500;
}

/* Calculation Settings Panel */
.calculation-settings {
  background: var(--accent-blue-light);
  border: 1px solid var(--accent-blue);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 16px;
}

.calculation-settings-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.calculation-settings-title::before {
  content: "📊";
}

.calc-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.calc-value-input {
  width: 80px !important;
  flex-shrink: 0;
}

.offset-label {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Source Items Selection */
.source-selection-group {
  margin-top: 16px;
}

.source-selection-group > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.source-search-input {
  width: 100%;
  margin-bottom: 8px;
  padding: 8px 12px;
  font-size: 13px;
}

.source-items-list {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
}

.source-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.source-item:hover {
  background: var(--bg-warm);
}

.source-item.selected {
  background: var(--accent-blue-light);
}

.source-item-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-light);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.source-item.selected .source-item-checkbox {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

.source-item.selected .source-item-checkbox::after {
  content: "✓";
  color: white;
  font-size: 12px;
  font-weight: bold;
}

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

.source-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-item-details {
  font-size: 12px;
  color: var(--text-secondary);
}

.source-item-amount {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.no-source-items {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Calculated Entry Indicator in Entry List */
.calc-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--accent-blue);
  background: var(--accent-blue-light);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
}

.calc-indicator-icon {
  font-size: 10px;
}

/* Orphaned Source Warning */
.orphaned-warning {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--accent-coral);
  background: var(--accent-coral-light);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
}

/* Fix broken link button */
.fix-link-btn {
  font-size: 11px;
  color: var(--accent-coral);
  padding: 0 4px;
  margin-left: 4px;
  text-decoration: underline;
  cursor: pointer;
}

/* Entry row for calculated items - grouped display */
.entry-row.calculated-child {
  margin-left: 24px;
  border-left: 2px solid var(--accent-blue-light);
  padding-left: 12px;
}

.entry-row.calculated-child::before {
  content: "↳";
  position: absolute;
  left: -20px;
  color: var(--accent-blue);
  font-size: 14px;
}

/* Display Mode Toggle */
.entry-display-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.entry-display-toggle select {
  padding: 4px 8px;
  font-size: 12px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
}

/* Manual Override Section */
.manual-override-section {
  margin-top: 16px;
  padding-top: 16px;
}

.override-divider {
  height: 1px;
  background: var(--accent-blue);
  opacity: 0.3;
  margin-bottom: 16px;
}

.override-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.override-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.override-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent-blue);
}

.calculated-preview {
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
}

.calculated-preview strong {
  color: var(--accent-blue);
  font-weight: 600;
}

#overrideAmountGroup {
  margin-top: 12px;
}

/* Override indicator in entry list */
.override-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--accent-amber);
  background: var(--accent-amber-light);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 4px;
}

/* Title actions layout */
.title-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Grouped entry display */
.entry-group {
  margin-bottom: 8px;
}

.entry-group-children {
  margin-left: 20px;
  border-left: 2px solid var(--accent-blue-light);
  padding-left: 12px;
}

.entry-row.child-entry {
  position: relative;
  margin-left: 20px;
  background: linear-gradient(to right, var(--accent-blue-light) 0%, transparent 4px);
  border-left: 2px solid var(--accent-blue);
}

.entry-row.child-entry::before {
  content: "↳";
  position: absolute;
  left: 6px;
  color: var(--accent-blue);
  font-size: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: bold;
}

/* Input help text */
.input-help {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.4;
  font-style: italic;
}

/* LOC Interest Settings */
.loc-interest-settings {
  background: var(--accent-amber-light);
  border: 1px solid var(--accent-amber);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 16px;
}

.loc-interest-settings .input-group {
  margin-bottom: 12px;
}

.loc-interest-settings .input-group:last-child {
  margin-bottom: 0;
}

/* ==================== HELP SECTION ==================== */

.help-content {
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.7;
}

.help-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  text-align: center;
}

.help-section {
  margin-bottom: 48px;
}

.help-section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-blue);
}

.help-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 24px 0 12px 0;
}

.help-section p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 15px;
}

.help-section ul,
.help-section ol {
  margin-left: 24px;
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 15px;
}

.help-section li {
  margin-bottom: 8px;
}

.help-section strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Help Callouts */
.help-callout {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin: 20px 0;
  border-left: 4px solid;
}

.help-callout-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.help-callout-content {
  flex: 1;
  font-size: 14px;
  line-height: 1.6;
}

.help-callout-info {
  background: var(--accent-blue-light);
  border-left-color: var(--accent-blue);
  color: #4a7c91;
}

.help-callout-tip {
  background: var(--accent-green-light);
  border-left-color: var(--accent-green);
  color: #5a8f4a;
}

.help-callout-warning {
  background: var(--accent-coral-light);
  border-left-color: var(--accent-coral);
  color: #c4604a;
}

.help-callout-success {
  background: var(--accent-green-light);
  border-left-color: var(--accent-green);
  color: #5a8f4a;
}

/* Screenshot Placeholders */
.help-screenshot-placeholder {
  background: var(--bg-warm);
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 20px 0;
  text-align: center;
}

.help-screenshot-label {
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-blue);
  margin-bottom: 8px;
}

.help-screenshot-desc {
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
}

/* Help Steps */
.help-steps {
  margin: 20px 0;
}

.help-step {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  align-items: flex-start;
}

.help-step-number {
  width: 32px;
  height: 32px;
  background: var(--accent-blue);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.help-step-content {
  flex: 1;
  color: var(--text-secondary);
  font-size: 15px;
  padding-top: 4px;
}

.help-step-content ul {
  margin-top: 8px;
  margin-left: 20px;
}

.help-step-content li {
  margin-bottom: 4px;
}

/* Metric List */
.help-metric-list {
  background: var(--bg-warm);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 16px 0;
}

.help-metric {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 15px;
}

.help-metric:last-child {
  border-bottom: none;
}

.help-metric strong {
  color: var(--accent-blue);
  font-weight: 600;
}

/* Best Practices */
.help-best-practice {
  background: var(--bg-warm);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.help-best-practice h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--accent-blue);
  font-size: 18px;
}

.help-best-practice p {
  margin-bottom: 12px;
}

.help-example {
  background: var(--accent-blue-light);
  border-left: 3px solid var(--accent-blue);
  padding: 12px 16px;
  margin-top: 12px;
  border-radius: 6px;
  font-size: 14px;
  color: #4a7c91;
}

.help-example strong {
  color: var(--accent-blue);
}

/* Example Box */
.help-example-box {
  background: var(--accent-amber-light);
  border: 2px solid var(--accent-amber);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 24px 0;
}

.help-example-box h3 {
  margin-top: 0;
  color: var(--accent-amber);
}

.help-example-box p {
  margin-bottom: 12px;
}

.help-example-box ul,
.help-example-box ol {
  margin-left: 24px;
  margin-bottom: 12px;
}

.help-example-box li {
  margin-bottom: 6px;
}

/* FAQ */
.help-faq {
  margin: 20px 0;
}

.help-faq-item {
  background: var(--bg-warm);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 16px;
}

.help-faq-q {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  font-size: 15px;
}

.help-faq-a {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.help-faq-a ul {
  margin-top: 8px;
  margin-left: 20px;
}

.help-faq-a li {
  margin-bottom: 4px;
}

/* Sync filter label styling */
.sync-filter-label {
  user-select: none;
}

/* ==================== SCENARIO PLANNING ==================== */

/* Scenario Selector */
.scenario-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.scenario-selector.scenario-alt-active {
  background: linear-gradient(135deg, #f3e8ff 0%, #ede4ff 100%);
  border-color: #9333ea;
}

.scenario-selector-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.scenario-icon {
  font-size: 18px;
}

.scenario-selector select {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  min-width: 180px;
}

.scenario-selector select:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.scenario-new-btn,
.scenario-edit-btn {
  font-weight: 600;
}

/* Scenario Warning Banner */
.scenario-warning-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #f3e8ff 0%, #ede4ff 100%);
  border: 2px solid #9333ea;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.scenario-banner-icon {
  font-size: 24px;
}

.scenario-banner-content {
  flex: 1;
  min-width: 200px;
}

.scenario-banner-title {
  font-weight: 700;
  font-size: 14px;
  color: #7c3aed;
  margin-bottom: 2px;
}

.scenario-banner-desc {
  font-size: 13px;
  color: #8b5cf6;
}

.scenario-banner-name {
  color: #7c3aed;
}

/* Scenario Modal */
.scenario-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.scenario-dialog {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.scenario-dialog-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.scenario-dialog-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Scenario Options (radio buttons) */
.scenario-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.scenario-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
}

.scenario-option:hover {
  border-color: var(--accent-blue);
  background: var(--bg-primary);
}

.scenario-option.selected {
  border-color: var(--accent-blue);
  background: var(--accent-blue-light);
}

.scenario-option-radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-light);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.15s ease;
  position: relative;
}

.scenario-option.selected .scenario-option-radio {
  border-color: var(--accent-blue);
  background: var(--accent-blue);
}

.scenario-option.selected .scenario-option-radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

.scenario-option-content {
  flex: 1;
}

.scenario-option-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.scenario-option-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.scenario-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--accent-amber-light);
  border: 1px solid var(--accent-amber);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 13px;
  color: #a67c3d;
}

.scenario-warning-icon {
  font-size: 16px;
}

.scenario-edit-actions {
  padding: 16px 0;
  margin-bottom: 16px;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

/* Dashboard Scenario Indicator */
.metrics-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-scenario-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: linear-gradient(135deg, #f3e8ff 0%, #ede4ff 100%);
  border: 1px solid #9333ea;
  border-radius: 20px;
  font-size: 12px;
  color: #7c3aed;
  font-weight: 600;
}

.dashboard-scenario-icon {
  font-size: 14px;
}

.dashboard-scenario-text strong {
  color: #7c3aed;
}

/* Responsive help section */
@media (max-width: 768px) {
  .help-title {
    font-size: 24px;
  }

  .help-section-title {
    font-size: 20px;
  }

  .help-section h3 {
    font-size: 16px;
  }

  .help-screenshot-placeholder {
    padding: 16px;
  }

  .help-best-practice {
    padding: 16px;
  }

  .help-example-box {
    padding: 16px;
  }
}

/* ==================== SPREADSHEET IMPORT/EXPORT ==================== */

/* Spreadsheet Section */
.spreadsheet-section {
  margin-top: 24px;
  background: var(--bg-secondary);
}

.spreadsheet-info {
  margin-bottom: 20px;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 14px;
}

.spreadsheet-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Modal Base Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content.modal-large {
  max-width: 700px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-warm);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Export Modal Styles */
.export-warning {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--accent-amber-light);
  border: 1px solid var(--accent-amber);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.export-warning .warning-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.export-warning .warning-text {
  font-size: 13px;
  color: #a67c3d;
  line-height: 1.5;
}

.export-preview {
  margin-top: 20px;
  background: var(--bg-warm);
  border-radius: var(--radius-md);
  padding: 16px;
}

.preview-header {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.preview-stats {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.preview-stats .stat-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
}

.preview-stats .stat-row:last-child {
  border-bottom: none;
}

.preview-stats .stat-label {
  color: var(--text-secondary);
}

.preview-stats .stat-value {
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'IBM Plex Mono', monospace;
}

/* Import Modal Styles */
.import-step {
  margin-bottom: 24px;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.step-number {
  width: 28px;
  height: 28px;
  background: var(--accent-blue);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.step-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
}

/* File Drop Zone */
.file-drop-zone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-md);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.file-drop-zone:hover,
.file-drop-zone.drag-over {
  border-color: var(--accent-blue);
  background: var(--accent-blue-light);
}

.drop-zone-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.drop-zone-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.drop-zone-hint {
  font-size: 13px;
  color: var(--text-muted);
}

.selected-file {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--accent-green-light);
  border: 1px solid var(--accent-green);
  border-radius: var(--radius-md);
}

.selected-file-icon {
  font-size: 20px;
}

.selected-file-name {
  flex: 1;
  font-weight: 600;
  color: var(--text-primary);
}

.selected-file-remove {
  background: none;
  border: none;
  color: var(--accent-coral);
  cursor: pointer;
  font-size: 18px;
}

/* Column Mapping */
.mapping-info {
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.column-mapping {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.mapping-item {
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.mapping-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.mapping-label.required::after {
  content: " *";
  color: var(--accent-coral);
}

.mapping-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
}

.mapping-select:focus {
  outline: none;
  border-color: var(--accent-blue);
}

/* Data Preview Table */
.data-preview {
  margin-top: 20px;
}

.preview-table-container {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.preview-table th {
  background: var(--bg-warm);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.preview-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-table tr:last-child td {
  border-bottom: none;
}

.preview-table tr:hover td {
  background: var(--bg-warm);
}

/* Import Summary */
.import-summary {
  margin-top: 20px;
  background: var(--bg-warm);
  border-radius: var(--radius-md);
  padding: 16px;
}

.import-summary-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.import-summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.summary-stat {
  text-align: center;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.summary-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-blue);
  font-family: 'IBM Plex Mono', monospace;
}

.summary-stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Duplicate Warning */
.duplicate-warning {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--accent-coral-light);
  border: 1px solid var(--accent-coral);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.duplicate-warning .warning-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.duplicate-warning .warning-text {
  font-size: 14px;
  color: #c4604a;
  line-height: 1.5;
}

.duplicate-list {
  max-height: 200px;
  overflow-y: auto;
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.duplicate-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.duplicate-item:last-child {
  border-bottom: none;
}

.duplicate-item-name {
  color: var(--text-primary);
  font-weight: 500;
}

.duplicate-item-date {
  color: var(--text-secondary);
}

/* Responsive Modal */
@media (max-width: 600px) {
  .modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .modal-content.modal-large {
    max-width: 95%;
  }

  .column-mapping {
    grid-template-columns: 1fr;
  }

  .import-summary-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
