/* ETERNAWORLD · COMPONENTS */

/* =========================================================
   HEADER PRINCIPAL
========================================================= */

.welcome-header {

    display:
        flex;

    justify-content:
        space-between;

    align-items:
        flex-start;

    gap:
        25px;

    margin-bottom:
        25px;
}


.eyebrow {

    margin:
        0
        0
        8px;

    color:
        var(--accent-2);

    font-size:
        0.72rem;

    font-weight:
        800;

    text-transform:
        uppercase;

    letter-spacing:
        0.15em;
}


.welcome-header h1 {

    margin: 0;

    font-size:
        clamp(
            2rem,
            4vw,
            3.1rem
        );

    line-height:
        1;

    letter-spacing:
        -0.045em;
}


.welcome-copy {

    margin:
        12px
        0
        0;

    color:
        var(--muted);

    font-size:
        0.95rem;
}


/* =========================================================
   DASHBOARD SUPERIOR
========================================================= */

.dashboard-grid {

    display:
        grid;

    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(280px, 0.8fr);

    gap:
        18px;

    margin-bottom:
        18px;
}


.progress-card,
.streak-card,
.content-card {

    border:
        1px solid
        var(--line-soft);

    border-radius:
        var(--radius-xl);

    background:
        linear-gradient(
            155deg,
            rgba(20, 25, 38, 0.97),
            rgba(11, 15, 24, 0.98)
        );

    box-shadow:
        var(--shadow);
}


/* =========================================================
   PROGRESO
========================================================= */

.progress-card {

    padding:
        25px;
}


.progress-card-top {

    display:
        flex;

    justify-content:
        space-between;

    align-items:
        center;

    gap:
        24px;
}


.progress-card h2 {

    margin:
        0;

    font-size:
        clamp(
            1.4rem,
            2.4vw,
            2rem
        );

    letter-spacing:
        -0.03em;
}


.progress-orb {

    --progress:
        0;

    display:
        grid;

    place-items:
        center;

    flex:
        0 0 108px;

    width:
        108px;

    height:
        108px;

    padding:
        7px;

    border-radius:
        50%;

    background:
        conic-gradient(
            var(--ok)
            calc(
                var(--progress)
                * 1%
            ),

            rgba(
                255,
                255,
                255,
                0.07
            )

            0
        );
}


.progress-orb > div {

    display:
        grid;

    place-content:
        center;

    width:
        100%;

    height:
        100%;

    text-align:
        center;

    border-radius:
        50%;

    background:
        #0c111a;
}


.progress-orb strong {

    display:
        block;

    font-size:
        1.45rem;
}


.progress-orb span {

    color:
        var(--muted);

    font-size:
        0.72rem;
}


.progress-track {

    overflow:
        hidden;

    height:
        10px;

    margin-top:
        24px;

    border-radius:
        999px;

    background:
        rgba(
            255,
            255,
            255,
            0.06
        );
}


.progress-fill {

    height:
        100%;

    border-radius:
        inherit;

    background:
        linear-gradient(
            90deg,
            #8500ff,
            #c23cff,
            #45dfa6
        );

    transition:
        width
        0.45s
        cubic-bezier(
            0.2,
            0.8,
            0.2,
            1
        );
}


.progress-message {

    margin:
        13px
        0
        0;

    color:
        var(--muted);

    font-size:
        0.9rem;
}


/* =========================================================
   RACHA PRINCIPAL
========================================================= */

.streak-card {

    display:
        flex;

    flex-direction:
        column;

    justify-content:
        space-between;

    gap:
        22px;

    padding:
        25px;
}


.streak-main {

    display:
        flex;

    align-items:
        center;

    gap:
        16px;
}


.streak-flame {

    display:
        grid;

    place-items:
        center;

    width:
        64px;

    height:
        64px;

    flex:
        0 0 64px;

    border-radius:
        21px;

    background:
        radial-gradient(
            circle,
            rgba(255, 180, 75, 0.22),
            rgba(255, 115, 36, 0.04)
        );

    font-size:
        2rem;
}


.streak-number {

    display:
        flex;

    align-items:
        baseline;

    gap:
        7px;
}


.streak-number strong {

    font-size:
        2.5rem;

    line-height:
        1;

    letter-spacing:
        -0.05em;
}


.streak-number span {

    color:
        var(--muted);
}


.milestone-copy {

    display:
        flex;

    justify-content:
        space-between;

    gap:
        10px;

    margin-bottom:
        9px;

    color:
        var(--muted);

    font-size:
        0.82rem;
}


.milestone-copy strong {

    color:
        var(--text);
}


.mini-track {

    overflow:
        hidden;

    height:
        7px;

    border-radius:
        999px;

    background:
        rgba(
            255,
            255,
            255,
            0.06
        );
}


.mini-track > div {

    height:
        100%;

    border-radius:
        inherit;

    background:
        linear-gradient(
            90deg,
            #8b00ff,
            #c64dff,
            #45dfa6
        );

    transition:
        width
        0.4s
        ease;
}


.milestone-progress small {

    display:
        block;

    margin-top:
        8px;

    color:
        var(--muted);
}


/* =========================================================
   TARJETAS CONTENIDO
========================================================= */

.content-card {

    margin-top:
        18px;

    padding:
        24px;
}


.section-title {

    display:
        flex;

    justify-content:
        space-between;

    align-items:
        flex-start;

    gap:
        20px;

    margin-bottom:
        18px;
}


.section-title h2 {

    margin:
        0;

    font-size:
        1.42rem;
}


.section-title p:not(.eyebrow) {

    margin:
        7px
        0
        0;

    color:
        var(--muted);

    font-size:
        0.9rem;
}


.section-chip {

    flex:
        0 0 auto;

    padding:
        8px
        11px;

    color:
        #d9b0ff;

    background:
        rgba(
            157,
            0,
            255,
            0.09
        );

    border:
        1px solid
        rgba(
            198,
            109,
            255,
            0.16
        );

    border-radius:
        999px;

    font-size:
        0.79rem;

    font-weight:
        800;
}


/* =========================================================
   HÁBITOS
========================================================= */

.habit-list {

    display:
        grid;

    gap:
        10px;
}


.habit-card {

    display:
        grid;

    grid-template-columns:
        auto
        minmax(0, 1fr)
        auto;

    align-items:
        center;

    gap:
        15px;

    min-height:
        84px;

    padding:
        14px
        16px;

    border:
        1px solid
        var(--line-soft);

    border-radius:
        18px;

    background:
        rgba(
            8,
            12,
            20,
            0.72
        );

    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}


.habit-card:hover {

    transform:
        translateY(-2px);

    border-color:
        rgba(
            198,
            109,
            255,
            0.25
        );
}


.habit-card.completed {

    border-color:
        rgba(
            69,
            223,
            166,
            0.26
        );

    background:
        linear-gradient(
            90deg,
            rgba(
                69,
                223,
                166,
                0.08
            ),

            rgba(
                8,
                12,
                20,
                0.76
            )
        );
}


.habit-toggle {

    display:
        grid;

    place-items:
        center;

    width:
        44px;

    height:
        44px;

    padding:
        0;

    color:
        white;

    background:
        transparent;

    border:
        2px solid
        rgba(
            255,
            255,
            255,
            0.16
        );

    border-radius:
        14px;

    transition:
        all
        0.2s
        ease;
}


.habit-card.completed
.habit-toggle {

    color:
        #061d16;

    background:
        var(--ok);

    border-color:
        var(--ok);

    box-shadow:
        0
        0
        0
        5px
        rgba(
            69,
            223,
            166,
            0.07
        );
}


.checkmark {

    font-size:
        1.15rem;

    font-weight:
        900;
}


.habit-content h3 {

    margin:
        0;

    font-size:
        1rem;
}


.habit-content p {

    margin:
        5px
        0
        0;

    color:
        var(--muted);

    font-size:
        0.84rem;
}


.habit-actions {

    display:
        flex;

    align-items:
        center;

    gap:
        13px;
}


.habit-state {

    color:
        var(--muted);

    font-size:
        0.78rem;

    font-weight:
        800;
}


.habit-card.completed
.habit-state {

    color:
        var(--ok);
}


.habit-edit {

    color:
        #d2a7ff;

    font-size:
        0.8rem;
}


/* =========================================================
   EMPTY
========================================================= */

.empty-state {

    padding:
        42px
        20px;

    text-align:
        center;

    border:
        1px dashed
        rgba(
            255,
            255,
            255,
            0.12
        );

    border-radius:
        18px;
}


.empty-icon {

    display:
        grid;

    place-items:
        center;

    width:
        50px;

    height:
        50px;

    margin:
        0 auto
        14px;

    border-radius:
        16px;

    color:
        var(--accent-2);

    background:
        var(--accent-soft);

    font-size:
        1.55rem;
}


.empty-state h3 {

    margin:
        0;
}


.empty-state p {

    max-width:
        520px;

    margin:
        9px auto
        19px;

    color:
        var(--muted);

    line-height:
        1.55;
}


/* =========================================================
   SEMANA
========================================================= */

.compact-title {

    margin-bottom:
        14px;
}


.week-row {

    display:
        grid;

    grid-template-columns:
        repeat(
            7,
            minmax(0, 1fr)
        );

    gap:
        10px;
}


.week-day {

    display:
        grid;

    justify-items:
        center;

    gap:
        9px;

    padding:
        13px 5px;

    color:
        var(--muted);

    border-radius:
        15px;
}


.week-day.today {

    background:
        rgba(
            255,
            255,
            255,
            0.025
        );
}


.week-day span {

    font-size:
        0.76rem;

    font-weight:
        800;
}


.week-dot {

    display:
        grid;

    place-items:
        center;

    width:
        35px;

    height:
        35px;

    border:
        1px solid
        var(--line);

    border-radius:
        50%;

    color:
        #071f17;

    font-size:
        0.82rem;

    font-weight:
        900;
}


.week-day.done {

    color:
        var(--text);
}


.week-day.done
.week-dot {

    background:
        var(--ok);

    border-color:
        var(--ok);

    box-shadow:
        0
        0
        0
        5px
        rgba(
            69,
            223,
            166,
            0.06
        );
}


/* =========================================================
   ETERNA
========================================================= */

.eterna-card {

    overflow:
        hidden;
}


.eterna-summary {

    display:
        grid;

    grid-template-columns:
        auto
        minmax(0, 1fr)
        auto;

    align-items:
        center;

    gap:
        18px;
}


.eterna-avatar-wrap {

    position:
        relative;
}


.eterna-avatar,
.avatar {

    display:
        grid;

    place-items:
        center;

    color:
        white;

    font-weight:
        900;

    background:
        linear-gradient(
            145deg,
            #8216ff,
            #c600ff
        );

    box-shadow:
        0
        0
        0
        5px
        rgba(
            157,
            0,
            255,
            0.07
        ),

        0
        10px
        30px
        rgba(
            157,
            0,
            255,
            0.14
        );
}


.eterna-avatar {

    width:
        56px;

    height:
        56px;

    border-radius:
        18px;
}


.eterna-avatar.small {

    width:
        42px;

    height:
        42px;

    border-radius:
        14px;
}


.eterna-online-dot {

    position:
        absolute;

    right:
        -2px;

    bottom:
        -2px;

    width:
        13px;

    height:
        13px;

    border:
        3px solid
        var(--panel);

    border-radius:
        50%;

    background:
        var(--ok);
}


.eterna-intro h2 {

    margin:
        0;
}


.eterna-intro > p:last-child {

    max-width:
        690px;

    margin:
        7px
        0
        0;

    color:
        var(--muted);

    font-size:
        0.9rem;

    line-height:
        1.55;
}


/* =========================================================
   CHAT ETERNA
========================================================= */

.chat-area {

    margin-top:
        22px;

    padding-top:
        22px;

    border-top:
        1px solid
        var(--line-soft);
}


.messages {

    display:
        flex;

    flex-direction:
        column;

    gap:
        14px;

    max-height:
        420px;

    overflow-y:
        auto;

    padding:
        4px;
}


.message {

    display:
        flex;

    align-items:
        flex-start;

    gap:
        11px;

    max-width:
        800px;
}


.message.user {

    align-self:
        flex-end;

    flex-direction:
        row-reverse;
}


.avatar {

    width:
        35px;

    height:
        35px;

    flex:
        0 0 35px;

    border-radius:
        12px;

    font-size:
        0.8rem;
}


.message.user
.avatar {

    background:
        #263044;

    box-shadow:
        none;
}


.bubble {

    max-width:
        min(
            720px,
            80%
        );

    padding:
        13px
        15px;

    border-radius:
        16px;

    background:
        var(--panel-3);

    line-height:
        1.55;
}


.message.user
.bubble {

    background:
        rgba(
            157,
            0,
            255,
            0.14
        );
}


.bubble p {

    margin:
        0;

    white-space:
        pre-wrap;
}


.quick-actions {

    display:
        flex;

    flex-wrap:
        wrap;

    gap:
        8px;

    margin:
        16px
        0
        11px
        46px;
}


.quick-actions button {

    padding:
        9px
        12px;

    color:
        var(--muted);

    background:
        transparent;

    border:
        1px solid
        var(--line);

    border-radius:
        12px;

    font-weight:
        600;
}


.quick-actions button:hover {

    color:
        var(--text);

    border-color:
        var(--accent);
}


.composer {

    display:
        grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto;

    gap:
        10px;

    margin-left:
        46px;
}


.composer textarea {

    min-height:
        56px;

    padding:
        14px;
}


.send-button {

    min-width:
        90px;
}


/* =========================================================
   ESTADOS
========================================================= */

.status {

    min-height:
        18px;

    margin:
        10px
        0
        0;

    color:
        var(--muted);

    font-size:
        0.84rem;
}


.status.compact {

    margin-top:
        10px;
}


/* =========================================================
   MODAL HITO
========================================================= */

.milestone-modal {

    position:
        fixed;

    inset:
        0;

    z-index:
        1000;

    display:
        grid;

    place-items:
        center;

    padding:
        20px;
}


.milestone-backdrop {

    position:
        absolute;

    inset:
        0;

    background:
        rgba(
            3,
            5,
            10,
            0.79
        );

    backdrop-filter:
        blur(14px);
}


.milestone-card {

    position:
        relative;

    z-index:
        1;

    width:
        min(
            540px,
            100%
        );

    padding:
        35px;

    overflow:
        hidden;

    text-align:
        center;

    border:
        1px solid
        rgba(
            198,
            109,
            255,
            0.25
        );

    border-radius:
        30px;

    background:

        radial-gradient(
            circle at
            50% -15%,
            rgba(
                180,
                54,
                255,
                0.25
            ),
            transparent 42%
        ),

        linear-gradient(
            180deg,
            #171c2a,
            #0d111b
        );

    box-shadow:
        0
        40px
        120px
        rgba(
            0,
            0,
            0,
            0.58
        );

    animation:
        milestoneAppear
        0.4s
        cubic-bezier(
            0.2,
            0.9,
            0.2,
            1
        );
}


@keyframes milestoneAppear {

    from {

        opacity:
            0;

        transform:
            translateY(18px)
            scale(0.96);
    }

    to {

        opacity:
            1;

        transform:
            translateY(0)
            scale(1);
    }
}


.milestone-sparkle {

    position:
        absolute;

    top:
        23px;

    right:
        28px;

    color:
        #e9c0ff;

    font-size:
        1.4rem;
}


.milestone-fire {

    display:
        grid;

    place-items:
        center;

    width:
        78px;

    height:
        78px;

    margin:
        0 auto
        17px;

    border-radius:
        26px;

    background:
        radial-gradient(
            circle,
            rgba(
                255,
                180,
                75,
                0.23
            ),
            rgba(
                255,
                110,
                34,
                0.04
            )
        );

    font-size:
        2.6rem;
}


.milestone-card h2 {

    margin:
        0;

    font-size:
        2rem;

    letter-spacing:
        -0.04em;
}


.milestone-subtitle {

    margin:
        8px
        0
        21px;

    color:
        var(--muted);
}


.milestone-eterna {

    display:
        flex;

    align-items:
        flex-start;

    gap:
        13px;

    padding:
        17px;

    text-align:
        left;

    border:
        1px solid
        var(--line-soft);

    border-radius:
        18px;

    background:
        rgba(
            255,
            255,
            255,
            0.025
        );
}


.milestone-eterna strong {

    display:
        block;

    margin-bottom:
        5px;
}


.milestone-eterna p {

    margin:
        0;

    color:
        #dde3ee;

    line-height:
        1.58;
}


.next-hito {

    margin:
        17px
        0;

    color:
        var(--muted);

    font-size:
        0.84rem;
}


.next-hito strong {

    color:
        var(--text);
}


.milestone-button {

    width:
        100%;
}


/* =========================================================
   CONFETI
========================================================= */

.celebration-canvas {

    position:
        fixed;

    inset:
        0;

    z-index:
        1100;

    width:
        100%;

    height:
        100%;

    pointer-events:
        none;
}


/* =========================================================
   TOAST
========================================================= */

.toast {

    position:
        fixed;

    left:
        50%;

    bottom:
        28px;

    z-index:
        950;

    transform:
        translateX(-50%);

    max-width:
        min(
            520px,
            calc(
                100%
                - 30px
            )
        );

    padding:
        13px
        17px;

    color:
        var(--text);

    background:
        #171d2b;

    border:
        1px solid
        var(--line);

    border-radius:
        14px;

    box-shadow:
        var(--shadow);
}


.toast.success {

    border-color:
        rgba(
            69,
            223,
            166,
            0.28
        );
}


.toast.error {

    border-color:
        rgba(
            255,
            108,
            130,
            0.28
        );
}


/* =========================================================
   LOGIN / REGISTRO
========================================================= */

.auth-body {

    display:
        grid;

    place-items:
        center;

    min-height:
        100vh;

    padding:
        24px;
}


.auth-card {

    width:
        min(
            100%,
            440px
        );

    padding:
        28px;

    border:
        1px solid
        var(--line);

    border-radius:
        22px;

    background:
        var(--panel);

    box-shadow:
        var(--shadow);
}


.auth-card.wide {

    width:
        min(
            100%,
            720px
        );
}


.auth-card h1 {

    margin:
        22px
        0
        8px;
}


.auth-card form {

    display:
        grid;

    gap:
        16px;

    margin-top:
        22px;
}


.auth-card label {

    display:
        grid;

    gap:
        7px;

    color:
        var(--muted);
}


.auth-card input {

    width:
        100%;

    padding:
        12px;

    color:
        var(--text);

    background:
        #0d1118;

    border:
        1px solid
        var(--line);

    border-radius:
        12px;
}


.auth-card button {

    width:
        100%;
}


.auth-link {

    text-align:
        center;

    color:
        var(--muted);
}


.muted {

    color:
        var(--muted);
}


.alert {

    margin:
        16px
        0;

    padding:
        12px;

    border:
        1px solid
        var(--line);

    border-radius:
        12px;

    background:
        var(--panel-2);
}


.alert.error {

    border-color:
        #79424a;
}


/* =========================================================
   CUENTA
========================================================= */

.account-grid {

    display:
        grid;

    grid-template-columns:
        repeat(
            3,
            1fr
        );

    gap:
        12px;

    margin:
        20px
        0;
}


.account-grid > div {

    padding:
        14px;

    border:
        1px solid
        var(--line);

    border-radius:
        14px;
}


.account-grid span,
.account-grid strong,
.account-grid small {

    display:
        block;
}


.account-grid strong {

    margin:
        6px
        0;
}

/* ============================================================
   CREAR HÁBITO
============================================================ */

.habit-create-page {

    min-height: 100vh;

    padding:
        28px
        clamp(
            18px,
            4vw,
            55px
        )
        70px;
}


.habit-create-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    width: min(
        100%,
        1180px
    );

    margin:
        0 auto
        55px;
}


.habit-create-brand {

    display: inline-flex;

    align-items: center;
}


.habit-create-brand img {

    display: block;

    width: 80px;

    height: 80px;

    object-fit: contain;
}


.back-link {

    padding:
        10px
        13px;

    color:
        var(--muted);

    border:
        1px solid
        var(--line);

    border-radius:
        12px;

    text-decoration:
        none;

    font-size:
        13px;

    transition:
        color .2s ease,
        border-color .2s ease,
        background .2s ease;
}


.back-link:hover {

    color:
        white;

    border-color:
        rgba(
            206,
            124,
            255,
            .3
        );

    background:
        rgba(
            255,
            255,
            255,
            .025
        );
}


/* ============================================================
   CONTENEDOR
============================================================ */

.habit-create-container {

    width:
        min(
            100%,
            720px
        );

    margin:
        0 auto;
}


/* ============================================================
   INTRO
============================================================ */

.habit-create-intro {

    margin-bottom:
        28px;

    text-align:
        center;
}


.habit-create-intro h1 {

    margin:
        0;

    font-size:
        clamp(
            34px,
            5vw,
            52px
        );

    line-height:
        1.04;

    letter-spacing:
        -.045em;
}


.habit-create-intro > p:last-child {

    max-width:
        600px;

    margin:
        15px auto
        0;

    color:
        var(--muted);

    font-size:
        15px;

    line-height:
        1.65;
}


/* ============================================================
   TARJETA
============================================================ */

.habit-form-card {

    padding:
        30px;

    background:

        radial-gradient(
            circle at
            100% 0%,
            rgba(
                161,
                0,
                255,
                .08
            ),
            transparent 32%
        ),

        linear-gradient(
            150deg,
            rgba(
                19,
                24,
                37,
                .98
            ),
            rgba(
                10,
                14,
                22,
                .98
            )
        );

    border:
        1px solid
        var(--line);

    border-radius:
        26px;

    box-shadow:
        0
        30px
        80px
        rgba(
            0,
            0,
            0,
            .28
        );
}


/* ============================================================
   ALERTAS
============================================================ */

.habit-form-alert {

    margin-bottom:
        21px;

    padding:
        13px
        15px;

    border-radius:
        13px;

    font-size:
        13px;

    line-height:
        1.5;
}


.habit-form-alert.error {

    color:
        #ffd7dd;

    background:
        rgba(
            255,
            108,
            130,
            .07
        );

    border:
        1px solid
        rgba(
            255,
            108,
            130,
            .25
        );
}


/* ============================================================
   CAMPOS
============================================================ */

.habit-form-card form {

    display:
        grid;

    gap:
        25px;
}


.habit-form-group {

    display:
        grid;

    gap:
        9px;
}


.habit-form-group label {

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        15px;

    color:
        var(--text);

    font-size:
        14px;

    font-weight:
        700;
}


.habit-form-group label span {

    color:
        var(--muted);

    font-size:
        11px;

    font-weight:
        500;
}


.habit-form-group input,
.habit-form-group textarea {

    width:
        100%;

    padding:
        15px
        16px;

    color:
        var(--text);

    background:
        rgba(
            7,
            10,
            16,
            .85
        );

    border:
        1px solid
        var(--line);

    border-radius:
        14px;

    outline:
        none;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}


.habit-form-group input {

    min-height:
        52px;
}


.habit-form-group textarea {

    min-height:
        115px;

    line-height:
        1.5;
}


.habit-form-group input:hover,
.habit-form-group textarea:hover {

    border-color:
        rgba(
            255,
            255,
            255,
            .15
        );
}


.habit-form-group input:focus,
.habit-form-group textarea:focus {

    background:
        #0b0f18;

    border-color:
        rgba(
            193,
            70,
            255,
            .65
        );

    box-shadow:
        0
        0
        0
        4px
        rgba(
            161,
            0,
            255,
            .08
        );
}


.habit-form-group small {

    color:
        var(--muted);

    font-size:
        11px;
}


.habit-textarea-footer {

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        15px;
}


/* ============================================================
   SUGERENCIAS
============================================================ */

.habit-suggestions {

    padding:
        18px;

    background:
        rgba(
            255,
            255,
            255,
            .018
        );

    border:
        1px solid
        var(--line);

    border-radius:
        17px;
}


.habit-suggestions-title {

    display:
        block;

    margin-bottom:
        11px;

    color:
        var(--muted);

    font-size:
        11px;

    font-weight:
        700;

    text-transform:
        uppercase;

    letter-spacing:
        .1em;
}


.habit-suggestion-list {

    display:
        flex;

    flex-wrap:
        wrap;

    gap:
        8px;
}


.habit-suggestion {

    padding:
        9px
        12px;

    color:
        #c8ceda;

    background:
        #0c111a;

    border:
        1px solid
        var(--line);

    border-radius:
        100px;

    font-size:
        12px;

    font-weight:
        600;

    transition:
        .18s ease;
}


.habit-suggestion:hover {

    color:
        white;

    border-color:
        rgba(
            198,
            89,
            255,
            .4
        );

    background:
        rgba(
            161,
            0,
            255,
            .08
        );

    transform:
        translateY(-1px);
}


/* ============================================================
   CONSEJO
============================================================ */

.habit-create-tip {

    display:
        flex;

    align-items:
        flex-start;

    gap:
        13px;

    padding:
        17px;

    background:
        linear-gradient(
            100deg,
            rgba(
                161,
                0,
                255,
                .06
            ),
            rgba(
                67,
                223,
                168,
                .025
            )
        );

    border:
        1px solid
        rgba(
            198,
            109,
            255,
            .13
        );

    border-radius:
        17px;
}


.habit-create-tip-icon {

    display:
        grid;

    place-items:
        center;

    width:
        35px;

    height:
        35px;

    flex:
        0 0 35px;

    color:
        var(--accent-2);

    background:
        rgba(
            161,
            0,
            255,
            .1
        );

    border-radius:
        11px;
}


.habit-create-tip strong {

    display:
        block;

    margin-bottom:
        5px;

    font-size:
        13px;
}


.habit-create-tip p {

    margin:
        0;

    color:
        var(--muted);

    font-size:
        12px;

    line-height:
        1.55;
}


/* ============================================================
   ACCIONES
============================================================ */

.habit-form-actions {

    display:
        grid;

    grid-template-columns:
        auto
        minmax(
            180px,
            1fr
        );

    gap:
        10px;

    align-items:
        center;
}


.habit-cancel-button {

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    min-height:
        48px;

    padding:
        12px
        17px;

    color:
        var(--muted);

    background:
        transparent;

    border:
        1px solid
        var(--line);

    border-radius:
        13px;

    text-decoration:
        none;

    font-weight:
        700;

    font-size:
        13px;
}


.habit-save-button {

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        9px;

    min-height:
        49px;

    padding:
        12px
        19px;

    color:
        white;

    background:
        linear-gradient(
            135deg,
            #8c00ff,
            #c300ff
        );

    border:
        0;

    border-radius:
        13px;

    font-size:
        13px;

    font-weight:
        800;

    box-shadow:
        0
        15px
        35px
        rgba(
            161,
            0,
            255,
            .18
        );

    transition:
        transform .18s ease,
        box-shadow .18s ease;
}


.habit-save-button:hover {

    transform:
        translateY(-1px);

    box-shadow:
        0
        18px
        40px
        rgba(
            161,
            0,
            255,
            .24
        );
}


.habit-save-button span {

    font-size:
        17px;
}


/* ============================================================
   FOOTER
============================================================ */

.habit-create-footer {

    margin:
        17px
        0
        0;

    color:
        var(--muted);

    text-align:
        center;

    font-size:
        11px;
}

:root {
    color-scheme: dark;
    --bg: #06080f;
    --panel: rgba(14, 19, 30, 0.92);
    --panel-strong: #101620;
    --line: #263244;
    --line-focus: #8b5cf6;
    --text: #f7f8fb;
    --muted: #98a5b8;
    --muted-strong: #c1cad7;
    --accent: #7c3cff;
    --accent-2: #b000ff;
    --success: #b8f3da;
    --success-bg: rgba(47, 197, 139, 0.10);
    --success-line: rgba(47, 197, 139, 0.30);
    --danger: #ffc0c7;
    --danger-bg: rgba(255, 75, 95, 0.10);
    --danger-line: rgba(255, 75, 95, 0.34);
    --radius: 22px;
    --shadow: 0 32px 90px rgba(0, 0, 0, 0.48);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 16% 12%, rgba(124, 60, 255, 0.16), transparent 30rem),
        radial-gradient(circle at 88% 84%, rgba(0, 209, 178, 0.08), transparent 26rem),
        linear-gradient(135deg, #0b0e17 0%, #06080f 72%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input {
    font: inherit;
}

button,
a,
input {
    -webkit-tap-highlight-color: transparent;
}

[hidden] {
    display: none !important;
}

.login-shell {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
}

.login-card {
    width: min(100%, 460px);
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(17, 23, 35, 0.98), var(--panel));
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.login-brand {
    display: flex;
    justify-content: center;
    width: fit-content;
    margin: 0 auto 20px;
    border-radius: 18px;
    outline: none;
}

.login-brand:focus-visible {
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.25);
}

.login-logo {
    display: block;
    width: 116px;
    height: 116px;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 12px 28px rgba(0, 209, 178, 0.12));
}

.login-header {
    margin-bottom: 24px;
}

.login-kicker {
    margin: 0 0 7px;
    color: #63dfc8 !important;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.login-header h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.75rem, 6vw, 2.15rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.login-header > p:last-child {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

.alert {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.alert-success {
    color: var(--success);
    background: var(--success-bg);
    border-color: var(--success-line);
}

.alert-error {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: var(--danger-line);
}

.login-form,
.recovery-box form {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 8px;
    color: var(--muted-strong);
    font-size: 0.875rem;
    font-weight: 650;
}

.field > input,
.password-field > input {
    width: 100%;
    min-width: 0;
    height: 50px;
    padding: 0 14px;
    color: #fff;
    background: #0a1019;
    border: 1px solid #2a3749;
    border-radius: 12px;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.field > input::placeholder,
.password-field > input::placeholder {
    color: #657286;
}

.field > input:hover,
.password-field > input:hover {
    border-color: #3a4960;
}

.field > input:focus,
.password-field > input:focus {
    background: #0c131e;
    border-color: var(--line-focus);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.password-field {
    position: relative;
    display: block;
}

.password-field > input {
    padding-right: 84px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    min-width: 68px;
    height: 36px;
    padding: 0 10px;
    color: #c7b7ff;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transform: translateY(-50%);
    font-size: 0.78rem;
    font-weight: 800;
}

.password-toggle:hover {
    background: rgba(139, 92, 246, 0.10);
}

.password-toggle:focus-visible {
    outline: 2px solid #9b7cff;
    outline-offset: 2px;
}

.primary-button,
.secondary-button {
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 120ms ease, filter 120ms ease, opacity 120ms ease, border-color 120ms ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border: 0;
    box-shadow: 0 12px 28px rgba(124, 60, 255, 0.24);
}

.secondary-button {
    color: #e6deff;
    background: rgba(124, 60, 255, 0.10);
    border: 1px solid rgba(177, 141, 255, 0.32);
}

.primary-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled) {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled) {
    transform: translateY(0);
}

.primary-button:focus-visible,
.secondary-button:focus-visible {
    outline: 3px solid rgba(169, 131, 255, 0.45);
    outline-offset: 3px;
}

.primary-button:disabled,
.secondary-button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
    box-shadow: none;
}

.turnstile-wrap {
    display: flex;
    justify-content: center;
    min-height: 65px;
    overflow: hidden;
}

.recovery-box {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 12px;
    margin-top: 20px;
    padding: 16px;
    color: var(--muted);
    background: rgba(124, 60, 255, 0.07);
    border: 1px solid rgba(177, 141, 255, 0.22);
    border-radius: 14px;
}

.recovery-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #d4c6ff;
    background: rgba(139, 92, 246, 0.13);
    border: 1px solid rgba(177, 141, 255, 0.23);
    border-radius: 10px;
    font-size: 1.15rem;
}

.recovery-box h2 {
    margin: 1px 0 5px;
    color: #fff;
    font-size: 0.98rem;
}

.recovery-box p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.55;
}

.recovery-box form {
    grid-column: 1 / -1;
    margin-top: 4px;
}

.register-link {
    margin: 20px 0 0;
    color: var(--muted);
    text-align: center;
    font-size: 0.875rem;
}

.register-link a {
    color: #cbb9ff;
    font-weight: 750;
    text-decoration: none;
}

.register-link a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.register-link a:focus-visible {
    outline: 2px solid #9b7cff;
    outline-offset: 3px;
    border-radius: 4px;
}

.bot-trap {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

@media (max-width: 520px) {
    .login-shell {
        place-items: start center;
        padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    }

    .login-card {
        margin: 0 auto;
        padding: 25px 20px;
        border-radius: 18px;
    }

    .login-logo {
        width: 96px;
        height: 96px;
    }

    .login-brand {
        margin-bottom: 15px;
    }

    .login-header {
        margin-bottom: 20px;
    }
}

@media (max-width: 360px) {
    .login-card {
        padding: 22px 16px;
    }

    .login-logo {
        width: 86px;
        height: 86px;
    }

    .password-toggle {
        min-width: 62px;
        font-size: 0.73rem;
    }

    .password-field > input {
        padding-right: 76px;
    }
}

@media (max-height: 700px) and (min-width: 521px) {
    .login-shell {
        place-items: start center;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .login-card {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .login-logo {
        width: 88px;
        height: 88px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}


/* PRIVACY + LEGAL */
.privacy-page{min-height:100dvh}
.privacy-shell{width:min(920px,calc(100% - 32px));margin:0 auto;padding:clamp(28px,6vw,72px) 0 80px}
.privacy-top{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:28px}
.privacy-brand{display:inline-flex;align-items:center;text-decoration:none}.privacy-brand img{width:82px;height:82px;object-fit:contain}
.privacy-card{padding:clamp(20px,4vw,34px);border:1px solid var(--line);border-radius:var(--radius-xl);background:linear-gradient(155deg,rgba(20,25,38,.97),rgba(11,15,24,.98));box-shadow:var(--shadow)}
.privacy-card h1{margin:4px 0 12px;font-size:clamp(2rem,6vw,3.4rem);letter-spacing:-.045em}.privacy-card h2{margin:28px 0 8px;font-size:1.12rem}
.privacy-card p,.privacy-card li{color:var(--muted);line-height:1.7}.privacy-card ul{padding-left:1.2rem}
.privacy-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:30px}
.login-legal{display:flex;justify-content:center;margin-top:12px}.login-legal a{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:0 14px;border:1px solid var(--line,#293140);border-radius:12px;color:var(--muted,#98a3b6);text-decoration:none;font-size:.82rem;font-weight:800}
@media(hover:hover) and (pointer:fine){.login-legal a:hover{color:var(--text,#fff);border-color:rgba(198,109,255,.42);background:rgba(157,0,255,.06)}}
@media(max-width:620px){.privacy-top{align-items:flex-start;flex-direction:column}.privacy-actions>*{width:100%}}

/* LOGIN PASSWORD TOGGLE · final override */
.login-page .field .password-field{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:stretch!important;gap:8px!important;width:100%!important}
.login-page .field .password-field>input{min-width:0!important;width:100%!important}
.login-page .password-toggle{position:static!important;inset:auto!important;width:auto!important;min-width:88px!important;min-height:46px!important;margin:0!important;padding:0 13px!important;border:1px solid var(--line,#293140)!important;border-radius:12px!important;color:var(--muted,#98a3b6)!important;background:rgba(255,255,255,.025)!important;font-size:.78rem!important;font-weight:850!important;white-space:nowrap!important;transform:none!important}
@media(hover:hover) and (pointer:fine){.login-page .password-toggle:hover{color:var(--text,#fff)!important;border-color:rgba(198,109,255,.42)!important;background:rgba(157,0,255,.07)!important;transform:translateY(-1px)!important}}
.login-page .password-toggle[aria-pressed=true]{color:#e3c7ff!important;border-color:rgba(198,109,255,.45)!important;background:rgba(157,0,255,.09)!important}
@media(max-width:390px){.login-page .field .password-field{grid-template-columns:1fr!important}.login-page .password-toggle{width:100%!important}}
