:root {
    --primary: #2563eb;
    --secondary: #1e40af;
    --dark: #1f2937;
    --light: #f3f4f6;
    --white: #ffffff;
    --sidebar-width: 260px;
}

/* --- AUTH PAGE --- */
.rcm-auth-container { max-width: 400px; margin: 50px auto; background: var(--white); padding: 30px; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.rcm-auth-branding { text-align: center; margin-bottom: 25px; }
.auth-logo { max-height: 60px; margin-bottom: 10px; }
.rcm-tabs { display: flex; margin-bottom: 20px; border-bottom: 2px solid var(--light); }
.tab-btn { flex: 1; padding: 10px; background: none; border: none; cursor: pointer; font-weight: bold; color: #666; }
.tab-btn.active { color: var(--primary); border-bottom: 2px solid var(--primary); margin-bottom: -2px; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* --- LAYOUT CHUNG --- */
.rcm-wrapper { display: flex; min-height: 100vh; background: var(--light); font-family: 'Roboto', sans-serif; }
.rcm-sidebar { width: var(--sidebar-width); background: var(--dark); color: var(--white); flex-shrink: 0; transition: transform 0.3s ease; display: flex; flex-direction: column; z-index: 1000; }
.rcm-main-content { flex: 1; padding: 20px; overflow-x: auto; position: relative; }

/* --- SIDEBAR --- */
.sidebar-brand { padding: 20px; text-align: center; border-bottom: 1px solid #374151; }
.sidebar-logo { max-width: 80%; height: auto; }
.sidebar-brand h3 { margin: 0; color: white; font-size: 1.2rem; }
.user-profile { padding: 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #374151; background: rgba(255,255,255,0.05); }
.avatar-circle { width: 40px; height: 40px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; flex-shrink: 0; }
.user-text h4 { margin: 0; font-size: 0.9rem; }
.user-text small { color: #9ca3af; font-size: 0.8rem; }

.rcm-nav { list-style: none; padding: 0; margin: 10px 0; flex: 1; overflow-y: auto; }
.rcm-nav li.nav-header { padding: 15px 20px 5px; font-size: 0.7rem; color: #6b7280; font-weight: bold; letter-spacing: 1px; }
.rcm-nav li a { display: block; padding: 10px 20px; color: #d1d5db; text-decoration: none; display: flex; align-items: center; gap: 10px; transition: 0.2s; font-size: 0.95rem; }
.rcm-nav li a:hover, .rcm-nav li a.active { background: #374151; color: var(--white); border-left: 3px solid var(--primary); }
.rcm-nav li a.logout { color: #ef4444; margin-top: auto; border-top: 1px solid #374151; }

/* --- CARD & FORM --- */
.rcm-card { background: var(--white); padding: 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 20px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; font-size: 0.9rem; }
input, select, textarea { width: 100%; padding: 10px; border: 1px solid #d1d5db; border-radius: 6px; box-sizing: border-box; font-family: 'Roboto', sans-serif; }
.rcm-btn { background: var(--primary); color: white; padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer; width: 100%; font-weight: 600; display: inline-block; text-align: center; }
.rcm-btn:hover { background: var(--secondary); }

/* --- MOBILE HEADER (FIX LỖI HIỂN THỊ MENU) --- */
.rcm-mobile-header { 
    display: none; /* Mặc định ẩn trên Desktop */
    background: var(--dark); 
    color: white; 
    padding: 15px; 
    align-items: center; 
    justify-content: space-between;
    position: sticky; 
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    min-height: 60px; /* Đảm bảo chiều cao tối thiểu */
}

/* Nút Menu Mobile - Dùng kỹ thuật Unicode thay vì Font Icon */
#rcm-menu-toggle {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 24px; /* Kích thước lớn */
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px; /* Touch target chuẩn */
    height: 44px;
}

/* Fallback content nếu dashicon lỗi */
#rcm-menu-toggle::before {
    content: "\2630"; /* Ký tự 3 gạch ngang (Hamburger Menu) */
    font-family: Arial, sans-serif; /* Font hệ thống an toàn */
    font-style: normal;
}

/* Ẩn dashicon gốc nếu theme không load font */
#rcm-menu-toggle .dashicons {
    display: none; 
}

.mobile-brand { 
    font-weight: bold; 
    font-size: 1.1rem; 
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .rcm-wrapper { flex-direction: column; }
    
    /* Bắt buộc hiển thị Header Mobile */
    .rcm-mobile-header { display: flex !important; } 
    
    /* Sidebar trượt */
    .rcm-sidebar { 
        position: fixed; top: 0; left: 0; bottom: 0; 
        transform: translateX(-100%); 
        width: 280px; 
        box-shadow: 2px 0 10px rgba(0,0,0,0.5);
        transition: transform 0.3s ease-in-out;
    }
    .rcm-sidebar.active { transform: translateX(0); }
    
    .rcm-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 998; }
    .rcm-overlay.active { display: block; }
    
    .rcm-main-content { padding: 15px; margin-top: 0; }
}

/* --- MODAL --- */
.rcm-modal { position: fixed; z-index: 99999; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); }
.rcm-modal-content { background-color: #fefefe; margin: 10% auto; padding: 20px; border: 1px solid #888; width: 90%; max-width: 600px; border-radius: 8px; position: relative; animation: slideDown 0.3s ease; }
.rcm-close-modal { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; position: absolute; right: 15px; top: 10px; }
@keyframes slideDown { from {top: -50px; opacity: 0} to {top: 0; opacity: 1} }
.loading-spinner { text-align: center; padding: 30px; color: #666; font-style: italic; }