﻿/* ======== GENERAL ======== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #f4f6f8;
}

/* ======== NAVBAR ======== */
.navbar {
    background-color: #004a99;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1030;
}

.navbar-brand {
    display: flex;
    align-items: center;
    color: white !important;
    font-weight: 700;
    text-transform: uppercase;
}

    .navbar-brand img {
        height: 40px;
        margin-right: 10px;
    }

.navbar-toggler {
    border: none;
    font-size: 22px;
    color: white !important;
}

.navbar-text {
    color: #ffffff !important;
    font-size: 0.9rem;
}

/* ======== SIDEBAR ======== */
.sidebar {
    position: sticky;
    top: 65px;
    height: calc(100vh - 65px);
    overflow-y: auto;
    background-color: #ffffff;
    border-right: 1px solid #e0e0e0;
    padding-top: 15px;
    padding-bottom: 20px;
}

    .sidebar a {
        display: flex;
        align-items: center;
        gap: 10px; /* espacio entre ícono y texto */
        color: #004a99;
        text-decoration: none;
        padding: 10px 15px;
        margin: 5px 10px;
        border-radius: 6px;
        transition: all 0.2s ease;
        font-weight: 500;
    }

        .sidebar a:hover,
        .sidebar a.active {
            background-color: #004a99;
            color: white;
        }

    .sidebar i {
        font-size: 16px;
        width: 22px;
        text-align: center;
    }

    /* Cerrar sesión */
    .sidebar a.text-danger {
        color: #d9534f !important;
    }

        .sidebar a.text-danger:hover {
            background-color: #d9534f;
            color: white !important;
        }

/* ======== CONTENIDO PRINCIPAL ======== */
.content {
    padding: 20px;
    background-color: #f9f9f9;
    min-height: calc(100vh - 65px);
    overflow: hidden;
}

/* ======== RESPONSIVE ======== */
@media (max-width: 991px) {
    .sidebar {
        position: fixed;
        top: 65px;
        left: 0;
        width: 220px;
        height: calc(100vh - 65px);
        z-index: 1020;
        background-color: #fff;
        border-right: 1px solid #ccc;
        padding-top: 15px;
    }

    .content {
        margin-left: 0 !important;
    }

    .navbar-text {
        display: none; /* Oculta el texto de usuario en pantallas pequeñas */
    }
}

/* ======== LOGIN PAGE ======== */
body.login-page {
    background: linear-gradient(120deg, rgba(0,74,153,0.95), rgba(0,123,255,0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    /* 🔷 Marca de agua del logo (atrás del formulario) */
    body.login-page::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 600px;
        height: 600px;
        background: url('../Imagenes/SOALCAlogo512x512.png') no-repeat center center;
        background-size: contain;
        opacity: 0.08;
        transform: translate(-50%, -50%);
        filter: blur(1px);
        pointer-events: none;
    }

    /* 🔷 Capa de desenfoque (blur sutil sobre el fondo) */
    body.login-page::after {
        content: "";
        position: absolute;
        inset: 0;
        backdrop-filter: blur(3px);
        z-index: 0;
    }

/* 🔷 Caja de Login */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    z-index: 1;
}

.login-box {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(5px);
    padding: 40px 35px;
    border-radius: 15px;
    width: 360px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

    .login-box:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    }

    .login-box .logo {
        width: 90px;
        height: 90px;
        border-radius: 10px;
    }

    .login-box h4 {
        color: #004a99;
        margin-top: 15px;
    }

.form-control {
    border-radius: 8px;
    height: 45px;
    font-size: 15px;
}

.btn-primary {
    background-color: #004a99;
    border: none;
    height: 45px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: 0.2s;
}

    .btn-primary:hover {
        background-color: #003a7a;
    }

.text-muted {
    font-size: 0.9rem;
}

/* ======== SCROLLBAR PERSONALIZADO ======== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(0, 74, 153, 0.4);
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background-color: rgba(0, 74, 153, 0.6);
    }

/* ======== LOADER ANIMADO ======== */
.loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loader-content {
    text-align: center;
    animation: fadeIn 0.3s ease-in-out;
}

.loader-logo {
    width: 80px;
    height: 80px;
    animation: spin 2.5s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* === Diseño de tablas de órdenes === */
.grid-custom th {
    background-color: #f8f9fa;
    color: #343a40;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
}

.grid-custom td {
    font-size: 14px;
    vertical-align: middle;
    color: #212529;
}

.grid-custom tr:hover {
    background-color: #eef6ff;
}

/* Botones dentro de las celdas */
.grid-custom .btn {
    padding: 3px 10px;
    font-size: 13px;
}

/* Mejorar las tarjetas */
.card {
    border-radius: 10px;
    overflow: hidden;
}

.card-header h5 {
    margin: 0;
    font-weight: 600;
}

/* Transición suave al mostrar detalle */
#divDetalleOrden {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.grid-custom th {
    background-color: #f8f9fa;
    color: #343a40;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
}

.grid-custom td {
    font-size: 14px;
    vertical-align: middle;
    color: #212529;
}

.grid-custom tr:hover {
    background-color: #eef6ff;
}
.grid-custom th {
    background-color: #f8f9fa;
    color: #343a40;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
}

.grid-custom td {
    font-size: 14px;
    vertical-align: middle;
    color: #212529;
}

.grid-custom tr:hover {
    background-color: #eef6ff;
}

.card-header h5 {
    font-weight: 600;
}
.grid-custom th {
    background-color: #f8f9fa;
    color: #343a40;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
}

.grid-custom td {
    font-size: 14px;
    vertical-align: middle;
}

.badge.verde {
    background-color: #28a745;
    color: white;
}

.badge.amarillo {
    background-color: #ffc107;
    color: black;
}

.badge.rojo {
    background-color: #dc3545;
    color: white;
}

.nav-tabs .nav-link.active {
    background-color: #0d6efd;
    color: #fff;
    font-weight: 600;
}

.nav-tabs .nav-link {
    color: #495057;
    font-weight: 500;
}

.card h5 i {
    color: #0d6efd;
}

/* ======== RESPONSIVE SOLO PARA CELULARES ======== */
@media (max-width: 576px) {

    /* Contenedor de los botones dentro de la celda */
    .acciones-responsive {
        display: flex !important;
        flex-direction: column;
        gap: 6px;
        width: 100%;
    }

        /* Cada botón ocupa todo el ancho */
        .acciones-responsive a,
        .acciones-responsive button {
            width: 100% !important;
            text-align: center;
        }
}

