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

:root {
    --bg: #0a0d14;
    --glass: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.12);
    --text: #eaf0f8;
    --muted: #8b97a8;
    --q-do: #ef4444;
    --q-schedule: #3b82f6;
    --q-delegate: #f59e0b;
    --q-delete: #64748b;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

.hidden { display: none !important; }

/* ============================================================
   LOGIN — жидкое стекло
   ============================================================ */

#login-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #05070c;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.75;
    pointer-events: none;
    will-change: transform;
}

.blob-1 {
    width: 480px;
    height: 480px;
    background: #3b82f6;
    top: -120px;
    left: -120px;
    animation: float1 18s ease-in-out infinite;
}

.blob-2 {
    width: 560px;
    height: 560px;
    background: #8b5cf6;
    bottom: -180px;
    right: -160px;
    animation: float2 22s ease-in-out infinite;
}

.blob-3 {
    width: 380px;
    height: 380px;
    background: #06b6d4;
    top: 40%;
    left: 55%;
    animation: float3 26s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(80px, 60px) scale(1.15); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-70px, -50px) scale(1.1); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-60px, 40px) scale(0.9); }
}

.glass-card {
    position: relative;
    z-index: 1;
    width: min(360px, 90vw);
    padding: 40px 32px;
    border-radius: 24px;

    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);

    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05);

    text-align: center;

    animation: cardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.glass-card h1 {
    font-size: 26px;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    font-weight: 600;
}

.glass-card .subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 28px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.glass-card input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);

    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.glass-card input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.glass-card input:focus {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.09);
}

.glass-card button {
    width: 100%;
    margin-top: 14px;
    padding: 14px;
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.9);
    color: #0a0d14;
    border: 0;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;

    transition: transform 0.12s, background 0.2s;
}

.glass-card button:hover {
    background: #fff;
    transform: translateY(-1px);
}

.glass-card button:active {
    transform: translateY(0);
}

#login-error {
    min-height: 20px;
    color: #ff9b9b;
    font-size: 13px;
    margin-top: 12px;
}

/* ============================================================
   APP
   ============================================================ */

#app {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px 60px;
}

#app > header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

#app > header h1 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

#logout-btn {
    padding: 8px 14px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--muted);
    cursor: pointer;
    font-size: 13px;
    transition: color 0.15s, border-color 0.15s;
}

#logout-btn:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.32);
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 780px) {
    .grid { grid-template-columns: 1fr; }
}

.quadrant {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 280px;
    position: relative;
    overflow: hidden;
}

.quadrant::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
}

.q-do       { --accent: var(--q-do); }
.q-schedule { --accent: var(--q-schedule); }
.q-delegate { --accent: var(--q-delegate); }
.q-delete   { --accent: var(--q-delete); }

.quadrant > header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.quadrant h2 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.quadrant .hint {
    font-size: 12px;
    color: var(--muted);
}

.quadrant .count {
    font-size: 12px;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.tasks {
    list-style: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
    overflow-y: auto;
    max-height: 45vh;
}

.tasks:empty::after {
    content: "Пусто";
    color: var(--muted);
    font-size: 13px;
    padding: 10px 0;
}

.task {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;

    animation: taskIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes taskIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.task span {
    flex: 1;
}

.task button {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}

.task button:hover {
    color: #ff8c8c;
    background: rgba(255, 80, 80, 0.12);
}

.add {
    display: flex;
    gap: 8px;
}

.add input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}

.add input::placeholder {
    color: var(--muted);
}

.add input:focus {
    border-color: var(--accent);
}

.add button {
    width: 40px;
    border-radius: 10px;
    border: 0;
    background: var(--accent);
    color: #0a0d14;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s;
}

.add button:hover {
    filter: brightness(1.1);
}
