.mp-page {
    width: min(100%, 1440px);
    margin: 0 auto;
    padding: 22px 4px 42px;
}

.mp-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 36px;
    align-items: center;
    overflow: hidden;
    padding: 32px 34px;
    border: 1px solid #d8e3e8;
    border-radius: 22px;
    background:
        radial-gradient(circle at 92% 10%, rgba(232, 90, 50, 0.13), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f3f8fa 100%);
    box-shadow: 0 16px 42px rgba(31, 53, 66, 0.07);
}

.mp-hero::after {
    position: absolute;
    right: -48px;
    bottom: -84px;
    width: 220px;
    height: 220px;
    border: 34px solid rgba(18, 111, 150, 0.06);
    border-radius: 50%;
    content: "";
}

.mp-kicker {
    margin-bottom: 8px;
    color: var(--tenant-primary, var(--accent));
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.mp-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(27px, 3vw, 40px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.mp-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.65;
}

.mp-flow {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 7px;
}

.mp-flow span {
    display: grid;
    min-width: 86px;
    min-height: 48px;
    place-items: center;
    padding: 8px 12px;
    border: 1px solid #d8e3e8;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: #2c4655;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 5px 16px rgba(31, 53, 66, 0.05);
}

.mp-flow b { display: none; }

.mp-panel {
    margin-top: 18px;
    padding: 26px 28px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(31, 53, 66, 0.05);
}

.mp-panel > h2 {
    margin: 0 0 20px;
    font-size: 19px;
    letter-spacing: -0.02em;
}

.mp-form { display: grid; gap: 18px; }

.mp-target-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mp-target-switch label {
    display: flex;
    gap: 11px;
    align-items: center;
    min-height: 54px;
    padding: 12px 15px;
    border: 1px solid #ccd9df;
    border-radius: 13px;
    background: #f8fafb;
    color: #324955;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.mp-target-switch label:has(input:checked) {
    border-color: var(--tenant-primary, var(--accent));
    background: #fff8f5;
    box-shadow: 0 0 0 3px rgba(232, 90, 50, 0.09);
}

.mp-target-switch input { accent-color: var(--tenant-primary, var(--accent)); }
.mp-target-fields { display: grid; grid-template-columns: repeat(2, minmax(240px, 1fr)); gap: 16px; }
.mp-target-fields[hidden] { display: none; }

.mp-field { display: grid; gap: 7px; }
.mp-field label { color: #293e49; font-size: 12px; font-weight: 800; }
.mp-field select,
.mp-field input[type="file"] {
    width: 100%;
    min-height: 46px;
    padding: 8px 11px;
    border: 1px solid #bdccd4;
    border-radius: 11px;
    background: #fff;
    color: var(--text);
}

.mp-upload-row {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) auto;
    gap: 14px;
    align-items: end;
    padding: 18px;
    border: 1px dashed #b9cbd4;
    border-radius: 14px;
    background: #f8fbfc;
}

.mp-file-name { color: var(--text-muted); font-size: 11px; }
.mp-button {
    min-height: 46px;
    padding: 11px 18px;
    border: 0;
    border-radius: 11px;
    background: var(--tenant-primary, var(--accent));
    color: #fff;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(216, 73, 47, 0.18);
}
.mp-button:hover { filter: brightness(0.94); transform: translateY(-1px); }

.mp-note {
    padding: 13px 15px;
    border: 1px solid #e7deba;
    border-radius: 11px;
    background: #fffaf0;
    color: #66551b;
    font-size: 12px;
    line-height: 1.55;
}
.mp-form + .mp-note { margin-top: 16px; }

.mp-jobs { display: grid; gap: 14px; }
.mp-job { padding: 19px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.mp-job-head { display: flex; gap: 20px; justify-content: space-between; align-items: flex-start; }
.mp-job h3 { margin: 0 0 5px; font-size: 16px; }
.mp-meta { color: var(--text-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.mp-progress { margin-top: 17px; padding: 15px 16px 13px; border: 1px solid #dde6ea; border-radius: 12px; background: #f8fafb; }
.mp-progress-summary { display: flex; gap: 18px; justify-content: space-between; align-items: center; margin-bottom: 10px; color: #314955; font-size: 11px; }
.mp-progress-summary strong { font-size: 12px; }
.mp-progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #e3eaee; }
.mp-progress-track > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e85a32, #ef845f); transition: width 350ms ease; }
.mp-progress-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.mp-progress-steps li { display: flex; gap: 7px; align-items: center; color: #8a9aa3; font-size: 10px; font-weight: 750; }
.mp-progress-steps li > span { display: grid; width: 22px; height: 22px; flex: 0 0 22px; place-items: center; border: 1px solid #cbd7dc; border-radius: 50%; background: #fff; font-size: 9px; }
.mp-progress-steps li.is-current { color: #c84726; }
.mp-progress-steps li.is-current > span { border-color: #e85a32; background: #fff2ed; color: #c84726; box-shadow: 0 0 0 3px rgba(232, 90, 50, 0.1); }
.mp-progress-steps li.is-complete { color: #23734a; }
.mp-progress-steps li.is-complete > span { border-color: #2f8a5c; background: #2f8a5c; color: #fff; }
.mp-progress--completed .mp-progress-track > span { background: #2f8a5c; }
.mp-progress--failed { border-color: #f0caca; background: #fff7f7; }
.mp-progress--failed .mp-progress-track > span { background: #c93d3d; }
.mp-badge { display: inline-flex; padding: 6px 9px; border-radius: 999px; background: #e9eff3; font-size: 10px; font-weight: 850; white-space: nowrap; }
.mp-badge--preview_ready, .mp-badge--completed { background: #dff5e9; color: #17643b; }
.mp-badge--failed { background: #fde4e4; color: #9b1c1c; }
.mp-badge--processing, .mp-badge--queued, .mp-badge--applying, .mp-badge--apply_queued { background: #fff0d6; color: #7b5000; }
.mp-job .mp-note { margin-top: 14px; }
.mp-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 9px; margin: 14px 0; }
.mp-count { padding: 12px; border: 1px solid #e4eaee; border-radius: 10px; background: #f7f9fa; }
.mp-count strong { display: block; margin-bottom: 3px; color: #223844; font-size: 20px; }
.mp-count span { color: var(--text-muted); font-size: 10px; font-weight: 700; }
.mp-warning { margin: 7px 0; padding: 10px 12px; border-left: 3px solid #e6a700; border-radius: 6px; background: #fff8e5; font-size: 11px; }
.mp-confirm { display: flex; justify-content: flex-end; margin-top: 14px; }
.mp-empty { padding: 38px 20px; border: 1px dashed #cbd6dc; border-radius: 13px; color: var(--text-muted); text-align: center; font-size: 12px; }
.mp-danger { color: #9b1c1c; font-size: 12px; font-weight: 750; }

@media (max-width: 1050px) {
    .mp-hero { grid-template-columns: 1fr; }
    .mp-flow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .mp-page { padding-top: 12px; }
    .mp-hero, .mp-panel { padding: 20px; border-radius: 15px; }
    .mp-flow, .mp-target-switch, .mp-target-fields, .mp-upload-row { grid-template-columns: 1fr; }
    .mp-job-head { display: grid; }
    .mp-progress-steps { grid-template-columns: repeat(2, 1fr); }
}
