:root {
  --background: #021a13;
  --surface: #062e22;
  --surface-variant: #0b3d2f;
  --surface-elevated: #0f4a39;
  --outline: #1b5e48;
  --outline-light: #124535;
  --on-background: #f1f5f9;
  --on-surface: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --primary: #34d399;
  --primary-hover: #10b981;
  --primary-container: #064e3b;
  --on-primary-container: #d1fae5;
  --positive: #34d399;
  --positive-bg: rgba(52, 211, 153, 0.15);
  --positive-border: rgba(52, 211, 153, 0.3);
  --negative: #f87171;
  --negative-bg: rgba(239, 68, 68, 0.15);
  --negative-border: rgba(239, 68, 68, 0.3);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.15);
  --warning-border: rgba(251, 191, 36, 0.3);
  --neutral: #94a3b8;
  --neutral-bg: rgba(148, 163, 184, 0.12);
  --neutral-border: rgba(148, 163, 184, 0.25);
  --inspected-today-bg: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(6, 78, 59, 0.55) 100%);
  --inspected-today-border: rgba(52, 211, 153, 0.55);
  --inspected-today-accent: var(--primary);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.5);
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { 
  font-family: var(--font-family); 
  background: radial-gradient(circle at top right, #06382a 0%, #021a13 100%); 
  color: var(--on-background); 
  min-height: 100vh; 
  -webkit-font-smoothing: antialiased; 
  padding-bottom: 30px;
}

/* App Bar */
.app-bar { 
  position: sticky; 
  top: 0; 
  width: 100%; 
  min-height: 60px; 
  height: auto;
  background: rgba(6, 46, 34, 0.90); 
  backdrop-filter: blur(12px); 
  -webkit-backdrop-filter: blur(12px); 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  z-index: 100; 
  border-bottom: 1px solid var(--outline-light); 
  padding: 6px 16px; 
}
.app-title-group { display: flex; align-items: center; gap: 10px; min-width: 0; }
.app-brand-block { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.app-title { text-decoration: none; color: inherit; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; min-width: 0; line-height: 1.2; }
.app-title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100vw - 180px); }

/* Header Inspection Period Date Control */
.header-inspection-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.header-inspection-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted, #94a3b8);
  font-weight: 500;
  white-space: nowrap;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.header-inspection-label svg {
  color: var(--primary, #10b981);
  flex-shrink: 0;
}
.header-date-input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm, 6px);
  color: var(--text, #f0fdf4);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 10px;
  height: 34px;
  box-sizing: border-box;
  outline: none;
  cursor: pointer;
  color-scheme: dark;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
  max-width: 150px;
}
.header-date-input:hover,
.header-date-input:focus {
  border-color: var(--primary, #10b981);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 1px var(--primary, #10b981);
}
.app-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* Status Badges & Controls */
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-full); font-size: 11px; font-weight: 500; }
.status-badge.online { background: var(--positive-bg); color: var(--positive); border: 1px solid var(--positive-border); }
.status-badge.offline { background: var(--negative-bg); color: var(--negative); border: 1px solid var(--negative-border); }
.status-badge.paused { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.status-dot.syncing { background: var(--warning); animation: pulse 1.5s infinite; }
.status-dot.synced { background: var(--positive); }
.status-dot.error { background: var(--negative); }

.btn-header-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: var(--surface-variant);
  color: var(--primary);
  border: 1px solid var(--outline);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.1s;
}
.btn-header-toggle:hover { background: var(--surface-elevated); border-color: var(--primary); }
.btn-header-toggle:active { transform: scale(0.95); }
.btn-header-toggle.is-offline {
  color: var(--negative, #ef4444);
  border-color: var(--negative-border, rgba(239, 68, 68, 0.3));
}

.btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--surface-variant); color: var(--on-surface); border: 1px solid var(--outline); cursor: pointer; transition: background 0.2s, border-color 0.2s, transform 0.1s; }
.btn-icon:hover { background: var(--surface-elevated); border-color: var(--primary); }
.btn-icon:active { transform: scale(0.95); }

/* Main Content Layout */
.main-content { max-width: 680px; margin: 0 auto; padding: 16px; }

/* Sync Banner */
.sync-banner { margin-bottom: 20px; padding: 14px 16px; border-radius: var(--radius-md); background: rgba(6, 78, 59, 0.4); border: 1px solid var(--positive-border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sync-banner h4 { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 2px; }
.sync-banner p { font-size: 12px; color: var(--text-muted); }

/* Stats Bar & Filter Buttons */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.stat-card { background: var(--surface); border: 1px solid var(--outline-light); border-radius: var(--radius-md); padding: 12px 6px; text-align: center; }
.stat-value { font-size: 20px; font-weight: 700; color: #fff; transition: opacity 0.2s, transform 0.2s; }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; transition: color 0.2s, opacity 0.2s; }

/* Stat Cards as Interactive Toggle Buttons */
button.stat-card, .stat-card.stat-btn {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
  position: relative;
}

/* OFF state: darker background, dimmer border, muted values */
button.stat-card:not(.active), .stat-card.stat-btn:not(.active) {
  background: rgba(2, 26, 19, 0.75);
  border: 1px solid rgba(18, 69, 53, 0.4);
  box-shadow: none;
}
button.stat-card:not(.active) .stat-value, .stat-card.stat-btn:not(.active) .stat-value {
  opacity: 0.45;
}
button.stat-card:not(.active) .stat-label, .stat-card.stat-btn:not(.active) .stat-label {
  color: var(--text-subtle);
  opacity: 0.7;
}
button.stat-card:not(.active):hover, .stat-card.stat-btn:not(.active):hover {
  background: rgba(6, 46, 34, 0.55);
  border-color: rgba(27, 94, 72, 0.6);
}
button.stat-card:not(.active):hover .stat-value, .stat-card.stat-btn:not(.active):hover .stat-value {
  opacity: 0.75;
}

/* ON state: lighter background, brighter border, full contrast */
button.stat-card.active, .stat-card.stat-btn.active {
  background: var(--surface-elevated);
  border: 1px solid var(--primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(52, 211, 153, 0.25);
}
button.stat-card.active .stat-value, .stat-card.stat-btn.active .stat-value {
  opacity: 1;
}
button.stat-card.active .stat-label, .stat-card.stat-btn.active .stat-label {
  color: var(--on-surface);
  font-weight: 600;
  opacity: 1;
}
button.stat-card.active:hover, .stat-card.stat-btn.active:hover {
  background: #125743;
  border-color: var(--primary-hover);
}

/* Accessible focus outline */
button.stat-card:focus-visible, .stat-card.stat-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Active press feedback */
button.stat-card:active, .stat-card.stat-btn:active {
  transform: scale(0.97);
}

/* Category-specific active highlight accents */
.stat-btn[data-filter="passed"].active {
  border-color: var(--positive);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--positive-border);
}
.stat-btn[data-filter="failed"].active {
  border-color: var(--negative);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--negative-border);
}
.stat-btn[data-filter="holds"].active {
  border-color: var(--warning);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--warning-border);
}

/* Search */
.search-box { position: relative; margin-bottom: 14px; }
.search-input { width: 100%; padding: 12px 14px 12px 38px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--outline); color: var(--on-surface); font-size: 14px; outline: none; transition: border-color 0.2s; }
.search-input:focus { border-color: var(--primary); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

/* Plot Cards */
.plot-list { display: flex; flex-direction: column; gap: 10px; }
.plot-card { background: var(--surface); border: 1px solid var(--outline-light); border-radius: var(--radius-md); padding: 14px; cursor: pointer; transition: transform 0.15s, border-color 0.15s, background 0.15s; }
.plot-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.plot-card.inspected-today { background: var(--inspected-today-bg); border-color: var(--inspected-today-border); border-left: 4px solid var(--inspected-today-accent); }
.plot-card.inspected-today:hover { border-color: var(--primary); border-left-color: var(--primary-hover); }
.plot-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.plot-id-group { display: flex; align-items: center; gap: 8px; }
.plot-num { font-size: 18px; font-weight: 700; color: #fff; }

.pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; }
.pill-success { background: var(--positive-bg); color: var(--positive); border: 1px solid var(--positive-border); }
.pill-danger { background: var(--negative-bg); color: var(--negative); border: 1px solid var(--negative-border); }
.pill-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.pill-neutral { background: var(--neutral-bg); color: var(--neutral); border: 1px solid var(--neutral-border); }
.pill-letter { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }

.plot-checks-summary { display: flex; gap: 8px; font-size: 12px; }
.check-item { padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.check-item.pass { background: rgba(52, 211, 153, 0.1); color: var(--positive); }
.check-item.fail { background: rgba(239, 68, 68, 0.1); color: var(--negative); }

.plot-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--outline-light); font-size: 11px; color: var(--text-muted); }
.updated-date.today { color: var(--primary); font-weight: 600; }
.album-link { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); text-decoration: none; font-weight: 500; }

/* Inspection Form */
.inspect-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.inspect-header h2 { font-size: 22px; font-weight: 700; }

.letter-selection-group { display: flex; gap: 8px; margin-bottom: 20px; }
.letter-chip { flex: 1; text-align: center; padding: 10px 0; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--outline); cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text-muted); transition: all 0.2s; }
.letter-chip.active { background: #2563eb; border-color: #3b82f6; color: #fff; }

.inspect-check-card { background: var(--surface); border: 1px solid var(--outline-light); border-radius: var(--radius-md); padding: 14px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.inspect-check-label { font-size: 14px; font-weight: 500; color: #fff; }
.toggle-switch-group { display: flex; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--outline); }
.toggle-btn { padding: 8px 16px; border: none; background: var(--surface-variant); color: var(--text-muted); font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.toggle-btn.active.pass-toggle { background: var(--positive); color: #021a13; }
.toggle-btn.active.fail-toggle { background: var(--negative); color: #fff; }

.status-preview { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: var(--radius-md); font-weight: 600; font-size: 14px; margin: 20px 0; }
.status-preview.passed { background: var(--positive-bg); color: var(--positive); border: 1px solid var(--positive-border); }
.status-preview.failed { background: var(--negative-bg); color: var(--negative); border: 1px solid var(--negative-border); }

/* Photos Gallery & Camera */
.photos-strip { display: flex; gap: 10px; overflow-x: auto; padding: 10px 0; margin-bottom: 16px; }
.photo-thumb { position: relative; width: 72px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--outline); flex-shrink: 0; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.btn-remove-photo { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,0.7); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: background 0.2s; }
.btn-primary { background: var(--primary); color: #021a13; width: 100%; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface-variant); color: var(--on-surface); border: 1px solid var(--outline); }
.btn-secondary:hover { background: var(--surface-elevated); }
.btn-danger { background: var(--negative-bg); color: var(--negative); border: 1px solid var(--negative-border); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; }

/* Modals & Overlays */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; z-index: 1000; backdrop-filter: blur(8px); padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal-card { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius-lg); padding: 20px 24px 24px; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; margin: auto; box-shadow: var(--shadow-md); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; position: sticky; top: -20px; background: var(--surface); z-index: 5; padding: 8px 0 10px; margin-top: -8px; border-bottom: 1px solid var(--outline-light); }
.modal-header h3 { font-size: 18px; font-weight: 600; }

/* Camera Viewfinder */
.camera-viewfinder { position: relative; width: 100%; height: 320px; background: #000; border-radius: var(--radius-md); overflow: hidden; margin-bottom: 12px; }
.camera-viewfinder video { width: 100%; height: 100%; object-fit: cover; }
.camera-flash-overlay { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity 0.18s ease-out; }
.camera-flash-overlay.flash-active { opacity: 0.85; transition: none; }
.camera-modal-strip { min-height: 68px; align-items: center; padding: 6px 0; margin-bottom: 12px; }
.camera-modal-strip .photo-thumb { width: 58px; height: 58px; }
.camera-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.camera-controls .btn-sm { min-height: 44px; min-width: 96px; width: auto; }
.camera-done-btn { font-variant-numeric: tabular-nums; }
.shutter-btn { width: 64px; height: 64px; border-radius: 50%; background: #fff; border: 4px solid var(--primary); cursor: pointer; transition: transform 0.1s; flex-shrink: 0; }
.shutter-btn:active { transform: scale(0.92); }

/* Holds View */
.hold-card { background: var(--surface); border: 1px solid var(--outline-light); border-radius: var(--radius-md); padding: 14px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }

/* Toast Notifications */
.toast-container { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; width: 90%; max-width: 360px; pointer-events: none; }
.toast { padding: 10px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; background: #1e293b; color: #fff; box-shadow: var(--shadow-md); transition: opacity 0.3s; pointer-events: auto; }
.toast-success { background: #065f46; color: #d1fae5; border: 1px solid #10b981; }
.toast-error { background: #881337; color: #ffe4e6; border: 1px solid #f43f5e; }
.toast-info { background: #1e293b; color: #e2e8f0; border: 1px solid #475569; }
.toast.fade-out { opacity: 0; }

.empty-state { text-align: center; padding: 40px 16px; color: var(--text-muted); font-size: 14px; }
.hidden { display: none !important; }
.font-bold { font-weight: 700; }
.text-lg { font-size: 18px; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--text-muted); }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.w-full { width: 100%; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* App Footer */
.app-footer {
  margin-top: 32px;
  padding: 16px 20px 24px;
  border-top: 1px solid var(--outline-light);
  text-align: center;
  font-size: 12px;
  color: var(--text-subtle);
}
.app-footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.footer-version {
  font-weight: 500;
  color: var(--text-muted);
}
.footer-separator {
  opacity: 0.4;
}
.footer-user {
  color: var(--text-muted);
}

/* Google Sign-In Button (GIS OAuth2) */
.btn-gsi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background-color: #131314;
  color: #e3e3e3;
  border: 1px solid #444746;
  border-radius: 20px;
  padding: 10px 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Google Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
  min-height: 40px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-gsi:hover {
  background-color: #202124;
  border-color: #5f6368;
}
.btn-gsi:active {
  background-color: #303134;
}
.btn-gsi svg {
  flex-shrink: 0;
}

/* Stage 4: Plot Photo Gallery Grid & Public Embedded Viewer */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.gallery-card {
  background: var(--surface);
  border: 1px solid var(--outline-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.gallery-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.gallery-card-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #000;
  overflow: hidden;
}
.gallery-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-card-meta {
  padding: 8px 10px;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gallery-card-name {
  font-weight: 600;
  color: var(--on-surface);
  word-break: break-all;
}
.gallery-embed-frame-wrap {
  width: 100%;
  height: 68vh;
  min-height: 420px;
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--outline);
  overflow: hidden;
}
.gallery-embed-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Email Report Preview & Metric Cards */
.report-stat-card {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.report-stat-card.danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.report-stat-card.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
.report-stat-card.success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.report-stat-num {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}
.report-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}
.report-preview-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 10px 0 6px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.report-preview-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  font-size: 12px;
  border-bottom: 1px solid var(--outline-light);
  background: var(--surface);
  border-radius: 4px;
  margin-bottom: 4px;
}
.report-preview-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.report-chip-subtle {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* Navigation Drawer (Slide-out menu from left) */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1200;
  opacity: 1;
  transition: opacity 0.24s ease;
}
.drawer-overlay.hidden {
  display: none;
  opacity: 0;
  pointer-events: none;
}
.nav-drawer {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  max-width: 84vw;
  background: var(--surface);
  border-right: 1px solid var(--outline);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.drawer-overlay.hidden .nav-drawer {
  transform: translateX(-100%);
}
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 14px;
  border-bottom: 1px solid var(--outline-light);
  background: var(--surface-variant);
  gap: 10px;
}
.drawer-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.drawer-user-card img {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--outline);
}
.drawer-user-info {
  min-width: 0;
  flex: 1;
}
.drawer-user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--on-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drawer-user-email {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drawer-site-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(16, 185, 129, 0.08);
  border-bottom: 1px solid var(--outline-light);
  font-size: 12px;
  font-weight: 600;
  color: var(--positive);
}
.drawer-site-badge span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drawer-nav-list {
  padding: 6px 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.drawer-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 12px 10px 4px 10px;
}
.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--on-surface);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
  font-family: inherit;
}
.drawer-nav-item:hover, .drawer-nav-item:focus {
  background: var(--surface-variant);
  color: var(--primary);
}
.drawer-nav-item svg {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.drawer-nav-item:hover svg, .drawer-nav-item:focus svg {
  color: var(--primary);
}
.drawer-badge {
  margin-left: auto;
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-full);
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
}
.drawer-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--outline-light);
  background: var(--surface-variant);
}
.drawer-version-tag {
  font-size: 10px;
  color: var(--text-subtle);
  text-align: center;
  margin-top: 4px;
}

