:root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #0f1b2d;
    background: #f5f8fc;
    --navy: #071a34;
    --navy-2: #0b2447;
    --blue: #2377f3;
    --blue-soft: #eef6ff;
    --red: #e31e24;
    --green: #16a34a;
    --green-soft: #ecfdf3;
    --amber: #f59e0b;
    --border: #dbe4ee;
    --border-soft: #eaf0f6;
    --muted: #70819a;
    --muted-2: #94a3b8;
    --surface: #ffffff;
    --surface-soft: #f8fbff;
    --shadow: 0 18px 50px rgba(15, 32, 59, .08);
    --shadow-soft: 0 8px 24px rgba(15, 32, 59, .06);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #f5f8fc;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #0f1b2d;
    background:
        radial-gradient(circle at 50% -10%, rgba(35, 119, 243, .08), transparent 34rem),
        linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
summary,
.drop {
    -webkit-tap-highlight-color: transparent;
}

header {
    min-height: 82px;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid #e6edf5;
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 24px;
    padding: 12px max(24px, calc((100% - 1120px) / 2));
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

header img {
    height: 50px;
    width: auto;
    max-width: 190px;
    object-fit: contain;
}

header > div {
    min-height: 46px;
    border-left: 1px solid #dfe6ef;
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

header b {
    display: block;
    color: var(--navy);
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: -.02em;
}

header small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 14px;
}

header > span {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

header > span::before {
    content: "";
    width: 13px;
    height: 11px;
    border: 2px solid #8ca0ba;
    border-radius: 3px;
    position: relative;
    display: inline-block;
    box-shadow: inset 0 0 0 2px #fff;
}

main {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 54px 0 70px;
}

.intro {
    max-width: 820px;
    margin: 0 auto 28px;
    text-align: left;
}

.intro em {
    display: inline-block;
    margin-bottom: 14px;
    font-style: normal;
    color: var(--red);
    font-weight: 800;
    font-size: 13px;
    line-height: 1;
    letter-spacing: .02em;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 14px;
    color: var(--navy);
    font-size: clamp(36px, 5vw, 54px);
    line-height: 1.02;
    letter-spacing: -.045em;
    font-weight: 800;
}

h2 {
    margin-bottom: 8px;
    color: var(--navy);
    font-size: 24px;
    letter-spacing: -.025em;
}

p {
    color: var(--muted);
    line-height: 1.55;
}

.intro p {
    max-width: 760px;
    margin-bottom: 0;
    font-size: 19px;
    line-height: 1.48;
}

.card {
    background: rgba(255, 255, 255, .98);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 26px;
    box-shadow: var(--shadow-soft);
}

.hide {
    display: none !important;
}

/* STEP 1 */

#step1 {
    max-width: 820px;
    margin: 0 auto;
    padding: 22px;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.upload-card-head {
    margin-bottom: 16px;
}

.upload-card-head h2 {
    margin-bottom: 6px;
}

.upload-card-head p {
    margin: 0;
    font-size: 14px;
}

.drop {
    min-height: 300px;
    border: 1.5px dashed #bad2ee;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 13px;
    background:
        radial-gradient(circle at 50% 12%, rgba(35, 119, 243, .08), transparent 190px),
        linear-gradient(180deg, #fbfdff 0%, #f8fbff 100%);
    cursor: pointer;
    padding: 28px 26px;
    position: relative;
    transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.drop:hover {
    border-color: #7db0ea;
    background: #f8fbff;
    box-shadow: inset 0 0 0 1px rgba(35, 119, 243, .04);
}

.drop:active {
    transform: scale(.997);
}

.drop input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
    border: 0;
    pointer-events: none;
}

.upload-icon {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--blue);
    background: #edf6ff;
    box-shadow: 0 8px 22px rgba(35, 119, 243, .08);
}

.upload-icon svg {
    width: 46px;
    height: 46px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#filePrompt {
    width: min(520px, 92%);
    min-height: 58px;
    padding: 15px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(180deg, #0a2548 0%, #071a34 100%);
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    line-height: 1.2;
    text-align: center;
    box-shadow: 0 10px 22px rgba(7, 26, 52, .16);
    font-size: 0;
}

#filePrompt::after {
    content: "Wgraj zam\00f3wienie";
    font-size: 18px;
}

#step1:has(#fileInfo[style*="flex"]) #filePrompt::after {
    content: "Zmie\0144\0020plik";
}

#fileName {
    display: block;
    max-width: 92%;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #cfead8;
    border-radius: 12px;
    background: #f2fbf5;
    color: #166534;
    font-size: 13px;
    font-weight: 500;
}

.file-info > span:first-child {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #dcfce7;
    color: #15803d;
    font-weight: 900;
}

.manual-paste {
    margin-top: 14px;
}

.manual-paste summary {
    list-style: none;
    min-height: 52px;
    border: 1px solid #9fc2ee;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #0f3f83;
    background: #fff;
    cursor: pointer;
    font-weight: 750;
    transition: background .18s ease, border-color .18s ease;
}

.manual-paste summary::-webkit-details-marker {
    display: none;
}

.manual-paste summary:hover {
    background: #f7fbff;
    border-color: #77aaf0;
}

.manual-paste-icon {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border: 2px solid currentColor;
    border-radius: 5px;
    font-size: 13px;
    line-height: 1;
}

.manual-paste-body {
    padding-top: 12px;
}

textarea {
    width: 100%;
    min-height: 145px;
    padding: 14px 15px;
    border: 1px solid #cbd8e7;
    border-radius: 12px;
    font: inherit;
    line-height: 1.5;
    color: #152238;
    background: #fff;
    resize: vertical;
}

.upload-helper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
    padding: 2px 4px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.helper-icon {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eef3f9;
    color: #6d809a;
    font-size: 12px;
    font-weight: 800;
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
}

#step1 footer {
    justify-content: flex-end;
    margin-top: 18px;
}

button {
    border: 0;
    border-radius: 11px;
    padding: 12px 18px;
    background: var(--navy);
    color: #fff;
    font-weight: 750;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease, background .15s ease;
}

button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(7, 26, 52, .12);
}

button:active:not(:disabled) {
    transform: translateY(0);
}

button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

button.red {
    background: var(--red);
}

button.red:hover:not(:disabled) {
    background: #c9171d;
}

#analyze {
    min-width: 240px;
    min-height: 48px;
    background: var(--navy);
    border-radius: 13px;
}

button.secondary {
    background: #fff;
    color: #173257;
    border: 1px solid #d5dfeb;
    box-shadow: none;
}

button.secondary:hover:not(:disabled) {
    background: #f7fafe;
    border-color: #b9c9dc;
}

/* WORKFLOW */

nav.workflow {
    position: relative;
    max-width: 760px;
    margin: 24px auto 22px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
}

nav.workflow::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 20px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: #dce5ef;
}

nav.workflow i {
    position: relative;
    z-index: 1;
    padding: 0 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-style: normal;
    text-align: center;
    background: transparent;
}

.step-badge {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 2px solid #dce5ef;
    background: #f9fbfe;
    color: #7c8ca2;
    font-weight: 800;
    box-shadow: 0 0 0 6px #f5f8fc;
}

.step-copy {
    color: #72829a;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.2;
}

nav.workflow i.on .step-badge {
    border-color: var(--navy);
    background: var(--navy);
    color: #fff;
}

nav.workflow i.on .step-copy {
    color: var(--navy);
    font-weight: 800;
}

/* SOURCES */

.source-status {
    max-width: 820px;
    margin: 0 auto;
    padding: 20px 22px;
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow-soft);
}

.source-status-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.source-title-wrap {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
}

.source-icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #f1f6fc;
    color: var(--navy);
}

.source-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.source-title-wrap strong {
    display: block;
    color: var(--navy);
    font-size: 18px;
    letter-spacing: -.02em;
}

#feedSummary {
    display: inline-flex;
    align-items: center;
    min-height: 31px;
    margin-top: 4px;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--green-soft);
    color: #15803d;
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}

#feedSummary::before {
    content: "";
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .12);
}

#feedPanel:has(.source-dot.checking) #feedSummary,
#feedPanel:has(.source-dot.offline) #feedSummary {
    background: #fff7ed;
    color: #9a3412;
}

#feedPanel:has(.source-dot.checking) #feedSummary::before,
#feedPanel:has(.source-dot.offline) #feedSummary::before {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, .12);
}

.source-refresh {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid #dce5ef;
    background: #fff;
    color: #667891;
    font-size: 20px;
    line-height: 1;
    box-shadow: none;
}

.source-refresh:hover:not(:disabled) {
    background: #f6f9fd;
    box-shadow: none;
}

.source-refresh.loading {
    animation: sourceSpin 1s linear infinite;
}

@keyframes sourceSpin {
    to { transform: rotate(360deg); }
}

.source-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid #edf2f7;
    border-radius: 14px;
    overflow: hidden;
    background: #fbfdff;
}

.source-item {
    min-width: 0;
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    color: var(--navy);
    text-decoration: none;
    border-right: 1px solid #e8eef5;
    transition: background .15s ease;
}

.source-item:last-child {
    border-right: 0;
}

.source-item:hover {
    background: #f5f9fe;
}

.source-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, .12);
}

.source-dot.online {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .12);
}

.source-dot.offline {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}

.source-dot.checking {
    background: var(--amber);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, .12);
}

.source-copy {
    min-width: 0;
}

.source-copy b {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.source-copy small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.source-state {
    color: #8797ad;
    font-size: 9px;
    white-space: nowrap;
}

.source-state.online {
    color: #15803d;
}

.source-state.offline {
    color: #dc2626;
}

.source-status-foot {
    margin-top: 12px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.workflow-hint {
    max-width: 820px;
    margin: 12px auto 0;
    padding: 13px 16px;
    display: flex;
    align-items: center;
    gap: 9px;
    border-radius: 14px;
    background: #edf4fc;
    color: #5f7189;
    font-size: 12px;
    line-height: 1.45;
}

.workflow-hint strong {
    color: #193253;
}

.workflow-hint-icon {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    color: #2475e8;
    font-weight: 800;
}

body[data-step]:not([data-step="1"]) .source-status,
body[data-step]:not([data-step="1"]) .workflow-hint {
    display: none;
}

body[data-step]:not([data-step="1"]) .intro {
    max-width: 1120px;
    margin-bottom: 20px;
}

body[data-step]:not([data-step="1"]) .intro em,
body[data-step]:not([data-step="1"]) .intro p {
    display: none;
}

body[data-step]:not([data-step="1"]) .intro h1 {
    margin-bottom: 0;
    font-size: 34px;
}

body[data-step]:not([data-step="1"]) nav.workflow {
    max-width: 720px;
    margin-top: 0;
    margin-bottom: 26px;
}

/* TABLES AND PRODUCT REVIEW */

.table {
    overflow: auto;
    border: 1px solid #e5ecf4;
    border-radius: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th {
    padding: 12px 10px;
    background: #f6f9fc;
    color: #687a92;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-bottom: 1px solid #e4ebf3;
    text-align: left;
}

td {
    padding: 13px 10px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    vertical-align: top;
    color: #1d2a3d;
    font-size: 13px;
}

tbody tr:last-child td {
    border-bottom: 0;
}

td input[type="number"] {
    width: 92px;
}

.product-review-head {
    gap: 18px !important;
}

.product-review-actions {
    gap: 8px !important;
}

.review-status {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.wide {
    grid-column: 1 / -1;
}

.form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form.three {
    grid-template-columns: repeat(3, 1fr);
}

.card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.card-title h2 {
    margin: 0;
}

label {
    font-size: 13px;
    font-weight: 750;
    color: #29384c;
}

label input:not([type="file"]):not([type="checkbox"]),
label select,
.search input,
td input[type="number"] {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px 11px;
    min-height: 42px;
    border: 1px solid #cbd8e7;
    border-radius: 9px;
    font: inherit;
    color: #172235;
    background: #fff;
}

label select {
    cursor: pointer;
}

label input:not([type="file"]):not([type="checkbox"]):focus,
label select:focus,
textarea:focus,
.search input:focus,
td input[type="number"]:focus {
    outline: none;
    border-color: #79a9e4;
    box-shadow: 0 0 0 3px rgba(35, 119, 243, .10);
}

.confirm {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 13px 14px;
    border-radius: 12px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
}

.confirm input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: auto;
    margin: 0;
}

/* DIALOG */

dialog {
    width: min(1040px, 94vw);
    max-height: 88vh;
    border: 1px solid #dfe7f0;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

dialog::backdrop {
    background: rgba(7, 18, 34, .58);
    backdrop-filter: blur(3px);
}

.close {
    float: right;
    width: 38px;
    height: 38px;
    padding: 0;
    display: grid;
    place-items: center;
    background: #f3f6fa;
    color: #233550;
    font-size: 24px;
    box-shadow: none;
}

.search {
    display: flex;
    gap: 10px;
}

.search input {
    flex: 1;
    margin-top: 0;
    padding: 12px;
}

.filters {
    display: flex;
    gap: 8px;
    margin: 14px 0;
    flex-wrap: wrap;
}

.filters button {
    background: #eef3f8;
    color: #1d3555;
    border: 1px solid #dce5ef;
    box-shadow: none;
}

.result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 18px;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 15px;
    margin: 9px 0;
    background: #fff;
}

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

#toast {
    position: fixed;
    right: 20px;
    top: 100px;
    max-width: min(420px, calc(100vw - 32px));
    background: var(--navy);
    color: #fff;
    padding: 14px 18px;
    border-radius: 12px;
    display: none;
    z-index: 99;
    box-shadow: 0 18px 35px rgba(7, 26, 52, .22);
    font-size: 13px;
    line-height: 1.45;
}

@media (max-width: 900px) {
    header {
        gap: 16px;
        padding-left: 20px;
        padding-right: 20px;
    }

    header img {
        height: 44px;
        max-width: 150px;
    }

    header > div {
        padding-left: 16px;
    }

    header b {
        font-size: 18px;
    }

    main {
        width: min(100% - 32px, 1120px);
        padding-top: 38px;
    }

    .source-state {
        display: none;
    }
}

@media (max-width: 760px) {
    header {
        min-height: 76px;
        grid-template-columns: auto 1fr auto;
        gap: 12px;
        padding: 10px 14px;
        position: relative;
    }

    header img {
        height: 42px;
        max-width: 130px;
    }

    header > div {
        min-height: 42px;
        padding-left: 12px;
    }

    header b {
        font-size: 17px;
    }

    header small {
        font-size: 12px;
    }

    header > span {
        max-width: 68px;
        font-size: 11px;
        line-height: 1.25;
        text-align: left;
    }

    header > span::before {
        display: none;
    }

    main {
        width: 100%;
        padding: 34px 16px 48px;
    }

    .intro {
        margin-bottom: 24px;
    }

    .intro em {
        margin-bottom: 12px;
        font-size: 12px;
    }

    h1 {
        margin-bottom: 14px;
        font-size: 36px;
        line-height: 1.04;
    }

    .intro p {
        font-size: 17px;
        line-height: 1.45;
    }

    #step1 {
        padding: 14px;
        border-radius: 20px;
    }

    .upload-card-head {
        padding: 4px 3px 0;
    }

    .upload-card-head h2 {
        font-size: 19px;
    }

    .upload-card-head p {
        font-size: 12px;
    }

    .drop {
        min-height: 280px;
        padding: 24px 14px;
        border-radius: 17px;
    }

    .upload-icon {
        width: 82px;
        height: 82px;
    }

    #filePrompt {
        width: 94%;
        min-height: 56px;
        padding: 14px 18px;
        font-size: 17px;
    }

    #fileName {
        font-size: 13px;
    }

    .manual-paste summary {
        min-height: 52px;
        font-size: 14px;
    }

    .upload-helper {
        font-size: 12px;
    }

    #step1 footer {
        margin-top: 16px;
    }

    #analyze {
        width: 100%;
        min-height: 50px;
    }

    nav.workflow {
        margin-top: 24px;
        margin-bottom: 20px;
    }

    nav.workflow::before {
        top: 18px;
        left: 12.5%;
        right: 12.5%;
    }

    .step-badge {
        width: 38px;
        height: 38px;
        box-shadow: 0 0 0 5px #f5f8fc;
        font-size: 13px;
    }

    .step-copy {
        max-width: 78px;
        font-size: 11px;
    }

    .source-status {
        padding: 16px;
        border-radius: 18px;
    }

    .source-status-head {
        margin-bottom: 12px;
    }

    .source-icon {
        width: 32px;
        height: 32px;
    }

    .source-title-wrap strong {
        font-size: 16px;
    }

    #feedSummary {
        padding: 4px 8px;
        font-size: 10px;
    }

    .source-refresh {
        width: 32px;
        height: 32px;
    }

    .source-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .source-item {
        grid-template-columns: 8px minmax(0, 1fr);
        gap: 7px;
        padding: 13px 8px;
    }

    .source-copy b {
        font-size: 11px;
    }

    .source-copy small {
        font-size: 9px;
    }

    .source-state {
        display: none;
    }

    .source-status-foot {
        margin-top: 10px;
        font-size: 10px;
    }

    .workflow-hint {
        padding: 11px 12px;
        font-size: 11px;
    }

    body[data-step]:not([data-step="1"]) .intro h1 {
        font-size: 28px;
    }

    .grid,
    .form,
    .form.three {
        grid-template-columns: 1fr;
    }

    .wide {
        grid-column: auto;
    }

    .card {
        padding: 16px;
        border-radius: 18px;
    }

    .card-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .product-review-actions {
        width: 100%;
        justify-content: stretch !important;
    }

    .product-review-actions > * {
        flex: 1 1 150px;
    }

    #step2 .table {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    #step2 table,
    #step2 tbody,
    #step2 tr,
    #step2 td {
        display: block;
        width: 100%;
    }

    #step2 thead {
        display: none;
    }

    #step2 tbody {
        display: grid;
        gap: 14px;
    }

    #step2 tr {
        padding: 14px;
        border: 1px solid #e1e9f2;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 7px 18px rgba(15, 32, 59, .05);
    }

    #step2 td {
        padding: 8px 0;
        border: 0;
    }

    #step2 td::before {
        display: block;
        margin-bottom: 5px;
        color: #8a99ad;
        font-size: 9px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .045em;
    }

    #step2 td:nth-child(1)::before { content: "Zamowienie klienta"; }
    #step2 td:nth-child(2)::before { content: "Produkt / SKU"; }
    #step2 td:nth-child(3)::before { content: "Zrodlo"; }
    #step2 td:nth-child(4)::before { content: "Ilosc"; }
    #step2 td:nth-child(5)::before { content: "Netto"; }
    #step2 td:nth-child(6)::before { content: "Akcja"; }

    #step2 td input[type="number"] {
        width: 130px;
        margin-top: 0;
    }

    #step2 .row-actions {
        grid-template-columns: 1fr 1fr !important;
        min-width: 0 !important;
    }

    .result {
        grid-template-columns: 1fr;
    }

    footer {
        flex-wrap: wrap;
    }

    footer button {
        flex: 1 1 180px;
    }

    dialog {
        width: 96vw;
        padding: 18px;
        border-radius: 20px;
    }

    .search {
        align-items: stretch;
        flex-direction: column;
    }

    #toast {
        top: auto;
        right: 16px;
        left: 16px;
        bottom: 18px;
        max-width: none;
    }
}

@media (max-width: 430px) {
    header {
        grid-template-columns: 116px minmax(0, 1fr) 54px;
        gap: 8px;
    }

    header img {
        width: 116px;
        max-width: 116px;
        height: auto;
    }

    header > div {
        padding-left: 9px;
    }

    header b {
        font-size: 15px;
    }

    header small {
        font-size: 10px;
    }

    header > span {
        max-width: 54px;
        font-size: 10px;
    }

    h1 {
        font-size: 34px;
    }

    .intro p {
        font-size: 16px;
    }

    .source-status-head {
        gap: 8px;
    }

    .source-title-wrap {
        gap: 8px;
    }

    #feedSummary {
        max-width: 125px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .source-refresh {
        display: none;
    }

    .workflow-hint-icon {
        display: none;
    }
}
