:root { 
    --primary-color: #0c3359; 
    --primary-light: #e6f0f9; 
    --secondary-color: #f8f9fa; 
    --accent-color: #c5a47e; 
    --text-main: #333333; 
    --text-muted: #6c757d; 
    --card-shadow: 0 10px 20px rgba(0,0,0,0.05); 
    --card-radius: 12px; 
    --input-radius: 8px; 
}
body.rent-mode { --primary-color: #d35400; --primary-light: #fcece0; --accent-color: #27ae60; }
.rent-only { display: none; } .sale-only { display: block; }
body.rent-mode .rent-only { display: block; } body.rent-mode .sale-only { display: none; }
body.rent-mode .hidden-on-rent { display: none !important; }
body { background-color: #f8f9fa; font-family: 'Inter', sans-serif; color: var(--text-main); font-size: 0.95rem; padding-bottom: 80px; transition: 0.3s; }
.hidden { display: none !important; } .capitalize { text-transform: capitalize; }
h1, h2, h3, h4, h5, h6, .brand-title { font-family: 'Montserrat', sans-serif; }

#login-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, var(--primary-color) 0%, #1a4a7b 100%); z-index: 9999; display: flex; justify-content: center; align-items: center; }
.login-box { background: rgba(255, 255, 255, 0.98); padding: 40px; border-radius: 20px; width: 90%; max-width: 420px; box-shadow: 0 20px 40px rgba(0,0,0,0.2); text-align: center; }
.brand-title { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 5px; font-weight: 800; }
.container-fluid { max-width: 1200px; padding: 20px; }
.card-section { background: #fff; border-radius: var(--card-radius); border: none; box-shadow: var(--card-shadow); margin-bottom: 24px; overflow: hidden; transition: transform 0.2s; }
.card-header-custom { background: #fff; padding: 20px 24px; border-bottom: 1px solid #edf2f7; font-weight: 700; color: var(--primary-color); display: flex; align-items: center; justify-content: space-between; }
.card-body-custom { padding: 24px; }
label { font-weight: 600; font-size: 0.8rem; color: #7f8c8d; margin-bottom: 6px; text-transform: uppercase; }
.form-control, .form-select { border-radius: var(--input-radius); border: 1px solid #dee2e6; padding: 10px 14px; font-size: 0.95rem; transition: all 0.2s; }
.form-control:focus, .form-select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(12, 51, 89, 0.1); }
.btn { border-radius: 8px; font-weight: 600; padding: 10px 18px; transition: all 0.2s; }
.btn-primary { background-color: var(--primary-color); border: none; }
.btn-primary:hover { background-color: #082440; transform: translateY(-1px); }
.btn-action { padding: 6px 12px; font-size: 0.85rem; }

#main-nav { padding: 1rem 1.5rem !important; }
#main-nav .navbar-brand { font-size: 1.3rem; margin-right: 2rem; }
#main-nav .navbar-nav { flex-wrap: wrap !important; gap: 0.75rem; line-height: 1.6; }
#main-nav .nav-item { display: inline-block; }
#main-nav .nav-link { font-size: 0.95rem; padding: 0.6rem 1.2rem; border-radius: 8px; transition: 0.2s; white-space: nowrap; }
#main-nav .nav-link:hover { background: rgba(255,255,255,0.15); }

@media all and (min-width: 992px) {
    .navbar .nav-item .dropdown-menu { display: none; margin-top: 0; }
    .navbar .nav-item:hover > .dropdown-menu { display: block; }
}
@media (max-width: 991px) {
    #main-nav .nav-item { display: block; width: 100%; margin-bottom: 5px; }
    #main-nav .dropdown-menu { display: none; position: static; background: rgba(0,0,0,0.05); border: none; box-shadow: none !important; padding-left: 1rem; }
    #main-nav .dropdown-menu.show { display: block; }
    #main-nav .dropdown-item { padding: 10px 15px; border-radius: 5px; }
    #main-nav .dropdown-item:hover { background: rgba(0,0,0,0.1); }
}

.result-card { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 16px; border: 1px solid #edf2f7; box-shadow: 0 4px 10px rgba(0,0,0,0.04); position: relative; transition: all 0.3s; cursor: pointer; }
.result-card:hover { transform: translateY(-4px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); border-color: var(--accent-color); }
.result-card.sold { background-color: #fff5f5; border-color: #feb2b2; }
.result-card.sold::after { content: "ĐÃ GIAO DỊCH"; position: absolute; right: 20px; top: 20px; color: #c0392b; font-weight: 800; border: 2px solid #c0392b; padding: 4px 10px; border-radius: 6px; transform: rotate(15deg); opacity: 0.3; font-size: 0.7rem; }
.unit-code { font-size: 1.1rem; font-weight: 800; color: var(--primary-color); font-family: 'Montserrat', sans-serif; }
.unit-price { font-size: 1.3rem; font-weight: 800; color: var(--accent-color); }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; font-size: 0.85rem; color: var(--text-muted); }
.info-item i { color: var(--accent-color); margin-right: 5px; }

.top-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.top-table tr { background: #fff; transition: 0.2s; cursor: pointer; }
.top-table tr:hover { transform: scale(1.01); background: var(--primary-light); }
.top-table td { padding: 12px 16px; border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.gallery-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: 0.3s; }
.btn-dl-float { position: absolute; bottom: 5px; right: 5px; width: 30px; height: 30px; border-radius: 50%; background: white; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #333; }
.detail-label { font-size: 0.8rem; color: #7f8c8d; text-transform: uppercase; font-weight: 600; margin-top: 10px; }
.detail-value { font-size: 1rem; color: #2c3e50; font-weight: 500; border-bottom: 1px dashed #ecf0f1; padding-bottom: 4px; margin-bottom: 12px; }
.price-tag-lg { font-size: 1.6rem; color: var(--accent-color); font-weight: 800; }
#editor-container, #seo-editor-container { height: 400px; background: #fff; }

.hover-zoom { transition: transform 0.2s ease; cursor: pointer; }
.hover-zoom:hover { transform: scale(1.02); }

@media (max-width: 768px) { .container-fluid { padding: 10px; } .card-header-custom { flex-direction: column; align-items: flex-start; gap: 10px; } .info-grid { grid-template-columns: 1fr 1fr; } }
/* Đổi màu Header cho chế độ CHUYỂN NHƯỢNG (thay mã màu bạn muốn vào) */
#main-nav.bg-primary {
    background-color: #da4b4b !important; 
}

/* Đổi màu Header cho chế độ CHO THUÊ (cái màu đỏ trong ảnh của bạn) */
#main-nav.bg-danger {
    background-color: #d38048f8 !important; /* Đổi mã màu #ff6600 thành màu cam/đỏ bạn thích */
}