/* ─────────────────────────────────────────────────────────────
   WordPress SEO Bulk Importer — stile vanilla, responsive
   ───────────────────────────────────────────────────────────── */

:root {
    --c-bg: #f4f6f9;
    --c-card: #ffffff;
    --c-text: #1f2933;
    --c-muted: #6b7280;
    --c-border: #e2e8f0;
    --c-primary: #2563eb;
    --c-primary-dark: #1d4ed8;
    --c-ok: #16a34a;
    --c-skip: #d97706;
    --c-err: #dc2626;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--c-text);
    background: var(--c-bg);
    line-height: 1.5;
}

code {
    background: #eef2ff;
    padding: .1em .35em;
    border-radius: 4px;
    font-size: .9em;
}

/* Topbar */
.topbar {
    background: var(--c-card);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow);
}
.topbar__inner {
    max-width: 960px;
    margin: 0 auto;
    padding: .9rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.topbar__title { font-size: 1.15rem; margin: 0; }

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

/* Stepper */
.stepper { margin-bottom: 1.5rem; }
.stepper__list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.stepper__item {
    flex: 1 1 auto;
    text-align: center;
    padding: .5rem .4rem;
    font-size: .82rem;
    color: var(--c-muted);
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    white-space: nowrap;
}
.stepper__item.is-active {
    color: #fff;
    background: var(--c-primary);
    border-color: var(--c-primary);
    font-weight: 600;
}
.stepper__item.is-done {
    color: var(--c-ok);
    border-color: var(--c-ok);
}

/* Card */
.card {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}
.card--narrow { max-width: 420px; margin: 3rem auto; }
.card__title { margin: 0 0 .5rem; font-size: 1.25rem; }
.card__hint { margin: 0 0 1.25rem; color: var(--c-muted); font-size: .92rem; }
.subtitle { margin: 1.5rem 0 .75rem; font-size: 1.05rem; }

/* Form */
.form { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field__label { font-weight: 600; font-size: .9rem; }
.field__input {
    padding: .6rem .7rem;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}
.field__input:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.field__help { font-size: .8rem; color: var(--c-muted); }
.field__error { color: var(--c-err); font-size: .88rem; }

/* Buttons */
.btn {
    display: inline-block;
    padding: .6rem 1.1rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: .95rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--c-primary); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--c-primary-dark); }
.btn--secondary { background: #eef2ff; color: var(--c-primary-dark); border-color: #c7d2fe; }
.btn--ghost { background: transparent; color: var(--c-muted); border-color: var(--c-border); }
.btn--ghost:hover { background: #f1f5f9; }
.btn--small { padding: .3rem .7rem; font-size: .82rem; }

.actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.25rem; }

/* Result box */
.result {
    margin-top: 1.25rem;
    padding: .85rem 1rem;
    border-radius: 8px;
    font-size: .92rem;
    border: 1px solid var(--c-border);
}
.result--ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.result--err { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.result--warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* Steps list */
.steps { padding-left: 1.25rem; line-height: 1.8; }

/* Code block */
.codeblock {
    border: 1px solid var(--c-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}
.codeblock__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: .5rem .75rem;
    font-size: .85rem;
    font-weight: 600;
    border-bottom: 1px solid var(--c-border);
}
.codeblock pre {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    background: #0f172a;
    color: #e2e8f0;
    font-size: .82rem;
    line-height: 1.5;
}

/* Dropzone */
.dropzone {
    border: 2px dashed var(--c-border);
    border-radius: var(--radius);
    padding: 2.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.is-drag {
    border-color: var(--c-primary);
    background: #f8faff;
}
.dropzone__text { margin: 0; color: var(--c-muted); }
.dropzone .link { color: var(--c-primary); text-decoration: underline; }
.dropzone__file { margin: .75rem 0 0; font-weight: 600; }

/* Checkbox */
.checkbox {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 1rem 0;
    font-size: .92rem;
}

/* Table */
.table-wrap { overflow-x: auto; margin-top: .5rem; }
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}
.table th, .table td {
    text-align: left;
    padding: .55rem .6rem;
    border-bottom: 1px solid var(--c-border);
    vertical-align: top;
}
.table th { background: #f8fafc; font-weight: 600; }
.table td .old { color: var(--c-muted); display: block; font-size: .82rem; }

/* Progress + counters */
.progress { width: 100%; height: 1.1rem; margin: 1rem 0 .3rem; }
.progress__label { text-align: center; color: var(--c-muted); margin: 0 0 1rem; }

.counters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
    margin: 1rem 0;
}
.counter {
    background: #f8fafc;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    padding: .75rem;
    text-align: center;
}
.counter__num { display: block; font-size: 1.5rem; font-weight: 700; }
.counter__lbl { font-size: .78rem; color: var(--c-muted); }
.counter--ok .counter__num { color: var(--c-ok); }
.counter--skip .counter__num { color: var(--c-skip); }
.counter--err .counter__num { color: var(--c-err); }

/* Log */
.log {
    list-style: none;
    margin: 1rem 0 0;
    padding: .5rem;
    max-height: 320px;
    overflow-y: auto;
    background: #f8fafc;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    font-size: .87rem;
}
.log li { padding: .3rem .4rem; border-bottom: 1px solid var(--c-border); }
.log li:last-child { border-bottom: none; }
.log__icon { margin-right: .4rem; }

/* Badge */
.badge {
    display: inline-block;
    padding: .15rem .5rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
}
.badge--ok { background: #dcfce7; color: #166534; }
.badge--skip { background: #fef3c7; color: #92400e; }
.badge--err { background: #fee2e2; color: #991b1b; }

/* Toast */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    max-width: 320px;
    padding: .75rem 1rem;
    border-radius: 8px;
    color: #fff;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s, transform .2s;
    pointer-events: none;
    z-index: 50;
}
.toast.is-show { opacity: 1; transform: translateY(0); }
.toast--ok { background: var(--c-ok); }
.toast--err { background: var(--c-err); }
.toast--info { background: var(--c-primary); }

/* Footer */
.footer {
    text-align: center;
    color: var(--c-muted);
    padding: 1.5rem;
}

/* Responsive */
@media (max-width: 600px) {
    .counters { grid-template-columns: repeat(2, 1fr); }
    .stepper__item { font-size: .72rem; padding: .4rem .25rem; }
    .actions { flex-direction: column; }
    .actions .btn { width: 100%; }
}
