/* Voluntades — ajustes sobre Zeta + compatibilidad Bootstrap 4 */

.sidebar-img-section {
    display: none !important;
}

.sidebar-link svg,
.sidebar-link i[data-feather] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    stroke: currentColor;
}

.logo-wrapper .navbar-brand-name,
.header-brand-name {
    color: #EA682E;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: .4px;
}

.logo-wrapper img,
.header-logo-wrapper img {
    max-height: 40px;
    width: auto;
}

.profile-media img.profile-photo {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 50%;
}

.profile-media .media-body {
    margin-left: 8px;
}

.profile-media .media-body span {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Títulos de página de los módulos (chocan con .page-header del tema) */
.page-body .container-fluid > .page-header {
    position: relative !important;
    inset: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 0 16px !important;
    margin: 0 0 8px;
    border: 0 !important;
    z-index: 1 !important;
}

.page-body .container-fluid > .page-header .page-title h3,
.page-body .modulo-cabecera .page-title h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.page-body .modulo-cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 0 16px;
    margin: 0 0 8px;
}

.page-body .modulo-cabecera .toolbar,
.page-body .modulo-cabecera > .d-flex,
.page-body .container-fluid > .page-header .toolbar {
    margin-left: auto;
    flex-shrink: 0;
}

.widget-content.widget-content-area,
.widget-content-area {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(89, 102, 122, .07);
}

.br-6 {
    border-radius: 6px;
}

.layout-top-spacing {
    margin-top: 16px;
}

.layout-spacing {
    margin-bottom: 24px;
}

.page-body .toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: auto;
    max-width: 100%;
    padding: 0;
    margin: 0;
    background: transparent !important;
    color: inherit;
    border-radius: 0;
}

.widget-content-area > .toolbar {
    width: 100%;
    margin: 0 0 12px;
}

.page-body .toolbar .btn,
.page-body .toolbar a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 8px 16px;
    margin: 0 !important;
    line-height: 1.25;
    border: 0;
    border-radius: 8px;
    font-weight: 600;
    color: #fff !important;
    vertical-align: middle;
    box-shadow: none;
}

.page-body .toolbar .btn-primary {
    background-color: #6362e7 !important;
}
.page-body .toolbar .btn-primary:hover,
.page-body .toolbar .btn-primary:focus {
    background-color: #514fc7 !important;
    color: #fff !important;
}

.page-body .toolbar .btn-info {
    background-color: #1d97ff !important;
}
.page-body .toolbar .btn-info:hover,
.page-body .toolbar .btn-info:focus {
    background-color: #0d86ee !important;
    color: #fff !important;
}

.page-body .toolbar .btn-warning {
    background-color: #ff8819 !important;
}
.page-body .toolbar .btn-warning:hover,
.page-body .toolbar .btn-warning:focus {
    background-color: #e67610 !important;
    color: #fff !important;
}

.page-body .btn svg {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px;
    max-height: 18px;
    flex: 0 0 18px;
    vertical-align: middle;
}

.page-body .toolbar a.btn[style*="28a745"] {
    background-color: #28a745 !important;
    color: #fff !important;
    min-width: 42px;
    padding: 8px 12px;
}
.page-body .toolbar a.btn[style*="28a745"]:hover {
    background-color: #218838 !important;
}

/* Compatibilidad Bootstrap 4 */
.ml-1 { margin-left: .25rem !important; }
.ml-2 { margin-left: .5rem !important; }
.ml-3 { margin-left: 1rem !important; }
.ml-4 { margin-left: 1.5rem !important; }
.mr-1 { margin-right: .25rem !important; }
.mr-2 { margin-right: .5rem !important; }
.mr-3 { margin-right: 1rem !important; }
.mr-4 { margin-right: 1.5rem !important; }
.mr-auto { margin-right: auto !important; }
.ml-auto { margin-left: auto !important; }
.pl-0 { padding-left: 0 !important; }
.pr-0 { padding-right: 0 !important; }
.pl-3 { padding-left: 1rem !important; }
.pr-3 { padding-right: 1rem !important; }
.float-left { float: left !important; }
.float-right { float: right !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.font-weight-bold { font-weight: 700 !important; }
.font-weight-normal { font-weight: 400 !important; }
.btn-block { display: block; width: 100%; }
.form-group { margin-bottom: 1rem; }
.custom-select {
    display: block;
    width: 100%;
    padding: .375rem 2.25rem .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: .25rem;
}
.input-group-append,
.input-group-prepend {
    display: flex;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.badge-primary { background-color: var(--theme-default, #6362E7); color: #fff; }
.badge-success { background-color: #7DC006; color: #fff; }
.badge-danger { background-color: #E52727; color: #fff; }
.badge-warning { background-color: #FF8819; color: #fff; }
.badge-info { background-color: #1D97FF; color: #fff; }
.badge-secondary { background-color: #6c757d; color: #fff; }
.badge-light { background-color: #f8f9fa; color: #212529; }
.badge-dark { background-color: #343a40; color: #fff; }
.badge-pill { border-radius: 50rem; }

button.close,
.modal .close {
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    opacity: .5;
    padding: 0;
    float: right;
    cursor: pointer;
}
button.close:hover,
.modal .close:hover {
    opacity: 1;
}

.sidebar-list.active > .sidebar-link,
.sidebar-submenu li.active > a {
    color: var(--theme-default, #6362E7);
    font-weight: 600;
}

.select2-container {
    width: 100% !important;
}
.modal .select2-container {
    z-index: 1056;
}
.select2-container--open {
    z-index: 2000 !important;
}
.select2-dropdown {
    z-index: 2000 !important;
}

@keyframes vol-spin {
    100% { transform: rotate(360deg); }
}
.spin {
    animation: vol-spin 1s linear infinite;
}

.page-body .inicio-bienvenida {
    min-height: calc(100vh - 160px);
}

body.sin-sesion .page-header,
body.sin-sesion .sidebar-wrapper {
    display: none !important;
}
body.sin-sesion .page-body {
    margin-left: 0 !important;
    width: 100% !important;
}
body.sin-sesion .page-wrapper,
body.sin-sesion .page-body-wrapper {
    margin: 0 !important;
}

.login-page.login-piezas {
    min-height: 100vh;
    margin: 0;
    background: #4aa3e8;
    overflow: auto;
}
.login-page.login-piezas .login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: #4aa3e8;
}
.login-page.login-piezas .login-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
.login-page.login-piezas .login-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}
.login-page.login-piezas .login-box {
    width: min(100%, 400px);
    margin: 0;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    padding: 28px 26px 22px;
    box-shadow: 0 18px 50px rgba(20, 40, 70, 0.18);
}
.login-page.login-piezas .login-box .form-group {
    position: relative;
}
.login-page.login-piezas .login-box .logo {
    text-align: center;
    margin-bottom: 8px;
}
.login-page.login-piezas .login-box .logo img {
    display: block;
    margin: 0 auto 4px;
    height: 72px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}
.login-page.login-piezas .login-box h4,
.login-page.login-piezas .login-box h1 {
    text-align: center;
    color: #1c2b3a;
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 4px;
}
.login-page.login-piezas .login-box h6 {
    text-align: center;
    color: #66788a;
    font-size: 14px;
    margin: 0 0 18px;
}
.login-page.login-piezas .login-box .form-group label {
    font-weight: 600;
}
.login-page.login-piezas .login-box .btn-ingresar {
    width: 100%;
    border: 0;
    border-radius: 999px;
    padding: 12px 16px;
    background: #EA682E;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}
.login-page.login-piezas .login-box .btn-ingresar:hover,
.login-page.login-piezas .login-box .btn-ingresar:focus {
    background: #d45a24;
    color: #fff;
}
.login-page.login-piezas #resultado {
    display: block;
    color: #d64545;
    text-align: center;
    min-height: 1.2em;
}

@media (max-width: 820px) {
    .login-page.login-piezas .login-wrap {
        padding: 20px 16px;
    }
    .login-page.login-piezas .login-box {
        width: 100%;
        max-width: 400px;
        padding: 24px 18px 18px;
    }
    .login-page.login-piezas .login-box .logo img {
        height: 64px;
    }
    .login-page.login-piezas .login-bg img {
        object-position: center top;
    }
}

.documento-filtros {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 8px;
}
.documento-filtros-top {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    align-items: flex-end;
}
.documento-filtro-anio {
    min-width: 120px;
}
.documento-filtro-anio .form-control {
    min-height: 38px;
}
.documento-filtro-alcance,
.documento-filtro-anio,
.documento-filtro-meses {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.documento-filtros label {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #5c6b7a;
}
.documento-alcance-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.documento-alcance-btns .btn {
    border-radius: 999px;
    padding: 6px 14px;
}
.documento-meses-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.documento-filtros .mes-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 5px 10px;
    border: 1px solid #d9dde3;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    user-select: none;
}
.documento-filtros .mes-pill input {
    margin: 0;
    accent-color: #6362e7;
}
.documento-filtros .mes-pill:has(input:checked) {
    border-color: #6362e7;
    background: #eef0ff;
    color: #3d3cc0;
}
.documento-filtros .mes-pill-todos {
    font-weight: 600;
}
.documento-desc {
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.modal .select2-container--default .select2-selection--multiple {
    min-height: 38px;
    border-color: #ced4da;
}

@media (max-width: 768px) {
    .documento-filtro-anio {
        width: 100%;
    }
    .documento-desc {
        max-width: 160px;
    }
}
