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

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f0f2f5;
    color: #333;
}

/* ─── Navbar ─── */
.navbar {
    background: #2d3748;
    color: white;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar h1 {
    font-size: 20px;
    font-weight: 600;
}

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

.navbar span {
    font-size: 14px;
    opacity: 0.85;
}

/* ─── Buttons ─── */
.btn {
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.btn:hover { opacity: 0.88; }

.btn-primary { background: #4a90d9; color: white; }
.btn-danger  { background: #e53e3e; color: white; }
.btn-success { background: #38a169; color: white; }
.btn-outline {
    background: transparent;
    border: 1px solid #4a90d9;
    color: #4a90d9;
}

/* ─── Auth Page ─── */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

.auth-box h2 {
    margin-bottom: 24px;
    font-size: 24px;
    text-align: center;
}

.auth-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 2px solid #e2e8f0;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    color: #888;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.auth-tab.active {
    color: #4a90d9;
    border-bottom-color: #4a90d9;
}

/* ─── Form ─── */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #4a90d9;
}

.form-btn {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
}

/* ─── Alert messages ─── */
.alert {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-error   { background: #fff5f5; color: #c53030; border: 1px solid #fed7d7; }
.alert-success { background: #f0fff4; color: #276749; border: 1px solid #c6f6d5; }

/* ─── Dashboard ─── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px;
}

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

.page-header h2 { font-size: 22px; }

/* ─── Stats ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 20px 24px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.stat-card .stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #4a90d9;
}

.stat-card .stat-label {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

/* ─── Project Cards ─── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.project-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.project-card p {
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #aaa;
}

/* ─── Progress bar ─── */
.progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 4px;
    margin: 12px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #38a169;
    border-radius: 4px;
    transition: width 0.3s;
}

/* ─── Modal ─── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal {
    background: white;
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.modal h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ─── Task list ─── */
.task-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.task-column {
    background: #f7fafc;
    border-radius: 10px;
    padding: 16px;
    min-height: 400px;
}

.task-column h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
}

.task-card {
    background: white;
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border-left: 4px solid #e2e8f0;
}

.task-card.HIGH   { border-left-color: #e53e3e; }
.task-card.MEDIUM { border-left-color: #ed8936; }
.task-card.LOW    { border-left-color: #38a169; }

.task-card h4 { font-size: 14px; margin-bottom: 6px; }

.task-card .task-meta {
    font-size: 12px;
    color: #aaa;
    margin-top: 8px;
}

.task-card .task-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.badge-todo       { background: #ebf4ff; color: #2b6cb0; }
.badge-inprogress { background: #fefcbf; color: #744210; }
.badge-done       { background: #f0fff4; color: #276749; }
.badge-overdue    { background: #fff5f5; color: #c53030; }

/* ─── Members section ─── */
.members-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.member-chip {
    background: #ebf4ff;
    color: #2b6cb0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    margin-top: 24px;
}