* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background-color: #26272b;
    color: #ffffff;
	text-transform: uppercase;
}
.menu-boton {
    display: none;
    font-size: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
	float:right;
}

/* ==========================================
   ELEMENTOS REUTILIZABLES
   ========================================== */
.etiqueta {
    display: block;
    font-size: 11px;
    font-weight: bold;
    color: #aaaaaa;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
	text-align:left;
}

.campo {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    background-color: #1a1b1e;
    border: 1px solid #3d4046;
    border-radius: 6px;
    color: #ffffff;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}
.ia{
	resize: none;
	height: 300px; 
	padding: 10px; 
	text-align:center;
}
.campo::placeholder {
    color: #555861;
}

.campo:focus {
    border-color: #6a6e77;
}
a:link, a {
    text-decoration: none;
    color: #000; 
}
a:visited {
    color: #f30000; 
}
.iab,.iab:visited {
    color: #fff; 
}


/* ==========================================
   BOTÓN AZUL ÍNDIGO VIBRANTE (DISEÑO PREMIUM)
   ========================================== */
.boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 22px;
    
    /* Gradiente Azul Neón / Índigo */
    background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff !important;
    
    /* Bordes y bisel superior de luz */
    border: 1px solid #2563eb;
    border-top-color: #60a5fa;
    border-radius: 8px;
    
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    text-decoration: none;
    outline: none;
	text-transform: uppercase;
    
    /* Sombra proyectada con halo ambiental azul */
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.boton:hover {
    background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
    border-color: #3b82f6;
    border-top-color: #93c5fd;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transform: translateY(-2px) scale(1.01);
    color: #ffffff;
}

.boton:active {
    background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%);
    border-color: #1e40af;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(0, 0, 0, 0.4);
    transform: translateY(1px) scale(0.99);
}


/* LOGO EN FONDO CLARO PARA DIBUJAR CONTRASTE */
.logo {
    background-color: #b0deff;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo img {
    max-width: 100%;
    height: auto;
    max-height: 50px;
    object-fit: contain;
}
/* Contenedor de previsualización */
.contenedor-preview {
    margin-top: 15px;
    padding: 15px;
    border: 1px dashed var(--linea-borde, #ccc);
    border-radius: 8px;
    background-color: var(--fondo-tarjeta, #f9f9f9);
    transition: all 0.3s ease;
}

.contenedor-preview.oculto {
    display: none;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.preview-body {
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 350px;
    overflow: hidden;
    border-radius: 6px;
}

.preview-body img {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
}

.boton-cerrar {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    color: var(--texto-secundario, #888);
}

.boton-cerrar:hover {
    color: var(--texto-alerta, #e74c3c);
}

/* Imagen cargada existente */
.box-comprobante img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 6px;
    cursor: pointer;
    object-fit: contain;
}

/* ==========================================
   PÁGINA DE LOGIN
   ========================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: radial-gradient(circle, #3d4046 0%, #212225 70%, #17181a 100%);
}

.caja {
    background-color: #313338;
    width: 100%;
    max-width: 380px;
    padding: 30px 25px;
    border-radius: 12px;
    border: 1px solid #3d4046;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    text-align: center;
}

.subtitulo {
    font-size: 13px;
    color: #a0a5ad;
    margin-bottom: 22px;
}

.caja form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.caja .boton {
    width: 100%;
    margin-top: 8px;
    height: 42px;
}
.opcion-radio {
display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem; 
  align-items: center;
  margin-bottom: 0.4rem;
}

.opcion-radio label {
  display: inline-flex; 
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #fff;
  cursor: pointer;
}

.opcion-radio input[type="radio"] {
 accent-color: #2563eb;
}

/* Efecto al pasar el mouse y al seleccionar */
.opcion-radio label:hover,
.opcion-radio label:has(input:checked) {
  border-bottom: 1px solid #fff;
  font-weight: 600;
}
.pdfview iframe{
	min-width:100%;
	min-height:400px;
}
/* ==========================================
   PÁGINA DE DASHBOARD (.desboar)
   ========================================== */
.desboar {
    display: flex;
    min-height: 100vh;
}

/* Overlay para cerrar sidebar en movil */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 999;
}

.sidebar-overlay.activo {
    display: block;
}

/* Sidebar lateral */
aside {
    width: 230px;
    background-color: #1a1b1e;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #33353a;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.aside-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.aside-header .logo {
    flex: 1;
    margin-bottom: 0;
}

.btn-cerrar-sidebar {
    display: none;
    background: none;
    border: none;
    color: #a0a5ad;
    font-size: 28px;
    cursor: pointer;
    padding-left: 10px;
    line-height: 1;
}

.btn-cerrar-sidebar:hover {
    color: #ffffff;
}

aside nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

aside nav a {
    display: block;
    padding: 11px 16px;
    color: #a0a5ad;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: bold;
    transition: background-color 0.2s, color 0.2s;
}

aside nav a:hover, aside nav a.activo {
    background-color: #2d3036;
    color: #ffffff;
}

/* Submenús en aside */
.grupo-menu {
    user-select: none;
}

.grupo-menu summary {
    padding: 11px 16px;
    color: #a0a5ad;
    font-size: 13.5px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s, color 0.2s;
}

.grupo-menu summary::after {
    content: '›';
    font-size: 14px;
    transition: transform 0.2s ease;
}

.grupo-menu[open] summary::after {
    transform: rotate(90deg);
}

.grupo-menu summary:hover, 
.grupo-menu[open] summary {
    background-color: #2d3036;
    color: #ffffff;
}

.submenu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 12px;
    margin-top: 4px;
}

.submenu a {
    padding: 8px 12px !important;
    font-size: 12.5px !important;
    color: #8a8f99 !important;
    border-left: 2px solid #33353a;
    border-radius: 0 4px 4px 0 !important;
}

.submenu a:hover {
    color: #ffffff !important;
    border-left-color: #3b82f6;
    background-color: rgba(255, 255, 255, 0.03) !important;
}

/* Panel Principal */
main {
    flex: 1;
    padding: 25px;
    background-color: #26272b;
    min-width: 0;
}

.main-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px;
}

.main-header h1 {
    font-size: 22px;
    font-weight: bold;
}

/* Botón Hamburguesa Móvil */
.btn-toggle-sidebar {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 36px;
    height: 36px;
    padding: 6px;
    background-color: #1a1b1e;
    border: 1px solid #3d4046;
    border-radius: 6px;
    cursor: pointer;
}

.btn-toggle-sidebar label {
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
}

/* ÁREA DE BOTONES SUPERIOR (Alineados a la derecha) */
.acciones-top {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* Área de Filtros */
.filtro {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 22px;
    display: flex;
    align-items: flex-end;
    gap: 15px;
    flex-wrap: wrap;
}

.filtro-campo {
    flex: 1;
    min-width: 160px;
}

.filtro .box-btn {
    flex: 0 0 auto;
}

.formulario-busqueda {
    width: 100%;
}

.box-btn {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.caja-vi {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #313338;
    border: 1px solid #3a3d43;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Tarjetas */
.rejilla {
    display: flex;
    gap: 18px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.tarjeta {
    flex: 1;
    min-width: 200px;
    background-color: #313338;
    padding: 18px;
    border-radius: 8px;
    border: 1px solid #3a3d43;
}

.tarjeta p, label {
    font-size: 15px;
    font-weight: bold;
    margin-top: 6px;
    color: #ffffff;
	text-align: right
}
.contenedor-previsualizacion {
    margin-top: 10px;
    text-align: center;
}

.contenedor-previsualizacion img {
    max-width: 100%;
    max-height: 250px;
    border-radius: 6px;
    border: 1px solid #ccc;
    object-fit: contain;
}

/* En caso de no tener la clase 'oculto' global */
.oculto {
    display: none !important;
}

.mensaje-exito {
    margin-top: 15px;
    text-align: center;
    color: #60a5fa;
    font-weight: bold;
}

.mensaje-error {
    margin-top: 15px;
    padding: 10px;
    text-align: center;
    color: #ff6b6b;
    font-weight: bold;
}

.boton.ver {
    min-width: 38px;
    padding: 0 12px;
}

.paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.fila {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  width: 100%;
  margin-bottom: 15px;
}

.grupo-campo {
  flex: 1 1 200px; /* Crece y se adapta según la pantalla */
  display: flex;
  flex-direction: column;
}

.ancho-total {
  flex: 1 1 100%;
}

.campo {
  width: 100%;
  box-sizing: border-box;
}

/* Tabla con Scroll e Hiperfijación de Encabezado */
.contenedor-tabla {

    overflow-y: auto;
    overflow-x: auto;
    border-radius: 6px;
  
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.contenedor-tabla::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

/* 2. Fondo de la barra (track) */
.contenedor-tabla::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05); /* Fondo sutil para que contraste con tu main */
    border-radius: 6px;
}

/* 3. La barra deslizable (thumb) */
.contenedor-tabla::-webkit-scrollbar-thumb {
    background-color: #a0a5ad; /* El mismo gris de tu borde */
    border-radius: 6px;
    border: 2px solid transparent; /* Crea un pequeño margen interno */
    background-clip: padding-box;
}

/* 4. Efecto al pasar el mouse por encima de la barra */
.contenedor-tabla::-webkit-scrollbar-thumb:hover {
    background-color: #7b8088; /* Se oscurece un poco al interactuar */
}

.contenedor-tabla::-webkit-scrollbar-track {
    background: #2b2d31;
}

.contenedor-tabla::-webkit-scrollbar-thumb {
    background: #525660;
    border-radius: 4px;
}

table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background-color: #cdd1d8;
    color: #111111;
}

table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #2b2d31;
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    padding: 10px 12px;
    text-align: center;
    border-bottom: 2px solid #111111;
}

table td {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    border-right: 1px solid #b0b4be;
    border-bottom: 1px solid #b0b4be;
}

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

table tbody tr:nth-child(odd) {
    background-color: #d8dce3;
}

table tbody tr:nth-child(even) {
    background-color: #becfdb;
}

table tbody tr:hover {
    background-color: #a9bac7;
}

/* ==========================================
   MODAL
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 15px;
}

.modal-overlay.activo {
    opacity: 1;
    pointer-events: auto;
}

.modal-contenedor {
    background-color: #26272b;
    border: 1px solid #3d4046;
    border-radius: 10px;
    width: 100%;
    max-width: 650px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    transform: translateY(-20px);
    transition: transform 0.25s ease;
    overflow: hidden;
}

.modal-overlay.activo .modal-contenedor {
    transform: translateY(0);
}

.modal-header {
    padding: 16px 20px;
    background-color: #1a1b1e;
    border-bottom: 1px solid #33353a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
}

.modal-cerrar {
    background: none;
    border: none;
    color: #a0a5ad;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal-cerrar:hover {
    color: #ffffff;
}

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

.modal-footer {
    padding: 12px 20px;
    background-color: #1a1b1e;
    border-top: 1px solid #33353a;
    display: flex;
    justify-content: flex-end;
}

/* Visor de Imagen */
.visor-imagen-contenedor {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.visor-herramientas {
    display: flex;
    gap: 10px;
    justify-content: center;
    width: 100%;
}

.visor-box-img {
    width: 100%;
    max-height: 65vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 10px;
}

.visor-box-img img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 6px;
}

/* Select2 Custom Dark */
.select2-container--default .select2-selection--single {
    background-color: #1a1b1e !important;
    border: 1px solid #3d4046 !important;
    border-radius: 6px !important;
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #ffffff !important;
    font-size: 13px !important;
    padding-left: 12px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
}

.select2-dropdown {
    background-color: #1a1b1e !important;
    border: 1px solid #3d4046 !important;
    color: #ffffff !important;
}

.select2-search__field {
    background-color: #26272b !important;
    border: 1px solid #3d4046 !important;
    color: #ffffff !important;
}

.select2-results__option--highlighted[aria-selected] {
    background-color: #3d4046 !important;
    color: #ffffff !important;
}

/* ==========================================
   MEDIA QUERIES (ADAPTABILIDAD RESPONSIVE)
   ========================================== */

/* Tablets (pantallas de menos de 1024px) */
@media screen and (max-width: 1024px) {
    .rejilla {
        gap: 12px;
    }
    
    .tarjeta {
        min-width: 45%;
    }
    
    .filtro-campo {
        min-width: 45%;
    }
}

/* Dispositivos Móviles y Tablets Pequeñas (menos de 768px) */
@media screen and (max-width: 768px) {
	.menu-boton {
        display: block; 
		display: flex;
    }
    aside {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5);
    }

    aside.abierto {
        transform: translateX(0);
    }

    .btn-cerrar-sidebar {
        display: block;
    }

    

    main {
        padding: 16px;
    }

    .acciones-top {
        justify-content: stretch;
    }

    .acciones-top .boton {
        flex: 1 1 100%;
        width: 100%;
    }

    .filtro {
        padding: 14px;
        gap: 12px;
    }

    .filtro-campo {
        min-width: 100%;
    }

    .filtro .box-btn {
        width: 100%;
    }

    .filtro .box-btn .boton {
        width: 100%;
    }

    .tarjeta {
        min-width: 100%;
    }
}

/* Teléfonos muy pequeños (menos de 480px) */
@media screen and (max-width: 480px) {
    .main-header h1 {
        font-size: 18px;
    }

    .caja {
        padding: 22px 16px;
    }
}

/* ============================================================
   COMPONENTES ADICIONALES
   Extraidos de los PHP para que no quede CSS dentro del codigo.
   ============================================================ */

/* --- Pestanas (tabs) --- */
.pestanas {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    border-bottom: 2px solid #2b2d31;
}

.pestana {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #b9bbbe;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.pestana:hover {
    color: #ffffff;
    border-bottom-color: #3b82f6;
}

.pestana.activa {
    color: #ffffff;
    border-bottom-color: #60a5fa;
}

.pestanas-contenido {
    display: none;
}

.pestanas-contenido.activo {
    display: block;
}

/* --- Secciones y titulos internos --- */
.seccion {
    margin-bottom: 22px;
}

.section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #b9bbbe;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #3a3d43;
}

/* --- Radios y casillas --- */
.radio,
.checkbox {
    width: auto;
    height: auto;
    accent-color: #3b82f6;
    margin: 0 8px 0 0;
    vertical-align: middle;
    cursor: pointer;
}

.opciones-radio {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.opciones-radio label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    color: #dcddde;
}

/* --- Contenido con scroll dentro de un modal --- */
.con-scroll {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 6px;
}

.con-scroll-alto {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 6px;
}

/* --- Lista de datos (vistas de solo informacion) --- */
.lista-datos {
    display: grid;
    grid-template-columns: minmax(120px, 200px) 1fr;
    gap: 0;
    border: 1px solid #3a3d43;
    border-radius: 8px;
    overflow: hidden;
}

.lista-datos dt {
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #b9bbbe;
    background: #2b2d31;
    border-bottom: 1px solid #3a3d43;
}

.lista-datos dd {
    padding: 9px 12px;
    font-size: 13px;
    color: #f2f3f5;
    background: #313338;
    border-bottom: 1px solid #3a3d43;
    margin: 0;
    overflow-wrap: anywhere;
}

.lista-datos dt:last-of-type,
.lista-datos dd:last-of-type {
    border-bottom: none;
}

/* --- Estado vacio --- */
.sin-resultados {
    padding: 30px 16px;
    text-align: center;
    color: #b9bbbe;
    font-size: 13px;
    font-style: italic;
}

.estado-vacio {
    text-align: center;
    padding: 24px 12px;
    color: #b9bbbe;
    font-size: 13px;
}

.estado-vacio strong {
    display: block;
    color: #f2f3f5;
    font-size: 14px;
    margin-bottom: 6px;
}

/* --- Mensaje de confirmacion en modal --- */
.mensaje-confirmacion {
    text-align: center;
    padding: 18px 6px;
}

.mensaje-confirmacion p {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 8px;
    color: #f2f3f5;
}

.mensaje-confirmacion .advertencia {
    color: #f8d66d;
    font-weight: 700;
}

/* --- Celdas de texto largo --- */
.celda-texto {
    text-align: left !important;
    font-weight: 400 !important;
    max-width: 320px;
    overflow-wrap: anywhere;
}

.celda-numero {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
}

.texto-suave {
    color: #b9bbbe;
    font-size: 12px;
}

.vacio {
    color: #808285;
    font-style: italic;
}

/* --- Contenedor generico --- */
.contenedor {
    width: 100%;
    margin: 0 auto;
}

.contenedor-tabla table {
    min-width: 100%;
}

/* --- Fila de acciones dentro de celdas --- */
.acciones-celda {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   CLASES PARA EL MODAL UNIFICADO
   Sacan el CSS que estaba embebido en modal_unificado.php
   ============================================================ */

/* Tamaños de modal (usados por generarModal con 'tamanio') */
.modal-contenedor.modal-sm { max-width: 400px; }
.modal-contenedor.modal-md { max-width: 650px; }
.modal-contenedor.modal-lg { max-width: 900px; }
.modal-contenedor.modal-xl { max-width: 1200px; }

/* Contenido con scroll (generarModalVista) */
.contenido-vista {
    color: #dcddde;
    font-size: 13px;
    line-height: 1.5;
}

.contenido-vista.con-scroll {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 6px;
}

/* Confirmacion */
.modal-confirmacion p {
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 10px;
    color: #f2f3f5;
}

.modal-confirmacion p:last-child {
    margin-bottom: 0;
}

/* Estados de carga / error de cargarModalAjax */
.modal-cargando {
    text-align: center;
    padding: 40px 16px;
    color: #b9bbbe;
    font-size: 13px;
}

.modal-error-carga {
    text-align: center;
    padding: 40px 16px;
    color: #ff6b6b;
    font-size: 13px;
    font-weight: 700;
}

/* Campo con error de validacion (inyectado antes por JS) */
.campo.error,
select.campo.error,
.campo.error:focus {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 1px #ff6b6b;
}

/* Los mensajes vacios no deben ocupar espacio */
.mensaje-error:empty,
.mensaje-exito:empty {
    display: none;
    margin: 0;
    padding: 0;
}

/* ============================================================
   UTILIDADES MENORES (extraidas de estilos inline de los PHP)
   ============================================================ */

/* Etiqueta que actua como opcion de radio: click en el texto = click en el radio */
label[for^="opc"],
.etiqueta-opcion {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

/* Barra de herramientas dentro de un modal */
.barra-herramientas {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

/* Alineaciones de celda */
.celda-izquierda { text-align: left !important; }
.celda-derecha   { text-align: right !important; }

/* Imagenes */
.img-miniatura {
    max-width: 20%;
    height: auto;
}

.img-vista-previa {
    max-width: 200px;
    height: auto;
    display: block;
    margin-top: 10px;
}

/* Avisos */
.aviso {
    padding: 10px 12px;
    border-radius: 5px;
    margin: 10px 0;
    font-size: 13px;
    border: 1px solid transparent;
}

.aviso-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.aviso-pendiente {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

/* Margen util */
.mt-negativo-1 { margin-top: -1%; }
.mt-cero { margin-top: 0; }

/* Imagen que rota en el visor del modal */
.visor-imagen {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}
