:root {
    --bg-color: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --info-color: #0ea5e9;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.bg-mesh {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
                radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.15), transparent 25%);
    z-index: -1;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
}

a { color: var(--primary-color); text-decoration: none; transition: 0.3s; }
a:hover { color: var(--primary-hover); }
.text-gradient {
    background: linear-gradient(to right, #60a5fa, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}
.subtitle { color: var(--text-secondary); margin-bottom: 1.5rem; }

.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 2rem; margin: 1rem; border-radius: 12px;
}
.nav-brand a { font-weight: 700; font-size: 1.5rem; color: var(--text-primary); letter-spacing: 1px;}
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: var(--text-primary); font-weight: 500; }
.nav-links a:hover { color: var(--primary-color); }

.btn {
    padding: 0.6rem 1.2rem; border-radius: 8px; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease; border: none; font-family: 'Inter', sans-serif;
    display: inline-block; text-align: center;
}
.btn-primary { background: var(--primary-color); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4); }
.btn-secondary { background: rgba(255,255,255,0.1); color: #fff; }
.btn-secondary:hover { background: rgba(255,255,255,0.2); }
.btn-outline { background: transparent; border: 1px solid var(--primary-color); color: var(--primary-color); }
.btn-outline:hover { background: rgba(59, 130, 246, 0.1); }
.btn-block { width: 100%; }

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--text-secondary); }
.glass-input {
    width: 100%; padding: 0.8rem; border-radius: 8px;
    background: rgba(0,0,0,0.2); border: 1px solid var(--glass-border);
    color: var(--text-primary); font-family: 'Inter', sans-serif; transition: 0.3s;
    box-sizing: border-box;
}
.glass-input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); }
.glass-input.sm { padding: 0.4rem; font-size: 0.85rem; }

.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }
.auth-wrapper { display: flex; justify-content: center; align-items: center; min-height: 80vh; }
.auth-card { padding: 3rem; width: 100%; max-width: 400px; text-align: center; }

.dashboard-header, .project-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 3rem; }
.stat-card { padding: 1.5rem; text-align: center; }
.stat-value { font-size: 2.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.text-warning { color: var(--warning-color); }
.text-info { color: var(--info-color); }
.text-success { color: var(--success-color); }

.dashboard-content { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.projects-section, .tasks-section { padding: 1.5rem; }
.project-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.project-item { display: block; padding: 1rem; background: rgba(255,255,255,0.05); border-radius: 8px; border: 1px solid transparent; }
.project-item:hover { background: rgba(255,255,255,0.1); border-color: var(--glass-border); transform: translateX(5px); }
.project-item h3 { margin: 0 0 0.5rem 0; color: var(--text-primary); }
.project-item p { margin: 0; color: var(--text-secondary); font-size: 0.9rem; }
.empty-state { color: var(--text-secondary); font-style: italic; }

.task-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.task-item { padding: 1rem; background: rgba(0,0,0,0.2); border-radius: 8px; border-left: 4px solid var(--primary-color); }
.task-info { display: flex; justify-content: space-between; align-items: center; }
.task-info h4 { margin: 0; font-size: 1rem; }

.kanban-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: start; }
.kanban-column { padding: 1rem; min-height: 400px; }
.column-title { margin-top: 0; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--glass-border); text-align: center; }
.kanban-tasks { display: flex; flex-direction: column; gap: 1rem; }
.kanban-card { padding: 1rem; background: rgba(0,0,0,0.2); border-radius: 8px; border-left: 3px solid var(--text-secondary); transition: 0.3s; }
.kanban-card:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.kanban-card h4 { margin: 0 0 0.5rem 0; }
.kanban-card p { margin: 0 0 1rem 0; font-size: 0.85rem; color: var(--text-secondary); }
.kanban-card.border-info { border-left-color: var(--info-color); }
.kanban-card.border-success { border-left-color: var(--success-color); }
.status-form { margin-top: auto; }

.badge { padding: 0.25rem 0.5rem; border-radius: 12px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.badge-admin { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.badge-member { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.badge-to-do { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.badge-in-progress { background: rgba(14, 165, 233, 0.2); color: #7dd3fc; }
.badge-done { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.6); display: flex; justify-content: center; align-items: center; z-index: 1000; backdrop-filter: blur(4px); }
.modal-overlay.hidden { display: none; }
.modal { width: 100%; max-width: 500px; padding: 2rem; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-header h2 { margin: 0; }
.close-btn { background: none; border: none; color: var(--text-secondary); font-size: 1.5rem; cursor: pointer; transition: 0.3s; }
.close-btn:hover { color: var(--text-primary); }

.flash-messages { margin-bottom: 2rem; }
.flash { padding: 1rem; margin-bottom: 1rem; border-radius: 8px; }
.flash-success { border-left: 4px solid var(--success-color); }
.flash-danger { border-left: 4px solid var(--danger-color); }
.flash-warning { border-left: 4px solid var(--warning-color); }
.flash-info { border-left: 4px solid var(--info-color); }

.fade-in { animation: fadeIn 0.5s ease forwards; }
.slide-up { opacity: 0; transform: translateY(20px); animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
    .dashboard-content { grid-template-columns: 1fr; }
    .kanban-board { grid-template-columns: 1fr; }
}
