/* =================================================================
   BWS Admin Navigation - Specialized Styles
   ================================================================= */

/* Navigation Styles */
.navbar-container {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(79, 70, 229, 0.3);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f9fafb !important;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.navbar-brand:hover {
    color: #6366f1 !important;
    background: rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

.navbar-brand i {
    color: #6366f1;
    margin-right: 0.5rem;
}

.navbar-toggler {
    border: 2px solid rgba(107, 114, 128, 0.3);
    border-radius: 8px;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.navbar-toggler:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    border-color: #6366f1;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28249, 250, 251, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-nav {
    align-items: center;
}

.navbar-nav .nav-item {
    margin: 0 0.25rem;
}

.navbar-nav .nav-link {
    color: #d1d5db !important;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.navbar-nav .nav-link:hover {
    color: #f9fafb !important;
    background: rgba(79, 70, 229, 0.2);
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    color: #6366f1 !important;
    background: rgba(79, 70, 229, 0.15);
    border: 1px solid rgba(79, 70, 229, 0.3);
}

.navbar-nav .nav-link i {
    font-size: 0.875rem;
    width: 16px;
    text-align: center;
}

/* Dropdown Styles */
.dropdown-menu {
    background: rgba(31, 41, 55, 0.95);
    border: 1px solid rgba(107, 114, 128, 0.3);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.dropdown-header {
    color: #6366f1;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(107, 114, 128, 0.2);
    margin-bottom: 0.5rem;
}

.dropdown-item {
    color: #d1d5db;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    background: rgba(79, 70, 229, 0.2);
    color: #f9fafb;
    transform: translateX(4px);
}

.dropdown-item:focus {
    background: rgba(79, 70, 229, 0.2);
    color: #f9fafb;
    outline: none;
}

.dropdown-item i {
    font-size: 0.875rem;
    width: 16px;
    text-align: center;
    margin-right: 0.5rem;
}

.logout-btn {
    border-top: 1px solid rgba(107, 114, 128, 0.2);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    color: #ef4444;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.dropdown-divider {
    border-color: rgba(107, 114, 128, 0.2);
    margin: 0.5rem 0;
}

/* User dropdown toggle */
.navbar-nav .dropdown-toggle::after {
    border-top-color: #d1d5db;
    margin-left: 0.5rem;
}

.navbar-nav .dropdown-toggle:hover::after {
    border-top-color: #f9fafb;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(31, 41, 55, 0.98);
        border-radius: 12px;
        padding: 1rem;
        margin-top: 1rem;
        border: 1px solid rgba(107, 114, 128, 0.3);
        backdrop-filter: blur(15px);
    }
    
    .navbar-nav .nav-link {
        margin: 0.25rem 0;
        border-radius: 8px;
    }
    
    .navbar-nav {
        gap: 0.5rem;
    }
    
    .dropdown-menu {
        position: static;
        background: rgba(17, 24, 39, 0.8);
        border: 1px solid rgba(107, 114, 128, 0.2);
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
        margin-top: 0.5rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .container-fluid {
        padding: 0 1rem;
    }
}

/* Animation for mobile menu */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-collapse.show {
    animation: slideDown 0.3s ease-out;
}

/* Active page indicator */
.navbar-nav .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 0 2px 2px 0;
}

/* Notification badge for future use */
.nav-link .badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.625rem;
    padding: 0.25rem 0.4rem;
}

/* Dark scrollbar for dropdown */
.dropdown-menu::-webkit-scrollbar {
    width: 4px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: rgba(17, 24, 39, 0.8);
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(107, 114, 128, 0.6);
    border-radius: 2px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 114, 128, 0.8);
}

/* =================================================================
   BWS Admin Navigation - Sidebar Styles
   ================================================================= */

/* Layout Styles */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.95) 0%, rgba(17, 24, 39, 0.95) 100%);
    backdrop-filter: blur(15px);
    border-right: 1px solid rgba(79, 70, 229, 0.2);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.2);
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(107, 114, 128, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    color: #f9fafb;
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-brand i {
    color: #6366f1;
    font-size: 1.5rem;
    min-width: 24px;
}

.brand-text {
    margin-left: 0.5rem;
    transition: all 0.3s ease;
}

.sidebar.collapsed .brand-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-toggle {
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 8px;
    color: #6366f1;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: rgba(79, 70, 229, 0.2);
    color: #4f46e5;
    transform: scale(1.05);
}

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-menu {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin: 0.25rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 0 25px 25px 0;
    margin-right: 1rem;
}

.nav-link:hover {
    background: rgba(79, 70, 229, 0.15);
    color: #f9fafb;
    transform: translateX(4px);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.2) 0%, rgba(99, 102, 241, 0.2) 100%);
    color: #6366f1;
    border-right: 3px solid #6366f1;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 0 2px 2px 0;
}

.nav-link i {
    font-size: 1.125rem;
    min-width: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.nav-text {
    margin-left: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    margin-left: 0;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 0.875rem;
    margin-right: 0;
    border-radius: 8px;
    margin: 0.25rem 0.5rem;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(107, 114, 128, 0.2);
    background: rgba(17, 24, 39, 0.5);
}

.user-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: rgba(31, 41, 55, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.user-info {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.125rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.user-details {
    min-width: 0;
    flex: 1;
}

.user-name {
    color: #f9fafb;
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    color: #6366f1;
    font-size: 0.75rem;
    font-weight: 500;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 0.5rem;
}

.action-btn {
    background: rgba(107, 114, 128, 0.2);
    border: 1px solid rgba(107, 114, 128, 0.3);
    border-radius: 6px;
    color: #d1d5db;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.action-btn:hover {
    background: rgba(79, 70, 229, 0.2);
    color: #6366f1;
    border-color: rgba(79, 70, 229, 0.4);
    transform: scale(1.05);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
}

.logout-form {
    margin: 0;
    padding: 0;
}

.sidebar.collapsed .user-details {
    display: none;
}

.sidebar.collapsed .user-menu {
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar.collapsed .user-actions {
    margin-left: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sidebar-collapsed .main-content {
    margin-left: 70px;
}

.content-wrapper {
    flex: 1;
    padding: 2rem;
    overflow-x: auto;
}

/* Toast Container */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

.toast-container .toast {
    pointer-events: auto;
    margin-bottom: 0.5rem;
    background: rgba(31, 41, 55, 0.95);
    border: 1px solid rgba(107, 114, 128, 0.3);
    border-radius: 8px;
    color: #f9fafb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-collapsed .main-content {
        margin-left: 0;
    }
    
    .content-wrapper {
        padding: 1rem;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
    }
}

/* Mobile Toggle Button */
@media (max-width: 768px) {
    .sidebar-toggle {
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1001;
        background: rgba(31, 41, 55, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .sidebar-mobile-open .sidebar-toggle {
        left: calc(280px + 1rem);
    }
}

/* Scrollbar Styles */
.sidebar-menu::-webkit-scrollbar {
    width: 4px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: rgba(17, 24, 39, 0.8);
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(107, 114, 128, 0.6);
    border-radius: 2px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 114, 128, 0.8);
}

/* Animation for nav items */
.nav-item {
    animation: slideInLeft 0.3s ease-out;
    animation-fill-mode: both;
}

.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.15s; }
.nav-item:nth-child(3) { animation-delay: 0.2s; }
.nav-item:nth-child(4) { animation-delay: 0.25s; }
.nav-item:nth-child(5) { animation-delay: 0.3s; }
.nav-item:nth-child(6) { animation-delay: 0.35s; }
.nav-item:nth-child(7) { animation-delay: 0.4s; }
.nav-item:nth-child(8) { animation-delay: 0.45s; }
.nav-item:nth-child(9) { animation-delay: 0.5s; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Tooltip for collapsed sidebar */
.sidebar.collapsed .nav-link {
    position: relative;
}

.sidebar.collapsed .nav-link::after {
    content: attr(title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(31, 41, 55, 0.95);
    color: #f9fafb;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
    border: 1px solid rgba(107, 114, 128, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.sidebar.collapsed .nav-link:hover::after {
    opacity: 1;
}

/* Login prompt for mobile */
.login-prompt {
    text-align: center;
}

.login-prompt .btn {
    width: 100%;
}
