:root {
  --solar-primary: #f59e0b;
  --solar-dark: #0f172a;
  --solar-border: #e5e7eb;
  --solar-bg: #f9fafb;
}

/* --------------------------------------------------
   GENEL / LAYOUT
-------------------------------------------------- */

body {
  background: radial-gradient(circle at top left, #ffffff, #eef2ff);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #111827;
}

.solar-app {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
}

.solar-widget {
  width: 100%;
  max-width: 1200px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.15);
  padding: 24px 24px 28px;
}

@media (min-width: 992px) {
  .solar-widget {
    padding: 28px 32px 32px;
  }
}

/* --------------------------------------------------
   HEADER & STEPS
-------------------------------------------------- */

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

.solar-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--solar-dark);
}

.solar-subtitle {
  font-size: 0.9rem;
  color: #6b7280;
}

.solar-badge {
  background: rgba(245, 158, 11, 0.12);
  color: var(--solar-primary);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.solar-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.solar-step {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--solar-border);
  background: #f9fafb;
  font-size: 0.8rem;
  white-space: nowrap;
}

.solar-step-index {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  background: #e5e7eb;
  color: #4b5563;
  flex-shrink: 0;
}

.solar-step-text {
  overflow: hidden;
  text-overflow: ellipsis;
  color: #6b7280;
}

.solar-step.active {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.06);
}

.solar-step.active .solar-step-index {
  background: var(--solar-primary);
  color: #111827;
}

.solar-step.active .solar-step-text {
  color: #374151;
  font-weight: 500;
}

.solar-step.done {
  border-color: #22c55e33;
  background: #ecfdf5;
}

.solar-step.done .solar-step-index {
  background: #22c55e;
  color: #ecfdf5;
}

/* --------------------------------------------------
   ANA GRID (FORM + CANLI ÖZET)
-------------------------------------------------- */

.solar-main {
  display: grid;
  grid-template-columns: minmax(0, 3.5fr) minmax(0, 2.7fr);
  gap: 18px;
}

@media (max-width: 991.98px) {
  .solar-main {
    grid-template-columns: minmax(0, 1fr);
  }
}

.solar-card {
  background: var(--solar-bg);
  border-radius: 20px;
  padding: 16px 16px 18px;
  border: 1px solid var(--solar-border);
  min-height: 260px;
}

.solar-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.solar-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--solar-dark);
}

.solar-card-desc {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 12px;
}

.badge-small {
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.7rem;
  background: #111827;
  color: #e5e7eb;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* --------------------------------------------------
   FORM ELEMANLARI
-------------------------------------------------- */

.solar-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.solar-pill {
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  padding: 7px 11px;
  font-size: 0.85rem;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease-out;
}

.solar-pill i {
  font-size: 0.9rem;
}

.solar-pill.active {
  background: #111827;
  color: #f9fafb;
  border-color: #111827;
}

.solar-pill.active i {
  color: #fbbf24;
}

label.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #4b5563;
}

.form-select,
.form-control {
  font-size: 0.9rem;
  border-radius: 10px;
}

/* #map {
  width: 100%;
  height: 360px;
  border-radius: 16px;
  border: 1px solid var(--solar-border);
  overflow: hidden;
} */

/* --------------------------------------------------
   FOOTER BUTONLARI
-------------------------------------------------- */

.solar-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.btn-solar-primary {
  background: var(--solar-primary);
  border-color: var(--solar-primary);
  color: #111827;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  padding-inline: 18px;
}

.btn-solar-primary:hover {
  background: #fbbf24;
  border-color: #fbbf24;
  color: #111827;
}

.btn-solar-ghost {
  border-radius: 999px;
  font-size: 0.9rem;
  padding-inline: 14px;
  border-color: #e5e7eb;
  color: #6b7280;
  background: #ffffff;
}

.btn-solar-ghost:hover {
  background: #f3f4f6;
  color: #111827;
}

/* --------------------------------------------------
   ÖZET / SONUÇ ALANI
-------------------------------------------------- */

.solar-result-main {
  background: linear-gradient(135deg, #f97316, #facc15);
  border-radius: 18px;
  padding: 12px 14px 14px;
  color: #111827;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.solar-result-main::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.6);
  opacity: 0.5;
}

.solar-result-main h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.solar-result-main p {
  margin: 0;
  font-size: 0.8rem;
}

.solar-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

.solar-result-item {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 12px;
  padding: 7px 9px;
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.solar-result-label {
  color: #4b5563;
  font-size: 0.7rem;
}

.solar-result-value {
  font-weight: 600;
  color: #111827;
}

.solar-muted {
  font-size: 0.78rem;
  color: #6b7280;
}

/* --------------------------------------------------
   RAPOR BLOĞU GENEL
-------------------------------------------------- */

.solar-report {
  margin-top: 24px;
}

.report-container {
  max-width: 1100px;
  margin: 0 auto;
  background: #ffffff;
  padding: 24px 28px;
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 12px;
}

.report-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #111827;
}

.section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.section-card {
  background: #f9fafb;
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  font-size: 0.8rem;
}

.mini-label {
  font-size: 0.75rem;
  color: #6b7280;
}

.mini-value {
  font-size: 0.82rem;
  font-weight: 500;
  color: #111827;
}

.table-scenarios th,
.table-scenarios td {
  font-size: 0.78rem;
  vertical-align: middle;
}

.btn-print {
  border-radius: 999px;
  font-size: 0.8rem;
}

/* --------------------------------------------------
   HARİTA & ÇATI GÖRSEL ORTAK STİLLERİ
-------------------------------------------------- */

.section-card .visual-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-card .visual-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.roof-visual-caption,
#repMapNote {
  font-size: 0.8rem;
}

/* --------------------------------------------------
   AI TEKNİK EKİPMAN TABLOSU
-------------------------------------------------- */

#repEquipmentText .card {
  border-radius: 14px;
}

#repEquipmentText .card-title {
  font-size: 1rem;
  font-weight: 600;
}

#repEquipmentText .card-subtitle {
  font-size: 0.8rem;
}

#repEquipmentText ul {
  margin-bottom: 0.5rem;
}

#repEquipmentText li {
  font-size: 0.85rem;
  margin-bottom: 2px;
}

#repEquipmentText .eq-label {
  font-weight: 600;
  color: #4b5563;
  min-width: 80px;
  display: inline-block;
}

#repEquipmentText .eq-price {
  font-size: 0.9rem;
  font-weight: 600;
  color: #16a34a;
}

#repEquipmentText td.price-cell {
  white-space: nowrap;
}

/* genel fiyat hücreleri için de garanti olsun */
.price-cell {
  white-space: nowrap;
}

/* NASA chart için küçük margin */
.nasa-section {
  margin-bottom: 16px;
}


:root {
  --solar-primary: #f59e0b;
  --solar-dark: #0f172a;
  --solar-border: #e5e7eb;
  --solar-bg: #f9fafb;
}

/* === GENEL === */

body {
  background: radial-gradient(circle at top left, #ffffff, #eef2ff);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111827;
}

.solar-app {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
}

.solar-widget {
  width: 100%;
  max-width: 1200px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.15);
  padding: 24px 24px 28px;
}

@media (min-width: 992px) {
  .solar-widget {
    padding: 28px 32px 32px;
  }
}

/* === HEADER & ADIMLAR === */

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

.solar-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--solar-dark);
}

.solar-subtitle {
  font-size: 0.9rem;
  color: #6b7280;
}

.solar-badge {
  background: rgba(245, 158, 11, 0.12);
  color: var(--solar-primary);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.solar-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.solar-step {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--solar-border);
  background: #f9fafb;
  font-size: 0.8rem;
  white-space: nowrap;
}

.solar-step-index {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  background: #e5e7eb;
  color: #4b5563;
  flex-shrink: 0;
}

.solar-step-text {
  overflow: hidden;
  text-overflow: ellipsis;
  color: #6b7280;
}

.solar-step.active {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.06);
}

.solar-step.active .solar-step-index {
  background: var(--solar-primary);
  color: #111827;
}

.solar-step.active .solar-step-text {
  color: #374151;
  font-weight: 500;
}

.solar-step.done {
  border-color: #22c55e33;
  background: #ecfdf5;
}

.solar-step.done .solar-step-index {
  background: #22c55e;
  color: #ecfdf5;
}

/* === LAYOUT === */

.solar-main {
  display: grid;
  grid-template-columns: minmax(0, 3.5fr) minmax(0, 2.7fr);
  gap: 18px;
}

@media (max-width: 991.98px) {
  .solar-main {
    grid-template-columns: minmax(0, 1fr);
  }
}

.solar-card {
  background: var(--solar-bg);
  border-radius: 20px;
  padding: 16px 16px 18px;
  border: 1px solid var(--solar-border);
  min-height: 260px;
}

.solar-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.solar-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--solar-dark);
}

.solar-card-desc {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 12px;
}

.badge-small {
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.7rem;
  background: #111827;
  color: #e5e7eb;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* === FORM / INPUTLAR === */

.solar-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.solar-pill {
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  padding: 7px 11px;
  font-size: 0.85rem;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease-out;
}

.solar-pill i {
  font-size: 0.9rem;
}

.solar-pill.active {
  background: #111827;
  color: #f9fafb;
  border-color: #111827;
}

.solar-pill.active i {
  color: #fbbf24;
}

label.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #4b5563;
}

.form-select,
.form-control {
  font-size: 0.9rem;
  border-radius: 10px;
}

/* === HARİTA === */

#map {
  width: 100%;
  height: 360px;
  border-radius: 16px;
  border: 1px solid var(--solar-border);
  overflow: hidden;
}

/* === FOOTER BUTONLAR === */

.solar-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.btn-solar-primary {
  background: var(--solar-primary);
  border-color: var(--solar-primary);
  color: #111827;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  padding-inline: 18px;
}

.btn-solar-primary:hover {
  background: #fbbf24;
  border-color: #fbbf24;
  color: #111827;
}

.btn-solar-ghost {
  border-radius: 999px;
  font-size: 0.9rem;
  padding-inline: 14px;
  border-color: #e5e7eb;
  color: #6b7280;
  background: #ffffff;
}

.btn-solar-ghost:hover {
  background: #f3f4f6;
  color: #111827;
}

/* === ÖZET VE SONUÇ === */

.solar-result-main {
  background: linear-gradient(135deg, #f97316, #facc15);
  border-radius: 18px;
  padding: 12px 14px 14px;
  color: #111827;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.solar-result-main::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.6);
  opacity: 0.5;
}

.solar-result-main h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.solar-result-main p {
  margin: 0;
  font-size: 0.8rem;
}

.solar-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

.solar-result-item {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 12px;
  padding: 7px 9px;
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.solar-result-label {
  color: #4b5563;
  font-size: 0.7rem;
}

.solar-result-value {
  font-weight: 600;
  color: #111827;
}

.solar-muted {
  font-size: 0.78rem;
  color: #6b7280;
}

/* === RAPOR BLOĞU (EKRAN) === */

.solar-report {
  margin-top: 24px;
}

.report-container {
  max-width: 1100px;
  margin: 0 auto;
  background: #ffffff;
  padding: 24px 28px;
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 12px;
}

.report-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #111827;
}

.section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.section-card {
  background: #f9fafb;
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  font-size: 0.8rem;
}

.mini-label {
  font-size: 0.75rem;
  color: #6b7280;
}

.mini-value {
  font-size: 0.82rem;
  font-weight: 500;
  color: #111827;
}

.table-scenarios th,
.table-scenarios td {
  font-size: 0.78rem;
  vertical-align: middle;
}

.btn-print {
  border-radius: 999px;
  font-size: 0.8rem;
}

/* Çatı & Harita görselleri için ortak kutu */

.section-card .visual-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-card .visual-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.roof-visual-caption,
#repMapNote {
  font-size: 0.8rem;
}

.report-location-card {
  border-radius: 12px;
  background: #ffffff;
}

.object-cover {
  object-fit: cover;
}

.report-location-card img {
  width: 100%;
  height: 100%;
  max-height: 320px;
}

/* NASA bölümü */

.nasa-section {
  margin-top: 16px;
}

#nasaChart {
  height: 320px;
}

/* Teknik ekipman fiyat hücresi */

.price-cell {
  white-space: nowrap;
}

/* ================================
   YAZDIRMA (PDF / Print) STİLLERİ
==================================*/
@media print {

  /* Sayfa boyutu ve kenar boşlukları */
  @page {
    size: A4;
    margin: 12mm;
    /* tüm kenarlarda ~1.2 cm boşluk */
  }

  body {
    background: #ffffff !important;
  }

  .solar-app {
    padding: 0;
  }

  .solar-widget {
    box-shadow: none;
    border-radius: 0;
  }

  /* Uygulama kısmını gizle, sadece rapor kalsın */
  .solar-header,
  .solar-steps,
  .solar-main,
  .solar-badge,
  .btn-solar-primary,
  .btn-solar-ghost {
    display: none !important;
  }

  /* Rapor üstte, kenar boşluğunu @page veriyor */
  .solar-report {
    margin-top: 0;
  }

  .report-container {
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    /* iç padding istemezsen 0 bırak; istersen 4–6mm verebilirsin */
  }

  /* Kartların sayfa ortasında bölünmesini azalt */
  .section-card,
  .report-card,
  .table,
  #nasaChart {
    page-break-inside: avoid;
  }

  /* NASA bölümü gerekirse yeni sayfadan başlasın */
  .nasa-section {
    page-break-before: auto;
  }

  /* Fiyat hücreleri tek satır kalsın */
  .price-cell {
    white-space: nowrap;
  }

}

/* pdf görüntüleme butonu yazdırma ekranında gizle */

@media print {
  .btn-print {
    display: none !important;
    visibility: hidden !important;
  }
}

/* drawing css */

/* Haritanın yüksekliği */
#map {
    width: 100%;
    height: 360px; /* sende kaç ise bunu kullan */
    border-radius: 12px;
    overflow: hidden;
}

/* Map container */
.map-container {
    position: relative;
    width: 100%;
}

/* Buton grubu */
.map-tools {
    position: absolute;
    left:10px;
    bottom:30px;
    z-index: 9999;
    display: flex;
    gap: 6px;
}

/* Buton görünümü */
.map-tools .btn {
    padding: 6px 10px;
    border-radius: 8px;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Yalnızca rapor kısmını yazdır, geri kalan her şeyi gizle */
@media print {
    /* Önce her şeyi görünmez yap */
    body * {
        visibility: hidden;
    }

    /* Sadece rapor alanını ve içindekileri görünür yap */
    #reportSection,
    #reportSection * {
        visibility: visible;
    }

    /* Raporu sayfanın en üstüne sabitle */
    #reportSection {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    /* Header, footer, butonlar vs. görünmesin */
    .site-header,
    .site-footer,
    .btn-print,
    .no-print {
        display: none !important;
    }
}
