:root {
    --bg: #ffffff;
    --fg: #1b1a19;
    --muted: #605e5c;
    --line: #d2d0ce;
    --surface: #faf9f8;
    --accent: #0f6cbd;
    --accent-fg: #ffffff;
    --danger: #a4262c;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1f1f1f;
        --fg: #f3f2f1;
        --muted: #a19f9d;
        --line: #484644;
        --surface: #292929;
        --accent: #479ef5;
        --accent-fg: #10202b;
        --danger: #f1707b;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
}

.wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    min-height: 100vh;
}

.drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 24px 12px;
    border: 2px dashed var(--line);
    border-radius: 6px;
    background: var(--surface);
    cursor: pointer;
    text-align: center;
}

.drop-zone:hover,
.drop-zone.is-over {
    border-color: var(--accent);
}

.drop-zone__title {
    font-weight: 600;
}

.drop-zone__hint {
    color: var(--muted);
    font-size: 12px;
}

.file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 180px;
    overflow-y: auto;
}

.file-list:not(:empty) {
    border: 1px solid var(--line);
    border-radius: 4px;
}

.file-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-bottom: 1px solid var(--line);
}

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

.file-list__name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-list__size {
    color: var(--muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.file-list__remove {
    border: none;
    background: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 4px;
}

.file-list__remove:hover {
    color: var(--danger);
}

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

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

.field__label {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.field__input {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--bg);
    color: var(--fg);
    font: inherit;
}

.field__input:focus {
    outline: 2px solid var(--accent);
    outline-offset: -1px;
}

.field__suffix {
    color: var(--muted);
}

.progress__bar {
    height: 4px;
    border-radius: 2px;
    background: var(--line);
    overflow: hidden;
}

.progress__fill {
    height: 100%;
    width: 0;
    background: var(--accent);
    transition: width 120ms linear;
}

.progress__text {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.error {
    margin: 0;
    color: var(--danger);
    font-size: 12px;
}

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

.btn {
    padding: 6px 16px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--bg);
    color: var(--fg);
    font: inherit;
    cursor: pointer;
}

.btn:hover:not(:disabled) {
    background: var(--surface);
}

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

.btn--primary:hover:not(:disabled) {
    filter: brightness(1.1);
    background: var(--accent);
}

.btn:disabled {
    opacity: 0.5;
    cursor: default;
}
