/* CSS Variables and Global Customizations */
:root {
  --primary-color: #026fcf;
  --primary-hover: #0159a7;
  --primary-light: #eff6ff;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --accent-color: #026fcf;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  
  --badge-gold-bg: #fef9c3;
  --badge-gold-text: #713f12;
  --badge-green-bg: #dcfce7;
  --badge-green-text: #15803d;
  
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 2rem;
}

/* Header Styling */
.app-header {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-logo {
  font-size: 1.5rem;
  color: var(--primary-color);
  font-weight: bold;
}

.brand-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.header-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.rating-val {
  font-weight: 700;
  color: var(--text-main);
}

.rating-stars {
  color: #fbbf24;
  letter-spacing: 2px;
}

.rating-count {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.rating-count:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Container */
.container {
  max-width: 1080px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* Title Section */
.title-section {
  text-align: center;
  margin-bottom: 2rem;
}

.page-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Calculator Card */
.calculator-card {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  margin-bottom: 2rem;
}

.purpose-selector {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.purpose-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.purpose-buttons {
  display: flex;
  background-color: var(--bg-color);
  padding: 4px;
  border-radius: 8px;
  width: fit-content;
  border: 1px solid var(--border-color);
}

.btn-purpose {
  border: none;
  background: transparent;
  padding: 0.5rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-purpose.active {
  background-color: var(--card-bg);
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

/* Form Grid */
.calc-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem 1.5rem;
  align-items: end;
}

/* Form Groups */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
}

.field-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  outline: none;
  transition: var(--transition-smooth);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(2, 111, 207, 0.15);
}

.form-control.dropdown {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.25rem;
  cursor: pointer;
}

/* Input wrappers for prefix/suffix */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper.prefix .form-control {
  padding-left: 1.75rem;
}

.input-prefix {
  position: absolute;
  left: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  pointer-events: none;
}

.input-wrapper.suffix .form-control {
  padding-right: 1.75rem;
}

.input-suffix {
  position: absolute;
  right: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  pointer-events: none;
}

/* Dual Input for Down Payment */
.dual-input-wrapper {
  display: grid;
  grid-template-columns: 2fr 1fr;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  background-color: var(--card-bg);
  transition: var(--transition-smooth);
}

.dual-input-wrapper:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(2, 111, 207, 0.15);
}

.dual-input-wrapper .form-control {
  border: none;
  border-radius: 0;
  padding: 0.65rem 0.5rem;
}

.dual-input-wrapper .dollar-part {
  border-right: 1px solid var(--border-color);
}

.dual-input-wrapper .dollar-part .form-control {
  padding-left: 1.5rem;
}

.dual-input-wrapper .percent-part .form-control {
  padding-right: 1.5rem;
  text-align: center;
}

/* ZIP Specific elements */
.zip-group .form-control {
  padding-right: 8rem;
}

.location-badge {
  position: absolute;
  right: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-color);
  background-color: var(--primary-light);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  pointer-events: none;
  max-width: 7.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Refinance LTV badge */
.ltv-badge {
  position: absolute;
  right: 0.5rem;
  bottom: -1.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--badge-green-text);
  background-color: var(--badge-green-bg);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

/* Toggle Switch styling */
.toggle-group {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.5rem;
  height: 2.75rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .3s;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Update Button container */
.btn-update-group {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(2, 111, 207, 0.2);
}

.btn-update {
  width: 100%;
  padding: 0.85rem;
  font-size: 1rem;
}

/* Filter controls bar */
.results-controls {
  margin-bottom: 1.5rem;
}

.term-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  scrollbar-width: thin;
}

.term-tabs::-webkit-scrollbar {
  height: 4px;
}

.term-tabs::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 2px;
}

.tab-pill {
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.tab-pill:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background-color: var(--primary-light);
}

.tab-pill.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.sub-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.quote-info {
  font-size: 0.85rem;
}

.quote-id-label {
  color: var(--text-muted);
  font-weight: 500;
}

.quote-id {
  font-weight: 700;
  color: var(--text-main);
  margin-left: 0.25rem;
}

.checkbox-options {
  display: flex;
  gap: 1.5rem;
}

.control-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
}

.control-checkbox input {
  display: none;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  display: inline-block;
  position: relative;
  background-color: var(--card-bg);
  transition: var(--transition-smooth);
}

.control-checkbox input:checked + .checkbox-custom {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.control-checkbox input:checked + .checkbox-custom::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.sort-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.sort-selector label {
  color: var(--text-muted);
}

.sort-selector select {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.4rem 1.5rem 0.4rem 0.6rem;
  background-color: var(--card-bg);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  background-size: 0.8rem;
}

/* Rate Cards List */
.rates-cards-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Rate Card Structure */
.rate-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  transition: var(--transition-smooth);
}

.rate-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.program-tag {
  width: 45px;
  align-self: stretch;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  border-right: 1px solid var(--border-color);
}

.rate-card-content {
  flex: 1;
  padding: 1.25rem 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
}

.rate-apr-col, .fees-points-col, .payment-col, .term-col {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.col-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.col-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Point badge styles */
.badge-points {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px;
  margin-left: 0.4rem;
  background-color: var(--badge-gold-bg);
  color: var(--badge-gold-text);
}

.badge-credit {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px;
  margin-left: 0.4rem;
  background-color: var(--badge-green-bg);
  color: var(--badge-green-text);
}

.card-action-col {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-card-action {
  background-color: var(--primary-color);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  padding: 0.55rem 1.25rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-card-action:hover {
  background-color: var(--primary-hover);
}

/* Inline Promo Card */
.promo-card {
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 1.5px dashed var(--primary-color);
  border-radius: var(--border-radius-md);
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.promo-details {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.promo-icon {
  font-size: 2.25rem;
  line-height: 1;
}

.promo-info h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.promo-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn-promo-action {
  background-color: var(--primary-color);
  color: white;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.btn-promo-action:hover {
  background-color: var(--primary-hover);
}

.rates-timestamp {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Inbox alert callout banner */
.inbox-alert-banner {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin: 2rem 0;
}

.bell-icon-wrapper {
  background-color: var(--primary-light);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.bell-icon {
  font-size: 1.4rem;
}

.alert-banner-content {
  flex: 1;
}

.alert-banner-content h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.alert-banner-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.btn-alert-subscribe {
  white-space: nowrap;
}

/* Reviews Section */
.reviews-section {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  margin-top: 3rem;
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

.reviews-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-bottom: 1.5px solid var(--border-color);
  margin-bottom: 2rem;
  gap: 0.5rem;
}

.review-tab {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.review-tab:hover {
  background-color: var(--primary-light);
}

.review-tab.active {
  border-bottom-color: var(--primary-color);
}

.review-source-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.review-score {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-color);
}

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

.review-tab.active .review-source-name {
  color: var(--primary-color);
}

/* Testimonials list */
.review-testimonials {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.testimonial-card {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.testimonial-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

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

.testimonial-author {
  font-weight: 700;
  font-size: 0.9rem;
}

.testimonial-source {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.testimonial-stars {
  color: #fbbf24;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.testimonial-body {
  font-size: 0.875rem;
  color: #334155;
  font-style: italic;
}

/* Footer styling */
.app-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border-color);
  padding: 3rem 1.5rem;
  background-color: var(--card-bg);
}

.footer-container {
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}

.disclosure {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-links span {
  color: var(--border-color);
}

/* Modals & Overlays */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: var(--card-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  width: 100%;
  border: 1px solid var(--border-color);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 1.75rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 10;
}

.modal-close:hover {
  color: var(--text-main);
  transform: rotate(90deg);
}

/* Modal 1: Subscribe */
.card-alert-box {
  max-width: 480px;
}

.modal-header-graphic {
  background: linear-gradient(135deg, #f0f7ff 0%, #dbeafe 100%);
  padding: 2.5rem 1rem 0;
  display: flex;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-top-left-radius: var(--border-radius-lg);
  border-top-right-radius: var(--border-radius-lg);
}

.modal-bell-glow {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  opacity: 0.15;
  transform: rotate(15deg);
}

.modal-phone-mockup {
  width: 200px;
  height: 250px;
  background-color: #0f172a;
  border-radius: 20px 20px 0 0;
  padding: 6px 6px 0;
  box-shadow: 0 10px 25px rgba(15,23,42,0.15);
}

.phone-screen {
  background-color: #f8fafc;
  width: 100%;
  height: 100%;
  border-radius: 14px 14px 0 0;
  padding: 6px;
  font-size: 0.5rem;
  overflow: hidden;
}

.phone-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.45rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding: 0 4px;
}

.phone-app-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mail-icon {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.phone-app-content h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  margin-bottom: 0.15rem;
}

.phone-sub {
  font-size: 0.45rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.phone-rate-card {
  background-color: var(--card-bg);
  border: 0.5px solid var(--border-color);
  border-radius: 6px;
  width: 100%;
  padding: 6px;
  text-align: left;
  margin-bottom: 0.4rem;
  box-shadow: var(--shadow-sm);
}

.card-date {
  font-size: 0.35rem;
  color: var(--text-muted);
  text-transform: uppercase;
  display: block;
}

.card-rates {
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-main);
  display: block;
  margin-bottom: 0.2rem;
}

.card-details-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  font-size: 0.35rem;
  gap: 2px;
  color: var(--text-muted);
}

.card-details-grid strong {
  color: var(--text-main);
  font-size: 0.4rem;
}

.modal-body-content {
  padding: 2rem;
  text-align: center;
}

.modal-body-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.modal-body-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.modal-subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.btn-modal-submit {
  padding: 0.75rem;
  font-size: 0.95rem;
  border-radius: var(--border-radius-sm);
}

.security-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Modal 2: Personalize Details */
.personalize-box {
  max-width: 820px;
}

.personalize-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr;
}

.personalize-left {
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  padding: 2.5rem;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.personalize-left h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  line-height: 1.35;
  margin-bottom: 1.5rem;
}

.device-mockup-wrap {
  width: 190px;
  height: 280px;
  background-color: #0f172a;
  border-radius: 24px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 1.5rem;
}

.phone-screen.dashboard-preview {
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  background-color: #f1f5f9;
}

.phone-nav-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.55rem;
  background-color: var(--card-bg);
  padding: 0.25rem 0.5rem;
  border-bottom: 0.5px solid var(--border-color);
}

.phone-dashboard-body {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.phone-dashboard-body h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  text-align: left;
}

.small-dashboard-card {
  background-color: var(--card-bg);
  border: 0.5px solid var(--border-color);
  border-radius: 6px;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-align: left;
}

.card-icon {
  font-size: 0.75rem;
  color: var(--primary-color);
}

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

.card-metric strong {
  font-family: 'Outfit', sans-serif;
  font-size: 0.5rem;
  color: var(--text-main);
}

.card-metric span {
  font-size: 0.35rem;
  color: var(--text-muted);
}

.dots-indicators {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 0.2rem;
}

.dot {
  width: 4px;
  height: 4px;
  background-color: #cbd5e1;
  border-radius: 50%;
}

.dot.active {
  background-color: var(--primary-color);
  width: 10px;
  border-radius: 2px;
}

.reviews-compact {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  text-align: center;
}

.review-compact-stars {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.review-compact-stars .stars {
  color: #fbbf24;
}

.personalize-right {
  padding: 2.5rem;
}

.personalize-right h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

.details-summary-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.8rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

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

.summary-label {
  color: var(--text-muted);
  font-weight: 500;
}

.summary-val {
  font-weight: 700;
  color: var(--text-main);
}

.summary-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.btn-summary-continue {
  padding: 0.65rem 1.75rem;
}

/* Personalize Edit Mode */
.personalize-edit-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.flex-row {
  display: flex;
  background-color: var(--bg-color);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.btn-edit-purpose {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-edit-purpose.active {
  background-color: var(--card-bg);
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.flex-row-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-secondary {
  background-color: #f1f5f9;
  color: #334155;
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background-color: #e2e8f0;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-modal {
  animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

/* Responsive Rules */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .container {
    padding: 0 1rem;
    margin: 1rem auto;
  }
  
  .page-title {
    font-size: 1.75rem;
  }
  
  .calculator-card {
    padding: 1.25rem;
  }
  
  .calc-form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .rate-card-content {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.25rem;
  }
  
  .card-action-col {
    justify-content: space-between;
    width: 100%;
  }
  
  .promo-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem;
  }
  
  .btn-promo-action {
    width: 100%;
  }
  
  .inbox-alert-banner {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem;
  }
  
  .btn-alert-subscribe {
    width: 100%;
  }
  
  .reviews-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .personalize-grid {
    grid-template-columns: 1fr;
  }
  
  .personalize-left {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
  }
  
  .personalize-right {
    padding: 1.5rem;
  }
}
