:root {
    font-family: Inter, system-ui, "Segoe UI", sans-serif;
    background: #F4F7FC;
    color: #111827;
    color-scheme: light;
    --bg: #f4f7fc;
    --panel: #ffffff;
    --panel-soft: #f8fbff;
    --text: #111827;
    --muted: #64748b;
    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --accent-soft: #e8f0ff;
    --success: #10b981;
    --danger: #ef4444;
    --border: #e2e8f0;
    --shadow: 0 22px 48px rgba(15, 23, 42, 0.14);
    --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 24px 48px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 28%),
        radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.12), transparent 30%),
        linear-gradient(180deg, #f8fbff 0%, #eef4ff 50%, #fdf7ff 100%);
    color: var(--text);
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    isolation: isolate;
}

body::before,
body::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(42px);
    opacity: 0.55;
    pointer-events: none;
    z-index: -1;
}

body::before {
    width: 340px;
    height: 340px;
    background: rgba(37, 99, 235, 0.16);
    top: -120px;
    left: -80px;
}

body::after {
    width: 320px;
    height: 320px;
    background: rgba(16, 185, 129, 0.14);
    bottom: -100px;
    right: -80px;
}

.app-shell {
    width: min(960px, 100%);
    background: linear-gradient(145deg, #ffffff 0%, #f9fbff 100%);
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 36px;
    position: relative;
    overflow: hidden;
}

.app-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(126deg, rgba(37, 99, 235, 0.05), transparent 36%, rgba(16, 185, 129, 0.05));
    pointer-events: none;
}

.hero {
    display: grid;
    gap: 24px;
    margin-bottom: 28px;
}

.hero-copy {
    max-width: 680px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 16px 0 14px;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.05;
    color: #0f172a;
}

.hero p {
    margin: 0;
    max-width: 64ch;
    color: #475569;
    font-size: 1rem;
    line-height: 1.8;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.stat-card {
    padding: 24px 20px;
    border-radius: 22px;
    background: linear-gradient(150deg, #eef2ff 0%, #ffffff 100%);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: var(--shadow-soft);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
}

.stat-label {
    margin-top: 10px;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.workspace-panel {
    display: grid;
    gap: 18px;
}

.task-form {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr 1fr;
    padding: 24px;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255,255,255,0.92), #f6f9ff 100%);
    border: 1px solid rgba(37, 99, 235, 0.08);
    box-shadow: var(--shadow-soft);
}

.task-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
}

.task-form input,
.task-form select,
.task-form button {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.98);
    transition: 180ms ease;
    color: var(--text);
}

.task-form input::placeholder {
    color: #9ca3af;
}

.task-form input:focus,
.task-form select:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.task-form button {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--accent) 0%, #3b82f6 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.18);
    letter-spacing: 0.01em;
}

.task-form button:hover {
    background: linear-gradient(135deg, var(--accent-strong) 0%, #2563eb 100%);
    transform: translateY(-1px);
}

.task-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 18px;
}

.counters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.counter {
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    box-shadow: var(--shadow-soft);
}

.counter .label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.counter .value {
    font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
}

.task-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: linear-gradient(145deg, #ffffff 0%, #fcfdff 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.task-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    border-color: rgba(37, 99, 235, 0.18);
}

.task-details {
    display: grid;
    gap: 10px;
}

.task-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.9rem;
    color: #64748b;
}

.prio {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.prio-high {
    background: rgba(249, 115, 22, 0.12);
    color: #c2410c;
}

.prio-normal {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.prio-low {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.task-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.task-actions button {
    border: none;
    border-radius: 14px;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.task-actions button:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
}

.complete-btn {
    background: linear-gradient(135deg, var(--success) 0%, #34d399 100%);
    color: #fff;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.16);
}

.remove-btn {
    background: linear-gradient(135deg, var(--danger) 0%, #f87171 100%);
    color: #fff;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.16);
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: #6b7280;
}

.task-item.completed {
    background: linear-gradient(145deg, #f5fff9 0%, #ecfdf5 100%);
    border-color: #d1fae5;
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.08);
}

.empty-state {
    margin-top: 18px;
    padding: 30px 24px;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(248, 250, 252, 0.95);
    color: #334155;
    text-align: center;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.empty-state strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.empty-state p {
    margin: 0;
    color: #475569;
    line-height: 1.75;
}

.field-row {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr 1fr;
}

.field-row .full {
    grid-column: 1 / -1;
}

@media (max-width: 840px) {
    .hero-stats,
    .counters {
        grid-template-columns: 1fr;
    }

    .task-form {
        grid-template-columns: 1fr;
    }

    .field-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    body {
        padding: 16px;
    }

    .app-shell {
        padding: 24px;
    }

    .task-item {
        grid-template-columns: 1fr;
    }

    .task-actions {
        justify-content: flex-start;
    }
}
