.header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    width: 180px;
    height: auto;
    margin-right: 20px;
}

.nav-menu {
    display: flex;
    gap: 15px;
}

.nav-btn {
    background-color: transparent;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-btn.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Dropdown styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #2c3e50;
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 4px;
    margin-top: 2px;
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: background-color 0.3s;
}

.dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown .nav-btn:after {
    content: ' ▼';
    font-size: 10px;
    vertical-align: middle;
}

/* Logout styling inside dropdown */
.logout-option {
    background-color: #e53e3e;
    color: white;
    border-radius: 0 0 4px 4px;
}

.logout-option:hover {
    background-color: #c53030 !important;
}

/* Tab System Styles */
.tab-container {
    display: flex;
    justify-content: center;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 0;
    margin: 0;
}

.tab-button {
    background-color: transparent;
    color: #495057;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
}

.tab-button:hover {
    background-color: #e9ecef;
    color: #2c3e50;
}

.tab-button.active {
    color: #2c3e50;
    background-color: white;
    border-bottom: 3px solid #4299e1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Main content styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f0f2f5;
    min-height: 100vh;
    padding: 0;
}

.assembly-title {
    text-align: center;
    padding: 20px 0;
}

.assembly-title h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.assembly-title h2 {
    font-size: 1.5rem;
    font-weight: normal;
    color: #4a5568;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Search bar styles */
.search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.search-bar {
    display: flex;
    width: 500px; 
    max-width: 100%;
}

.search-bar input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.search-bar button {
    padding: 10px 20px;
    background-color: #4299e1;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
}

.search-bar button:hover {
    background-color: #3182ce;
}

#clearSearchButton {
    background-color: #f59e0b;
    border-radius: 4px;
    margin-left: 5px;
}

#clearSearchButton:hover {
    background-color: #d97706;
}

/* Action buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.action-buttons button {
    padding: 8px 20px;
    background-color: #4299e1;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.action-buttons button:hover {
    background-color: #3182ce;
}

/* styling for Copy button */
.action-buttons #copyButton {
    background-color: #8b5cf6;
}

.action-buttons #copyButton:hover {
    background-color: #7c3aed;
}

/* Assembly container */
.assembly-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

/* Assembly items */
.assembly {
    margin-bottom: 20px;
}

.toggle {
    background-color: #f3f4f6;
    border: none;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 16px;
    margin-right: 10px;
    border-radius: 4px;
}

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

.assembly-link {
    text-decoration: none;
    color: #2c5282;
    font-weight: 500;
    display: inline-block;
    margin-right: 10px;
}

.assembly-link:hover {
    text-decoration: underline;
}

.copy-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.copy-icon:hover {
    opacity: 0.7;
}

.collapsible {
    list-style-type: none;
    margin-left: 30px;
    margin-top: 5px;
}

.collapsible li {
    padding: 8px 0;
}

.sub-assembly {
    margin: 10px 0;
}

.highlight {
    background-color: #fef08a;
    padding: 2px;
    animation: highlightPulse 2s ease-in-out;
}

@keyframes highlightPulse {
    0%, 100% {
        background-color: #fef08a;
    }
    50% {
        background-color: #fde047;
    }
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    margin-bottom: 20px;
}

.modal-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.modal-header p {
    color: #6b7280;
}

.option-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.option-btn {
    flex: 1;
    padding: 15px 20px;
    background-color: #4299e1;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.option-btn:hover {
    background-color: #3182ce;
}

.option-btn.secondary {
    background-color: #10b981;
}

.option-btn.secondary:hover {
    background-color: #059669;
}

.close-btn {
    background-color: #6b7280;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
}

.close-btn:hover {
    background-color: #4b5563;
}

/* Assembly List */
.assembly-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin: 20px 0;
}

.assembly-item {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.assembly-item:hover {
    background-color: #f9fafb;
}

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

.assembly-info {
    flex: 1;
}

.assembly-number {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.assembly-name {
    color: #6b7280;
    font-size: 14px;
}

.select-btn {
    background-color: #10b981;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.select-btn:hover {
    background-color: #059669;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

/* Search in modal */
.modal-search {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Parent Assembly Selection Modal style */
.parent-assembly-item {
    padding: 12px 15px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.parent-assembly-item:hover {
    background-color: #f3f4f6;
}

.parent-assembly-item:last-child {
    border-bottom: none;
}

.parent-assembly-info {
    flex: 1;
}

.parent-assembly-number {
    font-weight: bold;
    color: #2c3e50;
    font-size: 14px;
}

.parent-assembly-path {
    color: #6b7280;
    font-size: 12px;
    margin-top: 2px;
}

.top-level-option {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
}

.top-level-option:hover {
    background-color: #fde68a;
}

.top-level-option .parent-assembly-number {
    color: #92400e;
    font-size: 15px;
}

.top-level-option .parent-assembly-path {
    color: #78350f;
    font-style: italic;
}

/* Copy modal specific styles */
.copy-assembly-item {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid transparent;
}

.copy-assembly-item:hover {
    background-color: #f0f9ff;
    border-left-color: #8b5cf6;
}

.copy-assembly-item:last-child {
    border-bottom: none;
}

.copy-btn {
    background-color: #8b5cf6;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.copy-btn:hover {
    background-color: #7c3aed;
}

.copy-main-assembly {
    background-color: #f3e8ff;
    border-left: 4px solid #8b5cf6;
}

.copy-main-assembly:hover {
    background-color: #e9d5ff;
}

.copy-main-assembly .assembly-number {
    color: #6b21a8;
    font-size: 15px;
}

.copy-main-assembly .assembly-name {
    color: #581c87;
    font-style: italic;
}

.remove-option-btn {
    flex: 1;
    padding: 15px 20px;
    background-color: #e53e3e;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.remove-option-btn:hover {
    background-color: #c53030;
}

.remove-option-btn.secondary {
    background-color: #dc2626;
}

.remove-option-btn.secondary:hover {
    background-color: #b91c1c;
}

.remove-assembly-item {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remove-assembly-item:hover {
    background-color: #fef2f2;
}

.remove-assembly-item:last-child {
    border-bottom: none;
}

.remove-btn {
    background-color: #e53e3e;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.remove-btn:hover {
    background-color: #c53030;
}

/* Edit modal specific styles */
.edit-assembly-item {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.edit-assembly-item:hover {
    background-color: #f0f9ff;
}

.edit-assembly-item:last-child {
    border-bottom: none;
}

.edit-btn {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.edit-btn:hover {
    background-color: #1d4ed8;
}

/* Edit Parent specific styles */
.edit-parent-item {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.edit-parent-item:hover {
    background-color: #faf5ff;
}

.edit-parent-item:last-child {
    border-bottom: none;
}

.move-btn {
    background-color: #7c3aed;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.move-btn:hover {
    background-color: #6d28d9;
}

.edit-parent-assembly-item {
    padding: 12px 15px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid transparent;
}

.edit-parent-assembly-item:hover {
    background-color: #faf5ff;
    border-left-color: #7c3aed;
}

.edit-parent-assembly-item:last-child {
    border-bottom: none;
}

.edit-parent-assembly-info {
    flex: 1;
}

.edit-parent-assembly-number {
    font-weight: bold;
    color: #2c3e50;
    font-size: 14px;
}

.edit-parent-assembly-path {
    color: #6b7280;
    font-size: 12px;
    margin-top: 2px;
}

.edit-parent-top-level-option {
    background-color: #f3e8ff;
    border-left: 4px solid #7c3aed;
}

.edit-parent-top-level-option:hover {
    background-color: #e9d5ff;
}

.edit-parent-top-level-option .edit-parent-assembly-number {
    color: #6b21a8;
    font-size: 15px;
}

.edit-parent-top-level-option .edit-parent-assembly-path {
    color: #581c87;
    font-style: italic;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .dropdown-content {
        position: static;
        width: 100%;
        margin-top: 0;
        box-shadow: none;
    }
    
    .search-bar {
        width: 100%;
    }

    .option-buttons {
        flex-direction: column;
    }

    .modal-content {
        margin: 5% auto;
        padding: 20px;
        width: 95%;
    }

    .action-buttons {
        flex-wrap: wrap;
    }
    
    .tab-button {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .tab-container {
        flex-wrap: wrap;
    }
}

/* Checkbox-based item selection styles */
.assembly-item-checkbox {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.assembly-item-checkbox:hover {
    background-color: #f9fafb;
}

.assembly-item-checkbox:last-child {
    border-bottom: none;
}

.checkbox-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4299e1;
}

.assembly-item-checkbox .assembly-info {
    flex: 1;
    cursor: pointer;
}

.assembly-item-checkbox .assembly-info label {
    cursor: pointer;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
    display: block;
}

.assembly-item-checkbox .assembly-name {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 4px;
}

.quantity-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
}

.quantity-input {
    width: 70px;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.quantity-input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.2);
}

.add-selected-container {
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
    border: 2px solid #e5e7eb;
}

.selected-count {
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 10px;
    font-size: 14px;
}

.add-selected-container .option-btn {
    width: 100%;
    margin-top: 10px;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 20px;
}

.add-selected-container .option-btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.add-selected-container .option-btn:disabled:hover {
    background-color: #9ca3af;
}

.assembly-item-checkbox:has(input[type="checkbox"]:checked) {
    background-color: #eff6ff;
    border-left: 4px solid #4299e1;
}

.assembly-item-checkbox:has(input[type="checkbox"]:checked):hover {
    background-color: #dbeafe;
}

.assembly-item-checkbox:has(input[type="checkbox"]:checked) .assembly-number {
    color: #1e40af !important;
}

.quantity-container {
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.quantity-container:not([style*="display: none"]) {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .assembly-item-checkbox {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px;
    }
    
    .checkbox-container {
        align-self: flex-start;
    }
    
    .quantity-container {
        align-self: flex-end;
        margin-top: 5px;
    }
    
    .quantity-input {
        width: 60px;
    }
}

.action-buttons #altButton {
    background-color: #f59e0b;
}

.action-buttons #altButton:hover {
    background-color: #d97706;
}

.alt-indicator {
    background-color: #fbbf24;
    color: #78350f;
    border: 2px solid #f59e0b;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alt-indicator:hover {
    background-color: #f59e0b;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* ALT Part Item Styling */
.alt-part-item {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid transparent;
}

.alt-part-item:hover {
    background-color: #fef3c7;
    border-left-color: #f59e0b;
}

.alt-part-item:last-child {
    border-bottom: none;
}

.alt-part-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f9fafb;
}

.alt-part-item.disabled:hover {
    background-color: #f9fafb;
    border-left-color: transparent;
}

.alt-part-item.disabled .select-btn {
    cursor: not-allowed;
    background-color: #9ca3af;
    opacity: 0.6;
}

.alt-part-item.disabled .select-btn:hover {
    background-color: #9ca3af;
    transform: none;
}

/* ALT Assembly Item Styling */
.alt-assembly-item {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid transparent;
}

.alt-assembly-item:hover {
    background-color: #dbeafe;
    border-left-color: #3b82f6;
}

.alt-assembly-item:last-child {
    border-bottom: none;
}

/* Mobile responsive for ALT features */
@media (max-width: 768px) {
    .alt-indicator {
        font-size: 9px;
        padding: 2px 6px;
        margin-left: 4px;
    }
    
    .alt-part-item,
    .alt-assembly-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px;
    }
    
    .alt-part-item .select-btn,
    .alt-assembly-item .select-btn {
        width: 100%;
    }
}