/* Ajustes de integración para que la interfaz legal conserve el layout EKUDMIN. */
html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.header-area {
    flex: 0 0 auto;
}

/* El menú original es absoluto; mantenerlo fuera del flujo evita que empuje el footer. */
.navbar_dash_area {
    position: static;
    width: 0;
    height: 0;
    flex: 0 0 0;
}

.main-wraper-bg {
    flex: 1 0 auto;
    width: 100%;
    padding-bottom: 42px;
}

.homepage-sec1 {
    padding-bottom: 4px;
}

.homepage-sec1 .col-lg-3 {
    margin-bottom: 4px;
}

.homepage-sec1-single {
    min-height: 145px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.homepage-sec1-single:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(46, 46, 58, .12);
}

.single-panel {
    height: 100%;
}

.single-panel-content.chart-area {
    height: 340px;
    position: relative;
}

.single-panel-content.chart-area canvas {
    height: 100% !important;
    width: 100% !important;
}

.single-panel-content .btn {
    margin-bottom: 10px;
    min-height: 42px;
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.table-responsive::-webkit-scrollbar {
    height: 7px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c9cbd3;
    border-radius: 10px;
}

.dnl-nav li.active > a {
    background: #1c1b24;
    box-shadow: inset 3px 0 0 #4b83f0;
}

.dnl-nav li.active > a .dnl-link-text {
    color: #fff;
}

.dnl-nav li.active > a .dnl-link-icon {
    color: #4b83f0;
}

.module-toolbar .badge {
    background: #4b83f0;
    border-radius: 12px;
    font-weight: 500;
    padding: 5px 9px;
}

.module-toolbar .btn-primary,
.modal-footer .btn-primary {
    background-color: #4b83f0;
    border-color: #4b83f0;
}

.module-toolbar .btn-primary:hover,
.modal-footer .btn-primary:hover {
    background-color: #376edb;
    border-color: #376edb;
}

.footer-area {
    flex: 0 0 auto;
    width: 100%;
    margin-top: auto;
    padding-top: 22px;
    padding-bottom: 22px;
}

.footer-area h5 {
    line-height: 24px;
}

.footer-area .footer-divider {
    margin: 0 8px;
    color: #d4d4d4;
}

.footer-area a {
    padding-left: 0;
}

.footer-area .text-right a + a {
    padding-left: 14px;
}

/* Modales: deben quedar por encima del header y del menú EKUDMIN. */
.modal {
    z-index: 20000;
    padding: 16px !important;
}

.modal-backdrop {
    z-index: 19990;
    background-color: #14131d;
}

.modal-backdrop.show {
    opacity: .72;
}

.modal-dialog {
    width: calc(100% - 32px);
    max-width: 760px;
    margin: 2rem auto;
}

.modal-dialog.modal-dialog-centered {
    min-height: calc(100% - 4rem);
}

.modal-content {
    border: 0;
    border-radius: 3px;
    box-shadow: 0 18px 55px rgba(25, 25, 38, .28);
    overflow: hidden;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: #fd8e40;
    color: #fff;
    border-bottom: 0;
    padding: 20px 24px;
    flex: 0 0 auto;
}

.modal-header .modal-title {
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

.modal-subtitle {
    color: rgba(255, 255, 255, .84);
    font-size: 13px;
    line-height: 20px;
    margin: 3px 0 0;
}

.modal-header .close {
    color: #fff;
    opacity: .95;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    margin: 0 0 0 20px;
    text-shadow: none;
}

.modal-header .close:hover {
    color: #fff;
    opacity: 1;
}

.modal-body {
    overflow-y: auto;
    padding: 24px;
    flex: 1 1 auto;
}

.modal-body .form-group {
    margin-bottom: 18px;
}

.modal-body label {
    color: #3a3947;
    display: block;
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    margin-bottom: 7px;
}

.modal-body .form-control {
    border: 1px solid #d9dce5;
    border-radius: 3px;
    color: #2e2e3a;
    font-size: 15px;
    min-height: 42px;
    padding: 8px 12px;
    transition: border-color .2s, box-shadow .2s;
}

.modal-body textarea.form-control {
    min-height: 92px;
    resize: vertical;
}

.modal-body .form-control:focus {
    border-color: #4b83f0;
    box-shadow: 0 0 0 3px rgba(75, 131, 240, .12);
}

.modal-footer {
    background: #fafafa;
    border-top: 1px solid #edf0f4;
    padding: 16px 24px;
    flex: 0 0 auto;
}

.modal-footer .btn {
    border-radius: 3px;
    font-size: 14px;
    min-width: 92px;
    padding: 9px 16px;
}

.modal-footer .btn + .btn {
    margin-left: 8px;
}

/* Vistas de módulos: controles y tablas legibles en pantallas pequeñas. */
.page-container {
    padding-top: 28px;
    padding-bottom: 12px;
}

.page-title-area {
    margin-bottom: 26px;
}

.page-title-area h2 {
    color: #3d3789;
    font-size: 28px;
    margin-bottom: 8px;
}

.page-title-area p {
    color: #777b88;
    margin: 0;
}

.module-toolbar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.module-toolbar h3 {
    display: inline-block;
    margin: 0 12px 0 0;
    vertical-align: middle;
}

.module-toolbar .badge {
    vertical-align: middle;
}

.module-toolbar .btn {
    flex: 0 0 auto;
}

#module-table {
    min-width: 700px;
}

#module-table th {
    white-space: nowrap;
}

#module-table td,
#module-table th {
    vertical-align: middle;
}

.module-loading,
.empty-state {
    color: #8b909b;
}

.module-loading i,
.empty-state i {
    color: #4b83f0;
    margin-right: 7px;
}

.empty-state span {
    display: inline-block;
}

.status-chip {
    background: #edf0f5;
    border-radius: 12px;
    color: #666c78;
    display: inline-block;
    font-size: 12px;
    line-height: 1.2;
    padding: 5px 10px;
    white-space: nowrap;
}

.status-activo,
.status-active,
.status-completed,
.status-completada {
    background: #e8f6df;
    color: #4f9c22;
}

.status-pendiente,
.status-pending,
.status-normal {
    background: #fff3df;
    color: #c47a16;
}

.status-inactivo,
.status-cancelled,
.status-overdue,
.status-vencido {
    background: #ffe6e4;
    color: #c6423b;
}

.status-chip.status-high,
.status-chip.status-urgente {
    background: #ffe6e4;
    color: #c6423b;
}

#module-table .btn-outline-primary {
    border-color: #d4ddf7;
    color: #4b83f0;
}

#module-table .btn-outline-primary:disabled {
    opacity: .8;
}

@media (max-width: 767px) {
    .header-area .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }

    .header-area .row {
        align-items: center;
        display: flex;
        flex-wrap: nowrap;
    }

    .header-area .col-md-2 {
        flex: 0 0 42%;
        max-width: 42%;
    }

    .header-area .search-area {
        flex: 0 0 12%;
        max-width: 12%;
        padding: 0;
    }

    .header-area .col-md-6 {
        flex: 1 1 auto;
        max-width: none;
        padding: 0;
    }

    .logo {
        padding-left: 4px;
        padding-top: 24px;
    }

    .logo a {
        font-size: 16px;
    }

    .header-right {
        white-space: nowrap;
    }

    .header-right .user-id {
        display: inline-block;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: middle;
    }

    .homepage-sec1-single {
        min-height: 132px;
    }

    .single-panel-content.chart-area {
        height: 250px;
    }

    .modal {
        padding: 10px !important;
    }

    .modal-dialog,
    .modal-dialog.modal-dialog-centered {
        width: 100%;
        max-width: none;
        min-height: calc(100% - 20px);
        margin: 10px auto;
    }

    .modal-content {
        max-height: calc(100vh - 20px);
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .modal-header .modal-title {
        font-size: 19px;
    }

    .modal-footer {
        display: flex;
        justify-content: flex-end;
    }

    .page-container {
        padding-top: 20px;
    }

    .page-title-area h2 {
        font-size: 24px;
    }

    .module-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .module-toolbar .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .homepage-sec1 .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .homepage-sec1-single {
        min-height: 120px;
    }

    .homepage-sec1 h2 {
        font-size: 23px;
    }

    .single-panel-content.chart-area {
        height: 210px;
    }

    .footer-area h5 {
        font-size: 12px;
    }
}

@media (max-width: 767px) {
    .footer-area {
        padding-left: 15px;
        padding-right: 15px;
    }

    .footer-area .text-right {
        text-align: left !important;
        margin-top: 8px;
    }
}
