/* ── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --color-primary:   #4f46e5;
    --color-primary-h: #4338ca;
    --color-bg:        #f0f4f8;
    --color-surface:   #ffffff;
    --color-border:    #e2e8f0;
    --color-text:      #1e293b;
    --color-muted:     #94a3b8;
    --color-high:      #ef4444;
    --color-medium:    #f59e0b;
    --color-low:       #22c55e;
    --color-done:      #a0aec0;
    --radius:          12px;
    --shadow:          0 4px 16px rgba(0,0,0,.08);
    --transition:      .15s ease;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    padding: 24px 16px 48px;
    font-size: 14px;
    line-height: 1.5;
}

/* ── App Layout ───────────────────────────────────────── */
.app-container {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 16px 24px;
    box-shadow: var(--shadow);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo { font-size: 2rem; }

.app-header h1 {
    font-size: 1.4rem;
    color: var(--color-primary);
    font-weight: 700;
}

.tagline { color: var(--color-muted); font-size: .8rem; }

.header-stats {
    display: flex;
    gap: 10px;
}

.stat {
    background: var(--color-bg);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--color-text);
}
.stat.done { color: var(--color-low); }

.app-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 640px) {
    .app-main { grid-template-columns: 1fr; }
}

/* ── Panel ────────────────────────────────────────────── */
.panel {
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

/* ── Buttons ──────────────────────────────────────────── */
.btn-icon {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    width: 34px; height: 34px;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--color-primary);
    transition: background var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.btn-icon:hover { background: #eef2ff; }

.btn-text {
    background: none;
    border: none;
    cursor: pointer;
    font-size: .8rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background var(--transition);
}
.btn-text.danger { color: var(--color-high); }
.btn-text.danger:hover { background: #fee2e2; }

/* ── Badge ────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: #fff;
    border-radius: 20px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    font-size: .75rem;
    font-weight: 700;
}

/* ── Toast ────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: #1e293b;
    color: #fff;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: .85rem;
    z-index: 999;
    transition: opacity .3s, transform .3s;
    white-space: nowrap;
}
.toast.hidden { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(12px); }

/* ── Utility ──────────────────────────────────────────── */
.hidden { display: none !important; }
