:root {
    --fds-primary-color: #3b82f6;
    --fds-primary-light: #dbeafe;
    --fds-text-dark: #111827;
    --fds-text-light: #6b7280;
    --fds-border-color: #e5e7eb;
    --fds-background: #f9fafb;
    --fds-white: #ffffff;
    --fds-error-color: #ef4444;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fds-main-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: fadeIn 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    background: var(--fds-white);
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--fds-border-color);
    padding: 2rem 2.5rem;
}

/* --- Desktop Pill Navigation/Tabs --- */
.fds-tabs {
    display: flex;
    background-color: var(--fds-background);
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 2.5rem;
}

.fds-tab-button {
    flex: 1;
    text-align: center;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--fds-text-light);
    text-decoration: none;
    border-radius: 8px;
    transition: color 0.3s, background-color 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.fds-tab-icon {
    display: none; /* Hidden on desktop by default */
}

.fds-tab-button:hover {
    color: var(--fds-text-dark);
}

.fds-tab-button.active {
    color: var(--fds-primary-color);
    background-color: var(--fds-white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.fds-tab-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--fds-text-dark);
    margin-bottom: 0.5rem;
}

.fds-tab-content p {
    color: var(--fds-text-light);
    margin-bottom: 2rem;
}

/* Form Section Headings */
.fds-form-section-heading {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--fds-text-dark);
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--fds-primary-light);
    grid-column: 1 / -1;
}

.fds-form-section-heading:first-of-type {
    margin-top: 0;
}

/* --- 2-COLUMN FORM LAYOUT --- */
.fds-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
}

.fds-grid-span-2 {
    grid-column: span 2 / span 2;
}

.fds-data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.fds-data-table th,
.fds-data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--fds-border-color);
}

.fds-data-table th {
    background-color: var(--fds-background);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--fds-text-light);
}

.fds-data-table tbody tr:hover {
    background-color: var(--fds-background);
}

.fds-data-table a {
    color: var(--fds-primary-color);
    text-decoration: none;
    font-weight: 500;
}

.fds-data-table a:hover {
    text-decoration: underline;
}

.fds-form-group {
    margin-bottom: 0.5rem;
}

.fds-form-group > label:first-child:not(.fds-group-label) {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #374151;
    font-size: 0.95rem;
}

.fds-group-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--fds-text-dark);
    background-color: var(--fds-background);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    display: block;
    margin-bottom: 1rem;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    border-left: 4px solid var(--fds-primary-light);
}

.fds-group-label:hover {
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.04);
    border-left-color: var(--fds-primary-color);
    transform: translateX(2px);
}

.fds-sub-label {
    margin-top: 1rem;
    font-size: 0.9rem !important;
}

.fds-form-group input[type="text"],
.fds-form-group input[type="tel"],
.fds-form-group input[type="number"],
.fds-form-group input[type="file"],
.fds-form-group textarea,
.fds-form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-size: 1rem;
}

.fds-form-group input:focus,
.fds-form-group textarea:focus,
.fds-form-group select:focus {
    outline: none;
    border-color: var(--fds-primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.fds-radio-group,
.fds-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fds-radio-group label,
.fds-checkbox-group label {
    font-weight: 500;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid var(--fds-border-color);
    border-radius: 8px;
    background-color: var(--fds-white);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s;
}

.fds-radio-group label:hover,
.fds-checkbox-group label:hover {
    background-color: var(--fds-background);
    border-color: var(--fds-primary-light);
}

.fds-form-group input[type="radio"],
.fds-form-group input[type="checkbox"] {
    margin-right: 10px;
    height: 1.1em;
    width: 1.1em;
    accent-color: var(--fds-primary-color);
}

/* --- IMPROVED SUBMIT BUTTON STYLES --- */
.fds-submit-btn {
    background: #3b82f6;
    color: #ffffff;
    padding: 0.95rem 1.75rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.15rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2rem;
}

.fds-submit-btn:hover {
    background: #2563eb;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.fds-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    background: #1e40af;
    color: #ffffff;
}

.fds-submit-btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.4);
}

/* --- MORE SPECIFIC ALERT STYLES TO AVOID CONFLICTS --- */
.fds-main-wrapper .fds-alert {
    padding: 1.25rem;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    text-align: center;
}

.fds-main-wrapper .fds-alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.fds-main-wrapper .fds-alert-error {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

.fds-main-wrapper .fds-error-list {
    background-color: #fff5f5;
    border: 1px solid #f5c2c7;
    border-radius: 8px;
    padding: 1rem 1rem 1rem 2.5rem;
    margin-top: -10px;
    margin-bottom: 20px;
    color: #842029;
}


.fds-validation-message {
    color: var(--fds-error-color);
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

/* --- DASHBOARD STYLES --- */
.fds-overview-container-new {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

@keyframes cardFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fds-stat-card-new {
    background-color: var(--fds-white);
    border: 1px solid var(--fds-border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    opacity: 0;
    transform: translateY(20px);
    animation: cardFadeInUp 0.5s forwards;
    position: relative; /* Required for icon positioning */
}

.fds-stat-card-new:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.card-icon {
    font-size: 1.75rem;
    background-color: var(--fds-primary-light);
    color: var(--fds-primary-color);
    border-radius: 8px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--fds-text-dark);
    margin: 0;
}

.card-body .stat-value-large {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--fds-text-dark);
    line-height: 1;
}

.card-body .stat-summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stat-summary-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--fds-border-color);
}

.stat-summary-list li:last-child {
    border-bottom: none;
}

.stat-summary-list li span {
    color: var(--fds-text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 10px;
}

.card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--fds-border-color);
    text-align: center;
    font-weight: 600;
    color: var(--fds-primary-color);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.fds-stat-card-new:hover .card-footer {
    color: #1d4ed8;
}

/* Modal Styles */
.fds-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 24, 39, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fds-modal-content {
    background: var(--fds-white);
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.fds-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--fds-border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.fds-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--fds-text-dark);
}

.fds-modal-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    color: var(--fds-text-light);
    transition: color 0.2s;
}

.fds-modal-close-btn:hover {
    color: var(--fds-text-dark);
}

.fds-modal-body {
    overflow-y: auto;
}

.fds-modal-body table {
    width: 100%;
    border-collapse: collapse;
}

.fds-modal-body th,
.fds-modal-body td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--fds-border-color);
    font-size: 0.95rem;
}

.fds-modal-body th {
    font-weight: 600;
    background-color: var(--fds-background);
}

.fds-modal-body tbody tr:hover {
    background-color: var(--fds-background);
}

.fds-modal-body .no-data {
    text-align: center;
    padding: 2rem;
    color: var(--fds-text-light);
}

/* --- BULK UPLOAD STYLES --- */
.fds-bulk-upload-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-top: 1.5rem;
}

.fds-upload-step {
    background-color: var(--fds-background);
    border: 1px solid var(--fds-border-color);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
}

.fds-upload-step h3 {
    margin-top: 0;
    color: var(--fds-text-dark);
}

.fds-upload-step p {
    margin-bottom: 1.5rem;
}

.step-number {
    position: absolute;
    top: -15px;
    left: 20px;
    background-color: var(--fds-primary-color);
    color: var(--fds-white);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.fds-button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.fds-button-secondary {
    background-color: var(--fds-white);
    color: var(--fds-primary-color);
    border: 1px solid var(--fds-primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.fds-button-secondary:hover {
    background-color: var(--fds-primary-light);
    color: #1d4ed8;
}

.fds-file-upload-area {
    position: relative;
    margin-bottom: 1.5rem;
}

.fds-file-upload-area input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.fds-file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    border: 2px dashed var(--fds-border-color);
    border-radius: 12px;
    background-color: var(--fds-white);
    text-align: center;
    color: var(--fds-text-light);
    transition: border-color 0.2s, background-color 0.2s;
}

.fds-file-upload-area:hover .fds-file-upload-label {
    border-color: var(--fds-primary-color);
    background-color: #f0f5ff;
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

#file-chosen-text {
    font-weight: 600;
    color: var(--fds-text-dark);
}

/* --- Navigation Visibility --- */
/* By default, show desktop nav and hide mobile nav */
.fds-mobile-nav {
    display: none;
}
.fds-desktop-nav {
    display: flex;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    /* Reverse visibility on mobile */
    .fds-desktop-nav {
        display: none;
    }
    .fds-mobile-nav {
        display: flex;
    }
    
    .fds-main-wrapper {
        min-height: 100vh;
        padding: 1.5rem 1rem 80px 1rem;
        margin: 0;
        border-radius: 0;
        border: none;
        box-shadow: none;
        display: flex;
        flex-direction: column;
    }

    .fds-tab-content {
        flex-grow: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* --- MOBILE APP-LIKE BOTTOM NAVIGATION --- */
    .fds-tabs.fds-mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        background-color: var(--fds-white);
        border-top: 1px solid var(--fds-border-color);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
        z-index: 1000;
        margin: 0;
        padding-top: 5px;
        padding-bottom: calc(5px + env(safe-area-inset-bottom));
    }

    .fds-mobile-nav .fds-tab-button {
        flex-direction: column;
        padding: 8px 5px;
        gap: 2px;
        background: none !important;
        box-shadow: none !important;
    }

    .fds-mobile-nav .fds-tab-icon {
        display: block;
        width: 24px;
        height: 24px;
    }

    .fds-mobile-nav .fds-tab-text {
        font-size: 0.7rem;
        font-weight: 500;
    }

    .fds-mobile-nav .fds-tab-button.active .fds-tab-text {
        color: var(--fds-primary-color);
        font-weight: 600;
    }

    .fds-mobile-nav .fds-tab-button.active .fds-tab-icon {
        color: var(--fds-primary-color);
    }

    .fds-form-grid {
        grid-template-columns: 1fr;
    }

    .fds-view-details-grid {
        grid-template-columns: 1fr;
    }

    .fds-grid-span-2 {
        grid-column: span 1 / span 1;
    }

    .fds-tab-content h2 {
        font-size: 1.5rem;
    }

    .fds-form-section-heading {
        font-size: 1.2rem;
        margin-top: 2.5rem;
        margin-bottom: 1rem;
    }

    .fds-data-table {
        border: none;
    }

    .fds-data-table thead {
        display: none;
    }

    .fds-data-table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--fds-border-color);
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    }

    .fds-data-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        text-align: right;
    }

    .fds-data-table td:not(:last-child) {
        border-bottom: 1px solid var(--fds-border-color);
    }

    .fds-data-table td:before {
        content: attr(data-label);
        font-weight: 600;
        text-align: left;
        padding-right: 1rem;
    }

    .fds-data-table td[data-label="Actions"] {
        justify-content: flex-end;
    }

    .fds-data-table td[data-label="Actions"] a {
        padding: 0.25rem 0.5rem;
    }

    .fds-modal-content {
        width: 95%;
        padding: 1.5rem;
        max-height: 90vh;
    }

    .fds-modal-header h3 {
        font-size: 1.25rem;
    }
    
    .fds-filter-builder h3 {
        font-size: 1.2rem;
    }

    .fds-filter-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .fds-filter-search,
    .fds-add-filter-button,
    .fds-apply-filters-btn {
        width: 100%;
    }

    #fds-dynamic-filter-area {
        grid-template-columns: 1fr;
    }
}


/* --- Styles for Disabled "No Damage" Options --- */
.fds-checkbox-group label.disabled {
    opacity: 0.65;
    cursor: not-allowed;
    background-color: #f8f9fa;
    border-style: dashed;
}

.fds-checkbox-group label.disabled:hover {
    background-color: #f8f9fa;
    border-color: var(--fds-border-color);
    transform: none;
}

/* --- Select2 UI Fixes & Enhancements --- */
.select2-container--default .select2-selection--multiple {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 4px 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--fds-primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.select2-container .select2-search--inline .select2-search__field {
    margin-top: 6px;
    font-size: 1rem;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--fds-primary-light);
    border: 1px solid var(--fds-primary-color);
    color: var(--fds-text-dark);
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    margin-top: 4px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--fds-primary-color);
    margin-right: 6px;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: var(--fds-text-dark);
}

.select2-dropdown {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* --- Dynamic Filter Builder UI --- */
.fds-filter-builder {
    padding: 1.5rem;
    background: var(--fds-background);
    border-radius: 12px;
    border: 1px solid var(--fds-border-color);
}

.fds-filter-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.fds-filter-search {
    flex-grow: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--fds-border-color);
    border-radius: 8px;
    font-size: 1rem;
}

.fds-add-filter-button,
.fds-apply-filters-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--fds-primary-color);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.fds-add-filter-button {
    background-color: var(--fds-white);
    color: var(--fds-primary-color);
}
.fds-add-filter-button:hover {
    background-color: var(--fds-primary-light);
}

.fds-apply-filters-btn {
    background-color: var(--fds-primary-color);
    color: var(--fds-white);
}
.fds-apply-filters-btn:hover {
    background-color: #2563eb;
}

#fds-dynamic-filter-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.fds-dynamic-filter-group {
    position: relative;
}

.fds-dynamic-filter-group label {
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.3rem;
}

.fds-dynamic-filter-group .select2-container .select2-search--inline .select2-search__field {
    margin-top: 0;
    height: 32px;
    line-height: 32px;
}
.fds-dynamic-filter-group .select2-selection__placeholder {
    line-height: 32px !important;
}

.fds-active-filters {
    margin-top: -1rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.fds-filter-pill {
    background: var(--fds-primary-light);
    color: var(--fds-primary-color);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.fds-filter-pill a {
    color: var(--fds-primary-color);
    text-decoration: none;
    font-weight: bold;
    opacity: 0.6;
}
.fds-filter-pill a:hover {
    opacity: 1;
}

.fds-clear-filters-link {
    font-size: 0.85rem;
    font-weight: 600;
    align-self: center;
}

.fds-remove-filter-link {
    display: block;
    text-align: right;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--fds-error-color);
    text-decoration: none;
    margin-top: 6px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.fds-remove-filter-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.fds-modal-back-btn {
    display: inline-block;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--fds-primary-color);
    cursor: pointer;
    text-decoration: none;
}
.fds-modal-back-btn:hover {
    text-decoration: underline;
}

.fds-summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 60vh;
    overflow-y: auto;
}

.fds-summary-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 0.75rem;
    border-bottom: 1px solid var(--fds-border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 6px;
}

.fds-summary-list-item:hover {
    background-color: var(--fds-background);
}

.fds-summary-list-item:last-child {
    border-bottom: none;
}

.fds-summary-list-item span {
    font-weight: 500;
    color: var(--fds-text-dark);
}

.fds-summary-list-item strong {
    font-weight: 700;
    color: var(--fds-primary-color);
    background-color: var(--fds-primary-light);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-left: 1rem;
}

.fds-loss-summary-wrapper {
    padding: 1.5rem;
    background-color: var(--fds-primary-light);
    border: 1px solid var(--fds-primary-color);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.fds-loss-summary-wrapper h3 {
    margin-top: 0;
    color: var(--fds-text-dark);
}

.fds-loss-summary-wrapper h4 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--fds-text-dark);
    font-weight: 700;
    border-bottom: 1px solid #bde0fe;
    padding-bottom: 0.5rem;
}

.fds-loss-summary-stat {
    background-color: var(--fds-white);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.fds-loss-summary-stat span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--fds-text-dark);
}

.fds-loss-summary-stat strong {
    font-size: 2rem;
    font-weight: 700;
    color: var(--fds-primary-color);
}

.fds-damage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.fds-damage-item {
    background-color: var(--fds-white);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: var(--fds-text-dark);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer;
}

.fds-damage-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.06);
    color: var(--fds-primary-color);
}

.fds-damage-count {
    background-color: var(--fds-primary-color);
    color: var(--fds-white);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 4px 10px;
    border-radius: 20px;
    margin-left: 1rem;
}

@media (max-width: 480px) {
    .fds-damage-grid {
        grid-template-columns: 1fr;
    }
}

.fds-logout-button:hover,
.fds-logout-button:focus {
    color: var(--fds-error-color);
}

.fds-results-count {
    display: inline-block;
    margin-left: 1rem;
    padding: 0.25rem 0.75rem;
    background-color: var(--fds-primary-light);
    color: var(--fds-primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 20px;
    vertical-align: middle;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fds-view-details-grid .fds-detail-item {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

.fds-detail-item:nth-child(1) { animation-delay: 0.05s; }
.fds-detail-item:nth-child(2) { animation-delay: 0.1s; }
.fds-detail-item:nth-child(3) { animation-delay: 0.15s; }
.fds-detail-item:nth-child(4) { animation-delay: 0.2s; }
.fds-detail-item:nth-child(5) { animation-delay: 0.25s; }
.fds-detail-item:nth-child(6) { animation-delay: 0.3s; }
.fds-detail-item:nth-child(7) { animation-delay: 0.35s; }
.fds-detail-item:nth-child(8) { animation-delay: 0.4s; }
.fds-detail-item:nth-child(9) { animation-delay: 0.45s; }
.fds-detail-item:nth-child(10) { animation-delay: 0.5s; }

.fds-detail-item {
    background-color: var(--fds-white);
    border: 1px solid var(--fds-border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fds-detail-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.fds-detail-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--fds-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.fds-detail-value {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--fds-text-dark);
    line-height: 1.6;
}

.fds-tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.fds-tag {
    background-color: var(--fds-primary-light);
    color: var(--fds-primary-color);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.fds-view-single-entry-wrapper h3.fds-form-section-heading {
    border-bottom-color: var(--fds-border-color);
    font-size: 1.25rem;
}

.fds-photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.fds-photo-gallery img, .fds-photo-gallery video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

@media (max-width: 600px) {
    .fds-view-details-grid {
        grid-template-columns: 1fr;
    }
}

#fds-more-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

#fds-more-menu-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--fds-white);
    z-index: 1002;
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#fds-more-menu-overlay.active {
    display: block;
}

#fds-more-menu-panel.active {
    transform: translateY(0);
}

.fds-more-menu-item {
    display: block;
    padding: 1rem;
    background-color: var(--fds-background);
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: var(--fds-text-dark);
    text-decoration: none;
    font-size: 1.1rem;
}
.fds-more-menu-item:hover {
    background-color: var(--fds-primary-light);
    color: var(--fds-primary-color);
}

.fds-card-export-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background-color: var(--fds-background);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fds-text-light);
    transition: all 0.2s ease;
    border: 1px solid var(--fds-border-color);
}

.fds-card-export-icon svg {
    width: 18px;
    height: 18px;
}

.fds-card-export-icon:hover {
    background-color: var(--fds-primary-color);
    color: var(--fds-white);
    transform: scale(1.1);
    border-color: var(--fds-primary-color);
}

/* --- Mobile Navigation Fixes --- */

/* Hide the desktop navigation on mobile screens */
@media (max-width: 768px) {
    .fds-desktop-nav {
        display: none;
    }
}

/* Ensure the mobile navigation is visible on mobile screens */
@media (min-width: 769px) {
    .fds-mobile-nav,
    #fds-more-menu-overlay,
    #fds-more-menu-panel {
        display: none;
    }
}