@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css');

:root {
    --cpce-blue: #004a87;
    --bg-light: #f4f6f8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

body>.container {
    flex: 1;
    margin-top: 20px;
    margin-bottom: 20px;
}

.container[style*="transparent"] {
    background-color: transparent !important;
}

h1 {
    color: var(--cpce-blue);
    border-bottom: 2px solid var(--cpce-blue);
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 15px;
}

h3 {
    margin: 0;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

small {
    color: #888;
}

p {
    color: #666;
    font-size: 0.9em;
}


.form-group {
    margin-bottom: 20px;
    margin-top: 15px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
select {
    width: 100%;
    padding: 10px;
    height: 50px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1em;
}

input[type="file"] {
    border: 1px dashed var(--cpce-blue);
    padding: 10px;
    width: 100%;
    background: #fafafa;
    box-sizing: border-box;
    text-align: center;
    height: auto;
}


input[readonly] {
    background-color: #e5e5e5ff;
    color: #646464ff;
    text-align: center;
    font-weight: bold;
    cursor: not-allowed;
}


.form-control[readonly] {
    background-color: #e5e5e5ff;
    color: #646464ff;
    text-align: center;
    font-weight: bold;
    border: 1px solid #ccc;
}

.input-readonly {
    background-color: #e9ecef;
    color: #495057;
    cursor: not-allowed;
    border-color: #ced4da;
    font-weight: bold;
    display: flex;
    align-items: center;
}


.section-title {
    background: #eee;
    padding: 10px;
    margin-top: 30px;
    margin-bottom: 20px;
    font-weight: bold;
    color: #555;
    border-radius: 4px;
}



header {
    background-color: #003478;
    width: 100%;
    border-bottom: 3px solid #9e9e9cff;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

header .container {
    background-color: transparent;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 10px;
    padding-bottom: 10px;
    max-width: 100%;
    margin: 0 auto;
    box-shadow: none;
    border-radius: 0;
    justify-content: center;
}

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

header img.img-responsive {
    max-height: 80px;
    display: inline-block;
    vertical-align: middle;
}

header h3 {
    display: inline-block !important;
    color: #fff !important;
    margin: 0 0 0 15px !important;
    vertical-align: middle !important;
    font-size: 1.5em !important;
    line-height: 1.2 !important;
}

header div[style*="padding"] {
    padding: 10px 0;
}

footer {
    background-color: #444444ff;
    border-top: 4px solid #ffffffff;
    width: 100%;
    padding: 20px 0;
    margin-top: auto;
    box-sizing: border-box;
}

footer .container {
    background-color: transparent;
    padding-left: 20px;
    padding-right: 20px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: none;
    border-radius: 0;
    padding-top: 20px;
    padding-bottom: 20px;
}

footer .row {
    display: flex;
    flex-wrap: wrap;
}

footer p {
    text-align: center;
    padding-top: 30px;
    color: #999;
    font-size: 12px;
    margin: 0;
}

.footer-logo {
    max-height: 100px;
    display: block;
    margin: 0 auto;
}

.whatsapp-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    position: relative;
    top: 5px;
    filter: invert(100%) grayscale(100%) brightness(2.5);
}

.whatsapp-container {
    text-align: center;
    margin-top: 10px;
    color: #ffffffff;
    font-family: sans-serif;
}

.whatsapp-number {
    font-size: 18px;
    font-weight: bold;
    color: #ffffffff;
    display: block;
    text-decoration: none;
    transition: transform 0.2s ease !important;
}

.whatsapp-number:hover {
    text-decoration: none !important;
    color: #fff !important;
    opacity: 1 !important;
    transform: scale(1.05);
}

.whatsapp-label {
    font-size: 12px;
    color: #c9c9c9ff;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

#overlay-carga {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    text-align: center;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

#overlay-carga h2 {
    color: var(--cpce-blue);
    margin-top: 0;
}

#overlay-carga p {
    color: #666;
    font-size: 0.9em;
}

.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid var(--cpce-blue);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
    margin: 0 auto 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


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

.col-md-3 {
    flex: 0 0 100%;
    box-sizing: border-box;
}

.col-md-6 {
    flex: 0 0 50%;
    box-sizing: border-box;
}

.col-md-8 {
    flex: 0 0 66.666%;
    box-sizing: border-box;
}

.col-md-9 {
    flex: 0 0 75%;
    box-sizing: border-box;
}

.col-md-offset-3 {
    margin-left: 25%;
}

.col-sm-4 {
    flex: 0 0 33.333%;
    box-sizing: border-box;
}

.col-sm-8 {
    flex: 0 0 66.666%;
    box-sizing: border-box;
}

.col-sm-offset-2 {
    margin-left: 16.666%;
}

.col-xs-12 {
    flex: 0 0 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .hidden-xs {
        display: none;
    }
}

@media (max-width: 480px) {
    h3 {
        font-size: 1.2em;
    }

    .container {
        padding: 20px;
    }
}


.success-card {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-top: 5px solid #28a745;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.icon-circle {
    width: 80px;
    height: 80px;
    background-color: #e8f5e9;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.icon-circle i {
    color: #28a745 !important;
    font-size: 40px;
}

.success-card h1 {
    color: #333 !important;
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    font-size: 28px;
    border: none !important;
    padding-bottom: 0 !important;
}

table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    background-color: #fff;
    margin-bottom: 0;
    border: 1px solid #ccc;
    table-layout: auto;
}

thead,
thead tr {
    background-color: var(--cpce-blue);
    color: #ffffff;
}

th {
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #003366;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

th:last-child {
    border-right: none;
}

tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

tbody tr:last-child {
    border-bottom: none;
}

tbody tr:hover {
    background-color: #f5f9fc;
}

td {
    padding: 10px 8px;
    color: #444;
    vertical-align: middle;
    font-size: 0.9rem;
    border-right: 1px solid #e0e0e0;
}

td:last-child {
    border-right: none;
}

td:first-child {
    font-weight: bold;
    color: var(--cpce-blue);
    text-align: center;
    width: 50px;
    border-right: 2px solid #d0d0d0;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
    font-size: 14px;
    color: #856404;
    text-align: left;
}

.alert-warning i {
    margin-right: 8px;
}

.alert-warning strong {
    font-weight: 700;
}


.btn-option {
    border: 1px solid #ccc;
    transition: all 0.3s ease;
    opacity: 0.6;
    align-items: center;
    justify-content: center;
    display: inline-flex;
}

.btn-option input[type="radio"] {
    display: none;
}

.btn-option.active {
    opacity: 1;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    font-weight: bold;
}

.btn-option:has(input[value="SI"] or [value="1"]):hover,
.btn-option.active:has(input[value="SI"]) {
    background-color: #5cb85c;
    color: white;
    border-color: #4cae4c;
}

.btn-option:has(input[value="NO"] or [value="0"]):hover,
.btn-option.active:has(input[value="NO"]) {
    background-color: #d9534f;
    color: white;
    border-color: #d43f3a;
}

.btn-option.si-activo {
    background-color: #5cb85c;
    color: white;
}

.btn-option.no-activo {
    background-color: #d9534f;
    color: white;
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.modal-fondo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-contenido {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 75vw;
    height: 95vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.modal-contenido h3 {
    margin: 0 0 15px 0;
    color: var(--cpce-blue);
}

.modal-contenido button {
    margin-right: 10px;
    margin-top: 10px;
}

.modal-contenido button:last-child {
    margin-right: 0;
}

iframe {
    width: 100%;
    height: 100%;
}


.admin-panel-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-panel-container h1 {
    text-align: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
    color: #444;
    font-size: 1.5rem;
}



.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eee !important;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.close-btn {
    background: transparent !important;
    border: none !important;
    font-size: 2.5rem !important;
    line-height: 1 !important;
    cursor: pointer;
    color: #333 !important;
    padding: 0 10px;
    font-weight: bold;
    display: block;
}

.close-btn:hover {
    color: #d9534f !important;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.grid-checkboxes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
    width: 100%;
}

.card-c.admin-wrapper {
    position: relative;
    overflow: visible !important;
    min-height: calc(100vh - 250px);
}


#filters-panel {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 20px;
    margin: 0 -20px 20px -20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.filter-label {
    font-weight: 700;
    color: #444;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* BOTONES TIPO PILL */
.btn-filter {
    background: #fff;
    border: 1px solid #d1d9e6;
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-filter:hover {
    background: #f1f8ff;
    border-color: #004a87;
    color: #004a87;
    transform: translateY(-1px);
}

.btn-filter.active {
    background-color: #004a87;
    border-color: #004a87;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 74, 135, 0.2);
}

/* FITLROS RESPONSIVE */
@media (max-width: 768px) {
    #filters-panel {
        flex-direction: column;
        align-items: flex-start;
        position: static;
        padding: 10px;
        gap: 10px;
    }

    .filter-pills {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
        flex-wrap: nowrap;
    }

    .btn-filter {
        flex-shrink: 0;
        white-space: nowrap;
    }
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

th:nth-child(1) {
    width: 5%;
}

th:nth-child(2) {
    width: 10%;
}

th:nth-child(3) {
    width: 10%;
}

th:nth-child(4) {
    width: 12%;
}

th:nth-child(11) {
    width: 10%;
}

th:nth-child(5) {
    width: 11%;
}

th:nth-child(6) {
    width: 10%;
}

th:nth-child(7) {
    width: 10%;
}

th:nth-child(8) {
    width: 9%;
}

/* Estado */
th:nth-child(9) {
    width: 9%;
}

/* Docs */
th:nth-child(10) {
    width: 14%;
}

th:nth-child(11) {
    width: 10%;
}

th:nth-child(12) {
    width: 10%;
}


thead {
    background: linear-gradient(180deg, #004a87 0%, #003865 100%);
    color: white;
}

thead th {
    color: white;
}



th,
td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 0.9em;
    vertical-align: middle;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: #444;
}


th {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}


th:not(:last-child),
td:not(:last-child) {
    border-right: 1px solid #e9ecef;
}

th:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

:where(tbody tr:nth-child(even)) {
    background-color: #fbfcfd;
}

td button {
    padding: 4px 8px;
    font-size: 0.85em;
    cursor: pointer;
    margin: 2px;
    border-radius: 4px;
    border: 1px solid #ced4da;
    background: #fff;
    display: inline-block;
}

td button:hover {
    background: #e2e6ea;
    border-color: #adb5bd;
}

.close-btn:hover {
    color: #d9534f;
}

input[type="checkbox"]:disabled {
    opacity: 1;
    cursor: default;
    filter: brightness(0.95);
}

#t2-body tr {
    border-bottom: 2px solid #aaa;
}

#t2-body td {
    padding: 15px 10px;
    vertical-align: top;
    border-right: 2px solid #bbb;
}

#t2-body td:last-child {
    border-right: none;
}

#t2-body tr:nth-child(even) {
    background-color: #f0f0f0;
}

.card-category {
    background: #fff;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.card-category-title {
    margin: 0 0 10px 0;
    color: #004a87;
    /* Azul CPCE */
    font-weight: 700;
    font-size: 1.1em;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
}

.card-category-item {
    font-size: 0.95em;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    color: #333;
}

.card-category-item:hover {
    font-weight: 600;
    color: #000;
}

.modal-contenido .table-responsive {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modal-contenido table {
    margin-bottom: auto;
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.controls-tabla {
    display: flex;
    flex-direction: row-reverse;
    gap: 5px;
    width: 100%;
    max-width: 50%;
}

.controls-tabla-combo-top {
    height: auto;
    padding: 9px;
}

.controls-buttons {
    display: flex;
    gap: 20px;
}

.controls-modal {
    margin-top: auto;
    width: 100%;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.controls-buttons-centered {
    display: flex;
    gap: 15px;
    justify-content: center;
    width: 100%;
}

.pagination-info {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.controls button {
    width: 120px;
    padding: 8px 0;
    cursor: pointer;
}

main {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    min-height: 200px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #ddd;
    background: white;
}

.container-wide {
    width: 98%;
    max-width: 100%;
    margin: 20px auto;
}

.admin-wrapper {
    display: block;
    margin-top: 20px;
    position: relative;
    overflow: visible !important;
    min-height: calc(100vh - 180px);
}

.search-wrapper {
    margin-top: 22px;
    flex-grow: 3;
}

.search-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.per-page-control {
    margin-right: 10px;
    font-weight: normal;
    color: #555;
}

.select-compact {
    height: 35px;
    width: 80px;
    display: inline-block;
    padding: 5px;
}

.btn-compact {
    margin-top: 0;
}


.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.custom-alert-box {
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: alertPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes alertPop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.custom-alert-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #004a87;
}

.custom-alert-title {
    font-size: 1.5rem;
    color: #333;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.custom-alert-message {
    color: #555;
    font-size: 1.6rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.custom-confirm-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
}

.btn-confirm-no,
.btn-confirm-yes {
    flex: 1;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.btn-confirm-no {
    background: #f1f3f5;
    color: #495057;
    border: 1px solid #dee2e6;
}

.btn-confirm-no:hover {
    background: #e9ecef;
    color: #212529;
}

.btn-confirm-yes {
    background: #004a87;
    color: white;
}

.btn-confirm-yes:hover {
    background: #003366;
}


.btn-alert-close {
    background: #004a87;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    width: 100%;
}

.btn-alert-close:hover {
    background: #003366;
}

.btn-action-wrapper {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    flex-direction: column;
    /* Apilar verticalmente */
    align-items: stretch;
    /* Estirar */
}

.btn-action-primary {
    background: #004a87;
    color: white;
    border: none;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 74, 135, 0.2);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    white-space: normal;
    background: #004a87 !important;
    color: white !important;
    width: 100%;
}

.btn-action-primary:hover:not(:disabled) {
    background: #003865;
    transform: translateY(-1px);
}

.btn-action-primary:disabled {
    background: #e9ecef !important;
    color: #adb5bd !important;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-action-secondary {
    background: white;
    color: #555;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action-secondary:hover {
    background: #f8f9fa;
    border-color: #bbb;
    color: #333;
}

.search-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: #fafafa;
}

.search-input:focus {
    background: white;
    border-color: #004a87;
    box-shadow: 0 0 0 3px rgba(0, 74, 135, 0.1);
    outline: none;
}

.select-compact {
    height: 40px;
    padding: 5px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: white;
    cursor: pointer;
    font-size: 0.95rem;
}

.per-page-control {
    background: white;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}


.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}


.fila-expirada {
    background-color: #ffee85;
}

.fila-urgente {
    background-color: #f8d7da;
}

.fila-comentario {
    background-color: #00f90c;
}

.texto-completo {
    white-space: normal;
    word-break: break-word;
}

.text-area {
    width: 100%;
    height: 200px;
    resize: vertical;
}

.modal-split {
    display: flex;
    gap: 20px;
    height: 100%;
}

.modal-split-3col {
    display: grid;
    grid-template-columns: 330px 1fr 380px;
    gap: 16px;
    height: 100%;
    overflow: hidden;
}

@media (max-width: 1300px) {
    .modal-split-3col {
        grid-template-columns: 300px 1fr 340px;
        gap: 12px;
    }
}

.modal-col-izq {
    flex: 1;
    overflow-y: auto;
    padding-right: 6px;
}

.modal-col-centro {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.modal-col-der-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    padding-left: 4px;
}

.modal-col-der {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modal-pdf {
    flex: 1;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}


#acciones-admin .modal-contenido {
    width: 96vw;
    max-width: 1680px;
    height: 93vh;
}


.panel-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.panel-section .section-title {
    font-weight: 700;
    font-size: 0.95em;
    color: #1e293b;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-section .section-subtitle {
    font-size: 0.78em;
    color: #64748b;
    margin-bottom: 10px;
    line-height: 1.3;
}

.checklist-actions {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.78em;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ccc;
    background: white;
}

.btn-outline-success {
    border-color: #22c55e;
    color: #15803d;
}

.btn-outline-success:hover {
    background: #f0fdf4;
}

.btn-outline-danger {
    border-color: #f43f5e;
    color: #be123c;
}

.btn-outline-danger:hover {
    background: #fff1f2;
}

.checklist-inverted-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 2px;
}

.chk-inverted-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 0.84em;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

.chk-inverted-card.is-ok {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    color: #166534;
}

.chk-inverted-card.is-error {
    background: #fff8e6;
    border: 1.5px solid #fde68a;
    color: #9a3412;
}

.chk-inverted-card input[type="checkbox"] {
    accent-color: #16a34a;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.chk-inverted-badge {
    font-size: 0.75em;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
    margin-right: 8px;
}

.chk-inverted-card.is-ok .chk-inverted-badge {
    background: #dcfce7;
    color: #15803d;
}

.chk-inverted-card.is-error .chk-inverted-badge {
    background: #ffedd5;
    color: #c2410c;
}

.search-library-box {
    position: relative;
    margin-bottom: 10px;
}

.search-library-box .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.85em;
}

.search-library-box .search-input {
    padding-left: 30px;
    font-size: 0.85em;
    height: 34px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
}

.obs-library-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
    min-height: 180px;
    max-height: 380px;
    padding-right: 2px;
}

.obs-library-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 9px 11px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.obs-library-item:hover {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.12);
    transform: translateY(-1px);
}

.obs-library-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.obs-library-item-title {
    font-weight: 600;
    font-size: 0.84em;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.obs-library-item-cat {
    font-size: 0.7em;
    background: #e2e8f0;
    color: #475569;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.obs-library-item-text {
    font-size: 0.78em;
    color: #64748b;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn,
.cpce-button,
.btn-logout,
.btn-submit,
.btn-primary,
.btn-danger,
.btn-sucess,
.btn-success,
.btn-warning {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
    margin: 0;
}

.btn:active,
.cpce-button:active,
.btn-logout:active,
.btn-submit:active,
.btn-primary:active,
.btn-danger:active,
.btn-sucess:active,
.btn-success:active,
.btn-warning:active {
    transform: translateY(0) !important;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125) !important;
}

.btn:hover:not(:disabled),
.cpce-button:hover:not(:disabled),
.btn-logout:hover:not(:disabled):not(.btn-alert-close),
.btn-submit:hover:not(:disabled),
.btn-primary:hover:not(:disabled),
.btn-danger:hover:not(:disabled),
.btn-sucess:hover:not(:disabled),
.btn-success:hover:not(:disabled),
.btn-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.top-action-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 6px 20px 10px 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.top-action-bar::-webkit-scrollbar {
    height: 4px;
}

.top-action-bar::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.top-action-bar>* {
    flex-shrink: 0;
}

.top-action-bar .cpce-button,
.top-action-bar .btn-logout,
.top-action-bar #btn-perfil-config {
    padding: 8px 12px !important;
    font-size: 0.9rem !important;
    height: 36px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.top-action-bar .spacer {
    flex-grow: 1;
}

.btn-primary,
.cpce-button,
.btn-submit {
    background-color: var(--cpce-blue);
    color: #fff;
}

.btn-primary:hover:not(:disabled),
.cpce-button:hover:not(:disabled),
.btn-submit:hover:not(:disabled) {
    background-color: #003366;
    color: #fff;
}

.btn-submit {
    width: 100%;
    margin-top: 30px;
    padding: 15px;
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background-color: #a0b4c8;
}

.btn-danger,
.cpce-logout-btn,
.btn-logout {
    background-color: #d9534f;
    color: #fff;
}

.btn-danger:hover:not(:disabled),
.cpce-logout-btn:hover:not(:disabled),
.btn-logout:hover:not(:disabled):not(.btn-alert-close) {
    background-color: #c9302c !important;
    color: #fff;
}

.btn-success,
.btn-sucess {
    background-color: #28a745;
    color: #fff;
}

.btn-success:hover:not(:disabled) {
    background-color: #218838;
    color: #fff;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover:not(:disabled) {
    background-color: #e0a800;
    color: #212529;
}

.pagination-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.controls-buttons button,
.pagination-bottom button,
[id$="-paginas-top"] button,
[id$="-paginas-bottom"] button {
    background-color: #f0f4f8;
    color: var(--cpce-blue);
    border: 1px solid #c2d1df;
    padding: 6px 12px;
    margin: 0 3px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.controls-buttons button:hover:not(:disabled),
.pagination-bottom button:hover:not(:disabled),
[id$="-paginas-top"] button:hover:not(:disabled),
[id$="-paginas-bottom"] button:hover:not(:disabled) {
    background-color: var(--cpce-blue);
    color: #fff;
    border-color: var(--cpce-blue);
}

.controls-buttons button:disabled,
.pagination-bottom button:disabled,
[id$="-paginas-top"] button:disabled,
[id$="-paginas-bottom"] button:disabled {
    background-color: #e9ecef;
    color: #8c98a4;
    border-color: #dee2e6;
    cursor: not-allowed;
    opacity: 0.6;
}

@media (max-width: 768px) {

    .admin-panel-container,
    .admin-wrapper,
    main {
        min-width: 0;
        padding: 10px;
    }

    .container-wide {
        width: 100%;
        margin: 5px 0;
        padding: 0 5px;
    }

    .top-action-bar,
    .tabs-header {
        flex-wrap: wrap;
        padding: 5px;
        justify-content: center;
        gap: 8px;
    }

    .top-action-bar .spacer {
        display: none;
    }

    .btn,
    .cpce-button,
    .btn-logout,
    .btn-submit,
    .btn-primary,
    .btn-danger,
    .btn-sucess,
    .btn-success,
    .btn-warning {
        padding: 8px 12px;
        font-size: 0.9rem;
        flex: 1 1 auto;
        text-align: center;
    }

    header img.img-responsive {
        max-height: 50px;
    }

    header h3 {
        font-size: 1.1rem !important;
        margin: 0 0 0 10px !important;
    }

    .table-responsive {
        margin: 10px 0;
        border-radius: 4px;
    }
}


.etiqueta-estado {
    display: inline-block;
    border-radius: 2px;
    font-weight: bold;
    color: #1a1a1a;
    width: 30px;
    height: 30px;
    text-align: center;
    align-content: center;
    cursor: help;
}

.etiqueta-estado.azul {
    background-color: #0284c7;
    color: #ffffff;
    font-weight: 600;
}

.etiqueta-estado.verde {
    background-color: #16a34a;
    color: #ffffff;
    font-weight: 600;
}

.etiqueta-estado.naranja {
    background-color: #ea580c;
    color: #ffffff;
    font-weight: 600;
}

.etiqueta-estado.amarillo {
    background-color: #fffa10;
    color: #ffffff;
    font-weight: 600;
}

.etiqueta-estado.rojo {
    background-color: #dc2626;
    color: #ffffff;
    font-weight: 600;
}


.panel-doble {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    height: 100%;
}

.panel-doble-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.panel-doble-body {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 0;
}

.panel-doble-col {
    min-width: 0;
    flex: 1 1 0;
}

.panel-doble-col-izq,
.panel-doble-col-der {
    padding: 0 8px;
}

.panel-doble-separador {
    width: 1px;
    background: #d9d9d9;
    flex: 0 0 1px;
    margin: 0 4px;
}

.panel-doble-body.solo-izquierda .panel-doble-col-izq {
    flex: 1 1 100%;
    width: 100%;
}

.panel-doble-body.solo-derecha .panel-doble-col-der {
    flex: 1 1 100%;
    width: 100%;
}

.panel-doble-body.sin-paneles {
    min-height: 40px;
}


.btn-perfil-config:hover {
    transform: rotate(45deg);
    color: #ffd700 !important;
}

.profile-modal-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.profile-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.profile-modal-header h2 {
    margin: 0;
    color: var(--cpce-blue);
    font-size: 1.6rem;
    font-weight: 600;
}

.profile-modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #888;
    transition: color 0.2s ease;
    line-height: 1;
}

.profile-modal-close:hover {
    color: #c9302c;
}


.profile-tabs-nav {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-tab-btn {
    padding: 10px 18px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-tab-btn:hover {
    color: var(--cpce-blue);
    background-color: rgba(0, 74, 135, 0.05);
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.profile-tab-btn.active {
    color: var(--cpce-blue);
    border-bottom-color: var(--cpce-blue);
    font-weight: 600;
}


.profile-tab-panel {
    display: none;
    flex-direction: column;
    gap: 15px;
    animation: profileFadeIn 0.3s ease;
    overflow-y: auto;
    padding-right: 5px;
}

.profile-tab-panel.active {
    display: flex;
}

@keyframes profileFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.profile-consent-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 5px;
    border-left: 4px solid var(--cpce-blue);
}

.profile-consent-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    user-select: none;
}

.profile-consent-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.profile-consent-warning {
    border-left: 4px solid #ff9800;
    background-color: #fff3cd;
    color: #856404;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.profile-consent-fields {
    padding: 18px;
    background-color: #fff;
    border: 1px solid #b8daff;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-image: linear-gradient(to bottom, #f0f7ff, #ffffff);
}

.profile-textarea-wrapper {
    position: relative;
    margin-bottom: 10px;
}

.profile-textarea-wrapper textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1em;
    resize: vertical;
}

.profile-char-counter {
    position: absolute;
    bottom: -18px;
    right: 0;
    font-size: 0.8em;
    color: #6c757d;
    font-weight: bold;
}


.profile-help-block {
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 0.85em;
    color: #6c757d;
}

.profile-modal-footer {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.profile-tab-panel .form-group span {
    font-weight: 600;
    color: #444;
    display: block;
    margin-bottom: 6px;
}

.profile-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    height: 200px;
    font-size: 1.1rem;
    color: #555;
}

.profile-loader i {
    font-size: 2.5rem;
    color: var(--cpce-blue);
    animation: spin 1s infinite linear;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


#btn-perfil-config:hover .btn-perfil-config-icon {
    transform: rotate(45deg);
    color: #ffd700;
}

.btn-perfil-config-icon {
    transition: transform 0.3s ease, color 0.3s ease;
    margin-right: 5px;
}

.cpce-button-blue {
    background-color: #004a87 !important;
    color: #ffffff !important;
}

.cpce-button-blue:hover {
    background-color: #003663 !important;
    color: #ffffff !important;
}