* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    overflow-x: hidden;
}

/* Login Container */
.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box h1 {
    color: #1e3c72;
    font-size: 28px;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    color: #666;
    font-size: 14px;
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.error {
    color: #c0392b;
    font-size: 14px;
    margin: 15px 0;
    padding: 10px;
    background: #ffe6e6;
    border-radius: 5px;
    display: none;
}

.error:not(:empty) {
    display: block;
}

.loading {
    text-align: center;
    color: #2a5298;
    font-size: 14px;
    margin: 15px 0;
    padding: 10px;
}

.loading:after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(42, 82, 152, 0.4);
}

button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

button[type="submit"]:active:not(:disabled) {
    transform: translateY(0);
}

/* Dashboard Container */
.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.dashboard-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-left h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.user-info {
    font-size: 14px;
    opacity: 0.9;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.main-content h2 {
    color: #1e3c72;
    margin-bottom: 20px;
    font-size: 28px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.stat-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #2a5298;
    margin-bottom: 15px;
}

/* Form Styles */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 800px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    color: #1e3c72;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

select:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 82, 152, 0.4);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* Success/Error Messages */
.success-message {
    background: #e6ffe6;
    color: #27ae60;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    display: none;
}

.success-message:not(:empty) {
    display: block;
}

.error-message {
    background: #ffe6e6;
    color: #c0392b;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    display: none;
}

.error-message:not(:empty) {
    display: block;
}

/* Step Progress Indicator */
.step-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.step-item.active .step-number {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(42, 82, 152, 0.4);
}

.step-label {
    font-size: 14px;
    color: #666;
    font-weight: 600;
    text-align: center;
    transition: color 0.3s;
}

.step-item.active .step-label {
    color: #1e3c72;
}

.step-line {
    width: 100px;
    height: 3px;
    background: #e0e0e0;
    margin: 0 15px;
    position: relative;
    top: -20px;
}

/* Step Container */
.step-container {
    margin-bottom: 30px;
}

.step-content {
    display: none;
    animation: fadeIn 0.3s;
}

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

.step-content h2 {
    color: #1e3c72;
    margin-bottom: 10px;
    font-size: 28px;
}

.step-description {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

/* Autocomplete */
.autocomplete-container {
    position: relative;
}

.autocomplete-loading {
    position: absolute;
    right: 12px;
    top: 12px;
    color: #2a5298;
    font-size: 13px;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.autocomplete-item:hover {
    background: #f5f7fa;
}

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

.autocomplete-item-title {
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 4px;
}

.autocomplete-item-subtitle {
    font-size: 13px;
    color: #666;
}

.autocomplete-item.no-results {
    color: #999;
    cursor: default;
    text-align: center;
    padding: 20px;
}

.autocomplete-item.no-results:hover {
    background: white;
}

/* BOM Display Grid - Two Separate form-containers Side by Side */
.bom-display-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 25px;
    margin-top: 30px;
}

/* Ensure form-containers in grid display properly */
.bom-display-grid .form-container {
    margin: 0;
}

/* BOM Info Styles */
.selected-bom-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2a5298;
}

.selected-bom-header h3 {
    color: #1e3c72;
    font-size: 20px;
    margin: 0;
}

.btn-clear-selection {
    padding: 8px 16px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-clear-selection:hover {
    background: #7f8c8d;
}

.bom-info-row {
    display: flex;
    flex-direction: column;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.bom-info-row:last-child {
    border-bottom: none;
}

.bom-label {
    font-weight: 600;
    color: #666;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.bom-value {
    color: #1e3c72;
    font-weight: 700;
    font-size: 22px;
}

/* Quantity Buttons */
.qty-buttons-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.qty-btn {
    flex: 1;
    padding: 12px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.qty-btn:hover {
    border-color: #2a5298;
    color: #2a5298;
}

.qty-btn.active {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border-color: #2a5298;
}

.custom-qty-input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-qty-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #2a5298;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    color: #1e3c72;
}

.custom-qty-input:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.2);
}

.btn-apply-custom {
    padding: 12px 20px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-apply-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 82, 152, 0.4);
}

.selected-qty-display {
    padding: 12px;
    background: #f5f7fa;
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.selected-qty-display strong {
    font-size: 24px;
    color: #1e3c72;
    display: block;
    margin-top: 5px;
}

/* BOM Components Styles */
.bom-components-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2a5298;
}

.bom-components-header h3 {
    color: #1e3c72;
    font-size: 20px;
    margin: 0;
}

.bom-items-table-wrapper {
    overflow-y: auto;
    max-height: 400px;
}

.bom-items-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.bom-items-table thead {
    background: #1e3c72;
    position: sticky;
    top: 0;
    z-index: 10;
}

.bom-items-table th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bom-items-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.bom-items-table tbody tr:hover {
    background: #f9f9f9;
}

.bom-items-table tbody tr:last-child td {
    border-bottom: none;
}

.bom-items-table .text-center {
    text-align: center;
}

.bom-items-table .total-qty {
    color: #2a5298;
    font-size: 15px;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #2a5298;
    font-size: 14px;
}

.loading:after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Step Navigation */
.step-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.step-navigation .btn {
    min-width: 150px;
}

.form-hint {
    display: block;
    margin-top: 8px;
    color: #999;
    font-size: 13px;
    font-style: italic;
}

/* ============================================
   STEP 2: Parts List Styles
   ============================================ */

/* Two Column Grid: Input Left, Parts Right */
.step2-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.step2-grid .form-container {
    margin: 0;
    height: fit-content;
}

.paste-instructions {
    background: #f5f7fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #2a5298;
}

.paste-instructions h3 {
    color: #1e3c72;
    font-size: 16px;
    margin-bottom: 8px;
}

.paste-instructions p {
    color: #666;
    font-size: 13px;
    margin-bottom: 12px;
}

.excel-example {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.excel-example strong {
    display: block;
    margin-bottom: 8px;
    color: #1e3c72;
    font-size: 13px;
}

.example-table {
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.example-row {
    display: grid;
    grid-template-columns: 120px 60px;
    gap: 15px;
    padding: 4px;
    border-bottom: 1px solid #f0f0f0;
}

.example-row:last-child {
    border-bottom: none;
}

.paste-area-wrapper {
    margin-bottom: 20px;
}

.paste-area-wrapper label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

#partsPasteArea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    resize: vertical;
    transition: border-color 0.3s;
}

#partsPasteArea:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.paste-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.manual-entry-section {
    border-top: 2px solid #e0e0e0;
    padding-top: 20px;
}

.manual-entry-section h3 {
    color: #1e3c72;
    font-size: 16px;
    margin-bottom: 12px;
}

.manual-entry-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.manual-entry-form .form-group {
    flex: 1;
    margin: 0;
}

.manual-entry-form input {
    width: 100%;
}

/* Parts List - Right Column */
.no-parts-message {
    padding: 60px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
    font-style: italic;
    border: 2px dashed #ddd;
    border-radius: 8px;
}

.parts-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #2a5298;
}

.parts-list-header h3 {
    color: #1e3c72;
    font-size: 18px;
    margin: 0;
}

.parts-header-buttons {
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.parts-table-wrapper {
    max-height: 450px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.parts-table {
    width: 100%;
    border-collapse: collapse;
}

.parts-table thead {
    background: #1e3c72;
    position: sticky;
    top: 0;
    z-index: 10;
}

.parts-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.parts-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.parts-table tbody tr:hover {
    background: #f9f9f9;
}

.parts-table tbody tr:last-child td {
    border-bottom: none;
}

.qty-edit-input {
    width: 70px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
}

.qty-edit-input:focus {
    outline: none;
    border-color: #2a5298;
}

.btn-delete-part {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-delete-part:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.part-id-display {
    font-size: 11px;
    color: #999;
    margin-top: 3px;
    font-weight: normal;
}

/* Errors Section - Full Width Below */
.errors-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e74c3c;
}

.errors-header h3 {
    color: #c0392b;
    font-size: 18px;
    margin: 0;
}

.errors-list {
    max-height: 300px;
    overflow-y: auto;
}

.error-item {
    display: grid;
    grid-template-columns: 80px 200px 1fr;
    gap: 15px;
    padding: 12px;
    background: #fff5f5;
    border-left: 4px solid #e74c3c;
    border-radius: 4px;
    margin-bottom: 8px;
    font-size: 13px;
}

.error-row {
    font-weight: 600;
    color: #666;
}

.error-part {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #c0392b;
}

.error-message {
    color: #333;
}

/* Progress Overlay */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.progress-modal {
    background: white;
    border-radius: 12px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.progress-modal h3 {
    color: #1e3c72;
    font-size: 24px;
    margin-bottom: 25px;
    text-align: center;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.progress-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: #f5f7fa;
    border-radius: 8px;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #1e3c72;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    transition: width 0.3s ease, background 0.3s ease;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-text {
    text-align: center;
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
}

.progress-current {
    text-align: center;
    font-size: 14px;
    color: #666;
    padding: 15px;
    background: #f5f7fa;
    border-radius: 8px;
}

.progress-current strong {
    color: #1e3c72;
    font-family: 'Courier New', monospace;
}

/* Confirmation Modal */
/* Paste Instructions */

/* ============================================
   STEP 3: Review Page Styles
   ============================================ */

.review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 25px;
}

.review-grid .form-container {
    margin: 0;
}

.review-grid h3 {
    color: #1e3c72;
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #2a5298;
}

.review-section {
    margin-bottom: 25px;
}

.review-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.review-label {
    font-weight: 600;
    color: #666;
    font-size: 14px;
}

.review-value {
    font-weight: 700;
    color: #1e3c72;
    font-size: 18px;
}

.review-value.highlight {
    font-size: 24px;
    color: #2a5298;
}

/* BOM Components Summary */
.bom-components-summary {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.bom-components-summary h4 {
    color: #1e3c72;
    font-size: 16px;
    margin-bottom: 15px;
}

.components-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
}

.component-item {
    display: grid;
    grid-template-columns: 150px 1fr 180px;
    gap: 12px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 8px;
    align-items: center;
}

.component-item:last-child {
    margin-bottom: 0;
}

.component-part {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #1e3c72;
    font-size: 13px;
}

.component-desc {
    font-size: 13px;
    color: #666;
}

.component-qty {
    text-align: right;
    font-size: 13px;
    color: #333;
}

.component-qty strong {
    color: #2a5298;
    font-size: 15px;
}

/* Parts Summary Table */
.parts-summary-table {
    margin-top: 20px;
    max-height: 450px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.review-table {
    width: 100%;
    border-collapse: collapse;
}

.review-table thead {
    background: #1e3c72;
    position: sticky;
    top: 0;
    z-index: 10;
}

.review-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.review-table tbody tr:hover {
    background: #f9f9f9;
}

.review-table tbody tr:last-child td {
    border-bottom: none;
}

.no-data {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* ============================================
   STEP 4: Submit Page Styles
   ============================================ */

.submit-summary {
    text-align: center;
    padding: 40px 20px;
}

.summary-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.submit-summary h3 {
    color: #1e3c72;
    font-size: 28px;
    margin-bottom: 10px;
}

.submit-summary p {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 600px;
    margin: 0 auto 40px;
    padding: 30px;
    background: #f5f7fa;
    border-radius: 10px;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-label {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 24px;
    color: #1e3c72;
    font-weight: 700;
}

.submit-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    padding: 16px 32px;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success State */
.submit-success-state {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.5s ease;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    font-size: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 30px;
    box-shadow: 0 8px 24px rgba(46, 204, 113, 0.3);
}

.submit-success-state h3 {
    color: #27ae60;
    font-size: 32px;
    margin-bottom: 15px;
}

.submit-success-state p {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

.created-mo-number {
    font-size: 18px;
    color: #333;
    padding: 20px;
    background: #f5f7fa;
    border-radius: 8px;
    margin-bottom: 30px;
}

.created-mo-number strong {
    font-size: 28px;
    color: #1e3c72;
    display: block;
    margin-top: 10px;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
}

table th {
    background: #1e3c72;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

table tr:hover {
    background: #f9f9f9;
}

/* ============================================ */
/* CONFIRMATION MODAL FIX - Matches Progress Modal Style */
/* ============================================ */

.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000; /* Higher than progress overlay */
    animation: fadeIn 0.3s ease;
}

.confirmation-modal .confirmation-dialog {
    background: white;
    border-radius: 12px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.confirmation-modal .confirmation-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: pulseIcon 2s ease-in-out infinite;
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.confirmation-modal h3 {
    color: #1e3c72;
    font-size: 24px;
    margin-bottom: 20px;
}

.confirmation-modal .confirmation-message {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.6;
}

.confirmation-modal .confirmation-message strong {
    color: #e74c3c;
    font-weight: 700;
}

.confirmation-modal .confirmation-submessage {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
}

.confirmation-modal .confirmation-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.confirmation-modal .confirmation-buttons .btn {
    min-width: 120px;
    padding: 12px 30px;
    font-size: 16px;
    transition: all 0.3s ease;
}
