/* =========================================
    FILE: /root/Home/smartgrade/style.css
    MODULE: SMART GRADE (Nhánh Độc lập)   
    HỆ THỐNG BIẾN MÀU SẮC (CSS VARIABLES)
    Đồng bộ với Smart School mẹ + Tích hợp Aqua Dubai Pastel 🍬
   ========================================= */
   
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Tone Smart School Gốc */
    --bg-deep: #f0fdfa; 
    --border-tech: rgba(8, 145, 178, 0.3);
    --primary-neon: #0891b2; 
    
    /* Tone Aqua Dubai Pastel Kẹo Ngọt (Thêm mới) */
    --aqua-bg: #e0faff;        
    --aqua-card: rgba(255, 255, 255, 0.75); 
    --aqua-primary: #22d3ee;   
    --aqua-hover: #06b6d4;     
    --pink-pastel: #fce7f3;    
    --text-main: #0f766e;      
    --shadow-pastel: rgba(34, 211, 238, 0.25);
}

html, body {
    margin: 0; padding: 0; min-height: 100vh;
    font-family: 'Quicksand', 'Inter', sans-serif;
    color: var(--text-main);
}

/* Nền kẹo ngọt dùng chung cho các trang Admin/Client */
.bg-aqua-pastel {
    background-color: var(--aqua-bg);
    background-image: linear-gradient(135deg, var(--aqua-bg) 0%, var(--pink-pastel) 100%);
    background-attachment: fixed;
}

/* Thẻ kính mờ kẹo ngọt */
.glass-card-sweet {
    background: var(--aqua-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow: 0 15px 35px var(--shadow-pastel);
}

/* Nút bấm viên kẹo */
.btn-sweet {
    background: linear-gradient(135deg, var(--aqua-primary) 0%, var(--aqua-hover) 100%);
    color: white; border: none; border-radius: 50px;
    font-weight: 700; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px var(--shadow-pastel); cursor: pointer;
}
.btn-sweet:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(6, 182, 212, 0.4); }
.btn-sweet:active { transform: scale(0.95); }

/* =========================================
    GLOBAL SWEET MODAL (Thông báo kẹo ngọt dùng chung)
    ========================================= */
.sweet-modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(15, 118, 110, 0.3); backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.sweet-modal-overlay.active { opacity: 1; visibility: visible; }

.sweet-modal-box {
    background: #ffffff; width: 90%; max-width: 400px;
    border-radius: 30px; padding: 30px 20px; text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1), inset 0 0 0 4px var(--pink-pastel);
    transform: scale(0.8) translateY(30px); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.sweet-modal-overlay.active .sweet-modal-box { transform: scale(1) translateY(0); }

.sweet-modal-icon {
    width: 70px; height: 70px; margin: 0 auto 15px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 35px;
}
.sweet-modal-icon.success { background: #dcfce7; color: #10b981; box-shadow: 0 0 20px rgba(16, 185, 129, 0.3); }
.sweet-modal-icon.error { background: #ffe4e6; color: #f43f5e; box-shadow: 0 0 20px rgba(244, 63, 94, 0.3); }
.sweet-modal-icon.warning { background: #fef3c7; color: #f59e0b; box-shadow: 0 0 20px rgba(245, 158, 11, 0.3); }

.sweet-modal-title { font-size: 1.3rem; font-weight: 800; color: var(--text-main); margin-bottom: 8px; }
.sweet-modal-message { font-size: 0.95rem; color: #64748b; line-height: 1.5; margin-bottom: 20px; font-weight: 500; white-space: pre-line;}


/* =========================================
CUSTOM CSS CHO TRANG CHỦ (INDEX 1:1:2)
========================================= */
.index-page-body {
    background: radial-gradient(circle at top right, #48b1bf, #06728a); /* Nền sáng và sâu hơn một chút */
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Lớp kính mờ sáng hơn và có viền tách bạch */
.index-glass {
    background: rgba(255, 255, 255, 0.22); 
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4); 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.index-menu-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 7px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #ffffff; /* Đảm bảo chữ luôn trắng */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); /* Đổ bóng chữ để dễ đọc */
}

.index-menu-item:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(6px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.index-menu-item i { transition: all 0.3s ease; }
.index-menu-item:hover i { transform: scale(1.15); filter: drop-shadow(0 0 5px rgba(255,255,255,0.7)); }

.index-feature-card { transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.index-feature-card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.6); }

.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.35); border-radius: 10px; }


/* =========================================
TỐI ƯU HIỂN THỊ KHUNG CHAT (MỚI)
========================================= */

/* Tin nhắn người dùng: Màu Xanh Navy Sâu để chữ trắng cực kỳ dễ đọc */
.chat-bubble-user { 
    background: linear-gradient(135deg, #1e3a8a, #312e81); 
    color: #ffffff; 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.4); 
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

/* Tin nhắn Bot: Nền trắng đục, chữ tối màu rõ nét */
.chat-bubble-bot { 
    background: rgba(255, 255, 255, 0.98); 
    color: #0f172a; 
    border: 1px solid rgba(255, 255, 255, 0.8); 
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15); 
    font-weight: 500;
}

/* Hiệu ứng 3 dấu chấm (Đang suy nghĩ...) */
.typing-dot { width: 6px; height: 6px; background: #00b5e2; border-radius: 50%; animation: typing 1.4s infinite ease-in-out both; }
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typing { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }