/* naonax\static\css\utility\image_optimizer.css */
:root {
    --io-bg: #f4f7fc;
    --io-card: #ffffff;
    --io-line: #d9e3f0;
    --io-text: #1a2433;
    --io-sub: #607087;
    --io-primary: #3366d6;
    --io-primary-dark: #254ea7;
    --io-soft: #eef4ff;
    --io-success: #17794a;
    --io-danger: #c84a4a;
    --io-shadow: 0 18px 36px rgba(29, 48, 95, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--io-text);
    background: linear-gradient(180deg, #f8fafe 0%, #eef3fb 100%);
    font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

button,
input {
    font: inherit;
}

.io-page {
    width: min(1160px, calc(100% - 28px));
    margin: 0 auto;
    padding: 18px 0 48px;
}

.io-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--io-line);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(29, 48, 95, 0.06);
}

.io-topbar-left,
.io-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.io-top-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid #d7e4ff;
    background: var(--io-soft);
    color: var(--io-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.io-top-btn {
    cursor: pointer;
}

.io-hero,
.io-settings-panel,
.io-upload-panel,
.io-list-panel {
    margin-top: 18px;
    padding: 24px;
    border: 1px solid var(--io-line);
    border-radius: 24px;
    background: var(--io-card);
    box-shadow: var(--io-shadow);
}

.io-eyebrow {
    margin: 0 0 10px;
    color: var(--io-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.io-hero h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.25;
}

.io-hero-desc {
    margin: 14px 0 0;
    max-width: 820px;
    color: var(--io-sub);
    font-size: 16px;
    line-height: 1.75;
}

.io-panel-head h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.35;
}

.io-panel-head p {
    margin: 8px 0 0;
    color: var(--io-sub);
    font-size: 14px;
    line-height: 1.7;
}

.io-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.io-field {
    display: block;
    padding: 16px;
    border: 1px solid var(--io-line);
    border-radius: 18px;
    background: #fbfdff;
}

.io-label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
}

.io-field input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #cfd9ea;
    border-radius: 12px;
    background: #fff;
    color: var(--io-text);
    font-size: 15px;
}

.io-field input:focus {
    outline: none;
    border-color: #99b4f5;
    box-shadow: 0 0 0 4px rgba(51, 102, 214, 0.08);
}

.io-field small {
    display: block;
    margin-top: 8px;
    color: var(--io-sub);
    font-size: 12px;
    line-height: 1.6;
}

.io-dropzone {
    margin-top: 18px;
    border: 2px dashed #bfd0ee;
    border-radius: 22px;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.io-dropzone.dragover {
    border-color: var(--io-primary);
    background: linear-gradient(180deg, #f6f9ff 0%, #edf4ff 100%);
    transform: translateY(-1px);
}

.io-dropzone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    padding: 24px;
    text-align: center;
}

.io-dropzone-icon {
    font-size: 42px;
    line-height: 1;
}

.io-dropzone h2 {
    margin: 16px 0 0;
    font-size: 24px;
    line-height: 1.4;
}

.io-dropzone p {
    margin: 10px 0 0;
    max-width: 620px;
    color: var(--io-sub);
    font-size: 15px;
    line-height: 1.7;
}

.io-upload-summary {
    display: grid;
    grid-template-columns: 160px 160px minmax(0, 1fr);
    gap: 14px;
    margin-top: 18px;
}

.io-summary-box {
    padding: 16px;
    border: 1px solid var(--io-line);
    border-radius: 18px;
    background: #fbfdff;
}

.io-summary-box strong {
    display: block;
    margin-top: 8px;
    font-size: 24px;
    line-height: 1.2;
}

.io-summary-label {
    display: inline-block;
    color: var(--io-sub);
    font-size: 12px;
    font-weight: 700;
}

.io-summary-box p {
    margin: 8px 0 0;
    color: var(--io-sub);
    font-size: 13px;
    line-height: 1.6;
}

.io-summary-box-wide strong {
    font-size: 18px;
}

.io-overall-progress {
    margin-top: 18px;
}

.io-overall-progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--io-sub);
    font-size: 13px;
    font-weight: 700;
}

.io-overall-progress-bg,
.io-item-progress-bg {
    overflow: hidden;
    width: 100%;
    border-radius: 999px;
    background: #e8eef9;
}

.io-overall-progress-bg {
    height: 12px;
}

.io-overall-progress-bar,
.io-item-progress-bar {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #4e7ae5 0%, #2f60d5 100%);
    transition: width 0.25s ease;
}

.io-result-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.io-result-card {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--io-line);
    background: #fbfdff;
}

.io-result-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.io-result-file {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.io-result-thumb-wrap {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    overflow: hidden;
    border: 1px solid #dfe8f4;
    border-radius: 12px;
    background: #fff;
}

.io-result-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.io-result-top h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    word-break: break-all;
}

.io-muted {
    margin: 4px 0 0;
    color: var(--io-sub);
    font-size: 12px;
}

.io-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.io-status-badge.waiting {
    background: #eef2f8;
    color: #5d6d84;
}

.io-status-badge.uploading,
.io-status-badge.processing {
    background: #eef4ff;
    color: var(--io-primary);
}

.io-status-badge.done {
    background: #ebf8f1;
    color: var(--io-success);
}

.io-status-badge.failed {
    background: #fff1f1;
    color: var(--io-danger);
}

.io-item-progress-bg {
    margin-top: 14px;
    height: 10px;
}

.io-item-progress-text {
    margin-top: 8px;
    color: var(--io-sub);
    font-size: 13px;
}

.io-compact-meta {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #e6edf7;
    border-radius: 14px;
    background: #fff;
}

.io-compact-meta-main {
    display: block;
    color: var(--io-text);
    font-size: 12px;
    line-height: 1.6;
    word-break: break-all;
}

.io-compact-meta-sub {
    display: block;
    margin-top: 4px;
    color: var(--io-sub);
    font-size: 11px;
    line-height: 1.5;
}

.io-action-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.io-btn,
.io-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 144px;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 14px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.io-btn.primary,
.io-download-btn {
    background: var(--io-primary);
    color: #fff;
}

.io-btn.primary:hover,
.io-download-btn:hover {
    background: var(--io-primary-dark);
}

.io-btn.line {
    background: #fff;
    color: var(--io-text);
    border-color: var(--io-line);
}

.io-btn.line:hover {
    border-color: #bfd0ee;
    background: #f8fbff;
}

@media (max-width: 900px) {
    .io-settings-grid,
    .io-upload-summary {
        grid-template-columns: 1fr;
    }

    .io-result-top,
    .io-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .io-topbar-left,
    .io-topbar-right {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .io-page {
        width: min(100% - 20px, 100%);
        padding-top: 18px;
        padding-bottom: 36px;
    }

    .io-hero,
    .io-settings-panel,
    .io-upload-panel,
    .io-list-panel {
        padding: 18px;
        border-radius: 20px;
    }

    .io-topbar-left .io-top-link,
    .io-topbar-right .io-btn,
    .io-btn.primary,
    .io-download-btn {
        width: 100%;
    }

    .io-dropzone-inner {
        min-height: 220px;
    }

    .io-dropzone h2 {
        font-size: 20px;
    }

    .io-hero h1 {
        font-size: 28px;
    }

    .io-hero-desc {
        font-size: 15px;
    }

    .io-result-thumb-wrap {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
    }

    .io-result-top h3 {
        font-size: 14px;
    }

    .io-compact-meta-main {
        font-size: 11px;
    }

    .io-compact-meta-sub {
        font-size: 10px;
    }
}
