/* --- APP HEADER --- */
.global-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.digital-clock {
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    margin-top: -12px;
    margin-bottom: 5px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo i { font-size: 1.8rem; color: var(--primary); }
.header-titles h2 { font-size: 1.1rem; font-weight: 700; }

.notif-bell {
    position: relative;
    font-size: 1.4rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-panel);
}



/* --- BOTTOM NAV (ESTILO GEOMÉTRICO) --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #111827; /* Fondo más oscuro para contraste */
    display: flex;
    justify-content: space-around;
    padding: 5px 0 calc(5px + env(safe-area-inset-bottom, 10px));
    border-top: 1px solid var(--border-color);
    border-radius: 0;
    z-index: 9000;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.5);
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-family: inherit;
    cursor: pointer;
}

.nav-item i { font-size: 1.4rem; }
.nav-item span { font-size: 0.7rem; font-weight: 600; }
.nav-item.active { color: var(--primary); }



/* --- TAB SYSTEM --- */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    /* min-height en px para evitar bug de Chrome con vh dentro de flex:1 containers */
    min-height: 600px;
}

/* Asegurar que el contenido de admin/perfil sea siempre visible */
#admin-section .profile-card, 
#superadmin-section .profile-card,
#stats-view .profile-card,
#perfil-section .profile-card {
    display: block !important;
    min-height: 100px;
    overflow: visible !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.app-header.global-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(15, 23, 42, 0.8);
}

.notif-bell {
    position: relative;
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--primary-light);
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.notif-bell:hover {
    color: var(--primary);
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 1px solid var(--bg-dark);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
}

#notif-btn.has-notifs i {
    color: #ef4444 !important;
    filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.4));
    animation: bell-pulse 2s infinite;
}

#notif-btn.has-notifs #notif-badge {
    display: none;
}

@keyframes bell-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.notif-panel {
    position: absolute;
    top: 45px;
    right: 0;
    width: 300px;
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 1000;
    overflow: hidden;
    transform-origin: top right;
    animation: scaleIn 0.2s ease-out;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.notif-panel-header {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary);
}

.notif-list {
    max-height: 350px;
    overflow-y: auto;
}

.notif-empty {
    padding: 30px 15px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.notif-item {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    transition: 0.2s;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notif-item-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
}

.notif-item-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notif-item-time {
    font-size: 0.7rem;
    color: var(--primary-light);
    opacity: 0.7;
}



/* --- HEADER ACTIONS --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-username {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primary-light);
    margin-right: 4px;
    line-height: 1; /* Forzar centrado vertical */
}



/* --- HEADER SUBTITLE --- */
.header-eyebrow {
    font-size: 0.55rem;
    opacity: 0.7;
    display: block;
    letter-spacing: 1.5px;
    font-weight: 800;
    text-transform: uppercase;
}



/* --- HEADER CLUB NAME --- */
.club-name-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-light);
}



/* --- SEGMENTED CONTROL (V4.1.0) --- */
.segmented-control {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    background: transparent;
    border: none;
    margin-top: 6px;
}
.segmented-control input[type="radio"] {
    display: none;
}
.segmented-control label {
    flex: 1;
    text-align: center;
    padding: 6px 16px;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.segmented-control label i {
    font-size: 1rem;
    opacity: 0.7;
}
.segmented-control input:checked + label {
    background: color-mix(in srgb, var(--primary) 15%, transparent);
    border-color: var(--primary);
    color: var(--primary);
}
.segmented-control input:checked + label i {
    opacity: 1;
}
.segmented-control label:hover:not(input:checked + label) {
    background: rgba(255,255,255,0.03);
    color: var(--text-color);
}
