.files-with-analysis {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.files.analysis {
    border: none;
}

.files.analysis table {
    border: 1px solid #ccc;
    border-radius: 12px;
}

.result-card {
    border: 1px solid #ccc;
    border-left: 4px solid #ccc;
    border-radius: 12px;
    overflow: hidden;
    animation: fadeSlideUp 0.5s ease;
    transition: 0.3s ease;
}

.result-card:hover {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.result-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
}

.result-file-info {
    flex: 1;
    min-width: 0;
}

.result-file-name {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.result-file-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: rgba(26, 26, 46, 0.4);
}

.result-delete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(26, 26, 46, 0.06);
    color: rgba(26, 26, 46, 0.35);
    transition: all 0.2s ease;
    text-decoration: none;
    flex-shrink: 0;
}

.result-delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.color-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    background: rgba(251, 191, 36, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.color-badge.cmyk {
    background: rgba(103, 232, 249, 0.12);
    color: #0ea5e9;
    border: 1px solid rgba(103, 232, 249, 0.25);
}

.color-badge.rgb {
    background: rgba(251, 191, 36, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.color-badge.grayscale {
    background: rgba(240, 240, 255, 0.08);
    color: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.color-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
    color: #f59e0b;
}

.color-badge.cmyk .color-badge-dot {
    background: #0ea5e9;
    box-shadow: 0 0 8px #0ea5e9;
}

.color-badge.rgb .color-badge-dot {
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
}

.color-badge.grayscale .color-badge-dot {
    background: rgba(26, 26, 46, 0.6);
    box-shadow: 0 0 8px rgba(240, 240, 255, 0.3);
}

.result-preview-btn-wrap {
    padding: 0 20px 16px;
}

.result-preview-btn-wrap a {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    background: rgba(249, 115, 22, 0.06);
    border: 1.5px dashed rgba(249, 115, 22, 0.35);
    border-radius: 12px;
    color: rgb(249, 115, 22);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    font-family: inherit;
}

.result-preview-btn-wrap a:hover {
    background: rgba(249, 115, 22, 0.13);
    border-color: rgba(249, 115, 22, 0.6);
    border-style: solid;
}

.result-card-body {
    padding: 20px 24px;
}

.metrics-dropdown {
    margin-top: 16px;
    border: 1px solid #ccc;
    border-radius: 12px;
    overflow: hidden;
}

.metrics-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.02);
    color: rgba(26, 26, 46, 0.6);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    list-style: none;
}

.metrics-dropdown[open] .metrics-toggle svg {
    transform: rotate(180deg);
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    padding: 16px;
}

.stat-box {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid #ccc;
    border-radius: 12px;
    padding: 16px 20px;
}

.stat-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    color: rgba(26, 26, 46, 0.4);
    margin-bottom: 8px;
}

.stat-label-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
}

.stat-detail {
    font-size: 13px;
    color: rgba(26, 26, 46, 0.6);
    margin-top: 4px;
}

.dpi-bar {
    flex: 1;
    height: 6px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.dpi-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s ease;
}

.dpi-bar-fill.good {
    background: linear-gradient(135deg, #22c55e, #10b981);
}

.dpi-bar-fill.medium {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.dpi-bar-fill.low {
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.dpi-info-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    cursor: pointer;
    vertical-align: middle;
}

.dpi-info-icon {
    opacity: 0.5;
    transition: opacity 0.15s ease;
}

.dpi-info-icon-wrap:hover .dpi-info-icon {
    opacity: 1;
}

.dpi-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a2e;
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    padding: 12px 16px;
    border-radius: 10px;
    white-space: normal;
    width: 280px;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.dpi-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1a1a2e;
}

.dpi-info-icon-wrap:hover .dpi-tooltip {
    display: block;
}

.sharpness-meter {
    margin-top: 12px;
}

.sharpness-meter-track {
    height: 8px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.sharpness-meter-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
    position: relative;
}

.sharpness-meter-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.15) 50%, transparent 100%);
    animation: sharpnessShimmer 2s ease-in-out infinite;
}

@keyframes sharpnessShimmer {

    0%,
    100% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(100%);
    }
}

.sharpness-meter-fill.sharpness-very-low {
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.sharpness-meter-fill.sharpness-low {
    background: linear-gradient(90deg, #f87171, #fbbf24);
}

.sharpness-meter-fill.sharpness-medium {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.sharpness-meter-fill.sharpness-good {
    background: linear-gradient(90deg, #fbbf24, #4ade80);
}

.sharpness-meter-fill.sharpness-excellent {
    background: linear-gradient(135deg, #22c55e, #10b981);
}

.sharpness-meter-fill.sharpness-vector {
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
}

.sharpness-meter-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 11px;
    color: rgba(26, 26, 46, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.accept-contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.015);
    border: 1.5px dashed rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    color: rgba(26, 26, 46, 0.5);
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.15s ease;
}

.accept-contact-link:hover {
    background: rgba(249, 115, 22, 0.06);
    border-color: rgba(249, 115, 22, 0.35);
    color: #f97316;
}

.accept-responsibility {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #e0e0e0;
}

.accept-checkbox-label {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.015);
    border: 1.5px dashed rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.accept-checkbox-label:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.25);
}

.accept-checkbox-label.manual-check-label {
    background: rgba(0, 0, 0, 0.015);
    border-color: rgba(0, 0, 0, 0.15);
}

.accept-checkbox-label.manual-check-label:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.25);
}

.accept-checkbox-label .accept-checkbox-text {
    color: rgba(26, 26, 46, 0.6);
    transition: color 0.15s ease;
    text-transform: initial;
}

.accept-checkbox-label.checked {
    background: rgba(34, 197, 94, 0.06);
    border-color: rgba(34, 197, 94, 0.35);
    border-style: solid;
}

.accept-checkbox-label.checked.manual-check-label {
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.35);
    border-style: solid;
}

.accept-checkbox-label:hover .accept-checkbox-custom {
    border-color: #9ca3af;
}

.accept-checkbox-label.manual-check-label:hover .accept-checkbox-custom {
    border-color: #9ca3af;
}

.accept-checkbox-input {
    display: none;
}

.accept-checkbox-custom {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    position: relative;
    transition: all 0.2s ease;
}

.accept-checkbox-label.manual-check-label .accept-checkbox-custom {
    border-color: #d1d5db;
}

.accept-checkbox-label.checked .accept-checkbox-custom {
    background: #22c55e;
    border-color: #22c55e;
}

.accept-checkbox-label.checked.manual-check-label .accept-checkbox-custom {
    background: #3b82f6;
    border-color: #3b82f6;
}

.accept-checkbox-label.checked .accept-checkbox-custom::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    animation: checkmarkPop 0.15s ease-out;
}

@keyframes checkmarkPop {
    0% { transform: rotate(45deg) scale(0); }
    60% { transform: rotate(45deg) scale(1.15); }
    100% { transform: rotate(45deg) scale(1); }
}

.accept-checkbox-text {
    font-size: 14px;
    font-weight: 400;
    color: rgba(26, 26, 46, 0.6);
    line-height: 1.5;
    transition: color 0.2s ease;
}

.accept-checkbox-label.checked .accept-checkbox-text {
    color: rgba(26, 26, 46, 0.8);
}

.result-card.responsibility-accepted {
    border-left-color: #10b981;
}

.info-tooltip-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
}

.info-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 20px;
    color: #9ca3af;
    transition: all 0.2s ease;
}

.accept-checkbox-label:hover .info-icon {
    color: #fbbf24;
}

.accept-checkbox-label .info-icon:hover {
    color: #d97706 !important;
    transform: scale(1.1);
}

.accept-checkbox-label.manual-check-label:hover .info-icon,
.accept-checkbox-label.master-manual-label:hover .info-icon {
    color: #3b82f6;
}

.accept-checkbox-label.manual-check-label .info-icon:hover,
.accept-checkbox-label.master-manual-label .info-icon:hover {
    color: #1d4ed8 !important;
    transform: scale(1.1);
}

.info-tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #1f2937;
    text-transform: initial;
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    width: 280px;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    pointer-events: none;
    font-weight: 400;
    margin-bottom: 10px;
}

.info-tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

.info-tooltip-wrapper:hover .info-tooltip-content {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.result-warnings {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.warning-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(251, 191, 36, 0.06);
    border: 1px solid rgba(251, 191, 36, 0.15);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: rgba(26, 26, 46, 0.6);
}

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

.warning-item.error {
    background: rgba(248, 113, 113, 0.06);
    border-color: rgba(248, 113, 113, 0.15);
}

.warning-item.success {
    background: rgba(74, 222, 128, 0.06);
    border-color: rgba(74, 222, 128, 0.15);
}

.warning-icon {
    flex-shrink: 0;
    font-size: 16px;
    line-height: 1.4;
}

#submit_button[disabled] {
    opacity: 0.5;
}

@media (max-width: 768px) {
    .result-card-header {
        padding: 16px;
    }

    .result-card-body {
        padding: 16px;
    }

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

    .result-file-meta {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .stat-value {
        font-size: 1rem;
    }
}

.curves-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 6px 12px;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #22c55e;
}

.fonts-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 6px 12px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #f59e0b;
}

.pdf-pages-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.pdf-page-badge {
    padding: 2px 10px;
    background: #f3f4f6;
    color: rgba(26, 26, 46, 0.6);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-ok {
    color: #22c55e;
}

.status-warning {
    color: #f59e0b;
}

.status-error {
    color: #ef4444;
}

/* ============================================================
   Effective DPI alert
   ============================================================ */

.effective-dpi-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: 8px;
    font-size: 13px;
    color: rgb(239, 68, 68);
    animation: alertPulse 2s ease-in-out infinite;
}

@keyframes alertPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.effective-dpi-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.effective-dpi-alert strong {
    color: rgb(239, 68, 68);
    font-weight: 700;
}