/* ============================================================
   APIHKA — Estilos principales
   ============================================================ */

/* Layout */
#wrapper { min-height: 100vh; }

#sidebar {
    width: 230px;
    min-height: 100vh;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

#page-content {
    min-height: 100vh;
    background-color: #f5f6fa;
    min-width: 0; /* evita overflow horizontal */
}

/* Sidebar nav */
#sidebar .nav-link {
    font-size: 0.875rem;
    padding: 0.45rem 0.75rem;
    transition: background-color 0.15s;
    border-radius: 0.375rem;
}
#sidebar .nav-link:hover:not(.active) {
    background-color: rgba(255,255,255,0.08);
}

/* Cards */
.card { border-radius: 0.75rem; }
.card-header { border-radius: 0.75rem 0.75rem 0 0 !important; }

/* Tables */
.table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    font-weight: 600;
}
.table td { vertical-align: middle; }

/* Select2 */
.select2-container--bootstrap-5 .select2-selection {
    min-height: calc(1.5em + 0.75rem + 2px);
}

/* Monospace */
.font-monospace { font-family: 'Courier New', monospace; font-size: 0.875em; }

/* Formulario de emisión — filas de ítem */
.item-fila {
    background: #f8f9fb;
    border-radius: 0.5rem;
    padding: 0.9rem 1rem;
    margin-bottom: 0.65rem;
    border: 1px solid #e2e6ea;
    transition: border-color 0.15s;
}
.item-fila:hover { border-color: #adb5bd; }

/* Alertas — crecen hacia abajo, nunca a los lados */
.alert {
    word-break: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

/* Progress bars dashboard */
.progress { border-radius: 4px; background: #e9ecef; }
.progress-bar { border-radius: 4px; }

/* Navbar top */
.navbar { min-height: 52px; }

/* Scrollbar suave en pre */
pre { scrollbar-width: thin; }

/* Badge legible en tablas */
.badge { font-size: 0.72rem; font-weight: 500; }

/* Botones de acción pequeños en tablas */
.btn-group-sm > .btn { padding: 0.2rem 0.45rem; }

/* Spinner overlay (reutilizable) */
#spinner-overlay {
    position: fixed; inset: 0;
    background: rgba(255,255,255,0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
