/* GEONEG: estándar visual de las pantallas de trabajo.
   Cargar después de geoneg.css. Cambiar las variables aquí, no en cada página.
   Las reglas se limitan al contenido; no alteran menú, login ni WebForms. */
:root {
    --geo-ui-primary: #104b96;
    --geo-ui-text: #172c48;
    --geo-ui-border: #cfdbe9;
    --geo-ui-surface: #f9fbfe;
    --geo-ui-control-height: 34px;
    --geo-ui-header-height: 46px;
    --geo-ui-section-height: 30px;
    --geo-ui-radius: 5px;
    --geo-ui-gap: 8px;
    --geo-ui-shadow: 0 2px 9px rgba(30, 69, 112, .07);
}

.geo-center .geo-page-content {
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--geo-ui-text);
    background: linear-gradient(180deg, #fff, #f9fbfe);
    border-color: var(--geo-ui-border);
    border-radius: 7px;
    box-shadow: var(--geo-ui-shadow);
}
.geo-page-content .geo-cabecera {
    height: auto;
    min-height: var(--geo-ui-header-height);
    padding: 8px 14px;
    gap: 10px;
    margin-bottom: var(--geo-ui-gap);
    background: linear-gradient(110deg, #0b438d, #1d5bae);
    border: 1px solid #245da0;
    border-radius: var(--geo-ui-radius);
}
.geo-page-content .geo-cabecera-icon-box { flex: 0 0 28px; }
.geo-page-content .geo-cabecera-titulo {
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.25;
}

/* Barra amarilla continua, también cuando sus acciones pasan a otra línea. */
.geo-page-content .geo-toolbar {
    height: auto !important;
    min-height: 32px !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
    gap: 4px 8px !important;
    padding: 2px 8px !important;
    margin-bottom: var(--geo-ui-gap) !important;
    background: linear-gradient(#fff8b5, #f4df54) !important;
    border: 1px solid #e5d97b !important;
    border-radius: var(--geo-ui-radius);
}
.geo-page-content .geo-toolbar :is(.mud-button-root, .geo-tool-button) {
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 8px !important;
    line-height: 28px !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    transform: none;
}
.geo-page-content .geo-toolbar .mud-button-label { font-size: 13px !important; }
.geo-page-content .geo-toolbar button:disabled { opacity: .5; cursor: default; }

/* Panel y franja de sección: mismos márgenes para reportes y procesos. */
.geo-page-content .geo-panel-filtros {
    padding: 8px 12px !important;
    margin-bottom: var(--geo-ui-gap) !important;
    border: 1px solid var(--geo-ui-border);
    border-radius: var(--geo-ui-radius);
    background: var(--geo-ui-surface);
    box-shadow: var(--geo-ui-shadow);
}
.geo-page-content .geo-barra-seccion-proceso {
    height: auto;
    min-height: var(--geo-ui-section-height);
    padding: 4px 12px;
    margin: -8px -12px 8px;
    line-height: 20px;
    background: linear-gradient(#dde8f5, #cbdbee);
    color: #12365f;
    border: 0;
    border-bottom: 1px solid var(--geo-ui-border);
    font-size: 13px;
    font-weight: 600;
}
.geo-page-content .geo-panel-filtros > .geo-barra-seccion-proceso:first-child {
    border-radius: 4px 4px 0 0;
}
.geo-page-content .geo-panel-filtros label.form-label {
    display: block !important;
    width: 100%;
    padding: 2px 4px !important;
    margin-bottom: 3px !important;
    line-height: 16px !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    color: var(--geo-ui-text) !important;
    background: #f0f4f9 !important;
    border: 0 !important;
    border-radius: 3px !important;
}
.geo-page-content .geo-panel-filtros :is(input.form-control, select.form-select, .geo-cliente-input, .geo-campo-fecha-input) {
    height: var(--geo-ui-control-height) !important;
    min-height: var(--geo-ui-control-height) !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    font-size: 13px !important;
    border-color: var(--geo-ui-border);
    border-radius: var(--geo-ui-radius);
}
/* No fijar altura del contenedor: los mensajes de validación deben poder crecer.
   No cambiar display de los slots: MudDatePicker oculta un slot auxiliar. */
.geo-page-content .geo-panel-filtros :is(.mud-input-control, .mud-select, .mud-autocomplete) {
    min-height: var(--geo-ui-control-height) !important;
    min-width: 0;
}
.geo-page-content .geo-panel-filtros .mud-input:not(.mud-input-multiline) {
    min-height: var(--geo-ui-control-height) !important;
    border-radius: var(--geo-ui-radius);
}
.geo-page-content .geo-panel-filtros .mud-input:not(.mud-input-multiline) > .mud-input-slot {
    height: var(--geo-ui-control-height) !important;
    min-height: var(--geo-ui-control-height) !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-size: 13px !important;
    line-height: var(--geo-ui-control-height) !important;
}
.geo-page-content .geo-panel-filtros .mud-input-outlined-border { border-color: var(--geo-ui-border); }
.geo-page-content .geo-panel-filtros .mud-input:focus-within .mud-input-outlined-border { border-color: var(--geo-ui-primary); }
.geo-page-content .geo-panel-filtros :is(input, select):focus-visible {
    outline: 2px solid #669bda;
    outline-offset: 1px;
}
.geo-page-content .geo-panel-filtros :is(input, select):disabled {
    background-color: #f1f4f8;
    color: #778396;
    opacity: 1;
}
.geo-page-content .geo-panel-filtros .row {
    --bs-gutter-x: 12px !important;
    --bs-gutter-y: 8px !important;
}
.geo-page-content .geo-sin-datos {
    background: #f2f6fb;
    border: 1px solid var(--geo-ui-border);
    border-radius: var(--geo-ui-radius);
    color: #52667f;
    min-height: 34px;
    padding: 6px 12px;
    margin-top: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 20px;
}
.geo-page-content :is(.geo-grid-container, .geo-grid-proceso-container) {
    border-color: var(--geo-ui-border);
    border-radius: var(--geo-ui-radius);
    box-shadow: var(--geo-ui-shadow);
}

/* Selectores reutilizables: código/identificación 1/3, nombre 2/3. */
.geo-selector-doble { grid-column: 1 / -1; min-width: 0; }
.geo-selector-doble-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: var(--geo-ui-gap);
}
.geo-selector-doble-grid > div { min-width: 0; }
.geo-selector-mensaje { margin-top: 4px; }
.geo-selector-mensaje:empty { margin: 0; }

/* Cuadre de cajas: aquí sólo se define su distribución. */
.geo-cuadre-cajas { min-width: 0; }
.geo-cuadre-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 12px;
    margin-bottom: 8px;
}
.geo-cuadre-campo { display: flex; flex-direction: column; min-width: 0; gap: 0; }
.geo-cuadre-campo > :is(input, select, .geo-cuadre-date) { width: 100%; min-width: 0; }
.geo-cuadre-campo > input[type="checkbox"] {
    align-self: flex-start;
    width: 18px;
    height: 18px;
    margin: 8px 0;
    accent-color: var(--geo-ui-primary);
}
.geo-cuadre-fecha-hora {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px 32px;
    gap: 4px;
    width: 100%;
    max-width: 240px;
    min-width: 0;
}
.geo-cuadre-fecha-hora input { min-width: 0; }
.geo-cuadre-fecha-hora input[type="number"] {
    padding-left: 2px;
    padding-right: 2px;
    text-align: center;
    appearance: textfield;
    -moz-appearance: textfield;
}
.geo-cuadre-fecha-hora input[type="number"]::-webkit-inner-spin-button,
.geo-cuadre-fecha-hora input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.geo-cuadre-date { width: 100%; min-width: 0; margin: 0; }
.geo-cuadre-date .mud-input-control { margin: 0; }
.geo-page-content .geo-cuadre-date .mud-input-adornment { margin-left: 2px; margin-right: 0; }
.geo-page-content .geo-cuadre-date .mud-input-slot { padding-left: 8px !important; padding-right: 0 !important; }
.geo-page-content .geo-cuadre-desplegable {
    width: calc(100% + 24px);
    margin: 0 -12px 8px;
    justify-content: space-between;
    text-align: left;
    cursor: pointer;
}
.geo-cuadre-desplegable::after { content: "⌄"; font-size: 16px; }
.geo-cuadre-desplegable[aria-expanded="true"]::after { content: "⌃"; }
.geo-cuadre-desplegable:focus-visible { outline: 2px solid var(--geo-ui-primary); outline-offset: -2px; }
.geo-cuadre-desplegable:disabled { opacity: .6; cursor: default; }
.geo-cuadre-cliente { margin-top: 0; margin-bottom: 0; }
.geo-cuadre-visor iframe { width: 100%; min-height: 70vh; border: 1px solid var(--geo-ui-border); }

@media (max-width: 1150px) {
    .geo-cuadre-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
    .geo-cuadre-grid, .geo-selector-doble-grid { grid-template-columns: minmax(0, 1fr); }
    .geo-page-content .geo-cabecera-titulo { font-size: 14px !important; }
    .geo-page-content .geo-toolbar { column-gap: 4px !important; }
}
@media (pointer: coarse) {
    :root { --geo-ui-control-height: 40px; }
    .geo-page-content .geo-toolbar :is(.mud-button-root, .geo-tool-button) { min-height: 40px !important; height: auto !important; }
}

/* Los calendarios se renderizan en el proveedor de popovers, fuera de la página.
   El encabezado propio del datepicker limita esta regla a calendarios. */
.mud-popover:has(.mud-picker-datepicker-toolbar) {
    box-shadow: 0 3px 12px rgba(30, 69, 112, .14) !important;
}
.mud-popover .mud-paper:has(.mud-picker-datepicker-toolbar) {
    box-shadow: none !important;
}
