:root {
    --bg: #05070a;
    --surface: #0c1015;
    --surface-2: #111720;
    --line: rgba(255, 255, 255, .11);
    --text: #f6f8fb;
    --muted: #9da7b4;
    --accent: #dce8f8;
    --danger: #ff7b7b;
    --success: #55d69e;
    --shadow: 0 30px 80px rgba(0, 0, 0, .55);
}


/* =========================================================
   BASE
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    background:
        radial-gradient(
            circle at 50% 0%,
            #151c27 0,
            #080b10 34%,
            #030405 75%
        );
    color: var(--text);
}

button,
input {
    font: inherit;
}


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

.login-page {
    min-height: 100vh;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 18px;
}

.login-card {
    width: min(100%, 470px);
    padding: 38px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(10, 14, 19, .92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}


/* =========================================================
   LOGIN — MARCA
   ========================================================= */

.brand {
    text-align: center;
    margin-bottom: 36px;
}

.brand-logo {
    display: block;
    width: min(100%, 360px);
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.brand-name {
    font-size: clamp(34px, 8vw, 50px);
    font-weight: 900;
    font-style: italic;
    letter-spacing: .11em;
    white-space: nowrap;
}

.brand-tagline {
    margin-top: 8px;
    font-size: 11px;
    letter-spacing: .28em;
    color: #c7d1dc;
}

.moon-pair {
    display: inline-flex;
    gap: 5px;
    vertical-align: -.08em;
    margin: 0 .04em;
}

.moon-pair i {
    display: block;
    width: .72em;
    height: .72em;
    border-radius: 50%;
    background: #020305;
    border: 2px solid #f7f9fc;
    box-shadow:
        4px 0 12px rgba(255, 255, 255, .9),
        0 0 20px rgba(255, 255, 255, .25);
}


/* =========================================================
   LOGIN — ENCABEZADO
   ========================================================= */

.login-copy {
    margin-bottom: 26px;
}

.eyebrow {
    margin: 0 0 8px;
    color: #aeb8c5;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2em;
}

h1 {
    margin: 0;
    font-size: 30px;
    letter-spacing: -.02em;
}

.login-copy > p:last-child {
    margin: 9px 0 0;
    color: var(--muted);
    line-height: 1.55;
}


/* =========================================================
   LOGIN — FORMULARIO
   ========================================================= */

.login-form {
    display: grid;
    gap: 18px;
}

.field {
    display: grid;
    gap: 8px;
}

.field label {
    font-size: 14px;
    font-weight: 700;
}

.field input {
    width: 100%;
    height: 52px;
    border: 1px solid #303946;
    border-radius: 12px;
    background: #090d12;
    color: var(--text);
    padding: 0 14px;
    outline: none;
    transition: .2s;
}

.field input:focus {
    border-color: #dce8f8;
    box-shadow: 0 0 0 4px rgba(220, 232, 248, .1);
}


/* =========================================================
   LOGIN — CONTRASEÑA
   ========================================================= */

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 64px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 8px;
    height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    color: #cbd4df;
    background: #171e27;
    cursor: pointer;
}


/* =========================================================
   LOGIN — BOTÓN PRINCIPAL
   ========================================================= */

.btn-primary {
    height: 54px;
    border: 0;
    border-radius: 12px;
    background: #f4f7fb;
    color: #06080b;
    font-weight: 900;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    transition: .2s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    background: #fff;
}

.btn-primary:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}


/* =========================================================
   LOGIN — SPINNER
   ========================================================= */

.spinner {
    display: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, .25);
    border-top-color: #000;
    animation: spin .75s linear infinite;
}

.btn-primary.loading .spinner {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   LOGIN — ENLACES Y ALERTAS
   ========================================================= */

.forgot-link {
    text-align: center;
    color: #c3ccd7;
    text-decoration: none;
    font-size: 14px;
}

.forgot-link[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
}

.alert {
    padding: 13px 14px;
    margin: 0 0 18px;
    border-radius: 11px;
    font-size: 14px;
    line-height: 1.45;

    border: 1px solid rgba(255, 123, 123, .4);
    background: rgba(108, 25, 25, .28);
    color: #ffd3d3;
}

.alert.success {
    border-color: rgba(85, 214, 158, .4);
    background: rgba(22, 94, 65, .28);
    color: #caffea;
}


/* =========================================================
   LOGIN — PIE
   ========================================================= */

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    text-align: center;
    color: #727e8d;
    font-size: 12px;
}


/* =========================================================
   DASHBOARD INICIAL
   ========================================================= */

.app-body {
    min-height: 100vh;
    background: #090c10;
    color: var(--text);
}


/* =========================================================
   DASHBOARD — TOPBAR
   ========================================================= */

.topbar {
    height: 68px;
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 20;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 26px;
    background: #030405;
    border-bottom: 1px solid var(--line);
}

.topbar-brand {
    font-weight: 900;
    font-style: italic;
    letter-spacing: .12em;
    font-size: 22px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #d8dee7;
}

.logout-btn {
    border: 1px solid var(--line);
    background: #12171e;
    color: #fff;
    border-radius: 9px;
    padding: 9px 13px;
    cursor: pointer;
}


/* =========================================================
   DASHBOARD — CONTENIDO
   ========================================================= */

.dashboard {
    padding: 108px 28px 40px;
    max-width: 1280px;
    margin: auto;
}

.dashboard h1 {
    font-size: 34px;
}

.dashboard p {
    color: var(--muted);
}


/* =========================================================
   DASHBOARD — MÓDULOS
   ========================================================= */

.module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 32px;
}

.module-card {
    min-height: 142px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #0e1319;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.module-card h2 {
    font-size: 18px;
    margin: 0;
}

.module-card span {
    color: #788493;
    font-size: 13px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 760px) {

    .login-card {
        padding: 27px 22px;
        border-radius: 18px;
    }

    .brand-logo {
        width: min(100%, 310px);
    }

    .brand-tagline {
        font-size: 9px;
        letter-spacing: .17em;
    }

    .module-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        padding: 0 16px;
    }

    .topbar-user .user-name {
        display: none;
    }

    .dashboard {
        padding: 96px 18px 28px;
    }

}