:root {
    --bg: #f5f7fa;
    --panel: #ffffff;
    --ink: #18202c;
    --muted: #667085;
    --line: #d7dde5;
    --accent: #0f766e;
    --accent-dark: #115e59;
    --danger: #b42318;
    --warning: #a15c07;
    --ok: #16703f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 0;
}

button,
input,
select {
    font: inherit;
}

.checkout-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 32px auto;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.summary-panel,
.payment-panel,
.single-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(24, 32, 44, 0.08);
}

.summary-panel {
    padding: 28px;
    position: sticky;
    top: 24px;
}

.payment-panel,
.single-panel {
    padding: 28px;
}

.single-panel {
    width: min(720px, calc(100% - 32px));
    margin: 48px auto;
}

.eyebrow {
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 10px;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0 0 20px;
    line-height: 1.15;
}

h1 {
    font-size: 32px;
}

h2 {
    font-size: 24px;
}

dl {
    margin: 24px 0 0;
}

dl div,
.status-list div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

dt {
    color: var(--muted);
}

dd {
    margin: 0;
    font-weight: 700;
    text-align: right;
}

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

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

input,
select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--ink);
    background: #ffffff;
}

input:focus {
    border-color: var(--accent);
    outline: 3px solid rgba(15, 118, 110, 0.16);
}

select:focus {
    border-color: var(--accent);
    outline: 3px solid rgba(15, 118, 110, 0.16);
}

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

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

.field-grid.three {
    grid-template-columns: 1.2fr 1fr 96px;
}

.expiry-row {
    display: grid;
    grid-template-columns: 72px minmax(92px, 1fr);
    gap: 10px;
}

.gateway-field {
    display: block;
    width: 100%;
    min-height: 44px;
}

.gateway-field.short {
    max-width: 160px;
}

.recurring-box {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    display: grid;
    gap: 14px;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
}

.checkbox-line input {
    width: 18px;
    min-height: 18px;
}

.recurring-fields {
    display: grid;
    gap: 14px;
}

button,
.button-link {
    min-height: 46px;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

button:hover,
.button-link:hover {
    background: var(--accent-dark);
}

button:disabled {
    background: #9aa4b2;
    cursor: not-allowed;
}

.button-link.secondary {
    margin-left: 10px;
    background: #394150;
}

.notice,
.status {
    display: block;
    min-height: 24px;
    padding: 12px 14px;
    border-radius: 6px;
    background: #eef2f6;
    color: var(--muted);
    font-weight: 700;
}

.status:empty {
    display: none;
}

.notice.error,
.status.error,
.result.error {
    color: var(--danger);
    background: #fff1f0;
    border-color: #ffc9c4;
}

.status.pending,
.result.warning {
    color: var(--warning);
    background: #fff7e8;
}

.result.success {
    color: var(--ok);
    background: #ecfdf3;
}

.status-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    margin-bottom: 24px;
}

.schedule-actions {
    margin-top: 24px;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.action-row button {
    min-width: 120px;
}

code {
    background: rgba(24, 32, 44, 0.08);
    border-radius: 5px;
    padding: 2px 5px;
}

@media (max-width: 860px) {
    .checkout-shell {
        grid-template-columns: 1fr;
        margin: 16px auto;
    }

    .summary-panel {
        position: static;
    }
}

@media (max-width: 640px) {
    .checkout-shell,
    .single-panel {
        width: min(100% - 20px, 720px);
    }

    .summary-panel,
    .payment-panel,
    .single-panel {
        padding: 20px;
    }

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

    .gateway-field.short {
        max-width: none;
    }

    h1 {
        font-size: 28px;
    }
}
