@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Syne:wght@700;800&display=swap');

:root {
    --primary: #6c47ff;
    --primary-dark: #5535e0;
    --primary-light: #ede9ff;
    --accent: #ff6b6b;
    --success: #00c896;
    --warning: #ffb800;
    --dark: #0f0e17;
    --dark2: #1a1830;
    --card: #ffffff;
    --border: #ececf4;
    --text: #0f0e17;
    --text-muted: #8885a0;
    --bg: #f5f4fc;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.navbar {
    background: var(--dark);
    padding: 0 40px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(108,71,255,0.15);
}

.navbar h1 {
    font-family: 'Syne', sans-serif;
    font-size: 20px;
    color: white;
}

.navbar h1 span { color: var(--primary); }

.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-user { color: #a09dc0; font-size: 14px; font-weight: 500; }
.navbar-user span { color: white; font-weight: 700; }

.btn-logout {
    background: rgba(255,107,107,0.15);
    color: #ff6b6b;
    border: 1px solid rgba(255,107,107,0.3);
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: all 0.2s;
}

.btn-logout:hover { background: #ff6b6b; color: white; }

.auth-wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.auth-left {
    background: var(--dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(108,71,255,0.4) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
}

.auth-left::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0,200,150,0.2) 0%, transparent 70%);
    bottom: -50px;
    left: -50px;
    border-radius: 50%;
}

.auth-brand {
    font-family: 'Syne', sans-serif;
    font-size: 32px;
    color: white;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.auth-brand span { color: var(--primary); }

.auth-tagline {
    color: #6b6890;
    font-size: 16px;
    line-height: 1.7;
    max-width: 380px;
    position: relative;
    z-index: 1;
}

.auth-features {
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #a09dc0;
    font-size: 14px;
}

.auth-feature-icon {
    width: 36px;
    height: 36px;
    background: rgba(108,71,255,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.auth-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: white;
}

.auth-box { width: 100%; max-width: 400px; }

.auth-box h2 {
    font-family: 'Syne', sans-serif;
    font-size: 28px;
    color: var(--dark);
    margin-bottom: 8px;
}

.auth-box p { color: var(--text-muted); font-size: 14px; margin-bottom: 32px; }

.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--dark);
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108,71,255,0.1);
}

.btn-primary {
    width: 100%;
    padding: 13px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(108,71,255,0.3);
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-link a { color: var(--primary); font-weight: 700; text-decoration: none; }

.error-msg {
    background: rgba(255,107,107,0.1);
    border: 1px solid rgba(255,107,107,0.3);
    color: var(--accent);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

.error-msg.show { display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 36px 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 36px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1.5px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.08); }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--primary); }
.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.danger::before { background: var(--accent); }

.stat-icon { font-size: 24px; margin-bottom: 12px; }

.stat-number {
    font-family: 'Syne', sans-serif;
    font-size: 40px;
    color: var(--dark);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card.danger .stat-number { color: var(--accent); }
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title { font-family: 'Syne', sans-serif; font-size: 20px; color: var(--dark); }

.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-purple { background: var(--primary); color: white; }
.btn-purple:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(108,71,255,0.3); }
.btn-red { background: rgba(255,107,107,0.1); color: var(--accent); border: 1px solid rgba(255,107,107,0.2); }
.btn-red:hover { background: var(--accent); color: white; }
.btn-outline { background: white; color: var(--dark); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 7px; }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 36px;
}

.project-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.project-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 12px 30px rgba(108,71,255,0.12); }

.project-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.project-avatar {
    width: 44px;
    height: 44px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.role-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.role-badge.admin { background: rgba(108,71,255,0.1); color: var(--primary); }
.role-badge.member { background: rgba(0,200,150,0.1); color: var(--success); }

.project-name { font-family: 'Syne', sans-serif; font-size: 16px; color: var(--dark); margin-bottom: 6px; }
.project-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }

.project-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.task-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.task-column {
    background: white;
    border-radius: 16px;
    padding: 20px;
    border: 1.5px solid var(--border);
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1.5px solid var(--border);
}

.column-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--dark); }
.column-dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-todo { background: var(--text-muted); }
.dot-progress { background: var(--warning); }
.dot-done { background: var(--success); }
.column-count { background: var(--bg); padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; color: var(--text-muted); }

.task-card {
    background: var(--bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid var(--primary);
    transition: all 0.2s;
}

.task-card:hover { background: var(--primary-light); }
.task-card.high { border-left-color: var(--accent); }
.task-card.medium { border-left-color: var(--warning); }
.task-card.low { border-left-color: var(--success); }

.task-title { font-weight: 700; font-size: 14px; color: var(--dark); margin-bottom: 6px; }
.task-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.5; }

.task-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

.task-tag { padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.tag-high { background: rgba(255,107,107,0.1); color: var(--accent); }
.tag-medium { background: rgba(255,184,0,0.1); color: var(--warning); }
.tag-low { background: rgba(0,200,150,0.1); color: var(--success); }
.tag-overdue { background: rgba(255,107,107,0.15); color: var(--accent); }
.tag-user { background: var(--primary-light); color: var(--primary); }
.tag-date { background: #f0f0f0; color: var(--text-muted); }

.task-status-select {
    width: 100%;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    font-size: 12px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    outline: none;
    background: white;
}

.members-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }

.member-row {
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.member-info { display: flex; align-items: center; gap: 12px; }

.member-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--primary);
    font-size: 14px;
}

.member-name { font-weight: 700; font-size: 14px; color: var(--dark); }
.member-email { font-size: 12px; color: var(--text-muted); }

.modal { display: none; position: fixed; inset: 0; background: rgba(15,14,23,0.6); backdrop-filter: blur(4px); z-index: 1000; align-items: center; justify-content: center; }
.modal.open { display: flex; }

.modal-box {
    background: white;
    border-radius: 20px;
    padding: 32px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.2);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-title { font-family: 'Syne', sans-serif; font-size: 20px; color: var(--dark); margin-bottom: 24px; }

.modal-box input,
.modal-box select,
.modal-box textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--dark);
    margin-bottom: 12px;
    outline: none;
    transition: border-color 0.2s;
}

.modal-box input:focus,
.modal-box select:focus,
.modal-box textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,71,255,0.1); }
.modal-box textarea { height: 80px; resize: none; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }

.page-header {
    background: var(--dark);
    padding: 28px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-header h2 { font-family: 'Syne', sans-serif; font-size: 22px; color: white; }
.page-header p { color: #6b6890; font-size: 13px; margin-top: 2px; }