/* ETERNAWORLD · BASE */

/* =========================================================
   TEMA OSCURO · PREDETERMINADO
========================================================= */

:root,
html[data-theme="dark"] {
    color-scheme: dark;

    --bg: #080b12;
    --bg-soft: #0c1019;

    --panel: #111620;
    --panel-2: #171d29;
    --panel-3: #1d2432;

    --line: #293140;
    --line-soft: rgba(255, 255, 255, 0.07);

    --text: #f5f7fb;
    --muted: #98a3b6;

    --accent: #9d00ff;
    --accent-2: #c66dff;
    --accent-soft: rgba(157, 0, 255, 0.10);

    --ok: #45dfa6;
    --warning: #ffb75e;
    --danger: #ff6c82;

    --sidebar-bg: rgba(8, 11, 18, 0.88);

    --card-gradient-a: #141926;
    --card-gradient-b: #0e131d;

    --checkin-gradient-a: #141925;
    --checkin-gradient-b: #10151f;

    --field-bg: #0c1018;

    --body-radial-1: rgba(157, 0, 255, 0.08);
    --body-radial-2: rgba(69, 223, 166, 0.04);

    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;

    --shadow:
        0 24px 70px rgba(0, 0, 0, 0.28);
}


/* =========================================================
   TEMA CLARO
========================================================= */

html[data-theme="light"] {
    color-scheme: light;

    --bg: #f4f6fb;
    --bg-soft: #edf1f7;

    --panel: #ffffff;
    --panel-2: #f8f9fc;
    --panel-3: #eef2f7;

    --line: #d9dfe8;
    --line-soft: rgba(15, 23, 42, 0.07);

    --text: #151922;
    --muted: #667085;

    --accent: #8b00e8;
    --accent-2: #9d35e8;
    --accent-soft: rgba(157, 0, 255, 0.08);

    --ok: #159b70;
    --warning: #c57a19;
    --danger: #d94b63;

    --sidebar-bg: rgba(255, 255, 255, 0.92);

    --card-gradient-a: #ffffff;
    --card-gradient-b: #f5f7fb;

    --checkin-gradient-a: #ffffff;
    --checkin-gradient-b: #f7f8fc;

    --field-bg: #ffffff;

    --body-radial-1: rgba(157, 0, 255, 0.07);
    --body-radial-2: rgba(69, 223, 166, 0.05);

    --shadow:
        0 24px 70px rgba(15, 23, 42, 0.10);
}


/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;

    min-height: 100vh;

    background:
        radial-gradient(
            circle at 68% 0%,
            var(--body-radial-1),
            transparent 32%
        ),
        radial-gradient(
            circle at 0% 100%,
            var(--body-radial-2),
            transparent 28%
        ),
        var(--bg);

    color: var(--text);

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


button,
input,
textarea {
    font: inherit;
}


button {
    cursor: pointer;
}


button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}


a {
    color: var(--accent-2);
}


[hidden] {
    display: none !important;
}


button:focus-visible,
a:focus-visible,
textarea:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 3px;
}


/* =========================================================
   LAYOUT
========================================================= */

.app-shell {
    display: grid;

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

    min-height: 100vh;
}


.sidebar {
    position: sticky;

    top: 0;

    height: 100vh;

    overflow-y: auto;

    padding: 28px 22px;

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

    background: var(--sidebar-bg);

    backdrop-filter: blur(18px);
}


.main-panel {
    width:
        min(
            1180px,
            calc(100% - 64px)
        );

    margin: 0 auto;

    padding:
        42px
        0
        70px;
}


/* =========================================================
   LOGO / MARCA
========================================================= */

.brand {
    display: inline-flex;

    align-items: center;

    text-decoration: none;

    font-size: 1.35rem;

    font-weight: 800;
}


.brand-with-logo {
    display: flex;

    align-items: center;

    gap: 12px;
}


.eternaworld-logo,
.brand-with-logo > img {
    width: 78px;

    height: 78px;

    object-fit: contain;

    border-radius: 14px;

    filter:
        drop-shadow(
            0 10px 24px
            rgba(69, 223, 166, 0.08)
        );
}


.brand-name {
    display: inline-block;
}


.brand span {
    color: var(--accent-2);
}


.tagline {
    margin:
        14px
        0
        25px;

    color: var(--muted);

    line-height: 1.5;

    font-size: 0.9rem;
}


/* =========================================================
   USUARIO
========================================================= */

.user-strip {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 12px;

    margin-bottom: 17px;
}


.user-strip strong {
    font-size: 0.94rem;
}


.user-strip a {
    font-size: 0.84rem;
}


/* =========================================================
   RACHA SIDEBAR
========================================================= */

.sidebar-streak-card {
    display: flex;

    gap: 13px;

    align-items: center;

    margin-bottom: 14px;

    padding: 15px;

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

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

    background:
        linear-gradient(
            160deg,
            var(--card-gradient-a),
            var(--card-gradient-b)
        );
}


.sidebar-streak-fire {
    display: grid;

    place-items: center;

    flex:
        0 0 46px;

    width: 46px;

    height: 46px;

    border-radius: 15px;

    background:
        rgba(
            255,
            165,
            72,
            0.09
        );

    font-size: 1.35rem;
}


.sidebar-streak-card small {
    display: block;

    color: var(--muted);
}


.sidebar-streak-card strong {
    display: block;

    margin-top: 2px;
}


.sidebar-streak-card p {
    margin:
        4px
        0
        0;

    color: var(--muted);

    font-size: 0.74rem;

    line-height: 1.4;
}


/* =========================================================
   USO
========================================================= */

.usage-card {
    display: grid;

    gap: 5px;

    margin-bottom: 18px;

    padding: 16px;

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

    border-radius:
        18px;

    background:
        var(--panel);
}


.usage-card span,
.usage-card small {
    color: var(--muted);
}


.usage-card strong {
    margin:
        2px
        0;

    font-size: 0.89rem;
}


/* =========================================================
   CHECK-IN
========================================================= */

.checkin-card {
    padding: 18px;

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

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

    background:
        linear-gradient(
            160deg,
            var(--checkin-gradient-a),
            var(--checkin-gradient-b)
        );
}


.card-heading h2,
.checkin-card h2 {
    margin:
        0
        0
        17px;

    font-size: 1rem;
}


.checkin-card label {
    display: flex;

    justify-content: space-between;

    gap: 10px;

    margin:
        14px
        0
        7px;

    color:
        var(--muted);

    font-size:
        0.85rem;
}


input[type="range"] {
    width: 100%;

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


textarea {
    width: 100%;

    resize: vertical;

    padding:
        12px;

    color:
        var(--text);

    background:
        var(--field-bg);

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

    border-radius:
        14px;
}


.checkin-card textarea {
    min-height:
        84px;
}


.checkin-card button {
    width: 100%;

    margin-top:
        12px;
}


/* =========================================================
   BOTONES
========================================================= */

.primary-button,
.primary-link {
    border:
        none;

    color:
        white;

    background:
        linear-gradient(
            135deg,
            #8f00ff,
            #be00ff
        );

    box-shadow:
        0 12px 30px
        rgba(157, 0, 255, 0.16);

    font-weight:
        800;
}


.primary-button {
    padding:
        12px 15px;

    border-radius:
        13px;
}


.primary-link {
    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    gap: 7px;

    padding:
        12px
        16px;

    border-radius:
        14px;

    text-decoration:
        none;
}


.secondary-button {
    padding:
        12px
        15px;

    color:
        var(--text);

    background:
        transparent;

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

    border-radius:
        13px;

    font-weight:
        700;
}


.primary-button,
.primary-link,
.secondary-button {
    transition:
        transform 0.16s ease,
        border-color 0.16s ease,
        opacity 0.16s ease;
}


.primary-button:hover,
.primary-link:hover,
.secondary-button:hover {
    transform:
        translateY(-1px);
}


/* =========================================================
   AJUSTES VISUALES · LIGHT
========================================================= */

html[data-theme="light"] .sidebar {
    box-shadow:
        12px 0 35px rgba(15, 23, 42, 0.05);
}


html[data-theme="light"] .sidebar-streak-card,
html[data-theme="light"] .usage-card,
html[data-theme="light"] .checkin-card {
    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.05);
}


html[data-theme="light"] textarea {
    box-shadow:
        inset 0 1px 2px rgba(15, 23, 42, 0.03);
}


/* =========================================================
   AJUSTES VISUALES · DARK
========================================================= */

html[data-theme="dark"] .sidebar {
    box-shadow:
        12px 0 40px rgba(0, 0, 0, 0.16);
}


html[data-theme="dark"] .sidebar-streak-card,
html[data-theme="dark"] .usage-card,
html[data-theme="dark"] .checkin-card {
    box-shadow:
        0 12px 36px rgba(0, 0, 0, 0.10);
}