/* ==========================================
   Textile QC System - Professional Light Theme
   ========================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f7fa;
    color: #1a202c;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================
   Header
   ========================================== */
.header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
}

.header-title h1 {
    font-size: 1.25rem;
    color: #0066cc;
    font-weight: 700;
}

.header-title .subtitle {
    font-size: 0.8rem;
    color: #64748b;
}

.version-badge {
    background: linear-gradient(135deg, #0066cc, #0088ff);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ==========================================
   Code Download Button & Dropdown
   ========================================== */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==========================================
   Language Toggle Switch
   ========================================== */
.language-toggle-container {
    display: flex;
    align-items: center;
}

.language-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-flag-side {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.5;
    filter: grayscale(0.3);
}

.toggle-flag-side .flag-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Active flag styling - Turkish selected */
.language-toggle-wrapper.lang-tr-active .toggle-flag-tr {
    opacity: 1;
    filter: grayscale(0);
    transform: scale(1.1);
}

.language-toggle-wrapper.lang-tr-active .toggle-flag-tr .flag-img {
    border-color: #0066cc;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.25);
}

/* Active flag styling - English selected */
.language-toggle-wrapper.lang-en-active .toggle-flag-en {
    opacity: 1;
    filter: grayscale(0);
    transform: scale(1.1);
}

.language-toggle-wrapper.lang-en-active .toggle-flag-en .flag-img {
    border-color: #0066cc;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.25);
}

.language-toggle-switch {
    position: relative;
    width: 70px;
    height: 36px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    order: 2;
}

.language-toggle-switch:focus-visible {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
    border-radius: 20px;
}

.toggle-track {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-radius: 20px;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.language-toggle-switch:hover .toggle-track {
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.12);
}

.language-toggle-switch.toggle-active .toggle-track {
    background: linear-gradient(135deg, #0066cc 0%, #0088ff 100%);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.15),
        0 4px 16px rgba(0, 102, 204, 0.3);
}

.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 50%;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.15),
        0 1px 3px rgba(0, 0, 0, 0.2),
        inset 0 -1px 2px rgba(255, 255, 255, 0.8);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.language-toggle-switch.toggle-active .toggle-slider {
    transform: translateX(34px);
    box-shadow:
        0 3px 10px rgba(0, 102, 204, 0.25),
        0 1px 4px rgba(0, 102, 204, 0.2),
        inset 0 -1px 2px rgba(255, 255, 255, 0.9);
}

/* Flag positioning */
.toggle-flag-tr {
    order: 1;
}

.toggle-flag-en {
    order: 3;
}

/* Hover effect on flags */
.toggle-flag-side:hover {
    transform: scale(1.15);
    opacity: 0.8;
}

.language-toggle-wrapper.lang-tr-active .toggle-flag-tr:hover,
.language-toggle-wrapper.lang-en-active .toggle-flag-en:hover {
    opacity: 1;
    filter: grayscale(0);
}

/* Hover effect on toggle */
.language-toggle-switch:hover .toggle-slider {
    transform: scale(1.05);
}

.language-toggle-switch.toggle-active:hover .toggle-slider {
    transform: translateX(34px) scale(1.05);
}

/* Active/pressed state */
.language-toggle-switch:active .toggle-slider {
    transform: scale(0.95);
}

.language-toggle-switch.toggle-active:active .toggle-slider {
    transform: translateX(34px) scale(0.95);
}

/* Google Colab Logo */
.colab-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
}

/* ==========================================
   Feedback Header Button
   ========================================== */
.btn-feedback-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ea580c;
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.08), rgba(249, 115, 22, 0.12));
    border: 2px solid rgba(234, 88, 12, 0.3);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    white-space: nowrap;
}

.btn-feedback-header:hover {
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.15), rgba(249, 115, 22, 0.2));
    border-color: #ea580c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.2);
}

.btn-feedback-header:active {
    transform: translateY(0);
}


/* ==========================================
   Datasheet Download Button (Red)
   ========================================== */
.datasheet-download-container {
    position: relative;
    margin-left: 12px;
}

.btn-datasheet-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #dc2626;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.08), rgba(239, 68, 68, 0.12));
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    white-space: nowrap;
}

.btn-datasheet-download:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(239, 68, 68, 0.2));
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.btn-datasheet-download:active {
    transform: translateY(0);
}

.btn-datasheet-download .chevron {
    transition: transform 0.25s ease;
}

.btn-datasheet-download.active .chevron {
    transform: rotate(180deg);
}

.datasheet-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 320px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
}

.datasheet-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}



.dropdown-header {
    padding: 14px 18px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    border-bottom: 1px solid #f1f5f9;
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f8fafc;
}

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

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.04), rgba(0, 136, 255, 0.08));
}

.dropdown-item-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.dropdown-item-left svg {
    color: #0066cc;
    flex-shrink: 0;
}

.dropdown-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1a202c;
}

.dropdown-item-desc {
    font-size: 0.75rem;
    color: #64748b;
}

.btn-help {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-help:hover {
    background: #0066cc;
    border-color: #0066cc;
    color: white;
    transform: scale(1.08);
}

/* ==========================================
   Help Dialog
   ========================================== */
.help-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 24px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.help-dialog {
    background: white;
    border-radius: 16px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.help-dialog-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #0066cc, #0088ff);
    color: white;
    position: relative;
}

.help-dialog-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.help-dialog-icon svg {
    width: 20px;
    height: 20px;
}

.help-dialog-header h3 {
    flex: 1;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    min-width: 0;
}

.help-dialog-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.help-dialog-close:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

.help-dialog-close:active {
    transform: scale(1.05);
}

.help-dialog-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.help-dialog-body h4 {
    font-size: 0.95rem;
    color: #1a202c;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.help-dialog-body p {
    color: #475569;
    line-height: 1.6;
    margin: 0 0 12px;
    font-size: 0.875rem;
}

.help-dialog-body ul {
    margin: 0 0 12px;
    padding-left: 18px;
}

.help-dialog-body li {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.help-dialog-body .highlight-box {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.06), rgba(0, 136, 255, 0.1));
    border-left: 4px solid #0066cc;
    border-radius: 0 8px 8px 0;
    padding: 12px 14px;
    margin-top: 12px;
}

.help-dialog-body .highlight-box p {
    margin: 0;
    color: #0066cc;
    font-weight: 500;
    font-size: 0.8rem;
}

/* GitHub Help Content Styles */
.github-help-content {
    color: #1a202c;
}

.github-help-content h4 {
    font-size: 0.95rem;
    color: #1a202c;
    margin: 0 0 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.github-description {
    color: #475569;
    line-height: 1.6;
    margin: 0 0 16px;
    font-size: 0.85rem;
}

.github-info-box {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.04), rgba(0, 136, 255, 0.08));
    border-radius: 10px;
    padding: 12px;
    margin: 14px 0;
    border: 1px solid rgba(0, 102, 204, 0.1);
}

.github-info-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    color: #334155;
    font-size: 0.8rem;
    line-height: 1.5;
}

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

.github-info-item svg {
    color: #0066cc;
    margin-top: 2px;
}

.github-contact-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.github-contact-section h5 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.github-contact-methods {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.github-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    color: #475569;
    font-size: 0.8rem;
    line-height: 1.4;
}

.github-contact-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateX(2px);
}

.github-contact-item svg {
    color: #0066cc;
    flex-shrink: 0;
}

.github-email-link {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.github-email-link:hover {
    color: #0052a3;
    text-decoration: underline;
}

/* GitHub dropdown item styling */
.dropdown-item-github {
    border-top: 1px solid #e2e8f0;
    margin-top: 4px;
    padding-top: 12px;
}

.dropdown-item-github:hover {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.04), rgba(0, 136, 255, 0.08));
}

.help-dialog-footer {
    padding: 14px 20px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

/* ==========================================
   Main Content
   ========================================== */
.main-content {
    flex: 1;
    padding: 24px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.page-header {
    text-align: center;
    margin-bottom: 24px;
}

.page-header h2 {
    color: #0066cc;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.page-header p {
    color: #64748b;
}

/* ==========================================
   Image Viewer
   ========================================== */
.image-viewer-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 24px;
}

.image-viewer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 450px;
}

.viewer-panel {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e2e8f0;
}

.viewer-panel:last-child {
    border-right: none;
}

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

.panel-title {
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.ref {
    background: #0066cc;
}

.dot.sample {
    background: #00c853;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-info-name {
    flex: 1;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 500;
    color: #475569;
    max-width: 180px;
    margin: 0 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 3px 10px;
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.08), rgba(100, 116, 139, 0.04));
    border-radius: 6px;
}

.panel-info-name:empty {
    display: none;
}

.panel-info-right {
    display: flex;
    align-items: center;
}

.panel-info-dimensions {
    display: none;
    font-size: 0.72rem;
    color: #64748b;
    font-family: 'SF Mono', SFMono-Regular, Consolas, monospace;
    padding: 2px 8px;
    background: rgba(100, 116, 139, 0.1);
    border-radius: 4px;
    white-space: nowrap;
}

.panel-info-empty {
    font-size: 0.75rem;
    color: #94a3b8;
    font-style: italic;
}

.panel-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
    min-height: 400px;
    cursor: crosshair;
}

/* Upload Placeholder */
.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 12px;
}

.upload-placeholder:hover {
    background: rgba(0, 102, 204, 0.05);
}

.upload-placeholder:hover svg {
    color: #0066cc;
    transform: translateY(-4px);
}

.upload-placeholder svg {
    color: #94a3b8;
    transition: all 0.2s;
}

.upload-placeholder span {
    font-weight: 500;
    color: #475569;
}

.upload-placeholder small {
    color: #94a3b8;
}

/* Image Preview */
.image-preview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Image Info Bar - Displayed below header, outside image area */
.image-info-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-bottom: 1px solid #cbd5e1;
    font-size: 0.82rem;
}

.image-info-bar .info-name {
    color: #1e293b;
    font-weight: 600;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-info-bar .info-dimensions {
    color: #475569;
    font-family: 'SF Mono', SFMono-Regular, Consolas, monospace;
    font-size: 0.78rem;
    padding: 4px 10px;
    background: rgba(0, 102, 204, 0.12);
    border-radius: 6px;
    letter-spacing: 0.02em;
    font-weight: 500;
}

/* Region Selection Overlay */
.region-overlay,
.shape-overlay {
    position: absolute;
    pointer-events: none;
    border: 3px solid #00d4ff;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.9),
        0 0 0 4px rgba(0, 212, 255, 0.3),
        0 0 30px rgba(0, 212, 255, 0.4),
        inset 0 0 20px rgba(0, 212, 255, 0.1);
    width: 100px;
    height: 100px;
    z-index: 10;
    cursor: grab;
}

.region-overlay.placed,
.shape-overlay.placed {
    pointer-events: auto;
    opacity: 1;
}

.region-overlay.dragging,
.shape-overlay.dragging {
    cursor: grabbing;
    border-color: #00ff88;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 1),
        0 0 0 4px rgba(0, 255, 136, 0.5),
        0 0 40px rgba(0, 255, 136, 0.6),
        inset 0 0 30px rgba(0, 255, 136, 0.15);
}

.region-overlay:hover,
.shape-overlay.placed:hover {
    border-color: #00ff88;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 1),
        0 0 0 4px rgba(0, 255, 136, 0.4),
        0 0 35px rgba(0, 255, 136, 0.5),
        inset 0 0 25px rgba(0, 255, 136, 0.12);
}

.shape-overlay.circle,
.region-overlay.circle {
    border-radius: 50%;
}

/* Region Dimmer - darkens area outside selection */
.region-dimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.region-dimmer.active {
    opacity: 1;
}

/* Crosshair in center of selection */
.region-overlay::before,
.region-overlay::after,
.shape-overlay::before,
.shape-overlay::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    pointer-events: none;
}

.region-overlay::before,
.shape-overlay::before {
    width: 1px;
    height: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.region-overlay::after,
.shape-overlay::after {
    width: 12px;
    height: 1px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Panel content needs relative positioning for overlays */
.panel-content {
    position: relative;
    overflow: hidden;
}

/* ==========================================
   Controls Section
   ========================================== */
.controls-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.shape-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.shape-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.shape-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f1f5f9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.shape-option:hover {
    background: #e2e8f0;
}

.shape-option.active {
    background: rgba(0, 102, 204, 0.1);
    border-color: #0066cc;
}

.shape-option.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.shape-option input {
    width: 16px;
    height: 16px;
    accent-color: #0066cc;
}

.shape-option svg {
    width: 20px;
    height: 20px;
    color: #0066cc;
}

.shape-option span {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Size Slider */
.size-slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.size-slider-container.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.size-slider-container label {
    font-weight: 500;
    color: #475569;
    font-size: 0.9rem;
}

/* Single Image Option */
.single-image-option-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.single-image-option-container .shape-option {
    width: auto;
}

/* Single Image Mode */
.image-viewer.single-image-mode {
    grid-template-columns: 1fr;
    justify-items: center;
}

.image-viewer.single-image-mode .viewer-panel:first-child {
    display: none;
}

.image-viewer.single-image-mode .viewer-panel:last-child {
    border-right: none;
    max-width: 80%;
    width: 80%;
    margin: 0 auto;
}

.viewer-panel {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.viewer-panel.hiding {
    opacity: 0;
    transform: translateX(-100%);
    pointer-events: none;
}

.viewer-panel.centering {
    animation: slideToCenter 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideToCenter {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(0);
        max-width: 100%;
    }
}

.panel-title .dot.single {
    background: #7c3aed;
}

.size-slider-container input[type="range"] {
    width: 150px;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

.size-slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0066cc;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 102, 204, 0.3);
}

.size-value {
    font-family: monospace;
    font-weight: 600;
    color: #0066cc;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 6px;
    min-width: 70px;
    text-align: center;
}

/* Region Selection Hint */
.region-hint {
    width: 100%;
    text-align: center;
    margin-top: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(0, 255, 136, 0.05));
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.region-hint small {
    color: #64748b;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.region-hint small::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #00d4ff;
    border-radius: 50%;
    animation: pulse-hint 2s infinite;
}

@keyframes pulse-hint {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Main Buttons */
.main-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
}

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

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, #0066cc, #0088ff);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #00c853, #00e676);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 200, 83, 0.3);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 200, 83, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ff3d00, #ff6e40);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 61, 0, 0.3);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 61, 0, 0.4);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover:not(:disabled) {
    background: #e2e8f0;
}

.btn-outline {
    background: transparent;
    color: #0066cc;
    border: 2px solid #0066cc;
}

.btn-outline:hover:not(:disabled) {
    background: #0066cc;
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* ==========================================
   Results Section
   ========================================== */
.results-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

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

.results-header h2 {
    color: #1a202c;
}

.decision-badge {
    font-size: 1rem;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.decision-badge.accept {
    background: linear-gradient(135deg, #00c853, #00e676);
    color: white;
}

.decision-badge.conditional {
    background: linear-gradient(135deg, #ffb300, #ffc107);
    color: #1a202c;
}

.decision-badge.reject {
    background: linear-gradient(135deg, #ff3d00, #ff6e40);
    color: white;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.result-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: #64748b;
}

.card-header svg {
    color: #0066cc;
}

.card-value {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: monospace;
    color: #0066cc;
    margin-bottom: 12px;
}

.card-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.bar-fill.success {
    background: linear-gradient(90deg, #00c853, #69f0ae);
}

.bar-fill.warning {
    background: linear-gradient(90deg, #ffb300, #ffe082);
}

.bar-fill.danger {
    background: linear-gradient(90deg, #ff3d00, #ff8a65);
}

.results-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* ==========================================
   Loading Overlay - Compact Modal Design
   ========================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    background: white;
    padding: 28px 32px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    min-width: 320px;
    max-width: 360px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.loading-content h3 {
    color: #1a202c;
    margin-bottom: 8px;
}

.loading-content p {
    color: #64748b;
}

/* Progress Modal - Compact Sequential Design */
.progress-modal {
    text-align: center;
}

/* Logo at top of progress modal - smaller */
.progress-logo {
    margin-bottom: 16px;
}

.progress-logo img {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

/* Percentage display - compact */
.progress-percentage-large {
    font-size: 2rem;
    font-weight: 700;
    color: #0066cc;
    font-family: 'Segoe UI', system-ui, sans-serif;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

/* Progress bar container - slim */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0066cc 0%, #00a3e0 100%);
    border-radius: 3px;
    transition: width 0.5s ease-out;
    width: 0%;
}

.progress-bar-fill.complete {
    background: #00c853;
}

.progress-bar-glow {
    display: none;
}

/* Status text - smaller */
.progress-status {
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 16px;
    min-height: 20px;
    transition: all 0.3s;
}

.progress-status.success {
    color: #00c853;
    font-weight: 600;
}

.progress-status.error {
    color: #ef4444;
    font-weight: 600;
}

/* Steps list - compact sequential layout */
.progress-steps {
    text-align: left;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    margin-top: 4px;
}

.progress-steps .step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #94a3b8;
    font-size: 0.8rem;
    transition: all 0.25s ease;
    position: relative;
    margin-bottom: 4px;
    background: transparent;
}

.progress-steps .step:last-child {
    margin-bottom: 0;
}

/* Step icon wrapper - compact circles */
.step-icon-wrapper {
    width: 24px;
    height: 24px;
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.step-icon {
    font-size: 11px;
    line-height: 1;
    font-weight: 600;
}

.step-label {
    flex: 1;
    text-align: left;
}

/* Pending state (default) - gray circle */
.progress-steps .step .step-icon-wrapper {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #94a3b8;
}

.progress-steps .step .step-icon {
    color: #94a3b8;
}

/* Active/Running state - blue with spinner */
.progress-steps .step.active {
    color: #0066cc;
    font-weight: 500;
}

.progress-steps .step.active .step-icon-wrapper {
    background: #0066cc;
    border-color: #0066cc;
    color: white;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
}

.progress-steps .step.active .step-icon {
    color: white;
    animation: spinStep 0.8s linear infinite;
}

@keyframes spinStep {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Completed state - GREEN with checkmark */
.progress-steps .step.completed {
    color: #16a34a;
}

.progress-steps .step.completed .step-icon-wrapper {
    background: #16a34a;
    border-color: #16a34a;
    color: white;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.progress-steps .step.completed .step-icon {
    color: white;
    animation: none;
    font-size: 13px;
}

/* Checkmark pop animation */
@keyframes checkPop {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.progress-steps .step.completed .step-icon-wrapper {
    animation: checkPop 0.3s ease-out;
}

/* Failed state - red with X */
.progress-steps .step.failed {
    color: #dc2626;
}

.progress-steps .step.failed .step-icon-wrapper {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.progress-steps .step.failed .step-icon {
    color: white;
    animation: none;
}

/* Hide old compatibility styles */
.progress-header,
.progress-percentage {
    display: none;
}

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

.modal {
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #0066cc, #0088ff);
    color: white;
    border-radius: 16px 16px 0 0;
}

.modal-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.modal-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: white;
    padding: 4px;
}

.modal-header h2 {
    color: white;
    font-size: 1.25rem;
}

.modal-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
}

.tab {
    padding: 14px 24px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab:hover {
    color: #0066cc;
    background: white;
}

.tab.active {
    color: #0066cc;
    background: white;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #0066cc;
    border-radius: 3px 3px 0 0;
}

/* Modal Body */
.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.tab-content {
    display: none;
}

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

/* Settings */
.settings-group {
    margin-bottom: 28px;
}

.settings-group:last-child {
    margin-bottom: 0;
}

.settings-group h3 {
    font-size: 1rem;
    color: #1a202c;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0066cc;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 8px;
}

.setting-row:last-child {
    margin-bottom: 0;
}

.setting-row label {
    font-weight: 500;
    color: #475569;
}

.setting-row input[type="number"],
.setting-row input[type="text"] {
    width: 120px;
    padding: 8px 12px;
    font-size: 0.9rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    text-align: right;
    font-family: monospace;
}

.setting-row input:focus {
    outline: none;
    border-color: #0066cc;
}

.setting-row select {
    padding: 8px 12px;
    font-size: 0.9rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    min-width: 160px;
}

.setting-row select:focus {
    outline: none;
    border-color: #0066cc;
}

.setting-row input[type="checkbox"] {
    width: 44px;
    height: 24px;
    -webkit-appearance: none;
    appearance: none;
    background: #e2e8f0;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.setting-row input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.setting-row input[type="checkbox"]:checked {
    background: #0066cc;
}

.setting-row input[type="checkbox"]:checked::after {
    transform: translateX(20px);
}

/* ==========================================
   Enhanced Settings Modal
   ========================================== */
.modal-wide {
    max-width: 960px;
}

.modal-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* Enhanced Tabs */
.modal-tabs .tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
}

.modal-tabs .tab svg {
    opacity: 0.7;
}

.modal-tabs .tab.active svg {
    opacity: 1;
}

/* Settings Intro */
.settings-intro {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.05), rgba(0, 136, 255, 0.08));
    border: 1px solid rgba(0, 102, 204, 0.15);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 24px;
}

.settings-intro p {
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

/* Enhanced Settings Group */
.settings-group {
    background: #fafbfc;
    border: 1px solid #e8ecf0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 0;
}

.settings-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.settings-group-header svg {
    color: #0066cc;
    flex-shrink: 0;
}

.settings-group-header h3 {
    font-size: 0.95rem;
    color: #1a202c;
    margin: 0;
    padding: 0;
    border: none;
}

.settings-group-desc {
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0 0 16px 32px;
}

/* Enhanced Setting Row */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: white;
    border: 1px solid #e8ecf0;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.setting-row:hover {
    border-color: #0066cc;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.08);
}

.setting-row:last-child {
    margin-bottom: 0;
}

.setting-row.compact {
    padding: 10px 14px;
    margin-bottom: 6px;
}

.setting-row.compact label {
    font-size: 0.85rem;
}

.setting-row.threshold-row {
    background: linear-gradient(to right, white, #fafbfc);
}

/* Setting Label */
.setting-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.setting-label label {
    font-weight: 500;
    color: #334155;
    font-size: 0.9rem;
}

.setting-label small {
    color: #94a3b8;
    font-size: 0.75rem;
}

.setting-label small.threshold-pass {
    color: #16a34a;
}

.setting-label small.threshold-conditional {
    color: #ea580c;
}

/* Input with Unit */
.input-with-unit {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-with-unit input {
    width: 90px !important;
}

.input-with-unit .unit {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 500;
    min-width: 40px;
}

/* Toggle Switch */
/* Toggle Switch */
.toggle-switch {
    display: inline-block;
    width: 44px;
    height: 24px;
    position: relative;
    border-radius: 20px;
    vertical-align: middle;
}

.toggle-switch input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
    margin: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e2e8f0;
    border-radius: 24px;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.toggle-slider {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    /* Modern Blue */
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(20px);
}

/* Modal Footer Enhancement */
.modal-footer .btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-footer .btn svg {
    flex-shrink: 0;
}

/* Settings Group Highlight */
.settings-group-highlight {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.06), rgba(0, 136, 255, 0.04));
    border: 2px solid rgba(0, 102, 204, 0.2);
}

/* Language Selector in Settings */
.language-selector-container {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.language-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.language-option:hover {
    border-color: #0066cc;
    background: #f8fafc;
}

.language-option.active {
    border-color: #0066cc;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.08), rgba(0, 136, 255, 0.04));
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

.language-option .language-flag {
    width: 32px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.language-option .language-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.language-option .language-name {
    font-weight: 600;
    color: #1a202c;
    font-size: 0.95rem;
}

.language-option .language-desc {
    color: #64748b;
    font-size: 0.75rem;
}

.language-option .language-check {
    color: #0066cc;
    opacity: 0;
    transition: opacity 0.2s;
}

.language-option.active .language-check {
    opacity: 1;
}

/* ==========================================
   Modal Region Controls
   ========================================== */
.modal-shape-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.modal-shape-option {
    flex: 1;
    min-width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
}

.modal-shape-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.modal-shape-option svg {
    width: 32px;
    height: 32px;
    color: #64748b;
    transition: all 0.2s ease;
}

.modal-shape-option span {
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
    transition: color 0.2s ease;
}

.modal-shape-option:hover {
    border-color: #0066cc;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
}

.modal-shape-option:hover svg {
    color: #0066cc;
}

.modal-shape-option.active {
    border-color: #0066cc;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.08), rgba(0, 136, 255, 0.05));
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

.modal-shape-option.active svg {
    color: #0066cc;
}

.modal-shape-option.active span {
    color: #0066cc;
    font-weight: 600;
}

/* Modal Dimension Inputs */
.modal-dimension-inputs {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.modal-dimension-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dimension-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 4px;
}

.dimension-input {
    width: 100%;
    max-width: 150px;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    background: white;
    color: #1a202c;
    transition: all 0.2s ease;
}

.dimension-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    background: #fafbfc;
}

.dimension-input:hover {
    border-color: #94a3b8;
}

/* Invalid state */
.dimension-input:invalid {
    border-color: #ef4444;
}

.dimension-input::placeholder {
    color: #94a3b8;
}

/* Chrome, Safari, Edge, Opera - Hide spinner */
.dimension-input::-webkit-outer-spin-button,
.dimension-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox - Hide spinner */
.dimension-input[type=number] {
    -moz-appearance: textfield;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 16px 16px;
}

.modal-footer-right {
    display: flex;
    gap: 12px;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background: white;
    border-top: 1px solid #e2e8f0;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #64748b;
    font-size: 0.85rem;
}

.footer img {
    height: 24px;
    opacity: 0.7;
}

.footer-logo {
    height: 32px;
    width: auto;
    opacity: 0.85;
}

.footer-contact-btn {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0066cc;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.footer-contact-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.footer-contact-btn:hover::before {
    left: 100%;
}

.footer-contact-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 102, 204, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

.footer-contact-btn:active {
    transform: translateY(0);
}

/* ==========================================
   Contact Popup
   ========================================== */
.contact-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.contact-popup {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    min-width: 400px;
    max-width: 90%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-popup-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.05), rgba(0, 136, 255, 0.1));
}

.contact-popup-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0066cc;
}

.contact-popup-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    line-height: 1;
}

.contact-popup-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1a202c;
}

.contact-popup-body {
    padding: 32px 24px;
    text-align: center;
}

.contact-email-container {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(0, 102, 204, 0.2);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.1);
}

.contact-email-container svg {
    color: #0066cc;
    flex-shrink: 0;
}

.contact-email {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-email:hover {
    color: #0052a3;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .contact-popup {
        min-width: auto;
        width: 100%;
        max-width: 90%;
    }

    .contact-popup-body {
        padding: 24px 20px;
    }

    .contact-email-container {
        flex-direction: column;
        gap: 8px;
    }

    .contact-email {
        font-size: 1rem;
        word-break: break-all;
    }
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 1024px) {
    .image-viewer {
        grid-template-columns: 1fr;
    }

    .viewer-panel {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .header-right {
        width: 100%;
        justify-content: center;
    }

    .code-dropdown {
        right: 50%;
        transform: translateX(50%) translateY(-8px) scale(0.98);
        min-width: calc(100vw - 48px);
        max-width: 320px;
    }

    .code-dropdown.show {
        transform: translateX(50%) translateY(0) scale(1);
    }

    .btn-code-download span {
        display: none;
    }

    .btn-code-download {
        padding: 8px 12px;
    }

    .main-content {
        padding: 16px;
    }

    .shape-controls {
        flex-direction: column;
        gap: 16px;
    }

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

    .main-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .modal {
        margin: 16px;
    }

    .setting-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .setting-row input,
    .setting-row select {
        width: 100%;
    }
}

/* ==========================================
   Sample Tests Side Menu
   ========================================== */
.samples-toggle-btn {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    background: linear-gradient(135deg, #0066cc, #0088ff);
    color: white;
    border: none;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    z-index: 100;
    box-shadow: 4px 0 20px rgba(0, 102, 204, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.samples-toggle-btn span {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.samples-toggle-btn:hover {
    padding-right: 16px;
    box-shadow: 6px 0 25px rgba(0, 102, 204, 0.35);
}

.samples-toggle-btn svg {
    transform: rotate(90deg);
}

/* Sidebar Panel */
.samples-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 360px;
    max-width: 90vw;
    background: white;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.15);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.samples-sidebar.open {
    transform: translateX(0);
}

.samples-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: linear-gradient(135deg, #0066cc, #0088ff);
    color: white;
}

.samples-sidebar-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.05rem;
}

.samples-sidebar-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.samples-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.samples-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.samples-sidebar-footer {
    padding: 14px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.samples-sidebar-footer p {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
}

.samples-language-note {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(0, 102, 204, 0.08);
    border-left: 3px solid #0066cc;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #0066cc;
    line-height: 1.5;
}

/* ==========================================
   Feedback Sidebar (Orange/Gold Theme)
   ========================================== */


.feedback-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 400px;
    max-width: 90vw;
    background: white;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.15);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.feedback-sidebar.open {
    transform: translateX(0);
}

.feedback-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: linear-gradient(135deg, #f97316, #fb923c);
    color: white;
}

.feedback-sidebar-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.05rem;
}

.feedback-sidebar-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.feedback-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.feedback-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.feedback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1099;
}

.feedback-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Feedback Form Styles */
.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.feedback-note {
    padding: 12px 16px;
    background: rgba(249, 115, 22, 0.08);
    border-left: 3px solid #f97316;
    border-radius: 8px;
    margin-bottom: 8px;
}

.feedback-note p {
    margin: 0;
    font-size: 0.85rem;
    color: #ea580c;
    line-height: 1.5;
}

.feedback-anonymous-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 8px;
}



.feedback-fields-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feedback-fields-group.hidden {
    display: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
}

.char-count {
    font-weight: 400;
    color: #64748b;
    font-size: 0.8rem;
}

.form-input,
.form-select,
.form-textarea {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

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

.form-textarea.error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 4px;
}

.feedback-attachment-note {
    padding: 14px 16px;
    background: rgba(249, 115, 22, 0.05);
    border-left: 3px solid #f97316;
    border-radius: 8px;
    margin-bottom: 8px;
}

.feedback-attachment-note p {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.6;
}

.feedback-attachment-note a.feedback-email-link {
    color: #f97316;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
}

.feedback-attachment-note a.feedback-email-link:hover {
    color: #ea580c;
    text-decoration: underline;
}

.feedback-form-content {
    display: block;
}

.feedback-form-content.hidden {
    display: none;
}

.feedback-success-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    animation: fadeIn 0.4s ease-out;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(22, 163, 74, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: #22c55e;
}

.success-icon svg {
    width: 48px;
    height: 48px;
}

.feedback-success-message h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.feedback-success-message p {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 32px 0;
    max-width: 500px;
}

.btn-feedback-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #f97316, #fb923c);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-feedback-new:hover {
    background: linear-gradient(135deg, #ea580c, #f97316);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}

.btn-feedback-new:active {
    transform: translateY(0);
}

.file-upload-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-input {
    display: none;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

.file-upload-label:hover {
    background: #f1f5f9;
    border-color: #f97316;
    color: #f97316;
}

.file-name {
    font-size: 0.85rem;
    color: #64748b;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 4px;
}

.btn-feedback-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #f97316, #fb923c);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    margin-top: 8px;
}

.btn-feedback-submit:hover {
    background: linear-gradient(135deg, #ea580c, #f97316);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}

.btn-feedback-submit:active {
    transform: translateY(0);
}

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

@media (max-width: 768px) {
    .feedback-toggle-btn {
        top: 70px;
        font-size: 0.75rem;
        padding: 8px 12px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}



/* Sample Card */
.sample-card {
    background: #f8fafc;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 14px;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    cursor: pointer;
}

.sample-card:hover {
    border-color: rgba(0, 102, 204, 0.3);
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.04), rgba(0, 136, 255, 0.08));
    transform: translateX(4px);
}

.sample-card:last-child {
    margin-bottom: 0;
}

.sample-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.sample-card-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #0066cc, #0088ff);
    color: white;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
}

.sample-card-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #00c853;
    background: rgba(0, 200, 83, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
}

.sample-card-images {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.sample-card-image-wrapper {
    flex: 1;
    position: relative;
}

.sample-card-image-label {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
    background: rgba(0, 0, 0, 0.6);
    padding: 3px 7px;
    border-radius: 4px;
    z-index: 1;
}

.sample-card-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
}

.sample-card:hover .sample-card-image {
    border-color: #0066cc;
}

.sample-card-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    background: linear-gradient(135deg, #0066cc, #0088ff);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.sample-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.35);
}

.sample-card-btn svg {
    width: 18px;
    height: 18px;
}

/* Overlay */
.samples-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.samples-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Loading state */
.samples-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: #64748b;
}

.spinner-small {
    width: 30px;
    height: 30px;
    border: 3px solid #e2e8f0;
    border-top-color: #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Sample Test Mode Indicator */
.sample-test-indicator {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.1), rgba(0, 230, 118, 0.15));
    border: 2px solid #00c853;
    border-radius: 10px;
    margin-bottom: 16px;
}

.sample-test-indicator.show {
    display: flex;
}

.sample-test-indicator svg {
    color: #00c853;
    flex-shrink: 0;
}

.sample-test-indicator span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #00c853;
}

/* ==========================================
   Development Modal
   ========================================== */
.development-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.development-modal {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.development-modal-header {
    text-align: center;
    padding: 40px 40px 30px;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.05), rgba(0, 136, 255, 0.1));
    border-radius: 20px 20px 0 0;
    border-bottom: 2px solid rgba(0, 102, 204, 0.1);
}

.development-logo-container {
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.development-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 102, 204, 0.2));
}

.development-title {
    font-size: 2rem;
    font-weight: 800;
    color: #0066cc;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    text-shadow: 0 2px 4px rgba(0, 102, 204, 0.1);
}

.development-message {
    font-size: 1.1rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

.development-modal-body {
    padding: 30px 40px;
}

.development-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.development-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #334155;
    margin: 0;
}

.development-logos-section {
    margin-top: 10px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.development-logos-note {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 16px 0;
    font-style: italic;
}

.development-logos-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-logo-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0066cc;
    background: #ffffff;
    border: 2px solid rgba(0, 102, 204, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    text-align: left;
}

.btn-logo-download:hover {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.08), rgba(0, 136, 255, 0.12));
    border-color: #0066cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

.btn-logo-download:active {
    transform: translateY(0);
}

.btn-logo-download svg {
    flex-shrink: 0;
}

.development-code-section {
    margin-top: 20px;
    padding: 20px;
    background: #1e293b;
    border-radius: 12px;
    border: 1px solid #334155;
}

.development-code-section h3 {
    color: #ffffff;
    font-size: 1.1rem;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.development-code {
    background: #0f172a;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0 0 16px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
}

.development-copy-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #334155;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.development-copy-instruction {
    font-size: 0.9rem;
    color: #cbd5e1;
    margin: 0;
    text-align: center;
    font-style: italic;
}

.btn-copy-code {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    background: linear-gradient(135deg, #0066cc, #0088ff);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.btn-copy-code:hover {
    background: linear-gradient(135deg, #0052a3, #0066cc);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
}

.btn-copy-code:active {
    transform: translateY(0);
}

.development-modal-footer {
    padding: 30px 40px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 20px 20px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.development-modal-footer .btn {
    min-width: 180px;
}

@media (max-width: 768px) {
    .development-modal {
        max-width: 100%;
        margin: 10px;
        max-height: 95vh;
    }

    .development-modal-header {
        padding: 30px 20px 20px;
    }

    .development-logo {
        width: 80px;
        height: 80px;
    }

    .development-title {
        font-size: 1.5rem;
    }

    .development-modal-body {
        padding: 20px;
    }

    .development-modal-footer {
        padding: 20px;
        flex-direction: column;
    }

    .development-modal-footer .btn {
        width: 100%;
    }
}

/* Responsive for sidebar */
@media (max-width: 480px) {
    .samples-sidebar {
        width: 100%;
        max-width: 100%;
    }

    .samples-toggle-btn {
        padding: 10px 8px;
    }

    .samples-toggle-btn span {
        font-size: 0.65rem;
    }
}

/* ==========================================
   Sampling Mode Selector
   ========================================== */
.sampling-mode-selector {
    display: flex;
    gap: 16px;
}

.sampling-mode-selector .radio-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #475569;
}

.sampling-mode-selector .radio-option input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #0066cc;
}

/* ==========================================
   Region Shape Selector
   ========================================== */
.region-shape-selector {
    display: flex;
    gap: 10px;
}

.radio-option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.radio-option-card:hover {
    border-color: #0066cc;
    background: rgba(0, 102, 204, 0.05);
}

.radio-option-card.active {
    border-color: #0066cc;
    background: rgba(0, 102, 204, 0.1);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.15);
}

.radio-option-card input[type="radio"] {
    display: none;
}

.radio-option-card svg {
    color: #64748b;
    transition: color 0.2s ease;
}

.radio-option-card.active svg {
    color: #0066cc;
}

.radio-option-card span {
    font-size: 0.8rem;
    font-weight: 500;
    color: #475569;
}

.radio-option-card.active span {
    color: #0066cc;
    font-weight: 600;
}

.region-dimension-settings {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

/* ==========================================
   Shape Preview Container
   ========================================== */
.shape-preview-container {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-top: 12px;
}

.shape-preview-box {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.shape-preview {
    transition: all 0.3s ease;
    background: rgba(0, 102, 204, 0.3);
    border: 2px solid #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.shape-preview.circle {
    border-radius: 50%;
}

.shape-preview.square {
    border-radius: 4px;
}

.shape-preview.rectangle {
    border-radius: 4px;
}

.shape-preview-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-shape-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
}

.preview-dimensions {
    font-size: 0.85rem;
    color: #64748b;
    font-family: 'SF Mono', SFMono-Regular, Consolas, monospace;
    background: rgba(0, 102, 204, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
}

.shape-preview-container.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.shape-preview-container.disabled .shape-preview-box {
    border-color: #94a3b8;
}

.shape-preview-container.disabled .shape-preview {
    background: rgba(148, 163, 184, 0.3);
    border-color: #94a3b8;
}

/* Hide shape preview for non-circle shapes */
.shape-preview-container.hidden {
    display: none;
}

/* Hint Icon with Tooltip */
.hint-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    margin-left: 6px;
    transition: color 0.2s ease;
}

.hint-icon:hover,
.hint-icon:focus {
    color: #0066cc;
    outline: none;
}

.hint-icon svg {
    display: block;
}

.hint-tooltip {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    color: #334155;
    padding: 14px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    min-width: 220px;
    text-align: left;
}

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

.hint-item {
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.3;
}

.hint-bullet {
    width: 6px;
    height: 6px;
    background-color: #f97316;
    /* Orange accent */
    border-radius: 50%;
    flex-shrink: 0;
}

.hint-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #334155;
}

.hint-icon:hover .hint-tooltip,
.hint-icon:focus .hint-tooltip,
.hint-icon.active .hint-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(4px);
}

/* Checkbox Option Card for Advanced Settings */
.setting-row-checkbox {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.checkbox-option-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-option-card:hover {
    border-color: #0066cc;
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f0ff 100%);
}

.checkbox-option-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0066cc;
    cursor: pointer;
}

.checkbox-option-card svg {
    color: #64748b;
    flex-shrink: 0;
}

.checkbox-option-card:hover svg {
    color: #0066cc;
}

.checkbox-label-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.checkbox-label-content span {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.checkbox-label-content small {
    color: #64748b;
    font-size: 0.78rem;
}

.checkbox-option-card:has(input:checked) {
    border-color: #0066cc;
    background: linear-gradient(135deg, #e6f0ff 0%, #dbeafe 100%);
}

.checkbox-option-card:has(input:checked) svg {
    color: #0066cc;
}

.manual-points-row {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 10px;
}

.btn-select-points {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #0066cc, #0088ff);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-select-points:hover {
    background: linear-gradient(135deg, #0055aa, #0077ee);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-select-points:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-select-points svg {
    flex-shrink: 0;
}

.manual-points-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #64748b;
}

.manual-points-status.has-points {
    background: #dcfce7;
    color: #166534;
}

.btn-clear-points {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear-points:hover {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

/* ==========================================
   Point Selector Modal
   ========================================== */
.point-selector-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 24px;
}

.point-selector-content {
    background: white;
    border-radius: 16px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.point-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(135deg, #0066cc, #0088ff);
    color: white;
}

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

.point-selector-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.point-selector-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.point-selector-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
}

.point-selector-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.point-selector-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.point-selector-counter {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.95rem;
    font-weight: 500;
    color: #334155;
}

.point-selector-counter #pointCountCurrent {
    font-weight: 700;
    color: #0066cc;
    font-size: 1.1rem;
}

.point-selector-counter #pointCountTotal {
    color: #64748b;
}

.point-selector-progress {
    flex: 1;
    max-width: 200px;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.point-selector-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0066cc, #00c853);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.point-selector-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px 24px;
    flex: 1;
    overflow: auto;
}

.point-selector-image-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.point-selector-image-panel h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    text-align: center;
}

.point-selector-image-container {
    position: relative;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    cursor: crosshair;
    aspect-ratio: 4/3;
}

.point-selector-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.point-selector-image-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.point-selector-roi-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.point-selector-roi-overlay.has-roi {
    background: rgba(0, 0, 0, 0.4);
}

.point-selector-roi-overlay .roi-clear-zone {
    position: absolute;
    background: transparent;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.4);
}

.point-selector-roi-overlay .roi-clear-zone.circle {
    border-radius: 50%;
}

.point-selector-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 0.85rem;
}

.point-selector-hint.warning {
    background: #fef3c7;
    color: #92400e;
}

.point-selector-hint.success {
    background: #dcfce7;
    color: #166534;
}

.point-selector-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.point-selector-actions .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: white;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.point-selector-actions .btn-secondary:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.point-selector-actions .btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.point-selector-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.point-selector-actions .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #15803d, #16a34a);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.point-selector-actions .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Point markers on canvas */
.point-marker {
    position: absolute;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Responsive point selector */
@media (max-width: 768px) {
    .point-selector-images {
        grid-template-columns: 1fr;
    }

    .point-selector-content {
        max-height: 95vh;
    }

    .point-selector-header-left {
        gap: 10px;
    }

    .point-selector-logo {
        width: 36px;
        height: 36px;
    }

    .point-selector-header h2 {
        font-size: 1rem;
    }
}

/* ==========================================
   Advanced Settings Modal - Premium Redesign
   ========================================== */
.modal-overlay {
    backdrop-filter: blur(8px);
    background: rgba(15, 23, 42, 0.6);
}

.modal {
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    height: 85vh;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #0066cc, #0088ff);
    padding: 20px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.modal-header h2 {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
}

.modal-icon {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg);
}

/* Tabs */
.modal-tabs {
    padding: 0 28px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 24px;
    flex-shrink: 0;
}

.tab {
    padding: 16px 4px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #64748b;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tab:hover {
    color: #0066cc;
}

.tab.active {
    color: #0066cc;
    border-bottom-color: #0066cc;
}

/* Body */
.modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.settings-group {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.settings-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: #0f172a;
}

.settings-group-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.settings-group-desc {
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

/* Form Elements */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.setting-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    padding-right: 20px;
}

.setting-label label {
    font-weight: 500;
    color: #334155;
    font-size: 0.9rem;
}

.setting-label small {
    color: #94a3b8;
    font-size: 0.8rem;
}

.form-control {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: #1e293b;
    width: 120px;
    transition: all 0.2s;
    text-align: right;
}

.form-control:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    outline: none;
}



/* ==========================================
   Modern Checkbox
   ========================================== */
.modern-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.modern-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 24px;
    width: 24px;
    background-color: white;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.modern-checkbox:hover .checkmark {
    border-color: #0066cc;
    background-color: #f8fafc;
}

.modern-checkbox input:checked~.checkmark {
    background: linear-gradient(135deg, #0066cc, #0088ff);
    border-color: #0066cc;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25);
    transform: scale(1.05);
}

.check-icon {
    width: 16px;
    height: 16px;
    color: white;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-checkbox input:checked~.checkmark .check-icon {
    opacity: 1;
    transform: scale(1);
}

.modern-checkbox input:focus~.checkmark {
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
}

/* Footer */
.modal-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 16px 28px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-secondary {
    background: white;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.btn-primary {
    background: linear-gradient(135deg, #0066cc, #0088ff);
    color: white;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 102, 204, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0055aa, #0077ee);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* File Size Display */
.file-size-display {
    font-size: 0.75rem;
    text-align: center;
    color: #6c757d;
    margin-top: 4px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

/* Split Button Styles */
.split-btn-group {
    display: inline-flex;
    position: relative;
    vertical-align: middle;
}

.split-btn-group .main-btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    margin-right: 1px;
}

.split-btn-group .dropdown-toggle {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 260px;
    margin-top: 6px;
    overflow: hidden;
    padding: 4px 0;
}

.download-dropdown.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}


.dropdown-item:hover {
    background: #f8fafc;
    /* Changed from f1f5f9 for subtle hover */
    color: #475569;
}

/* Button Content Layout */
.btn-content-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}

.btn-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-size-label {
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.9;
    margin-top: 2px;
}

/* Dropdown Content Layout */
.dropdown-item-content {
    display: flex;
    align-items: center;
}

.dropdown-size-label {
    margin-left: auto;
    font-size: 0.75rem;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.dropdown-item:hover .dropdown-size-label {
    background: #e2e8f0;
    color: #64748b;
}

/* Video Logo Styling */
.progress-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.progress-logo-video {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0, 102, 204, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: #fff;
}

/* Sampling Unit Redesign */
.sampling-section {
    border: 1px solid #e0e7ff;
    /* Light indigo tint */
    background: #fdfeff;
    margin-top: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.sampling-mode-selector {
    display: flex;
    gap: 20px;
}

.modern-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #334155;
}

.manual-points-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.manual-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.btn-select-points {
    background: white;
    border: 1px solid #cbd5e1;
    padding: 8px 16px;
    border-radius: 6px;
    color: #475569;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-select-points:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

/* Orange Button for "Complete Randomly" */
.btn-complete-randomly {
    background: #f97316;
    /* Orange-500 */
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(249, 115, 22, 0.2);
}

.btn-complete-randomly:hover {
    background: #ea580c;
    /* Orange-600 */
    box-shadow: 0 4px 8px rgba(249, 115, 22, 0.3);
}

/* Progress Bar Styling */
.sampling-progress-container {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: #334155;
}

.progress-bar-track {
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
}

.progress-legend {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 0.75rem;
    color: #64748b;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.manual {
    background: #22c55e;
}

.dot.random {
    background: #fbbf24;
}

/* Point Selector Back Button */
.point-selector-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 12px;
}

.point-selector-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}