/* ============================================
   HỆ THỐNG QUẢN LÝ NHÀ TRỌ - Custom Styles
   ============================================ */

/* --- Variables --- */
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --dark: #1e293b;
    --light: #f8fafc;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --sidebar-active: #2563eb;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f1f5f9;
    color: var(--dark);
    line-height: 1.6;
}

/* --- Login Page --- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    display: flex;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    padding: 60px 40px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-left h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.login-left p {
    opacity: 0.9;
    margin-bottom: 30px;
}

.login-features {
    list-style: none;
}

.login-features li {
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-features i {
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.login-right {
    flex: 1;
    padding: 60px 50px;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.login-logo h1 {
    font-size: 1.5rem;
    color: var(--dark);
    font-weight: 700;
}

.login-logo p {
    color: var(--secondary);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary);
}

.input-group .form-control {
    padding-left: 45px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-info {
    background: var(--info);
    color: white;
}

.btn-info:hover {
    background: #2563eb;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

/* --- Alert Messages --- */
.alert {
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
    border: none;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.alert-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.alert i {
    font-size: 1.2rem;
}

/* --- Admin Layout --- */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
    -webkit-overflow-scrolling: touch;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header i {
    font-size: 2rem;
    color: var(--primary-light);
}

.sidebar-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.sidebar-header p {
    font-size: 0.75rem;
    opacity: 0.7;
    margin: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 15px 0;
}

.sidebar-menu li {
    margin: 2px 10px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--sidebar-active);
    color: white;
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.sidebar-menu a.active {
    position: relative;
    font-weight: 600;
}

.sidebar-menu a.active::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: #1d4ed8;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 8px rgba(37,99,235,0.6);
}

/* Hiệu ứng menu cha khi menu con active */
.sidebar-menu a.parent-active {
    color: white;
    background: rgba(37,99,235,0.15);
}

.sidebar-menu a.parent-active i {
    color: #60a5fa;
}

.sidebar-menu a i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-menu .menu-title {
    padding: 15px 20px 8px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Top Header --- */
.top-header {
    background: white;
    padding: 15px 30px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-notifications {
    position: relative;
    cursor: pointer;
}

.header-notifications i {
    font-size: 1.3rem;
    color: var(--secondary);
}

.notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 10px;
    transition: background 0.3s;
}

.header-user:hover {
    background: var(--light);
}

.header-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-light);
}

.header-user-info h6 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.header-user-info span {
    font-size: 0.75rem;
    color: var(--secondary);
}

.user-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: var(--card-shadow-hover);
    min-width: 200px;
    list-style: none;
    padding: 10px 0;
    display: none;
    margin-top: 10px;
}

.dropdown-menu.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--dark);
    text-decoration: none;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.dropdown-menu a:hover {
    background: var(--light);
    color: var(--primary);
}

.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 5px 0;
}

/* --- Page Content --- */
.page-content {
    padding: 30px;
    flex: 1;
}

/* --- Cards --- */
.card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
    transition: all 0.3s ease;
    border: none;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
}

.card-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
}

.card-body {
    padding: 25px;
}

.card-footer {
    padding: 15px 25px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 15px 15px;
}

/* --- Stat Cards --- */
.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.stat-card.primary::before { background: var(--primary); }
.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.danger::before { background: var(--danger); }
.stat-card.info::before { background: var(--info); }
.stat-card.purple::before { background: #8b5cf6; }
.stat-card.pink::before { background: #ec4899; }
.stat-card.teal::before { background: #14b8a6; }

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
}

.stat-icon.primary { background: linear-gradient(135deg, var(--primary), #7c3aed); }
.stat-icon.success { background: linear-gradient(135deg, var(--success), #059669); }
.stat-icon.warning { background: linear-gradient(135deg, var(--warning), #d97706); }
.stat-icon.danger { background: linear-gradient(135deg, var(--danger), #dc2626); }
.stat-icon.info { background: linear-gradient(135deg, var(--info), #2563eb); }
.stat-icon.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.stat-icon.pink { background: linear-gradient(135deg, #ec4899, #db2777); }
.stat-icon.teal { background: linear-gradient(135deg, #14b8a6, #0d9488); }

.stat-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 5px;
    color: var(--dark);
}

.stat-info p {
    margin: 0;
    color: var(--secondary);
    font-size: 0.9rem;
}

/* --- Tables --- */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    background: #f8fafc;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.9rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #f8fafc;
}

.table img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background: #e2e8f0;
    color: #475569;
}

.badge-primary {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-purple {
    background: #ede9fe;
    color: #5b21b6;
}

/* --- Avatar --- */
.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 1rem;
}

.avatar.primary { background: linear-gradient(135deg, var(--primary), #7c3aed); }
.avatar.success { background: linear-gradient(135deg, var(--success), #059669); }
.avatar.warning { background: linear-gradient(135deg, var(--warning), #d97706); }
.avatar.info { background: linear-gradient(135deg, var(--info), #2563eb); }

/* --- Form Styles --- */
.form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
    display: block;
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    background: white;
}

.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    min-height: 120px;
    resize: vertical;
}

.form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* --- Action Buttons --- */
.action-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btns .btn {
    padding: 6px 10px;
    font-size: 0.85rem;
}

/* --- Profile Page --- */
.profile-header {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    border-radius: 15px;
    padding: 40px;
    color: white;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.3);
    object-fit: cover;
}

.profile-info h2 {
    margin: 0 0 5px;
    font-size: 1.8rem;
}

.profile-info p {
    opacity: 0.9;
    margin: 3px 0;
}

/* --- 404 Page --- */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 20px;
}

.error-page h1 {
    font-size: 8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.error-page h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.error-page p {
    color: var(--secondary);
    margin-bottom: 30px;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .login-card {
        flex-direction: column;
        max-width: 500px;
    }
    
    .login-left {
        padding: 40px 30px;
    }
    
    .login-right {
        padding: 40px 30px;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
        pointer-events: auto;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    .mobile-menu-btn {
        display: inline-flex !important;
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 15px;
    }
    
    .top-header {
        padding: 12px 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    
    .card-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
    margin-right: 15px;
}

/* --- Home Page Public --- */
.home-header {
    background: white;
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.home-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.home-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--dark);
}

.home-logo i {
    font-size: 2rem;
    color: var(--primary);
}

.home-logo h1 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.home-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.home-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
}

.home-menu a:hover {
    color: var(--primary);
}

.home-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: white;
    padding: 80px 30px;
    text-align: center;
}

.home-hero h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.home-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 30px;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.hero-search input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
}

.hero-search button {
    padding: 15px 30px;
    background: var(--dark);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.hero-search button:hover {
    background: #0f172a;
}

.home-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 50px 30px;
}

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

.section-title h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.section-title p {
    color: var(--secondary);
}

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.room-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    position: relative;
}

.room-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.room-card.sold-out {
    filter: grayscale(100%);
    opacity: 0.7;
}

.room-card.sold-out::after {
    content: 'TẠM HẾT';
    position: absolute;
    top: 20px;
    right: -30px;
    background: var(--danger);
    color: white;
    padding: 8px 40px;
    font-weight: 700;
    font-size: 0.9rem;
    transform: rotate(45deg);
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.room-images {
    height: 200px;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.room-images i {
    font-size: 4rem;
    color: var(--secondary);
}

.room-images .slider-nav {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}

.room-images .slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
}

.room-images .slider-dot.active {
    background: white;
}

.room-info {
    padding: 20px;
}

.room-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark);
}

.room-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.room-meta {
    display: flex;
    gap: 15px;
    color: var(--secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.room-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.room-address {
    color: var(--secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.room-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.type-room { background: #dbeafe; color: #1e40af; }
.type-apartment { background: #ede9fe; color: #5b21b6; }
.type-house { background: #d1fae5; color: #065f46; }

.home-footer {
    background: var(--dark);
    color: white;
    padding: 50px 30px 20px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

/* --- Utilities --- */
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-secondary { color: var(--secondary); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 20px; }
.mb-5 { margin-bottom: 25px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }
.mt-5 { margin-top: 25px; }

.me-1 { margin-right: 5px; }
.me-2 { margin-right: 10px; }
.me-3 { margin-right: 15px; }

.ms-1 { margin-left: 5px; }
.ms-2 { margin-left: 10px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: 10px; }
.gap-3 { gap: 15px; }

.w-100 { width: 100%; }
.text-center { text-align: center; }
.text-end { text-align: right; }

/* --- Print Styles --- */
@media print {
    .sidebar, .top-header, .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .page-content {
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================
   GIAI ĐOẠN 4 & 5 - Styles bổ sung
   ============================================ */

/* --- Trang chủ công khai nâng cao --- */
.hero-search-advanced {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-width: 900px;
    margin: 0 auto;
}

.hero-search-advanced .form-select {
    height: 48px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.hero-search-advanced .btn-primary {
    height: 48px;
    border-radius: 8px;
    font-weight: 600;
}

.search-input-group {
    position: relative;
    height: 48px;
}

.search-input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    z-index: 2;
}

.search-input-group input {
    width: 100%;
    height: 100%;
    padding-left: 40px;
    padding-right: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

.search-input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.hero-stats {
    max-width: 800px;
    margin: 0 auto;
}

.hero-stat-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-stat-item h3 {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.hero-stat-item p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0;
    font-size: 0.9rem;
}

.room-badge-featured {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

/* --- Chi tiết phòng --- */
.breadcrumb-bar {
    background: #f8fafc;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

.breadcrumb-bar a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb-bar i {
    color: #94a3b8;
}

.room-detail-gallery {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.gallery-main {
    width: 100%;
    height: 450px;
    background: #f1f5f9;
    overflow: hidden;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-main img:hover {
    transform: scale(1.02);
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 10px;
    background: white;
    overflow-x: auto;
}

.gallery-thumb {
    flex-shrink: 0;
    width: 100px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
}

.gallery-thumb.active {
    border-color: var(--primary);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumb:hover {
    opacity: 0.8;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.info-item i {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.utility-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f0fdf4;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.utility-item:hover {
    background: #dcfce7;
    transform: translateY(-2px);
}

.utility-item i {
    font-size: 1.2rem;
}

.sticky-card {
    position: sticky;
    top: 20px;
}

/* --- Cấu hình hệ thống --- */
.setting-section {
    margin-bottom: 30px;
}

/* --- Export buttons --- */
.export-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* --- Module checkboxes --- */
.module-perm-item {
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.module-perm-item:hover {
    background: #eef2ff;
}

/* --- Responsive bổ sung --- */
@media (max-width: 768px) {
    .hero-search-advanced {
        padding: 15px;
    }
    
    .gallery-main {
        height: 280px;
    }
    
    .hero-stat-item h3 {
        font-size: 1.3rem;
    }
    
    .hero-stat-item p {
        font-size: 0.8rem;
    }
}

/* --- Sửa form tìm kiếm trang chủ --- */
.hero-search-advanced .form-select {
    height: 48px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background-color: white !important;
    color: #1e293b !important;
    font-size: 14px !important;
    padding: 0 12px !important;
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: menulist;
}

.hero-search-advanced .form-select:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
}

.hero-search-advanced .search-input-group input {
    height: 48px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background-color: white !important;
    color: #1e293b !important;
    font-size: 14px !important;
}

.hero-search-advanced .btn-primary {
    height: 48px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    border: none !important;
}

/* --- Sửa hiển thị ảnh phòng mặc định đẹp hơn --- */
.room-images {
    height: 200px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.room-images i {
    font-size: 5rem !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Đảm bảo ô tìm kiếm không bị rớt hàng */
.hero-search-advanced .row {
    flex-wrap: nowrap;
    align-items: center;
}

@media (max-width: 991px) {
    .hero-search-advanced .row {
        flex-wrap: wrap;
    }
}

.hero-search-advanced .col-md-3,
.hero-search-advanced .col-md-2 {
    padding-left: 4px !important;
    padding-right: 4px !important;
}

.hero-search-advanced .search-input-group {
    position: relative;
    height: 48px;
}

.hero-search-advanced .search-input-group input {
    width: 100%;
    height: 48px;
    padding-left: 40px !important;
    padding-right: 12px !important;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

.hero-search-advanced .search-input-group i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    z-index: 2;
}

/* ============================================
   SỬA LỖI TÌM KIẾM RỚT HÀNG + RESPONSIVE
   ============================================ */

/* Form tìm kiếm - đảm bảo không rớt hàng */
.hero-search-advanced {
    position: relative;
    z-index: 10;
}

.hero-search-advanced .row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.hero-search-advanced .row > [class*="col-"] {
    flex-shrink: 0;
    padding: 0;
}

.hero-search-advanced .search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    height: 48px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.hero-search-advanced .search-input-group i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    z-index: 2;
    pointer-events: none;
}

.hero-search-advanced .search-input-group input {
    width: 100%;
    height: 48px;
    padding: 0 12px 0 38px !important;
    border: none !important;
    border-radius: 0 !important;
    font-size: 14px;
    outline: none;
    background: transparent;
}

.hero-search-advanced .form-select {
    height: 48px !important;
    min-height: 48px;
    padding: 0 30px 0 12px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background-color: white !important;
    font-size: 14px !important;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-search-advanced .btn-primary {
    height: 48px !important;
    min-height: 48px;
    border-radius: 8px !important;
    font-weight: 600 !important;
    white-space: nowrap;
    padding: 0 20px !important;
}

/* Header trang chủ - responsive */
.home-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: nowrap;
}

.home-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 700;
    flex-shrink: 0;
    white-space: nowrap;
}

.home-logo i {
    font-size: 1.5rem;
    color: var(--primary);
}

.home-logo h1 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--dark);
}

.home-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.home-menu li a {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    color: var(--dark);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.home-menu li a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* Responsive cho tablet */
@media (max-width: 1024px) {
    .hero-search-advanced .row {
        flex-wrap: wrap;
    }
    
    .hero-search-advanced .col-md-3 {
        width: calc(50% - 4px);
    }
    
    .hero-search-advanced .col-md-2 {
        width: calc(50% - 4px);
    }
    
    .home-menu {
        display: none;
    }
}

/* Responsive cho di động */
@media (max-width: 768px) {
    .home-navbar {
        padding: 10px 16px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .home-logo h1 {
        font-size: 1rem;
    }
    
    .hero-search-advanced .row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .hero-search-advanced .col-md-3,
    .hero-search-advanced .col-md-2 {
        width: 100% !important;
    }
    
    .hero-search-advanced .form-select,
    .hero-search-advanced .search-input-group,
    .hero-search-advanced .btn-primary {
        width: 100% !important;
    }
    
    .home-hero h2 {
        font-size: 1.5rem !important;
    }
    
    .home-hero p {
        font-size: 0.9rem !important;
    }
    
    .stats-grid .stat-card {
        padding: 15px !important;
    }
    
    .stats-grid .stat-card .stat-number {
        font-size: 1.5rem !important;
    }
}

/* Sửa lỗi cuộn web bị che thông tin */
.page-content {
    padding-top: 20px;
}

.top-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Đảm bảo nội dung không bị che khi cuộn */
body {
    padding-top: 0;
}

/* Sửa layout quản trị cho đẹp hơn */
.sidebar {
    width: 260px;
    min-height: 100vh;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: white;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1001;
    transition: transform 0.3s ease;
    -webkit-overflow-scrolling: touch;
    pointer-events: auto;
}

.main-content {
    margin-left: 260px;
    min-height: 100vh;
    background: #f1f5f9;
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* Sửa giao diện chi tiết phòng không bị che */
.room-detail-container {
    padding-top: 0;
}

/* Đảm bảo top-header không che nội dung */
.page-content {
    padding: 24px;
    margin-top: 0;
}

/* ============================================
   TÍNH NĂNG MỚI - CSS BỔ SUNG
   ============================================ */

/* Cảnh báo chống lừa đảo */
.card.border-warning {
    border: 2px solid #f59e0b !important;
}

.card.border-warning .card-header {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

/* Icon trạng thái người ở */
.people-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.people-status.available {
    background: #dcfce7;
    color: #166534;
}

.people-status.available i {
    color: #22c55e;
}

.people-status.occupied {
    background: #fee2e2;
    color: #991b1b;
}

.people-status.occupied i {
    color: #ef4444;
}

.people-status.full {
    background: #fef3c7;
    color: #92400e;
}

.people-status.full i {
    color: #f59e0b;
}

/* Sticky card sidebar */
.sticky-card {
    position: sticky;
    top: 20px;
}

/* Modal đẹp hơn */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    border-radius: 12px 12px 0 0;
    border: none;
}

/* Badge menu sidebar */
.badge.badge-warning {
    background: #f59e0b;
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
}

/* Nút book lịch */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    color: white;
    font-weight: 600;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: white;
}

/* Tối ưu hóa hiệu năng */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    loading: lazy;
}

/* Cache control cho assets */
.css {
    will-change: transform;
}

/* ============================================
   FIX GIAO DIỆN BẢNG PHÒNG TRỌ - GỌN HƠN
   ============================================ */

/* Bảng phòng trọ gọn hơn */
.room-table {
    font-size: 0.875rem;
}

.room-table th,
.room-table td {
    padding: 0.5rem 0.75rem;
    vertical-align: middle;
    white-space: nowrap;
}

.room-table th {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Giảm kích thước cột mã phòng */
.room-table .col-code {
    width: 100px;
    font-weight: 600;
    color: var(--primary);
}

/* Giảm kích thước cột loại */
.room-table .col-type {
    width: 90px;
}

/* Giảm kích thước cột diện tích */
.room-table .col-area {
    width: 80px;
    text-align: center;
}

/* Giảm kích thước cột giá */
.room-table .col-price {
    width: 110px;
    text-align: right;
    font-weight: 600;
    color: #dc2626;
}

/* Giảm kích thước cột trạng thái */
.room-table .col-status {
    width: 100px;
    text-align: center;
}

/* Giảm kích thước cột công khai */
.room-table .col-public {
    width: 80px;
    text-align: center;
}

/* Giảm kích thước cột thao tác */
.room-table .col-actions {
    width: 120px;
    text-align: center;
}

/* Badge trạng thái nhỏ hơn */
.room-table .badge {
    font-size: 0.7rem;
    padding: 0.25em 0.6em;
}

/* Nút thao tác nhỏ hơn */
.room-table .btn-sm {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
}

/* Địa chỉ cắt ngắn nếu quá dài */
.room-table .address-cell {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tên phòng cắt ngắn nếu quá dài */
.room-table .title-cell {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

/* Tên chủ nhà cắt ngắn */
.room-table .landlord-cell {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Container bảng cuộn ngang mượt */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   FIX GIAO DIỆN TRANG CHI TIẾT PHÒNG
   ============================================ */

/* Nút liên hệ đồng bộ màu sắc */
.btn-contact-call {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: none !important;
    color: white !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-contact-call:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-contact-zalo {
    background: linear-gradient(135deg, #0068ff, #0052cc) !important;
    border: none !important;
    color: white !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-contact-zalo:hover {
    background: linear-gradient(135deg, #0052cc, #004099) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 104, 255, 0.3);
}

/* Mã phòng hiển thị đẹp */
.room-code-display {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
}

.room-code-display small {
    display: block;
    font-size: 0.8rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.room-code-display h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* ============================================
   FIX SIDEBAR KHI CUỘN CHUỘT - TRANG CHI TIẾT PHÒNG
   ============================================ */

/* ============================================================
   DETAIL SIDEBAR - Trang chi tiết phòng/sản phẩm
   Thiết kế sạch sẽ, không sticky, không xung đột
   ============================================================ */
.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-sidebar .card {
    margin: 0;
    border: 1px solid var(--border-default, #e2e8f0);
    border-radius: var(--radius-xl, 12px);
    box-shadow: var(--shadow-xs, 0 1px 2px rgba(0,0,0,0.05));
    transition: box-shadow 0.2s ease;
    overflow: hidden;
}

.detail-sidebar .card:hover {
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.08));
}

.detail-sidebar .card-header {
    background: linear-gradient(180deg, #f8fafc, #ffffff);
    border-bottom: 1px solid var(--border-default, #e2e8f0);
    padding: 16px 20px;
    font-weight: 600;
}

.detail-sidebar .card-body {
    padding: 20px;
}

/* Khoảng cách giữa các phần tử trong card */
.detail-sidebar .card-body > * + * {
    margin-top: 12px;
}

/* Đảm bảo layout responsive */
@media (max-width: 991.98px) {
    .detail-sidebar {
        margin-top: 24px;
    }
}

/* Container cha đảm bảo layout đúng */
.room-detail-container {
    position: relative;
}

.detail-content {
    min-width: 0;
}

/* ============================================
   PHÒNG ĐÃ CHO THUÊ - LÀM MỜ TRẮNG ĐEN
   ============================================ */

.room-card.sold-out {
    position: relative;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.room-card.sold-out:hover {
    opacity: 0.85;
}

.room-card.sold-out::after {
    content: 'ĐÃ CHO THUÊ';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: rgba(220, 38, 38, 0.9);
    color: white;
    padding: 10px 30px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 8px;
    z-index: 10;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 2px solid white;
}

.room-card.sold-out .room-price {
    text-decoration: line-through;
    opacity: 0.6;
}

/* ============================================
   PHÂN TRANG TRANG CHỦ
   ============================================ */

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding: 20px 0;
}

.pagination-container .page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-container .page-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-container .page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-container .page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-container .page-info {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 15px;
}

/* ============================================
   ĐÁNH GIÁ PHÒNG - RATING STARS
   ============================================ */

.rating-section {
    margin-top: 30px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.rating-summary {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 12px;
    margin-bottom: 25px;
}

.rating-average {
    text-align: center;
    min-width: 120px;
}

.rating-average .avg-number {
    font-size: 3rem;
    font-weight: 700;
    color: #d97706;
    line-height: 1;
}

.rating-average .avg-stars {
    color: #fbbf24;
    font-size: 1.2rem;
    margin-top: 5px;
}

.rating-average .total-reviews {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 5px;
}

.rating-bars {
    flex-grow: 1;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.rating-bar-row .star-label {
    width: 50px;
    color: #6b7280;
}

.rating-bar-row .bar-container {
    flex-grow: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-row .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.rating-bar-row .count {
    width: 40px;
    text-align: right;
    color: #6b7280;
}

/* Form đánh giá */
.review-form {
    background: #f9fafb;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #e5e7eb;
}

.review-form h5 {
    margin-bottom: 15px;
    color: #1f2937;
}

.star-rating-input {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.star-rating-input input {
    display: none;
}

.star-rating-input label {
    font-size: 1.8rem;
    color: #d1d5db;
    cursor: pointer;
    transition: all 0.2s ease;
}

.star-rating-input label:hover,
.star-rating-input label:hover ~ label,
.star-rating-input input:checked ~ label {
    color: #fbbf24;
    transform: scale(1.1);
}

/* Danh sách đánh giá */
.reviews-list {
    margin-top: 20px;
}

.review-item {
    padding: 18px 0;
    border-bottom: 1px solid #f3f4f6;
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.review-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.review-user-info .user-name {
    font-weight: 600;
    color: #1f2937;
}

.review-user-info .review-date {
    font-size: 0.8rem;
    color: #9ca3af;
}

.review-stars {
    color: #fbbf24;
    font-size: 0.9rem;
}

.review-comment {
    color: #4b5563;
    line-height: 1.6;
    margin-left: 54px;
}

/* Hiển thị sao trong danh sách phòng */
.room-rating-small {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.8rem;
    color: #f59e0b;
    margin-top: 5px;
}

.room-rating-small .count {
    color: #6b7280;
    margin-left: 3px;
}

/* Alert thông báo */
.alert-review {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    color: #1e40af;
    font-size: 0.9rem;
}

/* ============================================================
   TICK ĐÃ XÁC THỰC
   ============================================================ */
.verified-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    z-index: 2;
    backdrop-filter: blur(4px);
}

.verified-badge i {
    font-size: 0.8rem;
}

/* ============================================================
   ĐÁNH GIÁ SAO
   ============================================================ */
.room-rating {
    display: flex;
    align-items: center;
    gap: 2px;
}

.room-rating i {
    font-size: 0.85rem;
}

.room-rating .text-warning {
    color: #f59e0b !important;
}

/* ============================================================
   ROOM CARD WRAPPER & NÚT ĐẶT LỊCH NHANH
   ============================================================ */
.room-card-wrapper {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.room-card-wrapper:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.room-card-wrapper .room-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.room-card-actions {
    padding: 12px 16px 16px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.btn-book-quick {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-book-quick:hover {
    opacity: 0.92;
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-book-quick:active {
    transform: scale(0.98);
}

/* ============================================================
   TỐI ƯU ROOM CARD HIỆN ĐẠI
   ============================================================ */
.room-card {
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    background: white;
    transition: all 0.3s ease;
}

.room-card .room-images {
    border-radius: 0;
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
}

.room-card .room-info {
    padding: 16px;
}

.room-card .room-info h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
    color: #1f2937;
}

.room-card .room-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.room-card .room-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 8px 0;
}

.room-card .room-meta span {
    font-size: 0.82rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}

.room-card .room-address {
    font-size: 0.82rem;
    color: #6b7280;
    margin-top: 6px;
    display: flex;
    align-items: flex-start;
    gap: 5px;
}

/* ============================================================
   MODAL ĐẶT LỊCH
   ============================================================ */
.modal-content {
    border-radius: 16px !important;
}

.modal-header {
    border-radius: 16px 16px 0 0 !important;
}

.modal-header.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
}


/* ============================================================
   CHI TIẾT PHÒNG - GALLERY ẢNH
   ============================================================ */
.room-gallery .main-image {
    position: relative;
    width: 100%;
    height: 450px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.room-gallery .main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.room-gallery .main-image:hover img {
    transform: scale(1.02);
}

.room-gallery .main-image.no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.8);
    font-size: 4rem;
}

.verified-badge-large {
    top: 16px;
    left: 16px;
    padding: 8px 16px;
    font-size: 0.85rem;
}

.thumbnail-list {
    gap: 10px;
}

.thumbnail-item {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.thumbnail-item:hover {
    border-color: var(--primary-color);
}

.thumbnail-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================================
   CHI TIẾT PHÒNG - INFO CARD
   ============================================================ */
.room-info-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.room-title-detail {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 12px;
    line-height: 1.3;
}

.room-price-detail {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.price-unit {
    font-size: 1rem;
    font-weight: 500;
    color: #6b7280;
}

.rating-section .rating-stars i {
    font-size: 1rem;
}

.rating-score {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1f2937;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 10px;
}

.info-item i {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.info-label {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
}

.info-value {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1f2937;
}

.address-section {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    background: #fef3c7;
    border-radius: 10px;
    color: #92400e;
    font-size: 0.9rem;
}

.action-buttons .btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 12px;
}

.action-buttons .btn-book {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.contact-info .card {
    border-radius: 12px;
}

/* ============================================================
   CHI TIẾT PHÒNG - MÔ TẢ & TIỆN NGHI
   ============================================================ */
.detail-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.section-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f3f4f6;
}

.section-heading.small {
    font-size: 1.1rem;
}

.description-content {
    color: #4b5563;
    line-height: 1.8;
    font-size: 0.95rem;
}

.utilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.utility-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #374151;
    transition: all 0.2s ease;
}

.utility-item:hover {
    background: #eff6ff;
    transform: translateX(4px);
}

.utility-item i {
    color: var(--primary-color);
    font-size: 1rem;
}

/* ============================================================
   CHI TIẾT PHÒNG - ĐÁNH GIÁ
   ============================================================ */
.rating-summary {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
}

.avg-rating-display .rating-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.avg-rating-display .rating-max {
    font-size: 1.2rem;
    color: #9ca3af;
}

.rating-bar-row .progress {
    background: #e5e7eb;
    border-radius: 4px;
}

.rating-bar-row .progress-bar {
    border-radius: 4px;
}

.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}

.star-rating-input input {
    display: none;
}

.star-rating-input label {
    cursor: pointer;
    font-size: 1.5rem;
    color: #d1d5db;
    transition: color 0.2s ease;
}

.star-rating-input label:hover,
.star-rating-input label:hover ~ label,
.star-rating-input input:checked ~ label {
    color: #f59e0b;
}

.review-item {
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.review-item:last-child {
    border-bottom: none;
}

.review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.reviews-list {
    max-height: 500px;
    overflow-y: auto;
}

/* ============================================================
   CHI TIẾT PHÒNG - CẢNH BÁO
   ============================================================ */
.warning-box {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 16px;
    color: #92400e;
}

.warning-box h6 {
    color: #78350f;
    font-weight: 700;
}


/* Đánh giá sao mini trong card phòng */
.room-rating-mini {
    display: flex;
    align-items: center;
    gap: 1px;
}

.room-rating-mini i {
    font-size: 0.75rem;
}

.room-rating-mini .text-warning {
    color: #f59e0b !important;
}

.room-rating-mini small {
    font-size: 0.75rem;
}


/* ============================================================
   SỬA LỖI - ĐẢM BẢO CARD PHÒNG HIỂN THỊ ĐÚNG
   ============================================================ */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.rooms-grid .room-card-wrapper {
    display: flex !important;
    flex-direction: column !important;
    background: white !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important;
    transition: all 0.3s ease !important;
    border: 1px solid #f0f0f0 !important;
}

.rooms-grid .room-card-wrapper:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12) !important;
}

.rooms-grid .room-card-wrapper .room-card {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    text-decoration: none !important;
    color: inherit !important;
}

.rooms-grid .room-card-wrapper .room-images {
    position: relative !important;
    width: 100% !important;
    height: 200px !important;
    min-height: 200px !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe) !important;
    display: block !important;
}

.rooms-grid .room-card-wrapper .room-images img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.rooms-grid .room-card-wrapper .room-info {
    padding: 16px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.rooms-grid .room-card-wrapper .room-card-actions {
    padding: 12px 16px 16px !important;
    border-top: 1px solid #f0f0f0 !important;
    background: #fafafa !important;
    display: block !important;
}

.rooms-grid .room-card-wrapper .btn-book-quick {
    display: flex !important;
    width: 100% !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: white !important;
    border: none !important;
    padding: 10px 16px !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

.rooms-grid .room-card-wrapper .btn-book-quick:hover {
    opacity: 0.9 !important;
    transform: scale(1.02) !important;
}

/* Đảm bảo verified badge hiển thị */
.verified-badge {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    z-index: 10 !important;
}

/* Đảm bảo rating hiển thị */
.room-rating {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin: 8px 0 !important;
}

.room-rating i {
    font-size: 0.85rem !important;
    color: #f59e0b !important;
}

.room-rating .far.fa-star {
    color: #d1d5db !important;
}


/* ============================================================
   TICK XÁC THỰC NẰM TRONG HÀNG THÔNG TIN
   ============================================================ */
.verified-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 3px 10px;
    border-radius: 12px;
}

.verified-inline i {
    font-size: 0.8rem;
}

/* ============================================================
   GIỚI THIỆU TIỆN ÍCH
   ============================================================ */
.feature-card {
    background: white;
    padding: 30px 20px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.8rem;
}

.feature-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1f2937;
}

.feature-card p {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============================================================
   TIN TỨC
   ============================================================ */
.news-featured {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    height: 100%;
}

.news-featured-img {
    height: 200px;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.8);
}

.news-featured-content h4 {
    font-weight: 700;
    margin-bottom: 10px;
    color: #1f2937;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.news-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    cursor: pointer;
}

.news-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.news-thumb {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

.news-item h6 {
    font-weight: 600;
    margin-bottom: 4px;
    color: #1f2937;
    font-size: 0.95rem;
}

/* ============================================================
   BANNER QUẢNG CÁO
   ============================================================ */
.ad-banner {
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.ad-banner h3 {
    font-weight: 700;
    margin-bottom: 10px;
}


/* ============================================================
   THIẾT KẾ MỚI - MÀU ĐỎ ĐẬM
   ============================================================ */

/* Hero Section Đỏ */
.hero-red {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 50%, #7f1d1d 100%);
    padding: 60px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-red::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="80" cy="20" r="40" fill="rgba(255,255,255,0.05)"/><circle cx="60" cy="80" r="30" fill="rgba(255,255,255,0.03)"/></svg>');
    background-size: cover;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.hero-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-subtitle {
    color: rgba(255,255,255,0.9);
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.hero-search-red {
    max-width: 700px;
    margin: 0 auto 50px;
}

.search-wrapper {
    display: flex;
    background: white;
    border-radius: 50px;
    padding: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.search-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 50px;
    background: transparent;
}

.search-wrapper button {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-wrapper button:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

/* Thống kê Hero */
.hero-stats-red {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    color: white;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 1.2rem;
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 5px;
}

/* Section Container */
.section-white {
    padding: 60px 0;
    background: white;
}

.section-gray {
    padding: 60px 0;
    background: #f9fafb;
}

.section-dark {
    padding: 60px 0;
    background: linear-gradient(135deg, #1f2937, #111827);
}

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

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

.section-header.text-center {
    justify-content: center;
    flex-direction: column;
}

.section-title-red {
    color: #dc2626;
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.section-title-white {
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px;
}

.section-subtitle {
    color: #6b7280;
    margin: 10px 0 0;
}

.btn-view-all {
    color: #dc2626;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.btn-view-all:hover {
    color: #991b1b;
}

/* Slider phòng trọ */
.rooms-slider-wrapper {
    position: relative;
}

.rooms-slider {
    display: flex;
    gap: 20px;
    overflow: hidden;
    transition: transform 0.5s ease;
    padding: 10px 0;
}

.room-card-red {
    flex-shrink: 0;
    width: calc(25% - 15px);
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #f3f4f6;
}

.room-card-red:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.room-card-red.sold-out {
    opacity: 0.7;
}

.room-card-img {
    position: relative;
    height: 160px;
    overflow: hidden;
    background: linear-gradient(135deg, #fee2e2, #fecaca);
}

.room-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.room-card-img .no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(220, 38, 38, 0.3);
    font-size: 3rem;
}

.sold-out-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: rgba(220, 38, 38, 0.95);
    color: white;
    padding: 8px 24px;
    font-weight: 800;
    font-size: 1.1rem;
    border-radius: 4px;
    border: 2px solid white;
}

.room-card-body {
    padding: 15px;
}

.room-card-title {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
}

.room-card-price {
    color: #dc2626;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.room-card-meta {
    display: flex;
    gap: 12px;
    font-size: 0.82rem;
    color: #6b7280;
}

.room-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    transition: all 0.2s ease;
}

.slider-btn:hover {
    background: #dc2626;
    color: white;
}

.slider-prev { left: -10px; }
.slider-next { right: -10px; }

/* Loại phòng - Sidebar đỏ */
.type-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    align-items: start;
}

.type-sidebar {
    border-radius: 12px;
    padding: 30px 20px;
    color: white;
    text-align: center;
    position: sticky;
    top: 20px;
}

.type-sidebar i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.type-sidebar h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.type-sidebar p {
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.5;
}

.type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.type-room-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
    border: 1px solid #f3f4f6;
}

.type-room-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.type-room-item.sold-out {
    opacity: 0.6;
}

.type-room-img {
    height: 100px;
    overflow: hidden;
    background: linear-gradient(135deg, #fee2e2, #fecaca);
}

.type-room-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-img-small {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(220, 38, 38, 0.3);
    font-size: 1.5rem;
}

.type-room-info {
    padding: 10px 12px;
}

.type-room-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
}

.type-room-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: #dc2626;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 40px;
}

.feature-item-red {
    text-align: center;
    padding: 30px 20px;
}

.feature-icon-red {
    width: 70px;
    height: 70px;
    margin: 0 auto 18px;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.25);
}

.feature-item-red h4 {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.feature-item-red p {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Tin tức nền tối */
.news-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 40px;
}

.news-featured-red {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    height: 100%;
    min-height: 320px;
}

.news-featured-img {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 320px;
    background: linear-gradient(135deg, #374151, #1f2937);
    overflow: hidden;
}

.news-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-no-img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.2);
    font-size: 4rem;
}

.news-featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70%;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
}

.news-featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px;
    color: white;
}

.news-badge {
    display: inline-block;
    background: #dc2626;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.news-featured-content h3 {
    color: white;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-featured-content p {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    margin: 0;
}

.news-list-red {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-item-red {
    display: flex;
    gap: 15px;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.news-item-red:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(4px);
}

.news-item-img {
    width: 100px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255,255,255,0.1);
}

.news-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-no-img-small {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    font-size: 1rem;
}

.news-item-info {
    flex: 1;
    color: white;
}

.news-item-info h5 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
    color: white;
}

.news-item-info small {
    color: rgba(255,255,255,0.5);
}

/* Banner Section */
.banner-section {
    background: linear-gradient(135deg, #dc2626, #7f1d1d);
    padding: 40px 0;
}

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

.banner-slider {
    position: relative;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 0;
    transition: opacity 0.8s ease;
}

.banner-slide:first-child {
    opacity: 1;
    z-index: 1;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.banner-placeholder i {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

.banner-placeholder h3 {
    font-weight: 700;
    margin-bottom: 5px;
}

.banner-placeholder p {
    opacity: 0.8;
    font-size: 0.9rem;
    margin: 0;
}

.banner-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.banner-dot.active {
    background: white;
    width: 28px;
    border-radius: 5px;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-title { font-size: 1.8rem; }
    .hero-stats-red { gap: 30px; }
    .room-card-red { width: calc(50% - 10px); }
    .type-layout { grid-template-columns: 1fr; }
    .type-sidebar { position: static; padding: 20px; }
    .type-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .news-layout { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .hero-title { font-size: 1.4rem; }
    .search-wrapper { flex-direction: column; border-radius: 16px; }
    .search-wrapper button { width: 100%; }
    .room-card-red { width: calc(100% - 10px); }
    .type-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .stat-number { font-size: 1.5rem; }
}


/* Header Đỏ Đậm */
.home-header {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.home-navbar {
    background: transparent !important;
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.home-logo {
    color: white !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-logo h1 {
    color: white !important;
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.home-logo i {
    color: white !important;
    font-size: 1.5rem;
}

.home-menu {
    display: flex;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-menu li a {
    color: rgba(255,255,255,0.95) !important;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.home-menu li a:hover {
    background: rgba(255,255,255,0.15) !important;
    color: white !important;
}

.home-menu li a i {
    color: rgba(255,255,255,0.9) !important;
}

.home-header .btn-outline-primary {
    border-color: white !important;
    color: white !important;
    background: transparent;
}

.home-header .btn-outline-primary:hover {
    background: white !important;
    color: #dc2626 !important;
}

/* Footer tối */
.footer-dark {
    background: #111827;
    color: white;
    padding: 40px 0 20px;
}

.footer-dark h5 {
    color: white;
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 1rem;
}

.footer-dark a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

.footer-dark a:hover {
    color: #dc2626;
}

.footer-bottom {
    border-top: 1px solid #374151;
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}


/* ============================================================
   TỐI ƯU BẢNG ADMIN - KHÔNG BỊ CHE DỮ LIỆU
   ============================================================ */
.table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    display: block;
}

.table {
    width: 100%;
    max-width: none;
    min-width: 600px;
    border-collapse: collapse;
}

.table thead th {
    white-space: nowrap !important;
    padding: 12px 14px !important;
    font-size: 0.85rem !important;
    background: #f9fafb;
    font-weight: 600 !important;
    color: #374151 !important;
    border-bottom: 2px solid #e5e7eb !important;
}

.table tbody td {
    padding: 12px 14px !important;
    font-size: 0.88rem !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #f3f4f6 !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    white-space: normal !important;
    max-width: 200px;
}

.table tbody td.avatar-cell {
    white-space: nowrap !important;
    width: 80px;
}

.table tbody tr:hover {
    background-color: #fafafa !important;
}

/* Avatar trong bảng */
.table .avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

/* Badge trong bảng */
.table .badge {
    display: inline-block !important;
    padding: 3px 10px !important;
    font-size: 0.75rem !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
}

/* Nút hành động trong bảng */
.table .btn-action {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    padding: 5px 10px !important;
    font-size: 0.78rem !important;
    border-radius: 6px !important;
    margin: 2px !important;
    white-space: nowrap !important;
}

/* Responsive bảng cho mobile */
@media (max-width: 768px) {
    .table {
        min-width: 500px;
    }
    
    .table thead th {
        padding: 10px 12px !important;
        font-size: 0.8rem !important;
    }
    
    .table tbody td {
        padding: 10px 12px !important;
        font-size: 0.82rem !important;
        max-width: 150px;
    }
}

/* ============================================================
   TỐI ƯU THỐNG KÊ DASHBOARD
   ============================================================ */
.stat-card {
    min-height: 110px;
}

.stat-info {
    min-width: 0;
    flex: 1;
}

.stat-info h3 {
    font-size: 1.6rem;
    line-height: 1.2;
    word-break: break-word;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-info p {
    margin: 0;
    color: var(--secondary);
    font-size: 0.88rem;
    line-height: 1.3;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hiển thị số tiền lớn gọn hơn */
.stat-info h3.amount-large {
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

/* Responsive cho màn hình nhỏ */
@media (max-width: 1400px) {
    .stat-info h3 {
        font-size: 1.4rem;
    }
    .stat-info h3.amount-large {
        font-size: 1.2rem;
    }
    .stat-info p {
        font-size: 0.82rem;
    }
}

@media (max-width: 1200px) {
    .stat-card {
        padding: 18px;
        gap: 14px;
    }
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
    .stat-info h3 {
        font-size: 1.25rem;
    }
    .stat-info h3.amount-large {
        font-size: 1.1rem;
    }
    .stat-info p {
        font-size: 0.78rem;
    }
}

/* Tooltip cho tên đầy đủ */
.stat-info p:hover {
    overflow: visible;
    -webkit-line-clamp: unset;
}

/* ============================================================
   BADGE THÔNG BÁO TRÊN SIDEBAR
   ============================================================ */
.sidebar-menu li a {
    display: flex;
    align-items: center;
    width: 100%;
}

.sidebar-menu li a .badge {
    margin-left: auto;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    line-height: 1.3;
}

.badge-danger {
    background: #dc2626;
    color: white;
}

.badge-warning {
    background: #f59e0b;
    color: white;
}

.badge-success {
    background: #16a34a;
    color: white;
}

.badge-info {
    background: #2563eb;
    color: white;
}


/* ============================================================
   [FIX v7.3.3] LAYOUT CHI TIẾT SẢN PHẨM 2 CỘT
   Nguyên nhân: Thiếu CSS định nghĩa .detail-layout → layout bị vỡ
   Giải pháp: Dùng CSS Grid 2 cột: cột chính co giãn, sidebar 380px
   ============================================================ */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

.detail-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Responsive: Trên màn hình nhỏ hơn 992px → 1 cột */
@media (max-width: 991.98px) {
    .detail-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .detail-sidebar {
        order: 2;
    }
    
    .detail-main {
        order: 1;
    }
}

/* Trên màn hình rất lớn → sidebar rộng hơn một chút */
@media (min-width: 1400px) {
    .detail-layout {
        grid-template-columns: 1fr 420px;
        gap: 40px;
    }
}

/* Đảm bảo breadcrumb không bị ảnh hưởng */
.detail-breadcrumb {
    margin-bottom: 20px;
}
/* ============================================================
 * FIX LỖI CHỮ TRẮNG NỀN TRẮNG + CỘT THỨ 4 VỠ LAYOUT
 * trong Báo cáo & Thống kê (v7.4.1-p2 — cập nhật theo screenshot)
 * ------------------------------------------------------------
 * Triệu chứng (đã xác nhận bằng screenshot):
 *  - 3 thẻ đầu (doanh thu/chi phí/tỷ lệ lấp đầy): chữ mô tả +
 *    small "Đã thu/Lợi nhuận" VÔ HÌNH (trắng trên trắng), chỉ
 *    còn số lớn hiển thị.
 *  - Thẻ thứ 4 (Hóa đơn quá hạn, bg-warning text-dark): hiện
 *    đầy đủ chữ tối → cao hơn 3 thẻ còn lại, chữ "Hóa đơn quá
 *    hạn" / "0 hóa đơn" bị xuống dòng → trông như vỡ layout.
 *
 * Nguyên nhân gốc: .stat-card{background:white} trong style.css
 * (tải sau Bootstrap) ghi đè .bg-success/.bg-danger/.bg-info/
 * .bg-warning/.bg-primary. Kết hợp .text-white → trắng trên trắng.
 *
 * CÁCH DÙNG: Nội dung file này vào CUỐI public/assets/css/style.css
 * ============================================================ */

/* --- 1. Khôi phục màu nền gốc Bootstrap cho stat-card màu --- */
.stat-card.bg-primary   { background-color: #0d6efd !important; background-image: none !important; }
.stat-card.bg-success   { background-color: #198754 !important; background-image: none !important; }
.stat-card.bg-danger    { background-color: #dc3545 !important; background-image: none !important; }
.stat-card.bg-secondary { background-color: #6c757d !important; background-image: none !important; }
/* Nền sáng (warning/info) → bắt buộc chữ TỐI để tương phản */
.stat-card.bg-warning   { background-color: #ffc107 !important; background-image: none !important; color: #1f2937 !important; }
.stat-card.bg-info      { background-color: #0dcaf0 !important; background-image: none !important; color: #0f172a !important; }

/* --- 2. Ép màu chữ bên trong thẻ nền tối luôn trắng, rõ ràng --- */
.stat-card.bg-primary p, .stat-card.bg-primary small, .stat-card.bg-primary h4, .stat-card.bg-primary h5, .stat-card.bg-primary .stat-label,
.stat-card.bg-success p, .stat-card.bg-success small, .stat-card.bg-success h4, .stat-card.bg-success h5, .stat-card.bg-success .stat-label,
.stat-card.bg-danger  p, .stat-card.bg-danger  small, .stat-card.bg-danger  h4, .stat-card.bg-danger  h5, .stat-card.bg-danger  .stat-label,
.stat-card.bg-secondary p, .stat-card.bg-secondary small, .stat-card.bg-secondary h4, .stat-card.bg-secondary h5, .stat-card.bg-secondary .stat-label {
    color: #ffffff !important;
}
/* Nền sáng → chữ tối (không bị text-white ghi đè) */
.stat-card.bg-warning p, .stat-card.bg-warning small, .stat-card.bg-warning h4, .stat-card.bg-warning h5,
.stat-card.bg-info    p, .stat-card.bg-info    small, .stat-card.bg-info    h4, .stat-card.bg-info    h5 {
    color: #1f2937 !important;
}

/* --- 3. FIX VỠ LAYOUT: đồng bộ chiều cao 4 thẻ, canh đều nội dung --- */
.row:has(> [class*="col-"] > .stat-card) {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}
.row:has(> [class*="col-"] > .stat-card) > [class*="col-"] {
    display: flex;
}
.stat-card {
    width: 100%;
    min-height: 148px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.stat-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}
.stat-card .stat-label,
.stat-card p.mb-1 {
    line-height: 1.35;
    margin-bottom: 6px !important;
    white-space: normal;
}
.stat-card .stat-icon,
.stat-card .fa-2x {
    flex-shrink: 0;
    align-self: flex-start;
}
@media (max-width: 1400px) {
    .stat-card { min-height: 160px; }
}

/* --- 4. Phòng ngừa tổng quát --- */
.card.stat-card[class*="bg-"]::before { background: rgba(255,255,255,.25) !important; }

/* ============================================================
 * FIX p4 — THIẾT KẾ LẠI THẺ STAT-CARD TRONG BÁO CÁO (theo yêu cầu)
 * Yêu cầu: text màu ĐEN, icon màu theo tính năng, nền trắng,
 *          cao đều, không vỡ layout.
 * (Block này đặt sau block p2/p3 để ghi đè.)
 * ============================================================ */

/* Nền trắng + viền + đổ bóng nhẹ cho mọi stat-card */
.card.stat-card {
    background: #ffffff !important;
    background-image: none !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04) !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: 152px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    padding: 16px 20px !important;
}

/* Thanh accent màu phía trên mỗi thẻ (theo loại tính năng) */
.card.stat-card::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important; left: 0 !important; right: 0 !important;
    height: 4px !important;
    background: #6b7280 !important;
    border-radius: 14px 14px 0 0 !important;
}
.card.stat-card.bg-success::before   { background: #16a34a !important; } /* Doanh thu - xanh lá */
.card.stat-card.bg-danger::before    { background: #dc2626 !important; } /* Chi phí - đỏ */
.card.stat-card.bg-info::before      { background: #0284c7 !important; } /* Tỷ lệ lấp đầy - xanh dương */
.card.stat-card.bg-primary::before   { background: #2563eb !important; }
.card.stat-card.bg-warning::before   { background: #d97706 !important; } /* Quá hạn - cam */
.card.stat-card.bg-secondary::before { background: #6b7280 !important; }

/* TOÀN BỘ CHỮ trong thẻ → màu đen (đè text-white) */
.card.stat-card,
.card.stat-card p,
.card.stat-card small,
.card.stat-card h4,
.card.stat-card h5,
.card.stat-card .stat-label,
.card.stat-card .fw-bold,
.card.stat-card .text-white,
.card.stat-card .text-dark {
    color: #111827 !important;
}
/* Chữ phụ nhỏ (Đã thu / Lợi nhuận / Còn nợ) → xám đậm, vẫn rõ */
.card.stat-card small,
.card.stat-card .opacity-75 {
    color: #4b5563 !important;
    opacity: 1 !important;
}

/* ICON minh họa → màu theo tính năng (tự do, đậm rõ) */
.card.stat-card i,
.card.stat-card .stat-icon,
.card.stat-card .fa-2x,
.card.stat-card svg {
    color: #6b7280 !important;
    opacity: 1 !important;
}
.card.stat-card.bg-success i,   .card.stat-card.bg-success .stat-icon,   .card.stat-card.bg-success .fa-2x   { color: #16a34a !important; }
.card.stat-card.bg-danger i,    .card.stat-card.bg-danger .stat-icon,    .card.stat-card.bg-danger .fa-2x    { color: #dc2626 !important; }
.card.stat-card.bg-info i,      .card.stat-card.bg-info .stat-icon,      .card.stat-card.bg-info .fa-2x      { color: #0284c7 !important; }
.card.stat-card.bg-primary i,   .card.stat-card.bg-primary .stat-icon,   .card.stat-card.bg-primary .fa-2x   { color: #2563eb !important; }
.card.stat-card.bg-warning i,   .card.stat-card.bg-warning .stat-icon,   .card.stat-card.bg-warning .fa-2x   { color: #d97706 !important; }
.card.stat-card.bg-secondary i, .card.stat-card.bg-secondary .stat-icon, .card.stat-card.bg-secondary .fa-2x { color: #6b7280 !important; }

/* Số lớn → đen đậm, kích thước đồng đều */
.card.stat-card h4, .card.stat-card h5 {
    font-size: 1.65rem !important;
    font-weight: 800 !important;
    margin: 6px 0 !important;
    line-height: 1.2 !important;
}

/* Cột chứa thẻ → co giãn cao bằng nhau (khỏi vỡ layout) */
.row:has(> [class*="col-"] > .stat-card) {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
}
.row:has(> [class*="col-"] > .stat-card) > [class*="col-"] {
    display: flex !important;
    margin-bottom: 16px !important;
}
.card.stat-card .card-body {
    flex: 1 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    padding: 0 !important;
}

/* Chữ mô tả dài được xuống dòng gọn gàng, không làm vỡ thẻ */
.card.stat-card p { line-height: 1.4 !important; margin-bottom: 4px !important; }

/* Trên màn hình hẹp hơn (sidebar rộng) → tăng chiều cao tối thiểu */
@media (max-width: 1400px) {
    .card.stat-card { min-height: 168px !important; }
}

/* ============================================================
 * FIX p10 — Chuyển đổi hiển thị bảng: Grid (thẻ card) / List (bảng)
 * Công tắc tự động thêm vào mọi bảng dữ liệu (JS view-toggle.js)
 * ============================================================ */
.view-toggle-group { display:inline-flex; gap:2px; background:#f1f3f5; border-radius:8px; padding:3px; align-items:center; }
.view-toggle-btn { border:none; background:transparent; padding:5px 12px; border-radius:6px; cursor:pointer; font-size:12px; color:#6c757d; display:inline-flex; align-items:center; gap:5px; transition:all .15s; }
.view-toggle-btn.active { background:#fff; color:#0d6efd; box-shadow:0 1px 3px rgba(0,0,0,.15); font-weight:600; }
.view-toggle-btn:hover { color:#0d6efd; }
.view-toggle-toolbar { display:flex; justify-content:flex-end; margin-bottom:10px; }

/* Chế độ Grid: biến mỗi dòng <tr> thành thẻ card */
.table-view-grid .table thead { display:none !important; }
.table-view-grid .table tbody { display:flex !important; flex-wrap:wrap; gap:14px; }
.table-view-grid .table tbody tr {
    display:flex !important; flex-direction:column; flex:1 1 250px; max-width:340px;
    background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:14px 16px !important;
    box-shadow:0 1px 3px rgba(0,0,0,.06); transition:box-shadow .2s, transform .2s;
}
.table-view-grid .table tbody tr:hover { box-shadow:0 6px 18px rgba(0,0,0,.1); transform:translateY(-2px); }
.table-view-grid .table tbody tr td {
    display:flex; justify-content:space-between; align-items:center; gap:10px;
    padding:5px 0 !important; border:none !important; font-size:13px; width:100%;
}
.table-view-grid .table tbody tr td[data-label]::before {
    content:attr(data-label); font-weight:600; color:#6b7280; font-size:12px;
    text-transform:capitalize; flex-shrink:0; max-width:45%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.table-view-grid .table tbody tr td:not([data-label]) {
    display:block; text-align:center; border-top:1px solid #eee !important; margin-top:6px; padding-top:10px !important;
}
.table-view-grid .table-responsive { overflow:visible !important; }
.table-view-grid .table { border:none !important; }

/* ============================================================
 * FIX p11 — Card view tự động cho 9 trang danh sách
 * (giống phong cách Danh sách phòng trọ)
 * ============================================================ */
.auto-card-item { transition: transform .15s ease, box-shadow .15s ease; border-radius: 10px !important; overflow: hidden; }
.auto-card-item:hover { transform: translateY(-3px); box-shadow: 0 .5rem 1rem rgba(0,0,0,.12) !important; }
.auto-card-avatar {
    width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 15px;
}
.auto-card-title { font-size: 14px; color: #111827; line-height: 1.3; }
.auto-card-field { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 3px 0; font-size: 12px; }
.auto-card-label { color: #6b7280; flex-shrink: 0; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auto-card-value { color: #111827; font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.auto-card-actions .btn { padding: 3px 8px; font-size: 11px; }
.auto-card-actions .badge { font-size: 10px; }
.auto-card-grid { margin-top: 8px; }

/* ============================================================
 * FIX p12 — CARD VIEW PREMIUM (chuẩn UI/UX hiện đại)
 * Ghi đè hoàn toàn style card thô p11.
 * ============================================================ */

/* Vô hiệu hóa style cũ thô p11 */
.auto-card-item, .auto-card-avatar, .auto-card-title, .auto-card-field,
.auto-card-label, .auto-card-value, .auto-card-actions { all: unset; }

.premium-card-grid { margin-top: 10px; }

.premium-card {
    position: relative !important;
    border: none !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04) !important;
    transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s cubic-bezier(.4,0,.2,1) !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}
.premium-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 14px 28px rgba(16,24,40,.10), 0 6px 10px rgba(16,24,40,.06) !important;
}

/* Thanh màu nhấn trên đầu */
.pc-accent-bar {
    height: 5px;
    width: 100%;
    background: var(--accent, #3b82f6);
    flex-shrink: 0;
}

/* Thẻ trạng thái góc trên phải */
.pc-badge {
    position: absolute;
    top: 14px; right: 14px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2px;
    color: var(--accent, #3b82f6);
    background: var(--accent-bg, #eff6ff);
    border: 1px solid var(--accent, #3b82f6);
    z-index: 2;
    max-width: 50%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Header: avatar + tên */
.pc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 12px;
}
.pc-avatar {
    width: 46px; height: 46px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--accent, #3b82f6), color-mix(in srgb, var(--accent, #3b82f6) 70%, #000));
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: .5px;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.pc-title-group { min-width: 0; flex: 1; padding-right: 40px; }
.pc-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pc-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Body: các trường thông tin có icon */
.pc-body {
    padding: 4px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1;
}
.pc-field {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    line-height: 1.4;
}
.pc-field-icon {
    width: 26px; height: 26px;
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-bg, #eff6ff);
    color: var(--accent, #3b82f6);
    font-size: 11px;
    flex-shrink: 0;
}
.pc-field-label {
    color: #9ca3af;
    font-weight: 500;
    flex-shrink: 0;
    font-size: 11.5px;
}
.pc-field-value {
    color: #374151;
    font-weight: 600;
    text-align: right;
    margin-left: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 55%;
}
/* Số tiền / giá trị quan trọng → nổi bật */
.pc-highlight .pc-field-value {
    color: var(--accent, #3b82f6);
    font-weight: 800;
    font-size: 13.5px;
}
.pc-highlight .pc-field-icon {
    background: var(--accent, #3b82f6);
    color: #fff;
}

/* Footer: nút thao tác */
.pc-actions {
    border-top: 1px solid #f3f4f6;
    padding: 10px 14px;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
    background: #fafafa;
    border-radius: 0 0 14px 14px;
}
.pc-actions .btn, .pc-actions a, .pc-actions button {
    padding: 5px 10px !important;
    font-size: 11.5px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}
.pc-actions .btn-sm { padding: 4px 8px !important; font-size: 11px !important; }

/* Responsive: màn hình nhỏ → 1 cột, khoảng cách thoáng hơn */
@media (max-width: 576px) {
    .premium-card-grid > [class*="col-"] { padding: 0 4px; }
    .pc-body { gap: 8px; }
}

/* ============================================================
 * FIX p13 — SỬA LỖI CARD VIEW (icon màu, text đều, card cao bằng)
 * Ghi đè p12.
 * ============================================================ */

/* 1. Card đồng bộ chiều cao (equal height) */
.premium-card-grid { display: flex !important; flex-wrap: wrap !important; align-items: stretch !important; }
.premium-card-grid > [class*="col-"] { display: flex !important; margin-bottom: 4px; }
.premium-card {
    height: 100% !important;
    min-height: 240px !important;
    width: 100% !important;
    padding: 0 !important;
}
.pc-body { flex: 1 1 auto !important; display: flex !important; flex-direction: column !important; justify-content: flex-start !important; gap: 10px !important; padding: 6px 16px 14px !important; }
.pc-actions { margin-top: auto !important; flex-shrink: 0 !important; }

/* 2. Icon có màu sắc phù hợp theo loại (không còn đen) */
.pc-field-icon {
    width: 30px !important; height: 30px !important;
    border-radius: 8px !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    background: #f3f4f6 !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
}
.pc-field-icon .fa-phone, .pc-field-icon.fa-phone { color: #10b981 !important; }          /* điện thoại - xanh lá */
.pc-field-icon .fa-envelope, .pc-field-icon.fa-envelope { color: #3b82f6 !important; }    /* email - xanh dương */
.pc-field-icon .fa-money-bill-wave, .pc-field-icon.fa-money-bill-wave { color: #f59e0b !important; } /* tiền - vàng */
.pc-field-icon .fa-calendar-alt, .pc-field-icon.fa-calendar-alt { color: #8b5cf6 !important; } /* ngày - tím */
.pc-field-icon .fa-door-open, .pc-field-icon.fa-door-open { color: #14b8a6 !important; }  /* phòng - teal */
.pc-field-icon .fa-map-marker-alt, .pc-field-icon.fa-map-marker-alt { color: #ef4444 !important; } /* địa chỉ - đỏ */
.pc-field-icon .fa-user, .pc-field-icon.fa-user, .pc-field-icon .fa-user-tie { color: #6366f1 !important; } /* người - indigo */
.pc-field-icon .fa-file-alt, .pc-field-icon.fa-file-alt { color: #6b7280 !important; }    /* mã/hợp đồng - xám */
.pc-field-icon .fa-tag, .pc-field-icon.fa-tag { color: #ec4899 !important; }              /* loại - hồng */
.pc-field-icon .fa-circle, .pc-field-icon.fa-circle { color: var(--accent, #3b82f6) !important; } /* trạng thái */
.pc-field-icon .fa-info-circle, .pc-field-icon.fa-info-circle { color: #0ea5e9 !important; } /* mặc định - sky */

/* 3. Text rõ ràng, không dính nhau — grid 3 cột đều: icon | nhãn | giá trị */
.pc-field {
    display: grid !important;
    grid-template-columns: 30px 1fr auto !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 0 !important;
    min-height: 30px !important;
}
.pc-field-label {
    color: #6b7280 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    text-align: left !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    margin: 0 !important;
}
.pc-field-value {
    color: #111827 !important;
    font-weight: 700 !important;
    font-size: 12.5px !important;
    text-align: right !important;
    margin: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 130px !important;
}
.pc-highlight .pc-field-value { color: var(--accent, #3b82f6) !important; font-size: 13.5px !important; font-weight: 800 !important; }
.pc-highlight .pc-field-icon { background: var(--accent-bg, #eff6ff) !important; }

/* Header: không bị badge che */
.pc-title-group { padding-right: 44px !important; }
.pc-subtitle { font-size: 11.5px !important; color: #9ca3af !important; }

/* Nút thao tác gọn, đồng bộ */
.pc-actions { padding: 10px 14px !important; gap: 6px !important; background: #f9fafb !important; }
.pc-actions .btn, .pc-actions a, .pc-actions button {
    padding: 5px 9px !important; font-size: 11px !important; border-radius: 7px !important;
    font-weight: 600 !important; line-height: 1.2 !important;
}

/* ============================================================
 * FIX p14 — SỬA LỖI THỊ GIÁC CARD (từ ảnh chụp màn hình)
 * + Avatar lệch trái, icon quá to (FA JS → SVG), text bị cắt "...",
 *   icon trạng thái tròn to xấu, khoảng cách quá lớn.
 * ============================================================ */

/* --- Avatar: đúng vị trí, kích thước chuẩn, không lệch --- */
.premium-card { padding: 0 !important; overflow: hidden !important; }
.pc-header {
    display: flex !important; align-items: center !important; gap: 12px !important;
    padding: 16px 16px 10px 16px !important; margin: 0 !important;
}
.pc-avatar {
    width: 42px !important; height: 42px !important; min-width: 42px !important;
    border-radius: 50% !important; flex-shrink: 0 !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    font-size: 15px !important; font-weight: 800 !important; color: #fff !important;
    margin: 0 !important; padding: 0 !important; position: static !important; float: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.15) !important;
}
.pc-title-group { flex: 1 !important; min-width: 0 !important; padding-right: 44px !important; margin: 0 !important; }
.pc-title { font-size: 14px !important; font-weight: 700 !important; color: #111827 !important; line-height: 1.3 !important; margin: 0 !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
.pc-subtitle { font-size: 11.5px !important; color: #9ca3af !important; margin-top: 2px !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }

/* --- Icon: buộc nhỏ 12px, kể cả khi Font Awesome JS chuyển sang <svg> --- */
.pc-field-icon,
.pc-field-icon.svg-inline--fa,
.pc-field-icon svg,
.pc-field .svg-inline--fa {
    width: 28px !important; height: 28px !important; min-width: 28px !important;
    font-size: 12px !important; line-height: 1 !important;
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    border-radius: 8px !important; background: #f3f4f6 !important;
    margin: 0 !important; padding: 0 !important; vertical-align: middle !important;
}
.pc-field-icon .svg-inline--fa { width: 12px !important; height: 12px !important; }

/* Icon trạng thái (fa-circle) → chấm tròn nhỏ màu, không to */
.pc-field-icon.fa-circle, .pc-field-icon .fa-circle, .pc-field-icon.svg-inline--fa.fa-circle {
    width: 10px !important; height: 10px !important; min-width: 10px !important;
    border-radius: 50% !important; background: var(--accent, #3b82f6) !important;
    margin-left: 9px !important; margin-right: 9px !important;
}
.pc-field-icon.fa-circle::before, .pc-field-icon.svg-inline--fa.fa-circle::before { display: none !important; }

/* --- Text giá trị: KHÔNG cắt "..." nữa, cho xuống dòng gọn gàng --- */
.pc-field {
    display: grid !important; grid-template-columns: 28px 1fr auto !important;
    align-items: center !important; gap: 8px !important;
    min-height: 0 !important; padding: 0 !important; margin: 0 !important;
}
.pc-field-label {
    font-size: 11.5px !important; color: #9ca3af !important; font-weight: 500 !important;
    text-align: left !important; margin: 0 !important; padding: 0 !important;
    overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important;
}
.pc-field-value {
    font-size: 12.5px !important; font-weight: 700 !important; color: #111827 !important;
    text-align: right !important; margin: 0 !important; padding: 0 !important;
    max-width: none !important; white-space: normal !important; line-height: 1.35 !important;
    word-break: break-word !important;
}
.pc-highlight .pc-field-value { color: var(--accent, #3b82f6) !important; font-size: 13px !important; }
.pc-body { gap: 9px !important; padding: 4px 16px 12px !important; }

/* --- Badge trạng thái góc phải: không che title --- */
.pc-badge { top: 12px !important; right: 12px !important; font-size: 10.5px !important; padding: 3px 8px !important; max-width: 42% !important; }

/* --- Nút thao tác: đồng bộ kích thước --- */
.pc-actions { padding: 8px 12px !important; gap: 5px !important; }
.pc-actions .btn, .pc-actions a, .pc-actions button, .pc-actions .svg-inline--fa {
    font-size: 11px !important; width: auto !important; height: auto !important;
}

/* ============================================================
 * FIX p15 — HỆ THỐNG CARD VIEW CHUYÊN NGHIỆP (reset + thiết kế lại)
 * Phân vùng rõ: Header | Divider | Thông tin | Divider | Hành động
 * Icon 16px có màu + NHÃN TEXT đầy đủ + giá trị rõ ràng
 * ============================================================ */

/* Reset toàn bộ style card cũ (p11-p14) để không xung đột */
.premium-card, .premium-card-grid, .auto-card-item, .auto-card-grid,
.pc-accent-bar, .pc-field, .pc-field-icon, .pc-field-label, .pc-field-value,
.pc-highlight, .pc-actions, .pc-badge, .pc-avatar, .pc-header, .pc-title,
.pc-subtitle, .pc-title-group, .pc-body { all: revert; }

/* Lưới card */
.pc-grid { margin-top: 10px !important; display: flex !important; flex-wrap: wrap !important; align-items: stretch !important; }
.pc-col { display: flex !important; margin-bottom: 4px !important; }

/* Card chính */
.pc-card {
    position: relative !important;
    width: 100% !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px rgba(16,24,40,.06) !important;
    transition: transform .25s ease, box-shadow .25s ease !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    margin: 0 !important;
}
.pc-card:hover { transform: translateY(-3px) !important; box-shadow: 0 10px 24px rgba(16,24,40,.10) !important; border-color: #d1d5db !important; }

/* Thanh màu nhấn trên đầu */
.pc-accent { height: 4px !important; width: 100% !important; flex-shrink: 0 !important; }

/* Badge trạng thái */
.pc-badge {
    position: absolute !important; top: 12px !important; right: 12px !important;
    padding: 3px 9px !important; border-radius: 999px !important;
    font-size: 10.5px !important; font-weight: 700 !important; border: 1px solid !important;
    max-width: 45% !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important;
    z-index: 3 !important; line-height: 1.4 !important;
}

/* Vùng Header: avatar + title */
.pc-header {
    display: flex !important; align-items: center !important; gap: 12px !important;
    padding: 16px 16px 12px !important; margin: 0 !important;
}
.pc-avatar {
    width: 44px !important; height: 44px !important; min-width: 44px !important;
    border-radius: 50% !important; flex-shrink: 0 !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    color: #fff !important; font-weight: 800 !important; font-size: 15px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.15) !important; margin: 0 !important; padding: 0 !important;
}
.pc-avatar-code i { font-size: 18px !important; color: #fff !important; }
.pc-title-group { flex: 1 !important; min-width: 0 !important; padding-right: 46px !important; margin: 0 !important; }
.pc-title { font-size: 14.5px !important; font-weight: 700 !important; color: #111827 !important; line-height: 1.3 !important; margin: 0 !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
.pc-subtitle { font-size: 12px !important; color: #6b7280 !important; margin-top: 3px !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }

/* Đường phân cách vùng */
.pc-divider { height: 1px !important; background: #f3f4f6 !important; margin: 0 16px !important; flex-shrink: 0 !important; }

/* Vùng thông tin: icon + NHÃN TEXT + giá trị */
.pc-body { padding: 12px 16px !important; display: flex !important; flex-direction: column !important; gap: 10px !important; flex: 1 !important; margin: 0 !important; }
.pc-field {
    display: grid !important; grid-template-columns: 30px 1fr auto !important;
    align-items: center !important; gap: 10px !important; margin: 0 !important; padding: 0 !important;
    min-height: 0 !important;
}
/* Icon: 16px rõ ràng, có màu, nền nhạt */
.pc-field-icon {
    width: 30px !important; height: 30px !important; min-width: 30px !important;
    border-radius: 8px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important;
    margin: 0 !important; padding: 0 !important;
}
.pc-field-icon i, .pc-field-icon .svg-inline--fa { font-size: 15px !important; width: 15px !important; height: 15px !important; line-height: 1 !important; }
/* Nhãn text: đầy đủ, rõ ràng, KHÔNG cắt */
.pc-field-label {
    font-size: 12.5px !important; color: #6b7280 !important; font-weight: 500 !important;
    text-align: left !important; margin: 0 !important; padding: 0 !important;
    line-height: 1.35 !important; word-break: break-word !important;
}
/* Giá trị: đậm, rõ, đầy đủ */
.pc-field-value {
    font-size: 13px !important; font-weight: 700 !important; color: #111827 !important;
    text-align: right !important; margin: 0 !important; padding: 0 !important;
    max-width: 55% !important; line-height: 1.35 !important; word-break: break-word !important;
}

/* Vùng hành động: nút có CHỮ, dễ thao tác */
.pc-actions {
    padding: 10px 16px !important; display: flex !important; justify-content: flex-end !important;
    gap: 6px !important; flex-wrap: wrap !important; flex-shrink: 0 !important;
    background: #fafafa !important; margin: 0 !important;
}
.pc-action-btn {
    display: inline-flex !important; align-items: center !important; gap: 5px !important;
    padding: 5px 10px !important; font-size: 11.5px !important; font-weight: 600 !important;
    border-radius: 7px !important; line-height: 1.3 !important; text-decoration: none !important;
}
.pc-btn-label { font-size: 11px !important; margin-left: 3px !important; }
.pc-actions .svg-inline--fa { font-size: 12px !important; width: 12px !important; height: 12px !important; }

/* Mobile: 1 cột, thoáng hơn */
@media (max-width: 576px) {
    .pc-field-value { max-width: 50% !important; font-size: 12.5px !important; }
    .pc-field-label { font-size: 12px !important; }
}

/* ============================================================
 * FIX p16 — Sửa lỗi từ ảnh chụp (tên bị cắt, badge vô nghĩa,
 * giá trị cắt ngang, nút 2 hàng, card cao)
 * ============================================================ */

/* Tên chính: HIỂN THỊ ĐẦY ĐỦ, tối đa 2 dòng, KHÔNG cắt "..." */
.pc-title {
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    line-height: 1.3 !important;
    max-height: 2.6em !important;
    font-size: 14px !important;
    word-break: break-word !important;
}
.pc-title-group { padding-right: 12px !important; }

/* Giá trị: rộng hơn, xuống dòng gọn, KHÔNG cắt giữa chữ */
.pc-field { grid-template-columns: 28px 1fr auto !important; gap: 8px !important; }
.pc-field-value { max-width: 62% !important; font-size: 12.5px !important; line-height: 1.35 !important; word-break: break-word !important; white-space: normal !important; }
.pc-field-label { font-size: 12px !important; white-space: normal !important; line-height: 1.3 !important; }

/* Giá trị dài (wide): full-width dưới label */
.pc-field-wide { grid-template-columns: 28px 1fr !important; margin-bottom: 2px !important; }
.pc-field-value-wide {
    padding-left: 36px !important; font-size: 12.5px !important; font-weight: 700 !important;
    color: #111827 !important; line-height: 1.35 !important; margin-bottom: 8px !important; word-break: break-word !important;
}

/* Nút thao tác: nhỏ gọn, 3 nút nằm chung 1 hàng */
.pc-actions { padding: 8px 12px !important; gap: 5px !important; justify-content: center !important; }
.pc-action-btn { padding: 4px 8px !important; font-size: 11px !important; flex: 0 1 auto !important; white-space: nowrap !important; }
.pc-btn-label { font-size: 10.5px !important; }

/* Giảm khoảng cách để card gọn hơn */
.pc-body { gap: 8px !important; padding: 10px 14px !important; }
.pc-header { padding: 14px 14px 10px !important; gap: 10px !important; }
.pc-avatar { width: 40px !important; height: 40px !important; min-width: 40px !important; font-size: 14px !important; }
