,/* ==========================================================
   DASHBOARD.CSS — ADMIN + AGENT ONLY (CLEAN BUILD)
   FINAL PRODUCTION VERSION — NO CONFLICTS
========================================================== */

/* ==========================================================
   ROOT VARIABLES
========================================================== */

:root{
    --primary:#2575fc;
    --secondary:#6a82fb;

    --success:#2e7d32;
    --danger:#e53935;
    --warning:#ff9800;

    --text:#222;
    --muted:#666;
    --white:#fff;
    --bg:#f4f6f9;

    --shadow:0 4px 20px rgba(0,0,0,.08);
    --radius:16px;
}

/* ==========================================================
   RESET
========================================================== */

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

body{
    font-family:Arial,sans-serif;
    background:var(--bg);
    color:var(--text);
    line-height:1.6;
}

/* ==========================================================
   DASHBOARD CONTAINER
========================================================== */

.dashboard-container{
    width:100%;
    max-width:1400px;
    margin:0 auto;
    padding:20px;
}

/* ==========================================================
   TITLE
========================================================== */

.dashboard-title{
    text-align:center;
    font-size:32px;
    font-weight:800;
    margin-bottom:30px;
}

/* ==========================================================
   MENU
========================================================== */

.dashboard-menu{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
    gap:15px;
    margin-bottom:35px;
}

.dash-btn{
    display:flex;
    align-items:center;
    justify-content:center;

    min-height:60px;

    background:linear-gradient(135deg,var(--primary),var(--secondary));
    color:#fff;

    padding:16px;
    border-radius:14px;

    font-weight:700;
    text-decoration:none;

    box-shadow:var(--shadow);

    transition:.2s ease;
}

.dash-btn:hover{
    transform:translateY(-3px);
    opacity:.95;
}

/* Pending badge */
.pending-btn{position:relative;}

.pending-badge{
    position:absolute;
    top:-8px;
    right:-8px;

    width:24px;
    height:24px;

    border-radius:50%;

    background:var(--danger);
    color:#fff;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:12px;
    font-weight:700;
}

/* ==========================================================
   STATS
========================================================== */

.stats-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:18px;
    margin-bottom:35px;
}

.stat-card{
    background:var(--white);
    padding:22px;
    border-radius:18px;
    text-align:center;
    box-shadow:var(--shadow);
}

.stat-number{
    font-size:30px;
    font-weight:800;
    color:var(--primary);
}

.stat-label{
    margin-top:8px;
    color:var(--muted);
}

/* ==========================================================
   FILTERS
========================================================== */

.filter-form{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:15px;
    margin-bottom:35px;
}

.filter-form input,
.filter-form button{
    padding:14px;
    border-radius:12px;
    font-size:14px;
}

.filter-form input{
    border:1px solid #ddd;
}

.filter-form button{
    background:var(--primary);
    color:#fff;
    border:none;
    font-weight:700;
    cursor:pointer;
}

/* ==========================================================
   PROPERTY GRID (CLEAN + MATCH PUBLIC STYLE)
========================================================== */

.property-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
    gap:22px;
    align-items:stretch;
}

/* ==========================================================
   PROPERTY CARD
========================================================== */

.property-card{
    background:var(--white);
    border-radius:16px;
    overflow:hidden;
    box-shadow:var(--shadow);

    display:flex;
    flex-direction:column;
    height:100%;

    transition:.2s ease;
}

.property-card:hover{
    transform:translateY(-4px);
    box-shadow:0 10px 25px rgba(0,0,0,.12);
}

/* ==========================================================
   MEDIA (FIXED HEIGHT — IMPORTANT)
========================================================== */
.property-image-wrap{
    width:100%;
    height:220px;
    overflow:hidden;
}

.property-image{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

/* ==========================================================
   BODY (CLEAN SPACING)
========================================================== */

.property-content{
    padding:20px;
    display:flex;
    flex-direction:column;
    flex:1;
}

.property-title{
    margin:0 0 14px;
    font-size:22px;
    line-height:1.4;
    font-weight:800;
    color:#111827;
}

.property-meta{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-bottom:14px;
}

.property-location{
    font-size:14px;
    color:#6b7280;
    margin-bottom:14px;
}

.property-price{
    margin-bottom:22px;
    font-size:28px;
    font-weight:800;
    color:#111827;
}

/* ==========================================================
   BADGES
========================================================== */


.property-type{
    display:inline-block;
    background:#eef2ff;
    color:#4338ca;
    padding:6px 12px;
    border-radius:999px;
    font-size:13px;
    font-weight:700;
}

.listing-type{
    display:inline-block;
    background:#fff3e6;
    color:#ff7a00;
    padding:6px 12px;
    border-radius:999px;
    font-size:13px;
    font-weight:700;
}

/* ==========================================================
   STATUS
========================================================== */

.status{
    display:inline-block;
    padding:6px 12px;
    border-radius:20px;
    font-size:12px;
    font-weight:700;
    margin:0;
    align-self:flex-start;
}

.status.pending{background:#fff4d6;color:#946200;}
.status.approved{background:#d4f8d4;color:#146814;}
.status.rejected{background:#ffe0e0;color:#c62828;}
.status.sold{background:#dde9ff;color:#1a56db;}

/* ==========================================================
   ACTIONS (BOTTOM LOCK)
========================================================== */

.property-actions{
    margin-top:auto;
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:10px;
}

.property-actions a,
.property-actions button{
    width:100%;
    padding:10px;
    border:none;
    border-radius:10px;
    font-weight:700;
    font-size:13px;
    text-align:center;
    cursor:pointer;
    text-decoration:none;
    transition:.2s ease;
}

.property-actions a:hover,
.property-actions button:hover{
    transform:translateY(-2px);
}
/* ==========================================================
   BUTTON COLORS (PRODUCTION SAFE)
========================================================== */

.btn-view{
    background:var(--primary);
    color:#fff;
}

.btn-edit{
    background:var(--secondary);
    color:#fff;
}

.btn-action{
    background:var(--warning);
    color:#fff;
}

.btn-delete{
    background:var(--danger);
    color:#fff;
}

/* ==========================================================
   BUTTON HOVER STATE (CONSISTENCY + UX)
========================================================== */

.btn-view:hover,
.btn-edit:hover,
.btn-action:hover,
.btn-delete:hover{
    opacity:0.9;
    transform:translateY(-1px);
    transition:0.2s ease;
}

/* ==========================================================
   BUTTON ALIGNMENT SAFETY (IMPORTANT)
========================================================== */

.property-actions a,
.property-actions button{
    display:flex;
    align-items:center;
    justify-content:center;
}

/* ==========================================================
   EMPTY STATE
========================================================== */

.empty-state{
    grid-column:1/-1;
    text-align:center;
    padding:40px;
    border-radius:16px;
    background:#fff;
    box-shadow:var(--shadow);
    color:var(--muted);
}

/* ==========================================================
   PAGINATION
========================================================== */

.pagination{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:10px;
    margin-top:35px;
}

.pagination a{
    padding:10px 14px;
    border-radius:10px;
    background:#f2f2f2;
    text-decoration:none;
    font-weight:700;
    color:#333;
}

.pagination a.active-page{
    background:var(--primary);
    color:#fff;
}

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

@media(max-width:768px){

    .dashboard-title{font-size:26px;}

    .dashboard-menu{grid-template-columns:1fr;}

    .stats-grid{grid-template-columns:1fr 1fr;}

    .property-grid{grid-template-columns:1fr;}

    .property-actions{grid-template-columns:1fr;}

    .filter-form{grid-template-columns:1fr;}
}

@media(max-width:480px){
    .stats-grid{grid-template-columns:1fr;}
    .dashboard-container{padding:12px;}
    .property-content{padding:16px;}
}

/* ==========================================================
   EDIT PROPERTY FORM
========================================================== */

.form-container{
    max-width:1000px;
    margin:30px auto;
    padding:25px;
    background:#fff;
    border-radius:16px;
    box-shadow:var(--shadow);
}

.form-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:20px;
}

.full-width{
    grid-column:1 / -1;
}

.form-container label{
    display:block;
    margin-bottom:6px;
    font-weight:600;
}

.form-container input,
.form-container select,
.form-container textarea{
    width:100%;
    padding:12px;
    border:1px solid #ddd;
    border-radius:10px;
}

.form-container textarea{
    min-height:140px;
    resize:vertical;
}

/* SMALL IMAGE PREVIEW */

.edit-preview-image{
    width:100px;
    height:70px;
    object-fit:cover;
    border-radius:6px;
    border:1px solid #ddd;
    display:block;
    margin-bottom:8px;
}

/* SMALL VIDEO PREVIEW */

.edit-preview-video{
    width:100px;
    height:70px;
    border-radius:6px;
    border:1px solid #ddd;
    display:block;
    margin-bottom:8px;
}

/* SUBMIT BUTTON */

.form-container .btn{
    width:100%;
    padding:14px;
    border:none;
    border-radius:10px;
    background:var(--primary);
    color:#fff;
    font-weight:700;
    cursor:pointer;
}

@media(max-width:768px){

    .form-grid{
        grid-template-columns:1fr;
    }

    .full-width{
        grid-column:auto;
    }
}

/* ==========================================================
   EDIT PROPERTY FORM
========================================================== */

.form-container{
    max-width:1100px;
    margin:30px auto;
    background:#fff;
    padding:30px;
    border-radius:20px;
    box-shadow:0 8px 30px rgba(0,0,0,.08);
}

.form-container h2{
    text-align:center;
    margin-bottom:25px;
    color:#222;
    font-size:28px;
    font-weight:800;
}

/* GRID */

.form-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:20px;
}

.full-width{
    grid-column:1 / -1;
}

/* LABELS */

.form-grid label{
    display:block;
    margin-bottom:8px;
    font-weight:700;
    color:#444;
}

/* INPUTS */

.form-grid input[type="text"],
.form-grid input[type="url"],
.form-grid input[type="number"],
.form-grid input[type="file"],
.form-grid select,
.form-grid textarea{
    width:100%;
    padding:12px 14px;
    border:1px solid #dcdcdc;
    border-radius:12px;
    background:#fff;
    font-size:14px;
    transition:.25s ease;
}

.form-grid textarea{
    min-height:140px;
    resize:vertical;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus{
    outline:none;
    border-color:#2575fc;
    box-shadow:0 0 0 4px rgba(37,117,252,.12);
}

/* IMAGE + VIDEO PREVIEW CARD */

.edit-preview-image,
.edit-preview-video{
    display:block;
    width:100%;
    max-width:260px;
    height:150px;
    object-fit:cover;
    border-radius:12px;
    border:1px solid #e5e7eb;
    margin-bottom:12px;
    background:#f8fafc;
    box-shadow:0 2px 10px rgba(0,0,0,.05);
}

/* BUTTON */

.btn{
    background:linear-gradient(
        135deg,
        #2575fc,
        #6a82fb
    );
    color:#fff;
    border:none;
    border-radius:12px;
    font-size:16px;
    font-weight:700;
    cursor:pointer;
    transition:.25s ease;
}

.btn:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 20px rgba(37,117,252,.25);
}

/* SUCCESS / ERROR */

.success-message{
    background:#ecfdf3;
    color:#166534;
    padding:12px;
    border-radius:10px;
    margin-bottom:20px;
    text-align:center;
}

.error-message{
    background:#fef2f2;
    color:#b91c1c;
    padding:12px;
    border-radius:10px;
    margin-bottom:20px;
    text-align:center;
}

/* MOBILE */

@media(max-width:768px){

    .form-grid{
        grid-template-columns:1fr;
    }

    .form-container{
        padding:20px;
        margin:15px;
    }

    .edit-preview-image,
    .edit-preview-video{
        max-width:100%;
        height:140px;
    }
}

