/* ============================================================
   SIE GDO · ADMIN SHELL
   Sidebar + topbar premium
============================================================ */

:root {
    --gdo-sidebar: #061f35;
    --gdo-sidebar-2: #082b49;
    --gdo-primary: #0875bd;
    --gdo-primary-soft: #eaf5fc;
    --gdo-gold: #f2b51d;
    --gdo-bg: #f4f7fb;
    --gdo-card: #ffffff;
    --gdo-text: #172436;
    --gdo-muted: #718096;
    --gdo-border: #e3eaf1;
    --gdo-sidebar-w: 278px;
    --gdo-topbar-h: 74px;
}

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

body.gdo-admin-app {
    margin: 0;
    padding-left: var(--gdo-sidebar-w);
    padding-top: var(--gdo-topbar-h);
    background:
        radial-gradient(circle at 90% 5%, rgba(8, 117, 189, .055), transparent 28%),
        var(--gdo-bg);
    color: var(--gdo-text);
}


/* ============================================================
   CONTENIDO LEGACY ADAPTADO
============================================================ */

body.gdo-admin-app > .container,
body.gdo-admin-app > .container-fluid {
    width: auto !important;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 30px;
    padding-right: 30px;
}

body.gdo-admin-app .panel {
    overflow: hidden;
    border: 1px solid var(--gdo-border);
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(22, 43, 64, .055);
}

body.gdo-admin-app .panel-default > .panel-heading {
    padding: 16px 20px;
    border-color: var(--gdo-border);
    background: #fff;
}

body.gdo-admin-app .panel-title {
    color: #23384d;
    font-weight: 700;
}

body.gdo-admin-app .form-control {
    min-height: 43px;
    border: 1px solid #dbe4ec;
    border-radius: 9px;
    box-shadow: none;
}

body.gdo-admin-app .form-control:focus {
    border-color: var(--gdo-primary);
    box-shadow: 0 0 0 3px rgba(8, 117, 189, .09);
}

body.gdo-admin-app .btn {
    border-radius: 8px;
    font-weight: 600;
}

body.gdo-admin-app .btn-primary {
    border-color: var(--gdo-primary);
    background: var(--gdo-primary);
}

body.gdo-admin-app .table > thead > tr > th,
body.gdo-admin-app table.dataTable thead > tr > th,
body.gdo-admin-app table.dataTable thead > tr > td {
    border-bottom: 1px solid #dfe7ef;
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .35px;
    text-transform: uppercase;
}


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

.gdo-sidebar {
    position: fixed;
    z-index: 1045;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--gdo-sidebar-w);
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 15% 0, rgba(255, 255, 255, .07), transparent 23%),
        linear-gradient(180deg, var(--gdo-sidebar-2) 0%, var(--gdo-sidebar) 100%);
    box-shadow: 14px 0 38px rgba(6, 31, 53, .10);
    color: #fff;
}

.gdo-sidebar-brand {
    height: var(--gdo-topbar-h);
    flex: 0 0 var(--gdo-topbar-h);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .075);
}

.gdo-sidebar-brand img {
    width: 43px;
    height: 50px;
    object-fit: contain;
}

.gdo-brand-copy {
    min-width: 0;
}

.gdo-brand-copy strong {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: .1px;
}

.gdo-brand-copy span {
    display: block;
    margin-top: 3px;
    color: rgba(255, 255, 255, .48);
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: .65px;
    text-transform: uppercase;
}

.gdo-sidebar-scroll {
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 18px 12px 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .15) transparent;
}

.gdo-sidebar-scroll::-webkit-scrollbar {
    width: 5px;
}

.gdo-sidebar-scroll::-webkit-scrollbar-thumb {
    border-radius: 20px;
    background: rgba(255, 255, 255, .15);
}

.gdo-nav-label {
    margin: 17px 12px 7px;
    color: rgba(255, 255, 255, .32);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.gdo-nav-label:first-child {
    margin-top: 2px;
}

.gdo-nav-item,
.gdo-nav-toggle {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 2px 0;
    padding: 0 12px;
    border: 0;
    border-radius: 9px;
    outline: 0;
    background: transparent;
    color: rgba(255, 255, 255, .69);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    text-decoration: none !important;
    transition:
        background .16s ease,
        color .16s ease,
        transform .16s ease;
}

.gdo-nav-item:hover,
.gdo-nav-item:focus,
.gdo-nav-toggle:hover,
.gdo-nav-toggle:focus {
    outline: 0;
    background: rgba(255, 255, 255, .07);
    color: #fff;
}

.gdo-nav-item.active,
.gdo-nav-group.open > .gdo-nav-toggle {
    background: linear-gradient(90deg, rgba(8, 117, 189, .34), rgba(8, 117, 189, .15));
    color: #fff;
}

.gdo-nav-item.active {
    box-shadow: inset 3px 0 0 var(--gdo-gold);
}

.gdo-nav-icon {
    width: 21px;
    flex: 0 0 21px;
    color: rgba(255, 255, 255, .56);
    font-size: 15px;
    text-align: center;
}

.gdo-nav-item.active .gdo-nav-icon,
.gdo-nav-group.open > .gdo-nav-toggle .gdo-nav-icon {
    color: #fff;
}

.gdo-nav-text {
    flex: 1;
    min-width: 0;
}

.gdo-nav-arrow {
    width: 16px;
    color: rgba(255, 255, 255, .3);
    font-size: 10px;
    text-align: center;
    transition: transform .18s ease;
}

.gdo-nav-group.open > .gdo-nav-toggle .gdo-nav-arrow {
    transform: rotate(90deg);
}


/* ============================================================
   SUBMENÚ
============================================================ */

.gdo-submenu {
    display: none;
    margin: 3px 0 7px 32px;
    padding: 3px 0 3px 12px;
    border-left: 1px solid rgba(255, 255, 255, .10);
}

.gdo-nav-group.open > .gdo-submenu {
    display: block;
}

.gdo-submenu a {
    position: relative;
    display: block;
    margin: 1px 0;
    padding: 8px 10px;
    border-radius: 7px;
    color: rgba(255, 255, 255, .48);
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.25;
    text-decoration: none !important;
    transition:
        background .15s ease,
        color .15s ease,
        padding-left .15s ease;
}

.gdo-submenu a:hover,
.gdo-submenu a.active {
    padding-left: 13px;
    background: rgba(255, 255, 255, .055);
    color: #fff;
}

.gdo-submenu a.active::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -15px;
    width: 5px;
    height: 5px;
    margin-top: -2px;
    border-radius: 50%;
    background: var(--gdo-gold);
}


/* ============================================================
   FOOTER DEL SIDEBAR
============================================================ */

.gdo-sidebar-bottom {
    flex: 0 0 auto;
    padding: 13px 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, .075);
}

.gdo-quick-pay,
.gdo-logout {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 9px;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 600;
}

.gdo-quick-pay {
    min-height: 42px;
    margin-bottom: 8px;
    background: var(--gdo-primary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
    color: #fff !important;
    font-weight: 700;
}

.gdo-quick-pay:hover {
    background: #0969a7;
}

.gdo-logout {
    color: rgba(255, 255, 255, .55) !important;
}

.gdo-logout:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff !important;
}


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

.gdo-topbar {
    position: fixed;
    z-index: 1040;
    top: 0;
    right: 0;
    left: var(--gdo-sidebar-w);
    height: var(--gdo-topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 28px;
    border-bottom: 1px solid var(--gdo-border);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 3px 18px rgba(25, 45, 65, .035);
}

.gdo-topbar-left {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.gdo-mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--gdo-border);
    border-radius: 9px;
    background: #fff;
    color: #40566b;
}

.gdo-page-title {
    min-width: 0;
}

.gdo-page-title small {
    display: block;
    margin-bottom: 2px;
    color: #91a0ad;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.gdo-page-title strong {
    display: block;
    overflow: hidden;
    color: #203448;
    font-size: 16px;
    font-weight: 750;
    line-height: 1.2;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.gdo-topbar-right {
    display: flex;
    align-items: center;
    gap: 13px;
}

.gdo-cycle-pill {
    padding: 7px 11px;
    border: 1px solid #dce7ef;
    border-radius: 9px;
    background: #f7fafc;
}

.gdo-cycle-pill span {
    display: block;
    color: #95a1ad;
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.gdo-cycle-pill strong {
    display: block;
    margin-top: 3px;
    color: #40556a;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}


/* ============================================================
   USUARIO
============================================================ */

.gdo-user {
    position: relative;
}

.gdo-user-btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 7px 4px 4px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    text-align: left;
}

.gdo-user-btn:hover,
.gdo-user-btn:focus {
    outline: 0;
    background: #f4f7fa;
}

.gdo-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(145deg, #0a79c1, #075f99);
    box-shadow: 0 6px 14px rgba(8, 117, 189, .17);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.gdo-user-copy {
    max-width: 175px;
    min-width: 0;
}

.gdo-user-copy strong {
    display: block;
    overflow: hidden;
    color: #2a3f53;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.gdo-user-copy span {
    display: block;
    margin-top: 2px;
    color: #95a2ae;
    font-size: 9px;
    line-height: 1.2;
}

.gdo-user-chevron {
    color: #9aa7b3;
    font-size: 9px;
}

.gdo-user-menu {
    position: absolute;
    top: 51px;
    right: 0;
    display: none;
    width: 220px;
    padding: 7px;
    border: 1px solid var(--gdo-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(24, 42, 62, .15);
}

.gdo-user.open .gdo-user-menu {
    display: block;
}

.gdo-user-menu-head {
    margin-bottom: 5px;
    padding: 10px 11px 9px;
    border-bottom: 1px solid #edf1f5;
}

.gdo-user-menu-head strong {
    display: block;
    color: #2b4054;
    font-size: 11px;
}

.gdo-user-menu-head span {
    display: block;
    margin-top: 2px;
    color: #93a0ac;
    font-size: 9px;
}

.gdo-user-menu a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 8px;
    color: #536678;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none !important;
}

.gdo-user-menu a:hover {
    background: #f3f7fa;
    color: #263b50;
}

.gdo-user-menu a.gdo-user-logout {
    color: #b44d4d;
}


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

.gdo-sidebar-overlay {
    position: fixed;
    z-index: 1038;
    inset: 0;
    display: none;
    background: rgba(8, 24, 38, .48);
    backdrop-filter: blur(2px);
}

.gdo-legacy-nav {
    font-size: 16px;
    text-align: center;
}

@media (max-width: 991px) {

    body.gdo-admin-app {
        padding-left: 0;
        padding-top: var(--gdo-topbar-h);
    }

    .gdo-sidebar {
        transform: translateX(-102%);
        box-shadow: 20px 0 45px rgba(5, 28, 47, .22);
        transition: transform .22s ease;
    }

    .gdo-topbar {
        left: 0;
        padding: 0 16px;
    }

    .gdo-mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    body.gdo-sidebar-open .gdo-sidebar {
        transform: translateX(0);
    }

    body.gdo-sidebar-open .gdo-sidebar-overlay {
        display: block;
    }

    body.gdo-sidebar-open {
        overflow: hidden;
    }

    body.gdo-admin-app > .container,
    body.gdo-admin-app > .container-fluid {
        padding-left: 18px;
        padding-right: 18px;
    }
}

@media (max-width: 620px) {

    .gdo-cycle-pill {
        display: none;
    }

    .gdo-user-copy,
    .gdo-user-chevron {
        display: none;
    }

    .gdo-page-title strong {
        font-size: 14px;
    }
}

@media print {

    body.gdo-admin-app {
        padding: 0 !important;
        background: #fff !important;
    }

    .gdo-sidebar,
    .gdo-topbar,
    .gdo-sidebar-overlay {
        display: none !important;
    }
}


/* Consulta de calificaciones / acciones premium */
body.gdo-admin-app .gdo-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid var(--gdo-border);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
}

body.gdo-admin-app .gdo-action-copy {
    min-width: 0;
}

body.gdo-admin-app .gdo-action-copy strong {
    display: block;
    color: #18344d;
    font-size: 14px;
    font-weight: 700;
}

body.gdo-admin-app .gdo-action-copy span {
    display: block;
    margin-top: 3px;
    color: var(--gdo-muted);
    font-size: 12px;
}

body.gdo-admin-app .gdo-btn-enterprise {
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--gdo-primary);
    border-radius: 10px;
    background: linear-gradient(180deg, #1693e2 0%, var(--gdo-primary) 100%);
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(8, 117, 189, .18);
}

body.gdo-admin-app .gdo-btn-enterprise:hover,
body.gdo-admin-app .gdo-btn-enterprise:focus {
    color: #fff !important;
    background: linear-gradient(180deg, #11a2fa 0%, #0568aa 100%);
}

@media (max-width: 767px) {
    body.gdo-admin-app .gdo-action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    body.gdo-admin-app .gdo-btn-enterprise {
        width: 100%;
    }
}
