/*
Theme Name: CTVCTT Theme
Theme URI: https://ctvctt.edu.vn
Author: Edward Nguyen
Author URI: https://edsofts.io.vn
Description: Theme phục vụ ứng dụng ctvctt.
Version: 1.4 (UniCore Info Detailed Edition)
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* --- CẤU HÌNH BIẾN MÀU SẮC --- */
:root {
    --bg-color: #f4f7f9;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    
    --blue: #2563eb;
    --purple: #9333ea;
    
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* --- RESET & GLOBAL --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

a { text-decoration: none; color: inherit; }

/* --- DASHBOARD LAYOUT --- */
.dashboard-wrapper {
    width: 100%;
    max-width: 1000px;
    padding: 40px 20px 80px 20px;
    text-align: center;
}

.dashboard-logo {
    max-width: 100px; 
    height: auto;
    display: block; 
    margin: 0 auto 15px auto; 
    mix-blend-mode: multiply; 
}

.dashboard-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center; 
    margin: 10px 0 35px 0; 
    letter-spacing: -0.5px;
    color: #0f172a; 
}

/* --- HƯỚNG DẪN ĐĂNG NHẬP --- */
.login-instructions {
    background: #ffffff;
    border-radius: 20px;
    padding: 25px 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    text-align: left;
}

.instruction-header {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 15px;
}

.instruction-header i {
    color: #10b981;
}

.instruction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.instruction-item {
    display: flex;
    flex-direction: column; /* Đổi sang cột để list dài không bị ép hẹp */
    align-items: flex-start;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.instruction-item:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.inst-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 15px;
}

/* Icon màu sắc theo nhóm */
.admin-icon { background: #e0e7ff; color: #4338ca; }
.teacher-icon { background: #ffedd5; color: #c2410c; }
.student-icon { background: #dcfce7; color: #15803d; }

.inst-content {
    width: 100%;
}

.inst-content h4 {
    font-size: 1.05rem;
    color: #1e293b;
    margin-bottom: 8px;
    font-weight: 700;
}

.inst-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.inst-content strong {
    color: #0f172a;
}

/* Cấu hình list gạch đầu dòng */
.inst-list {
    margin-top: 12px;
    padding-left: 20px;
    font-size: 0.88rem;
    color: #475569;
}

.inst-list li {
    margin-bottom: 6px;
    line-height: 1.4;
}

/* Khung lưu ý (Sinh viên) */
.inst-note-box {
    margin-top: 15px;
    padding: 12px 15px;
    background: #f0fdf4;
    border-left: 3px solid #22c55e;
    border-radius: 6px;
    font-size: 0.88rem;
}

.inst-note-box strong {
    color: #166534;
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.inst-note-box .inst-list {
    margin-top: 5px;
    color: #166534;
}

/* --- GRID SYSTEM & CARD MỚI --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 24px;
}

.card-item {
    background: var(--card-bg);
    padding: 35px 25px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border-color);
}

a.card-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: #bfdbfe; 
}

.icon-box {
    width: 70px;
    height: 70px;
    border-radius: 20px; 
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 24px;
}

.color-purple { color: var(--purple); background: #faf5ff; }

.card-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.card-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* --- UNICORE MAGIC CARD --- */
.unicore-magic-card {
    background: #1e293b !important; 
    border: 1px solid #334155 !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.unicore-magic-card:hover {
    border-color: #10b981; 
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.2);
}

.unicore-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    gap: 10px;
}

.logo-mini-box {
    width: 65px;
    height: 65px;
    border-radius: 12px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-mini-box.white-bg { background: #ffffff; }
.logo-mini-box.dark-bg { background: #ffffff; }

.logo-mini-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.magic-star {
    color: #ffffff;
    font-size: 20px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    animation: pulse-star 2s infinite;
}

@keyframes pulse-star {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.unicore-magic-card h3 {
    color: #f8fafc !important;
    margin-bottom: 4px;
}

.unicore-magic-card p {
    color: #94a3b8 !important;
    font-size: 0.85rem;
}

/* --- FOOTER --- */
.dashboard-footer {
    position: absolute;
    bottom: 20px; 
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    .dashboard-wrapper { padding-top: 20px; }
    
    .login-instructions {
        padding: 20px;
    }

    .instruction-grid {
        grid-template-columns: 1fr;
    }
    
    .card-grid { grid-template-columns: 1fr; }
    
    .card-item { 
        flex-direction: row; 
        text-align: left; 
        padding: 24px; 
        align-items: flex-start;
    }
    
    .icon-box { 
        margin-bottom: 0; 
        margin-right: 20px; 
        width: 60px; 
        height: 60px; 
        font-size: 24px; 
        border-radius: 16px;
        flex-shrink: 0; 
    }
    
    .card-content {
        width: 100%;
    }
}