/* Official Links Grid & Link Cards */
.official-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.link-card {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 14px;
  padding: 1.25rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.link-card:hover {
  border-color: var(--primary-light);
  background: rgba(59, 130, 246, 0.18);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.3);
}

.link-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.link-desc {
  font-size: 0.85rem;
  color: #e2e8f0;
  line-height: 1.5;
}

/* Share & Print Buttons */
.btn-share {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid var(--border-glow);
  color: var(--primary-light);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}
.btn-share:hover {
  background: var(--primary);
  color: #fff;
}

.btn-print {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--success-border);
  color: var(--success);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}
.btn-print:hover {
  background: var(--success);
  color: #fff;
}

/* Print Layout Optimization Styles */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .navbar, .btn-share, .btn-print, .btn-logout, .login-overlay, .slider-val, input[type="range"], .ledger-actions, .template-actions, .btn-primary {
    display: none !important;
  }
  .hero h1 {
    color: #000 !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
  }
  .stat-card, .glass-card, .option-card, .comp-box, .stat-subcard, .etf-info-box {
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
  .check-item {
    background: #fff !important;
    border: 1px solid #eee !important;
    page-break-inside: avoid;
  }
  .check-item label, .check-item label strong, .subsection-title, .comp-address, .result-title, .result-amount {
    color: #000 !important;
  }
}

/* ==========================================================================
   LILIA ESTATE & FINANCIAL DASHBOARD - COMPLETE DESIGN SYSTEM
   ========================================================================== */

:root {
  --bg-dark: #090d16;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(59, 130, 246, 0.4);
  
  --primary: #3b82f6;
  --primary-light: #60a5fa;
  --primary-dark: #1d4ed8;
  
  --accent-gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.3);
  
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --success-border: rgba(16, 185, 129, 0.3);
  
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --danger-border: rgba(239, 68, 68, 0.3);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  background-image: 
    radial-gradient(at 0% 0%, rgba(30, 58, 138, 0.25) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(120, 53, 15, 0.2) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(15, 23, 42, 0.9) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   LOGIN MODAL GATE
   -------------------------------------------------------------------------- */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(9, 13, 22, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(59, 130, 246, 0.15);
  border-radius: 24px;
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  text-align: center;
}

.login-icon {
  width: 64px;
  height: 64px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  border: 1px solid var(--border-glow);
}

.login-card h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}

.login-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.input-field {
  text-align: left;
  margin-bottom: 1.25rem;
}

.input-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.input-field select,
.input-field input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  font-family: var(--font-body);
  outline: none;
  transition: all 0.2s ease;
}

.input-field select:focus,
.input-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.error-msg {
  color: var(--danger);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.btn-block {
  width: 100%;
}

.app-hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   NAVIGATION BAR
   -------------------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
}

.brand-icon {
  color: var(--primary-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
  background: rgba(59, 130, 246, 0.15);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  border: 1px solid var(--border-glow);
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-logout:hover {
  color: #fff;
  border-color: var(--danger);
  background: var(--danger-bg);
}

/* --------------------------------------------------------------------------
   HERO SECTION
   -------------------------------------------------------------------------- */
.hero {
  padding: 3.5rem 1.5rem 2.5rem;
  text-align: center;
  max-width: 1100px;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--gold-glow);
  color: var(--accent-gold);
  padding: 0.4rem 1rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 750px;
  margin: 0 auto 2rem;
}

/* Progress Bar Card */
.progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  max-width: 750px;
  margin: 0 auto 2rem;
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.15);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.progress-header strong {
  color: var(--primary-light);
  font-family: var(--font-heading);
  font-size: 1rem;
}

.progress-bar-bg {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--success));
  border-radius: 6px;
  transition: width 0.3s ease;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  text-align: left;
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
}

.stat-card.gold {
  border-color: var(--gold-glow);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(15, 23, 42, 0.8));
}

.stat-card.danger {
  border-color: var(--danger-border);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(15, 23, 42, 0.8));
}

.stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.2rem;
}

.stat-card.gold .stat-value {
  color: var(--accent-gold);
}

.stat-card.danger .stat-value {
  color: var(--danger);
}

.stat-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   MAIN CONTENT & SECTIONS
   -------------------------------------------------------------------------- */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.section {
  margin-bottom: 3.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}
.section-header-text {
  flex: 1;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
  backdrop-filter: blur(12px);
}

/* --------------------------------------------------------------------------
   COMPARISON CARDS (SELL VS RENT)
   -------------------------------------------------------------------------- */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.option-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
  position: relative;
}

.option-card.recommended {
  border-color: var(--success-border);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.15);
}

.option-card.warning-card {
  border-color: var(--danger-border);
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.success-badge {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.danger-badge {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.option-card h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.big-number {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.success-text { color: var(--success); }
.danger-text { color: var(--danger); }

.number-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.feature-list {
  list-style: none;
  margin-bottom: 1.75rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.92rem;
  margin-bottom: 0.85rem;
  color: #cbd5e1;
}

.icon-success { color: var(--success); flex-shrink: 0; margin-top: 2px; }
.icon-danger { color: var(--danger); flex-shrink: 0; margin-top: 2px; }

.breakdown-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
}

.box-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-bottom: 0.6rem;
  color: var(--text-muted);
}

.box-row.total {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

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

/* --------------------------------------------------------------------------
   COMPS & VALUATION PROOF SECTION
   -------------------------------------------------------------------------- */
.subsection-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.comp-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
}

.comp-box.highlight-comp {
  border-color: var(--primary-light);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(15, 23, 42, 0.6));
}

.comp-box.highlight-danger {
  border-color: rgba(239, 68, 68, 0.4);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(15, 23, 42, 0.6));
}

.comp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.comp-address {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}

.comp-price {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--success);
  font-size: 1.1rem;
}

.comp-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}

.comp-box p {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.repair-boost-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 1.25rem 1.5rem;
  border-radius: 14px;
}

.boost-icon {
  width: 44px;
  height: 44px;
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.boost-text {
  font-size: 0.9rem;
  color: #f1f5f9;
}

.boost-text strong {
  color: var(--accent-gold);
}

/* --------------------------------------------------------------------------
   INTERACTIVE CALCULATORS
   -------------------------------------------------------------------------- */
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

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

  .calculator-grid > *,
  .calc-inputs,
  .calc-results,
  .input-group,
  .chart-container {
    min-width: 0;
    max-width: 100%;
  }

  .chart-container canvas {
    max-width: 100% !important;
  }
}

.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.slider-val {
  color: #fff;
  font-weight: 700;
  font-family: var(--font-heading);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-light);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
  border: 2px solid #fff;
}

.calc-results {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.result-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(15, 23, 42, 0.8));
  border: 1px solid var(--border-glow);
  border-radius: 20px;
  padding: 1.75rem;
  text-align: center;
}

.result-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.result-amount {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 0.4rem;
}

.result-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.chart-container {
  height: 230px;
  position: relative;
}

/* ETF Info Box & Income Calculator Stats */
.etf-info-box {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
}

.etf-badge {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary-light);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.etf-info-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.etf-info-box li {
  font-size: 0.82rem;
  color: #cbd5e1;
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

.etf-info-box li strong {
  color: #fff;
}

.income-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(15, 23, 42, 0.8));
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.income-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.stat-subcard {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
}

.subcard-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.subcard-val {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  margin-top: 0.2rem;
}

/* --------------------------------------------------------------------------
   INFO GRIDS & CHECKLIST
   -------------------------------------------------------------------------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.75rem;
}

.info-icon {
  width: 48px;
  height: 48px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.info-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.75rem;
}

.info-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Checklist Tabs & Items */
.checklist-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tab-btn.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary-light);
  border: 1px solid var(--border-glow);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.check-item {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.check-item:hover {
  background: rgba(30, 41, 59, 0.6);
}

.check-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
  margin-top: 2px;
}

.check-item label {
  font-size: 0.92rem;
  color: #cbd5e1;
  cursor: pointer;
}

.check-item label strong {
  color: #fff;
}

.table-responsive {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* --------------------------------------------------------------------------
   NOTES FEATURE STYLES
   -------------------------------------------------------------------------- */
.btn-note-toggle {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--primary-light);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
  transition: all 0.2s ease;
}
.btn-note-toggle:hover {
  background: var(--primary);
  color: #fff;
}
.btn-note-toggle i {
  width: 14px;
  height: 14px;
}

.note-count-badge {
  background: rgba(96, 165, 250, 0.2);
  color: #60a5fa;
  border-radius: 10px;
  padding: 0.05rem 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 0.3rem;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.attachment-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399 !important;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.2s;
  font-weight: 500;
}
.attachment-badge:hover {
  background: rgba(16, 185, 129, 0.3);
  border-color: #34d399;
}
.attachment-badge i {
  width: 14px;
  height: 14px;
}

.notes-container {
  width: 100%;
  margin-top: 0.5rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.notes-container.hidden {
  display: none;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.note-entry {
  background: rgba(30, 41, 59, 0.6);
  border-left: 3px solid var(--primary);
  padding: 0.75rem;
  border-radius: 4px 8px 8px 4px;
  position: relative;
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
}

.note-meta {
  color: #94a3b8;
}
.note-author {
  font-weight: 600;
  color: #fff;
  background: rgba(96, 165, 250, 0.2);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-right: 0.4rem;
}

.note-actions button {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  margin-left: 0.5rem;
  transition: color 0.2s;
  font-size: 0.75rem;
}
.note-actions button:hover {
  color: #fff;
}
.note-actions button.btn-delete:hover {
  color: var(--danger);
}

.note-text {
  font-size: 0.85rem;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
}

.notes-input-area {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.notes-input-area textarea {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem;
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  resize: vertical;
  min-height: 60px;
}
.notes-input-area textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.notes-input-area .note-controls {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   EMAIL TEMPLATE TOOL
   -------------------------------------------------------------------------- */
.template-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
}

.template-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.template-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}

#template-text {
  background: rgba(9, 13, 22, 0.8);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-note {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .main-content {
    max-width: 100%;
    padding-inline: 1rem;
  }

  .glass-card,
  .section {
    max-width: 100%;
    min-width: 0;
  }

  .section-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn-section-note {
    align-self: flex-start;
    margin-left: 0;
  }

  .hero h1 { font-size: 2rem; }
  .big-number { font-size: 2.25rem; }
  .nav-links { display: none; }
  .comps-grid { grid-template-columns: 1fr; }
  .income-stats-grid { grid-template-columns: 1fr; }
  .official-links-grid { grid-template-columns: 1fr; }

  .checklist-tabs {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .tab-btn {
    flex: 1 1 10rem;
    justify-content: center;
    white-space: normal;
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
    text-align: center;
  }

  .table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    contain: layout paint;
    overscroll-behavior-x: contain;
  }

  #asset-ledger .table-responsive {
    overflow-x: visible;
    contain: none;
  }

  #asset-ledger .ledger-table {
    width: 100% !important;
    min-width: 0;
    border-collapse: separate !important;
    border-spacing: 0 0.75rem;
  }

  #asset-ledger .ledger-table thead {
    display: none;
  }

  #asset-ledger .ledger-table,
  #asset-ledger .ledger-table tbody,
  #asset-ledger .ledger-table tr,
  #asset-ledger .ledger-table td {
    display: block;
    width: 100%;
  }

  #asset-ledger .ledger-table tr {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem;
  }

  #asset-ledger .ledger-table td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem 0 !important;
    text-align: right !important;
    border: 0 !important;
  }

  #asset-ledger .ledger-table td::before {
    content: "";
    flex: 0 0 7.5rem;
    text-align: left;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }

  #asset-ledger .ledger-table td:nth-child(1)::before { content: "Institution"; }
  #asset-ledger .ledger-table td:nth-child(2)::before { content: "Type"; }
  #asset-ledger .ledger-table td:nth-child(3)::before { content: "Amount"; }
  #asset-ledger .ledger-table td:nth-child(4)::before { content: "Status"; }
  #asset-ledger .ledger-table td:nth-child(5)::before { content: "Actions"; }

  #asset-ledger .ledger-table td:last-child {
    justify-content: flex-end;
  }
}

/* Force Link Card Styles */
.official-links-grid a.link-card, .official-links-grid a.link-card:visited {
  text-decoration: none !important;
  color: #ffffff !important;
  background: rgba(30, 41, 59, 0.9) !important;
}
.official-links-grid a.link-card .link-title {
  color: #ffffff !important;
}
.official-links-grid a.link-card .link-desc {
  color: #e2e8f0 !important;
}

/* Highlight pulse animation for Go to Source feature */
@keyframes pulse-gold {
  0% { background-color: rgba(234, 179, 8, 0.4); box-shadow: 0 0 15px rgba(234, 179, 8, 0.5); }
  50% { background-color: rgba(234, 179, 8, 0.2); box-shadow: 0 0 5px rgba(234, 179, 8, 0.2); }
  100% { background-color: transparent; box-shadow: none; }
}
.highlight-pulse {
  animation: pulse-gold 2.5s ease-out;
  border-radius: 8px;
}
