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

html{
    scroll-behavior:smooth;
    font-size:15px;
    height:100%;
}

body{
    font-family:'Poppins',sans-serif;
    background:#0f172a;
    color:#e5e7eb;
    line-height:1.5;
    min-height:100vh;
    display:flex;
    flex-direction:column;
}

input,
select,
textarea {
    font-size:16px;
}

img{
    width:100%;
    display:block;
}

button{
    font-family:inherit;
    cursor:pointer;
    border:none;
    transition:.25s;
}

.topbar{
    width:100%;
    background:#111c35;
    border-bottom:1px solid rgba(255,255,255,.08);
    position:sticky;
    top:0;
    z-index:999;
}

.topbar-inner{
    width:min(94%,1400px);
    height:55px;
    margin:auto;

    display:flex;
    align-items:center;
    justify-content:space-between;
}

.brand{
    display:flex;
    align-items:center;
}

.brand-info{
    display:flex;
    flex-direction:column;
}

.brand-info span{
    font-size:1rem;
    font-weight:700;
    letter-spacing:.5px;
    color:#c6d426;
}

.topbar-actions{
    display:flex;
    align-items:center;
    gap:12px;
}

.status-chip{
    display:flex;
    align-items:center;
    gap:8px;

    padding:2px 14px;

    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.08);

    border-radius:999px;

    color:#e5e7eb;
    font-size:13px;
    font-weight:600;
}

.dot{
    width:8px;
    height:8px;
    border-radius:50%;
    background:#10b981;
    box-shadow:0 0 10px #10b981;
}

.logout-btn{
    height:28px;
    padding:0 10px;

    border-radius:10px;

    background:#ef4444;
    color:#fff;

    font-size:13px;
    font-weight:600;

    transition:.25s;
}

.logout-btn:hover{
    background:#dc2626;
    transform:translateY(-2px);
    box-shadow:0 8px 18px rgba(239,68,68,.25);
}

.properties{
    width:min(1200px,94%);
    margin-left:auto;
    margin-right:auto;
}

.properties{
    margin-top:24px;
    margin-bottom:24px;
}

.section-head{
    margin-bottom:14px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.section-head h2{
    font-size:1.45rem;
    color:#fff;
    font-weight:600;
}

.action-btn{
    background:#2563eb;
    color:#fff;
    padding:10px 22px;
    border-radius:14px;
    font-size:.92rem;
    font-weight:600;
    margin-bottom:18px;
    transition:.25s ease;
    box-shadow:0 6px 18px rgba(37,99,235,.18);
}

.action-btn:hover{
    background:#1d4ed8;
    transform:translateY(-2px);
    box-shadow:0 10px 25px rgba(37,99,235,.25);
}

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

.property-card {
    background:#16213d;
    border:1px solid rgba(255,255,255,.06);
    overflow:hidden;
    border-radius:0;
    transition:.25s;

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

.property-card:hover{
    transform:translateY(-4px);
    border-color:#2563eb;
}

.property-info {
    padding:10px;
    display:flex;
    flex-direction:column;
    flex:1;
}

.property-info h3{
    font-size:1rem;
    margin-bottom:3px;
    color:#fff;

    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.property-info p{
    color:#94a3b8;
    font-size:.82rem;
    margin-bottom:6px;
     min-height:18px;
}

.property-info span{
    display:block;
    color:#60a5fa;
    font-size:.95rem;
    font-weight:700;
    margin-bottom:10px;
    min-height:20px;
}

.admin-actions{
    display:flex;
    gap:8px;
    margin-top:auto;
}

.edit-btn,
.delete-btn{
    flex:1;
    padding:7px;
    font-size:.82rem;
    font-weight:600;
    border-radius:6px;
}

.edit-btn{
    background:#356926;
    color:#fff;
}

.edit-btn:hover{
    background:#1d4fd881;
}

.delete-btn{
    background:#dc2626;
    color:#fff;
}

.delete-btn:hover{
    background:#b91c1c;
}

.footer{
    margin-top:auto;
    background:#111c35;
    border-top:1px solid rgba(255,255,255,.05);
    text-align:center;
    padding:20px;
    color:#94a3b8;
    font-size:.85rem;
}

#noResults{
    padding:35px;
    text-align:center;
    color:#94a3b8;
}

::-webkit-scrollbar{
    width:10px;
}

::-webkit-scrollbar-track{
    background:#111827;
}

::-webkit-scrollbar-thumb{
    background:#334155;
}

::-webkit-scrollbar-thumb:hover{
    background:#475569;
}

.modal{
    position:fixed;
    inset:0;
    display:flex;
    justify-content:center;
    align-items:center;

    background:rgba(0,0,0,.55);
    backdrop-filter: blur(6px);

    visibility:hidden;
    opacity:0;
    transition:.25s ease;
    z-index:9999;
}

.modal.active{
    visibility:visible;
    opacity:1;
}

.modal-box{
    width:360px;
    max-width:92%;
    padding:22px;

    background:linear-gradient(145deg, #16213d60, #111c35);
    border:1px solid rgba(255,255,255,.08);

    border-radius:16px;
    box-shadow:0 30px 80px rgba(0,0,0,.6);

    transform:translateY(10px);
    transition:.25s ease;
}

.modal.active .modal-box{
    transform:translateY(0);
}

.modal-box h3{
    color:#fff;
    font-size:1.3rem;
    margin-bottom:8px;
    font-weight:700;
}

.modal-box p{
    color:#94a3b8;
    margin-bottom:22px;
    font-size:.9rem;
}

.modal-actions{
    display:flex;
    gap:10px;
    justify-content:flex-end;
}

.cancel-btn{
    background:#1f2a44;
    color:#cbd5e1;
    padding:10px 16px;
    border-radius:10px;
    font-weight:600;
}

.cancel-btn:hover{
    background:#263552;
}

.confirm-btn{
    background:linear-gradient(135deg, #ef4444, #dc2626);
    color:#fff;
    padding:10px 16px;
    border-radius:10px;
    font-weight:700;
    box-shadow:0 8px 20px rgba(220,38,38,.25);
}

.confirm-btn:hover{
    transform:translateY(-1px);
    box-shadow:0 10px 25px rgba(220,38,38,.35);
}

.modal-box h3::before{
    content:"⚠️ ";
}

.search-wrapper{
    margin:0 0 18px;
}

.search-input{
    width:420px;
    max-width:100%;
    height:46px;
    padding:0 16px;
    background:#16213d;
    border:1px solid rgba(255,255,255,.08);
    border-radius:8px;
    color:#fff;
    font-size:16px;
    outline:none;
    transition:.2s;
    -webkit-appearance:none;
    appearance:none;
}

.search-input::placeholder{
    color:#94a3b8;
}

.search-input:focus{
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.15);
}

.deal-badge{
    font-size:.7rem;
    font-weight:700;
    padding:4px 10px;
    border-radius:999px;
    text-transform:uppercase;
    letter-spacing:.5px;
    white-space:nowrap;
}

.image-wrapper .deal-badge{
    position:absolute;
    top:10px;
    right:10px;
    z-index:5;
    font-size:.65rem;
    font-weight:700;
    padding:4px 10px;
    border-radius:999px;
    letter-spacing:.5px;
    text-transform:uppercase;
    color:#fff;
}

.deal-badge[data-type="rent"]{
    background:rgba(37,99,235,.85);
}

.deal-badge[data-type="sale"]{
    background:rgba(34,197,94,.85);
}

@media (max-width:768px){

html{
    font-size:85%;
}

body{
    overflow-x:hidden;
}

.properties{
    width:94%;
}

.properties{
    margin:18px auto;
}

.section-head{
    margin-bottom:5px;
}

.section-head h2{
    font-size:1.2rem;
}

.action-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:auto;
    min-width:170px;
    height:42px;
    padding:0 18px;
    margin-bottom:14px;
    font-size:.85rem;
    border-radius:14px;
}

.search-wrapper{
    margin-bottom:14px;
}

.search-input{
    width:80%;
    max-width:320px;
    height:30px;
    padding:0 14px;
    font-size:16px;
    border-radius:47px;
}

.property-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
}

.property-card{
    border-radius:6px;
}

.property-info{
    padding:8px;
}

.property-info h3{
    font-size:.9rem;
    margin-bottom:2px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.property-info p{
    font-size:.76rem;
    margin-bottom:4px;
}

.property-info span{
    font-size:.85rem;
    margin-bottom:6px;
}

.admin-actions{
    gap:6px;
}

.edit-btn,
.delete-btn{
    height:30px;
    padding:0;
    font-size:.72rem;
    border-radius:5px;
}

.footer{
    padding:18px 16px;
    display:flex;
    justify-content:center;
    align-items:center;
    text-align:center;
}

.footer p{
    width:100%;
    color:#94a3b8;
    font-size:.78rem;
    line-height:1.6;
    letter-spacing:.2px;
}

.modal-box{
    width:92%;
    max-width:360px;
    padding:22px;
    border-radius:10px;
}

.modal-box h3{
    font-size:1.05rem;
}

.modal-box p{
    font-size:.85rem;
    margin-bottom:20px;
}

.modal-actions{
    gap:8px;
}

.cancel-btn,
.confirm-btn{
    height:40px;
    padding:0 18px;
    font-size:.82rem;
}

#noResults{
    padding:28px 10px;
    font-size:.9rem;
}

}

.image-wrapper{
    position:relative;
    height:116px;
}

.image-wrapper img,
.empty-image{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.empty-image{
    background:#0f172a;
}

@media (max-width:768px){

    .image-wrapper{
        height:82px;
    }

}

.meta-row {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
}

.location {
    flex:1;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    min-height:18px;
}

.price {
    white-space:nowrap;
    min-width:90px;
    text-align:right;
}

.property-card{
    max-height: 340px;
}

@media (max-width:768px){
    .property-card{
        max-height: 280px;
    }
}

.count-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-left:10px;
    padding:4px 10px;
    font-size:.75rem;
    font-weight:700;
    color:#e5e7eb;
    background:rgba(37,99,235,.18);
    border:1px solid rgba(37,99,235,.35);
    border-radius:999px;
    vertical-align:middle;
    transform: translateY(-2px);
}

.section-title{
    display:flex;
    align-items:center;
}


.section-title h2{
    display:flex;
    align-items:center;
    gap:8px;
}


.count-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    min-width:28px;
    height:22px;

    padding:0 8px;

    font-size:.7rem;
    font-weight:700;

    color:#fff;

    background:linear-gradient(
        135deg,
        #2564eb00,
        #1d4fd800
    );

    border-radius:999px;

}

@media (max-width:768px){

.section-head{
    gap:10px;
}

.action-btn{
    margin-bottom:0;
    height:38px;
    min-width:140px;
}

}

.login-page{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#eef2f7;
    font-family:Poppins,sans-serif;
}

.login-card{
    width:min(360px,92%);
    background:#5f59595a;
    padding:32px;
    border-radius:0;
    box-shadow:0 20px 50px rgba(0,0,0,.08);
    border:1px solid #e5e7eb;
}

.login-card h2{
    text-align:center;
    color:#111827;
    margin-bottom:6px;
    font-size:26px;
}

.login-card p{
    text-align:center;
    color:#6b7280;
    margin-bottom:25px;
    font-size:14px;
}

.login-card input{
    width:100%;
    height:36px;
    padding:0 15px;
    margin-bottom:14px;
    border:1px solid #dbe3ed;
    border-radius:0;
    outline:none;
    font-size:14px;
    transition:.2s;
}

.login-card input:focus{
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.12);
}

.login-card button{
    width:100%;
    height:36px;
    border:none;
    border-radius:42px;
    background:#2563eb;
    color:#fff;
    font-weight:600;
    font-size:14px;
    transition:.25s;
}

.login-card button:hover{
    background:#1d4ed8;
}

.login-error{
    margin-top:14px;
    color:#ef4444;
    text-align:center;
    font-size:13px;
}

.auth-loading{
    visibility:hidden;
}

.auth-loading #loader{
    visibility:visible;
}