* { box-sizing: border-box; }
:root {
    --ink: #111827;
    --muted: #697386;
    --line: #e5e7eb;
    --soft: #f4f6fa;
    --card: #ffffff;
    --blue: #006aff;
    --blue-dark: #0052c8;
    --green: #0f9f6e;
    --navy: #172033;
}
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: #eef2f7;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 22px;
    background: var(--navy);
    color: white;
}
.topbar a { color: white; }
.brand { font-weight: 700; letter-spacing: .02em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 20px 64px; }
.hero { padding: 20px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.15; }
p { line-height: 1.5; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.campaign { display: grid; gap: 12px; }
.inventory-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid var(--line);
}
.muted { color: var(--muted); }
.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #eef6ff;
    color: #085ecf;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
}
.button, button, input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    background: var(--blue);
    color: white;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 106, 255, .18);
}
.button:hover, button:hover { background: var(--blue-dark); text-decoration: none; }
.button.secondary { background: #344054; box-shadow: none; }
.button.warn { background: #9d3d2f; }
.button:disabled, button:disabled { opacity: .5; cursor: not-allowed; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
label { font-weight: 700; }
input, select, textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid #d8dee8;
    border-radius: 12px;
    padding: 11px 12px;
    background: white;
    font: inherit;
}
input:focus, select:focus, textarea:focus {
    outline: 3px solid rgba(0, 106, 255, .16);
    border-color: var(--blue);
}
textarea { min-height: 96px; resize: vertical; }
.table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; }
.table th { background: #f4f6fa; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.notice { background: #fff7d7; border: 1px solid #eadc9d; padding: 12px; border-radius: 8px; }
.error { background: #fdebea; border: 1px solid #e5b7b2; padding: 12px; border-radius: 8px; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.admin-nav a { background: white; border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; }
.total-box { background: var(--navy); color: white; border-radius: 8px; padding: 18px; }

.customer-page {
    background: #ffffff;
}
.customer-page > .topbar {
    display: none;
}
.customer-page .wrap {
    max-width: none;
    padding: 22px;
}
.customer-shell {
    display: flex;
    justify-content: center;
}
.customer-app {
    width: 390px;
    min-height: 820px;
    background: #f2f6fb;
    box-shadow: 0 9px 28px rgba(22, 39, 59, .22);
    overflow: hidden;
}
.app-status {
    height: 58px;
    display: grid;
    grid-template-columns: 60px 1fr 92px;
    align-items: center;
    padding: 0 16px;
    background: #f7f7f7;
    border-bottom: 1px solid #b7c0ca;
    color: #42afd8;
}
.app-status a {
    color: #42afd8;
    font-size: 42px;
    line-height: 1;
    font-weight: 200;
}
.app-status strong {
    color: #2f91cb;
    text-align: center;
    font-size: 17px;
    letter-spacing: 0;
}
.app-status span {
    text-align: right;
    font-size: 14px;
    font-weight: 800;
}
.info-strip {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    align-items: start;
    padding: 17px 18px;
    background: #eaf1f8;
    color: #253c5b;
    border-bottom: 1px solid #d8e2ec;
}
.info-strip b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 50%;
    background: #2f6da2;
    color: #ffffff;
    font-size: 14px;
    font-family: Georgia, serif;
}
.info-strip p {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
}
.support-strip {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 18px;
    background: #28659e;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
}
.brand-strip {
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    background: #ffffff;
    border-bottom: 1px solid #d8e0e8;
    box-shadow: 0 2px 8px rgba(18, 35, 56, .12);
}
.brand-lockup {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.checkout-logo {
    display: block;
    max-width: 190px;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
}
.checkout-icon,
.brand-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #ffffff;
    background: #4cb3d8;
    font-size: 20px;
    font-weight: 900;
    flex: 0 0 auto;
}
.brand-lockup strong {
    max-width: 220px;
    overflow: hidden;
    color: #1e3659;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.app-icons {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #1e3659;
    font-size: 25px;
}
.app-icons span:first-child {
    color: #aeb8ca;
    font-size: 30px;
}
.customer-hero {
    padding: 26px 26px 18px;
    text-align: center;
}
.hero-rule {
    display: block;
    width: 28px;
    height: 4px;
    margin: 0 0 10px;
    background: #f6c04f;
}
.eyebrow {
    margin: 0 0 4px !important;
    color: #1f5e7c !important;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-align: left;
    text-transform: uppercase;
}
.customer-hero h1 {
    color: #17345a;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.15;
    text-align: left;
    text-transform: uppercase;
}
.customer-hero p {
    margin: 0;
    color: #818691;
    font-size: 16px;
    line-height: 1.45;
}
.brand-picker,
.checkout-form {
    padding: 0 18px 28px;
    display: grid;
    gap: 14px;
}
.brand-option,
.app-card,
.checkout-step {
    background: #ffffff;
    border: 1px solid #d9e1ea;
    border-radius: 3px;
    padding: 17px;
    box-shadow: 0 1px 2px rgba(26, 43, 65, .04);
}
.brand-option {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 13px;
    align-items: center;
}
.brand-option img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}
.brand-option h2 {
    color: #17345a;
    font-size: 18px;
    margin: 0 0 3px;
    text-transform: uppercase;
}
.brand-option p {
    margin: 0;
    color: #7d8290;
    font-size: 13px;
}
.brand-option .button {
    grid-column: 1 / -1;
    width: 100%;
}
.checkout-step {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}
.primary-step {
    margin-top: -4px;
}
.step-heading {
    padding: 0 6px 12px;
    text-align: center;
}
.step-heading h2 {
    color: #17345a;
    font-size: 21px;
    font-weight: 900;
    margin-bottom: 4px;
    text-transform: uppercase;
}
.step-heading p {
    margin: 0 auto;
    max-width: 320px;
    color: #808793;
    font-size: 14px;
    line-height: 1.35;
}
.campaign-list {
    display: grid;
    gap: 13px;
}
.campaign-card {
    background: #ffffff;
    border: 1px solid #d8e0e8;
    border-radius: 3px;
    overflow: hidden;
}
.campaign-head {
    padding: 16px 17px 13px;
    border-bottom: 1px solid #e3e9f0;
}
.pill {
    background: transparent;
    color: #4aaed7;
    padding: 0;
    font-size: 11px;
    letter-spacing: .12em;
}
.campaign-head h3 {
    margin: 8px 0 4px;
    color: #343a43;
    font-size: 20px;
    font-weight: 900;
}
.campaign-head p {
    margin: 0;
    color: #7e8490;
    font-size: 13px;
}
.spot-option {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 15px 16px;
    border-bottom: 1px solid #e3e9f0;
    background: #ffffff;
    cursor: pointer;
}
.spot-option:last-child {
    border-bottom: 0;
}
.spot-option input {
    appearance: none;
    width: 23px;
    height: 23px;
    min-height: 23px;
    border: 1px solid #aeb8c7;
    border-radius: 50%;
    padding: 0;
}
.spot-option input:checked {
    border: 7px solid #4bb1d9;
}
.spot-option input:disabled {
    background: #eef1f5;
}
.spot-copy {
    display: grid;
    gap: 2px;
}
.spot-copy strong {
    color: #2d3340;
    font-size: 16px;
}
.spot-copy small {
    color: #7b8390;
    font-weight: 700;
}
.spot-price {
    color: #2d3340;
    font-size: 16px;
    font-weight: 900;
}
.field-grid {
    display: grid;
    gap: 10px;
}
.checkout-form .field {
    margin-bottom: 10px;
}
.checkout-form label {
    color: #343a43;
    font-size: 13px;
    font-weight: 900;
}
.checkout-form input,
.checkout-form select,
.checkout-form textarea {
    min-height: 46px;
    border-radius: 2px;
    border-color: #cfd8e3;
    background: #ffffff;
}
.checkout-bar {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: grid;
    gap: 10px;
    padding: 13px 0 0;
    background: linear-gradient(180deg, rgba(242,246,251,0), #f2f6fb 24%);
}
.checkout-bar strong,
.checkout-bar span {
    display: block;
    text-align: center;
}
.checkout-bar strong {
    color: #17345a;
    font-size: 15px;
}
.checkout-bar span {
    color: #858b95;
    font-size: 12px;
}
.checkout-bar button,
.brand-option .button {
    width: 100%;
    min-height: 58px;
    border-radius: 0;
    background: #4eb0d5;
    box-shadow: none;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .02em;
}
.checkout-bar button:hover,
.brand-option .button:hover {
    background: #369bc3;
}
.customer-page .button,
.customer-page button {
    border-radius: 0;
}
.brand-logo-preview,
.brand-table-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-logo-preview img,
.brand-table-cell img {
    width: 72px;
    height: 48px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
@media (max-width: 640px) {
    .inventory-row { grid-template-columns: 1fr; }
    .topbar { padding: 14px 16px; }
    .customer-page .wrap { padding: 0; }
    .customer-app {
        width: 100%;
        min-height: 100vh;
        box-shadow: none;
    }
    .customer-hero h1 { font-size: 29px; }
    .field-grid { grid-template-columns: 1fr; }
    .brand-lockup strong { max-width: 190px; font-size: 21px; }
    .checkout-logo { max-width: 170px; }
}

/* Responsive customer checkout, replacing the earlier phone-frame treatment. */
.customer-page {
    background: #f3f7fb;
}
.customer-page .wrap {
    max-width: none;
    padding: 0;
}
.customer-page > .topbar {
    display: none;
}
.customer-shell {
    display: block;
    min-height: 100vh;
}
.customer-app {
    width: 100%;
    min-height: 100vh;
    overflow: visible;
    background: #f3f7fb;
    box-shadow: none;
}
.brand-strip {
    min-height: 132px;
    height: auto;
    justify-content: center;
    padding: 30px 22px 18px;
    border-bottom: 1px solid #d7e1eb;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(23, 39, 59, .06);
}
.brand-lockup {
    justify-content: center;
    text-decoration: none;
}
.brand-lockup:hover {
    text-decoration: none;
}
.brand-lockup strong {
    max-width: none;
    color: #1b355b;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.checkout-logo {
    max-width: min(360px, 86vw);
    max-height: 94px;
}
.customer-hero {
    max-width: 760px;
    margin: 0 auto;
    padding: 36px 24px 22px;
    text-align: center;
}
.customer-hero h1 {
    max-width: 680px;
    color: #17345a;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.08;
    text-align: center;
}
.customer-hero p {
    max-width: 600px;
    margin: 0 auto;
    color: #717987;
    font-size: 19px;
}
.brand-picker,
.checkout-form {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 28px 56px;
}
.brand-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}
.brand-option {
    grid-template-columns: auto 1fr;
    align-content: start;
    min-height: 230px;
    border-radius: 4px;
    padding: 24px;
}
.brand-option .button {
    align-self: end;
    grid-column: 1 / -1;
    margin-top: 22px;
}
.details-step,
.campaign-card,
.app-card {
    background: #ffffff;
    border: 1px solid #d8e0e8;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(23, 39, 59, .05);
}
.checkout-step {
    margin-bottom: 24px;
}
.details-step {
    padding: 24px;
}
.step-heading {
    padding: 0;
    margin-bottom: 16px;
    text-align: center;
}
.step-heading h2 {
    color: #17345a;
    font-size: 28px;
    text-align: center;
}
.step-heading p {
    margin: 0 auto;
    max-width: 650px;
    text-align: center;
}
.campaign-list {
    gap: 16px;
}
.campaign-card {
    overflow: hidden;
}
.campaign-head {
    padding: 22px 24px 18px;
}
.campaign-head h3 {
    font-size: 24px;
}
.spot-option {
    grid-template-columns: 36px 1fr auto;
    padding: 18px 24px;
}
.field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.checkout-form input,
.checkout-form select,
.checkout-form textarea {
    border-radius: 4px;
}
.checkout-bar {
    position: static;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 8px;
    padding: 20px 24px;
    border: 1px solid #d8e0e8;
    border-radius: 4px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(23, 39, 59, .05);
}
.checkout-bar strong,
.checkout-bar span {
    text-align: left;
}
.checkout-bar small {
    display: block;
    margin-top: 2px;
    color: var(--brand-accent, #4eb0d5);
    font-size: 12px;
    font-weight: 800;
}
.checkout-bar button,
.brand-option .button {
    width: auto;
    min-width: 210px;
    border-radius: 0;
    background: #4eb0d5;
    box-shadow: none;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .brand-strip {
        padding: 0 22px;
    }
    .customer-hero {
        padding: 34px 22px 20px;
    }
    .brand-picker,
    .checkout-form {
        padding: 0 22px 44px;
    }
}

/* Final checkout spacing and logo sizing fixes. */
.checkout-logo {
    width: var(--brand-logo-width, 320px);
    max-width: min(var(--brand-logo-width, 320px), 86vw);
    max-height: none;
    height: auto;
}
.checkout-form {
    padding-top: 38px;
}
.primary-step {
    margin-top: 0;
}
@media (max-width: 640px) {
    .checkout-logo {
        max-width: min(var(--brand-logo-width, 320px), 86vw);
        max-height: none;
    }
    .checkout-form {
        padding-top: 28px;
    }
}

/* Brand-customized checkout controls. */
.customer-page,
.customer-app {
    background: var(--brand-bg, #f3f7fb);
}
.brand-lockup strong,
.customer-hero h1,
.step-heading h2 {
    color: var(--brand-primary, #17345a);
}
.checkout-logo {
    width: var(--brand-logo-width, 320px);
    max-width: min(var(--brand-logo-width, 320px), 86vw);
    height: auto;
}
.checkout-bar button,
.brand-option .button {
    background: var(--brand-accent, #4eb0d5);
}
.checkout-bar button:hover,
.brand-option .button:hover {
    background: var(--brand-primary, #17345a);
}
.campaign-graphic {
    display: block;
    width: calc(100% - 48px);
    max-height: 520px;
    object-fit: contain;
    margin: 0 auto 18px;
    border: 1px solid #d8e0e8;
    background: #ffffff;
}
.spot-select-field {
    padding: 0 24px 24px;
}
.spot-select {
    margin-top: 8px;
    font-weight: 800;
}
.spot-select-field label {
    display: block;
}
.admin-thumb {
    width: 110px;
    max-height: 80px;
    object-fit: contain;
    margin-top: 8px;
    border: 1px solid var(--line);
    background: white;
}
.campaign-graphic-preview {
    display: grid;
    gap: 8px;
    max-width: 420px;
}
.campaign-graphic-preview img {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    border: 1px solid var(--line);
    background: white;
}
@media (max-width: 640px) {
    .campaign-graphic {
        width: calc(100% - 36px);
        max-height: 420px;
    }
    .spot-select-field {
        padding-left: 18px;
        padding-right: 18px;
    }
}

@media (max-width: 640px) {
    .brand-strip {
        min-height: 112px;
        padding: 24px 16px 16px;
    }
    .checkout-logo {
        max-width: 270px;
        max-height: 76px;
    }
    .brand-lockup strong {
        max-width: 290px;
        font-size: 25px;
        text-align: center;
    }
    .customer-hero {
        padding: 28px 18px 18px;
    }
    .customer-hero h1 {
        font-size: 36px;
    }
    .customer-hero p {
        font-size: 16px;
    }
    .brand-picker,
    .checkout-form {
        padding: 0 14px 34px;
    }
    .field-grid {
        grid-template-columns: 1fr;
    }
    .details-step {
        padding: 18px;
    }
    .campaign-head,
    .spot-option {
        padding-left: 18px;
        padding-right: 18px;
    }
    .checkout-bar {
        position: sticky;
        bottom: 0;
        z-index: 5;
        display: grid;
        padding: 14px;
        margin-left: -14px;
        margin-right: -14px;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
    }
    .checkout-bar button,
    .brand-option .button {
        width: 100%;
    }
}
