:root {
    --bg: #020d18;
    --panel: #06182a;
    --panel-2: #082036;
    --panel-3: #0b2944;

    --border: rgba(61, 170, 255, .16);
    --border-soft: rgba(255, 255, 255, .08);

    --blue: #1ba8ff;
    --blue-2: #0077ff;
    --cyan: #21d4fd;
    --green: #2ee6a6;
    --amber: #ffc857;

    --text: #f4f8ff;
    --muted: #8ea9c3;

    --sidebar: 74px;
}


/* ============================================================
   GLOBAL
   ============================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    background:
        radial-gradient(circle at 80% 5%,
            rgba(0, 119, 255, .10),
            transparent 26%),
        #020d18;

    color: var(--text);

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

a {
    color: inherit;
}

button,
input {
    font: inherit;
}


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

.login-page {
    overflow-x: hidden;
}

.login-shell {
    min-height: 100vh;

    display: grid;

    grid-template-columns:
        minmax(0, 1.3fr) minmax(360px, .7fr);
}


.login-brand-panel {
    position: relative;
    overflow: hidden;

    padding:
        56px clamp(30px, 6vw, 90px);

    display: flex;
    flex-direction: column;

    justify-content: space-between;

    background:
        linear-gradient(125deg,
            rgba(2, 13, 24, .95),
            rgba(3, 34, 58, .86)),
        radial-gradient(circle at 80% 15%,
            rgba(33, 212, 253, .18),
            transparent 34%);
}


.login-brand-panel::after {
    content: "";

    width: 520px;
    height: 520px;

    position: absolute;

    right: -160px;
    bottom: -200px;

    border:
        1px solid rgba(33, 212, 253, .15);

    border-radius: 50%;

    box-shadow:
        0 0 0 80px rgba(33, 212, 253, .02),

        0 0 0 160px rgba(33, 212, 253, .015);
}


.university-lockup {
    display: flex;

    align-items: center;

    gap: 20px;

    position: relative;

    z-index: 2;
}


.crest-frame,
.crest-mini {
    display: grid;

    place-items: center;

    flex: 0 0 auto;

    overflow: hidden;

    border:
        1px solid rgba(255, 200, 87, .38);

    background:
        rgba(255, 200, 87, .04);

    color: #ffcf66;

    font-weight: 900;
}


.crest-frame {
    width: 86px;
    height: 86px;

    border-radius: 50%;
}


.crest-mini {
    width: 48px;
    height: 48px;

    border-radius: 12px;
}


.crest-frame img,
.crest-mini img {
    width: 100%;
    height: 100%;

    object-fit: contain;
}


.crest-frame span,
.crest-mini span {
    display: none;
}


.crest-frame.logo-fallback span,
.crest-mini.logo-fallback span {
    display: block;
}


.eyebrow,
.section-kicker {
    color: var(--blue);

    letter-spacing: .16em;

    font-weight: 800;

    font-size: 11px;
}


.university-lockup h1 {
    max-width: 760px;

    margin-top: 8px;

    font-size:
        clamp(26px, 3vw, 48px);

    line-height: 1.04;
}


.subtitle {
    color: var(--muted);

    margin-top: 10px;
}


.login-visual {
    max-width: 760px;

    position: relative;

    z-index: 2;

    padding-bottom: 7vh;
}


.visual-kicker {
    color: var(--cyan);

    font-weight: 900;

    letter-spacing: .22em;

    font-size: 12px;
}


.login-visual h2 {
    font-size:
        clamp(36px, 5.5vw, 78px);

    line-height: .98;

    margin: 18px 0;
}


.login-visual>p {
    max-width: 650px;

    color: var(--muted);

    font-size: 17px;

    line-height: 1.7;
}


.mini-flow {
    margin-top: 30px;

    display: flex;

    gap: 12px;

    align-items: center;

    flex-wrap: wrap;
}


.mini-flow span {
    padding: 8px 13px;

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

    background:
        rgba(27, 168, 255, .05);

    border-radius: 8px;

    font-size: 12px;

    letter-spacing: .12em;

    font-weight: 800;
}


.mini-flow i {
    color: var(--blue);

    font-style: normal;
}


.login-form-panel {
    min-height: 100vh;

    display: grid;

    place-items: center;

    padding: 32px;

    background: #04111f;

    border-left:
        1px solid var(--border);
}


.login-card {
    width:
        min(440px, 100%);

    padding: 38px;

    border-radius: 22px;

    background:
        linear-gradient(180deg,
            rgba(8, 32, 54, .96),
            rgba(4, 20, 35, .98));

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

    box-shadow:
        0 30px 90px rgba(0, 0, 0, .32);
}


.pill {
    display: inline-flex;

    align-items: center;

    padding: 6px 10px;

    color: #83d9ff;

    background:
        rgba(27, 168, 255, .09);

    border:
        1px solid rgba(27, 168, 255, .18);

    border-radius: 999px;

    font-size: 10px;

    letter-spacing: .12em;

    font-weight: 900;
}


.login-card h2 {
    font-size: 34px;

    margin: 20px 0 7px;
}


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


.login-card form {
    margin-top: 30px;

    display: grid;

    gap: 18px;
}


.login-card label {
    color: #c8d8e8;

    font-size: 13px;

    font-weight: 700;

    display: grid;

    gap: 8px;
}


.login-card input {
    width: 100%;

    padding: 13px 14px;

    color: white;

    outline: none;

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

    border-radius: 10px;

    background: #03101d;

    transition: .2s;
}


.login-card input:focus {
    border-color:
        rgba(27, 168, 255, .7);

    box-shadow:
        0 0 0 3px rgba(27, 168, 255, .08);
}


.alert {
    margin-top: 20px;

    padding: 11px 13px;

    border-radius: 9px;

    color: #ffd0d0;

    background:
        rgba(255, 85, 85, .09);

    border:
        1px solid rgba(255, 85, 85, .22);

    font-size: 13px;
}


.security-note {
    color: #6f8ba6;

    font-size: 11px;

    line-height: 1.5;

    margin-top: 22px;
}


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

.btn {
    display: inline-flex;

    justify-content: center;
    align-items: center;

    min-height: 42px;

    padding: 10px 17px;

    border:
        1px solid transparent;

    border-radius: 9px;

    text-decoration: none;

    cursor: pointer;

    font-size: 12px;

    font-weight: 850;

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


.btn:hover {
    transform:
        translateY(-1px);
}


.btn.primary,
.btn.blue {
    color: white;

    background:
        linear-gradient(90deg,
            var(--blue-2),
            var(--blue));

    box-shadow:
        0 8px 26px rgba(0, 119, 255, .18);
}


.btn.ghost {
    color: #cce8ff;

    background:
        rgba(27, 168, 255, .06);

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


.full {
    width: 100%;
}


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

.sidebar {
    position: fixed;

    inset:
        0 auto 0 0;

    width:
        var(--sidebar);

    z-index: 30;

    background:
        #020b14;

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

    display: flex;

    flex-direction: column;

    align-items: center;

    padding: 18px 0;
}


.side-logo {
    width: 44px;
    height: 44px;

    display: grid;

    place-items: center;

    border-radius: 12px;

    background:
        linear-gradient(145deg,
            var(--blue),
            var(--blue-2));

    font-size: 12px;

    font-weight: 900;

    margin-bottom: 30px;

    box-shadow:
        0 6px 20px rgba(0, 119, 255, .18);
}


.sidebar nav {
    display: grid;

    gap: 13px;
}


.sidebar nav a {
    width: 44px;
    height: 44px;

    display: grid;

    place-items: center;

    color: #71c9ff;

    border-radius: 10px;

    text-decoration: none;

    font-size: 20px;

    transition:
        background .18s;
}


.sidebar nav a:hover,
.sidebar nav a.active {
    background:
        rgba(27, 168, 255, .12);
}


.app-shell {
    margin-left:
        var(--sidebar);
}


/* ============================================================
   TOPBAR
   ============================================================ */

.topbar {
    min-height: 78px;

    padding: 12px 26px;

    position: sticky;

    top: 0;

    z-index: 20;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    background:
        rgba(2, 13, 24, .94);

    backdrop-filter:
        blur(14px);

    border-bottom:
        1px solid var(--border);
}


.top-brand {
    display: flex;

    align-items: center;

    gap: 13px;
}


.top-brand strong {
    display: block;

    font-size: 16px;
}


.top-brand strong b {
    color:
        var(--blue);
}


.top-brand small,
.userbox small {
    display: block;

    margin-top: 4px;

    color:
        var(--muted);

    font-size: 11px;
}


.userbox {
    display: flex;

    align-items: center;

    gap: 10px;

    font-size: 12px;
}


.logout-link {
    padding: 7px 10px;

    color: #9bc8e8;

    text-decoration: none;

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

    margin-left: 5px;
}


.status-dot {
    display: inline-block;

    width: 8px;
    height: 8px;

    border-radius: 50%;

    background:
        var(--green);

    box-shadow:
        0 0 12px var(--green);
}


/* ============================================================
   DASHBOARD GENERAL
   ============================================================ */

.dashboard {
    max-width: 1540px;

    margin: auto;

    padding: 26px;
}


/* ============================================================
   HERO
   ============================================================ */

.hero-dashboard {
    min-height: 380px;

    display: grid;

    grid-template-columns:
        1.5fr .7fr;

    gap: 28px;

    align-items: center;

    padding:
        clamp(32px, 5vw, 70px);

    overflow: hidden;

    position: relative;

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

    border-radius: 20px;

    background:
        radial-gradient(circle at 82% 18%,
            rgba(27, 168, 255, .17),
            transparent 24%),
        linear-gradient(115deg,
            #04111f,
            #07213a 58%,
            #05223d);

    box-shadow:
        0 15px 45px rgba(0, 0, 0, .18);
}


.hero-dashboard::after {
    content: "";

    position: absolute;

    inset:
        auto -160px -280px auto;

    width: 600px;
    height: 600px;

    border-radius: 50%;

    border:
        1px solid rgba(33, 212, 253, .12);

    box-shadow:
        0 0 0 90px rgba(33, 212, 253, .018),

        0 0 0 180px rgba(33, 212, 253, .012);
}


.hero-copy {
    position: relative;

    z-index: 2;
}


.hero-copy h1 {
    margin: 18px 0;

    max-width: 950px;

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

    line-height: .96;

    letter-spacing: -.035em;
}


.hero-copy h1 span {
    display: block;

    background:
        linear-gradient(90deg,
            #f6fbff,
            var(--blue),
            var(--cyan));

    -webkit-background-clip: text;

    color: transparent;
}


.hero-copy>p {
    max-width: 760px;

    color: #9fb7ce;

    line-height: 1.7;
}


.hero-actions {
    margin-top: 26px;

    display: flex;

    gap: 10px;

    flex-wrap: wrap;
}


.hero-status {
    position: relative;

    z-index: 2;
}


.online-chip {
    width: max-content;

    margin:
        0 0 17px auto;

    padding: 8px 13px;

    color: #66f3c1;

    border:
        1px solid rgba(46, 230, 166, .24);

    background:
        rgba(46, 230, 166, .07);

    border-radius: 999px;

    font-size: 11px;

    font-weight: 900;

    letter-spacing: .08em;
}


.stat-grid {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 11px;
}


.stat-grid div {
    padding: 20px;

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

    border-radius: 13px;

    background:
        rgba(2, 13, 24, .55);
}


.stat-grid b {
    display: block;

    font-size: 22px;
}


.stat-grid span {
    color:
        var(--muted);

    font-size: 10px;
}


/* ============================================================
   SECCIONES
   ============================================================ */

.dashboard-section {
    margin-top: 42px;
}


.section-title {
    display: flex;

    justify-content: space-between;

    align-items: end;

    gap: 15px;

    margin-bottom: 18px;
}


.section-title h2 {
    margin-top: 4px;

    font-size: 26px;
}


/* ============================================================
   WORKSPACE GRUPAL
   ============================================================ */

.workspace-card {
    min-height: 155px;

    padding: 28px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    border-radius: 17px;

    border:
        1px solid rgba(27, 168, 255, .26);

    background:
        linear-gradient(105deg,
            rgba(27, 168, 255, .10),
            rgba(0, 119, 255, .035)),
        var(--panel);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, .12);
}


.card-icon {
    color:
        var(--cyan);

    font-size: 28px;
}


.workspace-card h3 {
    font-size: 22px;

    margin: 8px 0;
}


.workspace-card p,
.service-card p {
    color:
        var(--muted);

    line-height: 1.55;

    font-size: 12px;
}


/* ============================================================
   EQUIPO / JUPYTER PERSONALES
   ============================================================ */

.team-grid {
    display: grid;

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

    gap: 18px;
}


.member-card {
    position: relative;

    min-height: 300px;

    padding: 24px;

    display: flex;

    flex-direction: column;

    border:
        1px solid rgba(61, 170, 255, .17);

    border-radius: 18px;

    background:
        linear-gradient(180deg,
            #0b1d31 0%,
            #081827 100%);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, .16);

    transition:
        transform .20s ease,
        border-color .20s ease,
        box-shadow .20s ease;
}


.member-card:hover {
    transform:
        translateY(-4px);

    border-color:
        rgba(33, 183, 255, .42);

    box-shadow:
        0 16px 38px rgba(0, 0, 0, .24);
}


.member-head {
    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    margin-bottom: 18px;
}


.avatar {
    width: 52px;
    height: 52px;

    display: grid;

    place-items: center;

    border-radius: 14px;

    font-size: 24px;

    color: #87d9ff;

    background:
        linear-gradient(145deg,
            rgba(27, 168, 255, .16),
            rgba(0, 119, 255, .07));

    border:
        1px solid rgba(27, 168, 255, .28);

    box-shadow:
        inset 0 0 20px rgba(27, 168, 255, .04);
}


.member-card h3 {
    margin-top: 0;

    font-size: 18px;

    font-weight: 800;

    color:
        #f4f8ff;
}


.role-tag {
    display: inline-flex;

    width: max-content;

    margin:
        9px 0 15px;

    padding: 5px 9px;

    border-radius: 999px;

    color: #73ceff;

    background:
        rgba(27, 168, 255, .09);

    border:
        1px solid rgba(27, 168, 255, .20);

    font-size: 10px;

    font-weight: 900;

    letter-spacing: .03em;

    text-transform: uppercase;
}


.member-card p {
    min-height: 60px;

    color: #9fb4c8;

    font-size: 13px;

    line-height: 1.65;

    margin-bottom: 22px;
}


.member-card .btn {
    width: 100%;

    margin-top: auto;

    min-height: 45px;

    border-radius: 10px;

    background:
        linear-gradient(90deg,
            #179ee9,
            #2563eb);
}


.member-card .btn:hover {
    box-shadow:
        0 8px 25px rgba(37, 99, 235, .28);
}


/* ============================================================
   ESTADOS DE SERVICIOS
   ============================================================ */

.service-state,
.ok-static {
    display: inline-flex;

    align-items: center;

    width: max-content;

    padding: 5px 8px;

    border-radius: 999px;

    color: #adc1d3;

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

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

    font-size: 9px;

    font-weight: 850;
}


.service-state.online,
.ok-static {
    color: #64efb9;

    background:
        rgba(46, 230, 166, .07);

    border-color:
        rgba(46, 230, 166, .18);
}


.service-state.offline {
    color: #ff9898;

    background:
        rgba(255, 90, 90, .07);

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


.compact {
    font-size: 8px;
}


/* ============================================================
   MEDALLION ARCHITECTURE
   ============================================================ */

.medallion-grid {
    display: grid;

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

    gap: 16px;
}


.layer {
    position: relative;

    overflow: hidden;

    padding: 27px;

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

    background:
        linear-gradient(180deg,
            var(--panel),
            #041522);

    border-radius: 16px;

    min-height: 235px;

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


.layer:hover {
    transform:
        translateY(-3px);

    border-color:
        rgba(61, 170, 255, .30);
}


.layer::after {
    content: "";

    width: 170px;
    height: 170px;

    position: absolute;

    top: -80px;

    right: -65px;

    border-radius: 50%;

    opacity: .15;
}


.layer.bronze::after {
    background: #c87533;
}


.layer.silver::after {
    background: #cbd5e1;
}


.layer.gold::after {
    background: #ffc857;
}


.layer-number {
    color:
        var(--muted);

    font-size: 10px;

    letter-spacing: .16em;
}


.layer h3 {
    font-size: 25px;

    margin:
        8px 0 10px;
}


.layer p {
    min-height: 55px;

    color:
        var(--muted);

    font-size: 12px;

    line-height: 1.55;
}


.layer ul {
    margin-top: 17px;

    list-style: none;

    display: grid;

    gap: 8px;

    color: #b8c9d9;

    font-size: 11px;
}


.layer li::before {
    content: "•";

    color:
        var(--blue);

    margin-right: 8px;
}


/* ============================================================
   SERVICIOS
   ============================================================ */

.services-grid {
    display: grid;

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

    gap: 15px;
}


.service-card {
    padding: 20px;

    display: flex;

    flex-direction: column;

    gap: 12px;

    min-height: 225px;

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

    background:
        linear-gradient(180deg,
            var(--panel),
            #041522);

    border-radius: 15px;

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


.service-card:hover {
    transform:
        translateY(-3px);

    border-color:
        rgba(61, 170, 255, .30);
}


.service-icon {
    width: 44px;
    height: 44px;

    display: grid;

    place-items: center;

    color:
        var(--cyan);

    border-radius: 11px;

    background:
        rgba(27, 168, 255, .08);

    border:
        1px solid rgba(27, 168, 255, .15);

    font-size: 13px;

    font-weight: 900;
}


.service-card h3 {
    font-size: 17px;
}


.internal-label {
    color: #7f9bb4;

    font-size: 10px;

    margin-top: auto;
}


/* ============================================================
   ARQUITECTURA TÉCNICA
   ============================================================ */

.architecture-flow {
    display: flex;

    align-items: stretch;

    gap: 10px;
}


.architecture-flow i {
    align-self: center;

    color:
        var(--blue);

    font-style: normal;

    font-size: 17px;
}


.arch-node {
    flex: 1;

    min-height: 100px;

    padding: 18px;

    display: grid;

    place-content: center;

    text-align: center;

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

    border-radius: 13px;

    background:
        var(--panel);
}


.arch-node.highlighted {
    border-color:
        rgba(27, 168, 255, .35);

    background:
        rgba(27, 168, 255, .08);
}


.arch-node.wide {
    flex: 1.6;
}


.arch-node strong {
    font-size: 13px;

    color: #ddecfa;
}


.arch-node span {
    color:
        var(--muted);

    font-size: 10px;

    margin-top: 5px;
}


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

footer {
    margin-top: 48px;

    padding:
        24px 0 6px;

    display: flex;

    justify-content: space-between;

    gap: 10px;

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

    color: #69839a;

    font-size: 10px;
}


/* ============================================================
   RESPONSIVE - TABLET
   ============================================================ */

@media (max-width: 1100px) {

    .team-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .services-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }


    .hero-dashboard {
        grid-template-columns:
            1fr;
    }


    .hero-status {
        max-width: 520px;
    }


    .online-chip {
        margin-left: 0;
    }

}


/* ============================================================
   RESPONSIVE - CELULAR
   ============================================================ */

@media (max-width: 760px) {

    :root {
        --sidebar: 0px;
    }


    .sidebar {
        display: none;
    }


    .login-shell {
        grid-template-columns: 1fr;
    }


    .login-brand-panel {
        min-height: 52vh;

        padding:
            35px 24px;
    }


    .login-form-panel {
        min-height: auto;

        padding:
            25px 18px 45px;
    }


    .university-lockup {
        align-items:
            flex-start;
    }


    .crest-frame {
        width: 65px;

        height: 65px;
    }


    .topbar {
        align-items:
            flex-start;

        flex-direction:
            column;
    }


    .userbox {
        width: 100%;
    }


    .dashboard {
        padding: 16px;
    }


    .hero-dashboard {
        padding:
            30px 22px;
    }


    .team-grid,
    .services-grid,
    .medallion-grid {
        grid-template-columns:
            1fr;
    }


    .member-card {
        min-height: 280px;
    }


    .workspace-card,
    .section-title,
    footer {
        align-items:
            flex-start;

        flex-direction:
            column;
    }


    .architecture-flow {
        flex-direction:
            column;
    }


    .architecture-flow i {
        transform:
            rotate(90deg);
    }

}