/**
 * JORO Vision - Enhanced Property Intelligence Styling
 * Professional insurance underwriting interface
 * 
 * @version 20260131v1
 */

/* ============================================
   PROPERTY INTELLIGENCE CONTAINER
   ============================================ */

.property-intelligence-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

/* ============================================
   PROPERTY INTEL CARDS
   ============================================ */

.property-intel-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.property-intel-card-header {
  padding: 16px 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.property-intel-card-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.property-intel-card-body {
  padding: 24px;
}

/* ============================================
   BADGES
   ============================================ */

.intel-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.intel-badge.risk-critical,
.intel-badge.critical {
  background: #fee2e2;
  color: #991b1b;
}

.intel-badge.risk-high,
.intel-badge.high {
  background: #fef3c7;
  color: #92400e;
}

.intel-badge.risk-medium,
.intel-badge.medium {
  background: #fef3c7;
  color: #92400e;
}

.intel-badge.risk-low,
.intel-badge.low {
  background: #d1fae5;
  color: #065f46;
}

.intel-badge.success {
  background: #d1fae5;
  color: #065f46;
}

.intel-badge.warning {
  background: #fed7aa;
  color: #92400e;
}

/* ============================================
   EXECUTIVE SUMMARY
   ============================================ */

.intel-summary {
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
}

.intel-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-item label {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-item strong,
.summary-item span {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

/* Recommendation Status */
.recommendation-accept {
  color: #059669;
}

.recommendation-loading {
  color: #d97706;
}

.recommendation-refer {
  color: #dc2626;
}

.recommendation-survey {
  color: #dc2626;
}

.recommendation-decline {
  color: #7f1d1d;
  font-weight: 700;
}

/* Maintenance Display */
.maintenance-display {
  display: flex;
  align-items: center;
  gap: 12px;
}

.maintenance-grade {
  display: inline-block;
  width: 48px;
  height: 48px;
  line-height: 48px;
  text-align: center;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 700;
}

.maintenance-grade.grade-Aplus,
.maintenance-grade.grade-A {
  background: #d1fae5;
  color: #065f46;
}

.maintenance-grade.grade-Aminus,
.maintenance-grade.grade-Bplus,
.maintenance-grade.grade-B {
  background: #dbeafe;
  color: #1e40af;
}

.maintenance-grade.grade-Bminus,
.maintenance-grade.grade-Cplus,
.maintenance-grade.grade-C {
  background: #fed7aa;
  color: #92400e;
}

.maintenance-grade.grade-D,
.maintenance-grade.grade-F {
  background: #fee2e2;
  color: #991b1b;
}

.maintenance-score {
  font-size: 14px;
  color: #6b7280;
}

/* Red Flags Count */
.red-flags-count.has-flags {
  color: #dc2626;
  font-weight: 600;
}

.red-flags-count.no-flags {
  color: #059669;
}

/* Survey Required */
.survey-yes {
  color: #dc2626;
  font-weight: 600;
}

.survey-no {
  color: #6b7280;
}

/* Premium Loading */
.premium-loading.has-loading {
  color: #d97706;
  font-weight: 600;
}

/* ============================================
   MAINTENANCE SCORE
   ============================================ */

.maintenance-score-display {
  display: flex;
  gap: 32px;
  align-items: center;
  margin-bottom: 24px;
  padding: 24px;
  background: #f9fafb;
  border-radius: 8px;
}

.score-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 4px solid;
}

.score-circle.grade-Aplus,
.score-circle.grade-A {
  background: #d1fae5;
  border-color: #059669;
  color: #065f46;
}

.score-circle.grade-Aminus,
.score-circle.grade-Bplus,
.score-circle.grade-B {
  background: #dbeafe;
  border-color: #2563eb;
  color: #1e40af;
}

.score-circle.grade-Bminus,
.score-circle.grade-Cplus,
.score-circle.grade-C {
  background: #fed7aa;
  border-color: #ea580c;
  color: #92400e;
}

.score-circle.grade-D,
.score-circle.grade-F {
  background: #fee2e2;
  border-color: #dc2626;
  color: #991b1b;
}

.score-number {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
}

.score-label {
  font-size: 16px;
  font-weight: 500;
}

.grade-badge {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
}

.score-interpretation {
  flex: 1;
}

.score-interpretation p {
  margin: 0 0 12px 0;
  line-height: 1.6;
}

/* Maintenance Factors */
.maintenance-factors {
  margin-top: 24px;
}

.maintenance-factors h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.factors-grid {
  display: grid;
  gap: 16px;
}

.factor-item {
  background: #f9fafb;
  padding: 16px;
  border-radius: 6px;
}

.factor-label {
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
  display: block;
}

.factor-bar {
  height: 24px;
  background: #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  margin: 8px 0;
}

.factor-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
  transition: width 0.3s ease;
}

.factor-score {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
}

.factor-notes {
  margin: 8px 0 0 0;
  font-size: 13px;
  color: #6b7280;
  font-style: italic;
}

/* ============================================
   ROOF INTELLIGENCE
   ============================================ */

.roof-intel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.roof-section {
  background: #f9fafb;
  padding: 16px;
  border-radius: 6px;
}

.roof-section h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: #111827;
}

.roof-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
}

.roof-details dt {
  font-weight: 500;
  color: #6b7280;
}

.roof-details dd {
  margin: 0;
  color: #111827;
}

.roof-details dd.condition-good {
  color: #059669;
  font-weight: 600;
}

.roof-details dd.condition-fair {
  color: #d97706;
  font-weight: 600;
}

.roof-details dd.condition-poor {
  color: #dc2626;
  font-weight: 600;
}

.roof-details dd.warning {
  color: #dc2626;
  font-weight: 600;
}

/* Age Estimation */
.age-estimate {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
  margin: 8px 0;
}

.confidence {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

.impact-note {
  background: #fef3c7;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  color: #92400e;
  margin-top: 8px;
}

/* Complexity Score */
.complexity-score-display {
  margin: 12px 0;
}

.score-bar-container {
  height: 32px;
  background: #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 8px;
}

.score-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #059669 50%, #dc2626 100%);
  transition: width 0.3s ease;
}

.score-value {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

/* Warning Section */
.warning-section {
  background: #fef3c7;
  border: 2px solid #f59e0b;
}

.alert-critical {
  background: #fee2e2;
  border-left: 4px solid #dc2626;
  padding: 12px;
  margin-bottom: 12px;
  color: #991b1b;
  font-weight: 500;
}

/* Solar Details */
.solar-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.solar-details dt {
  font-weight: 500;
  color: #6b7280;
}

.solar-details dd {
  margin: 0;
  color: #111827;
}

.solar-details dd.risk-low {
  color: #059669;
}

.solar-details dd.risk-medium {
  color: #d97706;
}

.solar-details dd.risk-high {
  color: #dc2626;
}

.requirements {
  background: #dbeafe;
  padding: 12px;
  border-radius: 4px;
  font-size: 13px;
}

.requirements ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
}

.requirements li {
  margin-bottom: 4px;
}

/* ============================================
   RED FLAGS
   ============================================ */

.no-flags-message {
  text-align: center;
  padding: 24px;
  color: #059669;
  font-size: 16px;
}

.alert-warning {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 12px;
  margin-bottom: 20px;
  color: #92400e;
  font-weight: 500;
}

.red-flags-section {
  margin-bottom: 24px;
}

.red-flags-section h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.red-flags-section.critical-section h4 {
  color: #991b1b;
}

.red-flags-section.high-section h4 {
  color: #92400e;
}

.red-flags-section.medium-section h4 {
  color: #d97706;
}

.red-flag-item {
  background: #f9fafb;
  border-left: 4px solid;
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 4px;
}

.red-flag-item.severity-critical {
  border-color: #dc2626;
  background: #fef2f2;
}

.red-flag-item.severity-high {
  border-color: #f59e0b;
  background: #fffbeb;
}

.red-flag-item.severity-medium {
  border-color: #3b82f6;
  background: #eff6ff;
}

.red-flag-item.severity-low {
  border-color: #6b7280;
  background: #f9fafb;
}

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

.flag-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.flag-badge.critical {
  background: #dc2626;
  color: #fff;
}

.flag-badge.high {
  background: #f59e0b;
  color: #fff;
}

.flag-badge.medium {
  background: #3b82f6;
  color: #fff;
}

.flag-badge.low {
  background: #6b7280;
  color: #fff;
}

.flag-header h5 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.flag-content p {
  margin: 0 0 8px 0;
  font-size: 14px;
  line-height: 1.5;
}

.underwriting-action {
  background: #f3f4f6;
  padding: 8px 12px;
  border-radius: 4px;
  margin-top: 8px;
}

/* ============================================
   VALUATION CHECK
   ============================================ */

.valuation-summary {
  background: #f9fafb;
  padding: 20px;
  border-radius: 6px;
}

.valuation-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}

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

.valuation-row.total {
  font-size: 18px;
  font-weight: 700;
  padding-top: 16px;
  margin-top: 8px;
  border-top: 2px solid #d1d5db;
}

.valuation-row.underinsured {
  color: #dc2626;
  font-weight: 600;
}

.valuation-impact {
  padding: 16px;
  margin-top: 16px;
  border-radius: 6px;
}

.valuation-impact.warning {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  color: #92400e;
}

.valuation-impact.info {
  background: #dbeafe;
  border-left: 4px solid #3b82f6;
  color: #1e40af;
}

.valuation-action {
  background: #f3f4f6;
  padding: 12px;
  margin-top: 12px;
  border-radius: 4px;
  font-size: 14px;
}

.valuation-notes {
  margin-top: 16px;
  font-size: 13px;
  color: #6b7280;
}

.valuation-notes ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
}

.valuation-notes li {
  margin-bottom: 4px;
}

/* ============================================
   UNDERWRITING RECOMMENDATION
   ============================================ */

.recommendation-card {
  border: 2px solid #3b82f6;
}

.recommendation-display {
  background: #f9fafb;
  padding: 24px;
  text-align: center;
  border-radius: 8px;
  margin-bottom: 20px;
}

.recommendation-display h4 {
  font-size: 16px;
  font-weight: 500;
  color: #6b7280;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.recommendation-badge {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 700;
}

.recommendation-display.recommendation-accept .recommendation-badge {
  background: #d1fae5;
  color: #065f46;
}

.recommendation-display.recommendation-loading .recommendation-badge {
  background: #fed7aa;
  color: #92400e;
}

.recommendation-display.recommendation-refer .recommendation-badge,
.recommendation-display.recommendation-survey .recommendation-badge {
  background: #fef3c7;
  color: #92400e;
}

.recommendation-display.recommendation-decline .recommendation-badge {
  background: #fee2e2;
  color: #991b1b;
}

.reasoning-section,
.special-terms-section,
.premium-loading-section {
  margin-bottom: 20px;
}

.reasoning-section h4,
.special-terms-section h4,
.premium-loading-section h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
}

.reasoning-section ul,
.special-terms-section ul {
  list-style: none;
  padding: 0;
}

.reasoning-section li,
.special-terms-section li {
  padding: 8px 0 8px 24px;
  position: relative;
  line-height: 1.5;
}

.reasoning-section li:before {
  content: "•";
  position: absolute;
  left: 8px;
  color: #3b82f6;
  font-weight: 700;
}

.special-terms-section li:before {
  content: "✓";
  position: absolute;
  left: 8px;
  color: #059669;
  font-weight: 700;
}

.loading-percentage {
  font-size: 24px;
  font-weight: 700;
  color: #d97706;
  text-align: center;
  margin: 8px 0;
}

.confidence-display {
  text-align: center;
  padding: 12px;
  background: #f3f4f6;
  border-radius: 6px;
  font-size: 14px;
  color: #6b7280;
}

/* ============================================
   EMPTY/ERROR STATES
   ============================================ */

.property-intel-no-report,
.property-intel-error {
  text-align: center;
  padding: 48px 24px;
}

.property-intel-no-report p,
.property-intel-error p {
  color: #6b7280;
  font-size: 15px;
  margin-bottom: 12px;
}

.property-intel-error p {
  color: #dc2626;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .property-intelligence-container {
    padding: 16px;
  }

  .hiscox-summary-grid {
    grid-template-columns: 1fr;
  }

  .roof-intel-grid {
    grid-template-columns: 1fr;
  }

  .maintenance-score-display {
    flex-direction: column;
    text-align: center;
  }

  .score-interpretation {
    text-align: left;
  }
}

/* ============================================
   SATELLITE IMAGERY
   ============================================ */

.satellite-imagery-card {
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
}

.satellite-image-container {
  margin: 16px 0;
  text-align: center;
}

.satellite-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.satellite-image:hover {
  transform: scale(1.02);
}

.image-caption {
  margin-top: 12px;
  font-size: 13px;
  color: #6b7280;
  font-style: italic;
}

/* ============================================
   EXPANDABLE EVIDENCE SECTIONS
   ============================================ */

.expand-evidence-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin: 12px 0;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
}

.expand-evidence-btn:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.expand-evidence-btn.inline {
  padding: 4px 8px;
  margin: 4px 0;
  font-size: 12px;
}

.expand-icon {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.expandable-evidence {
  margin-top: 12px;
  padding: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.6;
}

.expandable-evidence h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: #111827;
}

.expandable-evidence ul {
  margin: 8px 0;
  padding-left: 24px;
}

.expandable-evidence li {
  margin-bottom: 6px;
  color: #374151;
}

.expandable-evidence dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 12px 0;
}

.expandable-evidence dt {
  font-weight: 500;
  color: #6b7280;
}

.expandable-evidence dd {
  margin: 0;
  color: #111827;
}

.expandable-evidence ol {
  margin: 8px 0;
  padding-left: 24px;
}

.expandable-evidence ol li {
  margin-bottom: 8px;
}

.confidence-note {
  margin-top: 12px;
  font-size: 13px;
  color: #6b7280;
  font-style: italic;
}

/* ============================================
   AUDIT TRAIL
   ============================================ */

.audit-trail-card {
  border: 2px solid #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.audit-section {
  margin-bottom: 24px;
  padding: 16px;
  background: #fff;
  border-radius: 6px;
  border-left: 4px solid #3b82f6;
}

.audit-section h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: #1e40af;
}

.audit-section dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 12px 0;
}

.audit-section dt {
  font-weight: 500;
  color: #6b7280;
}

.audit-section dd {
  margin: 0;
  color: #111827;
}

.audit-section ul {
  margin: 8px 0;
  padding-left: 24px;
}

.audit-section li {
  margin-bottom: 6px;
  color: #374151;
}

.audit-section ol {
  margin: 8px 0;
  padding-left: 24px;
  list-style-type: decimal;
}

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

.audit-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 2px solid #e5e7eb;
  text-align: center;
}

.audit-footer p {
  margin-bottom: 12px;
  font-size: 13px;
  color: #6b7280;
}

.export-audit-btn {
  padding: 10px 20px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.export-audit-btn:hover {
  background: #2563eb;
}

/* ============================================
   HISCOX CARD (Alias for consistency)
   ============================================ */

.hiscox-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.hiscox-card-header {
  padding: 16px 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hiscox-card-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.hiscox-card-body {
  padding: 24px;
}

.hiscox-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hiscox-badge.info {
  background: #dbeafe;
  color: #1e40af;
}

.hiscox-badge.success {
  background: #d1fae5;
  color: #065f46;
}

.hiscox-badge.warning {
  background: #fed7aa;
  color: #92400e;
}

.hiscox-badge.critical {
  background: #fee2e2;
  color: #991b1b;
}

/* ============================================
   NEIGHBORHOOD & ACCESS
   ============================================ */

.neighborhood-card {
  border: 2px solid #3b82f6;
}

.adjacent-risks-section {
  margin-bottom: 24px;
}

.adjacent-risks-section h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: #111827;
}

.risk-item {
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  border-left: 4px solid;
}

.risk-item.high-risk {
  background: #fffbeb;
  border-color: #f59e0b;
}

.risk-item.medium-risk {
  background: #eff6ff;
  border-color: #3b82f6;
}

.risk-item p {
  margin: 0 0 8px 0;
  font-size: 14px;
  line-height: 1.5;
}

.no-risks-message {
  padding: 20px;
  background: #f0fdf4;
  border-radius: 8px;
  text-align: center;
  color: #166534;
}

.no-risks-message p {
  margin: 8px 0;
  font-size: 14px;
}

.access-analysis-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px solid #e5e7eb;
}

.access-analysis-section h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px 0;
}

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

.access-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.access-item label {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.access-value {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.access-value.warning {
  color: #d97706;
}

.access-value.good {
  color: #059669;
}

/* ============================================
   SECURITY ASSESSMENT
   ============================================ */

.security-card {
  border: 2px solid #6366f1;
  background: linear-gradient(135deg, #eef2ff 0%, #ffffff 100%);
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 16px;
}

.security-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.security-item label {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.security-value {
  font-size: 14px;
  color: #6b7280;
}

.security-note {
  margin-top: 16px;
  padding: 12px;
  background: #f3f4f6;
  border-radius: 6px;
  font-size: 13px;
  color: #6b7280;
  font-style: italic;
}

/* ============================================
   ENVIRONMENTAL RISKS
   ============================================ */

.environmental-card {
  border: 2px solid #10b981;
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
}

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

.environmental-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.environmental-item label {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.environmental-value {
  font-size: 14px;
  color: #6b7280;
}

.environmental-note {
  margin-top: 8px;
  font-size: 13px;
  color: #6b7280;
  font-style: italic;
}

.environmental-integration {
  margin-top: 24px;
  padding: 16px;
  background: #f0fdf4;
  border-radius: 8px;
  border-left: 4px solid #10b981;
}

.environmental-integration p {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #065f46;
}

.environmental-integration ul {
  margin: 8px 0 0 0;
  padding-left: 24px;
}

.environmental-integration li {
  margin-bottom: 6px;
  font-size: 13px;
  color: #374151;
}

/* ============================================
   DETAILED PROPERTY FEATURES
   ============================================ */

.detailed-features-card {
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.feature-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  transition: box-shadow 0.2s ease;
}

.feature-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.feature-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.feature-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.feature-score {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.feature-score.score-good {
  background: #d1fae5;
  color: #065f46;
}

.feature-score.score-fair {
  background: #fed7aa;
  color: #92400e;
}

.feature-score.score-poor {
  background: #fee2e2;
  color: #991b1b;
}

.feature-notes {
  margin: 8px 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

/* ============================================
   GARDEN & HAZARDS
   ============================================ */

.garden-hazards-card {
  border: 2px solid #f59e0b;
}

.hazard-section {
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 8px;
  border-left: 4px solid;
}

.hazard-section.critical-hazard {
  background: #fef2f2;
  border-color: #dc2626;
}

.hazard-section.high-hazard {
  background: #fffbeb;
  border-color: #f59e0b;
}

.hazard-section.medium-hazard {
  background: #eff6ff;
  border-color: #3b82f6;
}

.hazard-section.low-hazard {
  background: #f9fafb;
  border-color: #6b7280;
}

.hazard-section h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.hazard-item {
  margin-bottom: 16px;
}

.hazard-item p {
  margin: 0 0 8px 0;
  font-size: 14px;
  line-height: 1.5;
}

.hazard-item strong {
  color: #111827;
}

/* ============================================
   DRAINAGE RISK ASSESSMENT
   ============================================ */

.drainage-risk-card {
  border: 2px solid #3b82f6;
}

.drainage-overview {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  margin-bottom: 24px;
  padding: 20px;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  border-radius: 8px;
}

.risk-score-visual {
  text-align: center;
}

.score-gauge {
  width: 100%;
  height: 20px;
  background: #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.gauge-fill {
  height: 100%;
  transition: width 0.5s ease;
  border-radius: 10px;
}

.gauge-fill.risk-low {
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.gauge-fill.risk-medium {
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.gauge-fill.risk-high {
  background: linear-gradient(90deg, #f97316 0%, #fb923c 100%);
}

.gauge-fill.risk-critical {
  background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
}

.score-label {
  display: block;
  font-size: 14px;
  color: #6b7280;
}

.score-label .score-number {
  font-size: 36px;
  font-weight: 700;
  color: #111827;
}

.score-label .score-suffix {
  font-size: 18px;
  color: #6b7280;
}

.risk-interpretation {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.risk-interpretation p {
  margin: 0 0 8px 0;
  font-size: 14px;
  line-height: 1.6;
}

.insurance-impact {
  padding: 12px;
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 4px;
  margin-top: 8px;
}

.drainage-section {
  margin-bottom: 24px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 4px solid #3b82f6;
}

.drainage-section h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.drainage-analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.analysis-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.analysis-item .item-label {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.analysis-item .item-value {
  font-size: 14px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  background: #f3f4f6;
  color: #111827;
}

.analysis-item .item-value.good {
  background: #d1fae5;
  color: #065f46;
}

.analysis-item .item-value.warning {
  background: #fef3c7;
  color: #92400e;
}

.analysis-item .item-value.critical {
  background: #fee2e2;
  color: #991b1b;
  font-weight: 700;
}

.analysis-item .item-value.condition-excellent,
.analysis-item .item-value.condition-good {
  background: #d1fae5;
  color: #065f46;
}

.analysis-item .item-value.condition-fair {
  background: #fed7aa;
  color: #92400e;
}

.analysis-item .item-value.condition-poor,
.analysis-item .item-value.condition-very_poor {
  background: #fee2e2;
  color: #991b1b;
}

.gutter-issues {
  margin-top: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
}

.gutter-issues ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
}

.gutter-issues li {
  margin-bottom: 4px;
  font-size: 13px;
  color: #374151;
}

.concerns-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.concern-item {
  padding: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid;
  border-radius: 4px;
}

.concern-item.severity-critical {
  border-left-color: #dc2626;
  background: #fef2f2;
}

.concern-item.severity-high {
  border-left-color: #f97316;
  background: #fff7ed;
}

.concern-item.severity-medium {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.concern-item.severity-low {
  border-left-color: #3b82f6;
  background: #eff6ff;
}

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

.severity-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.severity-badge.critical {
  background: #dc2626;
  color: #fff;
}

.severity-badge.high {
  background: #f97316;
  color: #fff;
}

.severity-badge.medium {
  background: #f59e0b;
  color: #fff;
}

.severity-badge.low {
  background: #3b82f6;
  color: #fff;
}

.recommendations-list {
  margin: 0;
  padding-left: 20px;
}

.recommendations-list li {
  margin-bottom: 8px;
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
}

.drainage-underwriting-action {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px solid #e5e7eb;
}

.drainage-underwriting-action h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.action-box {
  padding: 20px;
  border-radius: 8px;
  border: 2px solid;
}

.action-box.low {
  background: #f0fdf4;
  border-color: #10b981;
}

.action-box.medium {
  background: #fffbeb;
  border-color: #f59e0b;
}

.action-box.high {
  background: #fff7ed;
  border-color: #f97316;
}

.action-box.critical {
  background: #fef2f2;
  border-color: #dc2626;
}

.action-box p {
  margin: 0 0 8px 0;
  font-size: 14px;
}

.action-box .critical-warning,
.action-box .high-warning {
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 4px;
  font-size: 14px;
}

.action-box .medium-info,
.action-box .low-info {
  margin-top: 12px;
  font-size: 14px;
}

/* ============================================
   INSUFFICIENT DATA WARNING
   ============================================ */

.insufficient-data-card {
  border: 3px solid #dc2626 !important;
  background: #fef2f2;
}

.critical-data-warning {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: #fff;
  border: 2px solid #dc2626;
  border-radius: 8px;
  margin-bottom: 24px;
}

.warning-icon {
  font-size: 48px;
  line-height: 1;
}

.warning-content h4 {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 700;
  color: #dc2626;
}

.warning-content p {
  margin: 0 0 8px 0;
  font-size: 14px;
  line-height: 1.6;
}

.warning-implication {
  padding: 12px;
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 4px;
  margin-top: 12px;
}

.insufficient-data-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.check-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
}

.check-item .status-icon {
  font-size: 20px;
  line-height: 1;
}

.check-item strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.check-item p {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
}

.check-item .detail {
  font-size: 12px;
  color: #9ca3af;
  font-style: italic;
}

.underwriting-note {
  margin-top: 16px !important;
  padding: 12px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 4px;
  font-weight: 600 !important;
  color: #dc2626 !important;
}

/* ============================================
   BUILDING CONTROL CARD
   ============================================ */

.building-control-card {
  margin-bottom: 24px;
}

.building-control-summary {
  margin-bottom: 24px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.summary-item {
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.summary-item label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-value {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
}

.summary-value.good {
  color: #059669;
}

.summary-value.critical {
  color: #dc2626;
}

/* Risk Indicators */
.risk-indicators-section {
  margin-bottom: 24px;
}

.risk-indicators-section h4 {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 16px;
}

.risk-indicator {
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  border-left: 4px solid;
}

.risk-indicator.critical {
  background: #fee2e2;
  border-left-color: #dc2626;
}

.risk-indicator.high {
  background: #fef3c7;
  border-left-color: #d97706;
}

.risk-indicator.medium {
  background: #fef3c7;
  border-left-color: #d97706;
}

.risk-indicator.low {
  background: #d1fae5;
  border-left-color: #059669;
}

.risk-indicator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.risk-type {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.risk-type.CRITICAL {
  background: #dc2626;
  color: white;
}

.risk-type.WARNING {
  background: #d97706;
  color: white;
}

.risk-type.CAUTION {
  background: #d97706;
  color: white;
}

.risk-type.INFO {
  background: #64748b;
  color: white;
}

.risk-type.POSITIVE {
  background: #059669;
  color: white;
}

.risk-severity {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.risk-severity.critical {
  background: #dc2626;
  color: white;
}

.risk-severity.high {
  background: #d97706;
  color: white;
}

.risk-severity.medium {
  background: #f59e0b;
  color: white;
}

.risk-severity.low {
  background: #059669;
  color: white;
}

.risk-message {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin: 8px 0;
}

.risk-impact {
  font-size: 13px;
  color: #475569;
  margin: 8px 0;
}

.risk-action {
  font-size: 13px;
  color: #1e293b;
  font-weight: 500;
  margin: 8px 0;
}

/* Completion Certificates */
.completion-certificates-section {
  margin-bottom: 24px;
}

.completion-certificates-section h4 {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 16px;
}

.certificates-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.certificate-item {
  padding: 12px;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.certificate-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cert-reference {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  font-family: monospace;
}

.cert-date {
  font-size: 12px;
  color: #64748b;
}

.cert-work-type {
  font-size: 13px;
  color: #475569;
  margin: 4px 0;
}

.cert-description {
  font-size: 12px;
  color: #64748b;
  margin: 4px 0;
  line-height: 1.5;
}

.cert-link {
  display: inline-block;
  font-size: 12px;
  color: #2563eb;
  text-decoration: none;
  margin-top: 8px;
}

.cert-link:hover {
  text-decoration: underline;
}

.more-items {
  font-size: 12px;
  color: #64748b;
  font-style: italic;
  text-align: center;
  margin-top: 8px;
}

/* Enforcement Actions */
.enforcement-actions-section {
  margin-bottom: 24px;
}

.enforcement-actions-section h4 {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 16px;
}

.enforcement-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.enforcement-item {
  padding: 12px;
  border-radius: 6px;
  border-left: 4px solid;
}

.enforcement-item.critical {
  background: #fee2e2;
  border-left-color: #dc2626;
}

.enforcement-item.high {
  background: #fef3c7;
  border-left-color: #d97706;
}

.enforcement-item.medium {
  background: #fef3c7;
  border-left-color: #f59e0b;
}

.enforcement-item.low {
  background: #f8fafc;
  border-left-color: #64748b;
}

.enforcement-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.enforcement-reference {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  font-family: monospace;
}

.enforcement-severity {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.enforcement-severity.critical {
  background: #dc2626;
  color: white;
}

.enforcement-severity.high {
  background: #d97706;
  color: white;
}

.enforcement-severity.medium {
  background: #f59e0b;
  color: white;
}

.enforcement-severity.low {
  background: #64748b;
  color: white;
}

.enforcement-date {
  font-size: 12px;
  color: #64748b;
  margin: 4px 0;
}

.enforcement-description {
  font-size: 13px;
  color: #475569;
  margin: 8px 0;
  line-height: 1.5;
}

.enforcement-link {
  display: inline-block;
  font-size: 12px;
  color: #dc2626;
  text-decoration: none;
  margin-top: 8px;
  font-weight: 500;
}

.enforcement-link:hover {
  text-decoration: underline;
}

/* Structural Modifications */
.structural-modifications-section {
  margin-bottom: 24px;
}

.structural-modifications-section h4 {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 16px;
}

.modifications-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modification-item {
  padding: 12px;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.mod-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.mod-reference {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  font-family: monospace;
}

.mod-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.mod-status.approved {
  background: #059669;
  color: white;
}

.mod-status.refused {
  background: #dc2626;
  color: white;
}

.mod-date {
  font-size: 12px;
  color: #64748b;
  margin: 4px 0;
}

.mod-work-type {
  font-size: 13px;
  color: #475569;
  margin: 4px 0;
}

.mod-description {
  font-size: 12px;
  color: #64748b;
  margin: 4px 0;
  line-height: 1.5;
}

/* Data Source Footer */
.data-source-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.no-data-message {
  text-align: center;
  padding: 32px 16px;
  color: #64748b;
}

.no-data-message p {
  margin: 8px 0;
  font-size: 14px;
}
