/* 
 * Community Compliance - Stylesheet
 * Mobile-first responsive design with Material Design principles
 */

/* ==================== CSS Reset & Variables ==================== */
:root {
    --primary-color: #1976d2;
    --primary-dark: #1565c0;
    --primary-light: #42a5f5;
    --secondary-color: #424242;
    --success-color: #2e7d32;
    --success-light: #e8f5e9;
    --warning-color: #f9a825;
    --warning-light: #fff8e1;
    --error-color: #c62828;
    --error-light: #ffebee;
    --info-color: #0288d1;
    --info-light: #e1f5fe;
    
    --text-primary: #212121;
    --text-secondary: #616161;
    --text-hint: #9e9e9e;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #eeeeee;
    
    --border-color: #e0e0e0;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 3px 6px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.12);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15), 0 3px 6px rgba(0,0,0,0.10);
    
    --transition: all 0.2s ease;
    
    --font-family: 'Roboto', -apple-system, system-ui, sans-serif;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==================== Typography ==================== */
h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ==================== Layout ==================== */
.main-content {
    flex: 1;
    padding: 1rem;
    max-width: 100%;
}

@media (min-width: 768px) {
    .main-content {
        padding: 2rem;
    }
}

/* ==================== Header ==================== */
.header {
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-primary);
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
    color: var(--primary-color);
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.nav {
    display: flex;
    gap: 1rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
    text-decoration: none;
}

/* ==================== Footer ==================== */
.footer {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
}

/* ==================== Flash Messages ==================== */
.flash-messages {
    max-width: 640px;
    margin: 0 auto 1rem;
}

.flash-message {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flash-error {
    background-color: var(--error-light);
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

.flash-success {
    background-color: var(--success-light);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.flash-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
    padding: 0;
    line-height: 1;
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
}

/* ==================== Home Page ==================== */
.home-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.home-hero {
    text-align: center;
    padding: 3rem 0;
}

.hero-icon {
    width: 120px;
    height: 90px;
    margin: 0 auto 1.5rem;
    color: var(--primary-color);
}

.hero-icon svg {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.feature {
    text-align: center;
    padding: 1rem;
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem;
    color: var(--primary-color);
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.feature p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ==================== Form Styles ==================== */
.form-container {
    max-width: 640px;
    margin: 0 auto;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .form-container {
        padding: 2rem;
    }
}

.page-title {
    text-align: center;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-title {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.subsection-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-group label small {
    font-weight: 400;
    color: var(--text-secondary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-primary);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.required {
    color: var(--error-color);
}

.helper-text {
    font-size: 0.8125rem;
    color: var(--text-hint);
    margin-top: 0.25rem;
}

.form-row {
    display: grid;
    gap: 1rem;
}

@media (min-width: 480px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .form-row .form-group-small {
        grid-column: auto;
    }
}

@media (min-width: 640px) {
    .form-row {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

/* Checkbox & Radio Styles */
.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-label input,
.radio-label input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-custom,
.radio-custom {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    background-color: var(--bg-primary);
}

.radio-custom {
    border-radius: 50%;
}

.checkbox-label input:checked + .checkbox-custom,
.radio-label input:checked + .radio-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-custom::after {
    content: '';
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: var(--transition);
}

.checkbox-label input:checked + .checkbox-custom::after {
    transform: rotate(45deg) scale(1);
}

.radio-custom::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: white;
    transform: scale(0);
    transition: var(--transition);
}

.radio-label input:checked + .radio-custom::after {
    transform: scale(1);
}

.checkbox-text {
    flex: 1;
}

.checkbox-text strong {
    display: block;
    margin-bottom: 0.25rem;
}

.checkbox-text small {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.radio-group {
    flex-direction: row;
    gap: 1.5rem;
}

/* Issue Options */
.issue-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.issue-checkbox {
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.issue-checkbox:has(input:checked) {
    background-color: var(--info-light);
    border: 1px solid var(--primary-color);
}

/* Conditional Fields */
.conditional-field,
.conditional-section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.conditional-section {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

/* File Upload */
.file-upload-zone {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
    border-color: var(--primary-color);
    background-color: var(--info-light);
}

.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-content {
    pointer-events: none;
}

.upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.5rem;
    color: var(--text-hint);
}

.file-preview-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
}

.file-preview-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 1rem;
}

.file-preview-size {
    color: var(--text-secondary);
    margin-right: 1rem;
}

.file-preview-remove {
    background: none;
    border: none;
    color: var(--error-color);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    font-size: 1.25rem;
}

.file-error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Evidence Section */
.evidence-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Form Errors */
.form-errors {
    background-color: var(--error-light);
    border: 1px solid var(--error-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    color: var(--error-color);
}

.form-errors ul {
    margin: 0.5rem 0 0 1.25rem;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    margin-top: 1rem;
}

@media (min-width: 480px) {
    .btn-submit {
        width: auto;
        margin-left: auto;
        display: block;
    }
}

/* ==================== Confirmation Page ==================== */
.confirmation-container {
    max-width: 640px;
    margin: 0 auto;
}

.success-header {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    color: var(--success-color);
}

.success-icon svg {
    width: 100%;
    height: 100%;
}

.success-header h1 {
    color: var(--success-color);
    margin-bottom: 0.5rem;
}

.success-header p {
    color: var(--text-secondary);
}

.summary-card {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.summary-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.summary-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.summary-section h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-hint);
    margin-bottom: 0.75rem;
}

.summary-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

@media (min-width: 480px) {
    .summary-item {
        flex-direction: row;
    }
}

.summary-item dt {
    font-weight: 500;
    min-width: 150px;
    color: var(--text-secondary);
}

.summary-item dd {
    color: var(--text-primary);
}

.issue-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.issue-tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background-color: var(--info-light);
    color: var(--info-color);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.report-id {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

/* Agencies Section */
.agencies-section {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.agencies-section > p {
    color: var(--text-secondary);
}

.agency-group {
    margin-top: 1.5rem;
}

.agency-group h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.agency-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.agency-item {
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.agency-item strong {
    display: block;
    margin-bottom: 0.25rem;
}

.agency-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.agency-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.agency-link svg {
    width: 16px;
    height: 16px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 480px) {
    .action-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

/* ==================== Login Page ==================== */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 2rem 1rem;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: var(--primary-color);
}

.login-form {
    margin-bottom: 1.5rem;
}

.login-form .form-group {
    margin-bottom: 1rem;
}

.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.back-link svg {
    width: 16px;
    height: 16px;
}

/* ==================== Admin Dashboard ==================== */
.admin-container {
    max-width: 1280px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .admin-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.admin-header h1 {
    margin-bottom: 0;
}

.admin-header p {
    margin-bottom: 0;
    color: var(--text-secondary);
}

.header-left {
    flex: 1;
}

.header-left .back-link {
    justify-content: flex-start;
    margin-bottom: 1rem;
}

/* Reports Table */
.table-container {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.reports-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.reports-table th,
.reports-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.reports-table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    background-color: var(--bg-secondary);
    position: sticky;
    top: 0;
}

.reports-table tbody tr:hover {
    background-color: var(--bg-secondary);
}

.reports-table tbody tr:last-child td {
    border-bottom: none;
}

/* Mobile Table */
@media (max-width: 800px) {
    .reports-table {
        min-width: 100%;
    }
    
    .reports-table thead {
        display: none;
    }
    
    .reports-table tbody tr {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .reports-table td {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 0;
        border: none;
    }
    
    .reports-table td::before {
        content: attr(data-label);
        font-weight: 500;
        color: var(--text-secondary);
    }
}

/* Issue & Status Badges */
.issue-badges {
    display: flex;
    gap: 0.5rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
}

.badge svg {
    width: 16px;
    height: 16px;
}

.badge-debit {
    background-color: #e3f2fd;
    color: #1976d2;
}

.badge-health {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.badge-other {
    background-color: #fff3e0;
    color: #f57c00;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-new {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status-in_review {
    background-color: #fff8e1;
    color: #f9a825;
}

.status-submitted {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.evidence-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 500;
}

.evidence-badge svg {
    width: 14px;
    height: 14px;
}

.evidence-complete {
    background-color: var(--success-light);
    color: var(--success-color);
}

.evidence-incomplete {
    background-color: var(--warning-light);
    color: var(--warning-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--text-hint);
    margin-bottom: 1rem;
}

.empty-state h2 {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-hint);
}

/* ==================== Report Detail ==================== */
.detail-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .detail-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.detail-card {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.detail-card h2 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

@media (min-width: 480px) {
    .detail-item {
        flex-direction: row;
    }
}

.detail-item dt {
    min-width: 150px;
    font-weight: 500;
    color: var(--text-secondary);
}

.detail-item dd {
    flex: 1;
}

.anonymous-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
}

.anonymous-badge svg {
    width: 20px;
    height: 20px;
}

.description-text {
    white-space: pre-wrap;
    color: var(--text-primary);
    line-height: 1.7;
}

/* Status Form */
.status-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.status-select {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.evidence-status {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* File List */
.file-category {
    margin-bottom: 1.5rem;
}

.file-category:last-child {
    margin-bottom: 0;
}

.file-category h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.file-category h3 svg {
    width: 18px;
    height: 18px;
}

.file-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
}

.file-type-badge {
    padding: 0.125rem 0.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.file-type-bank_statement {
    background-color: #7b1fa2;
}

.file-type-surcharge_sign {
    background-color: #f57c00;
}

.file-type-health_photo {
    background-color: #2e7d32;
}

.file-link {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-date {
    color: var(--text-hint);
    font-size: 0.75rem;
}

.no-files {
    color: var(--text-hint);
    font-style: italic;
}

/* Agency List Compact */
.agency-list-compact {
    list-style: disc;
    padding-left: 1.25rem;
    font-size: 0.875rem;
}

.agency-list-compact li {
    margin-bottom: 0.25rem;
}

/* ==================== Agency Summary ==================== */
.summary-content {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .summary-content {
        grid-template-columns: 2fr 1fr;
    }
}

.summary-box {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.summary-header h2 {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.summary-text-block {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1rem;
    overflow-x: auto;
}

.summary-text-block pre {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

.agencies-box {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.agencies-box h2 {
    margin-bottom: 0.5rem;
}

.agencies-box > p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--text-primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ==================== Error Page ==================== */
.error-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 2rem;
}

.error-content {
    text-align: center;
}

.error-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    color: var(--warning-color);
}

.error-icon svg {
    width: 100%;
    height: 100%;
}

.error-content h1 {
    font-size: 4rem;
    color: var(--text-hint);
    margin-bottom: 0.5rem;
}

.error-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ==================== Agency Management ==================== */
.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.admin-nav .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.agencies-table .contact-info {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.agencies-table .contact-info a,
.agencies-table .contact-info span {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
}

.agencies-table .contact-info a:hover {
    color: var(--primary-color);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
    border: none;
}

.btn-danger:hover {
    background-color: #a31919;
    color: white;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    border: none;
}

.btn-secondary:hover {
    background-color: #333;
    color: white;
}

.text-muted {
    color: var(--text-hint);
    font-size: 0.875rem;
}

.agency-form .form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .agency-form .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.agency-form .form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: var(--text-hint);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.form-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.agency-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.agency-contacts .agency-link,
.agency-contacts .agency-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    color: var(--primary-color);
}

.agency-contacts .agency-phone {
    color: var(--text-secondary);
}

.inline-email-form {
    display: inline;
    margin-left: 0.5rem;
}

.btn-email {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-email:hover {
    background-color: var(--primary-dark);
}

.email-form {
    margin-top: 1rem;
}

.email-form .form-group {
    margin-bottom: 1rem;
}

.email-form .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
}

.submission-history {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.submission-history h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.submission-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.submission-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

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

.submission-link {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
    flex: 1;
    padding: 0.5rem;
    margin: -0.5rem;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-fast);
}

.submission-link:hover {
    background-color: var(--bg-secondary);
}

.submission-agency {
    flex: 1;
    font-weight: 500;
    color: var(--primary-color);
}

.submission-date {
    color: var(--text-hint);
    font-size: 0.75rem;
}

.submission-status {
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.submission-status.status-sent {
    background-color: var(--success-light);
    color: var(--success-color);
}

.submission-status.status-pending {
    background-color: var(--warning-light);
    color: var(--warning-color);
}

.submission-status.status-failed {
    background-color: var(--error-light);
    color: var(--error-color);
}

.agency-list-compact li {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

/* ==================== Submissions Page ==================== */
.submissions-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .submissions-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    background: var(--bg-primary);
    padding: 1.25rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.response-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.response-badge.response-yes {
    background-color: var(--success-light);
    color: var(--success-color);
}

.response-badge.response-no {
    background-color: var(--bg-tertiary);
    color: var(--text-hint);
}

.status-badge.status-acknowledged {
    background-color: var(--info-light);
    color: var(--info-color);
}

.status-badge.status-investigating {
    background-color: var(--warning-light);
    color: var(--warning-color);
}

.status-badge.status-action_taken {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-badge.status-resolved {
    background-color: var(--success-light);
    color: var(--success-color);
}

.status-badge.status-closed_no_action {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
}

.status-badge.status-large {
    padding: 0.5rem 1rem;
    font-size: 1rem;
}

/* ==================== Submission Detail ==================== */
.followup-form .form-group {
    margin-bottom: 1.25rem;
}

.status-display {
    text-align: center;
    padding: 1rem 0;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--success-color);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.status-info svg {
    width: 16px;
    height: 16px;
}

.case-number-display {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    font-family: monospace;
}

.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-item {
    position: relative;
    padding-left: 1.5rem;
    padding-bottom: 1rem;
    border-left: 2px solid var(--border-color);
}

.timeline-item:last-child {
    padding-bottom: 0;
    border-left-color: transparent;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 0;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
}

.timeline-date {
    display: block;
    font-size: 0.75rem;
    color: var(--text-hint);
}

.timeline-event {
    display: block;
    font-size: 0.875rem;
}

.detail-list-compact .detail-item {
    padding: 0.25rem 0;
}

.detail-list-compact .detail-item dt {
    font-size: 0.75rem;
}

/* ==================== Public Statistics Page ==================== */
.stats-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

.stats-header {
    text-align: center;
    margin-bottom: 2rem;
}

.stats-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.stats-header p {
    color: var(--text-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stats-grid .stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary-color);
}

.stat-icon-warning {
    background: var(--warning-light);
}

.stat-icon-warning svg {
    stroke: var(--warning-color);
}

.stat-icon-health {
    background: var(--info-light);
}

.stat-icon-health svg {
    stroke: var(--info-color);
}

.stat-icon-success {
    background: var(--success-light);
}

.stat-icon-success svg {
    stroke: var(--success-color);
}

.stat-content {
    text-align: center;
}

.stat-card.stat-highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.stat-card.stat-highlight .stat-icon {
    background: rgba(255,255,255,0.2);
}

.stat-card.stat-highlight .stat-icon svg {
    stroke: white;
}

.stat-card.stat-highlight .stat-value {
    color: white;
}

.stat-card.stat-highlight .stat-label {
    color: rgba(255,255,255,0.9);
}

.stats-section {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.stats-section h2 {
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.progress-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 600px) {
    .progress-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.progress-card {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

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

.progress-label {
    font-weight: 500;
}

.progress-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-submitted {
    background: var(--primary-color);
}

.progress-resolved {
    background: var(--success-color);
}

.progress-percent {
    font-size: 0.75rem;
    color: var(--text-hint);
}

.state-chart {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.state-bar-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.state-label {
    width: 40px;
    font-weight: 500;
    font-size: 0.875rem;
}

.state-bar-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.state-bar {
    height: 24px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 4px;
    min-width: 4px;
    transition: width 0.5s ease;
}

.state-count {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.trend-chart {
    padding: 1rem 0;
}

.trend-bars {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 200px;
    gap: 0.5rem;
}

.trend-bar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.trend-bar {
    width: 100%;
    max-width: 60px;
    background: linear-gradient(180deg, var(--primary-color), var(--primary-light));
    border-radius: 4px 4px 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0.5rem;
    min-height: 24px;
    transition: height 0.5s ease;
}

.trend-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.trend-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-hint);
    white-space: nowrap;
}

.status-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    min-width: 100px;
}

.status-item .status-count {
    font-size: 1.5rem;
    font-weight: 700;
}

.stats-cta {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border-radius: var(--border-radius);
    border: 2px dashed var(--border-color);
}

.stats-cta h2 {
    margin-bottom: 0.75rem;
}

.stats-cta p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ==================== Export Page ==================== */
.export-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .export-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.export-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    text-align: center;
}

.export-card-highlight {
    border: 2px solid var(--primary-color);
    position: relative;
}

.export-card-highlight::before {
    content: 'Recommended';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.export-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.export-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--primary-color);
}

.export-card h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.export-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.export-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    text-align: left;
}

.export-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.export-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: var(--success-light);
    border-radius: 50%;
}

.export-features li::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 4px;
    height: 8px;
    border: solid var(--success-color);
    border-width: 0 2px 2px 0;
}

.export-card .btn {
    width: 100%;
    justify-content: center;
}

.export-info {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
}

.export-info h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.export-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

/* ==================== Utilities ==================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
