/* =========================================================
   CAMU SERVICES
   GESTION DES SIGNALEMENTS
========================================================= */

.admin-main {
    padding-bottom: 50px;
}


/* =========================================================
   TOPBAR
========================================================= */

.admin-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.admin-topbar h1 {
    margin: 0 0 6px;
}

.admin-topbar p {
    margin: 0;
    color: #6b7280;
}


/* =========================================================
   BOUTONS
========================================================= */

.admin-refresh-btn,
.report-reset-btn,
.report-primary-btn,
.report-secondary-btn {

    border: 1px solid #e5e7eb;

    background: #fff;

    border-radius: 10px;

    min-height: 42px;

    padding: 0 15px;

    cursor: pointer;

    font-weight: 700;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;
}


.admin-refresh-btn:hover,
.report-reset-btn:hover,
.report-secondary-btn:hover {

    background: #f9fafb;

}


/* =========================================================
   MESSAGE
========================================================= */

.admin-report-message {

    margin-bottom: 18px;

    padding: 13px 15px;

    border: 1px solid #bbf7d0;

    background: #ecfdf3;

    color: #166534;

    border-radius: 10px;

    font-weight: 600;

}


/* =========================================================
   STATISTIQUES
========================================================= */

.report-summary {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 16px;

    margin-bottom: 20px;

}


.report-summary-card {

    background: #fff;

    border: 1px solid #e5e7eb;

    border-radius: 14px;

    padding: 18px;

    display: flex;

    align-items: center;

    gap: 13px;

}


.report-summary-icon {

    width: 44px;

    height: 44px;

    border-radius: 12px;

    display: grid;

    place-items: center;

    background: #f3f4f6;

    color: #374151;

    flex: 0 0 auto;

}


.report-summary-card.pending .report-summary-icon {
    background: #fff7ed;
    color: #c2410c;
}

.report-summary-card.handled .report-summary-icon {
    background: #ecfdf3;
    color: #15803d;
}


.report-summary-card span {

    display: block;

    color: #6b7280;

    font-size: .88rem;

    margin-bottom: 4px;

}


.report-summary-card strong {

    font-size: 1.55rem;

}


/* =========================================================
   OUTILS
========================================================= */

.report-tools {

    display: grid;

    grid-template-columns:
        1fr 190px auto;

    gap: 10px;

    padding: 14px;

    background: #fff;

    border: 1px solid #e5e7eb;

    border-radius: 14px;

    margin-bottom: 13px;

}


.report-search {

    position: relative;

}


.report-search i {

    position: absolute;

    left: 13px;

    top: 50%;

    transform: translateY(-50%);

    color: #9ca3af;

}


.report-search input,
.report-tools select {

    width: 100%;

    height: 44px;

    border: 1px solid #d1d5db;

    border-radius: 10px;

    background: #fff;

    padding: 0 12px;

    outline: none;

}


.report-search input {

    padding-left: 38px;

}


.report-search input:focus,
.report-tools select:focus {

    border-color: #16a34a;

}


/* =========================================================
   RÉSULTATS
========================================================= */

.report-results-line {

    color: #6b7280;

    font-size: .9rem;

    margin:
        0 2px 12px;

}


/* =========================================================
   LISTE
========================================================= */

.admin-reports-list {

    display: grid;

    gap: 12px;

}


/* =========================================================
   CARTE SIGNALEMENT
========================================================= */

.admin-report-card {

    background: #fff;

    border: 1px solid #e5e7eb;

    border-radius: 14px;

    padding: 17px;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr) auto;

    gap: 18px;

}


.admin-report-card.is-handled {

    opacity: .82;

}


.report-card-main {

    min-width: 0;

}


.report-card-top {

    display: flex;

    align-items: flex-start;

    gap: 10px;

    justify-content: space-between;

}


.report-card-title {

    margin: 0;

    font-size: 1.02rem;

    word-break: break-word;

}


/* =========================================================
   STATUT
========================================================= */

.report-status {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    border-radius: 999px;

    padding: 6px 10px;

    font-size: .78rem;

    font-weight: 800;

    white-space: nowrap;

}


.report-status.pending {

    color: #9a3412;

    background: #ffedd5;

}


.report-status.handled {

    color: #166534;

    background: #dcfce7;

}


/* =========================================================
   MOTIF
========================================================= */

.report-reason {

    margin: 9px 0 8px;

    font-weight: 700;

    color: #374151;

}


/* =========================================================
   INFORMATIONS
========================================================= */

.report-meta {

    display: flex;

    flex-wrap: wrap;

    gap: 8px 16px;

    color: #6b7280;

    font-size: .84rem;

}


.report-meta span {

    display: inline-flex;

    align-items: center;

    gap: 6px;

}


/* =========================================================
   ACTIONS
========================================================= */

.report-card-actions {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 8px;

    flex-wrap: wrap;

}


.report-card-actions button {

    min-height: 38px;

    border-radius: 9px;

    border: 1px solid #e5e7eb;

    background: #fff;

    padding: 0 11px;

    cursor: pointer;

    font-weight: 700;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

}


.report-handle-btn {

    color: #166534;

    border-color: #bbf7d0 !important;

    background: #f0fdf4 !important;

}


.report-delete-btn {

    color: #b91c1c;

    border-color: #fecaca !important;

    background: #fff5f5 !important;

}


/* =========================================================
   ÉTATS
========================================================= */

.admin-report-state {

    min-height: 230px;

    background: #fff;

    border: 1px dashed #d1d5db;

    border-radius: 14px;

    display: grid;

    place-items: center;

    align-content: center;

    gap: 8px;

    text-align: center;

    color: #6b7280;

}


.admin-report-state i {

    font-size: 1.7rem;

}


.admin-report-state h2,
.admin-report-state p {

    margin: 0;

}


.admin-report-state h2 {

    color: #374151;

    font-size: 1.1rem;

}


.admin-report-modal[hidden],
#reportsEmpty[hidden],
#reportsLoading[hidden] {

    display: none !important;

}


/* =========================================================
   MODALE
========================================================= */

.admin-report-modal {

    position: fixed;

    inset: 0;

    z-index: 3000;

    display: grid;

    place-items: center;

    padding: 18px;

}


.admin-report-modal-backdrop {

    position: absolute;

    inset: 0;

    background:
        rgba(17, 24, 39, .58);

}


.admin-report-modal-dialog {

    position: relative;

    width:
        min(650px, 100%);

    max-height:
        min(720px, 92vh);

    overflow: auto;

    background: #fff;

    border-radius: 16px;

    box-shadow:
        0 20px 60px rgba(0,0,0,.2);

}


.admin-report-modal-header {

    padding: 19px 20px;

    border-bottom:
        1px solid #e5e7eb;

    display: flex;

    justify-content: space-between;

    gap: 15px;

}


.modal-kicker {

    color: #6b7280;

    font-size: .78rem;

    font-weight: 700;

}


.admin-report-modal-header h2 {

    margin: 3px 0 0;

    font-size: 1.2rem;

}


.admin-report-modal-close {

    width: 38px;

    height: 38px;

    border: 0;

    border-radius: 9px;

    background: #f3f4f6;

    cursor: pointer;

    font-size: 1.5rem;

}


.admin-report-modal-content {

    padding: 20px;

}


.report-detail-grid {

    display: grid;

    gap: 14px;

}


.report-detail-item {

    padding: 13px;

    background: #f9fafb;

    border: 1px solid #eef0f2;

    border-radius: 10px;

}


.report-detail-label {

    display: block;

    color: #6b7280;

    font-size: .78rem;

    margin-bottom: 5px;

    font-weight: 700;

}


.report-detail-value {

    color: #111827;

    word-break: break-word;

    white-space: pre-wrap;

}


.admin-report-modal-actions {

    padding: 15px 20px;

    border-top:
        1px solid #e5e7eb;

    display: flex;

    justify-content: flex-end;

    gap: 9px;

}


.report-primary-btn {

    border-color: #16a34a;

    background: #16a34a;

    color: #fff;

}


.report-primary-btn:hover {

    background: #15803d;

}


/* =========================================================
   TABLETTE
========================================================= */

@media (max-width: 900px) {

    .report-summary {

        grid-template-columns: 1fr;

    }


    .report-tools {

        grid-template-columns:
            1fr 1fr;

    }


    .report-reset-btn {

        grid-column:
            1 / -1;

    }


    .admin-report-card {

        grid-template-columns: 1fr;

    }


    .report-card-actions {

        justify-content: flex-start;

        width: 100%;

    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .admin-topbar {

        align-items: stretch;

        flex-direction: column;

    }


    .admin-refresh-btn {

        width: 100%;

    }


    .report-tools {

        grid-template-columns: 1fr;

    }


    .report-reset-btn {

        grid-column: auto;

        width: 100%;

    }


    .admin-report-card {

        padding: 14px;

    }


    .report-card-top {

        flex-direction: column;

    }


    .report-card-actions {

        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

    }


    .report-card-actions button {

        width: 100%;

    }


    .report-card-actions
    .report-delete-btn {

        grid-column:
            1 / -1;

    }


    .admin-report-modal {

        padding: 10px;

        align-items: end;

    }


    .admin-report-modal-dialog {

        max-height: 88vh;

        border-radius:
            15px 15px 10px 10px;

    }


    .admin-report-modal-actions {

        flex-direction:
            column-reverse;

    }


    .admin-report-modal-actions button {

        width: 100%;

    }

}


/* =========================================================
   PETIT MOBILE
========================================================= */

@media (max-width: 380px) {

    .report-card-actions {

        grid-template-columns: 1fr;

    }


    .report-card-actions
    .report-delete-btn {

        grid-column: auto;

    }

}
