:root {
    --canvas: #f3f5f6;
    --surface: #ffffff;
    --surface-2: #f8faf9;
    --ink: #17212b;
    --ink-soft: #59656f;
    --ink-faint: #68747d;
    --line: #dce3e5;
    --line-strong: #c6d0d3;
    --navy: #163349;
    --navy-2: #21445d;
    --teal: #0f766e;
    --teal-soft: #e7f5f2;
    --orange: #e85d13;
    --orange-strong: #c94808;
    --orange-soft: #fff1e8;
    --amber: #9a5b0b;
    --amber-soft: #fff7df;
    --danger: #b42318;
    --danger-soft: #fff0ee;
    --shadow: 0 12px 30px rgba(28, 49, 61, 0.08);
    --focus: 0 0 0 3px rgba(15, 118, 110, 0.2);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--canvas);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0;
}

button,
input,
select,
textarea {
    font: inherit;
    letter-spacing: 0;
}

button,
a,
label,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

button,
a {
    touch-action: manipulation;
}

a {
    color: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

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

h1,
h2,
h3 {
    letter-spacing: 0;
}

code {
    padding: 2px 5px;
    color: var(--navy);
    background: #eef3f4;
    border-radius: 4px;
    font-size: 0.92em;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--teal);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}

.brand > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.18;
}

.brand strong {
    overflow: hidden;
    font-size: 15px;
    font-weight: 760;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand small {
    margin-top: 4px;
    color: var(--ink-faint);
    font-size: 9px;
    font-weight: 800;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    color: #fff;
    background: var(--orange);
    border-radius: 7px;
    font-size: 18px;
    font-weight: 850;
}

.brand-light,
.brand-light small {
    color: #fff;
}

.brand-light small {
    opacity: 0.62;
}

.status-dot {
    width: 8px;
    height: 8px;
    display: inline-block;
    flex: 0 0 8px;
    background: var(--ink-faint);
    border-radius: 50%;
}

.status-dot.ok {
    background: #28a38f;
    box-shadow: 0 0 0 3px rgba(40, 163, 143, 0.12);
}

.status-dot.bad {
    background: #d85043;
    box-shadow: 0 0 0 3px rgba(216, 80, 67, 0.12);
}

.alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    color: #1f4f49;
    background: var(--teal-soft);
    border: 1px solid #c5e4de;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.55;
}

.alert.error {
    color: #8c1d15;
    background: var(--danger-soft);
    border-color: #efc7c2;
}

.alert.warning {
    color: #77500b;
    background: var(--amber-soft);
    border-color: #ead6a0;
}

.primary-button,
.secondary-button,
.quiet-button,
.icon-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.primary-button {
    padding: 0 18px;
    color: #fff;
    background: var(--orange-strong);
    border: 1px solid var(--orange-strong);
}

.primary-button:hover {
    background: var(--orange-strong);
    border-color: var(--orange-strong);
}

.secondary-button {
    padding: 0 16px;
    color: var(--navy);
    background: #fff;
    border: 1px solid var(--line-strong);
}

.secondary-button:hover {
    background: #f3f7f7;
    border-color: #aebcc0;
}

.secondary-button.small {
    min-height: 36px;
    padding: 0 12px;
    font-size: 12px;
}

.wide {
    width: 100%;
}

.quiet-button {
    padding: 0 13px;
    color: var(--ink-soft);
    background: transparent;
    border: 1px solid var(--line);
}

.quiet-button:hover {
    color: var(--ink);
    background: var(--surface-2);
}

.icon-button {
    width: 44px;
    min-width: 44px;
    padding: 0;
    color: #45555f;
    background: #fff;
    border: 1px solid var(--line);
}

.icon-button:hover {
    color: var(--teal);
    background: var(--teal-soft);
    border-color: #b9ddd6;
}

.icon-button.danger:hover {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: #efc7c2;
}

.setup-body,
.auth-body {
    min-height: 100dvh;
    background: #e9eef0;
}

.setup-shell,
.auth-shell {
    width: min(1120px, calc(100% - 48px));
    min-height: 100dvh;
    margin: 0 auto;
    padding: 40px 0;
    display: grid;
    grid-template-columns: minmax(360px, 0.8fr) minmax(520px, 1.2fr);
    align-items: stretch;
}

.setup-aside,
.auth-visual {
    min-height: 680px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    background: var(--navy);
    border: 1px solid #102c40;
    border-radius: var(--radius) 0 0 var(--radius);
    box-shadow: 0 24px 54px rgba(24, 47, 63, 0.16);
}

.setup-copy,
.auth-visual > div {
    max-width: 410px;
    padding: 60px 0;
}

.setup-copy .eyebrow,
.auth-visual .eyebrow {
    color: #78d4c7;
}

.setup-copy h1,
.auth-visual h1 {
    margin-bottom: 18px;
    color: #fff;
    font-size: 38px;
    line-height: 1.17;
}

.setup-copy p:last-child,
.auth-visual p:last-child {
    color: #c0d2dc;
    font-size: 15px;
}

.setup-steps {
    display: flex;
    gap: 16px;
    color: #82a0b2;
    font-size: 11px;
    font-weight: 800;
}

.setup-steps .active {
    color: #7dd8cb;
}

.setup-panel,
.auth-panel {
    padding: 48px 54px;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    box-shadow: 0 24px 54px rgba(24, 47, 63, 0.1);
}

.setup-panel h2,
.auth-panel h2 {
    margin-bottom: 8px;
    font-size: 28px;
}

.section-copy {
    margin-bottom: 26px;
    color: var(--ink-soft);
    font-size: 14px;
}

.environment-grid {
    margin: 24px 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: 6px;
}

.environment-grid > div {
    min-height: 48px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 9px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: 12px;
}

.environment-grid > div:nth-child(2n) {
    border-right: 0;
}

.environment-grid > div:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.environment-grid strong {
    margin-left: auto;
    color: var(--ink-soft);
    font-size: 11px;
}

.setup-form fieldset {
    margin: 0 0 26px;
    padding: 0;
    border: 0;
}

.setup-form legend {
    width: 100%;
    margin-bottom: 14px;
    padding-bottom: 9px;
    color: var(--navy);
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    font-weight: 800;
}

.auth-shell {
    align-items: center;
}

.auth-visual,
.auth-panel {
    min-height: 620px;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-note {
    margin: 22px 0 0;
    color: var(--ink-faint);
    font-size: 11px;
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    padding-right: 66px;
}

.password-field button {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 58px;
    min-height: 40px;
    color: var(--teal);
    background: transparent;
    border: 0;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 750;
}

.setup-form label,
.auth-form label,
.form-section label,
.result-card label {
    display: block;
    color: #394851;
    font-size: 12px;
    font-weight: 720;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    margin-top: 7px;
    padding: 10px 12px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea {
    min-height: 96px;
    resize: vertical;
    line-height: 1.6;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--teal);
    box-shadow: var(--focus);
}

input::placeholder,
textarea::placeholder {
    color: #68747d;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.setup-form > label,
.form-section > label {
    margin-top: 16px;
}

.check-line {
    margin: 2px 0 20px;
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.55;
}

.check-line input,
.existing-images input {
    width: 18px;
    min-height: 18px;
    margin: 2px 0 0;
}

.admin-shell {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 238px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    z-index: 40;
    top: 0;
    height: 100dvh;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    color: #d8e3e9;
    background: var(--navy);
    border-right: 1px solid #102d41;
}

.sidebar .brand {
    max-width: 100%;
    padding: 0 8px 22px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .brand small {
    color: #8eacbd;
}

.sidebar nav {
    margin-top: 22px;
    display: grid;
    gap: 5px;
}

.nav-item {
    min-height: 46px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #b7cad5;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
    color: #fff;
    background: var(--navy-2);
    border-color: rgba(255, 255, 255, 0.12);
}

.nav-item.active svg {
    color: #78d4c7;
}

.nav-separator {
    height: 1px;
    margin: 12px 8px;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-foot {
    margin-top: auto;
    padding: 14px 10px;
    display: grid;
    grid-template-columns: 8px 1fr;
    align-items: center;
    gap: 8px;
    color: #9eb6c4;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 10px;
}

.sidebar-foot strong {
    grid-column: 2;
    overflow: hidden;
    color: #fff;
    font-size: 12px;
    text-overflow: ellipsis;
}

.admin-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    min-height: 70px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--line);
}

.topbar-title {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.topbar-title strong {
    font-size: 13px;
}

.topbar-title span {
    margin-top: 2px;
    color: var(--ink-faint);
    font-size: 10px;
}

.topbar form {
    margin-left: auto;
}

.menu-button {
    display: none;
}

.content {
    width: min(1280px, calc(100% - 64px));
    margin: 0 auto;
    padding: 38px 0 54px;
    flex: 1;
}

.page-heading {
    margin-bottom: 28px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.page-heading h1 {
    margin-bottom: 9px;
    font-size: 30px;
    line-height: 1.2;
}

.page-heading p:last-child {
    max-width: 700px;
    margin-bottom: 0;
    color: var(--ink-soft);
    font-size: 14px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.panel-heading {
    min-height: 66px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
    margin-bottom: 0;
    font-size: 18px;
    line-height: 1.25;
}

.panel-heading > a,
.panel-heading > span {
    color: var(--ink-soft);
    font-size: 12px;
    text-decoration: none;
}

.panel-heading > a:hover {
    color: var(--teal);
}

.step-index {
    color: var(--line-strong) !important;
    font-size: 24px !important;
    font-weight: 800;
}

.section-gap {
    margin-top: 24px;
}

.stat-grid {
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stat-grid article {
    min-height: 132px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-grid span,
.stat-grid small {
    display: block;
    color: var(--ink-faint);
    font-size: 11px;
}

.stat-grid strong {
    display: block;
    margin: 10px 0 3px;
    color: var(--navy);
    font-size: 30px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.dashboard-grid,
.settings-layout,
.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
    gap: 24px;
    align-items: start;
}

.compact-list a {
    min-height: 74px;
    padding: 12px 18px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    color: inherit;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
}

.compact-list a:last-child {
    border-bottom: 0;
}

.compact-list a:hover {
    background: var(--surface-2);
}

.compact-list strong,
.compact-list small,
td strong,
td small {
    display: block;
}

.compact-list strong,
td strong {
    overflow-wrap: anywhere;
    font-size: 13px;
}

.compact-list small,
td small {
    margin-top: 3px;
    color: var(--ink-faint);
    font-size: 11px;
}

.compact-list em {
    color: var(--orange);
    font-size: 13px;
    font-style: normal;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.list-symbol {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--navy-2);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
}

.list-symbol.orange {
    background: var(--orange);
}

.readiness-list > div {
    min-height: 76px;
    padding: 14px 18px;
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--line);
}

.readiness-list > div:last-child {
    border-bottom: 0;
}

.readiness-list strong,
.readiness-list small {
    display: block;
}

.readiness-list strong {
    font-size: 13px;
}

.readiness-list small {
    margin-top: 3px;
    color: var(--ink-faint);
    font-size: 11px;
}

.readiness-list a {
    color: var(--teal);
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.pill {
    min-height: 26px;
    padding: 3px 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
}

.pill.good {
    color: #17675e;
    background: var(--teal-soft);
    border-color: #c5e4de;
}

.pill.warning {
    color: var(--amber);
    background: var(--amber-soft);
    border-color: #ead6a0;
}

.pill.muted {
    color: var(--ink-soft);
    background: #f2f5f5;
}

.empty-state {
    min-height: 230px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--ink-faint);
    text-align: center;
}

.empty-state.large {
    min-height: 390px;
}

.empty-state h2,
.empty-state h3 {
    margin: 14px 0 6px;
    color: var(--ink);
}

.empty-state p {
    margin-bottom: 18px;
    font-size: 13px;
}

.panel-toolbar {
    min-height: 66px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
}

.panel-toolbar > span {
    color: var(--ink-faint);
    font-size: 12px;
}

.search-box {
    width: min(360px, 100%);
}

.search-box input {
    margin-top: 0;
    background: var(--surface-2);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

th,
td {
    padding: 13px 16px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--line);
}

th {
    color: var(--ink-faint);
    background: var(--surface-2);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

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

tbody tr:hover td {
    background: #fbfcfc;
}

td.money {
    color: var(--orange);
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.expired-text {
    color: var(--danger) !important;
}

td.actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
}

td.actions form {
    display: inline-flex;
}

.product-cell {
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-name {
    display: block;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
    align-items: start;
}

.editor-main {
    display: grid;
    gap: 20px;
}

.form-section {
    padding-bottom: 22px;
}

.form-section > label,
.form-section > .form-grid,
.form-section > .upload-grid,
.form-section > .existing-images,
.form-section > .sku-table,
.form-section > .field-note,
.form-section > .primary-button,
.form-section > .secondary-button,
.form-section > .alert,
.form-section > .flow-list,
.form-section > .security-list,
.form-section > .config-facts {
    margin-left: 20px;
    margin-right: 20px;
}

.payment-provider-switch {
    margin: 18px 20px 4px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.payment-provider-switch label {
    position: relative;
    min-height: 68px;
    padding: 12px 13px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    color: var(--ink-soft);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.payment-provider-switch label:has(input:checked) {
    color: var(--navy);
    background: var(--teal-soft);
    border-color: #9bcfc5;
}

.payment-provider-switch label:has(input:focus-visible) {
    box-shadow: var(--focus);
}

.payment-provider-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.payment-provider-switch span,
.payment-provider-switch strong,
.payment-provider-switch small {
    display: block;
}

.payment-provider-switch strong {
    font-size: 13px;
}

.payment-provider-switch small {
    margin-top: 3px;
    color: var(--ink-faint);
    font-size: 11px;
    font-weight: 500;
}

.payment-provider-switch em {
    color: var(--teal);
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
}

.payment-config-panel {
    margin: 18px 20px 0;
    padding-top: 2px;
    border-top: 1px solid var(--line);
}

.payment-config-panel > label,
.payment-config-panel > .form-grid {
    margin-top: 16px;
}

.field-help {
    display: block;
    margin-top: 6px;
    color: var(--ink-faint);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.55;
}

.form-section > .form-grid,
.form-section > .upload-grid,
.form-section > .sku-table {
    margin-top: 18px;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.upload-box {
    min-height: 146px;
    padding: 18px;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--ink-soft) !important;
    background: var(--surface-2);
    border: 1px dashed var(--line-strong);
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.upload-box:hover {
    background: var(--teal-soft);
    border-color: var(--teal);
}

.upload-box input {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
}

.upload-box strong {
    color: var(--ink);
    font-size: 13px;
}

.upload-box small {
    color: var(--ink-faint);
    font-size: 10px;
}

.existing-images {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.existing-images label {
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.existing-images img {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: block;
    object-fit: cover;
}

.existing-images span {
    min-height: 34px;
    padding: 4px 7px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--danger);
    font-size: 10px;
}

.sku-table {
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
}

.sku-head,
.sku-row {
    display: grid;
    grid-template-columns: minmax(150px, 1.4fr) minmax(100px, 0.8fr) minmax(90px, 0.7fr) 44px;
    gap: 10px;
    align-items: center;
}

.sku-head {
    min-height: 38px;
    padding: 0 10px;
    color: var(--ink-faint);
    background: var(--surface-2);
    font-size: 10px;
    font-weight: 800;
}

.sku-row {
    padding: 9px 10px;
    border-top: 1px solid var(--line);
}

.sku-row input {
    min-height: 40px;
    margin-top: 0;
}

.sku-row .icon-button {
    min-height: 40px;
    height: 40px;
}

.field-note {
    margin-top: 12px;
    margin-bottom: 0;
    color: var(--ink-faint);
    font-size: 11px;
}

.editor-aside {
    position: sticky;
    top: 24px;
}

.phone-preview {
    width: 290px;
    margin: 0 auto;
    overflow: hidden;
    background: #f4f4f4;
    border: 8px solid #1f2932;
    border-radius: 26px;
    box-shadow: 0 18px 40px rgba(31, 41, 50, 0.16);
}

.phone-top {
    min-height: 38px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    background: #1f2932;
    font-size: 9px;
}

.phone-image {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #9aa2a7;
    background: #e9edef;
    background-position: center;
    background-size: cover;
}

.phone-image.has-image > * {
    display: none;
}

.phone-image small {
    font-size: 10px;
}

.phone-copy {
    min-height: 132px;
    padding: 14px;
    background: #fff;
}

.phone-price {
    color: #f4511e;
    font-size: 20px;
    font-variant-numeric: tabular-nums;
}

.phone-copy h3 {
    margin: 8px 0 6px;
    font-size: 13px;
    line-height: 1.45;
}

.phone-copy p {
    margin-bottom: 0;
    color: #8a9499;
    font-size: 10px;
}

.phone-bottom {
    min-height: 52px;
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    color: #555;
    background: #fff;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 10px;
}

.phone-bottom strong {
    height: 38px;
    margin-right: 8px;
    display: grid;
    place-items: center;
    color: #fff;
    background: #c94808;
    border-radius: 19px;
    font-size: 12px;
}

.sticky-actions {
    margin-top: 22px;
    padding: 18px;
    display: grid;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.sticky-actions p {
    margin-bottom: 0;
    color: var(--ink-faint);
    font-size: 10px;
    line-height: 1.55;
}

.info-banner {
    min-height: 74px;
    margin-bottom: 20px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: #31534f;
    background: var(--teal-soft);
    border: 1px solid #c5e4de;
    border-radius: var(--radius);
}

.info-banner > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-banner strong,
.info-banner small {
    display: block;
}

.info-banner strong {
    font-size: 13px;
}

.info-banner small {
    margin-top: 3px;
    color: #52726e;
    font-size: 11px;
}

.info-banner > span {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 750;
}

.split-layout .form-section form,
.result-card > #resultContent {
    padding: 20px;
}

.split-layout .form-section form > label + label,
.split-layout .form-section form > .form-grid,
.split-layout .form-section form > .primary-button {
    margin-top: 16px;
}

.inline-message {
    min-height: 22px;
    margin-top: 12px;
    color: var(--ink-soft);
    font-size: 12px;
}

.inline-message.error {
    color: var(--danger);
}

.inline-message.success {
    color: var(--teal);
}

.result-empty {
    min-height: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--ink-faint);
    text-align: center;
}

.result-empty p {
    max-width: 260px;
    margin: 14px 0 0;
    font-size: 12px;
}

.result-file {
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-file strong,
.result-file small {
    display: block;
}

.result-file strong {
    font-size: 13px;
}

.result-file small {
    margin-top: 3px;
    color: var(--ink-faint);
    font-size: 11px;
}

.countdown-box {
    margin: 18px 0;
    padding: 16px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.countdown-box span,
.countdown-box small {
    display: block;
    color: var(--ink-faint);
    font-size: 10px;
}

.countdown-box strong {
    display: block;
    margin: 6px 0 3px;
    color: var(--navy);
    font-size: 22px;
    font-variant-numeric: tabular-nums;
}

.button-row,
.qr-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
}

.guidance-panel {
    padding-bottom: 22px;
}

.guidance-panel > .eyebrow,
.guidance-panel > h2,
.guidance-panel > .flow-list,
.guidance-panel > .alert,
.guidance-panel > .config-facts,
.guidance-panel > .security-list {
    margin-left: 20px;
    margin-right: 20px;
}

.guidance-panel > [data-payment-guide] {
    margin: 20px;
}

.guidance-panel > [data-payment-guide] > .eyebrow {
    margin-top: 0;
}

.guidance-panel > [data-payment-guide] > h2 {
    margin-bottom: 18px;
}

.doc-link {
    min-height: 44px;
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--teal);
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.doc-link:hover {
    text-decoration: underline;
}

.payment-result-body {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--canvas);
}

.payment-result-shell {
    width: min(100%, 480px);
    padding: 34px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.payment-result-mark {
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--teal);
    border-radius: 50%;
    font-size: 24px;
    font-weight: 800;
}

.payment-result-mark.pending {
    background: var(--amber);
}

.payment-result-shell h1 {
    margin-bottom: 10px;
    font-size: 24px;
}

.payment-result-shell p {
    margin-bottom: 8px;
    color: var(--ink-soft);
    font-size: 13px;
}

.payment-result-order {
    margin-top: 20px !important;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

.guidance-panel > .eyebrow {
    margin-top: 20px;
}

.guidance-panel h2 {
    margin-bottom: 18px;
    font-size: 19px;
}

.flow-list {
    display: grid;
    gap: 14px;
}

.flow-list > div {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 11px;
    align-items: start;
}

.flow-list > div > span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--navy-2);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
}

.flow-list p {
    margin-bottom: 0;
}

.flow-list strong,
.flow-list small {
    display: block;
}

.flow-list strong {
    font-size: 13px;
}

.flow-list small {
    margin-top: 3px;
    color: var(--ink-faint);
    font-size: 11px;
}

.guidance-panel .alert {
    margin-top: 22px;
}

.config-facts {
    margin-bottom: 0;
}

.config-facts > div {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
}

.config-facts dt {
    color: var(--ink-faint);
}

.config-facts dd {
    margin: 0;
    color: var(--navy);
    font-weight: 750;
}

.security-list {
    display: grid;
    gap: 4px;
}

.security-list > div {
    min-height: 64px;
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--teal);
    border-bottom: 1px solid var(--line);
}

.security-list > div:last-child {
    border-bottom: 0;
}

.security-list strong,
.security-list small {
    display: block;
}

.security-list strong {
    color: var(--ink);
    font-size: 13px;
}

.security-list small {
    margin-top: 3px;
    color: var(--ink-faint);
    font-size: 11px;
}

.admin-footer {
    min-height: 62px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--ink-faint);
    border-top: 1px solid var(--line);
    font-size: 10px;
}

.sidebar-scrim {
    display: none;
}

.qr-modal {
    position: fixed;
    z-index: 100;
    inset: 0;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 33, 43, 0.58);
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease, visibility 180ms ease;
}

.qr-modal.open {
    opacity: 1;
    visibility: visible;
}

.qr-dialog {
    position: relative;
    width: min(430px, 100%);
    padding: 28px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 28px 70px rgba(9, 30, 42, 0.24);
    text-align: center;
}

.qr-dialog h2 {
    margin-bottom: 7px;
    font-size: 21px;
}

.qr-dialog > p:not(.eyebrow) {
    margin-bottom: 18px;
    color: var(--ink-soft);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.qr-close {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 22px;
}

#qrCode {
    width: 276px;
    min-height: 276px;
    margin: 0 auto;
    padding: 12px;
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px solid var(--line);
}

#qrCode img,
#qrCode canvas {
    width: 250px !important;
    height: 250px !important;
    display: block;
}

.qr-actions {
    justify-content: center;
}

.fault-body {
    display: grid;
    place-items: center;
    padding: 24px;
}

.fault-panel {
    width: min(520px, 100%);
    padding: 34px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.fault-panel h1 {
    margin: 18px 0 10px;
    font-size: 25px;
}

.fault-panel p {
    color: var(--ink-soft);
    font-size: 13px;
}

@media (max-width: 1180px) {
    .content {
        width: min(100% - 40px, 1180px);
    }

    .editor-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

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

@media (max-width: 960px) {
    .admin-shell {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-100%);
        width: 238px;
        transition: transform 220ms ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-scrim {
        position: fixed;
        z-index: 35;
        inset: 0;
        display: block;
        background: rgba(11, 29, 40, 0.45);
        opacity: 0;
        visibility: hidden;
        transition: opacity 180ms ease, visibility 180ms ease;
    }

    .sidebar-scrim.open {
        opacity: 1;
        visibility: visible;
    }

    .menu-button {
        display: inline-flex;
    }

    .topbar {
        padding: 0 20px;
    }

    .dashboard-grid,
    .settings-layout,
    .split-layout,
    .editor-layout {
        grid-template-columns: 1fr;
    }

    .editor-aside {
        position: static;
        display: grid;
        grid-template-columns: 300px minmax(0, 1fr);
        gap: 20px;
        align-items: start;
    }

    .phone-preview {
        width: 280px;
    }

    .sticky-actions {
        margin-top: 0;
    }
}

@media (max-width: 760px) {
    .setup-shell,
    .auth-shell {
        width: min(100% - 24px, 620px);
        padding: 12px 0;
        display: block;
    }

    .setup-aside,
    .auth-visual {
        min-height: 250px;
        padding: 28px;
        border-radius: var(--radius) var(--radius) 0 0;
    }

    .setup-copy,
    .auth-visual > div {
        padding: 42px 0 14px;
    }

    .setup-copy h1,
    .auth-visual h1 {
        font-size: 28px;
    }

    .setup-steps,
    .auth-visual > small {
        display: none;
    }

    .setup-panel,
    .auth-panel {
        padding: 30px 24px;
        border-left: 1px solid var(--line);
        border-top: 0;
        border-radius: 0 0 var(--radius) var(--radius);
    }

    .auth-panel {
        min-height: 420px;
    }

    .form-grid.two,
    .upload-grid,
    .payment-provider-switch {
        grid-template-columns: 1fr;
    }

    .content {
        width: calc(100% - 28px);
        padding: 28px 0 42px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-heading h1 {
        font-size: 25px;
    }

    .page-heading .primary-button {
        width: 100%;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .stat-grid article {
        min-height: 112px;
        padding: 16px;
    }

    .stat-grid strong {
        font-size: 25px;
    }

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

    .search-box {
        width: 100%;
    }

    .editor-aside {
        display: block;
    }

    .phone-preview {
        width: min(290px, 100%);
    }

    .sticky-actions {
        margin-top: 20px;
    }

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

    .sku-table {
        overflow-x: auto;
    }

    .sku-head,
    .sku-row {
        min-width: 620px;
    }

    .info-banner {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-footer {
        padding: 0 18px;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 3px;
    }

    .button-row {
        flex-direction: column;
    }

    .button-row > * {
        width: 100%;
    }
}

@media (max-width: 440px) {
    .environment-grid,
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .environment-grid > div {
        border-right: 0;
    }

    .environment-grid > div:nth-last-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }

    .environment-grid > div:last-child {
        border-bottom: 0;
    }

    .topbar-title span {
        display: none;
    }

    .topbar .quiet-button {
        padding: 0 10px;
        font-size: 11px;
    }

    .existing-images {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .qr-dialog {
        padding: 24px 18px;
    }

    #qrCode {
        width: 244px;
        min-height: 244px;
    }

    #qrCode img,
    #qrCode canvas {
        width: 220px !important;
        height: 220px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
