/* =========================================================
   ICI DAR BOUAZZA — TABLEAU DE BORD CLIENT
   Thème premium rouge / noir / blanc
========================================================= */

.client-dashboard {
    --dash-primary: #f3073e;
    --dash-primary-dark: #d90435;
    --dash-primary-soft: rgba(243, 7, 62, 0.09);
    --dash-dark: #171719;
    --dash-dark-soft: #29292d;
    --dash-text: #37373b;
    --dash-muted: #77777d;
    --dash-border: #e7e7eb;
    --dash-surface: #fff;
    --dash-background: #f5f6f8;
    --dash-success: #18a957;
    --dash-warning: #e9a008;
    --dash-info: #2379df;
    --dash-radius: 21px;
    --dash-shadow: 0 14px 44px rgba(20, 20, 30, 0.075);

    position: relative;
    min-height: 75vh;
    padding: 42px 0 78px;
    overflow: hidden;
    color: var(--dash-text);
    background:
        radial-gradient(circle at 100% 0%, rgba(243, 7, 62, 0.075), transparent 27%),
        radial-gradient(circle at 0% 65%, rgba(20, 20, 24, 0.045), transparent 24%),
        var(--dash-background);
}

.client-dashboard *,
.client-dashboard *::before,
.client-dashboard *::after {
    box-sizing: border-box;
}

.client-dashboard > .container {
    position: relative;
    z-index: 1;
    max-width: 1320px;
}

/* =========================================================
   BARRE SUPÉRIEURE
========================================================= */

.dashboard-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.dashboard-page-title {
    margin: 0;
    color: var(--dash-dark);
    font-size: clamp(27px, 3vw, 38px);
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: -0.7px;
}

.dashboard-page-subtitle {
    margin: 7px 0 0;
    color: var(--dash-muted);
    font-size: 14.5px;
}

.dashboard-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.dashboard-toolbar .btn {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    background-color: #f3ce1b !important;
    color: #413e3e !important;
    padding: 10px 17px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.dashboard-toolbar .btn:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 11px 25px rgba(243, 7, 62, 0.30);}

.dashboard-toolbar .btn-warning {
    color: #fff;
    background: #2c2c31;
    border: 1px solid #dedee2;
    box-shadow: 0 5px 17px rgba(20, 20, 30, 0.045);
}

.dashboard-toolbar .btn-warning:hover {
    color: var(--dash-primary);
    background: #fffafb;
    border-color: rgba(243, 7, 62, 0.32);
    transform: translateY(-2px);
}

.dashboard-toolbar .btn-danger {
    color: #fff;
    background: linear-gradient(135deg, #ff174f, var(--dash-primary-dark));
    border: 0;
    box-shadow: 0 8px 20px rgba(243, 7, 62, 0.22);
}

.dashboard-toolbar .btn-danger:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 11px 25px rgba(243, 7, 62, 0.30);
}

/* =========================================================
   CARTE DU COMPTE
========================================================= */

.dashboard-account-card {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 85% 20%, rgba(243, 7, 62, 0.30), transparent 29%),
        linear-gradient(135deg, #151517 0%, #2c2c31 100%);
    border: 0 !important;
    border-radius: var(--dash-radius) !important;
    box-shadow: 0 18px 48px rgba(18, 18, 22, 0.18) !important;
}

.dashboard-account-card::before {
    content: "";
    position: absolute;
    top: -110px;
    right: -75px;
    width: 260px;
    height: 260px;
    border: 42px solid rgba(255, 255, 255, 0.055);
    border-radius: 50%;
}

.dashboard-account-card::after {
    content: "";
    position: absolute;
    bottom: -85px;
    left: -70px;
    width: 190px;
    height: 190px;
    background: rgba(243, 7, 62, 0.075);
    border-radius: 50%;
}

.dashboard-account-card .card-body {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 31px 34px;
}

.dashboard-welcome h1,
.dashboard-welcome h4 {
    margin: 0 0 9px;
    color: #fff;
    font-size: clamp(25px, 3vw, 36px);
    font-weight: 850;
    letter-spacing: -0.6px;
}

.dashboard-welcome p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

.dashboard-account-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(145px, 1fr));
    gap: 12px;
}

.dashboard-stat {
    min-width: 145px;
    padding: 15px 17px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    backdrop-filter: blur(9px);
}

.dashboard-stat span {
    display: block;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.dashboard-stat strong {
    color: #fff;
    font-size: 18px;
    font-weight: 850;
}

.dashboard-add-zone {
    position: relative;
    z-index: 1;
    padding: 0 34px 31px;
}

.dashboard-add-button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    color: #fff !important;
    background: linear-gradient(135deg, #ff174f, var(--dash-primary-dark));
    border: 0;
    border-radius: 13px;
    box-shadow: 0 10px 25px rgba(243, 7, 62, 0.28);
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.dashboard-add-button:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 14px 29px rgba(243, 7, 62, 0.36);
}

.dashboard-account-card .alert-warning {
    margin: 0;
    color: #fff1c1;
    background: rgba(233, 160, 8, 0.13);
    border: 1px solid rgba(255, 208, 94, 0.24);
    border-radius: 13px;
}

/* =========================================================
   CARTE DES ANNONCES
========================================================= */

.dashboard-list-card {
    overflow: hidden;
    background: var(--dash-surface);
    border: 1px solid var(--dash-border) !important;
    border-radius: var(--dash-radius) !important;
    box-shadow: var(--dash-shadow) !important;
}

.dashboard-list-card > .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 20px 25px;
    color: var(--dash-dark) !important;
    background: #fff !important;
    border: 0;
    border-bottom: 1px solid var(--dash-border);
    font-size: 20px;
    font-weight: 850;
}

.dashboard-list-card > .card-header::before {
    content: "";
    width: 5px;
    height: 28px;
    margin-right: 11px;
    background: var(--dash-primary);
    border-radius: 10px;
}

.dashboard-list-card > .card-body {
    padding: 0;
}

.dashboard-empty {
    padding: 48px 25px;
    color: var(--dash-muted);
    text-align: center;
}

/* =========================================================
   TABLEAU
========================================================= */

.client-dashboard .table-responsive {
    margin: 0;
    scrollbar-color: #c9c9ce transparent;
    scrollbar-width: thin;
}

.client-dashboard .table-responsive::-webkit-scrollbar {
    height: 8px;
}

.client-dashboard .table-responsive::-webkit-scrollbar-thumb {
    background: #c9c9ce;
    border-radius: 20px;
}

.client-dashboard .table {
    min-width: 1060px;
    margin: 0;
    vertical-align: middle;
    border: 0;
}

.client-dashboard .table > :not(caption) > * > * {
    padding: 16px 14px;
    border-right: 0;
    border-left: 0;
}

.client-dashboard .table thead th {
    color: #6f6f75;
    background: #f8f8fa;
    border-top: 0;
    border-bottom: 1px solid var(--dash-border);
    font-size: 11.5px;
    font-weight: 850;
    letter-spacing: 0.45px;
    text-transform: uppercase;
    white-space: nowrap;
}

.client-dashboard .table tbody td {
    color: #414146;
    background: #fff;
    border-bottom: 1px solid #eeeeF0;
    font-size: 13.5px;
}

.client-dashboard .table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: #fdfdfd;
    color: #414146;
}

.client-dashboard .table tbody tr {
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.client-dashboard .table tbody tr:hover td {
    background: #fff9fa;
}

.client-dashboard .table tbody tr:last-child td {
    border-bottom: 0;
}

.dashboard-annonce-title {
    display: block;
    max-width: 235px;
    color: var(--dash-dark);
    font-weight: 780;
    line-height: 1.4;
}

.dashboard-category {
    display: inline-flex;
    padding: 6px 10px;
    color: #4e4e53;
    background: #f1f1f3;
    border: 1px solid #e4e4e7;
    border-radius: 50px;
    font-size: 11.5px;
    font-weight: 750;
    text-transform: capitalize;
}

/* Statuts */
.dashboard-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 50px;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: capitalize;
}

.dashboard-status::before {
    content: "";
    width: 7px;
    height: 7px;
    background: currentColor;
    border-radius: 50%;
}

.dashboard-status.status-active {
    color: #087c3c;
    background: #e8f8ef;
}

.dashboard-status.status-pending,
.dashboard-status.status-en_attente {
    color: #986400;
    background: #fff5d9;
}

.dashboard-status.status-inactive,
.dashboard-status.status-refuse {
    color: #a51c3a;
    background: #ffedf1;
}

/* Images */
.dashboard-images {
    display: flex;
    max-width: 260px;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 2px 5px;
}

.annonce-img {
    display: block;
    flex: 0 0 82px;
    width: 82px;
    height: 62px;
    margin: 0;
    object-fit: cover;
    background: #ededee;
    border: 1px solid #e1e1e4;
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.annonce-img:hover {
    position: relative;
    z-index: 2;
    transform: scale(1.06);
    box-shadow: 0 8px 18px rgba(20, 20, 30, 0.16);
}

/* Actions du tableau */
.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.dashboard-actions .btn {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border: 0;
    border-radius: 9px;
    font-size: 11.5px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-actions .btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #3185ea, #1766c5);
    box-shadow: 0 5px 13px rgba(35, 121, 223, 0.20);
}

.dashboard-actions .btn-danger {
    color: #fff;
    background: linear-gradient(135deg, #ff174f, var(--dash-primary-dark));
    box-shadow: 0 5px 13px rgba(243, 7, 62, 0.20);
}

.dashboard-actions .btn:hover {
    color: #fff;
    transform: translateY(-2px);
}

/* =========================================================
   MODAL DU COMPTE
========================================================= */

.client-dashboard .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 20px;
    box-shadow: 0 25px 75px rgba(15, 15, 20, 0.25);
}

.client-dashboard .modal-header {
    padding: 21px 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--dash-dark), var(--dash-dark-soft));
    border-bottom: 0;
}

.client-dashboard .modal-title {
    font-size: 19px;
    font-weight: 850;
}

.client-dashboard .modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.85;
}

.client-dashboard .modal-body {
    padding: 25px;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 991.98px) {
    .client-dashboard {
        padding-top: 32px;
    }

    .dashboard-account-card .card-body {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-account-stats {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .client-dashboard {
        padding: 23px 0 55px;
    }

    .dashboard-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-toolbar-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-account-card,
    .dashboard-list-card {
        border-radius: 17px !important;
    }

    .dashboard-account-card .card-body {
        padding: 25px 21px;
    }

    .dashboard-add-zone {
        padding: 0 21px 25px;
    }

    .dashboard-add-button {
        width: 100%;
    }

    .dashboard-list-card > .card-header {
        min-height: 64px;
        padding: 17px 20px;
        font-size: 18px;
    }

    .client-dashboard .table > :not(caption) > * > * {
        padding: 13px 11px;
    }
}

@media (max-width: 479.98px) {
    .dashboard-page-title {
        font-size: 27px;
    }

    .dashboard-toolbar-actions,
    .dashboard-account-stats {
        grid-template-columns: 1fr;
    }

    .dashboard-toolbar .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .client-dashboard *,
    .client-dashboard *::before,
    .client-dashboard *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

