/*
 * ╔════════════════════════════════════════════════════════════╗
 * ║  Lions Platform Elite Topbar Styles (Freya Design System)      ║
 * ║  Modern, Professional, Responsive                          ║
 * ╚════════════════════════════════════════════════════════════╝
 */

/* ═══════════════════════════════════════════════════════════ */
/* BASE TOPBAR                                                  */
/* ═══════════════════════════════════════════════════════════ */

.unionflow-elite,
.lions-elite {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-600) 100%);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    position: relative;
    z-index: 1000;
}

.unionflow-elite::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--primary-300) 50%,
        transparent 100%);
    opacity: 0.5;
}

/* App Version Badge */
.app-version {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    margin-left: 0.75rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

/* ═══════════════════════════════════════════════════════════ */
/* SEARCH                                                       */
/* ═══════════════════════════════════════════════════════════ */

.search-item .topbar-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-item:hover .topbar-icon {
    transform: scale(1.1);
    color: var(--primary-100);
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--surface-border);
}

.search-item:hover .search-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-wrapper-elite {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--surface-50);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--surface-border);
    transition: all 0.3s ease;
}

.search-wrapper-elite:focus-within {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.search-wrapper-elite .pi-search {
    color: var(--text-color-secondary);
    font-size: 1rem;
}

.search-wrapper-elite .search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.search-wrapper-elite .search-input:focus {
    outline: none;
    box-shadow: none;
}

/* ═══════════════════════════════════════════════════════════ */
/* NOTIFICATIONS                                                */
/* ═══════════════════════════════════════════════════════════ */

.notifications-item {
    position: relative;
}

.badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 360px;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--surface-border);
    overflow: hidden;
}

.notifications-item:hover .notifications-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--surface-50);
    border-bottom: 1px solid var(--surface-border);
}

.count-label {
    font-size: 0.75rem;
    color: var(--text-color-secondary);
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-weight: 600;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.notif-item:hover {
    background: var(--surface-50);
}

.notif-item i {
    font-size: 1.25rem;
    margin-top: 0.25rem;
}

.notif-title {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.notif-time {
    font-size: 0.75rem;
    color: var(--text-color-secondary);
}

.notif-footer {
    padding: 0.75rem 1.25rem;
    text-align: center;
    border-top: 1px solid var(--surface-border);
    background: var(--surface-50);
}

.notif-footer a {
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.notif-footer a:hover {
    color: var(--primary-600);
}

/* ═══════════════════════════════════════════════════════════ */
/* USER PROFILE                                                 */
/* ═══════════════════════════════════════════════════════════ */

.elite-user .profile-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.875rem;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.elite-user .profile-trigger:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.avatar-container {
    position: relative;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 2px solid rgba(255,255,255,0.3);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-600) 100%);
}

.status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid white;
}

.status-dot.online {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2); }
    50% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.4); }
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    line-height: 1.2;
}

.role-badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.5rem;
    background: rgba(255,255,255,0.25);
    border-radius: 8px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.session-timer {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.icon-sm {
    font-size: 0.7rem;
}

.timer-text {
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.arrow {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.8);
    transition: transform 0.3s ease;
}

.elite-user:hover .arrow {
    transform: rotate(180deg);
}

/* ═══════════════════════════════════════════════════════════ */
/* USER DROPDOWN MENU                                           */
/* ═══════════════════════════════════════════════════════════ */

.elite-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 340px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--surface-border);
    overflow: hidden;
}

.elite-user:hover .elite-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Dropdown Header */
.dropdown-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--surface-50) 100%);
    border-bottom: 1px solid var(--surface-border);
}

.header-content {
    display: flex;
    gap: 1rem;
}

.header-avatar {
    position: relative;
}

.avatar-lg {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-indicator.online {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.status-indicator i {
    font-size: 6px;
    color: white;
}

.header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    justify-content: center;
}

.header-info .name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.3;
}

.header-info .email {
    font-size: 0.75rem;
    color: var(--text-color-secondary);
    line-height: 1.3;
}

.role-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.625rem;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-600) 100%);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
    margin-top: 0.25rem;
}

/* Session Card */
.session-card {
    padding: 1rem 1.25rem;
    background: var(--surface-50);
    border-bottom: 1px solid var(--surface-border);
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-row .label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-color-secondary);
    font-weight: 500;
}

.info-row .label i {
    font-size: 0.875rem;
}

.info-row .value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Progress Bar */
.progress-container {
    margin-top: 0.5rem;
}

.progress-bar {
    height: 6px;
    background: var(--surface-200);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green-400) 0%, var(--green-500) 100%);
    border-radius: 10px;
    transition: width 1s ease, background 0.3s ease;
}

.progress-fill[style*="width: 0%"],
.progress-fill[style*="width: 1%"],
.progress-fill[style*="width: 2%"],
.progress-fill[style*="width: 3%"],
.progress-fill[style*="width: 4%"],
.progress-fill[style*="width: 5%"] {
    background: linear-gradient(90deg, var(--red-400) 0%, var(--red-500) 100%);
}

.progress-label {
    font-size: 0.625rem;
    color: var(--text-color-secondary);
    margin-top: 0.375rem;
    text-align: right;
    font-weight: 500;
}

/* Menu Sections */
.divider {
    height: 1px;
    background: var(--surface-border);
    margin: 0;
}

.menu-section {
    padding: 0.75rem 0;
}

.menu-section.compact {
    padding: 0.5rem 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-color-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1.25rem 0.75rem;
}

.section-items {
    display: flex;
    flex-direction: column;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.menu-item:hover {
    background: var(--surface-100);
}

.menu-item i:first-child {
    font-size: 1rem;
    color: var(--text-color-secondary);
    transition: all 0.2s ease;
}

.menu-item:hover i:first-child {
    color: var(--primary-color);
    transform: translateX(2px);
}

.menu-item span {
    flex: 1;
    font-weight: 500;
}

.arrow-right {
    font-size: 0.75rem;
    color: var(--text-color-secondary);
    margin-left: auto;
    transition: transform 0.2s ease;
}

.menu-item:hover .arrow-right {
    transform: translateX(3px);
}

.item-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.375rem;
    background: var(--primary-color);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 10px;
    margin-left: auto;
}

.value-badge {
    font-size: 0.75rem;
    color: var(--text-color-secondary);
    background: var(--surface-100);
    padding: 0.25rem 0.625rem;
    border-radius: 8px;
    font-weight: 600;
    margin-left: auto;
}

/* Logout Section */
.logout-divider {
    background: linear-gradient(90deg,
        transparent 0%,
        var(--red-200) 50%,
        transparent 100%);
    height: 2px;
}

.logout-section {
    padding: 0.75rem 0;
    background: linear-gradient(to bottom, white 0%, var(--red-50) 100%);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    color: var(--red-600);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.logout-btn:hover {
    background: var(--red-100);
    color: var(--red-700);
}

.logout-btn i:first-child {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.logout-btn:hover i:first-child {
    transform: scale(1.1) rotate(-10deg);
}

.logout-btn .pi-lock {
    font-size: 0.875rem;
}

/* ═══════════════════════════════════════════════════════════ */
/* LOGOUT DIALOG                                                */
/* ═══════════════════════════════════════════════════════════ */

.elite-dialog .dialog-content {
    text-align: center;
    padding: 1.5rem 1rem;
}

.icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red-50) 0%, var(--red-100) 100%);
    margin-bottom: 1.5rem;
}

.icon-lg {
    font-size: 2.5rem;
    color: var(--red-500);
}

.dialog-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.info-box {
    background: var(--surface-50);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--surface-border);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem;
    color: var(--text-color);
    font-size: 0.875rem;
}

.info-item i {
    color: var(--primary-color);
    font-size: 1rem;
}

.warning-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-color-secondary);
    margin: 0;
}

.warning-text i {
    color: var(--blue-500);
}

.dialog-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1rem;
}

/* ═══════════════════════════════════════════════════════════ */
/* UTILITY CLASSES                                              */
/* ═══════════════════════════════════════════════════════════ */

.text-green-600 { color: #059669 !important; }
.text-yellow-600 { color: #d97706 !important; }
.text-orange-600 { color: #ea580c !important; }
.text-red-600 { color: #dc2626 !important; }

/* ═══════════════════════════════════════════════════════════ */
/* RESPONSIVE                                                   */
/* ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .app-version { display: none; }
    .user-info { display: none; }
    .elite-dropdown { min-width: 300px; }
    .search-dropdown { min-width: 280px; }
}
