/* Extracted from inline <style> in BasuRANT.html */
/* Design tokens and basic styling */
:root{
    /* lighter green palette */
    --brand-green: #57b72d; /* 20% darker than #7ED957 */
    --accent-green: #16A34A; /* canonical status green */
    --muted: #6b7280;
.container { width: calc(100% - var(--sidebar-width)); margin-left: var(--sidebar-width); margin-right: 0; padding: 24px 28px; }
    --surface: #f7faf7;
    --glass: rgba(255,255,255,0.6);
    --shadow: 0 6px 18px rgba(16,24,40,0.08);
}
* {
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
}
:root { --header-height: 64px; }
/* Floating header sizing used by report page */
:root { --floating-header-height: 72px; }
/*galing BasuRANT.html */
/* Utility classes to replace inline styles */
.site-header {
    padding: 12px;
    background: linear-gradient(90deg,var(--brand-green),var(--accent-green));
    color: white;
}
.small-btn {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.9rem;
    line-height: 1;
.admin-map { height: 420px; width: 100%; }
    border-radius: 4px;
    background: rgba(255,255,255,0.12);
    color: white;
    border: 0;
    cursor: pointer;
}
.table-btn {
    padding: 5px 10px;
    width: auto;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    color: inherit;
    border: 0;
    cursor: pointer;
}
.status-active {
    color: var(--accent-green);
}
.please-log-in {
    padding: 40px;
    text-align: center;
    font-size: 1.1em;
    color: #B00020;
}
.error-text {
    color: #B00020;
}
/* Small utilities */
.hidden { display: none !important; }
.auth-status { margin-right: 12px; font-size: 0.95em; }
.login-btn { margin-left: 6px; }

/* Small margin utilities used by HTML (replaces inline margin-top values) */
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }

/* Full-width helper */
.full-width { width: 100%; }

/* Centered card with max width (used on report page) */
.center-card { max-width: 720px; margin: 24px auto; }

/* Simple flex row helper */
.flex-row { display: flex; gap: 8px; align-items: center; }

/* Report card specific styles (migrated from inline templates) */
.report-card { margin-bottom: 14px; padding: 12px; border: 1px solid #e6e6e6; border-radius: 8px; background: white; }
.report-row { display: flex; gap: 12px; align-items: flex-start; }
.report-thumb { width: 120px; flex-shrink: 0; }
.report-thumb img { width: 100%; border-radius: 6px; display: block; }
.report-meta { font-size: 0.9em; color: #666; margin-top: 6px; }
.report-desc { margin-top: 8px; }
.report-status { margin-top: 8px; font-size: 0.9em; color: #666; }
.popup-photo { width: 120px; display: block; margin-top: 6px; }

/* Grid utility for analytics page */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.chart-canvas { height: 220px; }
.chart-canvas-lg { height: 260px; }
.chart-card.full-width { grid-column: 1 / -1; }

/* Status color helpers */
.status-pending { color: #9E9E9E; }
.status-verified { color: var(--accent-green); }
.status-inprogress { color: #f59e0b; }
.status-cleaned { color: var(--accent-green); }

/* Main content helpers */
.main-flex { display: flex; flex-direction: column; flex: 1; min-height: calc(100vh - var(--header-height) - 48px); }
.mt-20 { margin-top: 20px; }

/* Chart layout helpers */
.chart-grid { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.chart-panel { flex-basis: 45%; max-width: 720px; min-width: 320px; height: 660px; background-color: white; padding: 10px; border-radius: 6px; border: 1px solid #ddd; }
.chart-header { margin: 0 0 8px 0; font-size: 0.95em; }
.chart-canvas-wrap { height: 610px; }

/* Generic card utilities used by the HTML for professional visuals */
.card { background: white; border-radius: 10px; box-shadow: 0 8px 24px rgba(16,24,40,0.06); overflow: hidden; border: 1px solid #e5e7eb; }
.card-header { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; font-weight:600; }
.card-body { padding: 16px; }

/* Schedule card styles (used on pages like `login.html`) */
.schedule.card {
    width: 92%;
    max-width: 880px;
    margin: 40px auto; /* center with more vertical spacing */
    padding: 8px; /* small outer padding around the inner content */
    border: 1px solid rgba(22,163,74,0.10);
    border-radius: 12px;
    background: white;
    box-shadow: 0 18px 40px rgba(16,24,40,0.08);
}
.schedule.card .card-content {
    padding: 22px 26px; /* larger inner padding for airiness */
    max-height: 520px; /* allow more vertical space so content reads better */
    overflow: auto;
    opacity: 1;
}
.schedule.card .card-body {
    padding: 22px 26px; /* match card-content spacing for header/body pattern */
    max-height: 520px;
    overflow: auto;
    opacity: 1;
}
.schedule .card-title {
    margin: 0 0 8px 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    opacity: 1;
}
.schedule .card-text {
    margin: 0;
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.55;
    white-space: pre-wrap; /* preserve line breaks in long schedule text */
    opacity: 1;
}
.schedule .card-text strong { color: #064e3b; }
.card-title { text-align: center;}
.card-text { text-align: center;}

@media (min-width: 900px) {
    /* Force vertical stacking even on wide viewports */
    .login-page { display: flex; flex-direction: column !important; gap: 24px; align-items: center !important; justify-content: center; }
    .login-card { flex: 0 0 auto; }
    .schedule.card { flex: 0 0 auto; margin: 20px 0; }
}

@media (max-width: 899px) {
    /* stack vertically on smaller screens and ensure spacing */
    .login-page { flex-direction: column; padding: 18px 12px; }
    .schedule.card { max-width: 100%; margin: 14px 0 0 0; }
}

/* Force stack: ensure schedule appears below login-card on all viewports */
.schedule.card {
    width: 100% !important;
    max-width: 880px !important;
}
.schedule.card { margin-top: 18px !important; }

/* Table tweaks */
table tbody tr:nth-child(even) { background: #FBFBFB; }
th { background: #F7F9F8; font-weight: 600; }

.footer-note { margin-top: 12px; }
.footer-note { margin-top: 12px; }
.admin-view-container { display:block; display:flex; gap:18px; align-items:stretch; }
/* Ensure the admin view fills the available viewport height (account for header). This
    prevents the content area from collapsing to 0 height when the sidebar is fixed. */
.admin-view-container { display:block; display:flex; gap:18px; align-items:stretch; }
/* Ensure the admin view fills the available viewport height (account for header). This
    prevents the content area from collapsing to 0 height when the sidebar is fixed. */
#admin-view { min-height: calc(100vh - var(--header-height) - 24px); }
/* Also ensure main content has a sensible minimum to display tab panes */
main.main-flex { min-height: calc(100vh - var(--header-height) - 48px); }
.admin-map { height:100%; width:100%; }
.hero-inner { display:flex; align-items:center; justify-content:center; text-align:center; padding:20px 0; background-color:#f9f9f9; margin-top:40px; border-top:6px solid var(--accent-green); }
.chart-card { background:white; padding:12px; border-radius:8px; box-shadow:var(--shadow); }

/* Make Chart.js canvases stretch to fill the card height so all charts align visually */
.chart-card { display: flex; flex-direction: column; }
.chart-card .chart-canvas-wrap { flex: 1 1 auto; min-height: 220px; }
.chart-card canvas { width: 100% !important; height: 100% !important; display: block; }

body {
    margin: 0;
    /* Use a CSS variable for header height so JS can update it dynamically */
    padding-top: var(--header-height);
    color: #111827;
    background-color: var(--surface);
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.left-navbar-auth { margin-top: 16px; padding: 0 12px; }
.left-navbar { width: 240px; display:flex; flex-direction:column; gap:8px; border-radius:0; position:fixed; left:0; top:0; bottom:0; }
.left-navbar .tab { text-align: left; }
.left-navbar .tab.active { background-color: rgba(255,255,255,0.08); }
.left-navbar .logo-area { padding-bottom: 4px; }
.left-navbar .nav-item { color: white; }
.left-navbar .nav-item.active, .left-navbar .nav-item:hover { background-color: rgba(255,255,255,0.08); }
.left-navbar .w-12 { flex: 0 0 auto; }
/* Shift page content to appear next to the fixed sidebar on desktop */
@media (min-width: 768px) {
    .container { margin-left: 240px; }
}

.container { max-width: 1200px; margin-left: var(--sidebar-width); margin-right: 0; padding: 24px; }
.admin-map-container { background: white; padding: 12px; border-radius: 8px; box-shadow: var(--shadow); }
.filter-panel { background: white; border-radius: 8px; }
.main-content {
    display: flex;
    margin-top: 20px;
    min-height: 70vh;
}
.map-container {
    flex: 7;
    height: 60vh;
    border: 1px solid #ccc;
    position: relative;
    background-color: #eef9ee;
}

    /* Map loading overlay */
    #map-loading-overlay.map-loading {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.85);
        z-index: 1000;
    }
    /* When hidden, ensure the overlay doesn't block pointer events (allows map interactions) */
    #map-loading-overlay.hidden { display: none !important; pointer-events: none !important; }
    #map-loading-overlay .map-loading-inner { text-align: center; color: #1f2937; }
    #map-loading-overlay .spinner {
        width: 44px; height: 44px; margin: 6px auto 10px auto; border-radius: 50%;
        border: 4px solid rgba(0,0,0,0.08); border-top-color: var(--accent-green, #16a34a);
        animation: spin 1s linear infinite;
    }
    #map-loading-overlay .loading-text { font-size: 14px; color: #374151; }
    @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.sidebar {
    flex: 3;
    padding: 0 15px;
}
.filter-panel, .report-panel {
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    background-color: white;
}
/* .filter-options and .filter-option styles removed: replaced by dropdown controls in the admin UI */
.quick-report-btn {
    background-color: var(--accent-green);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    position: fixed;
    bottom: 30px;
    right: 30px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 99;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.marker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    position: absolute;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.2);
}
.marker.small { background-color: var(--accent-green); }
.marker.medium { background-color: #FFC107; }
.marker.large { background-color: #9E9E9E; }
.marker.verified::after {
    content: "✓";
    color: white;
    position: absolute;
    top: -5px;
    right: -5px;
    background: #2196F3;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.marker.cleaned {
    background-color: #9E9E9E;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 0.3; }
    100% { opacity: 0.6; }
}

/* Modal styles - MOVED TO phone-signin.css */
.camera-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0,0,0,0.5);
    z-index: 1200;
}
.camera-modal .bg-white {
    max-width: 640px;
    width: 100%;
    box-shadow: 0 12px 30px rgba(2,6,23,0.3);
}
.camera-area video, .camera-area canvas, #modal-camera-video, #modal-camera-canvas {
    width: 100%;
    height: auto;
    border-radius: 6px;
    background: #000;
}
.camera-area { background: #000; padding: 6px; border-radius: 6px; }

/* Floating header fallback styling (in addition to Tailwind classes in HTML) */
#floating-header { pointer-events: none; }
#floating-header > div { pointer-events: auto; }
#floating-header .bg-white\/80 {
        background-color: rgba(255,255,255,0.82);
}

/* Ensure the container respects the floating header on smaller viewports */
@media (max-width: 1024px) {
    .container.pt-20 { padding-top: calc(var(--floating-header-height) + 12px); }
}

/* Fallback alignment: make a centered main wrapper match header's max width when Tailwind utilities are present */
.mx-auto.w-full.max-w-3xl.px-4 { max-width: 768px; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }

/* .page-wrapper fallback: when Tailwind isn't present, ensure both header and content use same centered width */
.page-wrapper { max-width: 768px; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }

/* Align floating header with page content when sidebar is present (desktop) */
@media (min-width: 768px) {
    /* Make header span full viewport width, then align its inner wrapper with the content area */
    #floating-header {
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        width: 100% !important;
    }
    /* Align the header inner wrapper with the main content by offsetting for the sidebar + content padding */
    /* Increased offset by 150px to match observed alignment (content uses 16px internal padding) */
    #floating-header .page-wrapper { margin-left: calc(var(--sidebar-width) + 150px); margin-right: auto; max-width: 768px; }
}

/* Smaller camera button with icon styling */
.admin-btn.inline-flex {
    padding: 6px 8px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 6px;
}
.admin-btn.inline-flex svg { width: 16px; height: 16px; }

/* Small button variant for tight spaces */
.btn-small {
    padding: 6px 10px !important;
    font-size: 0.9rem !important;
    line-height: 1 !important;
    width: auto !important;
    display: inline-block !important;
}

/* Ensure camera button content stays on one line */
.no-wrap { white-space: nowrap; }
.text-center { text-align: center; }

/* Responsive: make camera button icon-only on very small screens (<=360px) */
@media (max-width: 360px) {
    /* hide the textual label but keep it accessible to screen readers */
    #open-camera-btn .btn-text {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0 0 0 0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }
    /* reduce button padding so icon fits comfortably */
    #open-camera-btn { padding-left: 6px !important; padding-right: 6px !important; }
    #open-camera-btn svg { margin-right: 0 !important; }
}

/* Modal control buttons */
#modal-capture-btn, #modal-cancel-btn { padding: 8px 12px; min-width: 90px; }
#close-camera-modal { background: transparent; border: none; font-size: 18px; cursor: pointer; }
/* .modal-content - MOVED TO phone-signin.css */

/* Report download overlay styles */
#report-download-overlay { display: none; }
#report-download-overlay.flex { display: flex; }
.report-download-box { display: flex; align-items: center; gap: 12px; }
.report-spinner {
    width: 36px; height: 36px; border-radius: 50%;
    border: 4px solid rgba(0,0,0,0.08); border-top-color: var(--accent-green, #16a34a);
    animation: spin 1s linear infinite;
}

/* Ensure overlay visible when not hidden class */
#report-download-overlay:not(.hidden) { display: flex; }

/* Centralized modal open state - MOVED TO phone-signin.css */
/* .modal-close - MOVED TO phone-signin.css */
.close {
    float: right;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
}
.form-group {
    margin-bottom: 15px;
}
label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}
button {
    background-color: var(--accent-green);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    width: 100%;
}
.camera-placeholder {
    width: 100%;
    height: 200px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border: 2px dashed #ccc;
}
.anonymous-option {
    display: flex;
    align-items: center;
    margin: 15px 0;
}
.anonymous-option input {
    width: auto;
    margin-right: 10px;
}

/* Dashboard styles */
.tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #ccc;
}
.tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
}
.tab.active {
    border-bottom: 3px solid var(--accent-green);
    font-weight: bold;
}
.tab-content {
    display: none;
    /* allow the visible tab pane to grow and fill the main content area
       when the main container is a flex column. This prevents the pane
       from collapsing to 0 height when parent sizing is computed. */
    flex: 1 1 auto;
}
.tab-content.active {
    display: block;
}
.dashboard-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}
.stat-card {
    flex: 1;
    min-width: 200px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: center;
    background-color: white;
}
.tab-content { background: white; padding: 20px; border-radius: 8px; box-shadow: var(--shadow); margin-bottom: 20px; }
.stat-card { border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
.filter-panel { background: white; box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
table { background: white; box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
th, td { padding: 12px 16px; }
.dashboard-stats { gap: 18px; }
.admin-controls { gap: 12px; }

/* Styles for separated reports sections */
#active-reports-table { width: 100%; margin-bottom: 20px; border-collapse: collapse; }
#completed-reports-table { width: 100%; margin-top: 12px; border-collapse: collapse; }
#reports-management-tab h3 { margin: 0; font-size: 1.2rem; font-weight: 600; color: #111; }

.stat-card h3 {
    margin: 0 0 10px 0;
    font-size: 1em;
    color: #666;
}
.stat-card p {
    margin: 0;
    font-size: 1.8em;
    font-weight: bold;
}
.admin-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}
.admin-btn {
    padding: 10px 15px;
    background-color: var(--accent-green);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Ensure button-like controls are green with white text (overrides inline where possible) */
button, input[type="button"], input[type="submit"] {
    background-color: var(--accent-green) !important;
    color: #ffffff !important;
    border: none !important;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: white;
}
th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
th {
    background-color: #f2f2f2;
    font-weight: bold;
}
tr:hover {
    background-color: #f5f5f5;
}

/* (heatmap styling removed) */

/* Banner shown when anonymous auth is disabled or Firestore permission denied */
#auth-warning {
    background: #FFF4E5;
    color: #663C00;
    border-top: 4px solid #FFD54F;
    padding: 10px 16px;
    text-align: center;
}

/* History map container adjusted by JS so no inline styles required */
#history-map { width:100%; height: calc(100vh - 140px); }

/* Floating header overrides moved from inline attributes in history.html */
#floating-header { z-index: 9999 !important; pointer-events: auto !important; }

/* Explicit header title/subtitle layout for exact pixel control (replaces Tailwind responsive utilities) */
.brand-title-wrapper {
    margin-left: 0; /* default */
    display: flex;
    flex-direction: row; /* keep title and subtitle on one line */
    align-items: center;
}

/* Page-specific override: for history page show subtitle below the brand title */
.reports-header .brand-title-wrapper {
    flex-direction: column !important;
    align-items: flex-start !important;
}
.brand-title { font-size: 1.125rem; font-weight: 600; color: #1f2937; }
.reports-subtitle {
    margin-top: 6px;
    margin-left: 0; /* mobile default */
    font-size: 0.875rem;
    color: #4b5563; /* text-gray-600 */
}

/* Larger screens: align horizontally and reset margins precisely */
@media (min-width: 640px) {
    .brand-title-wrapper {
        margin-left: 8px; /* exact px control instead of sm:ml-2 */
        flex-direction: row;
        align-items: center;
    }
    .reports-subtitle {
        margin-top: 0;
        margin-left: 8px; /* exact px control instead of sm:ml-2 */
    }
}

/* Mobile-specific adjustments removed to keep subtitle aligned with logo */

/* Notification panel */
.notification-panel {
    position: fixed;
    top: 70px;
    right: 20px;
    width: 300px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 101;
    display: none;
}
.notification-header {
    padding: 10px 15px;
    background-color: #f2f2f2;
    border-bottom: 1px solid #ccc;
    font-weight: bold;
}
.notification-list {
    max-height: 300px;
    overflow-y: auto;
}
.notification-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}
.notification-item:last-child {
    border-bottom: none;
}

/* View toggle */
.view-toggle {
    display: flex;
    margin-bottom: 20px;
    background-color: white;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #ccc;
}
.view-option {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
}
.view-option.active {
    background-color: var(--accent-green);
    color: white;
}

/* Admin Map Styles */
.admin-map-container {
    height: 60vh;
    border: 1px solid #ccc;
    position: relative;
    background-color: #eef9ee;
    margin-bottom: 20px;
}
.admin-map-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}
.map-legend {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    padding: 10px;
    background-color: white;
    border-radius: 5px;
    border: 1px solid #ccc;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
}
.legend-small { background-color: var(--accent-green); }
.legend-medium { background-color: #FFC107; }
.legend-large { background-color: #9E9E9E; }
.legend-cleaned { background-color: #9E9E9E; }

/* Severity legend swatches */
.legend-severity-low { background-color: #16a34a; /* green */ }
.legend-severity-medium { background-color: #f59e0b; /* amber */ }
.legend-severity-high { background-color: #9E9E9E; /* gray */ }

/* Left navbar styles (replaces horizontal tabs) */
.left-navbar {
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(245,250,245,0.98));
    border-right: 1px solid #e6ece6;
    box-shadow: 0 2px 8px rgba(16,24,40,0.04);
    position: fixed;
    left: 0;
    /* Use CSS variable so it matches header height dynamically */
    top: calc(var(--header-height));
    bottom: 0;
    width: 220px;
    overflow: auto;
    z-index: 90;
}
.left-navbar nav button.tab {
    background: transparent;
    border: none;
    text-align: left;
    padding: 10px 12px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 6px;
}
.left-navbar nav button.tab:hover { background: rgba(134,184,130,0.08); }
.left-navbar nav button.tab.active { background: var(--accent-green); color: white; font-weight:600; }

/* Modern styling additions */
.left-navbar { padding-top:12px; }
.left-navbar .logo { display: none; }
.left-navbar nav button.tab { display:flex; align-items:center; gap:10px; padding:12px 14px; margin:4px 6px; }
.left-navbar nav button.tab::before { content: ''; width:18px; height:18px; border-radius:4px; background: rgba(0,0,0,0.06); display:inline-block; }
.left-navbar nav button.tab.active::before { background: rgba(255,255,255,0.25); }
.left-navbar nav button.tab span { flex:1; text-align:left; }

.left-navbar nav button.tab .hint { font-size:0.85em; color:rgba(0,0,0,0.5); }

/* Main header inside the content area (not the left navbar) */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.main-header .title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #0f172a; /* slate-900 */
}
.main-header .controls { display:flex; gap:8px; align-items:center; }
.main-header .search-input {
    display:inline-flex; align-items:center; gap:8px; padding:8px 10px; border-radius:8px; background:#fff; border:1px solid #e6e6e6; box-shadow: 0 4px 12px rgba(2,6,23,0.04);
}
.main-header .search-input input { border:0; outline:none; font-size:14px; }

/* Improve primary admin buttons for consistent modern look */
.admin-btn {
    padding: 8px 12px;
    border-radius: 10px;
    background: linear-gradient(180deg, var(--accent-green), var(--brand-green));
    color: white;
    border: none;
    box-shadow: 0 6px 18px rgba(16,24,40,0.08);
    transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
    font-weight: 600;
}
.admin-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(16,24,40,0.12); }
.admin-btn:active { transform: translateY(0); }

/* Secondary/surface button variant for neutral actions */
.admin-btn.surface { background: white; color: #0f172a; border: 1px solid #e6e6e6; box-shadow:none; }

/* Make small buttons accessible and consistent */
.btn-small, .small-btn { padding: 6px 10px; border-radius:8px; }

/* Card and tab tweaks */
.tab-content { padding: 18px; }
.card { border-radius: 12px; }

/* Chart and analytics: reduce overly tall defaults and make responsive */
.chart-panel { flex-basis: 45%; max-width: 720px; min-width: 280px; background-color: white; padding: 12px; border-radius: 10px; border: 1px solid #eee; }
.chart-header { margin: 0 0 8px 0; font-size: 0.95em; }
.chart-canvas-wrap { height: 300px; }

/* Admin map sizing improvements */
.admin-map-container { height: 56vh; min-height: 380px; border-radius: 10px; padding: 12px; }
    .admin-map { width: 100%; height: 100%; border-radius: 8px; }
    /* Ensure the map container allows panning/dragging on touch and pointer devices */
    #admin-map, .admin-map { touch-action: pan-x pan-y; -ms-touch-action: pan-x pan-y; z-index: 10; }

/* Improve table visuals for readability */
/* Keep rounded table corners but allow overflow visible so absolute-positioned
    dropdowns aren't clipped by the table element. */
table { border-radius: 8px; overflow: visible; }
th, td { padding: 12px 14px; }

/* Focus outlines for keyboard users */
button:focus, .table-btn:focus, .admin-btn:focus { outline: 3px solid rgba(16,185,129,0.12); outline-offset: 2px; }

/* Slightly dim footer/hero text and add spacing */
.hero-inner p { color: #374151; line-height: 1.45; }

/* Make recent activity and stat cards align better */
.dashboard-stats { gap: 16px; }
.stat-card { padding: 14px; border-radius: 10px; }

/* Responsiveness: stack header controls on small screens */
@media (max-width: 640px) {
    .main-header { flex-direction: column; align-items: stretch; gap: 8px; }
    .chart-canvas-wrap { height: 220px; }
}

/* Ensure main content stacks below navbar on very small widths */
@media (max-width: 760px) {
    #admin-view { flex-direction: column; }
    .left-navbar { position:relative; top:auto; bottom:auto; width:100%; display:flex; }
    .left-navbar nav { flex-direction:row; overflow:auto; }
    .left-navbar nav button.tab { white-space:nowrap; }
}

/* Use a CSS variable for sidebar width so offsets are consistent */
:root { --sidebar-width: 240px; }

/* When left-navbar is present, give main container a left offset equal to navbar width on desktop */
@media (min-width: 768px) {
    .container { margin-left: var(--sidebar-width); }
}

/* Page-specific override: no sidebar on report page -> remove left offset */
body.no-sidebar .container {
    margin-left: 0 !important;
}

/* When there's no sidebar, center the main content area so it aligns with the centered header.
   This sets a max-width and centers horizontally for all viewports, preserving existing padding. */
body.no-sidebar .container, body.no-sidebar .mx-auto.w-full.max-w-3xl.px-4 {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 768px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
}

/* When no-sidebar, center the header inner wrapper exactly like the content wrapper */
@media (min-width: 768px) {
    /* Center the floating header above the centered page content when there's no sidebar.
       Use auto margins and a matching max-width so the header lines up perfectly. */
    body.no-sidebar #floating-header {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        transform: none !important;
    }
    body.no-sidebar #floating-header .page-wrapper {
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: 768px;
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Also ensure the header is centered on smaller screens when no-sidebar is set */
@media (max-width: 767px) {
    body.no-sidebar #floating-header {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        transform: none !important;
    }
    body.no-sidebar #floating-header .page-wrapper {
        margin-left: 12px !important;
        margin-right: 12px !important;
        max-width: calc(100% - 24px);
        padding-left: 0;
        padding-right: 0;
    }
}

/* Mobile-specific rules moved from report.html to central stylesheet to avoid conflicts
   (originally inside report.html <style> @media (max-width:640px) ) */
@media (max-width:640px) {
    /* Aggressive mobile widening: expand the content area visually by ~150px while keeping the
       floating header and logo unaffected. We do this by increasing the content wrappers' width
       and balancing with negative margins; the header's .page-wrapper is left alone to stay centered. */
    .page-wrapper { padding-left:8px !important; padding-right:8px !important; }
    .container { padding-left:4px !important; padding-right:4px !important; }

    /* Use an inner .expander element to visually widen content by ~150px while keeping
       the outer centered wrapper and header/layout intact. This avoids negative margins
       on the page container which caused header/logo shifts. */
    .mx-auto.w-full { padding-left:0 !important; padding-right:0 !important; max-width: none !important; }
        .expander {
            /* make content 20px narrower on mobile and center it visually */
            width: calc(100% - 20px) !important;
            max-width: none !important;
            transform: translateX(10px) !important; /* shift right half the removed width so it's centered */
            box-sizing: border-box;
        }

    main.card {
        padding-left:10px !important;
        padding-right:10px !important;
        max-width: none !important;
        margin-top: 40px !important; /* increased top margin on mobile (20px -> 40px) */
        box-sizing: border-box;
    }

    /* Ensure the outer .container doesn't constrain the inner widened area on no-sidebar pages */
    body.no-sidebar .container {
        max-width: none !important;
        width: 100% !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
        box-sizing: border-box;
    }

    /* make form text and controls more readable */
    label { font-size: 15px !important; line-height: 1.4 !important; }
    input, select, textarea { width: 100% !important; font-size: 16px !important; }
    .choices, .choices__inner, .choices__list { width: 100% !important; min-width: 0 !important; }
    .choices__inner { min-height:44px !important; padding:0.4rem !important; }

    /* make buttons more tappable */
    .btn-small { padding: 0.6rem 0.9rem !important; font-size: 16px !important; }

    /* tighten vertical rhythm slightly but keep readable spacing */
    .space-y-3 > * + * { margin-top: 0.6rem !important; }
    .form-group { margin-bottom: 0.6rem !important; }

    /* prevent floating header from overflowing horizontally */
    #floating-header .page-wrapper { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; padding-left: 8px !important; padding-right: 8px !important; }

    /* Ensure media elements inside the report card and camera modal fill available area
       — avoid targeting global img so header logo keeps its intended size. */
    main.card video, main.card canvas, #add-image-preview, .camera-area video, .camera-area canvas, #modal-camera-video, #modal-camera-canvas { max-width: 100% !important; width: 100% !important; height: auto !important; }

    /* Move the right-side header text (submit message + signed-in label) 20px right on narrow screens
       so it clears the visually expanded content area and reads comfortably. */
    #floating-header .page-wrapper .text-sm.text-gray-600 {
        padding-left: 20px !important;
        margin-left: 20px !important;
    }

    /* Choices.js dropdown: make the dropdown height responsive so it adapts to the viewport.
       Use clamp() to keep a sensible min/max while preferring a viewport-relative size. */
    .choices__list--dropdown {
        max-height: clamp(240px, 45vh, 440px) !important; /* between ~240px and 440px, up to 45% of viewport */
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

/* Desktop-specific left-navbar enforcement: ensure it's fixed vertically at the left side */
@media (min-width: 768px) {
    .left-navbar {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        width: var(--sidebar-width) !important;
        display: block !important;
        overflow: auto;
        z-index: 90;
        padding-top: 12px;
    }
    .left-navbar nav { flex-direction: column !important; }
}

/* Login page specific styles */
.login-page {
    min-height: 100vh;
    position: relative;
    overflow: visible; /* allow children (schedule card) to be visible instead of being clipped */
    display: flex;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center;
    width: 100%;
    background-image: url('./src/baguio_trees.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.login-card {
    position: relative;
    z-index: 20;
    /* increased by 50px to make the card slightly wider */
    width: 100% !important;
    max-width: 510px;
    padding: 28px;
    border-radius: 12px;
    background-color: rgba(255,255,255,0.5);
    box-shadow: 0 18px 40px rgba(16,24,40,0.10);
    border: 1px solid rgba(22,163,74,0.12);
    text-align: center;
    margin: 20px auto;
}
.login-card h1 { margin: 0 0 6px 0; font-size: 1.6em; color:#0f172a; }
.login-card .muted { color: #374151; }

/* Small muted text utility used across pages */
.muted-text { color: var(--muted); font-size: 0.9em; }



/* Footer / hero sizing: let the footer's hero section size to its contents */
footer {
    position: relative;
    z-index: 10;
}
.hero {
    width: auto;
    padding: 20px 0;
    /* allow height to grow with content (avoid fixed heights) */
    height: auto !important;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer styling for report page */
.site-footer {
    font-size: 0.95rem;
    color: var(--muted);
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Style file input choose button to match Tailwind green/white professional look (reduced size) */
input[type="file"] { display: inline-block; }
/* Standard spec pseudo-element */
input[type="file"]::file-selector-button,
/* WebKit */
input[type="file"]::-webkit-file-upload-button {
    background-color: #16a34a; /* tailwind green-600 */
    color: #ffffff;
    border: none;
    /* reduced padding to make the button ~15px smaller in height */
    padding: 0.25rem 0.5rem;
    margin-right: 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
}
input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover {
    background-color: #15803d; /* tailwind green-700 */
}
/* Edge/IE fallback */
input[type="file"]::-ms-browse {
    background: #16a34a;
    color: #fff;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

/* Reusable green button class matching the reduced file-input button */
.btn-green {
    background-color: #16a34a; /* tailwind green-600 */
    color: #ffffff;
    border: none;
    padding: 0.25rem 0.75rem; /* compact vertical padding */
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-block;
}
.btn-green { background-color: #16a34a !important; }
.btn-green:hover { background-color: #15803d !important; }
.btn-green:focus { outline: none; box-shadow: 0 0 0 4px rgba(16,185,129,0.12); }

/* Terms / legal link styles - MOVED TO phone-signin.css */

/* Cluster icon styles for Leaflet.markercluster (custom divIcon) */
.marker-cluster-wrapper { /* wrapper class applied to the generated icon element */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.marker-cluster-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    background: #ffffff;
    border-radius: 999px;
    padding: 6px 10px;
    box-shadow: 0 6px 18px rgba(16,24,40,0.12);
    border: 2px solid #ffffff;
    min-width: 36px;
    min-height: 36px;
    font-weight: 700;
    font-size: 13px;
}
.marker-cluster-custom .cluster-count { display: inline-block; line-height: 1; }

/* Size variants so larger clusters have a larger visual weight */
.marker-cluster-small { transform: scale(1); }
.marker-cluster-medium { transform: scale(1.18); padding: 8px 12px; font-size: 14px; }
.marker-cluster-large { transform: scale(1.36); padding: 10px 14px; font-size: 15px; }

/* Ensure the cluster icon is above map markers */
.marker-cluster-wrapper { z-index: 600 !important; }

/* Slight hover effect to indicate interactivity */
.marker-cluster-custom:hover { transform: translateY(-2px); transition: transform 120ms ease; }

/* Force default Leaflet cluster bubbles to white on both user/admin maps */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(17, 24, 39, 0.16);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid rgba(17, 24, 39, 0.14);
    font-weight: 700;
}

/* Cleaner CSS */

/* Actions dropdown (users table) */
.actions-dropdown { position: relative; display: inline-block; }
.actions-dropdown .actions-toggle { display: inline-flex; align-items:center; gap:8px; }
.actions-menu { position: absolute; right: 0; top: calc(100% + 8px); background: white; border: 1px solid #e6e6e6; border-radius: 8px; padding: 6px; box-shadow: 0 10px 30px rgba(2,6,23,0.08); min-width: 180px; z-index: 300; max-height: 260px; overflow: auto; }
.actions-menu.hidden { display: none; }
.actions-menu li { list-style: none; margin: 0; padding: 0; }
.actions-menu li button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; border: none; background: transparent; cursor: pointer; }
.actions-menu li button:hover { background: #f3f4f6; }
.actions-menu li button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Small modal tweaks for assign modal to ensure it's centered and sized nicely */
.modal { z-index: 9999 !important; }
.modal-content { max-width: 520px; max-height: 85vh; display:flex; flex-direction:column; gap:12px; overflow-y: auto; }
.modal .form-group label { display:block; margin-bottom:6px; font-weight:600; }

/* Modal header/footer helpers for consistent alignment */
.modal-header { display:flex; align-items:center; justify-content:space-between; }
.modal-footer { display:flex; gap:10px; justify-content:flex-end; align-items:center; }
.modal-close { background:transparent; border:none; font-size:20px; line-height:1; cursor:pointer; padding:6px; border-radius:6px; }
.modal-close:hover { background:#f3f4f6; }

/* Assign modal spinner (small) */
.modal-spinner { width:20px; height:20px; border:3px solid rgba(0,0,0,0.08); border-top-color: var(--brand-green); border-radius:50%; display:inline-block; animation: spin 0.9s linear infinite; vertical-align:middle; margin-left:8px; }
.modal-spinner.hidden { display:none; }

/* Assigned badge shown next to actions when a report is assigned */
.assigned-badge { display:inline-block; background:#eef2ff; color:#1e40af; padding:4px 8px; border-radius:999px; font-size:12px; font-weight:600; margin-right:8px; border:1px solid #dbeafe; }

/* Toast notifications */
.toast-container { position: fixed; right: 20px; bottom: 24px; z-index: 1100; display:flex; flex-direction:column; gap:8px; }
.toast { min-width: 240px; max-width: 420px; padding: 10px 14px; border-radius: 8px; box-shadow: 0 8px 24px rgba(2,6,23,0.12); color: #0f172a; background: #fff; border-left: 4px solid #d1fae5; display:flex; align-items:center; gap:10px; }
.toast-success { border-left-color: #10b981; }
.toast-error { border-left-color: #ef4444; }
.toast .toast-msg { flex:1; font-size:14px; }
.toast .toast-close { background:transparent; border:0; cursor:pointer; color:#6b7280; font-weight:700; }

/* Forecast legend migrated from inline styles */
.forecast-legend { margin-top: 8px; display: none; }
.forecast-legend-row { display:flex; gap:8px; align-items:center; font-size:13px; color:#111; }
.forecast-legend-column { display:flex; flex-direction:column; gap:6px; }
.forecast-legend-item { display:flex; gap:6px; align-items:center; }
.forecast-swatch { width:18px; height:12px; border-radius:3px; display:inline-block; margin-right:6px; }
.swatch-blue { background: #2563eb; }
.swatch-orange { background: #f97316; }
.swatch-red { background: #9E9E9E; }
.forecast-legend-meta { font-size:12px; color:#444; line-height:1.1; }

/* Reports badge style moved from inline */
.reports-badge { margin-left:8px; padding:6px 10px; background:#e6f8ea; color:#166534; border-radius:6px; font-weight:600; display:inline-block; }

/* Admin debug panel styling moved from inline */
.admin-debug-panel { display:block; max-height:160px; overflow:auto; white-space:pre-wrap; }

/* Utility: min width 160px (used by select) */
.min-w-160 { min-width: 160px; }

/* Forecast controls container */
.forecast-controls { display:inline-flex; gap:10px; align-items:center; margin-left:12px; }

/* Inline label helper used where inline styles were previously applied */
.label-inline { align-self: center; margin-left:8px; margin-right:6px; font-weight:600; }
/* Small utility helpers used in several inline-to-class replacements */
.gap-6 { gap: 6px; }
.w-64px { width: 64px; }
.w-56px { width: 56px; }
.w-220px { width: 220px; }
.ml-6 { margin-left: 6px; }
.ml-8 { margin-left: 8px; }

/* Cluster list styles used in user details rows */
.cluster-list { padding:8px; background:#fbfdff; border-radius:6px; border:1px solid #eef2ff; }
.cluster-list ul { margin:0; padding-left:18px; }
.cluster-list li { margin-bottom:6px; }
.no-reports { padding:8px; color:#666; }

/* Report view media helpers */
.rv-photo-img { max-width:100%; border-radius:6px; display:none; }
.rv-video-link { display:none; }

/* Styled select used in assign modal */
.select-styled { width:100%; padding:8px; border:1px solid #ddd; border-radius:6px; }

/* Assign modal helpers */
.build-badge { margin-top:8px; font-size:12px; color:#666; }
.forecast-play-btn { padding:6px 8px; border-radius:6px; border:1px solid #e5e7eb; background:#10b981; color:#fff; cursor:pointer; }
.forecast-day-label { min-width:110px; text-align:left; font-size:12px; color:#333; }
.forecast-day-slider { width:220px; margin-top:6px; }

/* Popup (map) content classes to replace inline styles in JS templates */
.popup-content { max-width: 320px; font-size: 14px; }
.popup-title { font-weight: 600; }
.popup-sub { font-size: 12px; color: #444; }
.popup-desc { margin-top: 6px; }
.popup-meta { margin-top: 8px; color: #111; }
.popup-photo { margin-top: 6px; }
.popup-img { max-width:100%; border-radius:6px; margin-top:6px; display:block; }
.popup-actions { margin-top:8px; display:flex; gap:8px; justify-content:space-between; }
.popup-actions .admin-view-full { padding:6px 10px; background:#3b82f6; color:#fff; border:none; border-radius:6px; cursor:pointer; }
.popup-actions .admin-assign { padding:6px 10px; background:#10b981; color:#fff; border:none; border-radius:6px; cursor:pointer; }

/* Small input utility used for compact numeric inputs */
.input-compact { padding:4px; border-radius:6px; border:1px solid #ddd; }

/* Small label utility */
.small-label { font-size:12px; color:#111; }
.text-12 { font-size:12px; color:#111; }

/* Flex column and align center helpers introduced by the HTML edits */
.flex-direction-column, .flex-col { display:flex; flex-direction:column; }
.align-center, .items-center { align-items:center; }

/* Admin session debug pre styling moved from inline */
.admin-session-debug { max-height:120px; overflow:auto; white-space:pre-wrap; display:block; }

/* Connectivity / extension warning banner */
.connectivity-banner {
    position: fixed;
    top: calc(var(--header-height) + 12px);
    left: calc(var(--sidebar-width) + 18px);
    right: 18px;
    z-index: 1400;
    background: #fff7ed; /* warm warning */
    border-left: 4px solid #f59e0b;
    color: #92400e;
    padding: 10px 14px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(2,6,23,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}
.connectivity-banner .cb-dismiss { margin-left: auto; background: transparent; border: none; cursor: pointer; color: #92400e; font-weight:700; }
.connectivity-banner.hidden { display: none !important; }


/* Ensure chart panels act like cards and canvases fill the available card height.
   This overrides earlier fixed-height rules so charts visually match other cards. */
.chart-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    /* let panel size by content but prefer a reasonable minimum */
    min-height: 360px;
}
.chart-panel .chart-canvas-wrap {
    flex: 1 1 auto;
    /* allow the wrapper to expand to fill the panel; override fixed heights */
    height: auto !important;
    min-height: 260px;
    overflow: auto; /* allow scrolling when charts exceed max available height */
    -webkit-overflow-scrolling: touch;
}
.chart-panel canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}





