/* VigiaSupply — tema propio (sidebar oscuro + acentos de color), a
   propósito distinto del tema de navbar superior navy/naranja que usan
   Paz y Salvo / Contratación / Selección / Auth. Inspirado en el look
   del Laravel viejo (sidebar azul-950, acentos naranja, iconos
   FontAwesome por ítem, tarjetas blancas redondeadas con sombra). */

:root {
    --vs-navy-950: #172554;
    --vs-navy-900: #1e3a8a;
    --vs-navy-800: #1e40af;
    --vs-navy-700: #1d4ed8;
    --vs-orange: #f97316;
    --vs-orange-light: #fdba74;
    --vs-bg: #f3f4f6;
    --vs-text: #1f2330;
    --vs-border: #e5e7eb;
    --vs-verde: #16a34a;
    --vs-rojo: #dc2626;
    --vs-morado: #7c3aed;
    --vs-teal: #0d9488;
    --sidebar-width: 260px;
}

* { box-sizing: border-box; }

body {
    background-color: var(--vs-bg);
    color: var(--vs-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
}

/* ---------------------------------------------------------------------
   Layout general (app autenticada)
   --------------------------------------------------------------------- */
.vs-shell {
    display: flex;
    min-height: 100vh;
}

.vs-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--vs-navy-950) 0%, #0f1b3d 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.vs-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.vs-brand img {
    height: 30px;
    background: #fff;
    padding: 4px 7px;
    border-radius: 6px;
}

.vs-brand span {
    font-weight: 800;
    font-size: 17px;
    letter-spacing: 0.01em;
}

.vs-nav {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    flex: 1;
}

.vs-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: #cbd5f5;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}

.vs-nav li a i {
    width: 18px;
    text-align: center;
    color: var(--vs-orange-light);
    font-size: 15px;
}

.vs-nav li a:hover {
    background: rgba(255,255,255,0.07);
    color: #fff;
}

.vs-nav li.activo a {
    background: rgba(249,115,22,0.14);
    border-left-color: var(--vs-orange);
    color: #fff;
    font-weight: 700;
}

.vs-nav li.activo a i {
    color: var(--vs-orange);
}

.vs-nav-separador {
    padding: 16px 20px 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7bb0;
    font-weight: 700;
}

.vs-sidebar-usuario {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.15);
}

.vs-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--vs-orange);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}

.vs-usuario-nombre {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 165px;
}

.vs-usuario-roles {
    font-size: 11px;
    color: #9fb0dd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 165px;
}

.vs-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.vs-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: #fff;
    border-bottom: 1px solid var(--vs-border);
    position: sticky;
    top: 0;
    z-index: 90;
}

.vs-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--vs-navy-900);
}

.vs-topbar-acciones {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.vs-topbar-acciones a {
    color: var(--vs-navy-900);
    font-size: 17px;
    text-decoration: none;
}

.vs-topbar-acciones a.vs-salir {
    color: var(--vs-rojo);
}

.vs-topbar-acciones a:hover {
    opacity: 0.7;
}

.vs-content {
    padding: 24px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.pruebas-banner {
    background: #fef3c7;
    color: #78350f;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 7px 10px;
}

@media (max-width: 900px) {
    .vs-sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }
    .vs-sidebar.abierto {
        transform: translateX(0);
    }
    .vs-toggle {
        display: block;
    }
}

/* ---------------------------------------------------------------------
   Tarjetas, tablas, botones (reestilizados sobre Bootstrap)
   --------------------------------------------------------------------- */
.card {
    margin-bottom: 1.5rem;
    border: 1px solid var(--vs-border);
    border-radius: 14px;
    box-shadow: 0 2px 14px rgba(23, 37, 84, 0.07);
}

.card-title {
    color: var(--vs-navy-900);
    font-weight: 700;
}

h4, h5, h6 {
    color: var(--vs-navy-950);
    font-weight: 700;
}

.table thead th {
    color: var(--vs-navy-900);
    border-bottom-width: 2px;
    background-color: #f8f9fe;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.btn-primary {
    background-color: var(--vs-navy-900);
    border-color: var(--vs-navy-900);
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--vs-navy-950) !important;
    border-color: var(--vs-navy-950) !important;
}

.btn-outline-primary {
    color: var(--vs-navy-900);
    border-color: var(--vs-navy-900);
}

.btn-outline-primary:hover {
    background-color: var(--vs-navy-900);
    border-color: var(--vs-navy-900);
}

.btn-success {
    background-color: var(--vs-verde);
    border-color: var(--vs-verde);
}

a {
    color: var(--vs-navy-800);
}

a:hover {
    color: var(--vs-orange);
}

.badge.bg-primary {
    background-color: var(--vs-navy-900) !important;
}

/* ---------------------------------------------------------------------
   Tarjetas de estadistica con icono de color (dashboards)
   --------------------------------------------------------------------- */
.vs-stat {
    display: flex;
    align-items: center;
    gap: 16px;
}

.vs-stat-icono {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
}

.vs-stat-valor {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--vs-navy-950);
    line-height: 1.1;
}

.vs-stat-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.vs-bg-navy { background: var(--vs-navy-900); }
.vs-bg-naranja { background: var(--vs-orange); }
.vs-bg-verde { background: var(--vs-verde); }
.vs-bg-rojo { background: var(--vs-rojo); }
.vs-bg-morado { background: var(--vs-morado); }
.vs-bg-teal { background: var(--vs-teal); }

.icono-menu-item {
    color: var(--vs-navy-800);
    width: 18px;
    text-align: center;
}

/* ---------------------------------------------------------------------
   Login / pantallas sin sesion
   --------------------------------------------------------------------- */
.vs-auth {
    background:
        linear-gradient(160deg, rgba(15, 27, 61, 0.92), rgba(30, 58, 138, 0.85)),
        url('../img/login_fondo.png') center center / cover no-repeat;
    min-height: 100vh;
}

.vs-auth-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    max-width: 410px;
    width: 100%;
    border: none;
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(5, 10, 30, 0.35);
    overflow: hidden;
}

.login-card .login-header {
    background: linear-gradient(135deg, var(--vs-navy-950) 0%, var(--vs-navy-800) 100%);
    padding: 2.2rem 2rem 1.4rem;
    text-align: center;
    color: #fff;
    position: relative;
}

.login-card .login-header::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--vs-orange), var(--vs-orange-light));
}

.login-card .login-header img {
    height: 44px;
    margin-bottom: 12px;
    background: #fff;
    padding: 7px 11px;
    border-radius: 9px;
}

.login-card .login-header p {
    font-size: 0.85rem;
    color: #cdd6f5;
    margin: 6px 0 0;
}

.login-card .card-body {
    padding: 1.9rem 2rem 2.1rem;
}

.login-card .btn-primary {
    width: 100%;
}
