/* ============================================
   MyBurgessHill — Village Issue Reporter
   Main Stylesheet
   ============================================ */

/* === Variables === */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --success: #16a34a;
    --success-light: #dcfce7;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --orange: #ea580c;
    --orange-light: #fff7ed;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --radius: 8px;
    --radius-lg: 12px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-50);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

/* === Layout === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 800px; }
.container-xs { max-width: 480px; }
.main-content { min-height: calc(100vh - 300px); }

/* === Cookie Banner === */
.cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--gray-800); color: var(--white);
    padding: 1rem; z-index: 9999; text-align: center;
}
.cookie-content { max-width: 800px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.cookie-content p { margin: 0; font-size: 0.875rem; }
.cookie-content a { color: var(--primary-light); }

/* === Navbar === */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0.75rem 0;
    position: sticky; top: 0; z-index: 1000;
    box-shadow: var(--shadow);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.navbar-brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.25rem; color: var(--gray-900); }
.navbar-brand:hover { text-decoration: none; }
.brand-icon { font-size: 1.5rem; }
.navbar-menu { display: flex; align-items: center; gap: 0.1rem; flex-wrap: wrap; }
.navbar-menu li a {
    padding: 0.4rem 0.5rem; border-radius: var(--radius);
    color: var(--gray-600); font-size: 0.82rem; font-weight: 500; transition: all 0.2s; white-space: nowrap;
}
.navbar-menu li a:hover { background: var(--gray-100); color: var(--gray-900); text-decoration: none; }
.navbar-menu li a.active { background: var(--primary-light); color: var(--primary-dark); }
.nav-admin { color: var(--orange) !important; font-weight: 600 !important; }
.nav-user { display: flex; align-items: center; gap: 0.5rem; margin-left: 0.5rem; }
.user-name { font-size: 0.85rem; color: var(--gray-500); }
.navbar-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.navbar-toggle span { display: block; width: 24px; height: 2px; background: var(--gray-600); margin: 5px 0; transition: 0.3s; }

/* === Buttons === */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.625rem 1.25rem; border-radius: var(--radius);
    font-size: 0.9rem; font-weight: 600; border: 2px solid transparent;
    cursor: pointer; transition: all 0.2s; text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8rem; }
.btn-xs { padding: 0.2rem 0.5rem; font-size: 0.7rem; border-radius: 4px; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-google { background: var(--white); color: var(--gray-700); border: 1px solid var(--gray-300); }
.btn-google:hover { background: var(--gray-50); box-shadow: var(--shadow-md); }
.btn-google svg { flex-shrink: 0; }

/* === Hero === */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
    color: var(--white); padding: 4rem 0; text-align: center;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; font-weight: 700; }
.hero h1 strong { color: #93c5fd; }
.hero-notice { display: inline-block; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); padding: 0.3rem 1rem; border-radius: 20px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 0.75rem; opacity: 0.95; }
.hero-subtitle { font-size: 1.15rem; opacity: 0.9; max-width: 600px; margin: 0 auto 2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero .btn-outline { border-color: var(--white); color: var(--white); }
.hero .btn-outline:hover { background: var(--white); color: var(--primary); }

/* === Town Gallery === */
.town-gallery { padding: 3rem 0; }
.town-gallery h2 { text-align: center; margin-bottom: 0.5rem; }
.gallery-grid { margin-top: 1.5rem; text-align: center; }
.gallery-grid img { width: 100%; max-width: 900px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); transition: transform 0.3s, box-shadow 0.3s; }
.gallery-grid img:hover { transform: scale(1.02); box-shadow: 0 20px 40px rgba(0,0,0,0.15); }

/* === Stats === */
.stats-section { padding: 2rem 0; margin-top: -2rem; position: relative; z-index: 10; }
.stats-grid, .admin-stats-grid { display: grid; gap: 1rem; }
.stats-grid { grid-template-columns: repeat(4, 1fr); }
.admin-stats-grid { grid-template-columns: repeat(4, 1fr); }
.stat-card {
    background: var(--white); padding: 1.5rem; border-radius: var(--radius-lg);
    text-align: center; box-shadow: var(--shadow-md); border-left: 4px solid var(--gray-300);
}
.stat-card.stat-open { border-left-color: var(--danger); }
.stat-card.stat-progress { border-left-color: var(--warning); }
.stat-card.stat-resolved { border-left-color: var(--success); }
.stat-number { display: block; font-size: 2rem; font-weight: 700; color: var(--gray-900); }
.stat-label { font-size: 0.85rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.05em; }

/* === Map === */
.map-section, .recent-section, .how-it-works { padding: 3rem 0; }
.map-container { width: 100%; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--gray-200); }
.map-container { height: 450px; }
.map-small { height: 300px; }
.map-large { height: 500px; }
.section-subtitle { color: var(--gray-500); margin-bottom: 1.5rem; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.section-header h2 { margin: 0; }

/* Address autocomplete dropdown */
.address-suggestions {
    position: absolute; z-index: 1000; width: 100%; background: var(--white);
    border: 1px solid var(--gray-200); border-top: none; border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); max-height: 220px; overflow-y: auto;
}
.suggestion-item {
    padding: 0.6rem 0.75rem; cursor: pointer; font-size: 0.85rem; color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100); transition: background 0.15s;
}
.suggestion-item:hover { background: var(--gray-50); }
.suggestion-item:last-child { border-bottom: none; }
.suggestion-empty { color: var(--gray-400); cursor: default; font-style: italic; }
.suggestion-empty:hover { background: transparent; }

/* === Issue Cards === */
.issues-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.issue-card {
    background: var(--white); padding: 1.25rem; border-radius: var(--radius-lg);
    box-shadow: var(--shadow); border: 1px solid var(--gray-200);
    transition: all 0.2s; display: block; color: var(--gray-800);
}
.issue-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); text-decoration: none; border-color: var(--primary); }
.issue-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.issue-category { font-size: 0.85rem; color: var(--gray-500); }
.issue-card-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--gray-900); }
.issue-card-meta { display: flex; gap: 0.75rem; font-size: 0.8rem; color: var(--gray-400); margin-bottom: 0.5rem; }
.issue-ref { font-weight: 600; color: var(--primary); font-size: 0.8rem; }
.issue-card-location { font-size: 0.85rem; color: var(--gray-500); }

/* === Issue List (rows) === */
.issues-list { display: flex; flex-direction: column; gap: 0.5rem; }
.issue-row {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--white); padding: 1rem 1.25rem; border-radius: var(--radius);
    border: 1px solid var(--gray-200); transition: all 0.2s; color: var(--gray-800);
}
.issue-row:hover { box-shadow: var(--shadow-md); border-color: var(--primary); text-decoration: none; }
.issue-row-main { display: flex; align-items: center; gap: 1rem; flex: 1; min-width: 0; }
.issue-row-category { font-size: 1.5rem; flex-shrink: 0; }
.issue-row-content { min-width: 0; }
.issue-row-content h3 { font-size: 0.95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.issue-row-meta { display: flex; gap: 0.75rem; font-size: 0.8rem; color: var(--gray-400); flex-wrap: wrap; margin-top: 0.25rem; }
.issue-row-status { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.upvote-count { font-size: 0.8rem; color: var(--gray-500); }

/* === Status & Priority Badges === */
.status-badge {
    display: inline-block; padding: 0.2rem 0.6rem; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.status-open { background: var(--danger-light); color: var(--danger); }
.status-review { background: var(--orange-light); color: var(--orange); }
.status-progress { background: var(--warning-light); color: #b45309; }
.status-resolved { background: var(--success-light); color: var(--success); }
.status-closed { background: var(--gray-100); color: var(--gray-500); }
.priority-badge {
    display: inline-block; padding: 0.2rem 0.5rem; border-radius: 4px;
    font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
}
.priority-low { background: var(--gray-100); color: var(--gray-500); }
.priority-medium { background: var(--warning-light); color: #b45309; }
.priority-high { background: var(--orange-light); color: var(--orange); }
.priority-urgent { background: var(--danger-light); color: var(--danger); }

/* === How It Works === */
.how-it-works { background: var(--white); border-top: 1px solid var(--gray-200); }
.how-it-works h2 { text-align: center; margin-bottom: 2rem; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.step { text-align: center; padding: 1.5rem; }
.step-number {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--primary); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; font-weight: 700; margin: 0 auto 1rem;
}
.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--gray-500); font-size: 0.9rem; }

/* === Forms === */
.form { margin-top: 1.5rem; }
.form-group { margin-bottom: 1.25rem; position: relative; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.375rem; font-size: 0.9rem; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%; padding: 0.625rem 0.875rem; border: 1px solid var(--gray-300);
    border-radius: var(--radius); font-size: 0.9rem; font-family: var(--font);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-hint { font-size: 0.8rem; color: var(--gray-400); margin-top: 0.25rem; display: block; }
.form-fieldset { border: 1px solid var(--gray-200); padding: 1.25rem; border-radius: var(--radius); margin-bottom: 1.25rem; }
.form-fieldset legend { font-weight: 600; padding: 0 0.5rem; font-size: 0.9rem; }
.form-actions { margin-top: 1.5rem; }
.required { color: var(--danger); }
.checkbox-label { display: flex; align-items: flex-start; gap: 0.5rem; font-weight: 400 !important; cursor: pointer; }
.checkbox-label input[type="checkbox"] { margin-top: 0.25rem; }
.form-group input[type="file"] {
    padding: 0.5rem; border: 1px dashed var(--gray-300);
    border-radius: var(--radius); background: var(--gray-50); cursor: pointer;
}

/* === Photo Preview === */
.photo-preview { display: flex; gap: 0.75rem; margin-top: 0.75rem; flex-wrap: wrap; }
.photo-preview img { width: 100px; height: 100px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--gray-200); }

/* === Photo Gallery === */
.photo-gallery { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.gallery-item img {
    width: 200px; height: 150px; object-fit: cover;
    border-radius: var(--radius); border: 1px solid var(--gray-200);
    transition: transform 0.2s;
}
.gallery-item:hover img { transform: scale(1.05); }

/* Admin photo controls */
.gallery-item-admin { position: relative; display: inline-block; }
.gallery-item-admin .badge-warning {
    position: absolute; top: 6px; left: 6px; background: #f59e0b; color: #fff;
    font-size: 0.65rem; padding: 2px 6px; border-radius: 4px; z-index: 2;
}
.photo-admin-actions {
    display: flex; gap: 4px; margin-top: 4px; justify-content: center;
}

/* === Alerts === */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius); margin-bottom: 1.5rem; font-size: 0.9rem; }
.alert-success { background: var(--success-light); color: #15803d; border: 1px solid #bbf7d0; }
.alert-error { background: var(--danger-light); color: #b91c1c; border: 1px solid #fecaca; }
.alert h3 { margin-bottom: 0.5rem; }

/* === Auth Card === */
.auth-card {
    background: var(--white); padding: 2.5rem; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); margin: 3rem auto; border: 1px solid var(--gray-200);
}
.auth-card h1 { text-align: center; margin-bottom: 0.5rem; }
.auth-card .section-subtitle { text-align: center; }
.auth-divider { display: flex; align-items: center; margin: 1.5rem 0; }
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--gray-200);
}
.auth-divider span { padding: 0 1rem; color: var(--gray-400); font-size: 0.85rem; }
.auth-link { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; }

/* === Track Page === */
.track-form { margin-bottom: 2rem; }
.track-input-group { display: flex; gap: 0.5rem; }
.track-input {
    flex: 1; padding: 0.875rem 1rem; border: 2px solid var(--gray-300);
    border-radius: var(--radius); font-size: 1.1rem; font-family: var(--font);
}
.track-input:focus { border-color: var(--primary); outline: none; }
.track-result { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 2rem; border: 1px solid var(--gray-200); }
.track-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.track-status { display: flex; gap: 0.5rem; }
.track-details, .track-description, .track-photos, .track-timeline, .track-map { margin-bottom: 1.5rem; }
.detail-row { display: flex; padding: 0.5rem 0; border-bottom: 1px solid var(--gray-100); }
.detail-label { font-weight: 600; width: 150px; flex-shrink: 0; color: var(--gray-500); font-size: 0.9rem; }
.track-actions { margin-top: 2rem; text-align: center; }

/* === Issue Detail === */
.page-section { padding: 2rem 0; }
.breadcrumb { font-size: 0.85rem; color: var(--gray-400); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--gray-500); }
.issue-detail-header { margin-bottom: 1rem; }
.issue-detail-header h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.issue-detail-badges { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.issue-detail-meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.85rem; color: var(--gray-500); margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--gray-200); }
.issue-detail-body, .issue-detail-photos, .issue-detail-map, .issue-detail-timeline, .issue-detail-comments, .issue-detail-actions { margin-bottom: 2rem; }
.issue-detail-body h2, .issue-detail-photos h2, .issue-detail-map h2, .issue-detail-timeline h2, .issue-detail-comments h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.issue-detail-actions { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: var(--gray-50); border-radius: var(--radius); }
.upvote-btn { cursor: pointer; }
.upvote-hint { font-size: 0.8rem; color: var(--gray-400); }

/* === Timeline === */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
    content: ''; position: absolute; left: 7px; top: 0; bottom: 0;
    width: 2px; background: var(--gray-200);
}
.timeline-item { position: relative; padding-bottom: 1.5rem; }
.timeline-dot {
    position: absolute; left: -2rem; top: 0.25rem;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--primary); border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--primary);
}
.timeline-first .timeline-dot { background: var(--success); box-shadow: 0 0 0 2px var(--success); }
.timeline-date { font-size: 0.8rem; color: var(--gray-400); }
.timeline-content p { font-size: 0.9rem; margin-top: 0.25rem; }
.timeline-comment { background: var(--gray-50); padding: 0.5rem 0.75rem; border-radius: var(--radius); margin-top: 0.5rem; font-size: 0.85rem; color: var(--gray-600); }

/* === Comments === */
.comment { background: var(--gray-50); padding: 1rem; border-radius: var(--radius); margin-bottom: 0.75rem; }
.comment-admin { background: var(--primary-light); border-left: 3px solid var(--primary); }
.comment-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; font-size: 0.85rem; }
.comment-date { color: var(--gray-400); font-size: 0.8rem; }
.badge { padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.7rem; font-weight: 600; background: var(--gray-200); color: var(--gray-600); }
.badge-admin { background: var(--primary); color: var(--white); }
.comment-form { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--gray-200); }
.login-prompt { color: var(--gray-500); font-size: 0.9rem; padding: 1rem; background: var(--gray-50); border-radius: var(--radius); text-align: center; }

/* === Filters === */
.filters-bar { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; flex-wrap: wrap; align-items: center; }
.filter-input, .filter-select {
    padding: 0.5rem 0.75rem; border: 1px solid var(--gray-300);
    border-radius: var(--radius); font-size: 0.85rem; font-family: var(--font);
}
.filter-input { min-width: 200px; }
.filter-select { min-width: 160px; }
.filter-input:focus, .filter-select:focus { border-color: var(--primary); outline: none; }

/* === View Toggle === */
.view-toggle { display: flex; gap: 0.25rem; margin-bottom: 1rem; }
.view-btn {
    padding: 0.5rem 1rem; border: 1px solid var(--gray-300);
    background: var(--white); cursor: pointer; font-size: 0.85rem;
    border-radius: var(--radius); transition: all 0.2s; font-family: var(--font);
}
.view-btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.view-btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.view-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* === Admin === */
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.admin-actions { display: flex; gap: 0.5rem; }
.admin-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; margin-top: 2rem; }
.admin-panel { background: var(--white); padding: 1.5rem; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--gray-200); }
.admin-panel h2 { font-size: 1.1rem; margin-bottom: 1rem; }
.category-stats { display: flex; flex-direction: column; gap: 0.5rem; }
.category-stat-row { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--gray-100); font-size: 0.9rem; }
.category-count { font-weight: 700; color: var(--primary); }

/* === Admin Detail === */
.admin-detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 2rem; }
.admin-detail-main { min-width: 0; }
.admin-detail-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.admin-action-card {
    background: var(--white); padding: 1.25rem; border-radius: var(--radius);
    border: 1px solid var(--gray-200); box-shadow: var(--shadow);
}
.admin-action-card h3 { font-size: 0.95rem; margin-bottom: 0.75rem; color: var(--gray-700); }
.admin-notes { background: var(--gray-50); padding: 0.75rem; border-radius: var(--radius); font-size: 0.85rem; margin-bottom: 0.75rem; max-height: 200px; overflow-y: auto; }

/* === Admin Table === */
.table-responsive { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-table th {
    text-align: left; padding: 0.75rem; background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200); font-weight: 600; color: var(--gray-600);
    white-space: nowrap;
}
.admin-table td { padding: 0.75rem; border-bottom: 1px solid var(--gray-100); }
.admin-table tr:hover { background: var(--gray-50); }
.admin-table a { font-weight: 500; }
.admin-table input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }
.row-inactive { opacity: 0.5; }

/* Bulk actions bar */
.bulk-actions {
    background: #fef3c7; border: 1px solid #f59e0b; border-radius: var(--radius);
    padding: 0.6rem 1rem; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.85rem; font-weight: 600; color: #92400e;
}

/* === Info Box === */
.info-box {
    background: var(--primary-light); padding: 1.25rem; border-radius: var(--radius);
    margin-top: 2rem; border: 1px solid #93c5fd;
}
.info-box h4 { margin-bottom: 0.75rem; color: var(--primary-dark); }
.info-box ul { padding-left: 1.25rem; list-style: disc; }
.info-box li { margin-bottom: 0.25rem; font-size: 0.9rem; color: var(--gray-700); }

/* === Empty State === */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--gray-400); }
.empty-state h3 { margin-bottom: 0.5rem; color: var(--gray-600); }

/* === Footer === */
.site-footer { background: var(--gray-800); color: var(--gray-300); padding: 3rem 0 1.5rem; margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-bottom: 2rem; }
.footer-section h3 { color: var(--white); font-size: 1.1rem; margin-bottom: 0.75rem; }
.footer-section h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 0.75rem; }
.footer-section p { font-size: 0.85rem; line-height: 1.6; }
.footer-section ul li { margin-bottom: 0.375rem; }
.footer-section a { color: var(--gray-300); font-size: 0.85rem; }
.footer-section a:hover { color: var(--white); }
.footer-note { font-size: 0.8rem; color: var(--gray-400); margin-top: 0.5rem; }
.footer-bottom { border-top: 1px solid var(--gray-700); padding-top: 1.5rem; text-align: center; font-size: 0.8rem; color: var(--gray-500); }

/* === Legal Pages === */
.legal-content { background: var(--white); padding: 2.5rem; border-radius: var(--radius-lg); box-shadow: var(--shadow); margin: 2rem 0; }
.legal-content h1 { margin-bottom: 0.5rem; }
/* === Legal Pages === */
.legal-content { background: var(--white); padding: 2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.legal-content h2 { margin-top: 2rem; margin-bottom: 0.75rem; font-size: 1.2rem; }
.legal-content h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; font-size: 1rem; }
.legal-content p { margin-bottom: 1rem; }
.legal-content ul { margin-bottom: 1rem; padding-left: 1.5rem; list-style: disc; }
.legal-content li { margin-bottom: 0.5rem; }
.legal-date { color: var(--gray-400); font-size: 0.85rem; }

/* === Council Badge === */
.council-ref { display: inline-flex; align-items: center; gap: 0.35rem; background: #eff6ff; color: #1e40af; padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.75rem; font-weight: 600; border: 1px solid #bfdbfe; }
.council-badge-none { background: var(--danger-light); color: var(--danger); border-color: #fecaca; }

/* === Contact Page === */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; }
.contact-card { background: var(--white); padding: 1.75rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); border: 1px solid var(--gray-200); }
.contact-card h3 { margin-bottom: 1rem; font-size: 1.1rem; }
.contact-card .contact-item { display: flex; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--gray-100); align-items: flex-start; }
.contact-card .contact-item:last-child { border-bottom: none; }
.contact-icon { font-size: 1.25rem; flex-shrink: 0; width: 28px; text-align: center; }
.contact-info strong { display: block; font-size: 0.9rem; }
.contact-info span, .contact-info a { font-size: 0.85rem; color: var(--gray-500); }
.contact-info a { color: var(--primary); }
.emergency-banner { background: linear-gradient(135deg, #dc2626, #b91c1c); color: var(--white); padding: 1.5rem 2rem; border-radius: var(--radius-lg); text-align: center; margin-bottom: 2rem; }
.emergency-banner h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.emergency-banner p { opacity: 0.9; font-size: 0.95rem; }
.emergency-banner .emergency-number { font-size: 2.5rem; font-weight: 800; letter-spacing: 0.1em; }

/* === Coming Soon Box === */
.coming-soon-box { margin-top: 1rem; background: linear-gradient(135deg, #f0f9ff, #e0f2fe); border: 1px dashed #7dd3fc; border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; }
.coming-soon-box h4 { margin: 0 0 0.75rem; font-size: 0.95rem; color: var(--primary); }
.coming-soon-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 1.5rem; }
.coming-soon-list li { font-size: 0.85rem; color: var(--gray-500); padding: 0.2rem 0; }

/* === Nearby Issues Panel === */
.nearby-issues-panel { margin-top: 1rem; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; }
.nearby-issues-panel h4 { margin: 0 0 0.25rem; font-size: 0.95rem; color: #92400e; }
.nearby-issues-panel ul { list-style: none; padding: 0; margin: 0.75rem 0 0; }
.nearby-issues-panel li { padding: 0.6rem 0; border-bottom: 1px solid #fde68a; }
.nearby-issues-panel li:last-child { border-bottom: none; }
.nearby-issues-panel a { color: var(--primary); font-weight: 500; }
.nearby-issues-panel .nearby-distance { font-size: 0.8rem; color: #b45309; margin-left: 0.5rem; }
.nearby-issues-panel .nearby-ref { font-size: 0.8rem; color: var(--gray-500); }

/* === Photo Privacy Notice === */
.photo-privacy-notice { background: #f0f9ff; border: 1px solid #bae6fd; border-radius: var(--radius); padding: 0.75rem 1rem; margin-bottom: 0.75rem; font-size: 0.85rem; color: #0c4a6e; }

/* === Photo Moderation Badge === */
.gallery-item { position: relative; }
.photo-pending-badge { position: absolute; top: 0.5rem; left: 0.5rem; background: #f59e0b; color: #fff; font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.5rem; border-radius: var(--radius); }

/* === Donate Page === */
.donate-hero { background: linear-gradient(135deg, #059669, #047857); color: var(--white); padding: 3rem 0; text-align: center; border-radius: var(--radius-lg); margin-bottom: 2rem; }
.donate-hero h2 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.donate-hero p { opacity: 0.9; max-width: 600px; margin: 0 auto; }
.donate-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.donate-card { background: var(--white); padding: 2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); border: 1px solid var(--gray-200); text-align: center; }
.donate-card h3 { margin-bottom: 0.5rem; }
.donate-card p { font-size: 0.9rem; color: var(--gray-500); margin-bottom: 1rem; }
.donate-card .donate-detail { background: var(--gray-50); padding: 1rem; border-radius: var(--radius); font-family: monospace; font-size: 0.9rem; word-break: break-all; margin-top: 0.75rem; text-align: left; }
.donate-card .donate-detail strong { font-family: inherit; display: block; margin-bottom: 0.25rem; color: var(--gray-700); }
.donate-notice { margin-top: 2rem; padding: 1.25rem; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius-lg); font-size: 0.9rem; color: #92400e; }

/* === Events Page === */
.events-hero { background: linear-gradient(135deg, #7c3aed, #6d28d9); color: var(--white); padding: 2.5rem 0; text-align: center; border-radius: var(--radius-lg); margin-bottom: 2rem; }
.events-hero h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.events-list { display: flex; flex-direction: column; gap: 1rem; }
.event-card { background: var(--white); padding: 1.5rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); border: 1px solid var(--gray-200); display: flex; gap: 1.5rem; align-items: flex-start; }
.event-date-badge { background: var(--primary); color: var(--white); border-radius: var(--radius); padding: 0.75rem; text-align: center; min-width: 60px; flex-shrink: 0; }
.event-date-badge .event-day { font-size: 1.5rem; font-weight: 700; display: block; }
.event-date-badge .event-month { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.event-body h3 { margin-bottom: 0.25rem; font-size: 1.05rem; }
.event-body .event-meta { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 0.5rem; }
.event-body p { font-size: 0.9rem; color: var(--gray-600); }
.no-events { text-align: center; padding: 3rem; background: var(--gray-50); border-radius: var(--radius-lg); color: var(--gray-500); }

/* === Security Settings === */
.security-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.5rem; }
.security-status { display: inline-block; padding: 0.35rem 0.75rem; border-radius: var(--radius-md); font-weight: 600; font-size: 0.85rem; }
.security-status-on { background: #dcfce7; color: #166534; }
.security-status-off { background: var(--gray-100); color: var(--gray-500); }
.backup-codes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin: 1rem 0; }
.backup-code { display: block; text-align: center; padding: 0.5rem; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-md); font-size: 0.9rem; font-family: monospace; }
.btn-danger { color: #dc2626; border-color: #dc2626; }
.btn-danger:hover { background: #dc2626; color: #fff; }

/* === Mobile Responsive === */
@media (max-width: 768px) {
    .navbar-toggle { display: block; }
    .navbar-menu {
        display: none; flex-direction: column; position: absolute;
        top: 100%; left: 0; right: 0; background: var(--white);
        border-top: 1px solid var(--gray-200);
        box-shadow: var(--shadow-lg); padding: 1rem;
    }
    .navbar-menu.open { display: flex; }
    .navbar-menu li a { padding: 0.75rem; }
    .nav-user { flex-direction: column; align-items: flex-start; margin-left: 0; }

    .hero h1 { font-size: 1.75rem; }
    .hero-subtitle { font-size: 1rem; }
    .stats-grid, .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid { grid-template-columns: 1fr; }
    .issues-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .admin-grid { grid-template-columns: 1fr; }
    .admin-detail-grid { grid-template-columns: 1fr; }
    .filters-bar { flex-direction: column; }
    .filter-input, .filter-select { width: 100%; min-width: initial; }
    .track-input-group { flex-direction: column; }
    .track-header { flex-direction: column; }
    .issue-row { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .issue-row-status { align-self: flex-start; }
    .issue-detail-meta { flex-direction: column; gap: 0.5rem; }
    .map-container { height: 300px; }
    .map-large { height: 350px; }
    .gallery-item img { width: 150px; height: 110px; }
    .auth-card { padding: 1.5rem; margin: 1.5rem auto; }
    .legal-content { padding: 1.5rem; }
    .contact-grid { grid-template-columns: 1fr; }
    .coming-soon-list { grid-template-columns: 1fr; }
    .event-card { flex-direction: column; }
    .donate-methods { grid-template-columns: 1fr; }
    .backup-codes-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .admin-stats-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero { padding: 2.5rem 0; }
}
