/* ==================================================
   NAVBAR - Matching Hero/CTA Navy Theme
   ================================================== */

/* ==================================================
   NAVBAR HEIGHT TOKEN
   Used by sticky elements below the navbar (e.g. compact-controls-bar).
   Update this value if the navbar height changes.
   ================================================== */
:root {
    --navbar-height: 73px;
}

/* ==================================================
   NAVBAR SCOPE RESET - Override base.css bleeding
   ================================================== */
.navbar {
    /* Navy gradient matching hero top and CTA */
    background: linear-gradient(135deg,
        var(--navy-darkest) 0%,
        var(--navy-dark) 50%,
        var(--navy-main) 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); /* Reduced shadow */
    padding: var(--spacing-sm) 0; /* Using token */
    /* STICKY POSITIONING */
    position: sticky !important;
    top: 0 !important;
    z-index: 1030 !important;
    transition: all 0.25s ease; /* Faster transition */
}

/* Ensure navbar dropdowns appear above most content but below toasts */
.navbar .dropdown-menu {
    z-index: 1035 !important;
    position: absolute !important;
}

/* Optional: Compact style when scrolled */
.navbar.scrolled {
    padding: var(--spacing-xs) 0; /* Using token */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); /* Reduced shadow */
    backdrop-filter: blur(8px); /* Reduced blur */
}

.navbar.scrolled .navbar-logo {
    width: 36px; /* Reduced from 42px */
    height: 36px; /* Reduced from 42px */
}

/* Subtle bottom glow */
.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 0.75px; /* Thinner line */
    background: linear-gradient(90deg,
        transparent,
        rgba(91, 163, 208, 0.25), /* Reduced opacity */
        transparent);
    pointer-events: none;
}

.navbar-brand {
    font-size: var(--font-size-xl); /* Using token */
    font-weight: 700;
    color: white !important;
    display: flex;
    align-items: center;
    transition: all 0.25s ease; /* Faster transition */
}

.navbar-brand:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3)); /* Reduced glow */
}

/* White logo styling - no filter needed */
.navbar-logo {
    width: 44px; /* Reduced from 50px */
    height: 44px; /* Reduced from 50px */
    object-fit: contain;
    vertical-align: middle;
    transition: all 0.25s ease; /* Faster transition */
}

.navbar-logo:hover {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4)); /* Reduced glow */
}

/* Navigation links */
.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    margin: 0 var(--spacing-sm); /* Using token */
    padding: var(--spacing-sm) var(--spacing-lg) !important; /* Using tokens */
    transition: all 0.25s ease; /* Faster transition */
    position: relative;
    font-size: var(--font-size-sm); /* Using token */
}

/* Underline effect on hover */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0%;
    height: 1.5px; /* Reduced from 2px */
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.5), /* Reduced opacity */
        rgba(91, 163, 208, 0.7)); /* Reduced opacity */
    transition: width 0.25s ease; /* Faster transition */
}

.nav-link:hover {
    color: white !important;
}

.nav-link:hover::after {
    width: 70%; /* Reduced from 80% */
}

.nav-link.active {
    color: white !important;
}

.nav-link.active::after {
    width: 70%; /* Reduced from 80% */
}

/* Override Bootstrap's btn-outline-light styles */
.navbar .btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
}

.navbar .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

/* Remove the white background from Bootstrap's default hover */
.navbar .btn-outline-light:not(:hover) {
    background: transparent !important;
}

/* Remove the white background from Bootstrap's default hover */
.navbar .btn-outline-light:not(:hover) {
    background: transparent !important;
}

/* User dropdown */
.user-dropdown .dropdown-toggle {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-lg); /* Using tokens */
    background: rgba(255, 255, 255, 0.08);
    border: 0.75px solid rgba(255, 255, 255, 0.2); /* Thinner border */
    border-radius: 20px; /* Reduced from 25px */
    transition: all 0.25s ease; /* Faster transition */
    font-size: var(--font-size-sm); /* Using token */
}

.user-dropdown .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35); /* Reduced opacity */
    color: white !important;
}

.user-dropdown .dropdown-toggle::after {
    margin-left: var(--spacing-sm); /* Using token */
}

/* Dropdown menu */
.user-dropdown .dropdown-menu {
    background: rgba(10, 37, 64, 0.98);
    backdrop-filter: blur(8px); /* Reduced blur */
    border: 0.75px solid rgba(255, 255, 255, 0.15); /* Thinner border */
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.35), /* Reduced shadow */
        0 2px 8px rgba(0, 0, 0, 0.2); /* Reduced shadow */
    border-radius: 10px; /* Reduced from 12px */
    margin-top: var(--spacing-sm); /* Using token */
    padding: var(--spacing-sm); /* Using token */
}

.user-dropdown .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
    padding: var(--spacing-md) var(--spacing-lg); /* Using tokens */
    border-radius: 6px; /* Reduced from 8px */
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: var(--font-size-sm); /* Using token */
}

.user-dropdown .dropdown-item:hover {
    background: linear-gradient(135deg, var(--navy-main), var(--navy-lighter));
    color: white;
    transform: translateX(3px); /* Reduced from 4px */
}

.user-dropdown .dropdown-item i {
    margin-right: var(--spacing-sm); /* Using token */
    opacity: 0.8;
    font-size: 0.9rem; /* Reduced from 1rem */
}

.user-dropdown .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.15);
    margin: var(--spacing-sm) 0; /* Using token */
}

/* Override Bootstrap's .text-muted for user dropdown */
.user-dropdown .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
    opacity: 1 !important;
}

/* Collaboration dropdown - EXACT SAME styling as user dropdown */
.collab-dropdown .dropdown-toggle {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-lg); /* Using tokens */
    background: rgba(255, 255, 255, 0.08);
    border: 0.75px solid rgba(255, 255, 255, 0.2); /* Thinner border */
    border-radius: 20px; /* Reduced from 25px */
    transition: all 0.25s ease; /* Faster transition */
    font-size: var(--font-size-sm); /* Using token */
}

.collab-dropdown .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35); /* Reduced opacity */
    color: white !important;
}

.collab-dropdown .dropdown-toggle::after {
    margin-left: var(--spacing-sm); /* Using token */
}

/* Collaboration dropdown menu - matching user dropdown */
.collab-dropdown .dropdown-menu {
    background: rgba(10, 37, 64, 0.98);
    backdrop-filter: blur(8px); /* Reduced blur */
    border: 0.75px solid rgba(255, 255, 255, 0.15); /* Thinner border */
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.35), /* Reduced shadow */
        0 2px 8px rgba(0, 0, 0, 0.2); /* Reduced shadow */
    border-radius: 10px; /* Reduced from 12px */
    margin-top: var(--spacing-sm); /* Using token */
    padding: var(--spacing-sm); /* Using token */
    min-width: 260px; /* Reduced from 300px */
}

.collab-dropdown .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
    padding: var(--spacing-md) var(--spacing-lg); /* Using tokens */
    border-radius: 6px; /* Reduced from 8px */
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: var(--font-size-sm); /* Using token */
}

.collab-dropdown .dropdown-item:hover {
    background: linear-gradient(135deg, var(--navy-main), var(--navy-lighter));
    color: white;
    transform: translateX(3px); /* Reduced from 4px */
}

.collab-dropdown .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.15);
    margin: var(--spacing-sm) 0; /* Using token */
}

.collab-dropdown .dropdown-header {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: var(--font-size-base); /* Using token */
}

/* ==================================================
   GLOBAL PRESENCE INDICATOR - Enhanced Styles
   ================================================== */

/* Presence activity text */
.presence-activity {
    color: rgba(255, 255, 255, 0.75);
    font-size: var(--font-size-xs); /* Using token */
    margin-top: var(--spacing-xs); /* Using token */
    font-style: italic;
}

/* Presence firm info */
.presence-firm {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--font-size-xs); /* Using token */
    margin-top: var(--spacing-xs); /* Using token */
}

/* Presence timestamp */
.presence-timestamp {
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--font-size-xs); /* Using token */
    margin-top: var(--spacing-xs); /* Using token */
}

/* Presence user item hover in dropdown */
.presence-user-item {
    padding: var(--spacing-md) var(--spacing-lg); /* Using tokens */
    border-radius: 6px; /* Reduced from 8px */
    transition: all 0.2s ease;
    margin-bottom: var(--spacing-xs); /* Using token */
}

.presence-user-item:hover {
    background: linear-gradient(135deg, rgba(45, 122, 175, 0.15), rgba(64, 143, 196, 0.1));
    transform: translateX(2px); /* Reduced from 3px */
}

/* Make clickable items have pointer cursor */
.presence-user-item[onclick] {
    cursor: pointer;
}

.presence-user-item[onclick]:hover {
    background: linear-gradient(135deg, rgba(45, 122, 175, 0.25), rgba(64, 143, 196, 0.15));
}

/* Avatar for presence users */
.presence-user-avatar {
    width: 28px; /* Reduced from 32px */
    height: 28px; /* Reduced from 32px */
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy-main), var(--navy-lighter));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--font-size-xs); /* Using token */
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.25); /* Reduced from 2px */
    flex-shrink: 0;
}

/* Username styling */
.presence-user-name {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    font-size: var(--font-size-sm); /* Using token */
}

/* ==================================================
   ROLE BADGES - Unified Team Role Badges
   ================================================== */

.team-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.7rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    color: white;
    border: 1px solid;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.team-role-badge i { font-size: 0.72rem; }

.team-role-badge.team-role-primary_owner {
    background: linear-gradient(135deg, rgba(245,158,11,0.85), rgba(217,119,6,0.85));
    border-color: rgba(245,158,11,0.35);
    box-shadow: 0 2px 8px rgba(245,158,11,0.2);
}
.team-role-badge.team-role-primary_owner i { color: #fcd34d; }

.team-role-badge.team-role-co_owner {
    background: linear-gradient(135deg, rgba(217,119,6,0.85), rgba(180,83,9,0.85));
    border-color: rgba(217,119,6,0.35);
    box-shadow: 0 2px 8px rgba(217,119,6,0.2);
}
.team-role-badge.team-role-co_owner i { color: #fbbf24; }

/* legacy 'owner' alias = same colours as primary_owner */
.team-role-badge.team-role-owner {
    background: linear-gradient(135deg, rgba(245,158,11,0.85), rgba(217,119,6,0.85));
    border-color: rgba(245,158,11,0.35);
    box-shadow: 0 2px 8px rgba(245,158,11,0.2);
}
.team-role-badge.team-role-owner i { color: #fcd34d; }

.team-role-badge.team-role-admin {
    background: linear-gradient(135deg, rgba(139,92,246,0.85), rgba(124,58,237,0.85));
    border-color: rgba(139,92,246,0.35);
    box-shadow: 0 2px 8px rgba(139,92,246,0.2);
}
.team-role-badge.team-role-admin i { color: #c4b5fd; }

.team-role-badge.team-role-editor {
    background: linear-gradient(135deg, rgba(59,130,246,0.85), rgba(37,99,235,0.85));
    border-color: rgba(59,130,246,0.35);
    box-shadow: 0 2px 8px rgba(59,130,246,0.2);
}
.team-role-badge.team-role-editor i { color: #93c5fd; }

.team-role-badge.team-role-viewer {
    background: linear-gradient(135deg, rgba(107,114,128,0.85), rgba(75,85,99,0.85));
    border-color: rgba(107,114,128,0.35);
    box-shadow: 0 2px 8px rgba(107,114,128,0.15);
}
.team-role-badge.team-role-viewer i { color: #d1d5db; }

/* ==================================================================================
   GLOBAL PRESENCE DROPDOWN - SQUARE COMPACT VARIANT
   ================================================================================== */

/* Square 22×22 icon-only override — presence dropdown only */
#globalPresenceDropdown .presence-user-item .team-role-badge,
#globalPresenceUserList .presence-user-item .team-role-badge,
.navbar .presence-user-item .team-role-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    padding: 0 !important;
    border-radius: 5px !important;
    font-size: 0.75rem !important;
    border-width: 0.75px !important;
    border-color: rgba(255,255,255,0.2) !important;
    backdrop-filter: blur(3px) !important;
    margin-left: var(--spacing-xs, 0.25rem) !important;
    gap: 0 !important;
    transition: all 0.25s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Hide text label inside square badges — icon only */
#globalPresenceDropdown .presence-user-item .team-role-badge span,
#globalPresenceUserList .presence-user-item .team-role-badge span,
.navbar .presence-user-item .team-role-badge span {
    display: none !important;
}

/* Icon centered inside the square */
#globalPresenceDropdown .presence-user-item .team-role-badge i,
#globalPresenceUserList .presence-user-item .team-role-badge i,
.navbar .presence-user-item .team-role-badge i {
    font-size: 0.7rem !important;
    margin: 0 !important;
    line-height: 1 !important;
}

/* Tooltip offset for compact badge height */
#globalPresenceDropdown .presence-user-item .team-role-badge:hover::after {
    bottom: -22px;
    padding: 3px 6px;
    font-size: 0.7rem;
}

/* ==================================================
   STATUS DOTS - Online/Idle Indicators
   ================================================== */

.status-dot {
    display: inline-block;
    width: 7px; /* Reduced from 8px */
    height: 7px; /* Reduced from 8px */
    border-radius: 50%;
    margin-right: var(--spacing-xs); /* Using token */
    flex-shrink: 0;
}

/* Active user - Green dot with pulse */
.status-dot.status-active {
    background-color: #4ade80;
    box-shadow: 0 0 3px rgba(74, 222, 128, 0.5); /* Reduced shadow */
    animation: pulse-dot 1.6s ease-in-out infinite; /* Faster animation */
}

/* Idle user - Yellow/orange dot */
.status-dot.status-idle {
    background-color: #fbbf24;
    box-shadow: 0 0 3px rgba(251, 191, 36, 0.3); /* Reduced shadow */
}

/* ==================================================
   CURRENT USER HIGHLIGHT
   ================================================== */

.presence-user-item.current-user {
    background: rgba(59, 130, 246, 0.1);
    border-left: 2px solid rgba(59, 130, 246, 0.6); /* Reduced from 3px */
}

.presence-user-item.current-user .presence-user-avatar {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.25); /* Reduced shadow */
}

/* ==================================================
   NOTIFICATION BELL & DROPDOWN - Navy Blue Theme
   ================================================== */

/* Notification Bell Icon */
.notification-bell .nav-link {
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    border: 0.75px solid rgba(255, 255, 255, 0.2); /* Thinner border */
    border-radius: 50%;
    width: 36px; /* Reduced from 40px */
    height: 36px; /* Reduced from 40px */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease; /* Faster transition */
}

.notification-bell .nav-link::after {
    display: none !important;
}

.notification-bell .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35); /* Reduced opacity */
    transform: scale(1.08); /* Reduced from 1.1 */
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.12); /* Reduced shadow */
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, var(--error), #dc2626);
    color: white;
    border-radius: 8px; /* Reduced from 10px */
    padding: 1px 5px; /* Reduced padding */
    font-size: var(--font-size-xs); /* Using token */
    font-weight: 700;
    min-width: 16px; /* Reduced from 18px */
    text-align: center;
    box-shadow:
        0 1px 4px rgba(239, 68, 68, 0.4), /* Reduced shadow */
        0 0 0 1.5px rgba(10, 37, 64, 1); /* Reduced border */
}

/* Notification Dropdown Menu - Matching Navbar Dropdowns */
.notification-dropdown {
    background: rgba(10, 37, 64, 0.98);
    backdrop-filter: blur(8px); /* Reduced blur */
    border: 0.75px solid rgba(255, 255, 255, 0.15); /* Thinner border */
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.35), /* Reduced shadow */
        0 2px 8px rgba(0, 0, 0, 0.2); /* Reduced shadow */
    border-radius: 10px; /* Reduced from 12px */
    margin-top: var(--spacing-sm); /* Using token */
    padding: 0;
    overflow: hidden;
}

.notification-dropdown::-webkit-scrollbar {
    width: 6px; /* Reduced from 8px */
}

.notification-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px; /* Reduced from 10px */
}

.notification-dropdown::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--navy-main), #408fc4);
    border-radius: 8px; /* Reduced from 10px */
}

.notification-dropdown::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #408fc4, var(--navy-lighter));
}

/* Notification Header - Navy Blue Gradient */
.notification-dropdown .dropdown-header {
    background: linear-gradient(135deg, var(--navy-main), #2d7aaf, #408fc4);
    color: white;
    padding: var(--spacing-md) var(--spacing-lg); /* Using tokens */
    font-weight: 600;
    border-radius: 0;
    position: relative;
    box-shadow: 0 1px 4px rgba(26, 90, 142, 0.25); /* Reduced shadow */
    font-size: var(--font-size-sm); /* Using token */
}

.notification-dropdown .dropdown-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0.75px; /* Thinner line */
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.25), /* Reduced opacity */
        transparent);
}

.notification-dropdown .dropdown-header .btn-link {
    color: white !important;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s ease;
    font-size: var(--font-size-sm); /* Using token */
}

.notification-dropdown .dropdown-header .btn-link:hover {
    opacity: 1;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.4); /* Reduced glow */
}

/* Notification Divider */
.notification-dropdown .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.15);
    margin: 0;
}

/* Notification Items */
.notification-item {
    padding: var(--spacing-md) var(--spacing-lg); /* Using tokens */
    border-left: 2px solid transparent; /* Reduced from 3px */
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    background: rgba(10, 37, 64, 0.3);
}

.notification-item:not(:last-child) {
    border-bottom: 0.75px solid rgba(255, 255, 255, 0.08); /* Thinner border */
}

.notification-item:hover {
    background: linear-gradient(135deg,
        rgba(45, 122, 175, 0.2) 0%,
        rgba(64, 143, 196, 0.15) 100%);
    border-left-color: rgba(87, 169, 216, 0.5);
    transform: translateX(2px); /* Reduced from 3px */
}

/* Unread Notification Styling */
.notification-item.unread {
    background: linear-gradient(135deg,
        rgba(26, 90, 142, 0.15) 0%,
        rgba(45, 122, 175, 0.1) 100%);
    border-left-color: var(--navy-main);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px; /* Reduced from 3px */
    background: linear-gradient(135deg, var(--navy-main), #2d7aaf, #408fc4);
    box-shadow: 0 0 6px rgba(45, 122, 175, 0.4); /* Reduced shadow */
}

.notification-item.unread:hover {
    background: linear-gradient(135deg,
        rgba(45, 122, 175, 0.25) 0%,
        rgba(64, 143, 196, 0.2) 100%);
}

/* Notification Icon Container */
.notification-item .notification-icon {
    width: 34px; /* Reduced from 38px */
    height: 34px; /* Reduced from 38px */
    border-radius: 8px; /* Reduced from 10px */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem; /* Reduced from 1rem */
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); /* Reduced shadow */
    border: 0.75px solid rgba(255, 255, 255, 0.1); /* Thinner border */
}

/* Notification Content */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-message {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--font-size-sm); /* Using token */
    margin: 0;
    line-height: 1.4; /* Reduced from 1.5 */
}

.notification-time {
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--font-size-xs); /* Using token */
    margin-top: var(--spacing-xs); /* Using token */
    display: flex;
    align-items: center;
    gap: var(--spacing-sm); /* Using token */
}

/* ==================================================
   NOTIFICATION ACTION BUTTONS - Accept/Decline Invitations
   ================================================== */

/* Action buttons container */
.notification-actions {
    display: flex;
    flex-direction: row;
    gap: var(--spacing-sm); /* Using token */
    margin-top: var(--spacing-md); /* Using token */
    padding-top: var(--spacing-md); /* Using token */
    border-top: 0.75px solid rgba(255, 255, 255, 0.1); /* Thinner border */
}

/* Accept button - Green gradient matching success theme */
.btn-accept-invitation {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md); /* Using tokens */
    font-size: var(--font-size-xs); /* Using token */
    font-weight: 600;
    border-radius: 6px; /* Reduced from 8px */
    border: 0.75px solid rgba(16, 185, 129, 0.4); /* Thinner border */
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.15) 0%, 
        rgba(5, 150, 105, 0.15) 100%);
    color: var(--success);
    transition: all 0.25s ease; /* Faster transition */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs); /* Using token */
}

.btn-accept-invitation:hover {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    border-color: var(--success);
    transform: translateY(-1px); /* Reduced from -2px */
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25); /* Reduced shadow */
}

.btn-accept-invitation:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(16, 185, 129, 0.2); /* Reduced shadow */
}

.btn-accept-invitation i {
    font-size: 0.85rem; /* Reduced from 0.9rem */
}

/* Decline button - Subtle gray with hover to red */
.btn-decline-invitation {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md); /* Using tokens */
    font-size: var(--font-size-xs); /* Using token */
    font-weight: 600;
    border-radius: 6px; /* Reduced from 8px */
    border: 0.75px solid rgba(255, 255, 255, 0.2); /* Thinner border */
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.25s ease; /* Faster transition */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs); /* Using token */
}

.btn-decline-invitation:hover {
    background: linear-gradient(135deg, var(--error), #dc2626);
    color: white;
    border-color: var(--error);
    transform: translateY(-1px); /* Reduced from -2px */
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25); /* Reduced shadow */
}

.btn-decline-invitation:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(239, 68, 68, 0.2); /* Reduced shadow */
}

.btn-decline-invitation i {
    font-size: 0.85rem; /* Reduced from 0.9rem */
}

/* ==================================================
   LANGUAGE SELECTOR - Matching Navy Theme
   ================================================== */

.language-selector .dropdown-toggle {
    border: 0.75px solid rgba(255, 255, 255, 0.2) !important; /* Thinner border */
    background: rgba(255, 255, 255, 0.08) !important;
    transition: all 0.25s ease; /* Faster transition */
    border-radius: 50%;
    width: 36px; /* Reduced from 40px */
    height: 36px; /* Reduced from 40px */
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-selector .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.35) !important; /* Reduced opacity */
    transform: scale(1.08); /* Reduced from 1.1 */
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.12); /* Reduced shadow */
}

.language-selector .dropdown-toggle::after {
    display: none;
}

/* Dropdown menu matching navbar dropdowns */
.language-dropdown {
    background: rgba(10, 37, 64, 0.98);
    backdrop-filter: blur(8px); /* Reduced blur */
    border: 0.75px solid rgba(255, 255, 255, 0.15); /* Thinner border */
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.35), /* Reduced shadow */
        0 2px 8px rgba(0, 0, 0, 0.2); /* Reduced shadow */
    border-radius: 10px; /* Reduced from 12px */
    margin-top: var(--spacing-sm); /* Using token */
    min-width: 140px; /* Reduced from 160px */
    padding: var(--spacing-sm); /* Using token */
}

.language-dropdown .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
    padding: var(--spacing-md) var(--spacing-lg); /* Using tokens */
    border-radius: 6px; /* Reduced from 8px */
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-weight: 500;
    font-size: var(--font-size-sm); /* Using token */
}

.language-dropdown .dropdown-item:hover {
    background: linear-gradient(135deg, var(--navy-main), var(--navy-lighter));
    color: white;
    transform: translateX(3px); /* Reduced from 4px */
}

.language-dropdown .dropdown-item.active {
    background: linear-gradient(135deg, var(--navy-main), var(--navy-main));
    color: white;
    box-shadow: 0 1px 4px rgba(26, 90, 142, 0.25); /* Reduced shadow */
}

.language-dropdown .dropdown-item.active:hover {
    background: linear-gradient(135deg, var(--navy-main), #408fc4);
    color: white;
}

/* Override Bootstrap's .text-muted for language dropdown */
.language-dropdown .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
    opacity: 1 !important;
}

.flag-icon {
    font-size: 1rem; /* Reduced from 1.1rem */
    width: 18px; /* Reduced from 20px */
    text-align: center;
    margin-right: var(--spacing-sm); /* Using token */
}

/* Spinner matching navy theme */
.spinner {
    width: 36px; /* Reduced from 40px */
    height: 36px; /* Reduced from 40px */
    border: 3px solid rgba(91, 163, 208, 0.2); /* Reduced from 4px */
    border-top: 3px solid var(--navy-lighter); /* Reduced from 4px */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================================================
   THEME TOGGLE BUTTON - Matching other navbar icons
   ================================================== */
.theme-toggle .theme-toggle-btn {
    border: 0.75px solid rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    transition: all 0.25s ease;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    padding: 0;
}

.theme-toggle .theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.12);
}

.theme-toggle .theme-toggle-btn i {
    font-size: 1rem;
    transition: transform 0.25s ease;
}

.theme-toggle .theme-toggle-btn:active i {
    transform: rotate(15deg);
}

/* Light mode active state - button stays visible with sun icon */
body.light-mode .theme-toggle .theme-toggle-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

@media (max-width: 768px) {
    .theme-toggle .theme-toggle-btn {
        width: 32px;
        height: 32px;
    }
    
    .theme-toggle .theme-toggle-btn i {
        font-size: 0.9rem;
    }
}

/* CTA button in navbar */
.navbar .btn-primary {
    background: linear-gradient(135deg, var(--navy-main), var(--navy-lighter));
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.25); /* Reduced from 2px */
    padding: var(--spacing-sm) var(--spacing-xl); /* Using tokens */
    border-radius: 20px; /* Reduced from 25px */
    font-weight: 600;
    transition: all 0.25s ease; /* Faster transition */
    box-shadow: 0 2px 8px rgba(45, 122, 175, 0.25); /* Reduced shadow */
    font-size: var(--font-size-sm); /* Using token */
    height: var(--button-height-md); /* Using token */
}

.navbar .btn-primary:hover {
    background: linear-gradient(135deg, var(--navy-lighter), #7dbee0);
    border-color: rgba(255, 255, 255, 0.5); /* Reduced opacity */
    transform: translateY(-1px); /* Reduced from -2px */
    box-shadow: 0 4px 12px rgba(45, 122, 175, 0.3); /* Reduced shadow */
}

/* Mobile navbar toggler */
.navbar-toggler {
    border: 0.75px solid rgba(255, 255, 255, 0.25); /* Thinner border */
    padding: var(--spacing-sm) var(--spacing-md); /* Using tokens */
    transition: all 0.25s ease; /* Faster transition */
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.15rem rgba(255, 255, 255, 0.2); /* Reduced shadow */
}

/* Responsive adjustments */
@media (max-width: 991px) {
    /* Collapsed panel */
    .navbar-collapse {
        background: rgba(10, 37, 64, 0.98);
        backdrop-filter: blur(8px);
        margin-top: var(--spacing-md);
        padding: var(--spacing-lg);
        border-radius: 10px;
        border: 0.75px solid rgba(255, 255, 255, 0.15);
    }

    /* 2-column grid — items pair up naturally */
    .navbar-collapse .navbar-nav {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
        width: 100%;
    }

    /* Center content in each grid cell */
    .navbar-collapse .navbar-nav > .nav-item {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Text-heavy dropdowns span both columns, left-aligned */
    .navbar-collapse .collab-dropdown,
    .navbar-collapse .user-dropdown {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    /* Remove underline animation */
    .nav-link::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar-logo {
        width: 36px; /* Reduced from 40px */
        height: 36px; /* Reduced from 40px */
    }
    
    .navbar-brand {
        font-size: var(--font-size-lg); /* Using token */
    }
    
    .notification-bell .nav-link {
        width: 32px; /* Reduced from 35px */
        height: 32px; /* Reduced from 35px */
    }
    
    .notification-badge {
        font-size: var(--font-size-xs); /* Using token */
        padding: 1px 4px; /* Reduced padding */
    }
    
    .language-selector .dropdown-toggle {
        width: 32px; /* Reduced from 35px */
        height: 32px; /* Reduced from 35px */
    }
    
    .flag-icon {
        font-size: 0.95rem; /* Reduced from 1rem */
    }
}