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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f6fa;
    min-height: 100vh;
}

/* Header & Navigation */
.header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.header h1 {
    color: white;
    font-size: 1.5rem;
    margin: 0;
}

.hamburger-menu {
    position: relative;
}

.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger-btn:hover span {
    background: #3498db;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 200px;
    z-index: 1001;
    overflow: hidden;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    color: #2c3e50;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    background: none;
    width: 100%;
    font-size: 0.95rem;
    text-align: left;
}

.dropdown-item:hover {
    background: #f5f6fa;
}

.dropdown-item .icon {
    font-size: 1.1rem;
}

.tabs {
    display: flex;
    gap: 0.5rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: rgba(255,255,255,0.2);
}

.tab-btn.active {
    background: #f5f6fa;
    color: #2c3e50;
}

.tab-btn .badge {
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 5px;
    transition: background-color 0.3s ease;
}

.tab-btn .badge.badge-zero {
    background: #27ae60;
}

.tab-btn .badge.badge-nonzero {
    background: #e74c3c;
}

/* Main Content */
.main-content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tab-content {
    display: none;
}

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

/* Request Creation Cards */
.creation-cards {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.creation-card {
    background: white;
    border-radius: 16px;
    padding: 3rem 2rem;
    width: 300px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 3px solid transparent;
}

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

.creation-card.update-card {
    border-color: #2ecc71;
}

.creation-card.update-card:hover {
    background: #eafaf1;
}

.creation-card.update-card .icon {
    color: #2ecc71;
}

.creation-card.job-card {
    border-color: #3498db;
}

.creation-card.job-card:hover {
    background: #ebf5fb;
}

.creation-card.quote-card {
    border-color: #9b59b6;
}

.creation-card.quote-card:hover {
    background: #f5eef8;
}

.creation-card.transfer-card {
    border-color: #16a085;
}

.creation-card.transfer-card:hover {
    background: #e8f6f3;
}

.creation-card.transfer-card .icon {
    color: #16a085;
}

.creation-card.order-card {
    border-color: #e67e22;
}

.creation-card.order-card:hover {
    background: #fef5e7;
}

.creation-card.order-card .icon {
    color: #e67e22;
}

.creation-card .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.creation-card.job-card .icon {
    color: #3498db;
}

.creation-card.quote-card .icon {
    color: #9b59b6;
}

.creation-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.creation-card p {
    color: #7f8c8d;
}

/* Form Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

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

.modal-header h2 {
    color: #2c3e50;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
}

.modal-body {
    padding: 1.5rem;
}

.progress-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.progress-step {
    flex: 1;
    height: 4px;
    background: #ecf0f1;
    border-radius: 2px;
}

.progress-step.active {
    background: #3498db;
}

.progress-step.completed {
    background: #27ae60;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    min-height: 280px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Override form-group label's display:block when using checkbox-group */
.form-group .checkbox-group,
.form-group label.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-option:hover {
    border-color: #3498db;
}

.radio-option input {
    width: 18px;
    height: 18px;
}

/* Validation error highlighting */
.form-group.validation-error input,
.form-group.validation-error select,
.form-group.validation-error textarea {
    border-color: #e74c3c;
    background: #fdf0ef;
}

.form-group.validation-error label {
    color: #e74c3c;
}

.form-group.validation-error .radio-group .radio-option {
    border-color: #e74c3c;
}

.validation-error-msg {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 0.35rem;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.shake {
    animation: shake 0.4s ease;
}

.form-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-secondary:hover {
    background: #d5dbdb;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #219a52;
}

/* Submission Cards */
.submissions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.submission-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    border-left: 5px solid;
}

.submission-card.existing-job {
    border-left-color: #3498db;
}

.submission-card.new-job {
    border-left-color: #3498db;
}

.submission-card.quote-only {
    border-left-color: #9b59b6;
}

.card-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s;
}

.card-header:hover {
    background: #f8f9fa;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-title h3 {
    color: #2c3e50;
    font-size: 1.1rem;
}

.card-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-existing {
    background: #ebf5fb;
    color: #3498db;
}

.badge-new {
    background: #ebf5fb;
    color: #3498db;
}

.badge-quote {
    background: #f5eef8;
    color: #9b59b6;
}

.badge-emergency {
    background: #fdedec;
    color: #e74c3c;
}

.badge-transfer {
    background: #e8f6f3;
    color: #16a085;
}

.badge-update {
    background: #eafaf1;
    color: #2ecc71;
}

.submission-card.part-transfer {
    border-left-color: #16a085;
}

.submission-card.job-update {
    border-left-color: #2ecc71;
}

.submission-card.grouped-update {
    border-left-color: #3498db;
    border-left-width: 5px;
}

.badge-grouped {
    background: #ebf5fb;
    color: #3498db;
}

/* Update Timeline Styles */
.update-timeline {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.update-timeline h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: #34495e;
}

.update-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    position: relative;
}

.update-timeline-item.timeline-completed {
    background: #eafaf1;
    border-left: 3px solid #27ae60;
}

.update-timeline-item.timeline-incomplete {
    background: #fef5e7;
    border-left: 3px solid #e67e22;
}

.timeline-marker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.timeline-completed .timeline-marker {
    background: #27ae60;
    color: white;
}

.timeline-incomplete .timeline-marker {
    background: #e67e22;
    color: white;
}

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

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.timeline-status {
    font-weight: 600;
    font-size: 0.85rem;
}

.timeline-completed .timeline-status {
    color: #27ae60;
}

.timeline-incomplete .timeline-status {
    color: #e67e22;
}

.timeline-date {
    font-size: 0.75rem;
    color: #7f8c8d;
}

.timeline-detail {
    font-size: 0.85rem;
    color: #34495e;
    margin: 0.25rem 0;
}

.timeline-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.7rem;
    color: #95a5a6;
    margin-top: 0.25rem;
}

.btn-delete-small {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    border-radius: 4px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.btn-delete-small:hover {
    background: rgba(231, 76, 60, 0.1);
}

.btn-edit-small {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    border-radius: 4px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.btn-edit-small:hover {
    background: rgba(52, 152, 219, 0.1);
}

.timeline-actions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    flex-shrink: 0;
}

.submission-card.part-order {
    border-left-color: #e67e22;
}

.badge-order {
    background: #fef5e7;
    color: #e67e22;
}

.submission-card.door-programming {
    border-left-color: #4682b4;
}

.badge-doorprog {
    background: #e8f0f8;
    color: #4682b4;
}

.creation-card.doorprog-card {
    border-color: #4682b4;
}

.creation-card.doorprog-card:hover {
    background: #e8f0f8;
}

.creation-card.doorprog-card .icon {
    color: #4682b4;
}

.category-header.door-programming .category-count {
    background: #4682b4;
}

.door-entry-row {
    border: 1px solid #dee2e6;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    background: #fafbfc;
}

.door-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.door-entry-row .form-row {
    display: flex;
    gap: 0.75rem;
}

.door-entry-row .form-row .form-group {
    flex: 1;
}

.door-entry-row .radio-group {
    display: flex;
    gap: 1rem;
}

.door-entry-row .checkbox-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Month Group Sections (wraps category sections in completed tab) */
.month-section {
    margin-bottom: 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
}

.month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    cursor: pointer;
    transition: background 0.3s;
    user-select: none;
}

.month-header:hover {
    background: linear-gradient(135deg, #34495e, #3d566e);
}

.month-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.05rem;
}

.month-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
}

.month-toggle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    transition: transform 0.3s;
}

.month-section.collapsed .month-toggle {
    transform: rotate(-90deg);
}

.month-content {
    padding: 0.75rem;
    background: #fafbfc;
}

.month-section.collapsed .month-content {
    display: none;
}

/* Technician filter dropdown */
#completed-tech-filter,
#jobupdates-tech-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#completed-tech-select,
#jobupdates-tech-select {
    padding: 0.4rem 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #2c3e50;
    background: white;
    cursor: pointer;
    min-width: 140px;
}

#completed-tech-select:focus,
#jobupdates-tech-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Collapsible Category Sections */
.category-section {
    margin-bottom: 1rem;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 0.5rem;
}

.category-header:hover {
    background: #e9ecef;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: #2c3e50;
}

.category-count {
    background: #3498db;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.category-header.job-requests .category-count { background: #3498db; }
.category-header.quote-requests .category-count { background: #9b59b6; }
.category-header.part-transfers .category-count { background: #16a085; }
.category-header.part-orders .category-count { background: #e67e22; }

.category-toggle {
    font-size: 1.2rem;
    color: #7f8c8d;
    transition: transform 0.3s;
}

.category-section.collapsed .category-toggle {
    transform: rotate(-90deg);
}

.category-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-left: 0.5rem;
}

.category-section.collapsed .category-content {
    display: none;
}

.expand-collapse-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.expand-collapse-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    color: #555;
    transition: all 0.2s;
}

.expand-collapse-btn:hover {
    background: #f8f9fa;
    border-color: #3498db;
    color: #3498db;
}

.expand-icon {
    font-size: 1.5rem;
    color: #7f8c8d;
    transition: transform 0.3s;
}

.submission-card.expanded .expand-icon {
    transform: rotate(180deg);
}

.card-body {
    display: none;
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid #eee;
}

.submission-card.expanded .card-body {
    display: block;
}

.detail-list {
    list-style: none;
    margin: 1rem 0;
}

.detail-list li {
    padding: 0.5rem 0;
    display: flex;
    border-bottom: 1px solid #f5f5f5;
}

.detail-list li:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 500;
    color: #7f8c8d;
    min-width: 150px;
}

.detail-value {
    color: #2c3e50;
}

.nested-quote {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    border-left: 3px solid #9b59b6;
}

.nested-quote h4 {
    color: #9b59b6;
    margin-bottom: 0.5rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-complete {
    background: #27ae60;
    color: white;
}

.btn-complete:hover {
    background: #219a52;
}

.btn-incomplete {
    background: #e67e22;
    color: white;
}

.btn-incomplete:hover {
    background: #d35400;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background: #c0392b;
}

.btn-restore {
    background: #3498db;
    color: white;
}

.btn-restore:hover {
    background: #2980b9;
}

/* Drafts Page */
.drafts-page {
    display: none;
}

.drafts-page.active {
    display: block;
}

.drafts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.drafts-header h2 {
    color: #2c3e50;
}

.draft-card {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid #9b59b6;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.draft-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.draft-card.job-draft {
    border-left-color: #e67e22;
}

.draft-card.quote-draft {
    border-left-color: #9b59b6;
}

.draft-card.transfer-draft {
    border-left-color: #3498db;
}

.draft-card.partorder-draft {
    border-left-color: #27ae60;
}

.draft-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.draft-card-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.draft-card-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.draft-card-badge.badge-job {
    background: #fef5e7;
    color: #e67e22;
}

.draft-card-badge.badge-quote {
    background: #f5eef8;
    color: #9b59b6;
}

.draft-card-badge.badge-transfer {
    background: #ebf5fb;
    color: #3498db;
}

.draft-card-badge.badge-partorder {
    background: #eafaf1;
    color: #27ae60;
}

.draft-card-preview {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.draft-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #95a5a6;
}

.draft-card-actions {
    display: flex;
    gap: 0.5rem;
}

.draft-card-actions button {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.draft-restore-btn {
    background: #3498db;
    color: white;
}

.draft-restore-btn:hover {
    background: #2980b9;
}

.draft-delete-btn {
    background: #ecf0f1;
    color: #e74c3c;
}

.draft-delete-btn:hover {
    background: #e74c3c;
    color: white;
}

.draft-indicator {
    position: absolute;
    top: 0.5rem;
    right: 3rem;
    background: #9b59b6;
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: none;
}

.draft-indicator.visible {
    display: block;
}

/* Deleted Page */
.deleted-page {
    display: none;
}

.deleted-page.active {
    display: block;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #ecf0f1;
    color: #2c3e50;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    transition: background 0.3s;
}

.back-btn:hover {
    background: #d5dbdb;
}

.deleted-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.deleted-header h2 {
    color: #2c3e50;
}

.submission-card.deleted {
    opacity: 0.8;
    border-left-color: #95a5a6;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #7f8c8d;
}

.empty-state .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Legend */
.legend {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-color.blue { background: #3498db; }
.legend-color.orange { background: #e67e22; }
.legend-color.purple { background: #9b59b6; }
.legend-color.teal { background: #16a085; }
.legend-color.green { background: #2ecc71; }

/* Job Update specific styles */
.job-info-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #2ecc71;
}

.job-info-box h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.job-info-box p {
    color: #7f8c8d;
    margin: 0.25rem 0;
}

.thank-you-message {
    text-align: center;
    padding: 2rem;
}

.thank-you-message .icon {
    font-size: 4rem;
    color: #2ecc71;
    margin-bottom: 1rem;
}

.thank-you-message h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.completion-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-completed {
    background: #2ecc71;
    color: white;
}

.btn-completed:hover {
    background: #27ae60;
}

.btn-not-completed {
    background: #e67e22;
    color: white;
}

.btn-not-completed:hover {
    background: #d35400;
}

.csv-load-section {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.csv-load-section p {
    margin-bottom: 0.5rem;
    color: #856404;
}

/* Job search results list */
.job-search-results {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    margin-top: 0.5rem;
    background: #fff;
}

.job-search-loading {
    padding: 1rem;
    text-align: center;
    color: #7f8c8d;
}

.job-search-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #ecf0f1;
    cursor: pointer;
    transition: background 0.2s;
}

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

.job-search-item:hover {
    background: #eafaf1;
}

.job-search-item .job-number {
    font-weight: bold;
    color: #2c3e50;
    margin-right: 0.5rem;
}

.job-search-item .job-type {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 0.5rem;
}

.job-search-item .job-type.type-a { background: #e8f6f3; color: #16a085; }
.job-search-item .job-type.type-d { background: #ebf5fb; color: #3498db; }
.job-search-item .job-type.type-s { background: #f5eef8; color: #9b59b6; }

.job-search-item .job-desc {
    display: block;
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.job-search-item .job-tech {
    font-size: 0.8rem;
    color: #95a5a6;
}

.job-search-empty {
    padding: 1rem;
    text-align: center;
    color: #e74c3c;
}

.job-search-count {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    color: #7f8c8d;
    font-size: 0.85rem;
    border-bottom: 1px solid #ecf0f1;
}

/* Photo upload styling */
.photo-upload-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.photo-upload-btn {
    flex: 1;
    min-width: 120px;
    padding: 1rem;
    border: 2px dashed #ecf0f1;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}

.photo-upload-btn:hover {
    border-color: #16a085;
    background: #e8f6f3;
}

.photo-upload-btn .icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.photo-preview {
    margin-top: 1rem;
    display: none;
}

.photo-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    border: 2px solid #ecf0f1;
}

.photo-preview.has-photo {
    display: block;
}

/* Multi-photo preview gallery */
.multi-photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.multi-photo-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #ecf0f1;
}

.multi-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.multi-photo-item .remove-photo {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.multi-photo-item .remove-photo:hover {
    background: #c0392b;
}

.photo-count {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* PDF preview styling in multi-photo gallery */
.multi-photo-item.pdf-item {
    background: #f8f9fa;
    border-color: #e74c3c;
}

.multi-photo-item .pdf-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 4px;
    box-sizing: border-box;
}

.multi-photo-item .pdf-icon {
    background: #e74c3c;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    margin-bottom: 4px;
}

.multi-photo-item .pdf-name {
    font-size: 0.6rem;
    color: #666;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .creation-cards {
        flex-direction: column;
        align-items: center;
    }

    .creation-card {
        width: 100%;
        max-width: 300px;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1;
        text-align: center;
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }

    .detail-list li {
        flex-direction: column;
    }

    .detail-label {
        min-width: auto;
        margin-bottom: 0.25rem;
    }
}

/* Login Screen Styles */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-overlay.hidden {
    display: none;
}

.login-container {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .logo {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.login-header h1 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.login-header p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #3498db;
}

.login-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1a5276);
    transform: translateY(-1px);
}

.login-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.login-error {
    background: #fdedec;
    color: #e74c3c;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    display: none;
}

.login-error.show {
    display: block;
}

/* User info in header */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

.user-name {
    font-size: 0.9rem;
    opacity: 0.9;
}

.user-name strong {
    opacity: 1;
}

.signout-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.signout-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Image Enlargement Modal */
.image-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.image-modal-overlay.active {
    display: flex;
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: -10px;
    background: #e74c3c;
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    transition: all 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.image-modal-close:hover {
    background: #c0392b;
    transform: scale(1.1);
}

#image-modal-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.image-modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s;
    z-index: 2001;
}

.image-modal-arrow:hover {
    background: rgba(255, 255, 255, 0.35);
}

.image-modal-prev {
    left: 1rem;
}

.image-modal-next {
    right: 1rem;
}

.image-modal-counter {
    text-align: center;
    color: white;
    font-size: 0.9rem;
    margin-top: 0.75rem;
    opacity: 0.8;
}

/* Clickable thumbnails in submission cards */
.clickable-thumbnail {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.clickable-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Mobile adjustments for image modal */
@media (max-width: 768px) {
    .image-modal-overlay {
        padding: 1rem;
    }

    .image-modal-close {
        top: -35px;
        right: 0;
        width: 32px;
        height: 32px;
        font-size: 1.25rem;
    }

    #image-modal-img {
        max-width: 100%;
        max-height: 80vh;
    }

    .image-modal-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .image-modal-prev {
        left: 0.5rem;
    }

    .image-modal-next {
        right: 0.5rem;
    }
}

/* Edit Button Styles */
.btn-edit {
    background: #3498db;
    color: white;
}

.btn-edit:hover {
    background: #2980b9;
}

/* Edit Modal Styles */
.edit-modal {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.edit-modal .modal-body {
    padding: 1.5rem;
}

.edit-modal .form-group {
    margin-bottom: 1.25rem;
}

.edit-modal .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.edit-modal .form-group input,
.edit-modal .form-group textarea,
.edit-modal .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.edit-modal .form-group input:focus,
.edit-modal .form-group textarea:focus,
.edit-modal .form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.edit-modal .form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.edit-modal .checkbox-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.edit-modal .checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.edit-modal .checkbox-option input[type="checkbox"] {
    width: auto;
}

/* Fix checkbox-group alignment in edit modal */
.edit-modal .form-group label.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

.edit-modal .form-group label.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Edit Photos Grid */
.edit-photos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.edit-photo-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ecf0f1;
}

.edit-photo-thumbnail {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
}

.btn-delete-photo {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-delete-photo:hover {
    background: #c0392b;
}

/* Card actions with edit button */
.card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card-actions .btn {
    flex: 1;
    min-width: 100px;
}

/* Tab Header Controls - Filter and Legend */
.tab-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tab-header-controls .legend {
    margin-bottom: 0;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    gap: 0.5rem;
    background: #f8f9fa;
    padding: 0.25rem;
    border-radius: 8px;
    border: 1px solid #ecf0f1;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: #7f8c8d;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 500;
}

.filter-btn:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.filter-btn.active {
    background: #3498db;
    color: white;
}

/* Mobile responsive for filter controls */
@media (max-width: 768px) {
    .tab-header-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-controls {
        justify-content: center;
    }

    .filter-btn {
        flex: 1;
        text-align: center;
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Part Order Parts Input */
#partorder-parts-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.part-input-header {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.part-qty-label {
    width: 55px;
    text-align: center;
    font-size: 0.85rem;
    color: #7f8c8d;
    font-weight: 500;
}

.part-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.part-input-row .part-info-input {
    flex: 1;
    min-width: 0;
    width: auto;
}

.part-input-row .part-qty-input,
.link-input-row .part-qty-input {
    width: 55px;
    min-width: 55px;
    max-width: 55px;
    text-align: center;
    flex-shrink: 0;
    padding: 0.75rem 0.25rem;
}

.btn-delete-part {
    width: 32px;
    height: 32px;
    padding: 0;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-delete-part:hover {
    background: #c0392b;
}

.btn-add-part {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    color: #7f8c8d;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    transition: all 0.2s;
}

.btn-add-part:hover {
    border-color: #e67e22;
    color: #e67e22;
    background: #fef5e7;
}

/* Part Order Links Input */
#partorder-links-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.link-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.link-input-row .part-link-input {
    flex: 1;
    min-width: 0;
    width: auto;
}

.btn-delete-link {
    width: 32px;
    height: 32px;
    padding: 0;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-delete-link:hover {
    background: #c0392b;
}

.btn-add-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    color: #7f8c8d;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    transition: all 0.2s;
}

.btn-add-link:hover {
    border-color: #3498db;
    color: #3498db;
    background: #ebf5fb;
}

/* Part Links Display in Cards */
.part-links-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.part-link {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    word-break: break-all;
    padding: 0.25rem 0.5rem;
    background: #ebf5fb;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.part-link:hover {
    background: #d4e6f1;
    text-decoration: underline;
}

.part-link::before {
    content: "🔗 ";
}

/* Acknowledge Button Styles */
.btn-acknowledge {
    background: #9b59b6;
    color: white;
}

.btn-acknowledge:hover {
    background: #8e44ad;
}

.btn-ack-small {
    background: none;
    border: none;
    color: #9b59b6;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    border-radius: 4px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.btn-ack-small:hover {
    background: rgba(155, 89, 182, 0.1);
}

.btn-download-small {
    background: #27ae60;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
    transition: background 0.2s;
    margin-left: 0.5rem;
}

.btn-download-small:hover {
    background: #219a52;
}

/* PDF download button in photos section */
.btn-download-pdf {
    background: #e74c3c;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: background 0.2s;
    margin: 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-download-pdf:hover {
    background: #c0392b;
}

.btn-download-pdf .pdf-icon {
    font-size: 1.1rem;
}

/* Acknowledged timeline status */
.timeline-acknowledged {
    display: block;
    font-size: 0.7rem;
    color: #9b59b6;
    margin-top: 0.25rem;
    font-style: italic;
}

/* ===== TRANSFER MULTI-PART STYLES ===== */

/* Collapsible Part Cards */
.transfer-part-card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: border-color 0.3s;
}

.transfer-part-card:hover {
    border-color: #16a085;
}

.transfer-part-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f0faf8;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.transfer-part-card-header:hover {
    background: #e0f5f0;
}

.transfer-part-card-header .part-title {
    font-weight: 600;
    color: #16a085;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transfer-part-card-header .part-title .part-summary {
    font-weight: 400;
    color: #7f8c8d;
    font-size: 0.85rem;
}

.transfer-part-card-header .card-toggle {
    font-size: 1rem;
    color: #7f8c8d;
    transition: transform 0.3s;
}

.transfer-part-card.collapsed .card-toggle {
    transform: rotate(-90deg);
}

.transfer-part-card-body {
    padding: 1rem;
    border-top: 1px solid #ecf0f1;
}

.transfer-part-card.collapsed .transfer-part-card-body {
    display: none;
}

.transfer-part-card-body .form-group {
    margin-bottom: 1rem;
}

.transfer-part-card-body .form-group:last-child {
    margin-bottom: 0;
}

/* Add/Remove Part Buttons */
.btn-add-transfer-part {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    color: #7f8c8d;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    transition: all 0.2s;
}

.btn-add-transfer-part:hover {
    border-color: #16a085;
    color: #16a085;
    background: #e8f6f3;
}

.btn-remove-transfer-part {
    width: 28px;
    height: 28px;
    padding: 0;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.btn-remove-transfer-part:hover {
    background: #c0392b;
}

/* Part Selection Checkbox List (Step 2 & 4) */
.transfer-part-checkbox-list {
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.transfer-part-checkbox-list .select-all-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f0faf8;
    border-bottom: 2px solid #16a085;
    cursor: pointer;
    font-weight: 600;
    color: #16a085;
    transition: background 0.2s;
}

.transfer-part-checkbox-list .select-all-row:hover {
    background: #e0f5f0;
}

.transfer-part-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.2s;
}

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

.transfer-part-checkbox-item:hover {
    background: #f8f9fa;
}

.transfer-part-checkbox-item input[type="checkbox"],
.transfer-part-checkbox-list .select-all-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #16a085;
    flex-shrink: 0;
}

.transfer-part-checkbox-item .part-checkbox-label {
    flex: 1;
}

.transfer-part-checkbox-item .part-checkbox-label .part-num {
    font-weight: 600;
    color: #2c3e50;
}

.transfer-part-checkbox-item .part-checkbox-label .part-desc {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

/* Parts Info Box (Step 4) */
.transfer-to-parts-info {
    background: #e8f6f3;
    border: 1px solid #16a085;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.transfer-to-parts-info .info-title {
    font-weight: 600;
    color: #16a085;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.transfer-to-parts-info .info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.transfer-to-parts-info .info-list li {
    padding: 0.25rem 0;
    color: #2c3e50;
    font-size: 0.9rem;
}

.transfer-to-parts-info .info-list li::before {
    content: "\2022";
    color: #16a085;
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Review Summary Table (Step 6) */
.transfer-review-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.transfer-review-table th {
    background: #16a085;
    color: white;
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.transfer-review-table th:first-child {
    border-radius: 8px 0 0 0;
}

.transfer-review-table th:last-child {
    border-radius: 0 8px 0 0;
}

.transfer-review-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #ecf0f1;
    color: #2c3e50;
    vertical-align: top;
}

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

.transfer-review-table tr:nth-child(even) {
    background: #f8f9fa;
}

.transfer-review-table .part-num-cell {
    font-weight: 600;
}

.transfer-review-table .location-cell {
    font-size: 0.85rem;
}

/* Edit Links container for part orders */
#edit-partorder-links-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1.5rem;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
}

/* ============================================================================
   PO SEARCH TAB
   ============================================================================ */

.po-search-container {
    max-width: 100%;
}

.po-search-header {
    margin-bottom: 1rem;
}

.po-search-header h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.po-stats-bar {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.po-stat {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.po-stat strong {
    color: #2c3e50;
}

.po-stat.invoiced strong { color: #27ae60; }
.po-stat.procured strong { color: #3498db; }
.po-stat.pending strong { color: #e67e22; }
.po-stat.vendors strong { color: #9b59b6; }

.po-search-bar {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 0.5rem;
}

.po-search-bar input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.po-search-bar input[type="text"]:focus {
    border-color: #3498db;
}

.po-filter-row {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.po-filter-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.po-filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
}

.po-filter-group select {
    padding: 0.4rem 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
    background: white;
    max-width: 180px;
}

.po-results-count {
    padding: 0.5rem 0;
    color: #7f8c8d;
    font-size: 0.85rem;
}

/* PO Table */
.po-table {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.po-table-header {
    display: grid;
    grid-template-columns: 80px 150px 1fr 90px 100px 80px 30px 30px;
    padding: 0.6rem 1rem;
    background: #2c3e50;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    gap: 0.5rem;
}

.po-row {
    display: grid;
    grid-template-columns: 80px 150px 1fr 90px 100px 80px 30px 30px;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85rem;
    cursor: default;
    transition: background 0.15s;
    gap: 0.5rem;
    align-items: center;
}

.po-row:hover {
    background: #f8f9fa;
}

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

.po-row-pending {
    background: #fef9e7;
}

.po-row-pending:hover {
    background: #fdf3cd;
}

.po-col {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.po-col-num strong {
    color: #2c3e50;
}

.po-col-vendor {
    color: #8e44ad;
}

.po-col-part {
    color: #555;
}

.po-col-job {
    color: #2980b9;
    font-weight: 500;
}

.po-col-date {
    color: #7f8c8d;
    font-size: 0.8rem;
}

.po-col-tech {
    color: #16a085;
}

.po-col-flags {
    text-align: center;
    font-weight: bold;
}

.po-sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.po-sortable:hover {
    background: rgba(255,255,255,0.15);
}

.po-sorted {
    background: rgba(255,255,255,0.1);
}

.flag-yes {
    color: #27ae60;
}

.flag-no {
    color: #ddd;
}

/* Mobile responsive for PO table */
@media (max-width: 768px) {
    .po-table-header {
        display: none;
    }

    .po-row {
        display: flex;
        flex-wrap: wrap;
        padding: 0.75rem 1rem;
        gap: 0.25rem 1rem;
    }

    .po-col {
        white-space: normal;
    }

    .po-col-num {
        font-size: 0.9rem;
        width: auto;
    }

    .po-col-vendor {
        width: auto;
    }

    .po-col-part {
        width: 100%;
        font-size: 0.8rem;
    }

    .po-col-job,
    .po-col-date,
    .po-col-tech {
        font-size: 0.8rem;
    }

    .po-filter-row {
        flex-direction: column;
    }

    .po-filter-group select {
        max-width: 100%;
        flex: 1;
    }
}

/* ============================================================================
   TO SCHEDULE TAB
   ============================================================================ */

.sched-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.sched-header {
    margin-bottom: 1rem;
}

.sched-header h2 {
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.sched-subtitle {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.sched-search-bar {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 0.75rem;
}

.sched-search-bar input[type="text"] {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.sched-search-bar input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52,152,219,0.15);
}

.sched-filter-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.sched-filter-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.sched-filter-group label {
    font-size: 0.85rem;
    color: #555;
    white-space: nowrap;
}

.sched-filter-group select {
    padding: 0.35rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
    max-width: 160px;
}

.sched-results-count {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    color: #555;
    flex-wrap: wrap;
}

.sched-stat {
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.sched-stat.ready {
    background: #d5f5e3;
    color: #1e8449;
}

.sched-stat.partial {
    background: #fdebd0;
    color: #b7950b;
}

.sched-stat.none {
    background: #eaecee;
    color: #7f8c8d;
}

/* Schedule Table */
.sched-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sched-table-header {
    display: grid;
    grid-template-columns: 90px 70px 1fr 100px 110px 90px;
    background: #2c3e50;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.6rem 1rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sched-row {
    display: grid;
    grid-template-columns: 90px 70px 1fr 100px 110px 90px;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
    align-items: center;
}

.sched-row:hover {
    background: #f8f9fa;
}

.sched-row-ready {
    background: #f0faf4;
}

.sched-row-ready:hover {
    background: #e0f5ea;
}

.sched-col {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 0.5rem;
}

.sched-sortable {
    cursor: pointer;
    user-select: none;
}

.sched-sortable:hover {
    background: rgba(255,255,255,0.15);
}

.sched-sorted {
    background: rgba(255,255,255,0.1);
}

/* Type badges */
.sched-type {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
}

.sched-type-D {
    background: #d4efdf;
    color: #1e8449;
}

.sched-type-A {
    background: #d6eaf8;
    color: #2471a3;
}

.sched-type-S {
    background: #f5eef8;
    color: #7d3c98;
}

/* Parts status badges */
.sched-parts-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.sched-parts-badge.ready {
    background: #27ae60;
    color: white;
}

.sched-parts-badge.partial {
    background: #f39c12;
    color: white;
}

.sched-parts-badge.none {
    background: #eaecee;
    color: #95a5a6;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .sched-table-header {
        display: none;
    }

    .sched-row {
        display: flex;
        flex-wrap: wrap;
        padding: 0.75rem 1rem;
        gap: 0.25rem 1rem;
    }

    .sched-col {
        white-space: normal;
    }

    .sched-col-job {
        width: auto;
        font-size: 0.9rem;
    }

    .sched-col-type {
        width: auto;
    }

    .sched-col-desc {
        width: 100%;
        font-size: 0.8rem;
    }

    .sched-col-tech,
    .sched-col-ordered {
        font-size: 0.8rem;
    }

    .sched-filter-row {
        flex-direction: column;
    }

    .sched-filter-group select {
        max-width: 100%;
        flex: 1;
    }
}
