﻿/* =========================================================
   Keytor — TEMA GLOBAL
   ========================================================= */

:root {
    color-scheme: dark;
    --bg-0: #05070d;
    --bg-1: #0a0f1a;
    --panel: rgba(18, 24, 39, 0.78);
    --panel-strong: #111a2a;
    --border: rgba(148, 178, 255, 0.14);
    --text: #e8eefc;
    --muted: #a0aec3;
    --cyan: #22d3ee;
    --violet: #8b5cf6;
    --green: #34d399;
    --red: #fb7185;
    --amber: #fbbf24;
    --sidebar-width: 270px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient( 900px 600px at 12% -10%, rgba(34, 211, 238, 0.13), transparent 60% ), radial-gradient( 800px 700px at 95% 10%, rgba(139, 92, 246, 0.15), transparent 65% ), var(--bg-0);
    color: var(--text);
    font-family: "Segoe UI", system-ui, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #67e8f9;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid #67e8f9;
    outline-offset: 4px;
}

::selection {
    background: rgba(34, 211, 238, 0.25);
    color: #fff;
}

/* =========================================================
   ESTRUCTURA Y MENÚ
   ========================================================= */

.page {
    position: relative;
    display: block;
    min-height: 100vh;
}

    .page > .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: var(--sidebar-width);
        height: 100vh;
        padding: 28px 18px;
        overflow-y: auto;
        background: linear-gradient( 180deg, rgba(10, 15, 26, 0.98), rgba(5, 7, 13, 0.98) );
        border-right: 1px solid var(--border);
        backdrop-filter: blur(18px);
        z-index: 20;
    }

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 34px;
}

.brand-mark {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    color: #04121a;
    font-size: 1.1rem;
    font-weight: 900;
    box-shadow: 0 8px 26px rgba(34, 211, 238, 0.18);
}

.brand-name {
    color: #f1f5ff;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.2;
}

.brand-sub {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.17em;
}

.sidebar .nav-scrollable {
    height: auto;
    overflow: visible;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar .nav-item {
    margin: 0;
    padding-inline: 0 !important;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 12px 14px !important;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--muted) !important;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

    .sidebar .nav-link:hover {
        color: var(--text) !important;
        background: rgba(148, 178, 255, 0.06);
    }

    .sidebar .nav-link.active {
        color: #ecfeff !important;
        background: linear-gradient( 90deg, rgba(34, 211, 238, 0.12), rgba(139, 92, 246, 0.09) );
        border-color: rgba(34, 211, 238, 0.2);
    }

.page > main {
    display: block;
    min-width: 0;
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

    .page > main > .content {
        width: 100%;
        max-width: 1280px;
        margin-inline: auto;
        padding: 44px 48px 72px;
    }

.top-row {
    display: none;
}

/* =========================================================
   CABECERAS
   ========================================================= */

.page-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
}

.eyebrow {
    margin-bottom: 12px;
    color: #67e8f9;
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.16em;
    line-height: 1.6;
    text-transform: uppercase;
}

.page-title {
    margin: 0;
    color: #f1f5ff;
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.15;
}

.page-subtitle {
    max-width: 640px;
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex-shrink: 0;
}

/* =========================================================
   PORTADA
   ========================================================= */

.hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    align-items: center;
    gap: 44px;
    padding: 38px 0 56px;
}

.hero-glow {
    display: none;
}

.hero-content,
.hero-panel {
    min-width: 0;
}

.hero .eyebrow {
    margin-bottom: 22px;
}

.hero-title {
    margin: 0 0 24px;
    color: #f4f7ff;
    font-size: clamp(2.4rem, 3.7vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 1.08;
    text-wrap: balance;
}

    .hero-title span {
        color: #8cdde8;
    }

.hero-text {
    max-width: 560px;
    margin: 0;
    color: #a8b4c8;
    font-size: 1rem;
    line-height: 1.85;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 30px 0 24px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: #90a1b9;
    font-size: 0.76rem;
    line-height: 1.6;
}

    .hero-meta > span {
        white-space: nowrap;
    }

.hero-panel {
    padding: 14px 0;
}

/* Panel ilustrativo */

.vault-card {
    position: relative;
    overflow: hidden;
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 24px;
    background: linear-gradient(145deg, #141e30, #0b111e);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

    .vault-card::before {
        position: absolute;
        inset: 0 24px auto;
        height: 1px;
        background: linear-gradient( 90deg, transparent, rgba(103, 232, 249, 0.65), transparent );
        content: "";
    }

.vault-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 30px;
}

.vault-label {
    margin-bottom: 7px;
    color: #94a3b8;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.vault-name {
    color: #f1f5f9;
    font-size: 1.3rem;
    font-weight: 750;
    letter-spacing: -0.03em;
}

.vault-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid rgba(103, 232, 249, 0.2);
    border-radius: 999px;
    background: rgba(103, 232, 249, 0.07);
    color: #a5f3fc;
    font-size: 0.7rem;
}

    .vault-status > span {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #67e8f9;
    }

.vault-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

    .vault-metrics > div {
        padding: 20px 8px;
        border: 1px solid rgba(148, 163, 184, 0.12);
        border-radius: 14px;
        background: rgba(0, 0, 0, 0.16);
        text-align: center;
    }

.metric {
    display: block;
    color: #d5f8ff;
    font-size: 1.05rem;
    font-weight: 750;
}

.metric-label {
    display: block;
    margin-top: 7px;
    color: #8b9bb3;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.vault-bar {
    height: 5px;
    overflow: hidden;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
}

    .vault-bar > div {
        width: 78%;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, #67e8f9, #a78bfa);
    }

.vault-footer {
    color: #94a3b8;
    font-size: 0.76rem;
    line-height: 1.7;
    text-align: center;
}

/* Características */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 8px 0 32px;
}

.feature-card {
    min-width: 0;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.55);
    transition: border-color 180ms ease, background-color 180ms ease;
}

    .feature-card:hover {
        border-color: rgba(103, 232, 249, 0.3);
        background: rgba(20, 30, 50, 0.75);
    }

.feature-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 13px;
    background: rgba(148, 163, 184, 0.06);
    font-size: 1.2rem;
}

.feature-card h3 {
    margin: 0 0 10px;
    color: #edf2fa;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.feature-card p {
    margin: 0;
    color: #98a8be;
    font-size: 0.86rem;
    line-height: 1.8;
}

/* =========================================================
   TARJETAS DEL PANEL
   ========================================================= */

.card,
.kt-card {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--panel);
    color: var(--text);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(16px);
}

.kt-card {
    padding: 26px;
    margin-bottom: 24px;
}

    .kt-card.h-100 {
        margin-bottom: 0;
    }

    .kt-card h3 {
        color: #edf2fa;
        font-size: 1.25rem;
        font-weight: 700;
        letter-spacing: -0.025em;
        overflow-wrap: anywhere;
    }

.card-header {
    padding: 20px 26px;
    border-bottom: 1px solid var(--border);
    background: transparent;
}

.card-title {
    font-weight: 750;
    letter-spacing: -0.02em;
}

.card-subtitle {
    color: var(--muted);
    font-size: 0.9rem;
}

.text-muted {
    color: var(--muted) !important;
}

/* =========================================================
   FORMULARIOS
   ========================================================= */

.form-control,
.form-select {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(5, 9, 17, 0.72);
    color: var(--text);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

    .form-control::placeholder {
        color: #74839b;
        opacity: 1;
    }

    .form-control:focus,
    .form-select:focus {
        border-color: rgba(34, 211, 238, 0.55);
        background: rgba(5, 9, 17, 0.9);
        color: var(--text);
        box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
    }

.form-label {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* =========================================================
   BOTONES
   ========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.btn-primary {
    border-color: #67e8f9;
    background: #67e8f9;
    color: #06131c;
    box-shadow: 0 8px 24px rgba(34, 211, 238, 0.12);
}

    .btn-primary:hover,
    .btn-primary:active {
        border-color: #a5f3fc;
        background: #a5f3fc;
        color: #06131c;
    }

.btn-outline-primary {
    border-color: rgba(148, 163, 184, 0.25);
    background: rgba(255, 255, 255, 0.03);
    color: #d7e2f1;
}

    .btn-outline-primary:hover {
        border-color: rgba(103, 232, 249, 0.4);
        background: rgba(103, 232, 249, 0.08);
        color: #ecfeff;
    }

.btn-outline-danger {
    border-color: rgba(251, 113, 133, 0.3);
    background: rgba(251, 113, 133, 0.05);
    color: #fda4af;
}

    .btn-outline-danger:hover {
        border-color: rgba(251, 113, 133, 0.55);
        background: rgba(251, 113, 133, 0.13);
        color: #ffe4e6;
    }

.btn-sm {
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 9px;
    font-size: 0.75rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* =========================================================
   TABLAS
   ========================================================= */

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    color: var(--text);
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--border);
}

    .table thead th {
        padding-block: 14px;
        border-bottom: 1px solid var(--border);
        color: var(--muted);
        font-size: 0.67rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.09em;
        white-space: nowrap;
    }

    .table tbody td {
        padding-block: 16px;
        font-size: 0.82rem;
        vertical-align: middle;
    }

    .table tbody tr:hover {
        background: rgba(148, 178, 255, 0.035);
    }

/* =========================================================
   BADGES, ALERTAS Y LISTAS
   ========================================================= */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

    .badge.bg-primary {
        border-color: rgba(34, 211, 238, 0.22);
        background: rgba(34, 211, 238, 0.1) !important;
        color: #a5f3fc !important;
    }

    .badge.bg-secondary {
        border-color: var(--border);
        background: rgba(148, 163, 184, 0.1) !important;
        color: var(--muted) !important;
    }

.alert {
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.alert-success {
    border-color: rgba(52, 211, 153, 0.25);
    background: rgba(52, 211, 153, 0.08);
    color: #bbf7d0;
}

.alert-warning {
    border-color: rgba(251, 191, 36, 0.25);
    background: rgba(251, 191, 36, 0.08);
    color: #fde68a;
}

.alert-danger {
    border-color: rgba(251, 113, 133, 0.25);
    background: rgba(251, 113, 133, 0.08);
    color: #fecdd3;
}

.list-group {
    --bs-list-group-bg: transparent;
    --bs-list-group-border-color: var(--border);
    --bs-list-group-color: var(--text);
}

.list-group-item {
    gap: 12px;
    margin-bottom: 9px;
    padding: 14px 16px;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    background: rgba(5, 9, 17, 0.4);
    color: var(--text);
}

    .list-group-item > div {
        min-width: 0;
        overflow-wrap: anywhere;
    }

code {
    padding: 3px 7px;
    border: 1px solid rgba(34, 211, 238, 0.14);
    border-radius: 7px;
    background: rgba(34, 211, 238, 0.06);
    color: #a5f3fc;
    font-size: 0.82em;
    overflow-wrap: anywhere;
}

/* =========================================================
   ANIMACIONES
   ========================================================= */

@keyframes Keytor-rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content,
.hero-panel,
.page-hero {
    animation: Keytor-rise 400ms ease both;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1200px) {
    .page > main > .content {
        padding: 36px 32px 56px;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 26px;
        padding-top: 20px;
    }

    .hero-content {
        max-width: 720px;
    }

    .hero-panel {
        width: 100%;
        max-width: 560px;
    }
}

@media (max-width: 900px) {
    .page > .sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 20px 24px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .brand {
        padding: 0 0 20px;
    }

    .sidebar nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .sidebar .nav-link {
        min-height: 42px;
        padding: 10px 12px !important;
    }

    .page > main {
        margin-left: 0;
    }

    .page-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero {
        grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
        gap: 24px;
    }

    .hero-title {
        font-size: 2.6rem;
    }

    .vault-card {
        padding: 22px;
    }
}

@media (max-width: 720px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .page > main > .content {
        padding: 28px 20px 44px;
    }

    .hero {
        padding: 12px 0 30px;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-text {
        font-size: 0.94rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

        .hero-buttons .btn {
            width: 100%;
        }

    .hero-meta {
        gap: 8px 14px;
    }

    .feature-card,
    .kt-card {
        padding: 22px;
    }

        .kt-card.d-flex {
            flex-wrap: wrap;
            gap: 20px;
        }

    .page-title {
        font-size: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-content,
    .hero-panel,
    .page-hero {
        animation: none;
    }

    .page *,
    .page *::before,
    .page *::after {
        transition: none !important;
    }
}


/* =========================================================
   NAVEGACIÓN LATERAL Keytor
   ========================================================= */

.sidebar .kt-navigation {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 320px;
    margin-top: 6px;
}

.kt-navigation-label {
    padding: 0 14px;
    color: #71829c;
    font-size: 0.6rem;
    font-weight: 750;
    letter-spacing: 0.16em;
}

.sidebar .kt-navigation nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar .kt-navigation .nav-item {
    display: block;
    margin: 0;
    padding: 0 !important;
}

.sidebar .kt-navigation .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 70px;
    padding: 14px !important;
    text-decoration: none;
}

.kt-nav-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 11px;
    background: rgba(148, 163, 184, 0.05);
    color: #9badc5;
    font-size: 1.3rem;
    line-height: 1;
}

.kt-nav-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.kt-nav-title {
    color: #d7e2f1;
    font-size: 0.86rem;
    font-weight: 650;
    line-height: 1.4;
}

.kt-nav-description {
    color: #8191a9;
    font-size: 0.68rem;
    font-weight: 400;
    line-height: 1.5;
}

.sidebar .kt-navigation .nav-link.active .kt-nav-icon {
    border-color: rgba(103, 232, 249, 0.28);
    background: rgba(34, 211, 238, 0.1);
    color: #67e8f9;
}

.sidebar .kt-navigation .nav-link.active .kt-nav-title {
    color: #ecfeff;
}

.kt-navigation-footer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 24px 8px 0;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.kt-footer-mark {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 9px;
    color: #8cdde8;
    font-size: 0.75rem;
    font-weight: 800;
}

.kt-footer-title {
    color: #bac7da;
    font-size: 0.72rem;
    font-weight: 650;
}

.kt-footer-description {
    margin-top: 4px;
    color: #74849c;
    font-size: 0.65rem;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .sidebar .kt-navigation {
        min-height: 0;
        gap: 12px;
    }

    .kt-navigation-label,
    .kt-navigation-footer {
        display: none;
    }

    .sidebar .kt-navigation nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar .kt-navigation .nav-item {
        flex: 1 1 180px;
    }

    .sidebar .kt-navigation .nav-link {
        min-height: 62px;
    }
}