/* ============================================================
   CTP Realty — Admin: Navbar
   Paleta: Azul marino #0F2167, Dorado #F5C518
   Fuentes: Montserrat + DM Sans
   ============================================================ */

/* ── NAVBAR BASE ── */
.navbar-vms {
    background: var(--navy-dark, #091547);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 16px rgba(9,21,71,0.35);
}

/* ── BRAND ── */
.navbar-brand-vms {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--white, #FFFFFF) !important;
    letter-spacing: -0.3px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: rgba(245,197,24,0.15);
    border: 1px solid rgba(245,197,24,0.25);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Si no hay imagen, el ícono de Bootstrap Icons */
.brand-icon i {
    color: var(--gold, #F5C518);
    font-size: 1rem;
}

.brand-text {
    display: inline-block;
    line-height: 1;
}

/* Punto dorado decorativo en el nombre */
.brand-text::after {
    content: '.';
    color: var(--gold, #F5C518);
}

/* ── TOGGLER (mobile) ── */
.navbar-toggler {
    border: 1.5px solid rgba(255,255,255,0.15);
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    transition: background 0.15s;
}

.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(245,197,24,0.2); }

.navbar-toggler:hover { background: rgba(255,255,255,0.06); }

.navbar-toggler-icon {
    width: 1.1em;
    height: 1.1em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ── NAV LINKS ── */
.nav-link-vms {
    color: rgba(255,255,255,0.5) !important;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 0.82rem;
    padding: 0.45rem 0.85rem !important;
    border-radius: 8px;
    transition: color 0.18s ease, background 0.18s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.nav-link-vms i {
    font-size: 0.88rem;
    opacity: 0.7;
    transition: opacity 0.18s;
}

.nav-link-vms:hover {
    color: rgba(255,255,255,0.9) !important;
    background: rgba(255,255,255,0.07);
}

.nav-link-vms:hover i { opacity: 1; }

/* Estado activo: pill dorado */
.nav-link-vms.active {
    color: var(--navy-dark, #091547) !important;
    background: var(--gold, #F5C518) !important;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.nav-link-vms.active i { opacity: 1; }

/* ── USER SECTION ── */
.navbar-user-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Pill con nombre de usuario */
.user-pill {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 0.4rem 0.9rem;
    border-radius: 100px;
    color: rgba(255,255,255,0.65);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
    white-space: nowrap;
}

.user-pill i {
    font-size: 0.9rem;
    color: var(--gold, #F5C518);
    opacity: 0.85;
}

.user-pill:hover {
    background: rgba(255,255,255,0.12);
    color: var(--white, #fff);
    border-color: rgba(255,255,255,0.2);
}

.user-name { display: inline-block; }

/* Botón logout */
.btn-logout {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    padding: 0.4rem 0.65rem;
    border-radius: 8px;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-logout:hover {
    background: rgba(220,38,38,0.15);
    border-color: rgba(220,38,38,0.35);
    color: #f87171;
}

/* ── DIVIDER VERTICAL entre nav y user ── */
.navbar-divider {
    width: 1px;
    height: 22px;
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
}

/* ────────────────────────────────────────
   RESPONSIVE
──────────────────────────────────────── */
@media (max-width: 991.98px) {
    .navbar-vms { padding: 0.65rem 0; }

    .navbar-brand-vms { font-size: 1rem; }

    .brand-icon { width: 32px; height: 32px; }

    .navbar-collapse {
        margin-top: 0.85rem;
        padding-top: 0.85rem;
        border-top: 1px solid rgba(255,255,255,0.08);
    }

    .navbar-nav {
        margin-left: 0 !important;
        gap: 0.25rem;
    }

    .nav-link-vms {
        padding: 0.6rem 0.85rem !important;
        font-size: 0.85rem;
    }

    .navbar-user-section {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        margin-top: 0.85rem;
        padding-top: 0.85rem;
        border-top: 1px solid rgba(255,255,255,0.08);
    }

    .navbar-divider { display: none; }

    .user-pill {
        justify-content: flex-start;
        padding: 0.6rem 1rem;
        border-radius: 8px;
    }

    .btn-logout {
        width: 100%;
        padding: 0.6rem 1rem;
        justify-content: center;
        gap: 0.5rem;
        border-radius: 8px;
    }

    .btn-logout::after {
        content: 'Cerrar Sesión';
        font-family: 'DM Sans', sans-serif;
        font-size: 0.82rem;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand-vms { font-size: 0.95rem; }
    .brand-icon { width: 30px; height: 30px; }

    .user-name {
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}