:root {
  /* Colors - Professional Pest Control Palette */
  --primary: #1A73E8;
  --primary-dark: #1557B0;
  --secondary: #4285F4;
  --bg-app: #F8F9FA;
  --surface: #FFFFFF;
  --text-main: #202124;
  --text-sub: #5F6368;
  --border: #DADCE0;
  --error: #D93025;
  --warning: #FBBC04;
  --success: #1E8E3E;
  
  /* Risk Levels */
  --risk-low: #E6F4EA;
  --risk-low-text: #137333;
  --risk-medium: #FFF4E5;
  --risk-medium-text: #B06000;
  --risk-high: #FCE8E6;
  --risk-high-text: #C5221F;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  
  /* Elevation & Border Radius */
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.1), 0 6px 6px rgba(0,0,0,0.1);
}

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

body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', -apple-system, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Mobile Container Simulation (since it's a mobile app wireframe) */
.mobile-view {
  width: 100%;
  max-width: 480px;
  background: var(--bg-app);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,0.1);
}

/* Header / Top Bar */
.top-bar {
  background: var(--surface);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.top-bar h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 500;
  flex: 1;
}

.back-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.back-btn:active {
  background: rgba(0,0,0,0.05);
}

/* Main Content Area */
main {
  flex: 1;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card-title {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-sub);
  margin-bottom: var(--space-md);
  font-weight: 700;
}

.detail-row {
  margin-bottom: var(--space-md);
}

.detail-row:last-child {
  margin-bottom: 0;
}

.detail-label {
  font-size: 0.75rem;
  color: var(--text-sub);
  display: block;
}

.detail-value {
  font-size: 1rem;
  font-weight: 500;
}

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-radius: 28px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:active {
  background: var(--primary-dark);
  transform: scale(0.98);
}

.btn-secondary {
  background: #E8F0FE;
  color: var(--primary);
  border: 1px solid #D2E3FC;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
}

.btn-block {
  width: 100%;
}

.fab {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  z-index: 1000;
}

/* Forms */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: var(--space-xs);
  color: var(--text-sub);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

.upload-box {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  color: var(--text-sub);
  cursor: pointer;
  background: #F1F3F4;
}

.upload-box:hover {
  background: #E8EAED;
  border-color: var(--primary);
}

/* Segmented Control / Toggles */
.segmented-control {
  display: flex;
  background: #F1F3F4;
  padding: 4px;
  border-radius: 8px;
  gap: 4px;
}

.segment {
  flex: 1;
  text-align: center;
  padding: 8px;
  font-size: 0.875rem;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--text-sub);
}

.segment.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  font-weight: 500;
}

.switch-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
}

.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 32px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #BDC1C6;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Lists and Info */
.info-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  background: #E8F0FE;
  padding: var(--space-md);
  border-radius: var(--radius);
}

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

.info-label {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 700;
}

.info-value {
  font-size: 0.9rem;
  font-weight: 500;
}

.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  text-align: center;
  padding: var(--space-xl);
}

.empty-icon {
  width: 64px;
  height: 64px;
  background: #F1F3F4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

/* Footer Action Area */
.footer-actions {
  padding: var(--space-lg);
  background: var(--surface);
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
}

/* Utility */
.mb-lg { margin-bottom: var(--space-lg); }
.mt-lg { margin-top: var(--space-lg); }
.flex-grow { flex-grow: 1; }

.span-2 { grid-column: span 2; }
.section-title { 
  font-size: 1rem; 
  font-weight: 500; 
  margin-top: var(--space-lg); 
  margin-bottom: var(--space-sm); 
}
.muted-text {
  font-size: 0.85rem; 
  margin-top: 4px;
}

.status-label {
  font-size: 0.8rem; 
  color: var(--text-sub); 
  margin-top: 4px;
}

/* Observation Item (for the list state) */
.observation-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: var(--space-md);
  border-left: 4px solid var(--border);
}

.observation-item.high { border-left-color: var(--error); }
.observation-item.medium { border-left-color: var(--warning); }
.observation-item.low { border-left-color: var(--success); }

.obs-thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: #eee;
  flex-shrink: 0;
}

.obs-content {
  flex: 1;
}

.obs-title {
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.obs-risk {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  font-weight: 700;
  text-transform: uppercase;
}

.obs-risk.high { background: var(--risk-high); color: var(--risk-high-text); }
.obs-risk.medium { background: var(--risk-medium); color: var(--risk-medium-text); }
.obs-risk.low { background: var(--risk-low); color: var(--risk-low-text); }
