* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', 'Segoe UI', sans-serif;
}

:root {
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-light: #6ee7b7;
  --primary-bg: #f0fdf4;
  --secondary: #22c55e;
  --accent: #0ea5e9;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #111827;
  --light: #f9fafb;
  --gray: #6b7280;
  --gray-light: #e5e7eb;
  --gray-dark: #4b5563;
  --input-bg: #ffffff;
  --card-bg: #ffffff;
}

body {
  background-color: #f1f5f9;
  min-height: 100vh;
  padding: 30px;
  margin: 0;
}

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

.header {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Logo on left, title on right */
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  color: white;
  padding: 1rem 2rem;
  position: relative;
  border-bottom: 5px solid var(--secondary);
  border-radius: 0.5rem 0.5rem 0 0;
}

.site-logo {
  max-height: 60px; /* Adjust as needed */
  margin-right: 1rem;
}

.header::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 30%;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.1));
  transform: skewX(-30deg);
  /* [header-shine-click-fix-20260529] decorative shine was eating clicks on the header link */
  pointer-events: none;
}

.header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.calculator-icon {
  font-size: 1.5rem;
}

/* Adjust the grid layout to have 3 columns in first row */
.form-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr); /* Using 6 columns for more flexibility */
  gap: 1rem;
  padding: 1rem;
  background-color: #f1f5f9;
}

/* Position the first row cards (each takes 2 columns = 1/3 width) */
.form-container > .form-section:nth-child(1) {
  grid-column: 1 / span 2;
  grid-row: 1;
}

.form-container > .form-section:nth-child(2) {
  grid-column: 3 / span 2;
  grid-row: 1;
}

.form-container > .form-section:nth-child(3) {
  grid-column: 5 / span 2;
  grid-row: 1;
}

/* Position the second row cards (each takes 3 columns = 1/2 width) */
.form-container > .form-section:nth-child(4) {
  grid-column: 1 / span 3;
  grid-row: 2;
}

.form-container > .form-section:nth-child(5) {
  grid-column: 4 / span 3;
  grid-row: 2;
}

/* Make all remaining elements span full width */
.form-container > *:nth-child(n+6) {
  grid-column: 1 / -1;
}

/* Adjust responsive behavior */
@media (max-width: 1024px) {
  .form-container > .form-section:nth-child(1) {
    grid-column: 1 / span 3;
  }
  
  .form-container > .form-section:nth-child(2) {
    grid-column: 4 / span 3;
  }
  
  .form-container > .form-section:nth-child(3) {
    grid-column: 1 / span 6;
    grid-row: 2;
  }
  
  .form-container > .form-section:nth-child(4) {
    grid-column: 1 / span 3;
    grid-row: 3;
  }
  
  .form-container > .form-section:nth-child(5) {
    grid-column: 4 / span 3;
    grid-row: 3;
  }
}

@media (max-width: 768px) {
  .form-container > .form-section:nth-child(n) {
    grid-column: 1 / span 6;
  }
  
  .form-container > .form-section:nth-child(1) { grid-row: 1; }
  .form-container > .form-section:nth-child(2) { grid-row: 2; }
  .form-container > .form-section:nth-child(3) { grid-row: 3; }
  .form-container > .form-section:nth-child(4) { grid-row: 4; }
  .form-container > .form-section:nth-child(5) { grid-row: 5; }
}

.form-section {
  background: var(--card-bg);
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  border-top: 3px solid var(--primary);
  transition: all 0.2s ease;
}

.section-title {
  color: var(--primary-dark);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--gray-light);
  padding-bottom: 0.4rem;
}

.section-title i {
  margin-right: 0.5rem;
  color: var(--primary);
  font-size: 1.2rem;
}

.form-group {
  margin-bottom: 0.65rem;
  position: relative;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--gray-dark);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
}

.currency-symbol, 
.percentage-symbol {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-weight: 600;
  color: var(--gray);
  z-index: 1;
  background-color: #eef2ff;
  border: 2px solid var(--gray-light);
}

.currency-symbol {
  left: 0;
  width: 36px;
  border-right: none;
  border-top-left-radius: 0.25rem;
  border-bottom-left-radius: 0.25rem;
}

.form-control {
  width: 100%;
  height: 2.5rem;
  border: 2px solid var(--gray-light);
  border-radius: 0.25rem;
  font-size: 0.95rem;
  background: var(--input-bg);
  transition: all 0.2s;
  color: var(--dark);
  font-weight: 500;
}

.input-wrapper {
  position: relative;
}

.percentage-input {
  width: 100%;
  height: 2.5rem;
  border: 2px solid var(--gray-light);
  border-radius: 0.25rem;
  padding-right: 25px; /* Make room for the % symbol */
  font-size: 0.95rem;
  text-align: right;
}

.percentage-symbol {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray);
  pointer-events: none;
  background-color: transparent;
  border: none;
  width: auto;
  height: auto;
  display: inline;
  z-index: 2;
}

.currency-input {
  padding: 0 0.5rem 0 36px;
}

.regular-input {
  padding: 0 0.5rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.form-control:hover,
.percentage-input:hover,
.variable-expenses-card .percentage-field:hover {
  border-color: var(--primary-light);
  transition: all 0.2s ease;
}

/* Radio buttons */
.radio-container {
  display: flex;
  border-radius: 0.25rem;
  overflow: hidden;
  margin-top: 0.25rem;
}

.radio-option {
  flex: 1;
  position: relative;
}

.radio-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-option label {
  display: block;
  padding: 0.5rem;
  text-align: center;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--light);
  border: 2px solid var(--gray-light);
  color: var(--gray-dark);
}

.radio-option:first-child label {
  border-top-left-radius: 0.25rem;
  border-bottom-left-radius: 0.25rem;
  border-right: none;
}

.radio-option:last-child label {
  border-top-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
}

.radio-option input:checked + label {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  font-weight: 600;
}

/* Select styling */
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

/* Results section */
.results-section {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  margin-top: 0.5rem;
  border-top: 3px solid var(--accent);
}

@media (max-width: 768px) {
  .results-section {
    grid-column: 1 / -1;
  }
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

@media (max-width: 1200px) {
  .results-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .results-grid {
    grid-template-columns: 1fr;
  }
}

.result-card {
  background: linear-gradient(135deg, #ffffff, #f9fafb);
  border-radius: 0.25rem;
  padding: 0.75rem;
  border-left: 3px solid var(--gray-light);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: all 0.3s;
}

.result-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.key-result {
  background: linear-gradient(135deg, #ecfdf5, #f8fafc);
  border-left: 3px solid var(--primary);
}

.cash-flow-result {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), #f8fafc);
  border-left: 3px solid var(--success);
}

/* Update risk result (cash recovery) from red to green */
.risk-result {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), #f8fafc);
  border-left: 3px solid var(--primary); /* Changed from danger/red to primary green */
}

/* Update negative cashflow colors */
.payback-status-negative {
  color: var(--primary-dark); /* Changed from red to dark green for consistency */
}

#paybackPeriod.negative-cashflow {
  color: var(--primary-dark); /* Changed from red to dark green for consistency */
}

.result-label {
  font-size: 0.75rem;
  color: var(--gray);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.result-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
}

.positive {
  color: var(--success);
  font-weight: 700;
}

.negative {
  color: var(--danger);
}

/* Breakdown section */
.breakdown-section {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  margin-top: 0.5rem;
  border-top: 3px solid var(--secondary);
}

@media (max-width: 768px) {
  .breakdown-section {
    grid-column: 1 / -1;
  }
}

.breakdown-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (max-width: 1024px) {
  .breakdown-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .breakdown-content {
    grid-template-columns: 1fr;
  }
}

.breakdown-card {
  border-radius: 0.25rem;
  padding: 0.75rem;
  border: 1px solid var(--gray-light);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.breakdown-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.breakdown-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Solid Background Colors with matching title colors */
.breakdown-card.primary-gradient {
  background: #d1fae5 !important; /* Light green */
  border-left: 3px solid var(--primary-dark) !important;
}

.breakdown-card.primary-gradient .breakdown-title {
  color: var(--primary-dark);
}

.breakdown-card.secondary-gradient {
  background: #d1fae5 !important; /* Lighter green */
  border-left: 3px solid var(--primary) !important;
}

.breakdown-card.secondary-gradient .breakdown-title {
  color: var(--primary);
}

.breakdown-card.warning-gradient {
  background: #a7f3d0  !important; /* Changed from amber to light green */
  border-left: 3px solid var(--primary) !important; /* Changed from warning to primary */
}

.breakdown-card.warning-gradient .breakdown-title {
  color: var(--primary-dark);
  }

.breakdown-card.success-gradient {
  background: #86efac !important; /* Light green */
  border-left: 3px solid var(--success) !important;
}

.breakdown-card.success-gradient .breakdown-title {
  color: var(--success);
}

.breakdown-card.danger-gradient {
  background: #fca5a5 !important; /* Light red */
  border-left: 3px solid var(--danger) !important;
}

.breakdown-card.danger-gradient .breakdown-title {
  color: var(--danger);
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

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

.breakdown-label {
  font-size: 0.85rem;
  color: var(--gray-dark);
}

.breakdown-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
}

.breakdown-total {
  margin-top: 0.3rem;
  padding: 0.4rem;
  background-color: rgba(16, 185, 129, 0.05);
  border-radius: 0.25rem;
}

.breakdown-total .breakdown-label,
.breakdown-total .breakdown-value {
  font-weight: 700;
  color: var(--primary-dark);
}

/* Button styling */
.action-button {
  grid-column: 1 / -1;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  height: 2.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 1;
  margin-top: 0.5rem;
}

.action-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  transform: translateX(-100%);
  transition: transform 0.6s;
  z-index: -1;
}

.action-button:hover::before {
  transform: translateX(100%);
}

@media (max-width: 768px) {
  .action-button {
    grid-column: 1 / -1;
  }
}

.action-button:hover {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  box-shadow: 0 4px 6px rgba(16, 185, 129, 0.4);
}

.action-button:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.2);
}

/* Info tooltip styling */
.info-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  background-color: var(--primary-light);
  color: white;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  margin-left: 0.3rem;
  font-size: 0.65rem;
  cursor: help;
  position: relative;
}

.info-icon:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translate(-50%, -100%);
  background: var(--dark);
  color: white;
  padding: 0.4rem 0.6rem;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  font-weight: normal;
  width: 180px;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.info-icon:hover::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px;
  border-style: solid;
  border-color: var(--dark) transparent transparent transparent;
  z-index: 100;
}

/* Disclaimer */
.disclaimer {
  grid-column: 1 / -1;
  background-color: #ffffff;
  padding: 0.75rem;
  border-radius: 0.25rem;
  margin-top: 0.5rem;
  border-left: 3px solid var(--gray);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.disclaimer h3 {
  font-size: 0.9rem;
  color: var(--dark);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.disclaimer p {
  font-size: 0.8rem;
  color: var(--gray-dark);
  margin-bottom: 0.4rem;
}

/* Error message styling */
.error-message {
  color: var(--danger);
  font-size: 0.75rem;
  margin-top: 0.2rem;
  display: none;
}

/* Add invalid input highlighting */
.form-control.invalid {
  border-color: var(--danger);
  background-color: rgba(239, 68, 68, 0.05);
}

/* Custom color variants */
.fixed-expenses-card {
  border-top: 3px solid var(--primary);
}
.fixed-expenses-title {
  color: var(--primary);
}

.variable-expenses-card {
  border-top: 3px solid var(--secondary);
}
.variable-expenses-title {
  color: var(--secondary);
}

.acquisition-card {
  border-top: 3px solid var(--primary); /* Changed from warning/yellow to primary green */
}

.acquisition-title {
  color: var(--primary); /* Changed from warning/yellow to primary green */
}

.financing-card {
  border-top: 3px solid var(--primary);
}
.financing-title {
  color: var(--primary);
}

/* Single line variable expenses layout */
.variable-expenses-card .expenses-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
}

.variable-expenses-card .expense-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.variable-expenses-card .expense-label {
  font-size: 0.85rem;
  color: var(--gray-dark);
  margin-bottom: 5px;
  display: flex;
  align-items: right;
}

.variable-expenses-card .input-container {
  position: relative;
  width: 100%;
}

/* Fixed width input field with proper padding for the % symbol */
.variable-expenses-card .percentage-field {
  width: 100%;
  height: 2.2rem;
  border: 2px solid var(--gray-light);
  border-radius: 0.25rem;
  padding-right: 25px; /* Make room for the % symbol */
  font-size: 0.95rem;
  text-align: right;
}

/* Position the percentage symbol right after the number */
.variable-expenses-card .percentage-symbol {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray);
  pointer-events: none;
}

/* Info icon styling */
.variable-expenses-card .info-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  background-color: var(--primary-light);
  color: white;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  margin-left: 0.3rem;
  font-size: 0.65rem;
  cursor: help;
}

/* Print styles for PDF reports */
@media print {
  /* === BASIC SETUP === */
  body {
    padding: 0 !important;
    margin: 0 !important;
    background: white !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  .calculator-container {
    max-width: 100% !important;
    margin: 0 !important;
  }

  /* === HIDE NON-PRINT ELEMENTS === */
  #resetBtn,
  .action-buttons-row,
  .action-button,
  #headerUser,
  .resources-section,
  .about-section,
  .disclaimer,
  #registerModal,
  #reportsOverlay,
  #agent-widget,
  .info-icon,
  .copyright {
    display: none !important;
  }

  /* === SHOW PRINT-ONLY ELEMENTS === */
  .print-agent-header,
  .print-date-header {
    display: block !important;
  }

  /* === AGENT HEADER (print only) === */
  .print-agent-header {
    background: linear-gradient(90deg, #059669, #10b981) !important;
    color: white !important;
    padding: 12px 20px !important;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
  }
  .print-agent-label {
    font-size: 9px;
    font-style: italic;
    opacity: 0.9;
  }
  .print-agent-name {
    font-size: 18px;
    font-weight: 700;
    margin: 2px 0;
  }
  .print-agent-details {
    font-size: 10px;
    opacity: 0.9;
  }
  .print-agent-company {
    font-size: 11px;
    font-weight: 600;
    margin-top: 2px;
  }

  /* === REPORT TITLE (print only) === */
  .print-date-header {
    text-align: center;
    padding: 10px 0;
    margin-bottom: 5px;
    border-bottom: 2px solid #10b981;
  }
  .print-report-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    letter-spacing: 1px;
  }
  .print-report-address {
    font-size: 12px;
    color: #6b7280;
    margin-top: 3px;
  }
  .print-report-date {
    font-size: 9px;
    color: #9ca3af;
    margin-top: 2px;
  }

  /* === PAGE BREAKS === */
  /* Page 1: Header + Inputs */
  .header {
    break-after: avoid !important;
  }

  .form-container {
    break-inside: avoid !important;
  }

  /* Page 2: Results — always start on new page */
  .results-section {
    break-before: page !important;
    break-inside: avoid !important;
    page-break-before: always !important;
  }

  /* Page 3: Breakdown — always start on new page */
  .breakdown-section {
    break-before: page !important;
    break-inside: avoid !important;
    page-break-before: always !important;
  }

  /* Keep cards together */
  .form-section,
  .result-card,
  .breakdown-card {
    break-inside: avoid !important;
  }

  /* === VISUAL CLEANUP === */
  .form-section,
  .results-section,
  .breakdown-section {
    box-shadow: none !important;
    border: 1px solid #e5e7eb !important;
  }

  .results-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }

  /* Ensure backgrounds print */
  .header,
  .quick-rules-dashboard .rule-badge,
  .ai-commentary-card,
  .breakdown-card,
  .result-card,
  .breakdown-total {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Footer on every page */
  @page {
    margin: 10mm 8mm 15mm 8mm;
    @bottom-center {
      content: "Generated by LandlordCalc.com  |  For informational purposes only";
      font-size: 8px;
      color: #9ca3af;
    }
  }
}

/* Improved mobile experience */
@media (max-width: 640px) {
  body {
    padding: 15px;
  }
  
  .header h1 {
    font-size: 1.5rem;
  }
  
  .result-value {
    font-size: 1.1rem;
  }
  
  .form-control {
    height: 2.3rem;
  }
}

/* For percentage inputs in the financing section */
.financing-card .input-wrapper {
  position: relative;
  max-width: 120px; /* Restrict the width of the input */
}

.financing-card .percentage-input {
  text-align: right; /* Right-align the text for better appearance */
  padding-right: 25px; /* Room for the % symbol */
  font-weight: 600; /* Make the numbers bolder */
  color: var(--primary-dark); /* Use the primary dark color for emphasis */
}

.financing-card .percentage-symbol {
  position: absolute;
  left: auto; /* Reset any left positioning */
  right: 8px; /* Keep symbol on right side but close to the number */
  top: 50%;
  transform: translateY(-50%);
  background-color: transparent;
  border: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray);
  pointer-events: none;
}

/* Ensure the fixed-expenses card has the same styling as variable expenses */
.fixed-expenses-card .expenses-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.fixed-expenses-card .expense-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 120px;
}

.fixed-expenses-card .expense-label {
  font-size: 0.85rem;
  color: var(--gray-dark);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
}

.fixed-expenses-card .input-container {
  position: relative;
  width: 100%;
}

.fixed-expenses-card .input-wrapper {
  margin: 0;
}

@media (max-width: 640px) {
  .expenses-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .expense-group {
    width: 100%;
  }
}

/* Add these CSS rules to fix the alignment of expense fields */

/* Fixed height and vertical alignment for expense labels */
.fixed-expenses-card .expense-label,
.variable-expenses-card .expense-label {
  /* [label-wrap-fix-20260527] Let labels grow to whatever lines they need (2 or 3)
     when the sidebar/narrow viewport wraps "Property Taxes (annual)" onto multiple lines.
     Was height:40px which clipped lines past the first. Use block display so the text
     node wraps naturally; flex was unnecessary here since label has no inline siblings
     in the fixed-expenses markup, and only an info-icon in variable-expenses (still wraps fine in block). */
  min-height: 40px;
  height: auto;
  display: block;
  line-height: 1.3;
  word-wrap: break-word;
}

/* Fix the expense group layout to ensure aligned inputs */
.fixed-expenses-card .expense-group,
.variable-expenses-card .expense-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 120px;
}

/* Make all input containers the same height */
.fixed-expenses-card .input-container,
.variable-expenses-card .input-container {
  margin-top: auto; /* Push inputs to bottom of container */
}

/* Ensure input fields have consistent height */
.fixed-expenses-card .form-control,
.variable-expenses-card .percentage-field {
  height: 2.2rem;
}

/* Add some bottom margin to the label to ensure spacing */
.fixed-expenses-card .expense-label,
.variable-expenses-card .expense-label {
  margin-bottom: 8px;
}

/* Keep the responsive behavior */
@media (max-width: 640px) {
  .expenses-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .expense-group {
    width: 100%;
  }
  
  /* Reset heights for mobile view */
  .fixed-expenses-card .expense-label,
  .variable-expenses-card .expense-label {
    height: auto;
    min-height: auto;
  }
}
/* Create a flex container for the payment fields */
.financing-card .payment-fields {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 0.65rem;
}

/* Style the payment field groups */
.financing-card .payment-field {
  flex: 1;
}

/* Add this to your styles.css file */

/* Updated AI Commentary styling to match the site's green theme */

.ai-commentary-section {
    margin-top: 12px;
    margin-bottom: 12px;
    width: 100%;
}

.ai-commentary-card {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 8px;
    padding: 12px 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: white;
    margin-top: 8px;
    transition: all 0.3s ease;
    border-left: 3px solid var(--primary-dark);
}

.ai-commentary-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.ai-commentary-content {
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 500;
    text-align: left;
    padding: 5px;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
}

@media (max-width: 768px) {
    .ai-commentary-content {
        font-size: 0.9rem;
    }
}

/* Add these styles to your existing CSS file */

/* Base styling for AI commentary card */
.ai-commentary-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

/* Performance-based color schemes */
.ai-commentary-poor {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9) 0%, rgba(153, 27, 27, 0.8) 100%);
    border-left-color: #7f1d1d;
    color: white;
}

.ai-commentary-minimum {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.9) 0%, rgba(217, 119, 6, 0.8) 100%);
    border-left-color: #92400e;
    color: white;
}

.ai-commentary-average {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9) 0%, rgba(5, 150, 105, 0.8) 100%);
    border-left-color: #065f46;
    color: white;
}

.ai-commentary-excellent {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.9) 0%, rgba(180, 83, 9, 0.8) 100%);
    border-color: #78350f;
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* For values that fall in-between thresholds */
.ai-commentary-poor-to-minimum {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.8) 0%, rgba(251, 191, 36, 0.7) 100%);
    border-left-color: #b45309;
    color: white;
}

.ai-commentary-minimum-to-average {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.8) 0%, rgba(16, 185, 129, 0.7) 100%);
    border-left-color: #059669;
    color: white;
}

.ai-commentary-average-to-excellent {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.8) 0%, rgba(245, 158, 11, 0.7) 100%);
    border-left-color: #b45309;
    color: white;
}

/* Create a sparkling effect for excellent returns */
@keyframes sparkle {
    0% { box-shadow: 0 0 5px rgba(245, 158, 11, 0.5); }
    50% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.8); }
    100% { box-shadow: 0 0 5px rgba(245, 158, 11, 0.5); }
}

.ai-commentary-excellent {
    animation: sparkle 2s infinite;
}

/* Resources Section Styling */
.resources-section {
  width: 100%;
  margin: 1rem 0;
  padding: 0.5rem 0;
  text-align: center;
  background-color: var(--light);
  border-top: 1px solid var(--gray-light);
  border-bottom: 1px solid var(--gray-light);
}

.resources-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.resource-link {
  text-decoration: none;
  color: var(--primary-dark);
  font-weight: 600;
  position: relative;
  padding: 0.5rem 1rem;
  border: 2px solid var(--primary);
  border-radius: 4px;
  transition: background 0.3s, color 0.3s;
}

.resource-link:hover {
  background-color: var(--primary);
  color: white;
}

/* Tooltip styling (similar to info-icon) */
.resource-link::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: white;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.3s;
  z-index: 10;
}

.resource-link:hover::after {
  opacity: 1;
}
.about-section {
  border-top: 3px solid var(--primary); /* or var(--accent) if you prefer blue */
}

.about-title {
  color: var(--primary-dark); /* Title text color to match other sections */
}

/* Adjust spacing and text styling as needed */
.about-section p,
.about-section ul,
.about-section ol {
  font-size: 0.9rem;
  color: var(--gray-dark);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}
.about-section ul {
  list-style-type: disc;
  margin-left: 1.5rem;
}
.about-section ol {
  list-style-type: decimal;
  margin-left: 1.5rem;
}
.about-section h3 {
  font-size: 1rem;
  margin-top: 0.75rem;
  font-weight: 600;
}
/* Section subtitle styling */
.section-subtitle {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 8px 15px;
    border-radius: 5px;
    margin-top: 20px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c3e50;
}

.section-subtitle i {
    margin-right: 10px;
    color: #3498db;
}

/* Economic indicators styling - reduced vertical spacing */
.economic-indicators {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 10px;
}

.economic-indicator {
    flex: 1;
    background-color: white;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.indicator-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.indicator-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
}

/* Adjust AI commentary card to fit within results - don't change the font color */
.ai-commentary-card {
    background-color: white;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}



/* Just keep the line height */
.ai-commentary-content {
    line-height: 1.6;
}

/* ============================================
   QUICK RULES DASHBOARD
   ============================================ */
.quick-rules-dashboard {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
    padding: 12px 10px;
    background: linear-gradient(135deg, #f8fafc, #ecfdf5);
    border-radius: 8px;
    border: 1px solid var(--gray-light);
    flex-wrap: wrap;
}

.rule-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 18px;
    border-radius: 6px;
    min-width: 100px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid var(--gray-light);
    background: white;
}

.rule-badge .rule-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
    margin-bottom: 2px;
}

.rule-badge .rule-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
}

.rule-badge.rule-pass {
    border-color: var(--primary);
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
}
.rule-badge.rule-pass .rule-value {
    color: var(--primary-dark);
}
.rule-badge.rule-pass::after {
    content: '\2713';
    font-size: 0.65rem;
    color: var(--primary);
    margin-top: 1px;
}

.rule-badge.rule-warn {
    border-color: var(--warning);
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
}
.rule-badge.rule-warn .rule-value {
    color: #92400e;
}
.rule-badge.rule-warn::after {
    content: '~';
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--warning);
    margin-top: 1px;
}

.rule-badge.rule-fail {
    border-color: var(--danger);
    background: linear-gradient(135deg, #fef2f2, #fecaca);
}
.rule-badge.rule-fail .rule-value {
    color: #991b1b;
}
.rule-badge.rule-fail::after {
    content: '\2717';
    font-size: 0.65rem;
    color: var(--danger);
    margin-top: 1px;
}

@media (max-width: 480px) {
    .quick-rules-dashboard {
        gap: 8px;
    }
    .rule-badge {
        min-width: 70px;
        padding: 6px 10px;
    }
    .rule-badge .rule-value {
        font-size: 1rem;
    }
}

/* ============================================
   ANNUAL DISPLAY UNDER RESULTS
   ============================================ */
.result-annual {
    font-size: 0.72rem;
    color: var(--gray);
    margin-top: 2px;
    font-weight: 500;
}

/* ============================================
   USE CURRENT RATE BUTTON
   ============================================ */
.use-current-rate-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-dark);
    background: var(--primary-bg);
    border: 1px solid var(--primary-light);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

.use-current-rate-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.use-current-rate-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.use-current-rate-btn i {
    font-size: 0.6rem;
}

/* ============================================
   BADGE TOOLTIPS
   ============================================ */
.rule-badge {
    position: relative;
    cursor: help;
}

.rule-badge[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.4;
    width: 220px;
    z-index: 100;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-transform: none;
    letter-spacing: 0;
    text-align: left;
}

.rule-badge[data-tooltip]:hover::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: var(--dark) transparent transparent transparent;
    z-index: 100;
}

/* ============================================
   USE CURRENT RATE BUTTON TOOLTIP
   ============================================ */
.use-current-rate-btn {
    position: relative;
}

.use-current-rate-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.4;
    width: 240px;
    z-index: 100;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-transform: none;
    letter-spacing: 0;
    text-align: left;
}

.use-current-rate-btn[data-tooltip]:hover::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: var(--dark) transparent transparent transparent;
    z-index: 100;
}

/* ============================================
   ECONOMIC INDICATOR NOTE
   ============================================ */
.indicator-note {
    font-size: 0.65rem;
    color: #888;
    margin-top: 4px;
    line-height: 1.3;
    font-style: italic;
}

/* ============================================
   RESOURCE BUTTONS - UNIFORM WIDTH
   ============================================ */
.resources-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.resource-link {
    min-width: 220px;
    text-align: center;
    box-sizing: border-box;
}

/* ============================================
   AGENT WIDGET
   ============================================ */
#agent-widget {
    position: fixed;
    bottom: 12px;
    left: 12px;
    z-index: 999997;
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    width: 300px;
    display: none;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

#agent-widget .aw-close {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 18px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

#agent-widget .aw-close:hover {
    color: #333;
}

#agent-widget .aw-row {
    display: flex;
    align-items: center;
}

#agent-widget .aw-photo {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 3px solid var(--primary-dark);
    object-fit: cover;
}

#agent-widget .aw-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--dark);
}

#agent-widget .aw-phone a,
#agent-widget .aw-email a {
    color: #333;
    text-decoration: none;
    font-size: 0.85rem;
}

#agent-widget .aw-phone a:hover,
#agent-widget .aw-email a:hover {
    color: var(--primary-dark);
}

#agent-widget .aw-website a {
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
}

#agent-widget .aw-website a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    #agent-widget {
        width: calc(100% - 24px);
        left: 12px;
        right: 12px;
    }
}

/* Agent Widget - Company Logo/Name */
#agent-widget .aw-photo-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 12px;
    flex-shrink: 0;
    width: 25%;
}

#agent-widget .aw-company {
    margin-top: 4px;
    text-align: center;
    width: 100%;
}

#agent-widget .aw-company-logo {
    display: block;
    width: 100% !important;
    height: auto !important;
    object-fit: contain;
    margin: 0 auto;
}

#agent-widget .aw-company-name {
    font-size: 0.65rem;
    color: var(--gray);
    font-weight: 500;
    line-height: 1.2;
    display: block;
    text-align: center;
}

#agent-widget .aw-info {
    flex: 1;
    min-width: 0;
}

#agent-widget .aw-website a {
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 0.8rem;
}

#agent-widget .aw-website a:hover {
    text-decoration: underline;
}

/* ============================================
   SAVE & PDF BUTTONS ROW
   ============================================ */
.action-buttons-row {
    grid-column: 1 / -1;
    display: flex;
    gap: 1rem;
    margin-top: 0;
}

.action-buttons-row .action-button {
    flex: 1;
    margin-top: 0;
}

.save-btn {
    background: linear-gradient(90deg, #0ea5e9, #3b82f6) !important;
    box-shadow: 0 2px 4px rgba(14, 165, 233, 0.3) !important;
}

.save-btn:hover {
    background: linear-gradient(90deg, #0284c7, #2563eb) !important;
    box-shadow: 0 4px 6px rgba(14, 165, 233, 0.4) !important;
}

.pdf-btn {
    background: linear-gradient(90deg, #ef4444, #dc2626) !important;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3) !important;
}

.pdf-btn:hover {
    background: linear-gradient(90deg, #dc2626, #b91c1c) !important;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.4) !important;
}

@media (max-width: 640px) {
    .action-buttons-row {
        flex-direction: column;
    }
}

/* ============================================
   REGISTRATION MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-header {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header i {
    color: var(--accent);
}

.modal-subtitle {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-dark);
    margin-bottom: 0.25rem;
}

.modal-field .form-control {
    width: 100%;
}

.reg-error {
    color: var(--danger);
    font-size: 0.8rem;
    padding: 0.5rem;
    background: rgba(239, 68, 68, 0.05);
    border-radius: 4px;
    border-left: 3px solid var(--danger);
}

/* Save success toast */
.save-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000000;
    animation: toastSlide 0.3s ease;
}

@keyframes toastSlide {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================
   PROPERTY ADDRESS FIELD
   ============================================ */
#propertyAddress {
    font-size: 0.9rem;
}

/* ============================================
   MODAL TABS
   ============================================ */
.modal-tabs {
    display: flex;
    border-bottom: 2px solid var(--gray-light);
    margin-bottom: 1rem;
}

.modal-tab {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
    border: none;
    background: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
}

.modal-tab:hover {
    color: var(--primary-dark);
}

.modal-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.modal-tab-content {
    display: none;
}

.modal-tab-content.active {
    display: block;
}

.modal-login-hint {
    font-size: 0.8rem;
    color: var(--accent);
    background: rgba(14, 165, 233, 0.08);
    border-left: 3px solid var(--accent);
    padding: 0.5rem 0.75rem;
    border-radius: 0 4px 4px 0;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.modal-login-hint i {
    margin-right: 0.3rem;
}

/* ============================================
   IMPROVED MODAL STYLES
   ============================================ */
.modal-name-row {
    display: flex;
    gap: 0.75rem;
}

.modal-field-half {
    flex: 1;
}

.modal-submit-btn {
    margin-top: 0.75rem !important;
    width: 100%;
    height: 48px !important;
    font-size: 1rem !important;
    letter-spacing: 1px;
}

.modal-tab i {
    margin-right: 0.3rem;
}

/* Make tabs look more like real tabs */
.modal-tabs {
    gap: 0;
    border-bottom: 3px solid var(--gray-light);
    margin: -0.5rem -2rem 1rem -2rem;
    padding: 0 2rem;
}

.modal-tab {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
}

.modal-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: rgba(14, 165, 233, 0.05);
    border-radius: 4px 4px 0 0;
}

/* Login hint - always visible, prominent */
.modal-login-hint {
    font-size: 0.8rem;
    color: #1e40af;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #3b82f6;
    padding: 0.6rem 0.75rem;
    border-radius: 0 6px 6px 0;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.modal-login-hint i {
    color: #3b82f6;
    margin-right: 0.3rem;
}

/* ============================================
   HEADER USER AREA
   ============================================ */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-center {
    flex: 1;
    text-align: right;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 2;
    position: relative;
}

.user-greeting {
    color: rgba(255,255,255,0.9);
    font-size: 0.8rem;
    font-weight: 500;
}

.user-reports-btn {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
}

.user-reports-btn:hover {
    background: rgba(255,255,255,0.25);
}

.user-logout-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.user-logout-btn:hover {
    background: rgba(239,68,68,0.3);
    border-color: rgba(239,68,68,0.5);
    color: white;
}

@media (max-width: 768px) {
    .header {
        flex-wrap: wrap;
    }
    .header-center h1 {
        font-size: 1.2rem;
    }
    .header-user {
        order: 3;
        width: 100%;
        justify-content: flex-end;
        margin-top: 0.3rem;
    }
}

/* ============================================
   SAVED REPORTS PANEL
   ============================================ */
.reports-panel {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-light);
}

.reports-header h3 {
    color: var(--primary-dark);
    font-size: 1.1rem;
    margin: 0;
}

.reports-header h3 i {
    margin-right: 0.5rem;
}

.reports-loading, .reports-empty {
    text-align: center;
    padding: 2rem;
    color: var(--gray);
    font-size: 0.9rem;
}

.reports-loading i, .reports-empty i {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--gray-light);
}

.report-card {
    border: 1px solid var(--gray-light);
    border-left: 4px solid var(--primary);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
    cursor: pointer;
}

.report-card:hover {
    border-left-color: var(--accent);
    background: #f0f9ff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.report-card:active {
    transform: translateY(0);
    background: #e0f2fe;
}

.report-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.report-address {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark);
}

.report-date {
    font-size: 0.75rem;
    color: var(--gray);
}

.report-card-metrics {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.report-metric {
    display: flex;
    flex-direction: column;
}

.report-metric-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--gray);
    letter-spacing: 0.5px;
}

.report-metric-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
}

.report-metric-value.positive {
    color: var(--success);
}

.report-metric-value.negative {
    color: var(--danger);
}

/* ============================================
   PDF CAPTURE MODE
   ============================================ */
body.pdf-capture-mode .action-button,
body.pdf-capture-mode .action-buttons-row,
body.pdf-capture-mode #headerUser,
body.pdf-capture-mode .resources-section,
body.pdf-capture-mode .about-section,
body.pdf-capture-mode .disclaimer,
body.pdf-capture-mode #registerModal,
body.pdf-capture-mode #reportsOverlay {
    display: none !important;
}

body.pdf-capture-mode .form-container {
    gap: 0.5rem;
}

body.pdf-capture-mode .calculator-container {
    max-width: 1200px;
}

/* Hide print-only elements on screen */
@media screen {
  .print-agent-header,
  .print-date-header {
    display: none !important;
  }
}

/* ============================================
   MODAL DISCLOSURE & TERMS
   ============================================ */
.modal-crm-disclosure {
    font-size: 0.7rem;
    color: var(--gray);
    line-height: 1.4;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: #f0fdf4;
    border-radius: 4px;
    border-left: 3px solid var(--primary);
}

.modal-terms-line {
    font-size: 0.7rem;
    color: var(--gray);
    text-align: center;
    margin-top: 0.5rem;
}

.modal-terms-line a {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Footer Links */
.footer-links {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.footer-links a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* VO2 MAX Copyright */
.copyright-vo2 {
    text-align: center;
    font-size: 0.7rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

/* 3-option radio container */
.radio-container-3 .radio-option {
    flex: 1;
}
.radio-container-3 .radio-option:nth-child(2) label {
    border-left: none;
    border-right: none;
    border-radius: 0;
}
.radio-container-3 .radio-option:first-child label {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.radio-container-3 .radio-option:last-child label {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Loan basis display bar */
.loan-basis-display {
    font-size: 0.75rem;
    color: var(--gray-dark);
    background: #f0fdf4;
    padding: 5px 10px;
    border-radius: 4px;
    border-left: 3px solid var(--primary);
    margin-bottom: 0.65rem;
}
.loan-basis-display strong {
    color: var(--primary-dark);
}
/* ============================================
   OTP VERIFICATION STYLES
   Append this to the END of styles.css
   ============================================ */

/* Delivery method buttons */
.otp-delivery-options {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
}

.otp-delivery-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 15px 10px;
  background: #f0fdf4;
  border: 2px solid var(--gray-light);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Poppins', sans-serif;
}

.otp-delivery-btn:hover {
  border-color: var(--primary);
  background: #ecfdf5;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.otp-delivery-btn.selected {
  border-color: var(--primary);
  background: #d1fae5;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

.otp-delivery-btn.sending {
  opacity: 0.6;
  pointer-events: none;
}

.otp-delivery-btn i {
  font-size: 1.5rem;
  color: var(--primary);
}

.otp-delivery-btn span {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--dark);
}

.otp-delivery-btn small {
  font-size: 0.75rem;
  color: var(--gray);
}

/* OTP code input */
.otp-code-input {
  text-align: center;
  font-size: 1.8rem !important;
  font-weight: 700 !important;
  letter-spacing: 10px;
  padding: 10px !important;
  height: 3.2rem !important;
  border: 2px solid var(--primary) !important;
  background: #f0fdf4 !important;
}

.otp-code-input:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25) !important;
}

/* Sent message */
.otp-sent-msg {
  background: #ecfdf5;
  border-left: 3px solid var(--primary);
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--primary-dark);
}

.otp-sent-msg i {
  margin-right: 6px;
}

/* Footer links (resend, timer, back) */
.otp-footer-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 0.85rem;
}

.otp-footer-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

.otp-footer-links a:hover {
  text-decoration: underline;
}

.otp-footer-links a.disabled {
  color: var(--gray);
  pointer-events: none;
  opacity: 0.5;
}

#regOtpTimer, #loginOtpTimer {
  color: var(--gray);
  font-size: 0.8rem;
}

@media (max-width: 480px) {
  .otp-delivery-options {
    flex-direction: column;
  }
  
  .otp-code-input {
    font-size: 1.4rem !important;
    letter-spacing: 6px;
  }
}

/* Amortization Schedule */
.amort-milestone { flex:1; min-width:180px; background:#f8f9fa; border:1px solid #e0e0e0; border-radius:8px; padding:12px; }
.amort-label { font-weight:600; font-size:14px; color:#1a5276; margin-bottom:6px; }
.amort-vals { display:flex; flex-direction:column; gap:3px; font-size:12px; color:#555; }
.amort-vals strong { color:#333; }

/* Depreciation */
.depreciation-content { justify-content:center; }
.depr-card { flex:1; min-width:160px; background:#f8f9fa; border:1px solid #e0e0e0; border-radius:8px; padding:14px; text-align:center; }
.depr-label { font-size:12px; font-weight:600; color:#666; text-transform:uppercase; letter-spacing:0.3px; margin-bottom:6px; }
.depr-value { font-size:22px; font-weight:700; color:#1a5276; }
.depr-sub { font-size:11px; color:#999; margin-top:4px; }

/* Projection */
.proj-total-card { flex:1; min-width:140px; background:#f0f4f8; border:1px solid #d0d8e0; border-radius:8px; padding:12px; text-align:center; }
.proj-label { font-size:11px; font-weight:600; color:#666; text-transform:uppercase; letter-spacing:0.3px; }
.proj-value { font-size:20px; font-weight:700; color:#1a5276; margin-top:4px; }


/* [lease-option-v2] Compact lease option strip */
.lease-option-card {
    padding: 0.85rem 1rem;
}
.lease-option-card .lease-option-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}
.lease-option-card .lease-option-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-dark);
}
.lease-option-card .lease-option-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}
.lease-option-card .lease-option-title i {
    margin-right: 6px;
    color: var(--primary);
}
.lease-option-card .lease-option-tagline {
    color: var(--gray);
    font-size: 0.82rem;
}
.lease-option-card .lease-option-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--gray-light);
}
.lease-option-card.is-open {
    border-top: 3px solid var(--primary-dark);
}
.lease-option-card .lo-field label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 0.82rem;
    color: var(--dark);
}
.lease-option-card .lo-field-wide {
    grid-column: 1 / -1;
}
.lease-option-card .lo-applies-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
}
.lease-option-card .lo-applies-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}
.lease-option-card .lo-applies-hint {
    margin-top: 4px;
    font-size: 0.72rem;
    color: var(--gray);
}
.lease-option-card [hidden] { display: none !important; }

/* Lease option scenarios card */
.lease-option-scenarios-note {
    font-size: 0.82rem;
    color: var(--gray);
    margin-bottom: 12px;
}
.lease-option-scenarios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.lease-option-scenarios .scenario-card {
    background: #fff;
    border: 1px solid var(--gray-light);
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
}
.lease-option-scenarios .scenario-1 { border-left: 4px solid var(--gray); }
.lease-option-scenarios .scenario-2 { border-left: 4px solid var(--primary-light); }
.lease-option-scenarios .scenario-3 { border-left: 4px solid var(--primary-dark); }
.lease-option-scenarios .scenario-header { margin-bottom: 10px; }
.lease-option-scenarios .scenario-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--dark);
}
.lease-option-scenarios .scenario-subtitle {
    font-size: 12px;
    color: var(--gray);
    margin-top: 2px;
}
.lease-option-scenarios .scenario-body {
    flex: 1 1 auto;
    font-size: 13px;
}
.lease-option-scenarios .scenario-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px dashed var(--gray-light);
}
.lease-option-scenarios .scenario-row:last-of-type { border-bottom: none; }
.lease-option-scenarios .scenario-note {
    margin-top: 8px;
    font-size: 11px;
    color: var(--gray);
    line-height: 1.4;
}
.lease-option-scenarios .scenario-totals {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 2px solid var(--gray-light);
}
.lease-option-scenarios .scenario-total-row {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 14px;
    padding: 4px 0;
}
.lease-option-scenarios .scenario-total-row.scenario-roi {
    color: var(--primary-dark);
    font-size: 15px;
}

/* ============================================================
 * [houseflipcalc-theme-override-20260602]
 * Override LandlordCalc green palette with HouseFlipCalc navy + cyan.
 * Original :root variables earlier in this file used #10b981 (green) —
 * those leaked through every var(--primary) reference. This block REDEFINES
 * the same variables; CSS cascading means the last :root wins.
 * ============================================================ */
:root {
    --primary:       #1F2D6F;   /* navy, from logo */
    --primary-dark:  #141F50;
    --primary-light: #5470D4;
    --primary-bg:    #F0F4FF;
    --secondary:     #2A9DF4;   /* cyan, from logo */
    --accent:        #2A9DF4;
    --success:       #10b981;   /* keep universal green for success states */
}

/* Belt-and-suspenders: any hardcoded #10b981 / #059669 / #22c55e leftovers
 * — like the .header border-bottom and a couple of inline gradients —
 * stay on the navy/cyan palette. */
.header { border-bottom-color: #2A9DF4 !important; }
.calculator-container .form-section { border-color: #5470D4; }
.btn-primary { background: linear-gradient(90deg, #1F2D6F, #2A9DF4) !important; border-color: #1F2D6F !important; }
.action-button.save-btn { background: linear-gradient(90deg, #1F2D6F, #2A9DF4) !important; }
.action-button.share-btn { background: #2A9DF4 !important; border-color: #2A9DF4 !important; }
