/* ══════════════════════════════════════════════
   ROOMI – site.css
   Font: Be Vietnam Pro (loaded in Layout)
══════════════════════════════════════════════ */

:root {
    --primary:      #ff385c;
    --primary-dark: #e0314f;
    --primary-light:#fff0f3;
    --text:         #1a1a2e;
    --text-muted:   #6b7280;
    --border:       #e5e7eb;
    --bg-light:     #f9fafb;
    --white:        #ffffff;
    --radius:       14px;
    --radius-sm:    8px;
    --shadow-sm:    0 2px 8px rgba(0,0,0,.07);
    --shadow-md:    0 8px 24px rgba(0,0,0,.11);
    --shadow-lg:    0 20px 48px rgba(0,0,0,.14);
    --transition:   .25s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Be Vietnam Pro', system-ui, sans-serif;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

.container-xl {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ──────────────────────────────────────────────
   HEADER
────────────────────────────────────────────── */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    height: 72px;
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Logo */
.site-logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity var(--transition);
}
.site-logo:hover { opacity: .85; }

/* Header search */
.header-search { flex: 1; max-width: 560px; }

.hs-wrap {
    display: flex;
    align-items: center;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), border-color var(--transition);
}
.hs-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(255,56,92,.15);
}

.hs-group {
    flex: 1;
    padding: 8px 16px;
    min-width: 0;
}
.hs-group label {
    display: block;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.hs-group input,
.hs-group select {
    width: 100%;
    border: none;
    outline: none;
    font-size: .85rem;
    font-family: inherit;
    color: var(--text);
    background: transparent;
    padding: 0;
}
.hs-group select { cursor: pointer; }

.hs-sep { width: 1px; height: 28px; background: var(--border); }

.hs-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    margin: 4px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), transform var(--transition);
    flex-shrink: 0;
}
.hs-btn:hover { background: var(--primary-dark); transform: scale(1.05); }

/* Header nav */
.header-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.hn-link {
    font-size: .85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition);
    padding: 4px 8px;
}
.hn-link:hover { color: var(--primary); }

.hn-sep { width: 1px; height: 24px; background: var(--border); }

.hn-user {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 5px;
}

.hn-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: .82rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
}
.hn-btn-outline {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}
.hn-btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}
.hn-btn-primary {
    background: var(--primary);
    color: var(--white);
    border: 2px solid var(--primary);
    box-shadow: 0 4px 14px rgba(255,56,92,.35);
}
.hn-btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255,56,92,.45);
}

/* Mobile toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text);
    cursor: pointer;
    margin-left: auto;
}

/* ──────────────────────────────────────────────
   HERO
────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=1600&q=80') center/cover no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(10,10,30,.72) 0%, rgba(10,10,30,.58) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 60px 24px 80px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.hero-text-box {
    margin-bottom: 36px;
}
.hero-title {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0,0,0,.5);
    margin-bottom: 14px;
}
.hero-sub {
    font-size: 1.05rem;
    color: rgba(255,255,255,.88);
    text-shadow: 0 2px 8px rgba(0,0,0,.4);
}

/* Hero search form */
.hero-search-bar {
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: 60px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,.25);
    max-width: 820px;
    margin: 0 auto;
}

.hsb-group {
    flex: 1;
    padding: 10px 20px;
    min-width: 0;
}
.hsb-group label {
    display: block;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.hsb-group input,
.hsb-group select {
    width: 100%;
    border: none;
    outline: none;
    font-size: .88rem;
    font-family: inherit;
    color: var(--text);
    background: transparent;
    padding: 0;
}
.hsb-group select { cursor: pointer; }

.hsb-divider { width: 1px; height: 36px; background: var(--border); flex-shrink: 0; }

.hsb-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0 28px;
    height: 100%;
    min-height: 58px;
    font-size: .9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background var(--transition);
    flex-shrink: 0;
}
.hsb-btn:hover { background: var(--primary-dark); }

/* ──────────────────────────────────────────────
   QUICK FILTERS
────────────────────────────────────────────── */
.quick-filters-section {
    padding: 20px 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 72px;
    z-index: 100;
}

.quick-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.qf-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1.5px solid var(--border);
    border-radius: 50px;
    font-size: .82rem;
    font-weight: 500;
    color: var(--text);
    background: var(--white);
    transition: all var(--transition);
    white-space: nowrap;
}
.qf-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.qf-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ──────────────────────────────────────────────
   ROOMS SECTION
────────────────────────────────────────────── */
.rooms-section {
    padding: 56px 0;
    background: var(--white);
}
.rooms-section.bg-gray-light { background: var(--bg-light); }

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 16px;
    flex-wrap: wrap;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text);
}
.section-sub {
    font-size: .9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.view-all-link {
    font-size: .88rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    transition: gap var(--transition);
}
.view-all-link:hover { gap: 8px; }

/* Sort form */
.sort-form {
    display: flex;
    gap: 10px;
    align-items: center;
}
.sort-select {
    padding: 8px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .82rem;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition);
}
.sort-select:focus { border-color: var(--primary); }

/* Room grid */
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* Room card */
.room-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
    border: 1px solid var(--border);
}
.room-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.room-img-wrap {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
}

.room-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #cbd5e1;
    background: linear-gradient(135deg, #f8f9fb 0%, #e8ecf0 100%);
    transition: transform .4s ease;
}
.room-card:hover .room-img-placeholder { transform: scale(1.05); }

/* Replace placeholder if you have real images */
.room-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.room-card:hover .room-img-wrap img { transform: scale(1.05); }

.room-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
    backdrop-filter: blur(8px);
}
.badge-available {
    background: rgba(16,185,129,.15);
    color: #065f46;
    border: 1px solid rgba(16,185,129,.3);
    background: rgba(220,252,231,.9);
}
.badge-full {
    background: rgba(254,226,226,.9);
    color: #991b1b;
    border: 1px solid rgba(248,113,113,.3);
}

.room-wishlist {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,.9);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    backdrop-filter: blur(4px);
}
.room-wishlist:hover { color: var(--primary); transform: scale(1.1); }
.room-wishlist.active { color: var(--primary); }

.room-body { padding: 16px; }

.room-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.45;
}

.room-address {
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 4px;
}
.room-address i { color: var(--primary); margin-top: 2px; flex-shrink: 0; }

.room-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.room-price { line-height: 1; }
.price-num {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
}
.price-unit {
    font-size: .78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.room-detail-btn {
    display: inline-block;
    padding: 7px 16px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50px;
    font-size: .78rem;
    font-weight: 700;
    transition: all var(--transition);
    white-space: nowrap;
}
.room-detail-btn:hover {
    background: var(--primary);
    color: var(--white);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 12px; display: block; }
.empty-state p { font-size: .95rem; }
.empty-state a { color: var(--primary); font-weight: 600; }

/* ──────────────────────────────────────────────
   CTA BANNER
────────────────────────────────────────────── */
.cta-section {
    background: linear-gradient(135deg, #ff385c 0%, #e0314f 100%);
    padding: 60px 24px;
}
.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}
.cta-inner h2 {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 8px;
}
.cta-inner p {
    color: rgba(255,255,255,.85);
    font-size: .95rem;
}
.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--white);
    color: var(--primary);
    border-radius: 50px;
    font-size: .95rem;
    font-weight: 800;
    box-shadow: 0 6px 24px rgba(0,0,0,.15);
    white-space: nowrap;
    transition: transform var(--transition), box-shadow var(--transition);
}
.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(0,0,0,.2);
    color: var(--primary-dark);
}

/* ──────────────────────────────────────────────
   FOOTER
────────────────────────────────────────────── */
.site-footer {
    background: #111827;
    color: #9ca3af;
    padding: 56px 24px 0;
}
.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
    padding-bottom: 40px;
}
.footer-brand {
    flex: 1;
    min-width: 220px;
}
.footer-brand .site-logo { color: var(--white); margin-bottom: 12px; }
.footer-brand p { font-size: .85rem; line-height: 1.6; }

.footer-links {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
}
.fl-col { display: flex; flex-direction: column; gap: 10px; }
.fl-col h5 {
    color: var(--white);
    font-size: .88rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.fl-col a {
    font-size: .82rem;
    color: #9ca3af;
    transition: color var(--transition);
}
.fl-col a:hover { color: var(--white); }

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 0;
    border-top: 1px solid #1f2937;
    font-size: .8rem;
    text-align: center;
}

/* ──────────────────────────────────────────────
   RESPONSIVE MAIN
────────────────────────────────────────────── */
@media (max-width: 900px) {
    .header-search { display: none; }
    .header-nav .hn-link { display: none; }
    .header-nav .hn-sep  { display: none; }
    .mobile-toggle { display: block; }
    .header-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0; right: 0;
        background: var(--white);
        padding: 16px 24px;
        box-shadow: var(--shadow-md);
        border-top: 1px solid var(--border);
        gap: 12px;
    }
    .header-nav.open .hn-link { display: block; }
}

@media (max-width: 640px) {
    .hero-search-bar { flex-direction: column; border-radius: var(--radius); }
    .hsb-group { width: 100%; }
    .hsb-divider { width: 100%; height: 1px; }
    .hsb-btn { width: 100%; justify-content: center; border-radius: 0 0 var(--radius) var(--radius); }

    .section-header { flex-direction: column; align-items: flex-start; }
    .room-grid { grid-template-columns: 1fr; }

    .cta-inner { flex-direction: column; text-align: center; }
    .cta-btn { width: 100%; justify-content: center; }

    .footer-inner { flex-direction: column; }
    .footer-links { flex-direction: column; gap: 24px; }
}

/* ══════════════════════════════════════════════
   AUTH PAGES (Login / Register)
══════════════════════════════════════════════ */
.auth-page {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background: linear-gradient(135deg, #fff0f3 0%, #f9fafb 60%, #fce7eb 100%);
}

.auth-card {
    background: var(--white);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 20px 60px rgba(255,56,92,.1), 0 4px 16px rgba(0,0,0,.06);
    border: 1px solid rgba(255,56,92,.08);
}

.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

    .auth-logo a {
        font-size: 1.8rem;
        font-weight: 800;
        color: var(--primary);
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

.auth-title {
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    color: var(--text);
    margin-bottom: 6px;
}

.auth-sub {
    text-align: center;
    color: var(--text-muted);
    font-size: .9rem;
    margin-bottom: 28px;
}

/* Alert */
.auth-alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.auth-alert:empty {
    display: none;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .auth-field label {
        font-size: .82rem;
        font-weight: 700;
        color: var(--text);
        text-transform: uppercase;
        letter-spacing: .04em;
    }

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

    .auth-input-wrap > i {
        position: absolute;
        left: 14px;
        color: var(--text-muted);
        font-size: .95rem;
        pointer-events: none;
    }

    .auth-input-wrap input {
        width: 100%;
        padding: 12px 44px;
        border: 1.5px solid var(--border);
        border-radius: var(--radius-sm);
        font-size: .9rem;
        font-family: inherit;
        color: var(--text);
        background: var(--white);
        outline: none;
        transition: border-color var(--transition), box-shadow var(--transition);
    }

        .auth-input-wrap input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(255,56,92,.1);
        }

        .auth-input-wrap input::placeholder {
            color: #c4c4c4;
        }

.toggle-pw {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    transition: color var(--transition);
}

    .toggle-pw:hover {
        color: var(--primary);
    }

.auth-error {
    font-size: .78rem;
    color: #dc2626;
    display: block;
    min-height: 16px;
}

/* Row (remember me + forgot) */
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .83rem;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    color: var(--text-muted);
}

    .auth-check input {
        accent-color: var(--primary);
        width: 15px;
        height: 15px;
    }

.auth-link {
    color: var(--primary);
    font-weight: 600;
    transition: opacity var(--transition);
}

    .auth-link:hover {
        opacity: .8;
    }

/* Submit button */
.auth-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: .95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255,56,92,.35);
    transition: all var(--transition);
}

    .auth-submit-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(255,56,92,.45);
    }

.auth-switch {
    text-align: center;
    font-size: .85rem;
    color: var(--text-muted);
    margin-top: 20px;
}

    .auth-switch a {
        color: var(--primary);
        font-weight: 700;
    }

/* Role options (Register) */
.role-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.role-option {
    cursor: pointer;
}

    .role-option input[type="radio"] {
        display: none;
    }

.role-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: all var(--transition);
    background: var(--bg-light);
}

    .role-box i {
        font-size: 1.8rem;
        color: var(--text-muted);
    }

    .role-box span {
        font-size: .88rem;
        font-weight: 700;
        color: var(--text);
    }

    .role-box small {
        font-size: .72rem;
        color: var(--text-muted);
    }

    .role-box.selected,
    .role-option input:checked + .role-box {
        border-color: var(--primary);
        background: var(--primary-light);
    }

        .role-box.selected i {
            color: var(--primary);
        }

/* Toast notification */
.toast-success {
    position: fixed;
    top: 90px;
    right: 24px;
    background: #10b981;
    color: white;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: .9rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(16,185,129,.35);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideInRight .3s ease, fadeOut .4s ease 3s forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* ── User Dropdown ── */
.user-dropdown {
    position: relative;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 50px;
    padding: 5px 12px 5px 5px;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

    .user-dropdown-btn:hover {
        border-color: var(--primary);
    }

.user-avatar {
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 700;
}

.user-name {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 500;
    overflow: hidden;
    animation: dropIn .2s ease;
}

    .user-dropdown-menu.show {
        display: block;
    }

@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.udm-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    font-size: .85rem;
    color: var(--text);
    text-decoration: none;
    transition: background var(--transition);
    width: 100%;
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
}

    .udm-item:hover {
        background: var(--bg-light);
    }

    .udm-item i {
        color: var(--text-muted);
        font-size: .9rem;
    }

.udm-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

.udm-logout {
    color: #dc2626;
}

    .udm-logout i {
        color: #dc2626;
    }

/* ══════════════════════════════════════════════
   ADMIN CSS
══════════════════════════════════════════════ */
.admin-page {
    padding: 32px 0 60px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-title {
    font-size: 1.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .admin-title i {
        color: var(--primary);
    }

.admin-sub {
    color: var(--text-muted);
    font-size: .9rem;
    margin-top: 4px;
}

.admin-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition);
}

    .admin-nav-btn:hover {
        background: var(--primary-dark);
        color: white;
        transform: translateY(-1px);
    }

/* Stats */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.stat-label {
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Admin card */
.admin-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

    .admin-card-header h3 {
        font-size: 1rem;
        font-weight: 700;
    }

    .admin-card-header a {
        font-size: .82rem;
        color: var(--primary);
        font-weight: 600;
    }

/* Admin table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

    .admin-table th {
        padding: 10px 16px;
        background: var(--bg-light);
        font-size: .75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: var(--text-muted);
        text-align: left;
        white-space: nowrap;
    }

    .admin-table td {
        padding: 12px 16px;
        border-top: 1px solid var(--border);
        font-size: .85rem;
        vertical-align: middle;
    }

    .admin-table tr:hover td {
        background: #fafafa;
    }

/* 2-col grid */
.admin-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Role badge */
.admin-role-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: .72rem;
    font-weight: 700;
}

.role-admin {
    background: #fef3c7;
    color: #d97706;
}

.role-chunha {
    background: #eff6ff;
    color: #3b82f6;
}

.role-user {
    background: #f0fdf4;
    color: #16a34a;
}

.admin-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: .72rem;
    font-weight: 700;
    background: var(--bg-light);
    color: var(--text-muted);
}

/* ========================================= */
/* BẢN CHỮA LỖI ĐIỆN THOẠI CHUẨN XÁC NHẤT   */
/* ========================================= */
@media (max-width: 992px) {
    /* --- TRỊ DỨT ĐIỂM THANH TÌM KIẾM/BỘ LỌC BÁM DÍNH --- */
    .quick-filters-section,
    aside.filter-sidebar,
    div[style*="position:sticky"],
    div[style*="position: sticky"] {
        position: static !important;
        top: auto !important;
        z-index: 1 !important;
        height: auto !important;
        margin-top: 16px !important;
    }

    /* 1. TRỊ TRANG DANH SÁCH PHÒNG (Phá vỡ lệnh ép 2 cột inline) */
    .rooms-layout {
        grid-template-columns: 1fr !important; /* Ép rớt xuống 1 cột */
        gap: 16px !important;
    }

    /* 2. TRỊ TRANG CHI TIẾT PHÒNG (Phá vỡ lệnh ép 1fr 340px inline) */
    div[style*="grid-template-columns:1fr 340px"],
    div[style*="grid-template-columns: 1fr 340px"] {
        grid-template-columns: 1fr !important; /* Ép hộp giá rớt xuống dưới */
    }

    /* Thả nổi hộp giá tiền */
    aside.filter-sidebar,
    div[style*="position:sticky"],
    div[style*="position: sticky"] {
        position: relative !important;
        top: auto !important;
        margin-top: 16px !important;
    }

    /* 3. TRỊ BẢNG THÔNG BÁO LỆCH (Bắt thẳng ID #notiMenu) */
    #notiMenu {
        position: fixed !important;
        top: 75px !important; /* Nằm ngay dưới header */
        left: 16px !important; /* Cách lề trái 16px */
        right: 16px !important; /* Cách lề phải 16px */
        width: auto !important; /* Tự co giãn vừa màn hình */
        margin: 0 !important;
    }

    /* 4. TRỊ LỖI TRANG ĐẶT PHÒNG CỦA TÔI & QUẢN LÝ TỪ XA */
    /* Ép thẻ phòng rớt dòng thay vì dùng grid cứng */
    .bk-item {
        display: flex !important;
        flex-wrap: wrap !important;
    }
    
    /* Cục Ảnh: Ép phình to 100% */
    .bk-img {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        height: 220px !important;
    }
    
    /* Cục Thông tin: Chiếm 100% bề ngang */
    .bk-info {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding-bottom: 8px !important;
    }
    
    /* Cục Nút bấm (bên phải): Rớt xuống dưới cùng, dàn ngang ra */
    .bk-right {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        border-left: none !important;
        border-top: 1px solid var(--border) !important;
        padding-top: 12px !important;
        justify-content: flex-start !important;
    }
    
    /* Chỉnh nút bấm dàn đều nhau */
    .bk-action-btn {
        width: auto !important;
        flex: 1 !important;
        min-width: 45% !important; 
    }
/* Phá vỡ mọi cấu trúc chia cột ngang (grid) trong 2 trang này */
    main div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important; /* Ép tất cả rớt thành 1 cột dọc */
        gap: 16px !important;
    }

  
    /* Trị dứt điểm cái hộp "Thông tin khách thuê" bị đè/lơ lửng */
   main div[style*="position: absolute"],
    main div[style*="position:absolute"],
    main div[style*="margin-left: -"],
    main div[style*="transform: translate"] {
        position: relative !important; /* Hủy bay lơ lửng, ép xuống đất */
        margin-left: 0 !important;
        margin-top: 16px !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        width: 100% !important;
    
    }
/* ========================================= */
    /* 6. ĐẠI TU GIAO DIỆN ADMIN TRÊN ĐIỆN THOẠI */
    /* ========================================= */
    
    /* Bẻ dọc Header và thanh công cụ Admin */
    .admin-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    .admin-header > div:last-child {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
    }
    .admin-nav-btn {
        flex: 1 1 auto !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: nowrap !important;
    }

    /* Bẻ dọc thanh tìm kiếm Admin */
    .admin-page form[style*="display:flex"],
    .admin-page form[style*="display: flex"] {
        flex-wrap: wrap !important;
    }
    .admin-page form input[name="search"] {
        flex: 1 1 100% !important; /* Ô tìm kiếm chiếm trọn 1 dòng */
        margin-bottom: 8px !important;
    }

    /* TRỊ LỖI BẢNG BỊ BÓP NGHẸT: Cho phép vuốt ngang bảng */
    .admin-card {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch; /* Mượt mà trên iOS */
    }
    .admin-table {
        min-width: 750px !important; /* Ép bảng giữ form đẹp, dư thì vuốt sang phải xem */
    }

    /* Bố cục lưới Dashboard Admin */
    .admin-grid-2 {
        grid-template-columns: 1fr !important;
    }
    .admin-stats {
        grid-template-columns: 1fr 1fr !important; /* 2 cục thống kê 1 hàng */
    }
}
@media (max-width: 480px) {
    .admin-stats {
        grid-template-columns: 1fr !important; /* Điện thoại nhỏ xíu thì 1 cục thống kê 1 hàng */
    }
}

/* ========================================= */
/* ẨN QUẢNG CÁO SOMEE TRÊN MỌI THIẾT BỊ      */
/* ========================================= */
div[style*="position: fixed; z-index: 2147483647"],
div[style*="position:absolute;z-index:2147483647;visibility:visible;"],
center > a[href*="somee.com"],
center > b {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
}