/* Professional Navbar Styles */
.erp-navbar {
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    height: 70px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    z-index: 1000;
    transition: left 0.3s ease;
}

.sidebar.collapsed + .main-content .erp-navbar {
    left: 80px;
}

@media (max-width: 1024px) {
    .erp-navbar {
        left: 0;
    }
}

.erp-navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 1.5rem;
}

.erp-navbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.erp-sidebar-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.erp-sidebar-toggle:hover {
    background: #e5e7eb;
    color: #374151;
}

.erp-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.erp-breadcrumb-home {
    font-weight: 500;
    color: #374151;
}

.erp-breadcrumb-separator {
    font-size: 0.75rem;
    color: #9ca3af;
}

.erp-breadcrumb-current {
    font-weight: 600;
    color: var(--erp-primary);
}

.erp-navbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.erp-nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

.erp-live-clock {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.erp-nav-action {
    width: 40px;
    height: 40px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.erp-nav-action:hover {
    background: #e5e7eb;
    color: #374151;
    transform: translateY(-1px);
}

.erp-notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* Dropdown Styles */
.erp-nav-dropdown {
    position: relative;
}

.erp-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 280px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
    display: block;
    pointer-events: none;
}

.erp-nav-dropdown.active .erp-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
    pointer-events: auto;
}

.erp-dropdown-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.erp-dropdown-header h6 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.erp-dropdown-content {
    max-height: 320px;
    overflow-y: auto;
}

.erp-dropdown-footer {
    padding: 0.75rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.erp-dropdown-link {
    color: var(--erp-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.erp-dropdown-link:hover {
    color: var(--erp-primary-dark);
}

.erp-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.875rem;
}

.erp-dropdown-item:hover {
    background: #f3f4f6;
    color: #111827;
}

.erp-dropdown-item i {
    width: 16px;
    text-align: center;
    color: #6b7280;
}

.erp-dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

.erp-logout-item {
    color: #ef4444;
}

.erp-logout-item:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* User Profile */
.erp-user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border: none;
    background: #f3f4f6;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.erp-user-profile:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.erp-user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.erp-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.erp-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.erp-user-role {
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
}

.erp-user-chevron {
    color: #9ca3af;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.erp-nav-dropdown.active .erp-user-chevron {
    transform: rotate(180deg);
}

.erp-user-profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.erp-user-avatar-large {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
}

.erp-user-details .erp-user-name {
    max-width: 160px;
    font-size: 1rem;
}

.erp-user-email {
    font-size: 0.75rem;
    color: #6b7280;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Notifications */
.erp-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s ease;
}

.erp-notification-item:hover {
    background: #f9fafb;
}

.erp-notification-item:last-child {
    border-bottom: none;
}

.erp-notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.erp-notification-success {
    background: #dcfce7;
    color: #166534;
}

.erp-notification-info {
    background: #dbeafe;
    color: #1e40af;
}

.erp-notification-warning {
    background: #fef3c7;
    color: #92400e;
}

.erp-notification-content {
    flex: 1;
    min-width: 0;
}

.erp-notification-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.erp-notification-text {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.erp-notification-time {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Messages Dropdown Styles */
.erp-messages-dropdown {
    min-width: 350px;
    max-height: 450px;
    overflow-y: auto;
}

.erp-message-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s ease;
    cursor: pointer;
    position: relative;
}

.erp-message-item:hover {
    background: #f9fafb;
}

.erp-message-item:last-child {
    border-bottom: none;
}

.erp-message-item.read {
    opacity: 0.7;
}

.erp-message-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.erp-message-content {
    flex: 1;
    min-width: 0;
}

.erp-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.erp-message-sender {
    font-weight: 600;
    color: #111827;
    font-size: 0.875rem;
}

.erp-message-time {
    font-size: 0.75rem;
    color: #6b7280;
}

.erp-message-preview {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.erp-message-status.unread {
    width: 8px;
    height: 8px;
    background: var(--erp-primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.5rem;
}

/* Search Dropdown Styles */
.erp-search-menu {
    min-width: 400px;
    max-height: 500px;
    overflow: hidden;
    padding: 0;
}

.erp-search-container {
    display: flex;
    flex-direction: column;
}

.erp-search-input-wrapper {
    position: relative;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.erp-search-icon {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.erp-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.erp-search-input:focus {
    border-color: var(--erp-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.erp-search-shortcut {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #6b7280;
    font-family: monospace;
}

.erp-search-results {
    max-height: 350px;
    overflow-y: auto;
}

.erp-search-section {
    padding: 1rem 0;
}

.erp-search-section-title {
    padding: 0 1.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.erp-search-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.erp-search-item:hover {
    background: #f3f4f6;
}

.erp-search-item i {
    width: 20px;
    text-align: center;
    color: #6b7280;
}

.erp-search-item span {
    font-size: 0.875rem;
    color: #111827;
    font-weight: 500;
}

.erp-search-item small {
    font-size: 0.75rem;
    color: #6b7280;
    margin-left: auto;
}

/* Help Dropdown Styles */
.erp-help-dropdown {
    min-width: 320px;
}

.erp-help-section {
    padding: 0.5rem 0;
}

.erp-help-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.erp-help-item:hover {
    background: #f3f4f6;
}

.erp-help-item i {
    width: 20px;
    text-align: center;
    color: var(--erp-primary);
    font-size: 1rem;
}

.erp-help-content {
    flex: 1;
}

.erp-help-title {
    font-weight: 600;
    color: #111827;
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
}

.erp-help-desc {
    font-size: 0.75rem;
    color: #6b7280;
}

.erp-help-shortcuts {
    border-top: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
}

.erp-help-shortcut-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.erp-shortcut-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.erp-shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
}

.erp-shortcut-item kbd {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 0.125rem 0.25rem;
    font-size: 0.7rem;
    font-family: monospace;
    color: #374151;
}

.erp-shortcut-item span {
    color: #6b7280;
}

/* Badge Styles */
.erp-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.erp-badge-primary {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
}

.erp-badge-info {
    background: rgba(14, 165, 233, 0.1);
    color: #0369a1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .erp-navbar-content {
        padding: 0 1rem;
    }

    .erp-breadcrumb {
        display: none;
    }

    .erp-user-info {
        display: none;
    }

    .erp-nav-item {
        display: none;
    }

    .erp-dropdown-menu {
        min-width: 260px;
        right: -20px;
    }

    .erp-messages-dropdown,
    .erp-search-menu {
        min-width: 280px;
        right: -40px;
    }

    .erp-search-input-wrapper {
        padding: 0.75rem 1rem;
    }

    .erp-search-icon {
        left: 1.5rem;
    }

    .erp-search-shortcut {
        display: none;
    }
}
