/* --------------------------------------------------
   📌 CONTENEDOR PRINCIPAL (centrado)
-------------------------------------------------- */
.cm-container {
    max-width: 960px;        /* más compacto */
    width: 100%;             /* flexible en móviles */
    margin: 20px auto;       /* centrado horizontal */
    padding: 0 10px;         /* espacio interno */
}

/* --------------------------------------------------
   📌 TABLA PRINCIPAL
-------------------------------------------------- */
.cm-tabla {
    width: 100%;
    max-width: 960px;        /* límite de ancho */
    margin: 20px auto;       /* centrada */
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
    box-shadow: 0 0 4px rgba(0,0,0,0.05);
}

.cm-tabla th {
    background: #f1f5f9;
    font-weight: 600;
    padding: 10px;
    border: 1px solid #d0d7de;
    text-transform: uppercase;
    font-size: 12px;
    text-align: center;
}

.cm-tabla td {
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    text-align: center;
}

.cm-tabla tr:nth-child(even) {
    background: #f9fafb;
}

/* Inputs dentro de la tabla */
.cm-tabla input[type="text"],
.cm-tabla input[type="number"] {
    width: 100%;
    padding: 5px 6px;
    font-size: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-sizing: border-box;
}

.cm-tabla input[type="number"] {
    text-align: center;
}

/* --------------------------------------------------
   📌 FORMULARIOS CME
-------------------------------------------------- */
.cme-form label {
    display: block;
    margin-top: 10px;
    font-weight: 600;
}

.cme-form input {
    width: 100%;
    padding: 6px;
}

.cme-btn,
.cme-btn-logout {
    display: inline-block;
    margin: 6px 0;
}

/* Botón cerrar sesión arriba */
.cme-btn-logout {
    position: absolute;
    top: 20px;
    right: 20px;
}

/* --------------------------------------------------
   📌 MENÚ (sidebar convertido en menú superior)
-------------------------------------------------- */
.sidebar {
    width: 100%;
    float: none;
    margin: 0 auto 20px auto;
    display: block;
    text-align: center;
}

.sidebar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    justify-content: center;
}

.sidebar ul li {
    display: inline-block;
}

.sidebar ul li a {
    background: #0073aa;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
}

.sidebar ul li a:hover {
    background: #005a8c;
}

/* --------------------------------------------------
   📌 RESPONSIVE CELULAR
-------------------------------------------------- */
@media screen and (max-width: 900px) {
    .cm-tabla {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* scroll suave en móviles */
        border-radius: 8px;
    }
}

/* --------------------------------------------------
   📌 AJUSTES GENERALES ASTRA (centrado correcto)
-------------------------------------------------- */
.entry-content,
.ast-container,
.site-content .ast-container {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

.ast-left-sidebar #primary,
.ast-right-sidebar #primary {
    width: 100% !important;
}

#primary {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.page .entry-content {
    padding: 0 !important;
    margin: 0 auto !important;
    display: block !important;
}

/* --------------------------------------------------
   📌 PÁGINA REGISTRO ENTIDAD (ID 137)
-------------------------------------------------- */
.page-id-137 .site-header,
.page-id-137 .site-footer,
.page-id-137 .entry-title,
.page-id-137 .entry-content > *:not(.cme-form) {
    display: none !important;
}

.page-id-137 .cme-form {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
}

.page-id-137 .sidebar {
    display: block;
    margin-bottom: 20px;
}

.page-id-137 .entry-content {
    clear: both;
}

/* --------------------------------------------------
   📌 CONTROL DE IMÁGENES (evitar desbordes)
-------------------------------------------------- */
img {
    max-width: 100%;
    height: auto;
    display: block;
}