/* CSS Update for Top Bar Layout */

/* Top Bar Container */
.top-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-color);
    color: white;
    padding: 0 20px;
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    /* Higher than sidebar */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Adjust Sidebar to sit below Top Bar with a gap */
.sidebar {
    top: 80px !important;
    /* Gap of 20px below 60px header */
    height: calc(100vh - 80px) !important;
    z-index: 1000;
}

/* Adjust Main Content to sit below Top Bar */
.main-content {
    margin-top: 60px;
    padding-top: 2rem;
}

/* Hide Sidebar Header since Logo is now in Top Bar */
.sidebar-header {
    display: none !important;
}

/* Top Bar Logo */
.top-bar-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    text-decoration: none;
}

.top-bar-logo img {
    height: 35px;
    width: auto;
}

.top-bar-logo i {
    font-size: 1.5rem;
}

/* Profile Circle */
.profile-section {
    position: relative;
}

.profile-circle {
    width: 40px;
    height: 40px;
    background-color: transparent;
    border: 2px solid white;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
}

.profile-circle:hover {
    background-color: white;
    color: var(--primary-color);
    transform: scale(1.05);
}

/* Profile Dropdown */
.profile-dropdown {
    position: absolute;
    top: 55px;
    /* Below circle */
    right: 0;
    width: 320px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: none;
    /* Hidden by default */
    border: 1px solid #e0e0e0;
    animation: dropdownFadeIn 0.2s ease-out;
    z-index: 3000;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-dropdown.show {
    display: block;
}

.dropdown-header {
    background: var(--primary-color);
    color: white;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.dropdown-avatar-large {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
}

.dropdown-user-info h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
}

.dropdown-user-info span {
    display: block;
    opacity: 0.9;
    font-size: 0.85rem;
    margin-top: 3px;
}

.dropdown-crown {
    position: absolute;
    right: 25px;
    top: 25px;
    color: var(--accent-color);
    font-size: 1.5rem;
}

.dropdown-body {
    padding: 20px 25px;
    color: #333;
}

.dropdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.dropdown-row:last-child {
    margin-bottom: 0;
}

.dropdown-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-weight: 600;
}

.dropdown-label i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.dropdown-value {
    font-weight: 500;
    color: #000;
}

.badge-admin {
    background: var(--accent-color);
    color: #000;
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.dropdown-footer {
    padding: 15px 25px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.footer-link {
    display: block;
    color: #444;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--primary-color);
}

.btn-dropdown-logout {
    display: block;
    width: 100%;
    padding: 10px;
    background: #fff0f1;
    color: var(--primary-color);
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    border: 1px solid #ffccd2;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-dropdown-logout:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}