#dashboard-view {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, #004d40 100%);
    padding: 2.5rem; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
#dashboard-view::before {
    content: ''; position: absolute; top: -20%; right: -10%; width: 60vw; height: 60vw;
    background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
    opacity: 0.15; border-radius: 50%; pointer-events: none;
}

.dashboard-header { text-align: center; margin-bottom: 2.5rem; animation: fadeInDown 0.8s ease; position: relative; z-index: 2; }
.dashboard-header h1 { font-family: 'Roboto Slab', serif; font-size: 3.5rem; color: white; margin: 0; text-transform: uppercase; letter-spacing: 2px; text-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.dashboard-header p { font-size: 1.5rem; color: var(--color-accent); margin-top: 10px; font-weight: 500; text-shadow: 0 2px 5px rgba(0,0,0,0.3); }

.kiosk-grid {
    position: relative; z-index: 2; display: grid;
    /* [UPDATED] Chuyển px sang rem: 280px -> 17.5rem, 30px -> 1.875rem, 1400px -> 87.5rem */
    grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
    gap: 1.875rem; width: 100%; max-width: 87.5rem; height: auto;
    justify-content: center; margin-bottom: 5rem;
}

.kiosk-card {
    background: white; border-radius: 20px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    cursor: pointer; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-bottom: 6px solid transparent; position: relative; overflow: hidden;
    padding: 1.5rem 1.25rem; min-height: 13.125rem; /* 210px -> 13.125rem */
}
.kiosk-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.15); }
.kiosk-card:active { transform: scale(0.95); }
.kiosk-card i { font-size: 3.2rem; margin-bottom: 15px; transition: 0.3s; }
.kiosk-card h3 { font-size: 1.3rem; margin: 0; font-weight: 700; text-transform: uppercase; text-align: center; line-height: 1.4; }
.kiosk-card span { font-size: 0.95rem; margin-top: 6px; opacity: 0.8; text-align: center; font-weight: 400; }

/* Card Colors */
.card-legal { color: #2e7d32; border-bottom-color: #2e7d32; } .card-legal:hover { background: #e8f5e9; }
.card-schedule { color: #1565c0; border-bottom-color: #1565c0; } .card-schedule:hover { background: #e3f2fd; }
.card-psych { color: #7b1fa2; border-bottom-color: #7b1fa2; } .card-psych:hover { background: #f3e5f5; }
.card-career { color: #ef6c00; border-bottom-color: #ef6c00; } .card-career:hover { background: #fff3e0; }
.card-event { color: #c62828; border-bottom-color: #c62828; } .card-event:hover { background: #ffebee; }
.card-ranking { color: #f9a825; border-bottom-color: #f9a825; } .card-ranking:hover { background: #fffde7; }
.card-menu { color: #d84315; border-bottom-color: #d84315; } .card-menu:hover { background: #fbe9e7; }
.card-feedback { color: #00838f; border-bottom-color: #00838f; } .card-feedback:hover { background: #e0f7fa; }

.btn-back-dashboard {
    position: fixed; bottom: 1.875rem; left: 1.875rem; z-index: 9999;
    width: 4rem; height: 4rem; border-radius: 50%;
    background: var(--color-primary); color: var(--color-accent); 
    border: 4px solid white; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; cursor: pointer; box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.btn-back-dashboard:hover { background: white; color: var(--color-primary); transform: scale(1.15) rotate(90deg); box-shadow: 0 12px 35px rgba(0,0,0,0.5); }

.dashboard-ticker-wrapper {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: rgba(0, 77, 64, 0.9); color: white;
    height: 3.125rem; display: flex; align-items: center;
    backdrop-filter: blur(5px); z-index: 10; border-top: 1px solid rgba(255,255,255,0.2);
}
.db-ticker-label { background: var(--color-accent); color: #263238; height: 100%; padding: 0 20px; display: flex; align-items: center; font-weight: bold; text-transform: uppercase; font-size: 0.9rem; box-shadow: 4px 0 10px rgba(0,0,0,0.2); z-index: 2; }
.db-ticker-content { flex: 1; overflow: hidden; position: relative; height: 100%; display: flex; align-items: center; }
.db-ticker-text { white-space: nowrap; animation: ticker-scroll 60s linear infinite; padding-left: 100%; font-size: 1.1rem; }
@keyframes ticker-scroll { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(-100%, 0, 0); } }

/* =================================================================================
   3. ROLE BASED ACCESS CONTROL (RBAC) STYLES - REDESIGNED
   ================================================================================= */

#role-selection-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    /* [FIX] Đặt màu nền đặc để che Dashboard bên dưới */
    background-color: #004d40; 
    /* [FIX] Kết hợp các lớp nền: Radial (hiệu ứng) + Linear (màu chính) */
    background-image: 
        radial-gradient(at 10% 10%, rgba(255,255,255,0.1) 0%, transparent 40%),
        radial-gradient(at 90% 90%, rgba(255,255,255,0.1) 0%, transparent 40%),
        linear-gradient(135deg, #004d40 0%, #00695c 100%);
    z-index: 9990;
    display: none; /* JS toggles flex */
    flex-direction: column; align-items: center; justify-content: center;
}

.role-header {
    text-align: center; margin-bottom: 3.75rem; animation: fadeInDown 0.8s ease;
}
.role-logo-circle {
    width: 6.25rem; height: 6.25rem; background: white; border-radius: 50%;
    padding: 15px; margin: 0 auto 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.role-logo-circle img { width: 100%; height: 100%; object-fit: contain; }
.role-header h1 {
    font-family: 'Roboto Slab', serif; color: white; font-size: 2.5rem; margin: 0;
    text-transform: uppercase; letter-spacing: 2px; text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.role-header p {
    color: rgba(255,255,255,0.8); font-size: 1.2rem; margin-top: 10px; font-weight: 300;
}

.role-cards-container {
    display: flex; gap: 2.5rem; perspective: 1000px;
}

.role-card {
    width: 16.25rem; height: 20rem; /* 260px, 320px */
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.5);
    position: relative; overflow: hidden;
}

.role-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
    background: white;
}

.role-icon-box {
    width: 6.25rem; height: 6.25rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 25px; transition: all 0.3s ease;
    background: #f5f5f5;
}
.role-icon-box i { font-size: 3.5rem; }

/* Role Colors */
.role-icon-box.student { color: #008f45; background: #e8f5e9; }
.role-icon-box.teacher { color: #f57c00; background: #fff3e0; }
.role-icon-box.admin { color: #d32f2f; background: #ffebee; }

.role-card:hover .role-icon-box.student { background: #008f45; color: white; }
.role-card:hover .role-icon-box.teacher { background: #f57c00; color: white; }
.role-card:hover .role-icon-box.admin { background: #d32f2f; color: white; }

.role-info h3 {
    font-size: 1.4rem; font-weight: 800; margin: 0; color: #37474f;
    text-transform: uppercase; letter-spacing: 1px;
    text-align: center;
}
.role-info span {
    display: block; font-size: 0.85rem; color: #78909c; margin-top: 8px;
    padding: 0 20px; line-height: 1.4; text-align: center;
}

.role-arrow {
    position: absolute; bottom: 20px; width: 40px; height: 40px;
    border-radius: 50%; background: #eceff1; color: #b0bec5;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s; opacity: 0; transform: translateY(10px);
}
.role-card:hover .role-arrow {
    opacity: 1; transform: translateY(0);
    background: #263238; color: white;
}

.role-footer {
    position: absolute; bottom: 30px; color: rgba(255,255,255,0.4); font-size: 0.9rem;
}

/* Animation Stagger */
.role-card:nth-child(1) { animation: fadeInUp 0.6s ease 0.1s backwards; }
.role-card:nth-child(2) { animation: fadeInUp 0.6s ease 0.2s backwards; }
.role-card:nth-child(3) { animation: fadeInUp 0.6s ease 0.3s backwards; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}


/* 3.3. Dashboard Containers (Role Wrappers) */
.role-dashboard {
    width: 100%;
    display: none; /* Mặc định ẩn */
    justify-content: center;
}

/* Khi active sẽ được JS set display: flex/block */
.role-dashboard.active {
    display: flex;
    animation: fadeIn 0.5s ease;
}

/* 3.4. Modal Nhập PIN */
#auth-modal {
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.6) !important; /* Override inline style opacity */
}

#auth-modal > div {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    width: 400px;
    text-align: center;
    animation: zoomIn 0.3s ease;
    position: relative;
}

#auth-pin-input {
    font-size: 2.5rem !important;
    letter-spacing: 15px !important;
    text-align: center;
    border: 2px solid #e0e0e0 !important;
    border-radius: 12px !important;
    padding: 15px !important;
    width: 100% !important;
    margin: 25px 0 !important;
    font-family: 'Roboto Mono', monospace;
    color: #333;
    background: #f5f5f5;
    transition: all 0.3s;
}

#auth-pin-input:focus {
    border-color: var(--color-primary) !important;
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 143, 69, 0.1);
}

/* =================================================================================
   4. INTRO ANIMATION (WINDOWS 11 STYLE)
   ================================================================================= */
/* [NEW] SILK INTRO SCREEN CONTAINER */
#silk-intro-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    /* Nền Gradient tối sang trọng: Xanh đen -> Xanh ngọc đậm */
    background: linear-gradient(135deg, #001020 0%, #004d40 100%);
    z-index: 20000;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; /* Cắt bỏ phần sóng tràn ra ngoài */
    animation: introFadeOut 0.5s ease-in-out 2.5s forwards; /* Tự biến mất sau 2.5s */
}

/* [NEW] SILK WAVES EFFECT */
.silk-wave {
    position: absolute;
    border-radius: 40%; /* Bo tròn tạo hình dáng mềm mại */
    opacity: 0.4;
    filter: blur(20px); /* Làm mờ biên để tạo cảm giác khói/lụa */
    animation: floatSilk 10s infinite linear;
}

/* Wave 1: Xanh dương chủ đạo */
.wave1 {
    top: -20%; left: -20%; width: 80%; height: 80%;
    background: linear-gradient(45deg, #01579b, #00acc1);
    animation-duration: 12s;
}

/* Wave 2: Vàng Gold điểm nhấn (Tạo sự sang trọng) */
.wave2 {
    bottom: -30%; right: -20%; width: 90%; height: 90%;
    background: linear-gradient(45deg, #ff6f00, #ffd700);
    opacity: 0.15; /* Mờ hơn để không lấn át */
    animation-duration: 15s;
    animation-direction: reverse; /* Xoay ngược chiều */
}

/* Wave 3: Xanh Navy đậm (Tạo chiều sâu) */
.wave3 {
    top: 30%; left: 30%; width: 70%; height: 70%;
    background: linear-gradient(45deg, #1a237e, #311b92);
    animation-duration: 18s;
}

@keyframes floatSilk {
    0% { transform: rotate(0deg) translate(0, 0); }
    50% { transform: rotate(180deg) translate(30px, 30px); }
    100% { transform: rotate(360deg) translate(0, 0); }
}

/* [NEW] INTRO TEXT STYLES */
.intro-title {
    font-family: 'Roboto Slab', serif; color: white; font-size: 2.2rem;
    margin: 10px 0 5px 0; text-shadow: 0 4px 15px rgba(0,0,0,0.5);
    letter-spacing: 2px; font-weight: 700;
}
.intro-subtitle {
    color: #b2dfdb; font-size: 1rem; text-transform: uppercase;
    letter-spacing: 4px; margin-bottom: 30px; font-weight: 300;
}
.intro-loading-text {
    color: rgba(255,255,255,0.6); font-size: 0.9rem; margin-top: 15px; font-style: italic;
}

.intro-content {
    position: relative; z-index: 10; /* Nổi lên trên các lớp sóng */
    display: flex; flex-direction: column; align-items: center;
    animation: introZoom 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* [NEW] APP LOGO STYLE (Metallic Halo) */
.app-logo {
    /* 1. Tăng kích thước lớn hơn */
    width: 150px; 
    height: 150px;
    
    /* QUAN TRỌNG: Ép ảnh lấp đầy khung tròn */
    object-fit: cover !important;
    
    border-radius: 50%;
    border: none !important; /* [MOD] Bỏ viền vàng */
    
    /* Xóa nền và padding thừa */
    padding: 0 !important;
    background-color: transparent !important;
    
    /* Bóng đổ nhẹ tự nhiên */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.intro-logo {
    /* Logo màn hình chờ to hơn nữa */
    width: 180px; height: 180px; margin-bottom: 40px;
    
    border-radius: 50%;
    border: none !important; /* [MOD] Bỏ viền vàng */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    object-fit: cover !important;
    background-color: transparent !important;
    padding: 0 !important;
}

.intro-loader {
    width: 40px; height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* [NEW] Apply Halo to Header Logos */
.dashboard-header img,
.logo-badge img {
    border-radius: 50%;
    border: none !important; /* [MOD] Bỏ viền vàng */
    box-shadow: none;
    object-fit: cover !important;
    background-color: transparent !important;
    padding: 0 !important;
}

/* [NEW] Fix container logo-badge để xóa nền trắng/khung trắng thừa */
.logo-badge {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

@keyframes introZoom { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes introFadeOut { to { opacity: 0; visibility: hidden; } }
@keyframes spin { 100% { transform: rotate(360deg); } }
