:root {
    --text: #333;
    --muted: #828b95;
    --label: #525c69;
    --border: #d5d7db;
    --focus: #2fc6f6;
    --primary: #2fc6f6;
    --primary-hover: #3eddff;
    --error: #ff5752;
    --error-bg: #fff1f0;
    --success-bg: #f1fbd0;
    --success-border: #bbed21;
    --bg: #fff;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.45 "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.card {
    max-width: 760px;
    padding: 18px 20px 22px;
}

.head { margin-bottom: 16px; }
h1 { font-size: 20px; font-weight: 600; margin: 0 0 2px; color: #333; }
.muted { color: var(--muted); font-size: 13px; }
.task-ref { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.field { margin-bottom: 16px; }
label { display: block; margin-bottom: 6px; color: var(--label); font-size: 13px; font-weight: 600; }
.req { color: var(--error); }

input[type=text], textarea, select {
    width: 100%;
    padding: 9px 11px;
    font: inherit;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 110px; }
select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23828b95'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 32px; }
input:focus, textarea:focus, select:focus { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(47, 198, 246, .18); }

.field.invalid input, .field.invalid textarea, .field.invalid select, .field.invalid .drop { border-color: var(--error); }
.err { color: var(--error); font-size: 12px; margin-top: 5px; min-height: 0; }
.err:empty { display: none; }

.drop {
    border: 1px dashed #b9bfc6;
    border-radius: 8px;
    padding: 14px;
    background: #fafbfc;
    transition: background .15s, border-color .15s;
}
.drop.over { background: #eefaff; border-color: var(--focus); }
.drop-text { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.thumbs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.thumbs:not(:empty) { margin-top: 12px; }
.thumbs li { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: #eef0f2; border: 1px solid #e3e6e9; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs .noimg { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 11px; color: var(--muted); padding: 6px; text-align: center; word-break: break-all; }
.thumbs .size { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 6px; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.thumbs .rm {
    position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%;
    background: rgba(0, 0, 0, .55); color: #fff; font-size: 14px; line-height: 22px; cursor: pointer; padding: 0;
}
.thumbs .rm:hover { background: var(--error); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 39px; padding: 0 20px; border-radius: 20px; border: 1px solid transparent;
    font: 600 12px/1 inherit; font-family: inherit; text-transform: uppercase; letter-spacing: .02em; cursor: pointer;
    transition: background .15s, border-color .15s, opacity .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-light { background: #fff; color: var(--label); border-color: #c6cdd3; height: 34px; }
.btn-light:hover { border-color: #a1a6ac; }
.btn[disabled] { opacity: .6; cursor: default; }
.btn .spin { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.actions { display: flex; align-items: center; gap: 14px; margin-top: 4px; }

.alert { padding: 11px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 13px; }
.alert-error { background: var(--error-bg); color: #a12a25; border: 1px solid #ffd3d1; }
.alert-success { background: var(--success-bg); color: #3b4a09; border: 1px solid var(--success-border); }
.alert a { color: #0b66c3; }

.warnings { padding-left: 18px; color: #8a6d00; font-size: 13px; }
.warnings:empty { display: none; }

.install .steps { list-style: none; padding: 0; margin: 0 0 14px; }
.install .steps li { padding: 4px 0 4px 24px; position: relative; }
.install .steps li::before { position: absolute; left: 0; font-weight: 700; }
.install .steps li.ok::before { content: "✓"; color: #7fb600; }
.install .steps li.fail::before { content: "!"; color: var(--error); }

@media (max-width: 520px) {
    .card { padding: 14px 12px 18px; }
    .actions .btn-primary { width: 100%; }
    .actions { flex-direction: column; align-items: stretch; }
}
