/* Modern Minimalist Utility Design - Mobile-First */
:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-subtle: #f3f4f6;
  --border: #e5e7eb;
  --border-focus: #111827;
  
  --text-main: #111827;
  --text-muted: #4b5563;
  --text-subtle: #9ca3af;
  
  --brand: #0f172a;
  --brand-hover: #1e293b;
  
  --tag-yes-bg: #ecfdf5;
  --tag-yes-text: #065f46;
  --tag-yes-border: #a7f3d0;
  
  --tag-no-bg: #fef2f2;
  --tag-no-text: #991b1b;
  --tag-no-border: #fecaca;
  
  --tag-unk-bg: #fffbeb;
  --tag-unk-text: #92400e;
  --tag-unk-border: #fde68a;
  
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

/* Dark Theme */
body[data-theme="dark"] {
  --bg: #090d16;
  --surface: #111827;
  --surface-subtle: #1f2937;
  --border: #374151;
  --border-focus: #60a5fa;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-subtle: #6b7280;
  --brand: #3b82f6;
  --brand-hover: #2563eb;
  --tag-yes-bg: #064e3b;
  --tag-yes-text: #6ee7b7;
  --tag-yes-border: #059669;
  --tag-no-bg: #7f1d1d;
  --tag-no-text: #fca5a5;
  --tag-no-border: #dc2626;
  --tag-unk-bg: #78350f;
  --tag-unk-text: #fde68a;
  --tag-unk-border: #d97706;
}

/* Outdoor High-Contrast Sunlight Mode */
body[data-theme="outdoor"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-subtle: #f1f5f9;
  --border: #000000;
  --border-focus: #000000;
  --text-main: #000000;
  --text-muted: #000000;
  --text-subtle: #1e293b;
  --brand: #000000;
  --brand-hover: #222222;
  --tag-yes-bg: #bbf7d0;
  --tag-yes-text: #052e16;
  --tag-yes-border: #15803d;
  --tag-no-bg: #fecaca;
  --tag-no-text: #450a0a;
  --tag-no-border: #991b1b;
  --tag-unk-bg: #fef08a;
  --tag-unk-text: #422006;
  --tag-unk-border: #a16207;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

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

/* Typography & Links */
h1, h2, h3, h4 {
  color: var(--text-main);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Base Form Elements (16px base on mobile avoids iOS zoom) */
button, input, select, textarea {
  font: inherit;
  font-size: 15px;
  color: var(--text-main);
}

input, select, textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 1px var(--border-focus);
}

/* Header */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.brand-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: var(--radius-full);
}

.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
}

.status-indicator.online {
  background: #10b981;
}

/* Property Switcher Bar */
.prop-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
}

.prop-bar-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.house-tabs-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

.house-tabs-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0;
  flex: 1;
  min-width: 0;
}

.house-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.house-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all 0.15s ease;
  max-width: 220px;
  flex-shrink: 0;
}

.house-tab:hover {
  background: var(--surface);
  color: var(--text-main);
  border-color: #cbd5e1;
}

.house-tab.active {
  background: var(--surface);
  color: var(--text-main);
  border-color: var(--text-main);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.house-tab-icon {
  font-size: 13px;
}

.house-tab-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.house-tab-price {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 4px;
}

.house-tab.active .house-tab-price {
  background: #e2e8f0;
  color: var(--text-main);
}

.house-tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  color: var(--text-muted);
  margin-left: 2px;
  transition: all 0.1s ease;
}

.house-tab-close:hover {
  background: var(--tag-no-bg);
  color: var(--tag-no-text);
}

.house-tab-add {
  flex-shrink: 0;
  white-space: nowrap;
}

.prop-bar-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Segmented Tabs (Horizontal Scroll on Mobile) */
.tabs-container {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 57px;
  z-index: 25;
}

.tabs-scroll {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  gap: 4px;
  padding: 8px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-scroll::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  flex: 0 0 auto;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-tab:hover {
  background: var(--surface-subtle);
  color: var(--text-main);
}

.nav-tab.active {
  background: var(--brand);
  color: #ffffff;
  font-weight: 600;
}

/* Main Layout */
.app-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Cards & Containers */
.box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.box-head {
  margin-bottom: 14px;
}

.box-head h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.box-head p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Grid Layouts */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

/* Metrics Bar */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.metric-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.metric-lbl {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Filter Controls */
.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.pill-group {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}

.pill {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
}

.pill.active {
  background: var(--text-main);
  border-color: var(--text-main);
  color: #ffffff;
}

.search-box {
  flex: 1;
  min-width: 200px;
  padding: 7px 10px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

/* Checklist Groups & Accordions */
.group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.group-header {
  padding: 12px 16px;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.group-header:hover {
  background: #e2e8f0;
}

body[data-theme="dark"] .group-header:hover {
  background: #374151;
}

.group-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.group-chevron {
  font-size: 11px;
  color: var(--text-muted);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

.group-card.collapsed .group-chevron {
  transform: rotate(-90deg);
}

.group-card.collapsed .group-body {
  display: none;
}

.group-card.collapsed .group-header {
  border-bottom: none;
}

.group-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.group-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.group-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* Checklist Items */
.check-row {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

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

.check-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.check-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-subtle);
  min-width: 18px;
  padding-top: 1px;
}

.check-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-main);
}

.tag-critical {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--tag-no-text);
  background: var(--tag-no-bg);
  border: 1px solid var(--tag-no-border);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  margin-left: 6px;
}

/* Segmented Toggle Control */
.segmented-opts {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.seg-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.1s ease;
}

.seg-btn:active {
  transform: scale(0.98);
}

.seg-btn.is-yes {
  background: var(--tag-yes-bg);
  color: var(--tag-yes-text);
  border-color: var(--tag-yes-border);
  font-weight: 600;
}

.seg-btn.is-no {
  background: var(--tag-no-bg);
  color: var(--tag-no-text);
  border-color: var(--tag-no-border);
  font-weight: 600;
}

.seg-btn.is-unk {
  background: var(--tag-unk-bg);
  color: var(--tag-unk-text);
  border-color: var(--tag-unk-border);
  font-weight: 600;
}

.seg-btn.is-na {
  background: var(--surface-subtle);
  color: var(--text-muted);
  border-color: #cbd5e1;
  font-weight: 600;
}

/* Inline Note Inputs */
.item-inputs {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.item-inputs textarea {
  min-height: 40px;
  padding: 6px 10px;
  font-size: 12px;
  resize: vertical;
}

.item-inputs input {
  padding: 6px 10px;
  font-size: 12px;
}

/* Document Row */
.doc-row {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

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

.doc-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.doc-info {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.doc-pills {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.doc-btn {
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
}

.doc-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  font-weight: 600;
}

/* Calculator Table */
.calc-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.calc-table tr {
  border-bottom: 1px solid var(--border);
}

.calc-table td {
  padding: 9px 4px;
  font-size: 13px;
}

.calc-table td:last-child {
  text-align: right;
  font-weight: 600;
}

.calc-total {
  background: var(--surface-subtle);
}

.calc-total td {
  font-weight: 700 !important;
  font-size: 14px !important;
  padding: 12px 6px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--brand-hover);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--surface-subtle);
}

.btn-danger {
  background: var(--tag-no-bg);
  border-color: var(--tag-no-border);
  color: var(--tag-no-text);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

/* Sticky Bottom Bar */
.bottom-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 8px 16px;
  z-index: 40;
}

.dock-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dock-msg {
  font-size: 12px;
  color: var(--text-muted);
}

.dock-actions {
  display: flex;
  gap: 6px;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  body {
    font-size: 14px;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .item-inputs {
    grid-template-columns: 1fr;
  }
  .dock-msg {
    display: none;
  }
  .dock-actions {
    width: 100%;
    justify-content: space-between;
  }
  .dock-actions .btn {
    flex: 1;
    font-size: 12px;
    padding: 9px 6px;
  }
}

/* Voice Dictation Button */
.btn-voice {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 4px;
  align-self: flex-start;
}

.btn-voice.recording {
  background: var(--tag-no-bg);
  border-color: var(--tag-no-border);
  color: var(--tag-no-text);
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  from { opacity: 1; }
  to { opacity: 0.6; }
}

/* Photo Gallery */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.photo-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 1;
  background: var(--surface-subtle);
}

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

.photo-del {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* Inspection Kit Box */
.kit-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 16px;
}

.kit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.kit-item {
  font-size: 12px;
  color: var(--text-main);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Negotiation Points Box */
.neg-box {
  background: var(--tag-no-bg);
  border: 1px solid var(--tag-no-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-top: 16px;
}

.neg-item {
  font-size: 13px;
  color: var(--tag-no-text);
  margin-bottom: 6px;
  padding-left: 12px;
  position: relative;
}

.neg-item::before {
  content: "•";
  position: absolute;
  left: 0;
  font-weight: 700;
}

/* Property Type Selector */
.prop-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.type-btn {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.type-btn:hover {
  background: var(--surface);
  color: var(--text-main);
  border-color: #cbd5e1;
}

.type-btn.active {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
  font-weight: 600;
}

/* Smart Paste Box */
.smart-paste-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 16px;
}

.smart-paste-box textarea {
  font-size: 12.5px;
  resize: vertical;
  background: #ffffff;
  margin-top: 6px;
}

/* Side-by-Side Comparison Matrix Table */
/* Side-by-Side Comparison Matrix Table (Sticky Freeze-Panes) */
.matrix-container {
  overflow: auto;
  max-height: 75vh;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  margin-top: 12px;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  min-width: 650px;
}

.matrix-table th, .matrix-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  vertical-align: top;
  background: var(--surface);
}

/* Sticky Header Row */
.matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface-subtle);
  font-weight: 600;
  text-align: left;
  border-bottom: 2px solid var(--border);
}

/* Sticky First Column */
.matrix-table tbody td:first-child, .matrix-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 11;
  background: var(--surface-subtle);
  font-weight: 600;
  color: var(--text-muted);
  width: 190px;
  min-width: 190px;
  border-right: 2px solid var(--border);
}

/* Intersection Cell (Top-Left) */
.matrix-table thead th:first-child {
  z-index: 20;
  background: var(--surface-subtle);
}

/* Floating Action Button (Next Unanswered) */
.fab-btn {
  position: fixed;
  bottom: 85px;
  right: 16px;
  z-index: 990;
  background: var(--brand);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s ease, background 0.15s ease;
  user-select: none;
}

.fab-btn:hover {
  background: var(--brand-hover);
  transform: translateY(-2px);
}

.fab-btn:active {
  transform: translateY(0) scale(0.97);
}

/* Pulse Highlight for target question */
@keyframes questionPulse {
  0% { background-color: rgba(59, 130, 246, 0.35); }
  50% { background-color: rgba(59, 130, 246, 0.18); }
  100% { background-color: transparent; }
}

.highlight-pulse {
  animation: questionPulse 2s ease-out forwards;
}

/* Quick Note Chips */
.note-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.chip-btn {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
}

.chip-btn:hover {
  background: var(--border);
  color: var(--text-main);
}

.chip-btn:active {
  transform: scale(0.95);
}

/* Question Photo Attachments */
.q-photos-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}

.q-thumb-wrap {
  position: relative;
  display: inline-block;
}

.q-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: block;
}

.q-thumb-del {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 17px;
  height: 17px;
  background: #dc2626;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.q-add-photo-btn {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  border: 1px dashed var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.q-add-photo-btn:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

/* Property Health Scorecard Badge */
.health-score-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
}

.health-score-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 3px solid;
  flex-shrink: 0;
}

.health-score-num {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.health-score-max {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 1px;
}

.health-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Print Cleanliness */
@media print {
  body {
    background: #fff;
    padding: 0;
  }
  .app-header, .prop-bar, .tabs-container, .bottom-dock, .filter-row, .btn {
    display: none !important;
  }
  .tab-pane {
    display: block !important;
    page-break-after: auto;
  }
  .box, .group-card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
}
