/*
 * Estilos principales de MisTareas.
 */

:root {
    --primary: #5b5cf0;
    --primary-dark: #4546d5;
    --ink: #202338;
    --muted: #7d8198;
    --line: #e8e9f1;
    --background: #f7f8fc;
    --card: #ffffff;
    --success: #28a879;
    --danger: #c9405d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--ink);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

a {
    color: var(--primary);
    text-decoration: none;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 6%;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 21px;
    font-weight: 800;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #fff;
    background: linear-gradient(135deg, #7778ff, #4b4cd9);
    border-radius: 10px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    font-size: 14px;
}

.container {
    width: min(1100px, 92%);
    margin: 32px auto;
}

.hero-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 32px;
    color: #fff;
    background: linear-gradient(115deg, #5556e9, #7778f8);
    border-radius: 24px;
    box-shadow: 0 16px 40px #3536a51c;
}

.eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.eyebrow.light {
    color: #dedfff;
}

.hero-card h1 {
    margin: 0 0 8px;
    font-size: clamp(23px, 4vw, 32px);
}

.hero-card p {
    margin: 0;
    color: #e6e6ff;
}

.hero-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border: 1px solid #ffffff55;
    border-radius: 50%;
    background: #ffffff20;
    font-size: 36px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 22px 0;
}

.stat-card,
.panel {
    padding: 22px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.stat-card strong {
    display: block;
    margin-top: 5px;
    font-size: 30px;
}

.panel-title {
    margin-bottom: 18px;
}

.panel-title h2 {
    margin: 0;
}

.task-form {
    display: grid;
    grid-template-columns: 1fr 150px 130px auto;
    gap: 9px;
    margin-bottom: 22px;
}

input,
select {
    width: 100%;
    padding: 11px 13px;
    color: var(--ink);
    font: inherit;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 11px;
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px #5b5cf01a;
}

.btn {
    padding: 11px 17px;
    font: inherit;
    font-weight: 800;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
}

.btn.primary,
button {
    color: #fff;
    background: var(--primary);
}

.btn.primary:hover,
button:hover {
    background: var(--primary-dark);
}

.task-list {
    display: flex;
    flex-direction: column;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f5;
}

.task-content {
    flex: 1;
    min-width: 0;
}

.task-content strong {
    display: block;
}

.task-content strong.completed {
    color: #999;
    text-decoration: line-through;
}

.task-content small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.check-button {
    display: grid;
    flex: none;
    place-items: center;
    width: 25px;
    height: 25px;
    color: #fff;
    border: 2px solid #c9cbdb;
    border-radius: 50%;
}

.delete-link {
    color: var(--danger);
    font-size: 12px;
}

.empty-state {
    padding: 42px 10px;
    color: var(--muted);
    text-align: center;
}

.empty-state h3 {
    margin: 0;
    color: var(--ink);
}

.empty-state p {
    margin: 6px 0 0;
}

.empty-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 10px;
    color: var(--primary);
    background: #f0f0ff;
    border-radius: 50%;
    font-size: 24px;
}

.auth-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #f1f1ff, #f8f9fc);
}

.auth-card {
    width: min(100%, 430px);
    padding: 34px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 16px 40px #23264b14;
}

.centered {
    justify-content: center;
    margin-bottom: 28px;
}

.auth-card h1 {
    margin: 0 0 6px;
    text-align: center;
}

.auth-card > .muted {
    margin-bottom: 25px;
    color: var(--muted);
    text-align: center;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-stack label {
    color: #51566e;
    font-size: 13px;
    font-weight: 700;
}

.form-stack input {
    display: block;
    margin-top: 6px;
}

.auth-foot {
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.alert.error {
    margin-bottom: 15px;
    padding: 10px 12px;
    color: var(--danger);
    background: #fff0f2;
    border-radius: 10px;
}

@media (max-width: 800px) {
    .task-form {
        grid-template-columns: 1fr 1fr;
    }

    .task-form input:first-of-type {
        grid-column: 1 / -1;
    }

    .task-form .btn {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .topbar {
        display: block;
        padding: 16px;
    }

    .user-menu {
        margin-top: 10px;
    }

    .container {
        width: calc(100% - 24px);
        margin: 20px auto;
    }

    .hero-card {
        padding: 24px 20px;
    }

    .hero-icon {
        width: 54px;
        height: 54px;
        font-size: 26px;
    }

    .stats-grid {
        gap: 8px;
    }

    .stat-card {
        padding: 15px 12px;
    }

    .stat-card strong {
        font-size: 24px;
    }

    .panel {
        padding: 17px;
    }

    .auth-card {
        padding: 28px 22px;
    }

    .delete-link {
        font-size: 11px;
    }
}