/* ============================================================
   PORTAL COFRADE — Dedicated CSS
   ============================================================ */

/* ── Top Navigation ── */
.portal-topnav {
    height: 68px;
    background: linear-gradient(135deg, var(--primary), var(--primary-mid));
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,.2);
}

.portal-brand {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: .5px;
    min-width: 0;
    flex-shrink: 1;
}
.portal-brand > div:first-child {
    min-width: 0;
}
.portal-brand > div:first-child > div:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    font-size: .95rem;
}
.portal-brand > div:first-child > div:last-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.portal-nav-links a {
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-weight: 600;
    font-size: .88rem;
    padding: 6px 14px;
    border-radius: 8px;
    transition: background var(--speed), color var(--speed);
}

.portal-nav-links a:hover,
.portal-nav-links a.active {
    color: #fff;
    background: rgba(255,255,255,.1);
}

.portal-user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.8);
    font-weight: 600;
    font-size: .88rem;
    padding: 5px 10px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,.15);
    transition: background var(--speed), color var(--speed);
}

.portal-user-btn:hover {
    background: rgba(255,255,255,.1);
    color: #fff;
}

.portal-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #B8882E);
    color: #1a1a1a;
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(212,165,83,.4);
}

/* ── Content area ── */
.portal-content {
    max-width: 100%;
    margin: 0;
    padding: 36px 40px;
}

/* ── Responsive navbar ── */

/* Evitar que el texto desborde el botón de usuario */
.portal-topnav .user-menu-btn {
    min-width: 0;
    flex-shrink: 0;
    max-width: 220px;
}
.portal-topnav .user-menu-btn > div {
    min-width: 0;
    overflow: hidden;
}
.portal-topnav .user-name,
.portal-topnav .user-role {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
    display: block;
}

/* Zona izquierda ocupa espacio disponible sin empujar al botón de usuario */
.portal-topnav > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    align-items: center;
}
.portal-topnav > .dropdown {
    flex-shrink: 0;
    margin-left: 12px;
}
/* Forzar altura fija del topnav */
.portal-topnav {
    flex-wrap: nowrap !important;
}

@media (max-width: 767px) {
    .portal-topnav {
        padding: 0 16px;
        height: 60px;
    }
    .portal-content {
        padding: 20px 16px;
    }
    .portal-topnav .user-menu-btn .user-name,
    .portal-topnav .user-menu-btn .user-role {
        display: none !important;
    }
    .portal-topnav .user-menu-btn {
        gap: 6px;
        padding: 4px 8px;
        max-width: none;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .portal-topnav {
        padding: 0 20px;
    }
    .portal-content {
        padding: 28px 24px;
    }
    .portal-topnav .user-menu-btn .user-role {
        display: none !important;
    }
    .portal-topnav .user-menu-btn .user-name {
        display: block !important;
        font-size: .82rem;
        max-width: 120px;
    }
}

@media (min-width: 992px) {
    .portal-topnav .user-menu-btn .user-name,
    .portal-topnav .user-menu-btn .user-role {
        display: block !important;
    }
}

/* ── Registration section ── */
.registro-body {
    background: var(--bg);
    min-height: 100vh;
}

/* ── Editor Visual Cofrade Overrides ── */
.ev-cofrade-label {
    color: rgba(255, 255, 255, 0.75);
}
.ev-cofrade-num {
    color: var(--accent);
}
.ev-card-cofrade-label {
    /* Utiliza clase de bootstrap text-muted por defecto */
}
.ev-card-cofrade-num {
    /* Utiliza clase de bootstrap text-dark por defecto */
}
