/* ==========================================================================
   1. VARIABLES Y RESET
   ========================================================================== */
:root {
    --primary-color: #185766;
    --secondary-bg: #c2e3f2;
    --border-color: #b0bec5;
    --focus-bg: #f1f8e9;
    --text-main: #263238;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    font-family: Tahoma, Arial, sans-serif;
    font-size: 12px;
    background-color: #f5f7f8;
    color: var(--text-main);
    line-height: 1.4;
}

/* ==========================================================================
   2. ENCABEZADO (GOBIERNO)
   ========================================================================== */
.gov-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    padding: 8px 12px;
    margin-bottom: 10px;
}

.gov-header-left, .gov-header-right, .gov-header-center {
    text-align: center;
}

.gov-header-center { flex: 1; }
.gov-header img { max-height: 55px; }

.gov-entity { font-weight: bold; font-size: 1.4em; color: var(--primary-color); }
.gov-area   { font-weight: bold; font-size: 1.2em; color: var(--primary-color); }
.gov-program { font-weight: bold; font-size: 1.05em; color: var(--primary-color); }

/* ==========================================================================
   3. COMPONENTES DE FORMULARIO
   ========================================================================== */
.form-container {
    padding: 12px;
    background: var(--white);
}

.form-title, .form-subtitle {
    font-weight: bold;
    background: var(--secondary-bg);
    color: var(--primary-color);
    text-align: center;
    padding: 8px;
}

.form-title { font-size: 13px; border-bottom: 1px solid var(--primary-color); }
.form-subtitle { font-size: 11px; margin-bottom: 8px; }

.form-label {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 4px;
    display: block;
}

/* Botones Principales */
.btn-ingresarform {
    background-color: var(--secondary-bg);
    border-color: var(--secondary-bg);
    color: var(--primary-color);
    font-weight: bold;
}

.btn-ingresarform:hover {
    filter: brightness(0.95);
}

/* Botones Secundarios */
.btn-ingresarformSecun {
    background-color: var(--secondary-bg);
    border: 1px solid var(--secondary-bg);
    color: var(--primary-color);
    font-weight: bold;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
}

.btn-ingresarformSecun:hover {
    background-color: #b3dbea;
    border-color: #b3dbea;
    color: var(--primary-color);
}

/* FieldSet base del Acta Mes */
.ActaMes_FieldSet {
    /*border: 1px solid #b0bec5;*/
    padding: 8px 10px 10px 10px;
    margin: 0;
    min-height: 260px;
    font-size: 12px;
}

.ActaMes_FieldSet--small {
    min-height: auto;
}

/* Legend controlado (evita que crezca en desktop) */
.ActaMes_FieldSet legend {
    width: auto;
    padding: 0 6px;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: bold;
    color: #185766;
    border: none;
}

/* ==========================================================================
   4. TELERIK OVERRIDES (Limpieza de bordes y Focus)
   ========================================================================== */

/* Unificación de inputs para evitar el doble borde */
.RadInput, .RadTextBox, .RadComboBox, .RadPicker, .RadDatePicker {
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
}

/* Contenedor interno que simula el borde real */
.RadInput .riContent, 
.RadTextBox .riContent, 
.RadComboBox .rcbInner, 
.RadPicker .riContent {
    box-sizing: border-box !important;
    line-height: 1.2 !important;
    min-height: 26px !important;
    border: 1px solid var(--border-color) !important;
    padding: 5px !important;
    background-color: var(--white) !important;
}

/* Estado Focus */
.RadInput input:focus, 
.RadTextBox:focus, 
.RadComboBox .rcbInput:focus, 
.RadPicker .riTextBox:focus {
    outline: none !important;
    background-color: var(--focus-bg) !important;
    border-color: #1b5e20 !important; /* Verde oscuro para contraste */
}

.RadCheckBox { margin-top: 6px; }

/* ==========================================================================
   5. TABLAS Y GRIDS
   ========================================================================== */
.RadGrid {
    width: 100% !important;
    overflow-x: auto;
    border: 1px solid #cfd8dc;
}

.contenedor-tabla { text-align: center; }

.tabla-general {
    display: inline-block;
    text-align: left;
    border: 1px solid var(--border-color);
    width: 500px;
    font-size: 12px;
}

.celda {
    float: left;
    width: 25%;
    padding: 6px;
    border: 1px solid #cfd8dc;
    text-align: center;
    box-sizing: border-box;
}

.fila:after { content: ""; display: table; clear: both; } /* Limpieza de floats */

.titulo { text-align: left; font-weight: bold; background-color: #f5f7f8; }
.encabezado .celda { font-weight: bold; background-color: #eceff1; }
.total .celda { font-weight: bold; background-color: #e0f2f1; }

/* ==========================================================================
   6. BOTONES CON ICONO (Layout Vertical)
   ========================================================================== */
.btn-icon-img {
    background-color: transparent !important;
    border: none !important;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-icon-img:hover {
    background-color: rgba(0, 0, 0, 0.08);
    border-radius: 6px;
}

.btn-icon-vertical {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.btn-icon-vertical img {
    width: 60px;
    height: 60px;
    margin-bottom: 4px;
}

.btn-icon-vertical span {
    font-size: 11px;
    line-height: 1.2;
    color: #000;
}

/* ==========================================================================  
   7. BOTÓN INGRESAR DIRECCIÓN (VERSIÓN GRANDE Y MEJORADA)
   ========================================================================== */

.direccion-container{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.btn-direccion {
    display:flex;
    justify-content:center;
    align-items:center;

    padding:4px;
    background:transparent;
    border:none;
    line-height:1;
}

.btn-direccion img {
    width:160px;
    max-width:100%;
    height:auto;
}

/* Ajuste responsive */
@media (max-width:768px){
    .btn-direccion img{
        width:120px;
    }
}

/* ==========================================================================
   8. RESPONSIVE DESIGN
   ========================================================================== */

/* Tablet */
@media (min-width: 768px) and (max-width: 991px) {
    .gov-header img { max-height: 50px; }
}

/* Celular */
@media (max-width: 767px) {
    body { font-size: 15px; }
    
    .gov-header { flex-direction: column; }
    .gov-header img { max-height: 45px; margin-bottom: 6px; }

    .gov-entity { font-size: 1.2em; }
    .gov-area { font-size: 1.1em; }

    .RadInput input, .RadComboBox .rcbInput, .RadTextBox {
        height: 38px; /* Más fácil de tocar con el dedo */
        font-size: 14px !important;
    }

    .btn-icon-vertical img { width: 40px; height: 40px; }
    
    .RadCheckBox { transform: scale(1.3); }
}

/* ==========================================================================
   9. BOTONES CON ICONO (Layout Vertical)
   ========================================================================== */

.btn-icon-img {
    background-color: transparent !important;
    border: none !important;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-icon-img:hover {
    background-color: rgba(0, 0, 0, 0.08);
    border-radius: 6px;
}

.btn-icon-vertical {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.btn-icon-vertical img {
    width: 60px;
    height: 60px;
    margin-bottom: 4px;
}

.btn-icon-vertical span {
    font-size: 11px;
    line-height: 1.2;
    color: #000;
}

/* ==========================================================================  
   BOTONES
   ========================================================================== */
.btn-micro {
    display: inline-flex !important;   /* fuerza flex */
    flex-direction: row;
    align-items: center;
    justify-content: center;
    min-width: 85px;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: transparent;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none !important; /* quita subrayado */
    line-height: 1.2 !important;      /* evita aplastamiento */
}

.btn-micro i {
    font-size: 1.2rem;
    margin-right: 6px;
    vertical-align: middle; /* importante */
    line-height: 1;          /* fuerza altura correcta */
}

.btn-micro span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ==========================================================================  
   COLORES
   ========================================================================== */

/* Insertar (verde) */
.btn-micro-success {
    border-color: #28a745;
    color: #28a745;
}

.btn-micro-success:hover {
    background-color: #28a745;
    color: #fff;
}

/* Actualizar (azul) */
.btn-micro-info {
    border-color: #17a2b8;
    color: #17a2b8;
}

.btn-micro-info:hover {
    background-color: #17a2b8;
    color: #fff;
}

/* Cerrar / Peligro (rojo) */
.btn-micro-danger {
    border-color: #dc3545;
    color: #dc3545;
}

.btn-micro-danger:hover {
    background-color: #dc3545;
    color: #fff;
}

/* ==========================================================================
   10. UTILIDADES Y OTROS
   ========================================================================== */
.disabled { pointer-events: none; opacity: 0.5; }

#errorActa {
    display: none;
    font-size: 0.75rem;
    position: absolute;
    top: 100%;
    z-index: 10;
    color: red;
}

/* Ocultar elementos de RadWindow */
.RadWindow .rwCommands, 
.RadWindow .rwTitleRow {
    display: none !important;
}

/* Ajustar texto cuando se crean nombres automaticos -Cargar documentos- */
.file-label {
    display: block;
    width: 100%;
    font-size: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}