/* =============================================================================
   SGCI THEME V2 - LAYOUT Y ESTRUCTURA GENERAL
   Estilos de layout, contenedores principales y estructura base
   ============================================================================= */

html, body {
    height: auto;
    min-height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--sgci-gray-800);
    background-color: var(--sgci-bg-secondary);
}

.full-height {
    height: 100vh;
}

footer {
    clear: both;
    background-color: var(--sgci-gray-800);
    color: var(--sgci-gray-100);
    padding: 1rem 0;
}

/* Footer específico SGCI */
.sgci-footer {
    background-color: var(--sgci-primary);
    text-align: center;
    margin-top: auto;
}

.sgci-footer-content {
    padding: 1rem;
    color: white;
    font-weight: 600;
}

/* =============================================================================
   CONTENEDORES PRINCIPALES
   ============================================================================= */

/* Contenedores principales */
.sgci-admin-container {
    padding: 2rem 0;
    transition: all 0.3s ease-in-out;
    background-color: var(--sgci-bg-primary);
    min-height: calc(100vh - 160px);
}

/* Tabla profesional */
.sgci-table-container {
    margin-top: 1.5rem;
    overflow-x: auto;
    background: var(--sgci-bg-primary);
    border-radius: 8px;
    box-shadow: var(--sgci-shadow);
    border: 1px solid var(--sgci-gray-200);
}

.table-container {
    overflow-x: auto;
}

.table-container table {
    width: 100%;
    margin-bottom: 0;
}

.table-container th {
    background-color: var(--sgci-gray-700);
    color: white;
    font-weight: 600;
    padding: 1rem 0.75rem;
    font-size: var(--sgci-font-size-sm);
    letter-spacing: 0.01em;
    border: 1px solid white;
    border-bottom: 2px solid var(--sgci-primary);
}

.table-container td {
    padding: 0.875rem 0.75rem;
    border-bottom: 1px solid var(--sgci-gray-200);
    font-size: var(--sgci-font-size-sm);
}

table.hover tr:hover {
    background-color: var(--sgci-gray-50);
    transition: background-color 0.2s ease;
}

table.unstriped tbody tr:nth-child(even) {
    background-color: var(--sgci-gray-50);
}

.text-right {
    text-align: right;
}

/* Celdas de acciones */
td.text-right {
    min-width: 140px;
    white-space: nowrap;
}

/* =============================================================================
   FORMULARIOS PROFESIONALES
   ============================================================================= */

.sgci-form {
    padding: 1.5rem 0;
}

.form-error {
    color: var(--sgci-danger);
    font-size: var(--sgci-font-size-xs);
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    display: none;
    font-weight: 500;
}

input.is-invalid-input + .form-error {
    display: block;
}

/* Mejoras adicionales para inputs y selects */
input[type="text"], 
input[type="email"], 
input[type="search"], 
input[type="password"], 
input[type="url"], 
input[type="tel"], 
input[type="number"], 
input[type="datetime"], 
input[type="date"], 
input[type="month"], 
input[type="week"], 
input[type="time"], 
input[type="datetime-local"], 
textarea, 
select {
    border: 1px solid var(--sgci-gray-300);
    border-radius: 6px;
    padding: 0.65rem 0.75rem;
    font-size: var(--sgci-font-size-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: var(--sgci-bg-primary);
    width: 100%;
    box-sizing: border-box;
}

input[type="text"]:focus, 
input[type="email"]:focus, 
input[type="search"]:focus, 
input[type="password"]:focus, 
input[type="url"]:focus, 
input[type="tel"]:focus, 
input[type="number"]:focus, 
input[type="datetime"]:focus, 
input[type="date"]:focus, 
input[type="month"]:focus, 
input[type="week"]:focus, 
input[type="time"]:focus, 
input[type="datetime-local"]:focus, 
textarea:focus, 
select:focus {
    border-color: var(--sgci-primary);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
    outline: none;
}

/* Labels profesionales */
label {
    color: var(--sgci-gray-700);
    font-weight: 500;
    font-size: var(--sgci-font-size-sm);
    margin-bottom: 0.5rem;
    display: block;
}

/* Alineación específica para celdas del grid */
.cell {
    padding-left: 0.625rem;
    padding-right: 0.625rem;
}

/* Asegurar que inputs y selects no se desborden */
.cell input,
.cell select,
.cell textarea {
    max-width: 100%;
}

/* Arreglar las flechas de los selectores */
select {
    text-align: left;
    direction: ltr;
    background-position: right 0.1rem center;
    padding-right: 1.3rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 14px 10px;
}

/* =============================================================================
   MENSAJES DE ALERTA PROFESIONALES
   ============================================================================= */

.callout {
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    font-weight: 500;
    border-left: 4px solid;
}

.callout.success {
    background-color: #f0fff4;
    color: var(--sgci-success);
    border-left-color: var(--sgci-success);
    border: 1px solid #9ae6b4;
}

.callout.alert {
    background-color: #fef5f5;
    color: var(--sgci-danger);
    border-left-color: var(--sgci-danger);
    border: 1px solid #feb2b2;
}

.callout.warning {
    background-color: #fffaf0;
    color: var(--sgci-warning);
    border-left-color: var(--sgci-warning);
    border: 1px solid #fbd38d;
}

/* Indicador de carga eliminado - era molesto visualmente */ 