/* LitterTag - Mobile-first responsive styles */
:root {
    --green: #2D6A4F;
    --green-light: #40916C;
    --green-dark: #1B4332;
    --brown: #774936;
    --amber: #E9C46A;
    --white: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #E5E5E5;
    --gray-400: #A3A3A3;
    --gray-600: #525252;
    --gray-800: #262626;
    --error: #DC2626;
    --radius: 12px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Navigation */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--green);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-logo img { height: 36px; display: block; }
.nav-links { display: flex; gap: 16px; }
.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}
.nav-links a:hover { background: rgba(255,255,255,0.15); }

/* Main */
main { max-width: 1200px; margin: 0 auto; padding: 16px; }

/* Page header */
.page-header { margin-bottom: 24px; text-align: center; }
.page-header h1 { font-size: 1.75rem; color: var(--green-dark); margin-bottom: 4px; }
.subtitle { color: var(--gray-600); font-size: 0.95rem; }
.subtitle-lead { font-size: 1.1875rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
    transition: background 0.2s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: var(--green); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--green-dark); }
.btn-secondary { background: var(--gray-200); color: var(--gray-800); }
.btn-secondary:hover { background: var(--gray-400); }

/* Submit page */
.submit-page { max-width: 540px; margin: 0 auto; }

.submit-form {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

/* Photo upload */
.photo-upload { margin-bottom: 20px; }
.file-input-hidden { display: none; }
.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border: 2px dashed var(--gray-400);
    border-radius: var(--radius);
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s;
}
.upload-area:hover { border-color: var(--green); }
.upload-placeholder { text-align: center; padding: 24px; }
.upload-icon { width: 48px; height: 48px; color: var(--gray-400); margin-bottom: 12px; }
.upload-text { display: block; font-weight: 600; color: var(--green); font-size: 1.1rem; }
.upload-hint { display: block; color: var(--gray-400); font-size: 0.85rem; margin-top: 4px; }
.photo-preview {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: var(--radius);
}

/* Form fields */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}
.required { color: var(--error); }
.optional { color: var(--gray-400); font-weight: 400; font-size: 0.8rem; }

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    min-height: 44px;
}
input:focus, textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-submit { width: 100%; margin-top: 8px; font-size: 1.1rem; padding: 14px; }

/* Error/success messages */
.error-message {
    color: var(--error);
    text-align: center;
    margin-top: 12px;
    font-size: 0.9rem;
}

.success-card {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow);
}
.success-icon { font-size: 3rem; color: var(--green); margin-bottom: 12px; }
.success-card h2 { color: var(--green-dark); margin-bottom: 8px; }
.report-id { font-family: monospace; color: var(--gray-400); font-size: 0.8rem; margin: 12px 0; }

/* Admin page */
.admin-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.reports-list { display: flex; flex-direction: column; gap: 12px; }

.report-card {
    display: flex;
    gap: 12px;
    background: white;
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
    border: 2px solid transparent;
}
.report-card:hover { box-shadow: var(--shadow-lg); }
.report-card.selected { border-color: var(--green); }

.card-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--gray-200);
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray-400);
    font-size: 0.75rem;
}

.card-body { flex: 1; min-width: 0; }
.card-description {
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}
.card-meta { display: flex; gap: 8px; align-items: center; font-size: 0.8rem; color: var(--gray-400); }
.card-location { font-size: 0.925rem; margin-top: 4px; color: var(--gray-400); }
.card-reporter { font-weight: 500; color: var(--gray-600); }

.load-more { width: 100%; margin-top: 12px; }
.loading { text-align: center; color: var(--gray-400); padding: 16px; }
.not-found { text-align: center; color: var(--gray-400); padding: 48px; }

/* Map */
.map-container {
    width: 100%;
    height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Desktop layout */
@media (min-width: 768px) {
    main { padding: 24px; }
    .page-header h1 { font-size: 2rem; }

    .admin-layout {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .reports-panel {
        max-height: calc(100vh - 180px);
        overflow-y: auto;
    }

    .map-container {
        height: calc(100vh - 180px);
        position: sticky;
        top: 80px;
    }
}

@media (max-width: 480px) {
    .form-row { grid-template-columns: 1fr; }
    .top-nav { padding: 8px 12px; }
    .nav-logo img { height: 28px; }
}
