/* ==========================================================================
   Ground QC Web Viewer - Refactored Stylesheet
   ========================================================================== */

:root {
    --primary-color: #4a90e2;
    --secondary-color: #50c878;
    --accent-color: #ff6b6b;
    --background-color: #f9fafb;
    --text-color: #333333;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--primary-color);
    margin-top: 20px;
    padding-bottom: 20px;
}

h3 {
    font-size: 1.5rem;
    color: black;
}

h4 {
    font-size: 1.2rem;
    color: var(--accent-color);
}

img {
    display: block;
    max-width: 90%;
    height: auto;
    margin: 30px auto;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    margin: 0;
}

.btn:hover {
    background-color: #3a7bd5;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #3a7bd5;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

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

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.4);
}

/* Button Variants */
.btn-edit {
    background-color: var(--primary-color);
    color: white;
}

.btn-edit:hover {
    background-color: #357abd;
}

.btn-danger {
    background-color: var(--accent-color);
    color: white;
}

.btn-danger:hover {
    background-color: #ff5252;
}

/* Specific Button IDs */
#editDetailsButton {
    background-color: #6b7280;
    color: white;
    border: 1px solid #6b7280;
    transition: all 0.2s ease;
}

#editDetailsButton:hover {
    background-color: #4b5563;
    border-color: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(107, 114, 128, 0.3);
}

#uploadButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#uploadButton:hover {
    background-color: #3a7bd5;
}

.upload-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

/* ==========================================================================
   Upload Container
   ========================================================================== */

.upload-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   ZIP List Styles
   ========================================================================== */

.zip-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#zipListItems {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.zip-list-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.zip-list-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.15);
    transform: translateY(-2px);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.zip-list-item.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
}

.zip-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1e293b;
    flex: 1;
    word-break: break-all;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.zip-list-item:hover .zip-name {
    color: var(--primary-color);
}

.zip-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Delete ZIP Button */
.btn-delete-zip {
    background-color: var(--accent-color);
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-delete-zip:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
}

/* ==========================================================================
   Ground QC Manager Layout
   ========================================================================== */

.ground-qc-manager {
    display: flex;
    height: 80vh;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.sidebar {
    width: 350px;
    background-color: #f8f9fa;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* User Selector */
.user-selector-container {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background: white;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.selector-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.selector-controls .btn {
    width: 100%;
    justify-content: center;
}

#userSelector {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

#userSelector:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

/* QC List Container */
.qc-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Split View */
.split-view-container {
    display: flex;
    height: 100%;
    gap: 20px;
}

.split-view {
    display: flex;
    width: 100%;
    gap: 20px;
margin-top: 20px;}

.left-panel {
    width: 350px;
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 0;
    overflow-y: auto;
}

.right-panel {
    flex: 1;
    background-color: white;
    border-radius: 12px;
    padding: 0;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
}

.panel-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.panel-tab {
    flex: 1;
    padding: 16px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #64748b;
    transition: all 0.2s ease;
    border-radius: 12px 12px 0 0;
}

.panel-tab:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.panel-tab.active {
    background: white;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.panel-content {
    padding: 20px;
}

/* ==========================================================================
   QC Points and Content
   ========================================================================== */

.qc-points-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.qc-point {
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    background-color: white;
    transition: var(--transition);
}

.qc-point:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qc-point.expanded {
    border-color: var(--primary-color);
}

.point-header {
    padding: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.point-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.point-summary {
    display: flex;
    gap: 20px;
    align-items: center;
}

.point-summary-content {
    display: flex;
    gap: 15px;
}

.summary-label {
    font-weight: 500;
    color: #666;
}

.summary-value {
    font-weight: 600;
    color: var(--primary-color);
}

.point-content {
    padding: 20px;
    display: none;
}

.qc-point.expanded .point-content {
    display: block;
}

.point-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Point Images */
.point-image {
    width: 200px;
    height: 150px;
    border: 2px dashed #ddd;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.point-image:hover {
    border-color: var(--primary-color);
    background-color: #f0f9ff;
}

.point-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.point-image img:hover {
    transform: scale(1.05);
}

/* Image Upload */
.image-upload-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.point-image:hover .image-upload-container {
    opacity: 1;
}

.image-upload {
    color: white;
    font-size: 24px;
}

/* Point Visibility */
.point-visibility-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 8px;
}

.point-visibility-checkbox:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.point-visibility-checkbox:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Point Type Toggle */
.point-type-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.toggle-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.toggle-btn:hover {
    background-color: #f8f9fa;
}

.toggle-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ==========================================================================
   Forms and Inputs
   ========================================================================== */

.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.form-group:not(.modal-qc-point .form-group) {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    max-width: 100%;
}

.form-control:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    outline: none;
}

.qc-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.qc-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

/* Parameter Forms */
.parameter-form {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.parameter-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.parameter-name {
    min-width: 120px;
    font-weight: 500;
}

.parameter-value {
    width: 100px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.parameter-unit {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.parameter-status {
    margin-top: 1rem;
}

.parameter-status input[type="checkbox"]:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.parameter-status input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Readonly Fields */
.readonly-field {
    background-color: #f0f0f0;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Point Name Input */
.point-name-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 15px;
}

.point-name-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

/* Scenario Select */
.scenario-form {
    margin-bottom: 20px;
}

.scenario-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.scenario-select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

/* ==========================================================================
   Modals
   ========================================================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 2vh auto;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    max-height: 96vh;
    display: flex;
    flex-direction: column;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-sizing: border-box;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    box-sizing: border-box;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    box-sizing: border-box;
}

.modal-footer {
    padding: 25px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    box-sizing: border-box;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: none;
}

.close:hover {
    color: black;
}

/* Specific Modal Styles */
#editModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

/* ==========================================================================
   PDF Controls and Lists
   ========================================================================== */

.pdf-merge-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    min-height: 200px;
    border: 2px dashed #ddd;
    border-radius: var(--border-radius);
    padding: 20px;
}

.pdf-merge-item {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 10px;
    cursor: move;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pdf-merge-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pdf-merge-item-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.drag-handle {
    cursor: grab;
    color: #666;
    font-size: 18px;
}

.drag-handle:active {
    cursor: grabbing;
}

.pdf-merge-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pdf-merge-title {
    font-weight: 600;
    color: var(--text-color);
}

.pdf-merge-type {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.remove-from-merge {
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.remove-from-merge:hover {
    background-color: #ff5252;
    transform: scale(1.1);
}

/* Page Number Section */
.page-number-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
}

.page-number-input input[type="number"] {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.page-number-input input[type="number"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

/* ==========================================================================
   Loading Overlay
   ========================================================================== */

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loadingContent {
    text-align: center;
    padding: 40px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.loadingContent img {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.loadingContent p {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-color);
    margin: 0;
}

/* ==========================================================================
   Status and Grade Classes
   ========================================================================== */

.status-completed {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.status-failed {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.grade-pass {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.grade-fail {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.grade-neutral {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* ==========================================================================
   Checkboxes
   ========================================================================== */

.qc-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 10px;
}

.qc-checkbox:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.qc-checkbox:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.big-checkbox {
    transform: scale(1.5);
    margin: 10px;
}

/* ==========================================================================
   Content Container and Panels
   ========================================================================== */

.content-container {
    display: flex;
    gap: 20px;
    height: 100%;
}

/* Panel Tabs */
.panel-tab {
    padding: 10px 20px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-bottom: none;
    cursor: pointer;
    transition: var(--transition);
}

.panel-tab:hover {
    background-color: #e9ecef;
}

.panel-tab.active {
    background-color: white;
    border-bottom: 1px solid white;
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 20px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

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

.tab-panel {
    display: none;
}

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

.tab-button {
    padding: 10px 20px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: var(--transition);
}

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

.tab-button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.text-muted {
    color: #6c757d;
}

.selected {
    background-color: #e3f2fd;
    border-color: var(--primary-color);
}


.hidden {
    display: none;
}

.show {
    display: block;
}

.hide {
    display: none;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .ground-qc-manager {
        flex-direction: column;
        height: auto;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .split-view {
        flex-direction: column;
    }
    
    .left-panel {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .btn {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
    
    .list-group-item {
        padding: 8px 12px;
    }
    
    .btn-delete-zip {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .parameter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .point-summary-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px auto;
        height: 95%;
    }
    
    .qc-section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .qc-section-header h3 {
        text-align: center;
        font-size: 1.3rem;
    }
    
    .qc-actions {
        justify-content: center;
    }
    
    .btn-large {
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    .empty-state {
        padding: 40px 20px;
        margin: 20px 0;
        min-height: 250px;
    }
    
    .empty-state i {
        font-size: 3rem;
    }
    
    .qc-averages-section {
        margin-top: 20px;
        padding: 16px;
    }
    
    .qc-averages-section h5 {
        font-size: 1.1rem;
    }
    
    .qc-averages-section thead th {
        padding: 12px 8px;
        font-size: 0.8rem;
    }
    
    .qc-averages-section tbody td {
        padding: 10px 8px;
        font-size: 0.8rem;
    }
    
    .qc-averages-section tbody tr:hover {
        transform: none;
    }
    
}

@media (max-width: 640px) {
    .point-image {
        width: 100%;
        height: 120px;
    }
    
    .pdf-merge-item-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .no-print {
        display: none !important;
    }
    
    .modal {
        display: none !important;
    }
    
    body {
        background-color: white;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}

/* ==========================================================================
   Message Container Styles
   ========================================================================== */

.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.message {
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    border-left: 4px solid;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.message.show {
    transform: translateX(0);
    opacity: 1;
}

.message.hide {
    transform: translateX(400px);
    opacity: 0;
}

.message.success {
    background: rgba(212, 237, 218, 0.95);
    color: #155724;
    border-left-color: var(--secondary-color);
}

.message.error {
    background: rgba(248, 215, 218, 0.95);
    color: #721c24;
    border-left-color: var(--accent-color);
}

.message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(45deg, transparent 20%, rgba(255, 255, 255, 0.4) 50%, transparent 80%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* Mobile responsiveness for messages */
@media (max-width: 768px) {
    .message-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .message {
        transform: translateY(-100px);
    }
    
    .message.show {
        transform: translateY(0);
    }
    
    .message.hide {
        transform: translateY(-100px);
    }
}

/* ==========================================================================
   Focus Styles for Accessibility
   ========================================================================== */

.focus-visible:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ==========================================================================
   Animations
   ========================================================================== */

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

.modal-content {
    animation: fadeIn 0.3s ease;
}

/* ==========================================================================
   Modal QC Point Styles
   ========================================================================== */

.modal-qc-point {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 16px;
    background: white;
    overflow: hidden;
}

.modal-qc-point .point-header {
    background: #f8fafc;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-qc-point .point-header h6 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.modal-qc-point .point-content {
    display: block !important;
    padding: 0;
}

.point-content-row {
    display: flex;
    gap: 20px;
    padding: 16px;
}

.point-image-section {
    flex: 0 0 200px;
    position: relative;
}

.point-image-section img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    display: block;
    margin: 0;
}

.hidden-file-input {
    display: none;
}

.btn-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.point-image-section:hover .btn-upload-overlay {
    opacity: 1;
}

.point-form-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.point-type-toggle {
    margin-bottom: 16px;
}

.point-type-toggle label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.toggle-buttons {
    display: flex;
    gap: 8px;
}

.toggle-btn {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
    transition: all 0.2s ease;
}

.toggle-btn:hover {
    background: #f8fafc;
    border-color: #9ca3af;
}

.toggle-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.point-data-section {
    flex: 1;
}

.parameter-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row-inline {
    display: flex;
    gap: 16px;
}

.form-row-inline .form-group {
    flex: 1;
}

.modal-qc-point .form-group {
    margin-bottom: 0;
}

.modal-qc-point .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.modal-qc-point .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.modal-qc-point .form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.modal-qc-point .form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.qc-points-section {
    margin-top: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.section-header h5 {
    margin: 0;
    color: #1e293b;
    font-size: 1.2rem;
    font-weight: 600;
}

.qc-points-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.modal .qc-points-list {
    max-height: none;
    overflow-y: visible;
}

/* ===========================================================================
   Header Field Customization Styles
   ========================================================================== */

/* Inline checkbox with label styling */
.field-label-with-checkbox {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.field-label-with-checkbox .label-text {
    flex: 1;
}

.header-field-checkbox {
    margin-left: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.header-field-checkbox:hover {
    transform: scale(1.1);
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .field-label-with-checkbox {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .header-field-checkbox {
        margin-left: 0;
        align-self: flex-end;
    }
}

/* ==========================================================================
   QC Averages Section Styles
   ========================================================================== */

.qc-averages-section {
    margin-top: 18px;
    padding: 24px;
}

.qc-averages-section h5 {
    margin: 0 0 20px 0;
    color: #1e293b;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qc-averages-section h5:before {
    content: "📊";
    font-size: 1.1rem;
}

.qc-averages-section table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qc-averages-section thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, #357abd 100%);
    color: white;
}

.qc-averages-section thead th {
    padding: 16px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.qc-averages-section tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #e2e8f0;
}

.qc-averages-section tbody tr:last-child {
    border-bottom: none;
}

.qc-averages-section tbody tr:hover {
    background: #f0f9ff;
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.1);
}

.qc-averages-section tbody td {
    padding: 14px 12px;
    font-size: 0.9rem;
    color: #374151;
    border: none;
    vertical-align: middle;
}

.qc-averages-section tbody td:first-child {
    text-align: center;
    width: 80px;
}

.qc-averages-section tbody td:nth-child(2) {
    font-weight: 500;
    color: #1e293b;
}

.qc-averages-section tbody td:nth-child(3) {
    font-weight: 600;
    color: var(--primary-color);
}

.qc-averages-section tbody td:nth-child(4) {
    color: #64748b;
    font-style: italic;
}

.qc-averages-section input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.qc-averages-section input[type="checkbox"]:hover {
    transform: scale(1.1);
}

.qc-averages-section p {
    color: #64748b;
    font-style: italic;
    text-align: center;
    padding: 40px 20px;
    margin: 0;
    background: white;
    border-radius: 8px;
    border: 2px dashed #cbd5e1;
}

/* Empty state styling */
.qc-averages-section .empty-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 20px;
    background: white;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
}

.qc-averages-section .empty-message:before {
    content: "📋";
    font-size: 2rem;
    opacity: 0.5;
}

/* ==========================================================================
   QC Content Styles
   ========================================================================== */

.qc-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
}

.qc-section-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 1.5rem;
}

.qc-actions {
    display: flex;
    gap: 12px;
}

.qc-content {
    flex: 1;
    overflow-y: auto;
}

.qc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    padding-right: 8px;
}

.qc-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.qc-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.15);
    transform: translateY(-2px);
}

.qc-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
}

.qc-card-header {
    margin-bottom: 16px;
}

.qc-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.qc-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.1rem;
    line-height: 1.3;
}

.qc-card-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qc-stats {
    display: flex;
    gap: 24px;
}

.qc-stat {
    text-align: center;
}

.qc-stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.qc-stat-label {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.qc-points-preview {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
}

.qc-points-preview h6 {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
}

.points-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.point-badge {
    background: #e2e8f0;
    color: #475569;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.point-badge.parameter {
    background: #dbeafe;
    color: #1e40af;
}

.qc-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: auto;
}

.btn-edit {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-edit:hover {
    background: #3a7bd5;
    transform: translateY(-1px);
}

.btn-delete {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-delete:hover {
    background: #ff5252;
    transform: translateY(-1px);
}

/* ==========================================================================
   Empty State Styles
   ========================================================================== */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    margin: 40px 0;
    min-height: 300px;
}

.empty-state i {
    font-size: 4rem;
    color: #94a3b8;
    margin-bottom: 24px;
}

.empty-state h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 16px 0;
}

.empty-state p {
    font-size: 1rem;
    color: #64748b;
    margin: 0 0 32px 0;
    max-width: 400px;
    line-height: 1.6;
}

/* ==========================================================================
   Map Data Container Styles
   ========================================================================== */

.map-data-container {
    padding: 20px;
}

.map-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.map-section-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 1.5rem;
}

.map-actions {
    display: flex;
    gap: 12px;
}

.map-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.map-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.map-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.15);
    transform: translateY(-2px);
}

.map-image-container {
    position: relative;
    background: #f8fafc;
    border-radius: 8px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
}

.map-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.map-image-container:hover .map-overlay {
    opacity: 1;
}

.btn-overlay {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
}

.btn-overlay:hover {
    background: #3a7bd5;
    transform: scale(1.1);
}

.map-card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.map-title-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    background: white;
    transition: all 0.2s ease;
}

.map-title-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.map-actions-row {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* ==========================================================================
   PDF Controls Enhanced Styles
   ========================================================================== */

#pdfControls {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-top: 20px;
    overflow: hidden;
}

#pdfListContainer {
    padding: 20px;
}

/* PDF Section Styles */
.pdf-tab-content {
    min-height: 200px;
}

.pdf-section {
    margin-bottom: 32px;
}

.pdf-section:last-child {
    margin-bottom: 0;
}

.pdf-section-header {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
}

.pdf-list-section {
    /* Container for PDF list items */
}

.pdf-list-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    cursor: grab;
}

.pdf-list-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.15);
}

.pdf-list-item:active {
    cursor: grabbing;
}

.pdf-checkbox {
    display: flex;
    align-items: center;
}

.pdf-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.pdf-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pdf-title {
    font-weight: 500;
    color: #1e293b;
    font-size: 0.9rem;
    line-height: 1.3;
}

.pdf-type {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pdf-actions {
    display: flex;
    gap: 8px;
}

.view-pdf, .download-pdf {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.view-pdf:hover, .download-pdf:hover {
    background: #3a7bd5;
    transform: translateY(-1px);
}

.pdf-merge-controls {
    padding: 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
}

.merge-controls-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: #64748b;
}

#selectedCount {
    font-weight: 500;
    color: var(--primary-color);
}

.pdf-drag-container {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-top: 20px;
    padding: 20px;
}

.pdf-drag-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.pdf-drag-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 1.3rem;
}

.pdf-drag-tabs {
    display: flex;
    gap: 8px;
}

.pdf-drag-tab-button {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
    transition: all 0.2s ease;
}

.pdf-drag-tab-button:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.pdf-drag-tab-button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pdf-merge-list {
    list-style: none;
    padding: 20px;
    margin: 0;
    min-height: 200px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pdf-merge-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    cursor: move;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pdf-merge-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.15);
}

.pdf-merge-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.drag-handle {
    cursor: grab;
    color: #94a3b8;
    font-size: 18px;
    margin-right: 8px;
}

.drag-handle:active {
    cursor: grabbing;
}

.pdf-merge-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pdf-merge-title {
    font-weight: 500;
    color: #1e293b;
    font-size: 0.9rem;
}

.pdf-merge-type {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.remove-from-merge {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
}

.remove-from-merge:hover {
    background: #ff5252;
    transform: scale(1.1);
}

.page-number-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.page-number-input {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.page-number-input label {
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

.page-number-input input[type="number"] {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.page-number-input input[type="number"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.qc-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qc-input {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qc-input label {
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
    min-width: 140px;
}

.qc-input input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.qc-input input[type="text"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

#mergeDraggedPDFs {
    width: 100%;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 20px;
}

/* ==========================================================================
   Combined PDF Container Styles
   ========================================================================== */

.pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0 20px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0;
}

.pdf-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 1.4rem;
}

.pdf-selection-area {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.selection-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.pdf-merge-section {
    padding: 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.merge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.merge-header h4 {
    margin: 0;
    color: #1e293b;
    font-size: 1.2rem;
}

.merge-actions {
    display: flex;
    gap: 12px;
}

.qc-merge-controls {
    margin-top: 20px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.qc-merge-controls .qc-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qc-merge-controls .qc-input {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qc-merge-controls .qc-input label {
    font-weight: 500;
    color: #374151;
    min-width: 140px;
    white-space: nowrap;
}

.qc-merge-controls .qc-input input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.qc-merge-controls .qc-input input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Enhanced merge list for better drag feedback */
.pdf-merge-list.drag-over {
    border-color: var(--primary-color);
    background: #f0f9ff;
}

.pdf-merge-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.pdf-merge-item {
    transition: all 0.2s ease;
    cursor: grab;
}

.pdf-merge-item:active {
    cursor: grabbing;
}

.pdf-merge-item[draggable="true"]:hover {
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
}

/* Drag drop zone indicators */
.pdf-merge-item.drag-over-top {
    border-top: 2px solid var(--primary-color);
}

.pdf-merge-item.drag-over-bottom {
    border-bottom: 2px solid var(--primary-color);
}

/* Enhanced drag and drop placeholder */
.pdf-merge-placeholder {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    margin: 8px 0;
    padding: 20px;
    text-align: center;
    color: var(--primary-color);
    font-weight: 600;
    opacity: 0.8;
    transition: all 0.2s ease;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-merge-placeholder:hover {
    background: linear-gradient(135deg, #e0f2fe 0%, #b3e5fc 100%);
    opacity: 1;
}

.placeholder-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.placeholder-content:before {
    content: "⬇";
    font-size: 18px;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* Enhanced dragging state */
.pdf-merge-item.dragging {
    opacity: 0.6;
    transform: rotate(3deg) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: none;
}

/* Improved drag handle */
.drag-handle {
    color: #94a3b8;
    cursor: grab;
    user-select: none;
    transition: color 0.2s ease;
}

.drag-handle:hover {
    color: var(--primary-color);
}

.pdf-merge-item.dragging .drag-handle {
    cursor: grabbing;
}

/* Original drag-over styling */
.pdf-merge-item.drag-over {
    border: 2px solid var(--primary-color);
    background: #f0f9ff;
    transform: scale(1.02);
}