/* Appraisal Flow Reports - Shared Styles */
/* Note: This file works alongside Tailwind CSS CDN */

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif; }
.sidebar-width { width: 240px; min-width: 240px; }
.inspector-width { width: 280px; min-width: 280px; }
.view { display: none; }
.view.active { display: block; }
.nav-item.active { background: #0a84ff; }
.nav-item.active .nav-label, .nav-item.active .nav-status { color: white; }
.rating-pill.active { background: #0a84ff; border-color: #0a84ff; color: white; }
.sub-nav-item.active { background: #242424; color: white; }
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }

/* Circular Progress Indicator */
.progress-ring {
  width: 16px;
  height: 16px;
  transform: rotate(-90deg);
}
.progress-ring circle {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.progress-ring .progress-ring-bg {
  stroke: rgba(255, 159, 10, 0.2);
}
.progress-ring .progress-ring-fill {
  stroke: #ff9f0a;
  transition: stroke-dashoffset 0.3s ease;
}
.nav-item.active .progress-ring .progress-ring-bg {
  stroke: rgba(255, 255, 255, 0.3);
}
.nav-item.active .progress-ring .progress-ring-fill {
  stroke: white;
}

.scrollbar-thin::-webkit-scrollbar { width: 6px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 3px; }

/* Report Sections Styles */
.report-sections { display: flex; flex-direction: column; gap: 6px; }
.report-section {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #333333;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.report-section:hover { background: #3a3a3a; }
.section-status {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}
.section-status.complete { background: #30d158; color: white; }
.section-status.complete::after { content: '✓'; }
.section-status.warning { background: #ffd60a; color: #000; }
.section-status.warning::after { content: '!'; }
.section-status.empty { border: 2px solid #666666; }
.section-number { font-size: 10px; font-weight: 600; color: #a0a0a0; min-width: 18px; }
.section-name { flex: 1; font-size: 13px; font-weight: 500; }
.section-progress { font-size: 11px; color: #a0a0a0; }
.section-badge { padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 600; background: rgba(100, 210, 255, 0.15); color: #64d2ff; }

/* Overview Styles */
.overview-header {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}
.overview-hero {
  width: 280px;
  height: 180px;
  background-color: #2a4a6a;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 48px;
}
.overview-info { flex: 1; }
.overview-address { font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.overview-city { font-size: 16px; color: #a0a0a0; margin-bottom: 16px; }
.overview-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}
.overview-stat-value { font-size: 24px; font-weight: 700; }
.overview-stat-label { font-size: 11px; color: #666666; text-transform: uppercase; }
.overview-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.overview-tag { padding: 4px 10px; background: #333333; border-radius: 4px; font-size: 11px; }
.overview-tag.highlight { background: #0a84ff; }

/* Inspection Styles */
.inspection-layout { display: flex; gap: 20px; height: calc(100vh - 180px); }
.inspection-nav {
  width: 260px;
  flex-shrink: 0;
  overflow-y: auto;
  padding-right: 8px;
  padding-bottom: 100px; /* Space for floating player */
}
.inspection-nav::-webkit-scrollbar { width: 6px; }
.inspection-nav::-webkit-scrollbar-track { background: transparent; }
.inspection-nav::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 3px; }
.inspection-nav::-webkit-scrollbar-thumb:hover { background: #4a4a4a; }
.inspection-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 100px; /* Space for floating player */
}

.insp-nav-section { margin-bottom: 20px; }
.insp-nav-title { font-size: 11px; font-weight: 600; color: #666666; text-transform: uppercase; margin-bottom: 10px; }

.insp-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #333333;
  border-radius: 10px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.15s;
  border: 2px solid transparent;
}
.insp-nav-item:hover { border-color: #3a3a3a; }
.insp-nav-item.active { background: #0a84ff; border-color: #0a84ff; }
.insp-nav-item.active .insp-nav-subtitle { color: rgba(255,255,255,0.7); }

.insp-nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #242424;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.insp-nav-item.active .insp-nav-icon { background: rgba(255,255,255,0.2); }

.insp-nav-content { flex: 1; }
.insp-nav-label { font-size: 13px; font-weight: 500; }
.insp-nav-subtitle { font-size: 11px; color: #a0a0a0; }

.insp-nav-status {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}
.insp-nav-status.complete { background: #30d158; color: white; }
.insp-nav-status.complete::after { content: '✓'; }
.insp-nav-status.partial { background: #ffd60a; color: #000; }
.insp-nav-status.partial::after { content: '!'; }
.insp-nav-status.empty { border: 2px solid #666666; }

/* Add button for dynamic levels/outbuildings */
.insp-nav-item.add-button {
  background: transparent;
  border: 2px dashed #3a3a3a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666666;
  padding: 12px 14px;
  min-height: 48px;
  font-size: 13px;
  font-weight: 500;
}
.insp-nav-item.add-button:hover {
  border-color: #0a84ff;
  color: #0a84ff;
}

/* Nested detail items (indented under levels) */
.insp-nav-nested {
  margin-left: 20px;
  padding-left: 14px;
  border-left: 2px solid #505050;
  margin-top: -2px;
  margin-bottom: 10px;
  padding-top: 6px;
  padding-bottom: 2px;
}
.insp-nav-nested .insp-nav-item {
  background: #2a2a2a;
  padding: 10px 12px;
}
.insp-nav-nested .insp-nav-item:hover {
  background: #333333;
}
.insp-nav-nested .insp-nav-item.active {
  background: #0a84ff;
}
.insp-nav-nested .insp-nav-icon {
  width: 28px;
  height: 28px;
  font-size: 14px;
}
.insp-nav-nested .insp-nav-item.add-button {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 12px;
  border-width: 1px;
}

/* Divider line within nav sections */
.insp-nav-divider {
  height: 1px;
  background: #3a3a3a;
  margin: 12px 0;
}

.insp-form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.insp-field {
  background: #333333;
  border-radius: 10px;
  padding: 12px;
}
.insp-field-label { font-size: 10px; font-weight: 600; color: #666666; text-transform: uppercase; margin-bottom: 6px; }
.insp-field-value { font-size: 14px; font-weight: 500; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.photo-thumb {
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background-color: #333333;
  background-size: cover;
  background-position: center;
  transition: transform 0.15s;
}
.photo-thumb:hover { transform: scale(1.03); }
.photo-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, rgba(0,0,0,0.8));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8px;
}
.photo-thumb-label { font-size: 10px; font-weight: 500; color: white; }
.photo-thumb-badges { position: absolute; top: 6px; left: 6px; display: flex; gap: 4px; }
.thumb-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  background: #0a84ff;
  color: white;
}
.thumb-badge.ai { background: #bf5af2; }

/* ========== AI STATUS BADGES ========== */
/* Used to indicate AI-generated vs human-verified content on form fields */
.ai-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 500;
  margin-left: 6px;
  cursor: pointer;
  transition: all 0.15s;
  vertical-align: middle;
}

/* Needs Review - Amber (action needed) */
.ai-status-badge.needs-review {
  background: rgba(255, 159, 10, 0.15);
  color: #ff9f0a;
}
.ai-status-badge.needs-review:hover {
  background: rgba(255, 159, 10, 0.25);
}
.ai-status-badge.needs-review::before {
  content: '✨';
  font-size: 9px;
}

/* Reviewed - Green (confirmed by appraiser) */
.ai-status-badge.reviewed {
  background: rgba(48, 209, 88, 0.15);
  color: #30d158;
}
.ai-status-badge.reviewed:hover {
  background: rgba(48, 209, 88, 0.25);
}
.ai-status-badge.reviewed::before {
  content: '✓';
  font-size: 9px;
  font-weight: 700;
}

/* Manual - Gray (no AI involved) */
.ai-status-badge.manual {
  background: rgba(102, 102, 102, 0.15);
  color: #888888;
}
.ai-status-badge.manual:hover {
  background: rgba(102, 102, 102, 0.25);
}
.ai-status-badge.manual::before {
  content: '✎';
  font-size: 9px;
}

/* Subtle left border accent for fields needing review */
.ai-field-needs-review {
  position: relative;
  border-left: 3px solid #ff9f0a !important;
  border-radius: 4px;
}
.ai-field-reviewed {
  position: relative;
  border-left: 3px solid #30d158 !important;
  border-radius: 4px;
}

/* AI badge tooltip */
.ai-status-badge[data-tooltip] {
  position: relative;
}
.ai-status-badge[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  background: #1a1a1a;
  color: white;
  font-size: 10px;
  font-weight: 400;
  white-space: nowrap;
  border-radius: 4px;
  margin-bottom: 4px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Floor Plan in Inspection */
.floor-plan-mini {
  background: #333333;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 16px;
}
.floor-plan-canvas {
  background: #242424;
  border-radius: 8px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 12px;
}
.room-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #242424;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
}
.room-chip:hover { border-color: #3a3a3a; }
.room-chip.active { background: #0a84ff; border-color: #0a84ff; }
.room-chip-color {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

/* Floating Voice Player - iOS Style */
.floating-player {
  position: fixed;
  bottom: 0;
  left: 240px; /* sidebar width */
  right: 0;
  background: rgba(30, 30, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 100;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.floating-player.hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.player-main {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
}

/* Now Playing Info */
.now-playing {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}
.now-playing-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #5e5ce6, #bf5af2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.now-playing-info {
  flex: 1;
}
.now-playing-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}
.now-playing-subtitle {
  font-size: 11px;
  color: #a0a0a0;
}

/* Player Controls */
.player-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.player-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.player-btn:hover { background: rgba(255, 255, 255, 0.1); }
.player-btn.play {
  width: 44px;
  height: 44px;
  background: #ffffff;
  color: #000000;
  font-size: 16px;
}
.player-btn.play:hover { transform: scale(1.05); }

/* Timeline/Scrubber */
.player-timeline {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 500px;
}
.player-time {
  font-size: 11px;
  color: #a0a0a0;
  font-variant-numeric: tabular-nums;
  min-width: 36px;
}
.player-time.current { color: #ffffff; }
.timeline-track {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}
.timeline-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: #ffffff;
  border-radius: 2px;
  width: 35%;
}
.timeline-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.timeline-marker {
  position: absolute;
  top: 50%;
  width: 4px;
  height: 4px;
  background: #30d158;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.timeline-marker.active { background: #0a84ff; width: 6px; height: 6px; }

/* Right Controls */
.player-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.speed-pill {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 9999px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}
.speed-pill:hover { background: rgba(255, 255, 255, 0.15); }
.transcript-toggle {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 6px;
  color: #a0a0a0;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.transcript-toggle:hover { background: rgba(255, 255, 255, 0.15); color: #ffffff; }
.transcript-toggle.active { background: #0a84ff; color: #ffffff; }
.transcript-chevron {
  font-size: 10px;
  transition: transform 0.2s;
}
.transcript-toggle.active .transcript-chevron { transform: rotate(180deg); }

/* Transcript Drawer */
.transcript-drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.transcript-drawer.open {
  max-height: 240px;
}
.transcript-scroll {
  max-height: 240px;
  overflow-y: auto;
  padding: 8px 0;
}
.transcript-segment {
  display: flex;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.15s;
}
.transcript-segment:hover { background: rgba(255, 255, 255, 0.05); }
.transcript-segment.active { background: rgba(10, 132, 255, 0.2); }
.segment-time {
  font-size: 11px;
  font-weight: 600;
  color: #0a84ff;
  font-variant-numeric: tabular-nums;
  min-width: 40px;
}
.segment-content { flex: 1; }
.segment-text {
  font-size: 12px;
  line-height: 1.4;
  color: #e0e0e0;
}
.segment-photos {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.segment-photo {
  width: 48px;
  height: 36px;
  background: #3a3a3a;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.segment-photo.playing { outline: 2px solid #0a84ff; }
.segment-photo-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2px 4px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  font-size: 8px;
  color: white;
}

/* ========== COMPS VIEW ========== */
.comps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.comp-card {
  background: #242424;
  border-radius: 12px;
  border: 2px solid #3a3a3a;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s;
}
.comp-card:hover { border-color: #666; transform: scale(1.02); }
.comp-card.subject { border-color: #30d158; }
.comp-card.selected { border-color: #0a84ff; }

.comp-card-thumb {
  height: 100px;
  background-color: #333;
  background-size: cover;
  background-position: center;
}
.comp-card-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 24px;
}

.comp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 16px 10px;
}
.comp-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  background: #0a84ff;
  color: white;
}
.comp-badge.subject { background: #30d158; }
.comp-price {
  font-size: 18px;
  font-weight: 700;
  color: #0a84ff;
}
.comp-card.subject .comp-price { color: #30d158; }

.comp-card-body { padding: 0 16px 14px; }
.comp-address { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.comp-meta { font-size: 11px; color: #a0a0a0; }

.comp-card-stats {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid #3a3a3a;
  font-size: 12px;
  text-align: center;
}
.comp-stat { flex: 1; }
.comp-stat-value { font-weight: 700; font-size: 14px; }
.comp-stat-label { font-size: 9px; color: #666666; text-transform: uppercase; margin-top: 2px; }

.view-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #242424;
  border-radius: 8px;
}
.view-toggle-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  border: none;
  color: #a0a0a0;
  cursor: pointer;
  transition: all 0.15s;
}
.view-toggle-btn.active { background: #0a84ff; color: white; }
.view-toggle-btn:hover:not(.active) { background: #333; color: white; }

.comps-map-placeholder {
  height: 400px;
  background: linear-gradient(135deg, #1a3a5a, #2a4a6a);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: #a0a0a0;
}
.comps-map-placeholder span:first-child { font-size: 48px; }

/* ========== SALES COMPARISON GRID ========== */
.grid-wrapper {
  display: flex;
  overflow: hidden;
  border-radius: 12px;
  background: #242424;
}

.grid-fixed {
  display: flex;
  flex-shrink: 0;
  position: sticky;
  left: 0;
  z-index: 10;
}

.grid-labels {
  width: 150px;
  background: #333333;
  border-right: 1px solid #3a3a3a;
}

.grid-subject {
  width: 170px;
  background: rgba(48, 209, 88, 0.08);
  border-right: 2px solid #30d158;
}

.grid-scroll {
  flex: 1;
  overflow-x: auto;
  display: flex;
}

.grid-column {
  flex-shrink: 0;
  width: 170px;
  border-right: 1px solid #3a3a3a;
}
.grid-column:last-child { border-right: none; }

.grid-cell {
  padding: 8px 10px;
  font-size: 12px;
  border-bottom: 1px solid #3a3a3a;
  min-height: 38px;
  display: flex;
  align-items: center;
}

.grid-cell.header {
  background: #333333;
  font-weight: 600;
  text-align: center;
  justify-content: center;
  flex-direction: column;
  min-height: 90px;
  padding: 10px;
}
.grid-subject .grid-cell.header { background: rgba(48, 209, 88, 0.12); }

.grid-cell.section {
  background: #3a3a3a;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a0a0a0;
  min-height: 32px;
}
.grid-subject .grid-cell.section { background: rgba(48, 209, 88, 0.06); }

.grid-cell.label {
  font-size: 11px;
  color: #a0a0a0;
  font-weight: 500;
}

.grid-cell.total {
  font-weight: 700;
  font-size: 13px;
  background: #333333;
}
.grid-subject .grid-cell.total { background: rgba(48, 209, 88, 0.12); }

.adj-badge {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}
.adj-badge.positive { background: rgba(48, 209, 88, 0.2); color: #30d158; }
.adj-badge.negative { background: rgba(255, 69, 58, 0.2); color: #ff453a; }
.adj-badge.none { background: #333333; color: #666666; }

.header-price { font-size: 16px; font-weight: 700; color: #0a84ff; margin-top: 4px; }
.header-address { font-size: 10px; font-weight: 500; }
.header-meta { font-size: 9px; color: #a0a0a0; margin-top: 2px; }
.header-label { font-size: 9px; color: #666666; text-transform: uppercase; letter-spacing: 0.5px; }

.grid-subject .header-price { color: #30d158; }
.grid-subject .header-label { color: #30d158; }

.quick-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 20px;
  background: #242424;
  border-radius: 12px;
}
.quick-stat { text-align: center; }
.quick-stat-value { font-size: 20px; font-weight: 700; }
.quick-stat-value.positive { color: #30d158; }
.quick-stat-value.accent { color: #0a84ff; }
.quick-stat-label { font-size: 10px; color: #666666; text-transform: uppercase; margin-top: 2px; }
.stat-divider { width: 1px; height: 40px; background: #3a3a3a; }

.link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #242424;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  border: 2px solid transparent;
}
.link-card:hover { border-color: #0a84ff; background: #2a2a2a; }
.link-card-icon {
  width: 48px;
  height: 48px;
  background: rgba(10, 132, 255, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.link-card-content { flex: 1; }
.link-card-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.link-card-subtitle { font-size: 12px; color: #a0a0a0; }
.link-card-arrow { font-size: 18px; color: #0a84ff; }

/* ========== ADD COMPS SLIDE-OUT PANEL ========== */
.slide-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  height: 100vh;
  background: #1f1f1f;
  border-left: 1px solid #3a3a3a;
  z-index: 200;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}
.slide-panel.open { right: 0; }
.slide-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.slide-panel-overlay.open { opacity: 1; pointer-events: auto; }

.slide-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #3a3a3a;
  flex-shrink: 0;
}
.slide-panel-title { font-size: 16px; font-weight: 600; }
.slide-panel-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #333;
  border: none;
  color: #a0a0a0;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide-panel-close:hover { background: #3a3a3a; color: white; }

.slide-panel-filters {
  padding: 16px 20px;
  border-bottom: 1px solid #3a3a3a;
  flex-shrink: 0;
}
.filter-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.filter-row:last-child { margin-bottom: 0; }
.filter-input {
  flex: 1;
  padding: 8px 12px;
  background: #242424;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  color: white;
  font-size: 12px;
}
.filter-input:focus { outline: none; border-color: #0a84ff; }
.filter-input::placeholder { color: #666; }

.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-chip {
  padding: 5px 10px;
  background: #333;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}
.filter-chip:hover { background: #3a3a3a; }
.filter-chip.active { background: #0a84ff; color: white; }

.slide-panel-results {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px 12px;
  font-size: 12px;
  color: #a0a0a0;
}

.comp-db-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #242424;
  border-radius: 10px;
  margin-bottom: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.comp-db-item:hover { border-color: #3a3a3a; }
.comp-db-item.selected { border-color: #0a84ff; background: rgba(10, 132, 255, 0.1); }
.comp-db-item.in-use { border-color: #30d158; background: rgba(48, 209, 88, 0.1); }

.comp-db-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #0a84ff;
  flex-shrink: 0;
}
.comp-db-photo {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #2a4a6a, #1a3a5a);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.comp-db-info { flex: 1; min-width: 0; }
.comp-db-address { font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.comp-db-meta { font-size: 11px; color: #a0a0a0; margin-bottom: 2px; }
.comp-db-use { font-size: 10px; color: #666; }
.comp-db-use.in-appraisal { color: #30d158; }
.comp-db-right { text-align: right; flex-shrink: 0; }
.comp-db-price { font-size: 14px; font-weight: 700; color: #0a84ff; }
.comp-db-date { font-size: 10px; color: #666; margin-top: 2px; }

.slide-panel-footer {
  padding: 16px 20px;
  border-top: 1px solid #3a3a3a;
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.btn-secondary {
  flex: 1;
  padding: 10px 16px;
  background: #333;
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.btn-secondary:hover { background: #3a3a3a; }
.btn-primary {
  flex: 1;
  padding: 10px 16px;
  background: #0a84ff;
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.btn-primary:hover { background: #409cff; }

/* ========== PREVIEW LAYOUT ========== */
.preview-layout {
  display: flex;
  height: calc(100vh - 240px);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #3a3a3a;
}
.preview-toc {
  width: 220px;
  flex-shrink: 0;
  overflow-y: auto;
  background: #242424;
  border-right: 1px solid #3a3a3a;
  padding: 14px 0;
}
.preview-document {
  flex: 1;
  overflow-y: auto;
  background: #2a2a2a;
  padding: 24px;
  display: flex;
  justify-content: center;
}
.preview-validation {
  width: 280px;
  flex-shrink: 0;
  overflow-y: auto;
  background: #242424;
  border-left: 1px solid #3a3a3a;
}

.toc-section { padding: 0 14px; margin-bottom: 14px; }
.toc-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  margin-bottom: 8px;
}
.toc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 12px;
  margin-bottom: 2px;
}
.toc-item:hover { background: #333; }
.toc-item.active { background: #0a84ff; }
.toc-item .page { width: 20px; color: #666; font-size: 11px; }
.toc-item.active .page { color: rgba(255,255,255,0.7); }
.toc-item .title { flex: 1; }
.toc-item .status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.toc-item .status.complete { background: #30d158; }
.toc-item .status.warning { background: #ffd60a; }
.toc-item .status.empty { background: #666; }

.document-page {
  background: white;
  color: #1a1a1a;
  width: 680px;
  min-height: 880px;
  padding: 40px;
  font-family: 'Times New Roman', Georgia, serif;
  font-size: 10px;
  line-height: 1.4;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.urar-header {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 2px solid #333;
  margin-bottom: 20px;
}
.urar-header h1 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.urar-header .subtitle { font-size: 10px; color: #666; margin-bottom: 8px; }
.urar-header .address { font-size: 12px; font-weight: 500; }

.summary-box {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}
.summary-title { font-size: 11px; font-weight: 600; margin-bottom: 12px; text-transform: uppercase; }
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: center;
}
.summary-item .label { font-size: 9px; color: #666; margin-bottom: 4px; }
.summary-item .value { font-size: 16px; font-weight: 700; }
.summary-item .value.success { color: #30d158; }

.urar-section { margin-bottom: 16px; }
.urar-section .section-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  background: #e8e8e8;
  padding: 6px 10px;
  margin-bottom: 10px;
  border-radius: 4px;
}
.data-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 16px;
  font-size: 10px;
}
.data-grid .label { color: #666; }

.photo-grid-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.photo-placeholder {
  height: 60px;
  background: linear-gradient(135deg, #e0e0e0, #c0c0c0);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #666;
}
.photo-caption { font-size: 8px; text-align: center; color: #666; margin-top: 4px; }

.comp-table-mini {
  width: 100%;
  border-collapse: collapse;
  font-size: 9px;
  margin-top: 8px;
}
.comp-table-mini th, .comp-table-mini td {
  border: 1px solid #ccc;
  padding: 4px 6px;
  text-align: left;
}
.comp-table-mini th { background: #eee; font-weight: 600; }
.comp-table-mini .subject { background: #e8f4e8; }
.comp-table-mini .adjustment { font-size: 8px; color: #30d158; }
.comp-table-mini .adjustment.negative { color: #ff453a; }

.page-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid #ccc;
  font-size: 9px;
  color: #666;
}

.validation-header {
  padding: 14px;
  border-bottom: 1px solid #3a3a3a;
}
.validation-header h2 { font-size: 14px; font-weight: 600; }
.validation-summary {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #3a3a3a;
}
.validation-stat {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
}
.validation-stat.success { background: rgba(48, 209, 88, 0.15); }
.validation-stat.warning { background: rgba(255, 214, 10, 0.15); }
.validation-stat.error { background: rgba(255, 69, 58, 0.15); }
.validation-stat .count { font-size: 20px; font-weight: 700; }
.validation-stat.success .count { color: #30d158; }
.validation-stat.warning .count { color: #ffd60a; }
.validation-stat.error .count { color: #ff453a; }
.validation-stat .label { font-size: 10px; color: #a0a0a0; margin-top: 2px; }

.validation-list { padding: 12px; }
.validation-group { margin-bottom: 16px; }
.validation-group-title {
  font-size: 10px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding: 0 4px;
}
.validation-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: #242424;
  border-radius: 8px;
  margin-bottom: 6px;
}
.validation-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}
.validation-icon.success { background: #30d158; color: white; }
.validation-icon.warning { background: #ffd60a; color: #000; }
.validation-content { flex: 1; }
.validation-title { font-size: 12px; font-weight: 500; margin-bottom: 2px; }
.validation-desc { font-size: 10px; color: #a0a0a0; }
.validation-action { font-size: 10px; color: #0a84ff; margin-top: 4px; cursor: pointer; }

/* ========== SUMMARY VIEW STYLES ========== */
/* Touch-friendly pill selectors for Summary section */
.summary-pill {
  padding: 10px 16px;
  background: #333333;
  border: 2px solid #3a3a3a;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  color: #a0a0a0;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 44px; /* Apple HIG touch target */
}
.summary-pill:hover { border-color: #0a84ff; color: white; }
.summary-pill.active {
  background: #0a84ff;
  border-color: #0a84ff;
  color: white;
}

/* Quality & Condition pill selectors */
.quality-pill, .condition-pill {
  width: 48px;
  height: 48px;
  background: #333333;
  border: 2px solid #3a3a3a;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  color: #a0a0a0;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quality-pill:hover { border-color: #bf5af2; color: white; }
.quality-pill.active {
  background: #bf5af2;
  border-color: #bf5af2;
  color: white;
}
.condition-pill:hover { border-color: #64d2ff; color: white; }
.condition-pill.active {
  background: #64d2ff;
  border-color: #64d2ff;
  color: #1a1a1a;
}

/* Tag pills (multi-select style) */
.tag-pill {
  padding: 8px 14px;
  background: #333333;
  border: 1px solid #3a3a3a;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  color: #a0a0a0;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 36px;
}
.tag-pill:hover { border-color: #666666; color: white; }
.tag-pill.active {
  background: rgba(255, 159, 10, 0.2);
  border-color: #ff9f0a;
  color: #ff9f0a;
}

/* Summary info cells */
.summary-info-cell {
  background: #333333;
  border-radius: 10px;
  padding: 12px;
}
.summary-info-label {
  font-size: 10px;
  font-weight: 600;
  color: #666666;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.summary-info-value {
  font-size: 13px;
  font-weight: 500;
  color: white;
}

/* Summary checkboxes (read-only style) */
.summary-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #a0a0a0;
  cursor: default;
}
.summary-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #0a84ff;
  border-radius: 4px;
}
.summary-checkbox input[type="checkbox"]:checked + span {
  color: white;
}

/* ========== THEME TOGGLE ========== */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #a0a0a0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  font-size: 16px;
}
.theme-toggle:hover {
  background: #333333;
  color: white;
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

/* ========== LIGHT MODE ========== */
html:not(.dark) body {
  background: #f5f5f7;
  color: #1d1d1f;
}

html:not(.dark) .bg-bg-primary { background: #f5f5f7; }
html:not(.dark) .bg-bg-secondary { background: #ffffff; }
html:not(.dark) .bg-bg-tertiary { background: #e8e8ed; }
html:not(.dark) .bg-bg-hover { background: #d2d2d7; }
html:not(.dark) .bg-bg-sidebar { background: #ffffff; }
html:not(.dark) .border-border-color { border-color: #d2d2d7; }
html:not(.dark) .text-text-primary { color: #1d1d1f; }
html:not(.dark) .text-text-secondary { color: #6e6e73; }
html:not(.dark) .text-text-tertiary { color: #86868b; }

html:not(.dark) .sidebar-width { background: #ffffff; }
html:not(.dark) aside { background: #ffffff; }

html:not(.dark) .nav-item:hover { background: #e8e8ed; }
html:not(.dark) .nav-item.active { background: #0a84ff; }

html:not(.dark) .insp-nav-item { background: #e8e8ed; }
html:not(.dark) .insp-nav-item:hover { border-color: #d2d2d7; }
html:not(.dark) .insp-nav-item.active { background: #0a84ff; border-color: #0a84ff; }
html:not(.dark) .insp-nav-icon { background: #d2d2d7; }
html:not(.dark) .insp-nav-subtitle { color: #6e6e73; }

html:not(.dark) .insp-field { background: #e8e8ed; }
html:not(.dark) .insp-field-label { color: #86868b; }

html:not(.dark) .bg-bg-secondary.rounded-xl { background: #ffffff; }
html:not(.dark) .report-section { background: #e8e8ed; }
html:not(.dark) .report-section:hover { background: #d2d2d7; }

html:not(.dark) .comp-card { background: #ffffff; border-color: #d2d2d7; }
html:not(.dark) .comp-card:hover { border-color: #86868b; }
html:not(.dark) .comp-card-stats { border-color: #d2d2d7; }

html:not(.dark) .grid-wrapper { background: #ffffff; }
html:not(.dark) .grid-labels { background: #e8e8ed; border-color: #d2d2d7; }
html:not(.dark) .grid-cell { border-color: #d2d2d7; }
html:not(.dark) .grid-cell.header { background: #e8e8ed; }
html:not(.dark) .grid-cell.section { background: #d2d2d7; }

html:not(.dark) .slide-panel { background: #ffffff; border-color: #d2d2d7; }
html:not(.dark) .filter-input { background: #e8e8ed; border-color: #d2d2d7; color: #1d1d1f; }
html:not(.dark) .filter-chip { background: #e8e8ed; }
html:not(.dark) .comp-db-item { background: #e8e8ed; }

html:not(.dark) .floating-player { background: rgba(255, 255, 255, 0.9); }
html:not(.dark) .player-btn { color: #1d1d1f; }
html:not(.dark) .player-btn.play { background: #1d1d1f; color: #ffffff; }
html:not(.dark) .timeline-track { background: rgba(0, 0, 0, 0.2); }
html:not(.dark) .timeline-progress { background: #1d1d1f; }

html:not(.dark) .scrollbar-thin::-webkit-scrollbar-thumb { background: #d2d2d7; }

html:not(.dark) .theme-toggle:hover { background: #e8e8ed; color: #1d1d1f; }
html:not(.dark) .theme-toggle .icon-sun { display: block; }
html:not(.dark) .theme-toggle .icon-moon { display: none; }

html:not(.dark) .rating-pill { background: #e8e8ed; color: #6e6e73; }
html:not(.dark) .quality-pill, html:not(.dark) .condition-pill { background: #e8e8ed; color: #6e6e73; }
html:not(.dark) .summary-pill { background: #e8e8ed; border-color: #d2d2d7; color: #6e6e73; }
html:not(.dark) .tag-pill { background: #e8e8ed; border-color: #d2d2d7; color: #6e6e73; }

html:not(.dark) input, html:not(.dark) textarea, html:not(.dark) select {
  background: #e8e8ed;
  border-color: #d2d2d7;
  color: #1d1d1f;
}

html:not(.dark) .view-toggle { background: #e8e8ed; }
html:not(.dark) .view-toggle-btn { color: #6e6e73; }
html:not(.dark) .view-toggle-btn:hover:not(.active) { background: #d2d2d7; color: #1d1d1f; }

html:not(.dark) .quick-stats { background: #ffffff; }
html:not(.dark) .link-card { background: #ffffff; }

html:not(.dark) .insp-nav-item.add-button { border-color: #d2d2d7; color: #86868b; }
html:not(.dark) .insp-nav-nested { border-color: #d2d2d7; }
html:not(.dark) .insp-nav-nested .insp-nav-item { background: #f0f0f5; }
html:not(.dark) .insp-nav-nested .insp-nav-item:hover { background: #e8e8ed; }
