* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: radial-gradient(circle at top left, #0d1c2f 0%, #050b14 45%, #02060b 100%);
    color: #eef6ff;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

button, input, select, textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    padding: 16px 18px;
    border-right: 1px solid rgba(129,173,255,.12);
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 👈 CAMBIO CLAVE */
    gap: 16px; /* 👈 controla separación */
    position: sticky;
    top: 0;
    height: 100vh;
}

.glass {
    background: linear-gradient(180deg, rgba(13,23,38,.92), rgba(7,12,20,.88));
    backdrop-filter: blur(18px);
    box-shadow: 0 20px 80px rgba(0,0,0,.35);
}

.main-area {
    flex: 1;
    padding: 26px 30px 40px;
}

.auth-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #67e8f9, #3b82f6 48%, #a855f7);
    font-weight: 800;
    color: #02111f;
    letter-spacing: 1px;
    box-shadow: 0 12px 40px rgba(59,130,246,.35);
}

.brand-text {
    margin-top: 6px; /* 👈 antes 14 */
    display: flex;
    flex-direction: column;
    gap: 2px; /* 👈 más compacto */
}

.brand-text span,
.muted {
    color: #93a8c6;
}

.small {
    font-size: 12px;
}

.mt-8 {
    margin-top: 8px;
}

.nav-stack {
    display: grid;
    gap: 10px;
    margin-top: 0px; /* 👈 antes 28 */
}

.nav-link {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(148,163,184,.12);
    background: rgba(255,255,255,.02);
    color: #dbeafe;
    transition: .22s transform, .22s background, .22s border-color;
}

.nav-link:hover,
.nav-link.active {
    background: linear-gradient(90deg, rgba(56,189,248,.18), rgba(168,85,247,.16));
    border-color: rgba(96,165,250,.4);
    transform: translateX(2px);
}

.nav-link.danger {
    color: #fda4af;
}

.sidebar-foot {
    padding: 18px;
    border: 1px solid rgba(129,173,255,.14);
    border-radius: 20px;
    background: rgba(255,255,255,.03);
    margin-top: auto; /* 👈 empuja al fondo sin romper layout */
}

.flash {
    padding: 14px 18px;
    border-radius: 16px;
    margin-bottom: 18px;
    border: 1px solid;
}

.flash.success {
    background: rgba(34,197,94,.12);
    border-color: rgba(34,197,94,.32);
}

.flash.error {
    background: rgba(239,68,68,.12);
    border-color: rgba(239,68,68,.3);
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 22px;
}

.page-head h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.03;
    letter-spacing: -.03em;
}

.page-head p {
    margin: 8px 0 0;
    color: #9cb0cc;
    max-width: 850px;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid.kpi {
    grid-template-columns: repeat(4, minmax(0,1fr));
    margin-bottom: 20px;
}

.card {
    background: linear-gradient(180deg, rgba(10,18,30,.9), rgba(4,9,15,.92));
    border: 1px solid rgba(134,176,255,.12);
    border-radius: 26px;
    padding: 22px;
    box-shadow: 0 20px 70px rgba(0,0,0,.25);
}

.kpi-card .label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: #86a3c9;
}

.kpi-card .value {
    font-size: 34px;
    font-weight: 800;
    margin-top: 10px;
}

.kpi-card .sub {
    font-size: 13px;
    color: #8ea3c3;
    margin-top: 4px;
}

.two-col {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 18px;
}

.three-col {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 18px;
}

.table-wrap {
    overflow: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(148,163,184,.1);
    text-align: left;
    vertical-align: top;
}

.table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: #81a3d1;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.pill.ok {
    background: rgba(34,197,94,.14);
    color: #9ae6b4;
}

.pill.warn {
    background: rgba(250,204,21,.14);
    color: #fde68a;
}

.pill.muted {
    background: rgba(148,163,184,.14);
    color: #cbd5e1;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 13px 18px;
    border-radius: 16px;
    border: 1px solid rgba(120,171,255,.22);
    background: linear-gradient(135deg, #111d30, #15253d);
    color: #e8f1fe;
    font-weight: 700;
    box-shadow: 0 12px 40px rgba(0,0,0,.15);
}

.btn.primary {
    background: linear-gradient(135deg, #67e8f9, #3b82f6 52%, #7c3aed);
    color: #061221;
    border: none;
}

.btn.ghost {
    background: rgba(255,255,255,.03);
}

.btn.danger {
    background: rgba(239,68,68,.12);
    border-color: rgba(239,68,68,.24);
    color: #fecaca;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field label {
    font-size: 13px;
    color: #9eb2cc;
}

.field input,
.field select,
.field textarea {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(140,170,220,.16);
    background: #09111b;
    color: #f3f8ff;
    outline: none;
}

.field textarea {
    min-height: 120px;
    resize: vertical;
}

.stack-16 {
    display: grid;
    gap: 16px;
}

.login-card {
    width: min(100%,460px);
    padding: 32px;
    border-radius: 30px;
    border: 1px solid rgba(130,173,255,.12);
    background: linear-gradient(180deg, rgba(7,13,22,.9), rgba(14,23,39,.96));
    box-shadow: 0 30px 120px rgba(0,0,0,.4);
}

.login-badge {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(103,232,249,.14);
    color: #a5f3fc;
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.login-card h2 {
    font-size: 34px;
    letter-spacing: -.04em;
    margin: 18px 0 10px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 18px;
    margin-bottom: 18px;
}

.list-clean {
    display: grid;
    gap: 12px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(148,163,184,.1);
}

.avatar-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(148,163,184,.16);
    background: rgba(255,255,255,.02);
}

.avatar-card img {
    width: 84px;
    height: 84px;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid rgba(148,163,184,.16);
}

.score-bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(148,163,184,.14);
    overflow: hidden;
}

.score-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #67e8f9, #3b82f6, #8b5cf6);
}

.certificate {
    position: relative;
    border-radius: 32px;
    padding: 42px;
    background: linear-gradient(135deg, rgba(2,6,23,.96), rgba(14,20,35,.96));
    border: 1px solid rgba(148,163,184,.14);
    overflow: hidden;
}

.certificate:before,
.certificate:after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    opacity: .5;
}

.certificate:before {
    width: 260px;
    height: 260px;
    right: -40px;
    top: -60px;
    background: #38bdf8;
}

.certificate:after {
    width: 220px;
    height: 220px;
    left: -80px;
    bottom: -80px;
    background: #8b5cf6;
}

.certificate-inner {
    position: relative;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 24px;
    padding: 34px;
    background: rgba(255,255,255,.04);
}

.certificate h2 {
    font-size: 42px;
    margin: 0 0 12px;
    letter-spacing: -.04em;
}

.certificate .eyebrow {
    letter-spacing: .28em;
    text-transform: uppercase;
    font-size: 12px;
    color: #7dd3fc;
}

.certificate .name {
    font-size: 34px;
    font-weight: 800;
    margin: 16px 0;
}

.note {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(59,130,246,.12);
    border: 1px solid rgba(59,130,246,.22);
    color: #bfdbfe;
}

.chip-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.chip {
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(148,163,184,.12);
    font-size: 13px;
}

.split {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.muted-link {
    color: #7dd3fc;
}

.hr {
    height: 1px;
    background: rgba(148,163,184,.14);
    margin: 18px 0;
}

.public-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px;
}

.public-card {
    width: min(100%,760px);
    padding: 28px;
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(10,16,28,.96), rgba(8,13,22,.96));
    border: 1px solid rgba(130,173,255,.14);
}

.public-card h1 {
    font-size: 36px;
    letter-spacing: -.04em;
    margin: 12px 0;
}

.hint {
    font-size: 13px;
    color: #9fb3cf;
}

@media (max-width:1080px) {
    .grid.kpi,
    .two-col,
    .three-col,
    .hero-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .main-area {
        padding: 18px;
    }
}







/* LOGO LOGIN - FLOAT */
.login-logo {
    display: flex;
    justify-content: center;
    position: relative;
    margin-bottom: -40px; /* 👈 clave: rompe hacia abajo */
    z-index: 2;
}

.login-logo img {
    width: 130px;
    height: auto;
    transform: translateY(-60px); /* 👈 sube el logo fuera del card */
    border-radius: 20px;
    background: #facc15; /* opcional si quieres ese fondo amarillo sólido */
    padding: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}



.login-badge {
    display: block;
    margin: 0 auto;
    width: fit-content;
    text-align: center;
}


















/* SIDEBAR LOGO */
.sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;           /* 👈 antes 12 */
    margin-bottom: 6px; /* 👈 CLAVE: controla espacio con menú */
}

.sidebar-brand img {
    width: 70px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform .25s ease, filter .25s ease;
}

.sidebar-brand a:hover img {
    transform: scale(1.08);
    filter: drop-shadow(0 15px 40px rgba(59,130,246,0.4));
}




.sidebar {
    padding: 16px 18px; /* 👈 reduce padding general */
}