/* =============================================================================
   DESIGN TOKENS
   All colors, spacing, radii, shadows, and transitions in one place.
   Use these variables everywhere instead of raw values.
============================================================================= */
:root {
  /* --- Colors: Brand --- */
  --color-primary:       #1a365d;
  --color-primary-dark:  #15305a;
  --color-primary-hover: #2a4365;
  --color-primary-light: #d9e3f1;
  --color-primary-subtle:#e6edf8;

  /* --- Colors: Text --- */
  --color-text:          #1a1a1a;
  --color-text-secondary:#4a5568;
  --color-text-muted:    #64748b;
  --color-text-subtle:   #6b7280;

  /* --- Colors: Surfaces & Borders --- */
  --color-bg:            #ffffff;
  --color-bg-light:      #f7fafc;
  --color-bg-subtle:     #edf2f7;
  --color-border:        #e2e8f0;
  --color-border-medium: #cbd5e0;

  /* --- Colors: Semantic --- */
  --color-success:       #48bb78;
  --color-success-dark:  #22543d;
  --color-success-bg:    #c6f6d5;
  --color-error:         #f56565;
  --color-error-dark:    #c53030;
  --color-error-bg:      #fed7d7;
  --color-warning:       #ed8936;
  --color-warning-dark:  #c05621;
  --color-warning-bg:    #feebc8;
  --color-info:          #63b3ed;
  --color-info-bg:       #bee3f8;
  --color-purple:        #b794f4;
  --color-purple-bg:     #e9d8fd;

  /* --- Border Radius --- */
  --radius-sm:   3px;
  --radius-md:   6px;
  --radius-full: 999px;

  /* --- Font Sizes --- */
  --text-2xs:  0.65rem;
  --text-xs:   0.75rem;
  --text-sm:   0.85rem;
  --text-base: 1rem;
  --text-md:   1.1rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;
  --text-3xl:  2.5rem;

  /* --- Spacing Scale --- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;

  /* --- Shadows --- */
  --shadow-sm:      0 1px 4px rgba(0, 0, 0, 0.08);
  --shadow-md:      0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-primary: 0 2px 8px rgba(26, 54, 93, 0.15);
  --shadow-lg:      0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-xl:      0 8px 20px rgba(26, 54, 93, 0.12);

  /* --- Transitions --- */
  --transition:      all 0.15s;
  --transition-slow: all 0.3s ease;

  /* --- Z-index Layers --- */
  --z-base:    1;
  --z-controls:100;
  --z-modal:   1000;
  --z-nav:     1001;
  --z-overlay: 10000;
}

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

html {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #ffffff;
  color: var(--color-text);
  height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

header {
  background: var(--color-primary);
  color: white;
  padding: 1.5rem 1rem;
  text-align: center;
}

header h1 {
  font-size: 2rem;
  font-weight: 800;
}

.subtitle {
  opacity: 0.85;
  margin-top: 0.25rem;
  font-size: 0.95rem;
}

main {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
}

/* Home page main - full screen map */
main.home-main {
  max-width: 100%;
  margin: 0;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

main.plow-main {
  max-width: 900px;
}

.plow-main #map-view {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding: 0;
}

.plow-main #map {
  width: 100%;
}

#map-view {
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding: 0 1rem;
}

@media (min-width: 1000px) {
  #map-view {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
  }
}

#map {
  height: 60vh;
  min-height: 300px;
  max-height: 600px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  z-index: 1;
}

@media (max-width: 640px) {
  #map {
    height: 75vh;
    max-height: none;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  #map-view {
    padding: 0;
  }

}

.global-ticker {
  background: white;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  margin-bottom: 0.5rem;
}

.ticker-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.ticker-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #1a365d;
}

.timeline-hours-select {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  color: #1a365d;
  background: transparent;
  border: 1px solid #cbd5e0;
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  padding-right: 1.5rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%231a365d' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
}

.ticker-summary {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.ticker-empty {
  font-size: 0.85rem;
  color: var(--color-text-subtle);
  text-align: center;
  padding: 1rem 0;
}

.ticker-progress {
  height: 6px;
  background: #f56565;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.ticker-progress-green {
  height: 100%;
  background: #48bb78;
  border-radius: var(--radius-sm);
  transition: width 0.5s ease;
}

.gt-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 80px;
}

.gt-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.gt-bar-wrap {
  width: 100%;
  height: 64px;
  display: flex;
  align-items: flex-end;
}

.gt-bar {
  width: 100%;
  border-radius: var(--radius-sm) 3px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 4px;
  transition: height 0.3s ease;
}

.gt-bar-empty {
  width: 100%;
  height: 1px;
  background: var(--color-border);
}

.gt-green {
  background: #48bb78;
}

.gt-red {
  background: #f56565;
}

.gt-label {
  font-size: 0.7rem;
  color: var(--color-text-subtle);
  margin-top: 2px;
}

.gt-legend {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.gt-legend-item {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.gt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.gt-dot-green {
  background: #48bb78;
}

.gt-dot-red {
  background: #f56565;
}

.stats {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  overflow-x: auto;
}

.stat {
  flex: 1;
  min-width: 0;
  background: white;
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.25rem;
  text-align: center;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.stat:hover {
  box-shadow: var(--shadow-md);
}

.stat.stat-active {
  border-color: #1a365d;
  box-shadow: var(--shadow-primary);
}

.stat-num {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
}

.stat-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.stat-plowed {
  color: #22543d;
}

.stat-not-plowed {
  color: #822727;
}

.stat-unknown {
  color: var(--color-text-secondary);
}

.stat-verified {
  color: #92400E;
}

@media (max-width: 640px) {
  .stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    overflow-x: visible;
  }

  .stat {
    flex: none;
    min-width: 0;
    padding: 0.5rem 0.4rem;
  }

  .stat-num {
    font-size: 1.1rem;
  }

  .stat-label {
    font-size: 0.6rem;
    white-space: normal;
    overflow: visible;
  }
}

.plow-summary {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.plow-summary-total {
  color: #22543d;
}

.plow-summary-verified {
  color: #92400E;
}

.plow-summary-citizen {
  color: var(--color-text-muted);
}

.view-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid #1a365d;
}

.toggle-btn {
  flex: 1;
  padding: 0.5rem;
  border: none;
  background: white;
  color: #1a365d;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

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

.search-container {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0.5rem 0;
  background: #f0f2f5;
}

#search {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  border: 2px solid #cbd5e0;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s;
}

#search:focus {
  border-color: #1a365d;
}

#street-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.street-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  transition: box-shadow 0.15s;
  border: 1px solid var(--color-border);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.street-header[role="button"] {
  cursor: pointer;
  outline: none;
}

.street-header[role="button"]:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.street-card:hover {
  box-shadow: var(--shadow-md);
}

.street-card:active {
  background: var(--color-bg-light);
}

.street-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.street-name {
  font-weight: 600;
  font-size: 1rem;
}

.status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  white-space: nowrap;
}

.status-plowed {
  background: #c6f6d5;
  color: #22543d;
}

.status-not_plowed {
  background: #fed7d7;
  color: #822727;
}

.status-unknown {
  background: var(--color-border);
  color: var(--color-text-secondary);
}

.status-verified {
  background: #FEF3C7;
  color: #92400E;
}


.street-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.street-actions {
  display: none;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
  gap: 0.5rem;
}

.street-card.expanded .street-actions {
  display: flex;
}

.vote-btn {
  flex: 1;
  padding: 0.6rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.vote-btn:hover {
  opacity: 0.85;
}

.vote-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.vote-plowed {
  background: #276749;
  color: white;
}

.vote-not-plowed {
  background: #c53030;
  color: white;
}

.vote-counts {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 0.5rem;
}

.vote-feedback {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  font-weight: 600;
}

.vote-feedback.success {
  color: #276749;
}

.vote-feedback.error {
  color: #c53030;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-muted);
}

.timeline-container {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.timeline-loading,
.timeline-empty {
  font-size: 0.8rem;
  color: var(--color-text-subtle);
  text-align: center;
  padding: 0.5rem 0;
}

.tl-title {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 600;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.tl-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 60px;
}

.tl-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.tl-bar-wrap {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: flex-end;
}

.tl-bar {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 4px;
}

.tl-bar-green {
  background: #48bb78;
}

.tl-bar-red {
  background: #f56565;
}

.tl-label {
  font-size: 0.7rem;
  color: var(--color-text-subtle);
  margin-top: 2px;
}

.how-it-works {
  background: white;
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  border: 1px solid var(--color-border);
}

.how-it-works h2 {
  font-size: 1rem;
  color: #1a365d;
  margin-bottom: 0.75rem;
}

.hiw-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hiw-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.hiw-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.hiw-note {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.8rem;
  color: var(--color-text-subtle);
  text-align: center;
}

/* Hamburger toggle button */
.nav-toggle {
  display: none;
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 1rem;
  z-index: 1001;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  margin: 5px 0;
  transition: transform 0.2s, opacity 0.2s;
}

.top-nav {
  background: #15305a;
  text-align: center;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.top-nav-link {
  display: inline-block;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  header {
    padding: 0.75rem 1rem;
  }

  header h1 {
    font-size: 1.3rem;
  }

  .subtitle {
    font-size: 0.75rem;
    margin-top: 0.1rem;
  }

  /* When open, make hamburger fixed so it's above the overlay */
  .nav-open .nav-toggle {
    position: fixed;
    right: 1rem;
    top: 1rem;
    transform: none;
    z-index: 1002;
  }

  /* Animate hamburger to X when open */
  .nav-open .nav-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }
  .nav-open .nav-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Full-screen mobile nav overlay */
  .top-nav {
    display: none;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--color-primary);
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    padding: 2rem;
  }

  .nav-open .top-nav {
    display: flex;
  }

  .top-nav-link {
    font-size: 1.25rem;
    padding: 1rem 2rem;
    width: 100%;
    text-align: center;
  }

  .sub-nav {
    display: block;
  }

  .top-nav-link.mobile-only {
    display: inline-block;
  }
}

.top-nav-link.mobile-only {
  display: none;
}

.top-nav-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.top-nav-link.active {
  color: #1a365d;
  background: white;
}

.sub-nav {
  background: #1a2f50;
  text-align: center;
  padding: 0.3rem 1rem;
}

.sub-nav-link {
  display: inline-block;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  margin: 0 0.1rem;
}

.sub-nav-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.sub-nav-link.active {
  color: #1a365d;
  background: white;
}

footer {
  max-width: 600px;
  margin: 2rem auto 1rem;
  padding: 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

footer a {
  color: var(--color-text-muted);
  text-decoration: underline;
}

footer .city-links {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.7rem;
}

/* Hide footer on map view (index.html) — only pages with .home-main */
.home-main ~ footer {
  display: none;
}

/* Full-screen app layout (for index.html specifically) */
.app-shell {
  display: flex;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.issues-toggle {
  flex: 0 0 auto;
}

.issues-list-view {
  flex: 0 0 auto;
}

/* Sidebar */
.sidebar {
  width: 380px;
  flex-shrink: 0;
  overflow-y: auto;
  background: white;
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
}

.sidebar-filters {
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

/* Category dropdown filter */
.category-dropdown {
  position: relative;
  display: inline-block;
  width: 100%;
}

.category-dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a365d;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s;
}

.category-dropdown-btn:hover,
.category-dropdown.open .category-dropdown-btn {
  border-color: #1a365d;
}

.category-dropdown-arrow {
  display: inline-block;
  width: 10px;
  height: 6px;
  font-size: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%231a365d' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.category-dropdown.open .category-dropdown-arrow {
  transform: rotate(180deg);
}

.category-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 1000;
  padding: 0.35rem 0;
}

.category-dropdown.open .category-dropdown-menu {
  display: block;
}

.category-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  color: #2d3748;
  cursor: pointer;
  transition: background 0.1s;
}

.category-dropdown-item:hover {
  background: var(--color-bg-light);
}

.category-dropdown-item input[type="checkbox"] {
  accent-color: #1a365d;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.category-dropdown-divider {
  border-top: 1px solid var(--color-border);
  margin-top: 0.25rem;
  padding-top: 0.5rem;
}

.category-dropdown-clear {
  display: block;
  width: calc(100% - 1rem);
  margin: 0.35rem 0.5rem 0.25rem;
  padding: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

.category-dropdown-clear:hover {
  color: #c53030;
  border-color: #c53030;
  background: #fff5f5;
}

/* Sort dropdown */
.sort-select {
  position: relative;
  margin-top: 0.5rem;
}

.sort-select select {
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a365d;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%231a365d' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.sort-select select:hover,
.sort-select select:focus {
  border-color: #1a365d;
  outline: none;
}

/* Content filters (has notes / has images) */
.content-filters {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.content-filter-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2d3748;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  flex: 1;
  min-width: 0;
  user-select: none;
}

.content-filter-item:hover {
  border-color: #1a365d;
}

.content-filter-item:focus-within {
  border-color: #1a365d;
  outline: 2px solid #1a365d;
  outline-offset: 2px;
}

.content-filter-item input[type="checkbox"] {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #1a365d;
}

.content-filter-item:has(input:checked) {
  border-color: #1a365d;
  background: #ebf0fa;
}

.filter-pill {
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  border: 2px solid #e2e8f0;
  background: white;
  cursor: pointer;
  white-space: nowrap;
  color: var(--color-text-secondary);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.filter-pill:hover {
  border-color: var(--color-text-subtle);
}

.filter-pill.active {
  border-color: #1a365d;
  background: var(--color-primary);
  color: white;
}

.sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.7rem;
}

.issue-list-item {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-radius: 10px;
  padding: 0.9rem 0.95rem 0.8rem;
  border: 1px solid #d9e3f1;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.issue-list-item:hover {
  box-shadow: 0 8px 20px rgba(19, 45, 83, 0.12);
  border-color: #9fb4d1;
  transform: translateY(-1px);
}

.issue-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.45rem;
  gap: 0.75rem;
}

.issue-item-title {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  min-width: 0;
}

.issue-item-emoji {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.issue-item-type {
  font-weight: 700;
  color: #1a365d;
  font-size: 1.2rem;
  line-height: 1.1;
}

.issue-item-time-ago {
  font-size: 0.7rem;
  font-weight: 700;
  color: #2a4365;
  background: #e6edf8;
  border: 1px solid #d4e0ef;
  border-radius: var(--radius-full);
  padding: 0.2rem 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.issue-item-address {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.35rem;
  row-gap: 0.2rem;
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.2rem;
}

.issue-item-address-label {
  color: var(--color-text-muted);
  font-weight: 600;
}

.issue-item-address-text {
  font-weight: 600;
}

.issue-item-footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}

.issue-item-map-link {
  font-size: 0.7rem;
  color: #1a365d;
  font-weight: 700;
  white-space: nowrap;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.issue-item-map-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.issue-item-photo-btn {
  display: block;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 100%;
}

.issue-item-photo-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 8px;
}

.issue-item-notes {
  font-size: 0.9rem;
  color: #2d3748;
  margin-top: 0.45rem;
  padding: 0.45rem 0.55rem;
  background: var(--color-bg-light);
  border-left: 3px solid #cbd5e0;
  border-radius: 0 6px 6px 0;
  line-height: 1.5;
}

.issue-item-time {
  font-size: 0.74rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.issue-item-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.6rem;
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--color-border);
}

.issue-item-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* Action buttons (confirm, share, flag) */
.action-btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  background: #fff;
  border: 1px solid #d2deed;
  color: #516179;
  cursor: pointer;
  padding: 0.4rem 0.55rem;
  min-height: 32px;
  border-radius: var(--radius-full);
  transition: var(--transition);
  touch-action: manipulation;
  white-space: nowrap;
}
.action-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.action-btn .count {
  font-size: 0.75rem;
  font-weight: 700;
}
.action-btn:hover {
  background: var(--color-bg-light);
  border-color: #b8c8dd;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.action-btn:disabled {
  pointer-events: none;
}

/* Vote/confirm button */
.action-btn.vote-btn:hover:not(:disabled):not(.confirm-confirmed) {
  color: #276749;
  background: #f0fff4;
  border-color: #9ae6b4;
}
.action-btn.vote-btn.confirm-confirmed,
.action-btn.vote-btn.confirm-confirmed:hover {
  color: #276749;
  background: #f0fff4;
  border-color: #9ae6b4;
  pointer-events: none;
}

/* Share button */
.action-btn.share-btn:hover:not(:disabled) {
  color: #1a365d;
  background: #f3f7fc;
  border-color: #b8c8dd;
}
.action-btn.share-btn:disabled {
  opacity: 0.7;
}

/* Admin hide button */
.action-btn.admin-hide-btn:hover {
  color: #c53030;
  background: #fff5f5;
  border-color: #feb2b2;
}

/* Flag button */
.action-btn.flag-btn:hover:not(:disabled):not(.flag-reported) {
  color: #c53030;
  background: #fff5f5;
  border-color: #feb2b2;
}
.action-btn.flag-reported,
.action-btn.flag-reported:hover {
  color: #276749;
  background: #e6fffa;
  border-color: #9ae6b4;
  pointer-events: none;
}

/* Smaller action buttons in map popups */
.leaflet-popup-content .action-btn {
  font-size: 0.75rem;
  padding: 0.3rem 0.5rem;
  min-height: 28px;
}
.leaflet-popup-content .action-btn svg {
  width: 13px;
  height: 13px;
}

@media (max-width: 1200px) and (min-width: 769px) {
  .sidebar {
    width: 340px;
  }
}

/* List pagination */
.list-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem 0;
}

.pagination-btn {
  padding: 0.5rem 1rem;
  border: 2px solid #cbd5e0;
  background: white;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: #1a365d;
  cursor: pointer;
  transition: border-color 0.15s;
}

.pagination-btn:hover:not(:disabled) {
  border-color: #1a365d;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* Map wrapper */
.map-wrapper {
  flex: 1;
  position: relative;
  z-index: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#main-map {
  width: 100%;
  height: 100%;
  flex: 1;
}

/* Search bar above map */
.search-bar {
  position: relative;
  padding: 0.5rem 0.75rem;
  background: white;
  border-bottom: 1px solid var(--color-border);
  flex: 0 0 auto;
}

.search-bar-input {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  border: 2px solid #e2e8f0;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.search-bar-input:focus {
  outline: none;
  border-color: #1a365d;
}

.search-results {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  margin-top: 4px;
  overflow: hidden;
  max-height: 300px;
  overflow-y: auto;
  z-index: 500;
}

.search-result-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  border-bottom: 1px solid #f0f2f5;
  transition: background 0.15s;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--color-bg-light);
}

.search-result-label {
  font-size: 0.7rem;
  color: var(--color-text-subtle);
  margin-left: 0.5rem;
}

/* Fixed center pin for report placement */
.center-pin {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -100%);
  z-index: 1000;
  pointer-events: none;
}

.center-pin.active {
  display: block;
}

.center-pin-icon {
  width: 6px;
  height: 40px;
  background: #e53e3e;
  border-radius: var(--radius-sm);
  margin: 0 auto;
  position: relative;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.center-pin-icon::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  background: #e53e3e;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.center-pin-shadow {
  width: 14px;
  height: 5px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  margin: 2px auto 0;
}

/* New Report button */
.new-request-btn {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: opacity 0.15s;
}

.new-request-btn:hover {
  opacity: 0.9;
}

/* Issues toggle (mobile) */
.issues-toggle {
  display: none;
  flex-direction: row;
  gap: 1rem;
  border-radius: 0;
  overflow: visible;
  border: none;
  border-bottom: 2px solid #e2e8f0;
  margin: 0;
  flex: 0 0 auto;
  background: white;
  padding: 1rem;
}

.issues-toggle-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #cbd5e0;
  background: white;
  color: #1a365d;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  border-radius: var(--radius-sm);
}

.issues-toggle-btn:hover {
  border-color: #1a365d;
}

.issues-toggle-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: #1a365d;
}

.issues-toggle-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: #1a365d;
}

/* Mobile list filters (shown above list view on mobile) */
.mobile-list-filters {
  display: none;
  flex-direction: column;
  background: white;
  border-bottom: 1px solid var(--color-border);
  flex: 0 0 auto;
}

.mobile-list-filters.active {
  display: flex;
}

.mobile-filter-scroll {
  display: flex;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-wrap: nowrap;
}

.mobile-filter-scroll::-webkit-scrollbar {
  display: none;
}

.mobile-filter-scroll .filter-pill {
  flex-shrink: 0;
}


.issues-list-view {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem 1rem;
}

.issues-list-view.active {
  display: flex;
}

/* Mobile responsive */
@media (max-width: 768px) {
  main.home-main {
    flex-direction: column;
  }

  /* Hide footer on map pages so the map fills the screen */
  main.home-main ~ footer {
    display: none;
  }

  .app-shell {
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }

  .sidebar {
    display: none;
    width: 100%;
  }

  .issues-toggle {
    display: flex !important;
  }

  .map-wrapper {
    height: 100%;
  }

  .new-request-btn {
    bottom: 1.5rem;
  }

  .issue-item-header {
    align-items: center;
  }

  .issue-item-time-ago {
    font-size: 0.7rem;
    padding: 0.18rem 0.4rem;
  }


  .report-panel {
    max-width: calc(100% - 1rem);
    max-height: 90vh;
    top: 1rem;
    transform: translateX(-50%) scale(0.95);
  }

  .report-panel.open {
    transform: translateX(-50%) scale(1);
  }

  .details-textarea {
    min-height: 60px;
    max-height: 80px;
    resize: none;
    font-size: 16px;
  }
}

/* Location unavailable message */
.location-unavailable-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: var(--radius-sm);
  padding: 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  z-index: 500;
  display: none;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-align: center;
  font-weight: 600;
  max-width: 300px;
}

.location-unavailable-message.show {
  display: block;
  animation: fadeInOut 3s ease-in-out forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; }
}

/* Home view splash */
.home-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
}

.home-splash {
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.home-splash h2 {
  font-size: 1.5rem;
  color: #1a365d;
  margin-bottom: 2rem;
}

.action-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  background: white;
  border: 2px solid #cbd5e0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.action-card:hover {
  border-color: #1a365d;
  box-shadow: 0 4px 12px rgba(26, 54, 93, 0.15);
}

.action-card:active {
  background: var(--color-bg-light);
}

.action-emoji {
  font-size: 2.5rem;
}

.action-label {
  font-weight: 600;
  color: #1a365d;
  line-height: 1.3;
}

/* Back button in header */
.back-btn {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.5rem 0;
  opacity: 0.85;
  transition: opacity 0.15s;
  text-decoration: none;
}

.back-btn:hover {
  opacity: 1;
}

header {
  position: relative;
}

/* Report page styles */
.report-view {
  max-width: 600px;
  margin: 0 auto;
}

.step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.step.active {
  display: block;
}

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

.issue-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.issue-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
  text-align: center;
}

.issue-card:hover {
  box-shadow: var(--shadow-md);
}

.issue-card.selected {
  border-color: #1a365d;
  background: var(--color-bg-light);
  box-shadow: var(--shadow-primary);
}

.issue-card.selected::after {
  content: "✓";
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 1.5rem;
  color: #1a365d;
  font-weight: bold;
}

.issue-emoji {
  font-size: 2rem;
}

.issue-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1a365d;
}

/* Map container for report page */
#report-map {
  height: 60vh;
  min-height: 400px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  margin-bottom: 1rem;
  position: relative;
}

.map-controls {
  position: absolute;
  bottom: 1.5rem;
  left: 1rem;
  z-index: 100;
  display: flex;
  gap: 0.5rem;
  flex-direction: column;
}

.map-btn {
  padding: 0.75rem 1rem;
  background: white;
  border: 1px solid #cbd5e0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.map-btn:hover {
  box-shadow: var(--shadow-lg);
}

.location-hint {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

/* Report panel modal */
.report-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  opacity: 0;
  pointer-events: none;
  background: white;
  border-radius: var(--radius-sm);
  z-index: 700;
  max-height: 80vh;
  max-width: 500px;
  width: calc(100% - 2rem);
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.report-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.map-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 650;
  display: none;
  backdrop-filter: blur(2px);
}

.map-overlay.active {
  display: block;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.panel-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a365d;
}

.panel-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-subtle);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.panel-close-btn:hover {
  color: #1a365d;
}

.panel-step {
  display: none;
}

.panel-step.active {
  display: block;
}

.panel-step-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.map-in-panel {
  height: 300px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  margin-bottom: 1rem;
  position: relative;
}

.gps-btn {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 0.9rem;
  background: white;
  border: 1px solid #cbd5e0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.gps-btn:hover {
  box-shadow: var(--shadow-lg);
}

.location-display {
  padding: 0.75rem;
  background: var(--color-bg-light);
  border-radius: var(--radius-sm);
  border: 1px solid #cbd5e0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  text-align: center;
}

.location-display.ready {
  background: #c6f6d5;
  border-color: #48bb78;
  color: #22543d;
}

@media (min-width: 769px) {
  .report-panel {
    left: auto;
    right: 0;
    top: 140px;
    bottom: 0;
    width: 380px;
    border-radius: 0;
    transform: translateX(100%);
    max-height: none;
    overflow-y: auto;
    padding: 1.5rem;
  }

  .report-panel.open {
    transform: translateX(0);
  }

  .map-in-panel {
    height: 250px;
  }
}

/* Details textarea */
.details-textarea {
  width: 100%;
  padding: 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  border: 2px solid #cbd5e0;
  border-radius: var(--radius-sm);
  resize: vertical;
  min-height: 70px;
  transition: border-color 0.2s;
}

.details-textarea:focus {
  outline: none;
  border-color: #1a365d;
}

.character-count {
  font-size: 0.75rem;
  color: var(--color-text-subtle);
  margin-top: 0.25rem;
  text-align: right;
}

.character-count.warning {
  color: #c05621;
}

/* Success screen */
.success-screen {
  text-align: center;
  padding: 2rem 1rem;
}

.success-checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: #48bb78;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.success-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a365d;
  margin-bottom: 1rem;
}

.success-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.success-link {
  padding: 0.75rem;
  border: 2px solid #1a365d;
  background: white;
  color: #1a365d;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.success-link:hover {
  background: var(--color-primary);
  color: white;
}

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

.success-link.primary:hover {
  background: #15305a;
}

/* Form section labels */
.step-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* Confirm location button */
.confirm-btn {
  width: 100%;
  padding: 0.85rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 1rem;
}

.confirm-btn:hover:not(:disabled) {
  opacity: 0.85;
}

.confirm-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Photo upload area */
.photo-upload-area input[type="file"] {
  display: none;
}

.photo-upload-area {
  display: block;
  border: 2px dashed #cbd5e0;
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-top: 0.75rem;
}

.photo-upload-area:hover,
.photo-upload-area:focus-within {
  border-color: #1a365d;
  background: var(--color-bg-light);
}

.photo-upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
}

.photo-upload-area.has-photo .photo-upload-label {
  display: none;
}

.photo-preview {
  display: none;
  position: relative;
}

.photo-upload-area.has-photo .photo-preview {
  display: block;
}

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

.photo-remove-btn {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.photo-remove-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* Issue list/popup thumbnail */
.issue-photo-thumb {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
}

.issue-item-photo {
  width: 100%;
  max-height: 170px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 0.5rem;
  border: 1px solid #dbe4f0;
  cursor: pointer;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.cancel-report-link {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.4rem;
  background: none;
  border: none;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: center;
  cursor: pointer;
  text-decoration: underline;
}

.cancel-report-link:hover {
  color: var(--color-error-dark);
}

/* Visually hidden but available to screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
