:root {
    --bg: #f9f9f9;
    --surface: #ffffff;
    --text: #1a1c1c;
    --text-secondary: #71717a;
    --text-muted: #94a3b8;
    --border: rgba(226, 232, 240, 0.5);
    --accent: #9e001f;
    --accent-hover: #c8102e;
    --accent-light: #ffdad8;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ba1a1a;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --font: 'Geist', system-ui, sans-serif;
    --font-mono: 'Geist Mono', monospace;
    --sidebar-w: 240px;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 0.9375rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100dvh;
}

.sidebar {
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow-y: auto;
}

.sidebar-logo {
    padding: 0 1.25rem 1.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.025em;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.75rem;
}

.sidebar-nav { flex: 1; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.nav-item:hover { color: var(--text); background: var(--bg); }
.nav-item.active {
    color: var(--accent);
    background: var(--accent-light);
    border-left-color: var(--accent);
}

.nav-item .material-symbols-outlined { font-size: 1.25rem; }

.main-content { padding: 2rem; max-width: 1400px; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.8125rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
.btn-success { background: var(--success); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-danger { background: var(--error); color: #fff; }

.form-group { margin-bottom: 1rem; }
.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.875rem;
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.15s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-light);
}

.form-textarea { resize: vertical; min-height: 5rem; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-todo { background: #e2e8f0; color: #475569; }
.badge-progress { background: #dbeafe; color: #1e40af; }
.badge-review { background: #fef3c7; color: #92400e; }
.badge-done { background: #d1fae5; color: #065f46; }
.badge-high { background: #fee2e2; color: #991b1b; }
.badge-medium { background: #fef3c7; color: #92400e; }
.badge-low { background: #e2e8f0; color: #475569; }

.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

.kanban-col {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    min-height: 60dvh;
}

.kanban-col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.kanban-col-count {
    background: var(--border);
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
}

.kanban-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.875rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: box-shadow 0.15s;
}

.kanban-card:hover { box-shadow: var(--shadow-md); }

.kanban-card-title {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.kanban-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.kanban-card-platform {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: -0.025em;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.data-table td {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    border-bottom: 1px solid var(--border);
}
.data-table tr:hover td { background: var(--bg); }

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

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.timer {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.timer-running { color: var(--success); }

.progress-bar {
    height: 0.375rem;
    background: var(--bg);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 9999px;
    transition: width 0.3s;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0;
}

.checklist-item.done { text-decoration: line-through; color: var(--text-muted); }

.rating-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    background: var(--surface);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.rating-btn.selected-ok { border-color: var(--success); background: #d1fae5; color: #065f46; }
.rating-btn.selected-notok { border-color: var(--error); background: #fee2e2; color: #991b1b; }
.rating-btn.selected-redo { border-color: var(--warning); background: #fef3c7; color: #92400e; }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    width: 90%;
    max-width: 600px;
    max-height: 85dvh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.two-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    background: var(--bg);
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow-md);
}

.login-logo {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 2rem;
    letter-spacing: -0.025em;
}

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.6875rem; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }

#blazor-error-ui { display: none; }
