:root {
    --hub-bg: #f4f4f2;
    --hub-surface: #ffffff;
    --hub-surface-soft: #eeeeeb;
    --hub-text: #191919;
    --hub-muted: #6d6d68;
    --hub-line: #d9d9d4;
    --hub-accent: #202020;
    --hub-danger: #a92c27;
    --hub-success: #2f7659;
    --hub-radius-lg: 24px;
    --hub-radius-md: 16px;
    --hub-radius-sm: 10px;
    --hub-shadow: 0 14px 40px rgba(0, 0, 0, .08);
    --hub-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

html {
    color-scheme: only light;
}

/* Dentro del Hub, la identidad principal ya vive en el marco lateral. */
.hub-shell.is-hub-embedded .topbar-main .row > .col-4 {
    display: none;
}

.hub-shell.is-hub-embedded .topbar-main .row > .col-8 {
    flex: 0 0 100%;
    max-width: 100%;
}

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

body.hub-shell,
body.hub-auth {
    background: var(--hub-bg);
    color: var(--hub-text);
    font-family: var(--hub-font);
    letter-spacing: -.01em;
}

.hub-shell .content {
    min-height: calc(100vh - 170px);
}

.hub-shell .wrapper {
    padding-top: 102px;
}

.hub-shell .container-fluid {
    max-width: 1480px;
}

.hub-shell #topnav .topbar-main {
    background: var(--hub-surface);
    border-bottom: 1px solid var(--hub-line);
    box-shadow: none;
    height: 74px;
}

.hub-shell #topnav .navbar-custom {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.hub-shell #topnav .logo-img {
    height: 54px;
    max-height: 54px;
    max-width: 82px;
    padding: 0;
    width: auto;
}

/* Cabecera compacta de una sola fila en escritorio. */
.hub-shell #topnav {
    background: var(--hub-surface);
    border-bottom: 1px solid var(--hub-line);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .04);
    min-height: 74px;
}

.hub-shell #topnav .topbar-main > .container-fluid {
    height: 74px;
    padding-left: 0;
    padding-right: 0;
}

.hub-shell #topnav .topbar-main .row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) auto;
    height: 74px;
    margin: 0;
}

.hub-shell #topnav .topbar-main .col-4,
.hub-shell #topnav .topbar-main .col-8 {
    flex: none;
    max-width: none;
    padding: 0;
    width: auto;
}

.hub-shell #topnav .topbar-main .col-4 {
    align-items: center;
    display: flex;
    grid-column: 1;
}

.hub-shell #topnav .topbar-main .col-8 {
    align-items: center;
    display: flex;
    grid-column: 3;
    justify-content: flex-end;
}

.hub-shell #topnav .topbar-main .logo {
    align-items: center;
    display: flex !important;
    float: none;
    height: 74px;
    line-height: normal;
}

.hub-shell #topnav .topbar-custom,
.hub-shell #topnav .topbar-custom > ul {
    align-items: center;
    display: flex;
    height: 74px;
}

.hub-shell #topnav .topbar-custom > ul > li {
    align-items: center;
    display: flex;
}

.hub-shell #topnav .notification-list > span {
    margin-right: 8px;
    white-space: nowrap;
}

.hub-shell #topnav .topbar-custom .nav-link {
    height: 74px;
    line-height: 74px;
}

.hub-shell #topnav > .navbar-custom {
    bottom: 0;
    left: 190px;
    position: absolute;
    right: 220px;
    top: 0;
}

.hub-shell #topnav > .navbar-custom .container-fluid {
    height: 74px;
    max-width: none;
    width: 100%;
}

.hub-shell #topnav > .navbar-custom #navigation {
    text-align: center;
}

.hub-shell #topnav .navigation-menu > li > a {
    padding-bottom: 28px;
    padding-left: 18px;
    padding-right: 18px;
    padding-top: 28px;
}

.hub-shell #topnav .navigation-menu > li:first-of-type > a {
    padding-left: 18px;
}

.hub-shell #topnav .navigation-menu > li > a,
.hub-shell #topnav .navigation-menu > li > a i,
.hub-shell .topbar-custom .nav-link,
.hub-shell .topbar-custom span {
    color: var(--hub-text) !important;
}

.hub-shell #topnav .navigation-menu > li > a {
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
}

.hub-shell #topnav .navigation-menu > li > a:hover,
.hub-shell #topnav .navigation-menu > li > a:focus {
    color: var(--hub-muted) !important;
}

.hub-shell .submenu,
.hub-shell .dropdown-menu {
    background: var(--hub-surface);
    border: 1px solid var(--hub-line) !important;
    border-radius: var(--hub-radius-sm);
    box-shadow: var(--hub-shadow);
    overflow: hidden;
}

.hub-shell .submenu a,
.hub-shell .dropdown-item {
    color: var(--hub-text) !important;
}

.hub-shell .submenu a:hover,
.hub-shell .dropdown-item:hover {
    background: var(--hub-surface-soft);
}

.hub-shell .card,
.hub-auth .card,
.hub-shell .modal-content {
    background: var(--hub-surface);
    border: 1px solid var(--hub-line);
    border-radius: var(--hub-radius-md);
    box-shadow: none;
}

.hub-shell .card-body {
    padding: 24px;
}

.hub-shell h1,
.hub-shell h2,
.hub-shell h3,
.hub-shell h4,
.hub-shell h5,
.hub-shell h6 {
    color: var(--hub-text);
    font-weight: 750;
    letter-spacing: -.025em;
}

.hub-shell .text-muted,
.hub-shell small,
.hub-shell .control-label {
    color: var(--hub-muted) !important;
}

.hub-shell .form-control,
.hub-shell .custom-select,
.hub-shell select,
.hub-shell textarea,
.hub-auth .form-control {
    background: var(--hub-surface);
    border: 1px solid var(--hub-line);
    border-radius: var(--hub-radius-sm);
    color: var(--hub-text);
    min-height: 46px;
    box-shadow: none !important;
}

.hub-shell .form-control:focus,
.hub-shell .custom-select:focus,
.hub-shell select:focus,
.hub-shell textarea:focus,
.hub-auth .form-control:focus {
    border-color: var(--hub-accent);
}

.hub-shell .btn,
.hub-auth .btn {
    border-radius: 999px;
    box-shadow: none !important;
    font-weight: 700;
    min-height: 42px;
    padding: 9px 20px;
}

.hub-shell .btn-primary,
.hub-shell .btn-dark,
.hub-shell .bg-gradient1,
.hub-auth .bg-gradient1 {
    background: var(--hub-accent) !important;
    border-color: var(--hub-accent) !important;
    color: #fff !important;
}

.hub-shell .btn-outline-danger {
    border-color: var(--hub-text);
    color: var(--hub-text);
}

.hub-shell .btn-outline-danger:hover {
    background: var(--hub-text);
    color: #fff;
}

.hub-shell .table {
    background: var(--hub-surface);
    color: var(--hub-text);
}

.hub-shell .table thead th {
    background: var(--hub-surface-soft);
    border-bottom: 1px solid var(--hub-line);
    color: var(--hub-muted);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.hub-shell .table td,
.hub-shell .table th {
    border-color: var(--hub-line);
    vertical-align: middle;
}

.hub-shell .nav-pills .nav-link,
.hub-shell .nav-tabs .nav-link {
    border-radius: 999px;
    color: var(--hub-muted);
    font-weight: 650;
}

.hub-shell .nav-pills .nav-link.active,
.hub-shell .nav-tabs .nav-link.active {
    background: var(--hub-accent);
    border-color: var(--hub-accent);
    color: #fff;
}

.hub-shell .badge {
    border-radius: 999px;
    font-weight: 700;
    padding: 7px 10px;
}

.hub-shell .alert {
    border: 1px solid var(--hub-line);
    border-radius: var(--hub-radius-sm);
}

.hub-intro {
    align-items: flex-end;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin: 8px 0 28px;
}

.hub-intro__eyebrow {
    color: var(--hub-muted);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .09em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.hub-intro h1 {
    font-size: clamp(32px, 5vw, 56px);
    line-height: .98;
    margin: 0 0 12px;
}

.hub-intro p {
    color: var(--hub-muted);
    font-size: 17px;
    margin: 0;
    max-width: 720px;
}

.hub-page-heading {
    margin: 8px 0 18px;
}

.hub-page-heading h1 {
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.05;
    margin: 0;
}

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

.hub-quick-actions a {
    background: var(--hub-surface);
    border: 1px solid var(--hub-line);
    border-radius: 999px;
    color: var(--hub-text);
    font-weight: 700;
    padding: 10px 16px;
}

.hub-quick-actions a:hover {
    background: var(--hub-accent);
    border-color: var(--hub-accent);
    color: #fff;
}

.hub-legacy-carousel {
    display: none;
}

.hub-auth .accountbg {
    background: radial-gradient(circle at top left, #454545 0, #181818 42%, #090909 100%);
}

.hub-auth .wrapper-page {
    max-width: 460px;
}

.hub-auth .card {
    border-radius: var(--hub-radius-lg);
    box-shadow: var(--hub-shadow);
}

.hub-auth .card-body {
    padding: 34px;
}

.hub-shell .footer,
.hub-auth .footer {
    background: transparent;
    border-top: 1px solid var(--hub-line);
    color: var(--hub-muted);
}

@media (max-width: 991px) {
    .hub-shell #topnav,
    .hub-shell #topnav .topbar-main,
    .hub-shell #topnav .topbar-main > .container-fluid,
    .hub-shell #topnav .topbar-main .row {
        height: 68px;
        min-height: 68px;
    }

    .hub-shell #topnav .topbar-main .row {
        grid-template-columns: 96px minmax(0, 1fr) auto;
    }

    .hub-shell #topnav .topbar-main .logo,
    .hub-shell #topnav .topbar-custom,
    .hub-shell #topnav .topbar-custom > ul,
    .hub-shell #topnav .topbar-custom .nav-link {
        height: 68px;
    }

    .hub-shell #topnav .topbar-custom .nav-link {
        line-height: 68px;
    }

    .hub-shell #topnav > .navbar-custom {
        display: none;
    }

    .hub-shell #topnav .logo-img {
        height: 46px;
        max-height: 46px;
        max-width: 70px;
    }

    .hub-shell .wrapper {
        padding-top: 86px;
    }
}

@media (max-width: 768px) {
    .hub-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .hub-shell .card-body {
        padding: 18px;
    }

    .hub-shell #topnav .notification-list > span {
        display: none;
    }

    .hub-page-heading {
        margin-bottom: 14px;
    }
}
