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

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    color: #1a1a1a;
    background: #f5f5f4;
}

/* Layout */
.layout { display: flex; height: 100vh; }

.sidebar {
    width: 220px; min-width: 220px;
    background: #fff;
    border-right: 1px solid #e5e5e5;
    display: flex; flex-direction: column;
    padding: 0;
}

.sidebar-logo {
    padding: 20px 16px 16px;
    border-bottom: 1px solid #e5e5e5;
}

.logo-text {
    font-size: 18px; font-weight: 700;
    color: #378ADD; letter-spacing: -0.5px;
}

.sidebar-nav { flex: 1; padding: 12px 8px; }

.nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; border-radius: 8px;
    color: #666; text-decoration: none; font-size: 13px;
    transition: background 0.15s, color 0.15s;
    margin-bottom: 2px;
}
.nav-link:hover { background: #f0f0ef; color: #1a1a1a; }
.nav-link.active { background: #EBF4FF; color: #378ADD; font-weight: 500; }
.nav-icon { font-size: 14px; }

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid #e5e5e5;
    display: flex; flex-direction: column; gap: 6px;
}
.user-name { font-size: 12px; color: #666; }

.main-content { flex: 1; overflow-y: auto; padding: 24px; }

/* Auth */
.auth-page {
    min-height: 100vh; display: flex;
    align-items: center; justify-content: center;
    background: #f5f5f4;
}
.auth-card {
    background: #fff; border-radius: 12px;
    padding: 32px; width: 360px;
    border: 1px solid #e5e5e5;
}
.auth-logo { font-size: 24px; font-weight: 700; color: #378ADD; margin-bottom: 4px; }
.auth-sub { font-size: 13px; color: #888; margin-bottom: 24px; }
.auth-switch { font-size: 12px; color: #666; text-align: center; margin-top: 12px; }
.auth-switch a { color: #378ADD; cursor: pointer; }
.auth-demo {
    margin-top: 16px; padding: 10px 12px;
    background: #f5f5f4; border-radius: 8px;
    font-size: 11px; color: #666;
}
.auth-demo code { display: block; margin-top: 4px; font-size: 11px; color: #333; }

/* Forms */
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 12px; color: #666; margin-bottom: 4px; }
.form-input {
    width: 100%; padding: 8px 10px;
    border: 1px solid #e0e0e0; border-radius: 8px;
    font-size: 13px; color: #1a1a1a;
    background: #fff; transition: border-color 0.15s;
}
.form-input:focus { outline: none; border-color: #378ADD; }
textarea.form-input { resize: vertical; }
.form-row { display: flex; gap: 8px; }
.form-row .form-group { flex: 1; }
.form-card {
    background: #fff; border: 1px solid #e5e5e5;
    border-radius: 10px; padding: 16px; margin-bottom: 16px;
}

/* Buttons */
.btn {
    padding: 7px 16px; border: 1px solid #d0d0d0;
    border-radius: 8px; font-size: 13px; cursor: pointer;
    background: #fff; color: #333; transition: background 0.15s;
}
.btn:hover { background: #f5f5f4; }
.btn-primary { background: #378ADD; color: #fff; border-color: #378ADD; }
.btn-primary:hover { background: #185FA5; }
.btn-primary:disabled { background: #89b8e8; cursor: not-allowed; }
.btn-full { width: 100%; margin-top: 4px; }
.btn-logout {
    font-size: 12px; color: #999; background: none;
    border: none; cursor: pointer; text-align: left; padding: 0;
}
.btn-logout:hover { color: #e24b4a; }

/* Page */
.page-header {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 20px;
}
.page-title { font-size: 20px; font-weight: 600; }
.section-title { font-size: 15px; font-weight: 500; margin: 20px 0 12px; }

/* Stats */
.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 12px; margin-bottom: 20px;
}
.stat-card {
    background: #fff; border-radius: 10px;
    padding: 16px; border: 1px solid #e5e5e5;
    text-align: center;
}
.stat-num { font-size: 28px; font-weight: 600; color: #378ADD; }
.stat-label { font-size: 12px; color: #888; margin-top: 2px; }

/* Progress */
.progress-section { margin-bottom: 24px; }
.progress-header {
    display: flex; justify-content: space-between;
    font-size: 12px; color: #666; margin-bottom: 6px;
}
.progress-bar {
    height: 8px; background: #e5e5e5;
    border-radius: 4px; overflow: hidden;
}
.progress-fill { height: 100%; background: #378ADD; border-radius: 4px; transition: width 0.4s; }

/* Filters */
.filters {
    display: flex; gap: 8px; align-items: center;
    flex-wrap: wrap; margin-bottom: 16px;
}
.filter-label { font-size: 12px; color: #888; }
.filter-chip {
    padding: 4px 14px; border: 1px solid #e0e0e0;
    border-radius: 20px; font-size: 12px; cursor: pointer;
    background: #fff; color: #666; transition: all 0.15s;
}
.filter-chip:hover { border-color: #378ADD; color: #378ADD; }
.filter-chip.active { background: #EBF4FF; border-color: #378ADD; color: #378ADD; }
.search-input {
    padding: 5px 12px; border: 1px solid #e0e0e0;
    border-radius: 20px; font-size: 12px;
    background: #fff; color: #1a1a1a; width: 180px;
}
.search-input:focus { outline: none; border-color: #378ADD; }

/* Task list */
.task-list { display: flex; flex-direction: column; gap: 8px; }

.task-card {
    background: #fff; border: 1px solid #e5e5e5;
    border-radius: 10px; padding: 12px 16px;
    cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s;
}
.task-card:hover { border-color: #c0d4e8; }
.task-card.selected { border-color: #378ADD; }

.task-card-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.task-title { flex: 1; font-size: 14px; font-weight: 500; color: #1a1a1a; }
.task-title.done { text-decoration: line-through; color: #aaa; }
.task-title-small { flex: 1; font-size: 13px; }
.task-title-small.done { text-decoration: line-through; color: #aaa; }

.task-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; background: #fff;
    border: 1px solid #e5e5e5; border-radius: 8px;
}

.assignee-badge {
    width: 26px; height: 26px; border-radius: 50%;
    background: #EBF4FF; color: #185FA5;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 500; flex-shrink: 0;
}

/* Badges */
.badge {
    font-size: 11px; padding: 2px 8px;
    border-radius: 20px; font-weight: 500;
}
.status-todo { background: #f0ede8; color: #5a5a5a; }
.status-inprogress { background: #EBF4FF; color: #185FA5; }
.status-review { background: #FFF3E0; color: #854F0B; }
.status-done { background: #EAF3DE; color: #3B6D11; }

.priority { font-size: 11px; font-weight: 500; }
.priority-high { color: #A32D2D; }
.priority-medium { color: #854F0B; }
.priority-low { color: #3B6D11; }

.project-tag {
    font-size: 11px; color: #555;
    padding-left: 6px; border-left-width: 2px;
    border-left-style: solid;
}
.due-date { font-size: 11px; color: #888; }
.due-date.overdue { color: #A32D2D; font-weight: 500; }

/* Projects grid */
.projects-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.project-card {
    background: #fff; border: 1px solid #e5e5e5;
    border-radius: 10px; padding: 16px;
}
.project-name { font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.project-desc { font-size: 12px; color: #888; margin-bottom: 8px; }
.project-meta { font-size: 11px; color: #aaa; }

/* Modal */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex; align-items: center; justify-content: center;
    z-index: 100;
}
.modal {
    background: #fff; border-radius: 12px;
    padding: 24px; width: 400px;
    border: 1px solid #e0e0e0;
}
.modal-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* Misc */
.loading { text-align: center; padding: 40px; color: #888; }
.empty-state { text-align: center; padding: 40px; color: #aaa; font-size: 13px; }
.error-msg { color: #A32D2D; font-size: 12px; margin: 8px 0; }

#blazor-error-ui {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    background: #ffe0e0; padding: 10px 16px; font-size: 13px;
    border-top: 1px solid #ffb0b0; z-index: 1000;
}
