/* =========================================================
   TODO SYSTEM V1
========================================================= */

.todo-view {
    display: none;
    min-height: calc(100vh - 70px);
    padding: 108px 24px 60px;
    background:
        radial-gradient(
            circle at 10% 0%,
            rgba(255, 183, 0, 0.09),
            transparent 30%
        ),
        radial-gradient(
            circle at 100% 20%,
            rgba(255, 255, 255, 0.04),
            transparent 26%
        ),
        #08090b;
    color: #f5f5f5;
}

.todo-view.active {
    display: block;
}

.todo-shell {
    width: min(1280px, 100%);
    margin: 0 auto;
}


/* HERO */

.todo-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 32px 34px;
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,0.065),
            rgba(255,255,255,0.025)
        );
    box-shadow:
        0 24px 70px rgba(0,0,0,0.28);
}

.todo-hero::after {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    right: -90px;
    top: -100px;
    border-radius: 50%;
    background: rgba(255, 187, 0, 0.09);
    filter: blur(5px);
    pointer-events: none;
}

.todo-hero-copy {
    position: relative;
    z-index: 1;
}

.todo-kicker {
    display: block;
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.18em;
    color: #f7bb29;
}

.todo-hero h1 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 13px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1;
}

.todo-hero h1 i {
    color: #f5b71b;
}

.todo-hero p {
    max-width: 690px;
    margin: 14px 0 0;
    line-height: 1.7;
    color: rgba(255,255,255,0.62);
}

.todo-new-task-btn,
.todo-save-btn {
    position: relative;
    z-index: 1;
    border: 0;
    border-radius: 13px;
    padding: 13px 18px;
    font-weight: 900;
    cursor: pointer;
    color: #17130a;
    background:
        linear-gradient(
            135deg,
            #ffd65a,
            #edae16
        );
    box-shadow:
        0 10px 28px rgba(245, 183, 27, 0.17);
    transition:
        transform .16s ease,
        filter .16s ease;
}

.todo-new-task-btn:hover,
.todo-save-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}


/* STATS */

.todo-stats {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.todo-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 17px;
    background: rgba(255,255,255,0.035);
}

.todo-stat-icon {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    flex: 0 0 43px;
    border-radius: 13px;
}

.todo-stat-icon.pending {
    color: #f8c453;
    background: rgba(248,196,83,0.12);
}

.todo-stat-icon.completed {
    color: #75d795;
    background: rgba(75,200,115,0.12);
}

.todo-stat-icon.total {
    color: #9fb9ff;
    background: rgba(111,145,255,0.12);
}

.todo-stat-card strong {
    display: block;
    font-size: 24px;
    line-height: 1;
}

.todo-stat-card span:not(.todo-stat-icon) {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}


/* CREATE */

.todo-create-panel {
    padding: 25px;
    margin-bottom: 24px;
    border: 1px solid rgba(246,186,42,0.22);
    border-radius: 20px;
    background:
        linear-gradient(
            135deg,
            rgba(246,186,42,0.075),
            rgba(255,255,255,0.025)
        );
}

.todo-create-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.todo-create-head span {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .16em;
    color: #efb832;
}

.todo-create-head h2 {
    margin: 5px 0 0;
    font-size: 20px;
}

.todo-create-close {
    width: 37px;
    height: 37px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 11px;
    cursor: pointer;
    color: rgba(255,255,255,.65);
    background: rgba(255,255,255,.04);
}

.todo-field {
    display: block;
    margin-bottom: 16px;
}

.todo-field > span {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    color: rgba(255,255,255,.75);
}

.todo-field small {
    color: rgba(255,255,255,.35);
    font-weight: 500;
}

.todo-field input,
.todo-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,.09);
    outline: none;
    border-radius: 12px;
    padding: 13px 14px;
    resize: vertical;
    color: #fff;
    background: rgba(0,0,0,.26);
    font: inherit;
    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}

.todo-field input:focus,
.todo-field textarea:focus {
    border-color: rgba(241,181,37,.62);
    box-shadow:
        0 0 0 3px rgba(241,181,37,.08);
}

.todo-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.todo-secondary-btn {
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    color: rgba(255,255,255,.7);
    background: rgba(255,255,255,.04);
}


/* BOARD */

.todo-board {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);
    gap: 18px;
}

.todo-column {
    min-width: 0;
    padding: 20px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 20px;
    background: rgba(255,255,255,.025);
}

.todo-column-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 17px;
}

.todo-column-head > div {
    display: flex;
    align-items: center;
    gap: 9px;
}

.todo-column-head h2 {
    margin: 0;
    font-size: 16px;
}

.todo-column-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.todo-column-dot.pending {
    background: #efb62e;
    box-shadow:
        0 0 12px rgba(239,182,46,.55);
}

.todo-column-dot.completed {
    background: #58ca7d;
    box-shadow:
        0 0 12px rgba(88,202,125,.45);
}

.todo-column-count {
    min-width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    padding: 0 7px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 900;
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.68);
}

.todo-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


/* TASK */

.todo-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    border: 1px solid rgba(255,255,255,.065);
    border-radius: 15px;
    background: rgba(255,255,255,.035);
    transition:
        border-color .15s ease,
        background .15s ease,
        transform .15s ease;
}

.todo-item:hover {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,.12);
    background: rgba(255,255,255,.05);
}

.todo-item.completed {
    opacity: .68;
}

.todo-check {
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    display: grid;
    place-items: center;
    margin-top: 1px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 8px;
    cursor: pointer;
    color: transparent;
    background: transparent;
}

.todo-item.completed .todo-check {
    border-color: #59c67a;
    color: #07120b;
    background: #59c67a;
}

.todo-item-body {
    min-width: 0;
    flex: 1;
}

.todo-item-title {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.45;
    color: rgba(255,255,255,.9);
}

.todo-item.completed .todo-item-title {
    text-decoration: line-through;
    color: rgba(255,255,255,.5);
}

.todo-item-description {
    margin: 7px 0 0;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    font-size: 12px;
    line-height: 1.55;
    color: rgba(255,255,255,.43);
}

.todo-item-meta {
    margin-top: 9px;
    font-size: 10px;
    color: rgba(255,255,255,.27);
}

.todo-delete {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    color: rgba(255,255,255,.32);
    background: transparent;
    transition:
        color .15s ease,
        background .15s ease;
}

.todo-delete:hover {
    color: #ff7979;
    background: rgba(255,70,70,.09);
}


/* STATES */

.todo-loading,
.todo-empty {
    padding: 28px 16px;
    text-align: center;
    border: 1px dashed rgba(255,255,255,.08);
    border-radius: 14px;
    font-size: 12px;
    color: rgba(255,255,255,.35);
}

.todo-loading i {
    margin-right: 6px;
}

.todo-status {
    min-height: 0;
    margin-bottom: 0;
    font-size: 12px;
}

.todo-status:not(:empty) {
    margin-bottom: 14px;
    padding: 11px 13px;
    border-radius: 11px;
}

.todo-status.error {
    color: #ff9c9c;
    background: rgba(255,70,70,.08);
}

.todo-status.success {
    color: #91e5ab;
    background: rgba(70,210,110,.08);
}


/* NAV BADGE */

.todo-nav-badge {
    min-width: 19px;
    height: 19px;
    display: inline-grid;
    place-items: center;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 999px;
    vertical-align: middle;
    font-size: 9px;
    font-weight: 900;
    color: #fff;
    background: #d83e3e;
}

.todo-nav-badge[hidden] {
    display: none !important;
}


/* MOBILE */

@media (max-width: 850px) {

    .todo-view {
        padding:
            92px 14px 40px;
    }

    .todo-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 24px 20px;
    }

    .todo-new-task-btn {
        width: 100%;
    }

    .todo-stats {
        grid-template-columns: 1fr;
    }

    .todo-board {
        grid-template-columns: 1fr;
    }

    .todo-create-panel {
        padding: 20px 16px;
    }
}

@media (max-width: 500px) {

    .todo-stat-card {
        padding: 15px;
    }

    .todo-column {
        padding: 14px;
    }

    .todo-form-actions {
        flex-direction: column-reverse;
    }

    .todo-secondary-btn,
    .todo-save-btn {
        width: 100%;
    }
}
