:root {
  --primary: #0A3D62;
  --primary-mid: #3C6382;
  --primary-light: #60A3BC;
  --accent: #82CCDD;
  --bg-light: #F8F9FA;
  --bg: #F0F4F8;
  --surface: #FFFFFF;
  --text: #1A2332;
  --text-secondary: #5A6B7F;
  --text-muted: #8E99A8;
  --border: #D6E0EB;
  --border-light: #E8EEF4;
  --danger: #D32F2F;
  --danger-light: #FFEBEE;
  --success: #2E7D32;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(13, 71, 161, 0.06);
  --shadow-md: 0 4px 12px rgba(13, 71, 161, 0.08);
  --shadow-lg: 0 8px 30px rgba(13, 71, 161, 0.12);
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

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

::selection {
  background: var(--accent);
  color: white;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== HEADER ===== */
.app-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 50%, var(--primary-light) 100%);
  color: white;
  padding: 2rem 1.5rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.app-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.app-header::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.header-content {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-icon {
  font-size: 1.75rem;
}

.header-title h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.header-subtitle {
  font-size: 0.875rem;
  opacity: 0.8;
  margin-top: 0.25rem;
  font-weight: 300;
}

/* ===== TAB NAV ===== */
.tab-nav {
  display: flex;
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 0 0.5rem;
  position: sticky;
  top: 0;
  z-index: 20;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

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

.tab-btn:hover:not(.active) {
  color: var(--text-secondary);
  background: var(--bg-light);
}

.tab-icon {
  font-size: 1.1rem;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem;
}

/* ===== TOOLBAR ===== */
.list-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.15);
}

.search-icon {
  font-size: 1rem;
  margin-right: 0.5rem;
  opacity: 0.5;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.75rem 0;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: transparent;
  color: var(--text);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-clear {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.25rem;
}

.toolbar-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-select {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  min-height: 44px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.15);
}

.btn-export {
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
  min-height: 44px;
  white-space: nowrap;
}

.btn-export:hover {
  background: var(--bg-light);
  border-color: var(--accent);
  color: var(--primary);
}

/* ===== LIST SUMMARY ===== */
.list-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1rem;
}

.summary-value {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
}

/* ===== ITEMS GRID ===== */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding-bottom: 5rem;
}

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

.item-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: fadeInUp 0.35s ease both;
  display: flex;
  flex-direction: column;
}

.item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.item-photo-container {
  position: relative;
  height: 160px;
  background: var(--bg-light);
  overflow: hidden;
}

.item-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: 0.4;
}

.item-category-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--primary);
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.item-details {
  padding: 0.875rem 1rem;
  flex: 1;
}

.item-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--text);
  line-height: 1.3;
}

.item-description {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.item-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
}

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

.item-actions {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem 1rem 0.75rem;
  border-top: 1px solid var(--border-light);
}

.btn-icon {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: background 0.15s;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: var(--bg-light);
}

/* ===== FAB ===== */
.fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  font-size: 1.75rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(13, 71, 161, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 30;
}

.fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(13, 71, 161, 0.45);
}

.fab:active {
  transform: scale(0.96);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
}

.empty-illustration {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

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

/* ===== BUTTONS ===== */
.btn-primary {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(13, 71, 161, 0.3);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  padding: 0.75rem 1.5rem;
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
}

.btn-secondary:hover {
  background: var(--bg);
  border-color: var(--text-muted);
}

.btn-danger {
  padding: 0.75rem 1.5rem;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
}

.btn-danger:hover {
  background: #B71C1C;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 71, 161, 0.25);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

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

.modal-content {
  background: var(--surface);
  border-radius: var(--radius);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.modal-header h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
}

.modal-close {
  border: none;
  background: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.modal-close:hover {
  background: var(--bg);
}

/* ===== FORM ===== */
.item-form {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.7rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 44px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.input-error {
  border-color: var(--danger) !important;
}

.error-text {
  font-size: 0.78rem;
  color: var(--danger);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding-top: 0.5rem;
}

/* ===== PHOTO UPLOAD ===== */
.photo-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  gap: 0.5rem;
}

.photo-upload-area:hover {
  border-color: var(--accent);
  background: var(--bg-light);
}

.hidden-input {
  display: none;
}

.upload-icon {
  font-size: 1.75rem;
}

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

.photo-preview-container {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.photo-preview {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
}

.photo-remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  padding: 0.3rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
}

.photo-remove:hover {
  background: var(--danger);
}

/* ===== CONFIRM DIALOG ===== */
.confirm-dialog {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}

.confirm-dialog h3 {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

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

.confirm-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* ===== DASHBOARD ===== */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.875rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  animation: fadeInUp 0.35s ease both;
}

.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: 0.05s; }
.stat-card:nth-child(3) { animation-delay: 0.1s; }
.stat-card:nth-child(4) { animation-delay: 0.15s; }

.stat-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
}

.stat-primary .stat-label {
  color: rgba(255, 255, 255, 0.8);
}

.stat-icon {
  font-size: 1.75rem;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
}

.highlight-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--accent);
}

.highlight-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.highlight-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.highlight-photo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.highlight-details {
  display: flex;
  flex-direction: column;
}

.highlight-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}

.highlight-category {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.highlight-value {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
}

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

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.chart-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.chart-container {
  position: relative;
  height: 260px;
}

.empty-dashboard {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.empty-dashboard .empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.75rem;
}

/* ===== SKELETON ===== */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.skeleton-card {
  height: 180px;
  background: linear-gradient(90deg, var(--border-light) 25%, var(--bg) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius);
  animation: shimmer 1.5s ease infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .app-header {
    padding: 1.5rem 1rem 1.25rem;
  }

  .header-title h1 {
    font-size: 1.3rem;
  }

  .main-content {
    padding: 1rem;
  }

  .items-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .toolbar-actions {
    flex-direction: column;
  }

  .filter-select {
    width: 100%;
  }

  .btn-export {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    max-height: 95vh;
    border-radius: var(--radius) var(--radius) 0 0;
    margin-top: auto;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .tab-label {
    font-size: 0.8rem;
  }
}

@media (max-width: 380px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

<!-- WALKTHROUGH_SCRIPT:
[
  {"step": 1, "narration": "Welcome to your Home Inventory app — your insurance-ready asset tracker. Let's explore!", "view": "default", "highlight_selector": ".app-header", "wait_for": "tap_to_continue"},
  {"step": 2, "narration": "The Inventory tab shows all your items. It's empty right now, so let's add your first item.", "view": "default", "highlight_selector": ".empty-state", "wait_for": "tap_to_continue"},
  {"step": 3, "narration": "Tap the blue + button to add a new item with name, category, value, date, and photo.", "view": "default", "highlight_selector": ".fab", "wait_for": "user_interaction"},
  {"step": 4, "narration": "Fill in the item details — name, category, estimated value, and optionally upload a photo for your records.", "view": "default", "highlight_selector": ".item-form", "wait_for": "user_interaction"},
  {"step": 5, "narration": "Use the search bar and filters to quickly find items by name, category, or sort by value.", "view": "default", "highlight_selector": ".list-toolbar", "wait_for": "tap_to_continue"},
  {"step": 6, "narration": "The summary bar always shows your filtered item count and total insured value at a glance.", "view": "default", "highlight_selector": ".list-summary", "wait_for": "tap_to_continue"},
  {"step": 7, "narration": "Switch to the Dashboard tab to see total insured value, category breakdowns, and charts.", "view": "default", "highlight_selector": ".tab-nav", "wait_for": "user_interaction"},
  {"step": 8, "narration": "Export your inventory as a CSV file anytime using the Export button — perfect for insurance claims.", "view": "default", "highlight_selector": ".btn-export", "wait_for": "tap_to_continue"}
]
-->

.auth-gate {
  max-width: 560px;
  margin: 2rem auto 0;
}

.auth-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.household-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.household-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

@media (max-width: 640px) {
  .household-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-actions {
    flex-direction: column;
  }
}

.camera-capture-area {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.camera-preview {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}

.camera-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.camera-error {
  font-size: 0.8rem;
  color: var(--danger);
}

/* No new CSS rules required. Existing dashboard styles cover the added line chart. */

.pdf-report{
  position: absolute;
  left: 0;
  top: 0;
  width: 960px;
  max-width: 960px;
  
  pointer-events: none;
  z-index: -1;
  background: var(--surface);
  color: var(--text);
  padding: 24px; position: fixed; left: -9999px; top: 0;}

.pdf-report-header {
  margin-bottom: 16px;
}

.pdf-report-header h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.pdf-report-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.pdf-summary {
  margin-bottom: 16px;
}

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

.pdf-item-row {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  page-break-inside: avoid;
}

.pdf-item-photo-wrap {
  width: 92px;
  flex: 0 0 92px;
}

.pdf-item-photo,
.pdf-item-photo-placeholder {
  width: 92px;
  height: 92px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-muted);
}

.pdf-item-body {
  flex: 1;
  min-width: 0;
}

.pdf-item-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 6px;
}

.pdf-item-top strong {
  font-family: var(--font-display);
  font-size: 1rem;
}

.pdf-item-top span {
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.pdf-item-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.pdf-item-body p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.pdf-error {
  margin-bottom: 0.75rem;
}

@media print {
  .pdf-report {
    position: static;
    opacity: 1;
    z-index: auto;
  }
}
