:root { --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%); --glass-bg: rgba(255, 255, 255, 0.25); --glass-border: rgba(255, 255, 255, 0.4); --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); --text-color: #333; --text-light: #fff; --input-bg: rgba(255, 255, 255, 0.6); --danger: #ff6b6b; --success: #2ecc71; --warning: #f39c12; --nav-height: 70px; }
body.dark-mode { --bg-gradient: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%); --glass-bg: rgba(0, 0, 0, 0.5); --glass-border: rgba(255, 255, 255, 0.1); --text-color: #e0e0e0; --input-bg: rgba(0, 0, 0, 0.5); }
* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background: var(--bg-gradient); min-height: 100vh; color: var(--text-color); position: relative; overflow-x: hidden; padding-bottom: 50px; }

/* Blobs */
.blob { position: fixed; filter: blur(40px); z-index: 0; opacity: 0.8; animation: float 10s infinite ease-in-out alternate; }
.blob-1 { top: 5%; left: 5%; width: 350px; height: 350px; background: #ff9a9e; border-radius: 40% 60% 70% 30%; animation-delay: 0s; }
.blob-2 { bottom: 10%; right: 5%; width: 300px; height: 300px; background: #a18cd1; border-radius: 60% 40% 30% 70%; animation-delay: -2s; }
.blob-3 { top: 30%; left: 40%; width: 250px; height: 250px; background: #84fab0; border-radius: 30% 70% 70% 30%; animation-delay: -4s; }
@keyframes float { 0% { transform: translate(0, 0) rotate(0deg); } 100% { transform: translate(40px, 60px) rotate(15deg); } }

/* NAVBAR & LAYOUT */
.glass-nav { 
    background: var(--glass-bg); 
    backdrop-filter: blur(15px); 
    padding: 1rem 0; 
    position: sticky; 
    top: 0; 
    z-index: 100; 
    border-bottom: 1px solid var(--glass-border); 
    transition: transform 0.3s ease-in-out;
}
.glass-nav.nav-hidden { transform: translateY(-100%); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; position: relative; z-index: 10; }
.nav-content { display: flex; justify-content: space-between; align-items: center; }
.logo a { font-size: 1.5rem; font-weight: bold; color: #fff; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.nav-links { display: flex; align-items: center; gap: 15px; }
.nav-links a { color: var(--text-light); text-decoration: none; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,0.5); white-space: nowrap;}

/* MOBILE OPTIMIZATION */
@media (max-width: 768px) {
    .nav-content { flex-direction: column; gap: 10px; align-items: flex-start; }
    .nav-links { 
        width: 100%; 
        overflow-x: auto; /* Scroll ngang */
        padding-bottom: 5px; 
        -webkit-overflow-scrolling: touch; /* Smooth scroll iOS */
        justify-content: flex-start;
    }
    .nav-links::-webkit-scrollbar { height: 0px; } /* Ẩn scrollbar */
    .glass-card { padding: 1.5rem; margin: 10px 0; }
}

/* CARDS & FORMS */
.glass-card { background: var(--glass-bg); box-shadow: var(--glass-shadow); backdrop-filter: blur(16px); border-radius: 20px; border: 1px solid var(--glass-border); padding: 2rem; margin: 1rem 0; transition: transform 0.3s ease; }
.glass-card:hover { transform: translateY(-5px); }
.auth-container { max-width: 400px; margin: 10vh auto; }

input, select, textarea, button { width: 100%; padding: 12px; margin-bottom: 15px; border-radius: 12px; border: 1px solid var(--glass-border); background: var(--input-bg); color: var(--text-color); outline: none; transition: all 0.3s; }
input:focus { background: rgba(255,255,255,0.9); box-shadow: 0 0 15px rgba(255,255,255,0.5); }
button { background: rgba(255,255,255,0.4); cursor: pointer; font-weight: bold; color: var(--text-color); }
button:hover { background: rgba(255,255,255,0.7); }
.btn-sm { width: auto; padding: 6px 12px; font-size: 0.85rem; margin: 2px; display: inline-block; text-decoration: none; border: 1px solid var(--glass-border); border-radius: 8px; cursor: pointer; color: var(--text-color); background: rgba(255,255,255,0.2); transition: 0.2s; }
.btn-sm:hover { background: rgba(255,255,255,0.5); }

/* EXTRAS */
.search-box { display: flex; gap: 10px; margin-bottom: 20px; }
.search-box input { margin-bottom: 0; }
.user-avatar-small { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 5px; border: 2px solid rgba(255,255,255,0.5); }
.user-avatar-large { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid rgba(255,255,255,0.3); margin-bottom: 15px; }

/* KANBAN & TASK */
.kanban-board { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 20px; }
.kanban-col { flex: 1; min-width: 300px; }
.kanban-header { font-weight: bold; margin-bottom: 15px; color: var(--text-light); text-align: center; background: rgba(0,0,0,0.2); padding: 10px; border-radius: 10px; }
.bg-todo { background: var(--warning); }
.bg-progress { background: #3498db; }
.bg-done { background: var(--success); }
.task-meta { font-size: 0.75rem; opacity: 0.8; margin-top: 5px; display: flex; justify-content: space-between; align-items: center;}
.countdown { font-weight: bold; color: var(--danger); background: rgba(255,255,255,0.3); padding: 2px 6px; border-radius: 4px; }
.countdown.safe { color: var(--success); }
.badge { padding: 4px 8px; border-radius: 8px; font-size: 0.8rem; color: #fff; }
.text-center { text-align: center; }
.toggle-mode { background: none; border: none; font-size: 1.5rem; cursor: pointer; width: auto; color: #fff; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.1); }
th { color: var(--text-light); font-weight: 600; }
.chart-container { position: relative; height: 280px; width: 100%; } /* Cao hơn chút */

/* BACK TO TOP */
#backToTop {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    font-size: 18px;
    border: none;
    outline: none;
    background-color: rgba(0,0,0,0.5);
    color: white;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    transition: background-color 0.3s;
}
#backToTop:hover { background-color: rgba(0,0,0,0.8); }