@import url('design-system.css');

:root {
    --primary: #C9A050;
    --dark: #3D2817;
    --light: #F5F1E8;
    --white: #ffffff;
}

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-serif,
.logo-wordmark,
.section-title h2 {
    font-family: 'Playfair Display', serif;
}

/* Header */

header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: 0.3s;
    height: 80px;
}

header.scrolled {
    background: rgba(42, 24, 16, 0.95);
    backdrop-filter: blur(5px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* Container chứa các nút bấm */
.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Language Toggle Button */

#lang-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1.5px solid rgba(201, 160, 80, 0.55);
    border-radius: 20px;
    padding: 5px 13px 5px 10px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--white, #fff);
    transition: background 0.25s, border-color 0.25s, color 0.25s;
    white-space: nowrap;
    flex-shrink: 0;
}

#lang-toggle-btn:hover {
    background: rgba(201, 160, 80, 0.18);
    border-color: var(--primary, #C9A050);
    color: var(--primary, #C9A050);
}

#lang-toggle-btn .lang-flag {
    font-size: 14px;
    line-height: 1;
}

#lang-toggle-btn .lang-label {
    line-height: 1;
}

/* Scrolled header — keep button readable against dark bg */
header.scrolled #lang-toggle-btn {
    border-color: rgba(201, 160, 80, 0.7);
}

/* On non-scrolled transparent header (home page hero) */
#main-header:not(.scrolled) #lang-toggle-btn {
    border-color: rgba(255, 255, 255, 0.45);
    color: rgba(255, 255, 255, 0.9);
}

#main-header:not(.scrolled) #lang-toggle-btn:hover {
    border-color: var(--primary, #C9A050);
    color: var(--primary, #C9A050);
}

/* Hide on very small screens — optional, remove if you want it always visible */
@media (max-width: 480px) {
    #lang-toggle-btn .lang-label {
        display: none;
    }
}

/* Nút SIGN IN (Dạng viền mảnh) */
.btn-nav-outline {
    padding: 0.6rem 1.5rem;
    border: 1.5px solid var(--white);
    color: var(--white);
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

/* Khi cuộn chuột xuống, đổi màu viền nút Sign In thành màu vàng gold */
header.scrolled .btn-nav-outline {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-nav-outline:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Nút BOOK NOW (Dạng khối màu Gold) */
.btn-nav-primary {
    padding: 0.6rem 1.5rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.btn-nav-primary:hover {
    background: #B8941E;
    /* Màu vàng đậm hơn một chút khi hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 160, 80, 0.3);
}

.logo-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--white);
    transition: opacity 0.25s;
}

.logo-link:hover {
    opacity: 0.92;
}

.logo-img {
    width: 48px;
    height: 48px;
    display: block;
    flex-shrink: 0;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.logo-wordmark {
    font-family: 'Inter', sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--white);
    white-space: nowrap;
}

@media (max-width: 900px) {
    .logo-wordmark {
        display: none;
    }
}

.desktop-nav a {
    color: var(--white);
    text-decoration: none;
    margin: 0 15px;
    font-size: 14px;
    letter-spacing: 1px;
    transition: 0.3s;
}

.desktop-nav a:hover {
    color: var(--primary);
}

.btn-book {
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    padding: 8px 20px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-book:hover {
    background: var(--primary);
    color: var(--white);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
}

/* ==================== MODAL REGISTER & LOGIN ==================== */
/* Lớp nền mờ phía sau */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active, 
#loginModal.active, 
#registerModal.active,
#forgotPasswordModal.active {
    display: flex !important;
    opacity: 1;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 24, 40, 0.85);
    backdrop-filter: blur(10px);
}

/* Khung chứa Form */
.modal-container {
    position: relative;
    width: 95%;
    max-width: 600px;
    height: auto;
    max-height: 98vh;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 2001;
}





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

/* Nút đóng Modal */
.modal-close {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: #f3f4f6;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    transition: 0.3s;
}

.modal-close:hover {
    background: #e5e7eb;
    transform: rotate(90deg);
}

/* Nội dung bên trong */
.modal-content {
    padding: 1.25rem 2rem 1.25rem;
    overflow: hidden;
    /* Hard stop for scrolling */
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}





.modal-header {
    text-align: center;
    margin-bottom: 0.8rem;
}


.modal-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    /* Smaller heading */
    color: var(--dark);
    margin-bottom: 0.15rem;
}

.modal-header p {
    color: #6b7280;
    font-size: 0.85rem;
    /* Smaller subtitle */
}



/* Logo trong modal */
.modal-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0.3rem;
}

.modal-logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 4px;
}


/* Chữ SOT */
.modal-brand {
    font-family: 'Inter', sans-serif;
    font-style: italic;
    font-size: 1.1rem;
    letter-spacing: 3px;
    color: var(--primary);
}

/* User info trên navbar
.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 15px;
}

.nav-user img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.nav-user span {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Responsive cho mobile */
/* @media (max-width: 480px) {
    .modal-logo img {
        width: 45px;
        height: 45px;
    }

    .modal-brand {
        font-size: 1rem;
    }
} */

/* ===== USER DROPDOWN ===== */
.user-dropdown {
    position: relative;
}

/* Avatar ngoài navbar */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--primary);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Menu dropdown */
.user-menu {
    position: absolute;
    right: 0;
    top: 120%;
    width: 220px;
    background: #e7ddce;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    padding: 15px;
    display: none;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.user-menu.active {
    display: flex;
}

/* Header trong dropdown */
.menu-header {
    text-align: center;
}


/* logo */
.menu-logo {
    width: 40px;
    margin-bottom: 5px;
}

/* SOT */
.menu-brand {
    font-family: 'Inter', sans-serif;
    font-style: italic;
    color: var(--primary);
    margin-bottom: 8px;
}

.menu-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-bottom: 5px;
}

.menu-username {
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
}

/* Avatar dạng icon người */
.menu-avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px auto;
}

.menu-avatar i {
    font-size: 22px;
    color: #666;
}

/* Item */
.menu-item {
    display: block;
    text-align: center;
    padding: 9px;
    border-radius: 8px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    transition: 0.2s;
}

.menu-item:hover {
    background: var(--primary);
    color: #ffffff;
}

/* Logout */
.menu-item.logout {
    background: #ffe5e5;
    color: #d62828;
}

.menu-item.logout:hover {
    background: #d62828;
    color: #fff;
}

@media (max-width: 768px) {
    .user-menu {
        width: 200px;
        right: -10px;
    }
}

/* Cấu trúc Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 0.4rem;
}

/* Grid for registration step 1 to save vertical space */
#register-step-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.7rem;
}

#register-step-info .btn-submit,
#register-step-info #registerMessage {
    grid-column: span 1;
    width: 100%;
    margin-top: 15px !important;
}

@media (max-width: 500px) {
    #register-step-info {
        grid-template-columns: 1fr;
    }

    #register-step-info .btn-submit,
    #register-step-info #registerMessage {
        grid-column: span 1;
    }
}


.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    /* Tighter label-input gap */
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    /* Smaller labels */
    color: #374151;
}

.form-input {
    padding: 0.55rem 0.85rem;
    /* More compact inputs */
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 0.92rem;
    transition: 0.3s;
    background: #f9fafb;
}



.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(201, 160, 80, 0.1);
}

/* Tùy chọn Remember me & Forgot Pass */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-submit {
    position: relative;
    padding: 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit:hover {
    background: #B8941E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 160, 80, 0.3);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: btn-spin 0.6s linear infinite;
}

.btn-submit.loading .btn-loader {
    display: block;
}

.btn-submit.loading .btn-text {
    opacity: 0.8;
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}


.modal-footer {
    text-align: center;
    margin-top: auto;
    /* Push to bottom of content area */
    padding-top: 1.25rem;
    border-top: 1px solid #f3f4f6;
}




.link {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* Thông báo lỗi/thành công */
.form-message {
    display: none;
    padding: 0.8rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.form-message.success {
    display: block;
    background: #ecfdf5;
    color: #10b981;
}

.form-message.error {
    display: block;
    background: #fef2f2;
    color: #ef4444;
}

/* --- NOTIFICATION DROPDOWN STYLE --- */
.notification-dropdown {
    position: relative;
    margin-right: 5px;
}

.notification-btn {
    background: transparent;
    border: none;
    color: var(--white);
    /* Tự động theo màu biến của bạn */
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    padding: 8px;
    transition: 0.3s;
}

header.scrolled .notification-btn,
.topbar .notification-btn {
    color: var(--primary);
    /* Đổi sang màu vàng gold khi cuộn hoặc trong dashboard */
}

.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: #ff4757;
    border-radius: 50%;
    border: 2px solid var(--dark);
}

.notification-content {
    position: absolute;
    top: 130%;
    right: 0;
    width: 280px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: none;
    /* Ẩn mặc định */
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid var(--border);
}

.notification-content.active {
    display: flex;
}

.notification-header {
    padding: 12px 15px;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    color: var(--dark);
    background: var(--light);
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Hero */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('https://images.unsplash.com/photo-1566073771259-6a8506099945?w=1920');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero-content h1 {
    font-size: clamp(3rem, 10vw, 6rem);
    color: var(--primary);
    letter-spacing: 10px;
}

.hero-content p {
    color: white;
    max-width: 700px;
    margin: 20px auto;
}

.wavy-bottom {
    position: absolute;
    bottom: 0;
    width: 100%;
    line-height: 0;
}

/* Style cho câu slogan trong Hero Section */
.hero-content .hero-slogan {
    font-family: 'Inter', sans-serif;
    /* Dùng font chữ có chân sang trọng */
    font-style: italic;
    /* Viết nghiêng để tạo điểm nhấn nhẹ nhàng */
    font-size: 1.5rem;
    /* Kích thước vừa phải */
    letter-spacing: 4px;
    /* Giãn chữ để tạo cảm giác thoáng đãng, cao cấp */
    color: var(--white);
    opacity: 0.9;
    /* Làm mờ nhẹ để không lấn át tiêu đề chính SOT */
    text-transform: uppercase;
    /* Viết hoa toàn bộ để tăng tính khẳng định */
    margin-top: 10px;
    position: relative;
}

/* Thêm một đường gạch nhỏ trang trí bên dưới slogan (tùy chọn) */
.hero-content .hero-slogan::after {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: var(--primary);
    margin: 15px auto 0;
}

/* Services */
.services {
    background: var(--dark);
    padding: 100px 0;
    position: relative;
    color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 3rem;
    color: var(--primary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 8px;
}

.service-card h3 {
    color: var(--primary);
    margin-top: 15px;
    text-transform: uppercase;
}

/* Villas */
.villas {
    background: var(--light);
    padding: 100px 0;
}

.villa-carousel-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.villa-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    overflow: hidden;
}

.villa-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.villa-card img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    transition: 0.5s;
}

.villa-card:hover img {
    transform: scale(1.1);
}

.villa-info {
    position: absolute;
    bottom: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    width: 100%;
    color: white;
}

.carousel-btn {
    background: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    position: absolute;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.carousel-btn.prev {
    left: -20px;
}

.carousel-btn.next {
    right: -20px;
}

/* Offers */
.offers {
    background: var(--light);
    padding: 50px 0 100px;
}

.filter-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.filter-btn {
    padding: 8px 25px;
    border-radius: 25px;
    border: 1px solid var(--primary);
    background: white;
    cursor: pointer;
}

.filter-btn.active {
    background: var(--primary);
    color: white;
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.offer-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.offer-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.offer-card .content {
    padding: 20px;
}

/* Gallery */
.gallery {
    background: var(--dark);
    padding: 100px 0;
}

.masonry-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-auto-rows: 250px;
    gap: 15px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Footer */
footer {
    background: var(--light);
    padding: 80px 0 30px;
    text-align: center;
}

.newsletter form {
    display: flex;
    max-width: 500px;
    margin: 30px auto;
}

.newsletter input {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--dark);
    outline: none;
}

.newsletter button {
    background: var(--dark);
    color: white;
    border: none;
    padding: 0 25px;
    cursor: pointer;
}

@media (max-width: 768px) {

    .desktop-nav,
    .btn-book {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

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

/* ===== CHAT WIDGET ===== */
#chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 3000;
}

/* Nút bong bóng */
#chat-toggle {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
}

#chat-toggle:hover {
    transform: scale(1.1);
}

/* Khung chat */
#chat-box {
    width: 300px;
    height: 380px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 10px;
}

/* Header */
/* Header chỉnh lại cho cân đẹp */
.chat-header {
    background: var(--primary);
    color: white;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

/* Nút close tròn đẹp */
#chat-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

/* Hover cho "đã mắt" hơn */
#chat-close:hover {
    background: white;
    color: var(--primary);
    transform: rotate(90deg) scale(1.1);
}

/* Click cảm giác bấm thật */
#chat-close:active {
    transform: scale(0.9);
}

/* Body */
.chat-body {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Message */
.chat-message {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 14px;
    max-width: 82%;
    font-size: 0.9rem;
    line-height: 1.45;
    word-break: break-word;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.chat-message.bot {
    background: #ffffff;
    color: #3D2817;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(201, 160, 80, 0.18);
}

.chat-message.user {
    background: linear-gradient(135deg, #C9A050, #B8941E);
    color: #fff;
    align-self: flex-end;
    text-align: left;
    border-bottom-right-radius: 4px;
}

.chat-msg-text {
    display: block;
}

.chat-msg-sender {
    font-size: 0.72rem;
    font-weight: 700;
    opacity: 0.9;
}

.chat-msg-time {
    font-size: 0.72rem;
    opacity: 0.78;
    align-self: flex-end;
}

.chat-message.user .chat-msg-time {
    color: rgba(255, 255, 255, 0.92);
}

.chat-message.bot .chat-msg-time {
    color: #8a7b68;
}

.chat-message.bot .chat-msg-sender {
    color: #8a7b68;
}

.chat-message.user .chat-msg-sender {
    color: rgba(255, 255, 255, 0.95);
}

.chat-message-system {
    max-width: 100%;
    align-self: center;
}

/* Footer */
.chat-footer {
    display: flex;
    border-top: 1px solid #ddd;
    background: #fff;
}

.chat-footer input {
    flex: 1;
    border: none;
    padding: 12px 14px;
    outline: none;
    font-size: 0.92rem;
}

.chat-footer button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 16px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hover mượt + nổi lên */
.chat-footer button:hover {
    background: #B8941E;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(201, 160, 80, 0.4);
}

/* Click có cảm giác bấm */
.chat-footer button:active {
    transform: scale(0.9);
}

/* ================= RESPONSIVE AUTH MODAL ================= */

/* Laptop lớn (≥1200px) */
@media (min-width: 1200px) {
    .modal-container {
        max-width: 520px;
        border-radius: 24px;
    }

    .modal-content {
        padding: 2.5rem 3rem;
    }

    .modal-header h2 {
        font-size: 2rem;
    }
}

/* Laptop nhỏ / Tablet ngang (≤1200px) */
@media (max-width: 1199px) {
    .modal-container {
        max-width: 480px;
    }

    .modal-content {
        padding: 2.2rem 2rem;
    }

    .modal-header h2 {
        font-size: 1.8rem;
    }
}

/* Tablet (≤768px) */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-width: 420px;
        border-radius: 18px;
    }

    .modal-content {
        padding: 2rem 1.5rem;
    }

    .modal-header h2 {
        font-size: 1.6rem;
    }

    .form-input {
        font-size: 0.95rem;
        padding: 0.75rem 0.9rem;
    }

    .btn-submit {
        font-size: 1rem;
        padding: 0.9rem;
    }
}

/* Mobile (≤480px) */
@media (max-width: 480px) {
    .modal-container {
        width: 95%;
        max-width: 100%;
        border-radius: 16px;
    }

    .modal-content {
        padding: 1.5rem 1rem;
    }

    .modal-header h2 {
        font-size: 1.4rem;
    }

    .modal-header p {
        font-size: 0.85rem;
    }

    .auth-form {
        gap: 0.8rem;
    }

    .form-label {
        font-size: 0.8rem;
    }

    .form-input {
        font-size: 0.9rem;
        padding: 0.7rem 0.8rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .btn-submit {
        font-size: 0.95rem;
        padding: 0.8rem;
    }

    .modal-footer {
        font-size: 0.85rem;
    }
}

/* ================= FIX UX CHUNG ================= */

/* Tránh tràn khi bật bàn phím mobile */
.modal {
    padding: 10px;
}

/* Scroll khi form dài */
.modal-container {
    max-height: 90vh;
    overflow-y: auto;
}

/* Tối ưu nút close cho mobile */
@media (max-width: 480px) {
    .modal-close {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}



/* GLOBAL PREMIUM TYPOGRAPHY OVERRIDE */
body, p, a, button, input, select, textarea, label, span, div, td, th {
    font-family: 'Outfit', sans-serif !important;
}
h1, h2, h3, h4, h5, h6, .logo-wordmark, .hero-title, .section-title {
    font-family: 'Playfair Display', serif !important;
    letter-spacing: 0.5px;
}
/* Ensure icons keep their font family */
i.fas, i.far, i.fab, i.fa {
    font-family: "Font Awesome 6 Free" !important;
}

button, .btn, .btn-primary, .btn-secondary, .btn-danger, .btn-nav-primary, .btn-nav-outline, .btn-book, .btn-explore,
input, select, textarea, .form-input, .form-select, .form-textarea,
.card, .filter-card, .promo-card, .offer-card, .villa-card, .service-card, .stat-card, .room-card,
.modal-content, .auth-container, .table-wrap, .notification-content, .user-menu, .nav-item {
    border-radius: 6px !important;
}

#lang-toggle-btn { border-radius: 20px !important; }

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--dark);
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.9rem;
}

.pagination-btn:hover {
    background: #f0f0f0;
}

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

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9f9f9;
}
