.custom-payment-hero {
    position: relative;
    overflow: hidden;
}

.custom-payment-hero::after {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    right: -120px;
    top: -180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(142, 92, 255, .26), transparent 68%);
    pointer-events: none;
}

.custom-payment-layout,
.custom-admin-dashboard {
    width: min(1260px, calc(100% - 36px));
    margin: 30px auto 80px;
}

.custom-payment-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, .75fr);
    gap: 24px;
    align-items: start;
}

.custom-payment-main,
.custom-payment-side,
.custom-admin-form-card,
.custom-admin-list-card {
    padding: clamp(24px, 4vw, 38px);
}

.custom-payment-lock {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin-bottom: 22px;
    border-radius: 22px;
    font-size: 30px;
    background: linear-gradient(145deg, rgba(135, 94, 255, .22), rgba(34, 232, 255, .1));
    border: 1px solid rgba(154, 127, 255, .35);
    box-shadow: 0 18px 45px rgba(50, 31, 108, .3);
}

.custom-payment-main > h2,
.custom-payment-side h2,
.custom-admin-form-card h2,
.custom-admin-list-card h2 {
    margin: 8px 0 12px;
}

.custom-payment-main > p,
.custom-payment-side > p {
    color: var(--muted, #aeb8d4);
    line-height: 1.7;
}

.custom-code-entry-form {
    margin-top: 30px;
}

.custom-code-entry-form label,
.custom-payment-form label {
    display: grid;
    gap: 9px;
    color: #dfe5ff;
    font-size: 13px;
    font-weight: 700;
}

.custom-code-entry-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.custom-code-entry-row input,
.custom-payment-form input,
.custom-payment-form textarea,
.custom-payment-form select {
    width: 100%;
    border: 1px solid rgba(139, 151, 190, .24);
    border-radius: 13px;
    background: rgba(7, 11, 24, .82);
    color: #fff;
    padding: 14px 15px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.custom-code-entry-row input {
    min-height: 56px;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 800;
    font-size: 17px;
}

.custom-code-entry-row input:focus,
.custom-payment-form input:focus,
.custom-payment-form textarea:focus,
.custom-payment-form select:focus {
    border-color: rgba(157, 92, 255, .8);
    box-shadow: 0 0 0 4px rgba(157, 92, 255, .12);
}

.custom-quote-header,
.custom-admin-quote-top,
.custom-list-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.custom-quote-header h2,
.custom-admin-quote h3 {
    margin: 6px 0;
}

.custom-quote-header p,
.custom-admin-quote p {
    margin: 0;
    color: #9aa6c9;
}

.custom-quote-amount {
    margin: 26px 0;
    padding: 25px;
    border-radius: 18px;
    border: 1px solid rgba(139, 101, 255, .35);
    background: linear-gradient(135deg, rgba(98, 62, 192, .22), rgba(13, 20, 39, .82));
}

.custom-quote-amount small,
.custom-quote-details small,
.custom-admin-stats span {
    display: block;
    color: #8d98bb;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-size: 11px;
}

.custom-quote-amount strong {
    display: block;
    margin: 7px 0 5px;
    font-size: clamp(34px, 6vw, 54px);
    line-height: 1;
    letter-spacing: -2px;
}

.custom-quote-amount span {
    color: #9ca7c7;
    font-size: 12px;
}

.custom-quote-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.custom-quote-details > div {
    padding: 15px;
    border-radius: 14px;
    border: 1px solid rgba(141, 153, 190, .18);
    background: rgba(7, 11, 23, .55);
}

.custom-quote-details strong {
    display: block;
    margin-top: 5px;
    overflow-wrap: anywhere;
}

.custom-scope-card {
    margin: 18px 0 22px;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(132, 146, 187, .19);
    background: rgba(10, 14, 29, .6);
}

.custom-scope-card p {
    margin: 10px 0 0;
    color: #c7cee5;
    line-height: 1.75;
}

.custom-secure-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}

.custom-secure-strip span {
    padding: 8px 11px;
    border: 1px solid rgba(94, 214, 183, .25);
    border-radius: 999px;
    background: rgba(49, 153, 126, .1);
    color: #9fe3cf;
    font-size: 12px;
    font-weight: 700;
}

.custom-payment-alert {
    margin: 18px 0;
    padding: 17px 18px;
    border-radius: 14px;
    border: 1px solid rgba(149, 160, 195, .22);
    background: rgba(14, 19, 36, .82);
}

.custom-payment-alert strong {
    display: block;
    margin-bottom: 5px;
}

.custom-payment-alert p {
    margin: 0 0 12px;
    color: #b3bdd8;
    line-height: 1.6;
}

.custom-payment-alert p:last-child {
    margin-bottom: 0;
}

.custom-payment-alert.success { border-color: rgba(61, 221, 164, .35); background: rgba(32, 139, 102, .12); }
.custom-payment-alert.warning { border-color: rgba(255, 192, 79, .35); background: rgba(158, 108, 24, .12); }
.custom-payment-alert.danger { border-color: rgba(255, 100, 132, .35); background: rgba(151, 39, 67, .12); }

.custom-clear-quote-form {
    margin-top: 18px;
    text-align: center;
}

.custom-payment-side {
    position: sticky;
    top: 110px;
}

.custom-payment-steps {
    display: grid;
    gap: 20px;
    margin: 25px 0;
}

.custom-payment-steps > div {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.custom-payment-steps > div > span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: rgba(127, 88, 255, .14);
    border: 1px solid rgba(148, 113, 255, .25);
    color: #b9a9ff;
    font-size: 12px;
    font-weight: 900;
}

.custom-payment-steps strong { display: block; margin-bottom: 4px; }
.custom-payment-steps p { margin: 0; color: #929dbc; line-height: 1.55; font-size: 13px; }

.custom-help-card {
    margin-top: 22px;
    padding: 18px;
    border-radius: 15px;
    background: rgba(7, 11, 23, .58);
    border: 1px solid rgba(132, 145, 182, .18);
}

.custom-help-card p { color: #98a3c2; line-height: 1.6; }

.custom-admin-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 20px;
}

.custom-admin-stats .panel {
    padding: 20px;
}

.custom-admin-stats strong {
    display: block;
    margin-top: 6px;
    font-size: 25px;
}

.custom-admin-grid {
    display: grid;
    grid-template-columns: minmax(330px, .8fr) minmax(0, 1.35fr);
    gap: 20px;
    align-items: start;
}

.custom-admin-form-card {
    position: sticky;
    top: 105px;
}

.custom-payment-form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.custom-payment-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.custom-payment-form textarea {
    resize: vertical;
    min-height: 145px;
}

.custom-amount-input {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    border: 1px solid rgba(139, 151, 190, .24);
    border-radius: 13px;
    background: rgba(7, 11, 24, .82);
    overflow: hidden;
}

.custom-amount-input span {
    display: grid;
    place-items: center;
    height: 100%;
    color: #b6a8ff;
    font-size: 20px;
    font-weight: 900;
    border-right: 1px solid rgba(139, 151, 190, .18);
}

.custom-amount-input input {
    border: 0;
    border-radius: 0;
}

.custom-checkbox,
.mini-email-check {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 9px !important;
}

.custom-checkbox input,
.mini-email-check input {
    width: auto;
}

.custom-code-reveal {
    padding: 28px;
    text-align: center;
    border-color: rgba(105, 226, 196, .4);
    background: linear-gradient(135deg, rgba(26, 118, 97, .18), rgba(75, 54, 145, .18));
}

.custom-code-value {
    margin: 20px auto;
    padding: 18px;
    border-radius: 14px;
    background: rgba(5, 9, 19, .85);
    border: 1px dashed rgba(134, 228, 206, .45);
    font-size: clamp(20px, 4vw, 31px);
    letter-spacing: 4px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.custom-code-reveal p { color: #a8b2d0; }

.custom-quote-list {
    display: grid;
    gap: 13px;
    margin-top: 24px;
}

.custom-admin-quote {
    padding: 20px;
    border: 1px solid rgba(137, 149, 186, .18);
    border-radius: 16px;
    background: rgba(7, 11, 23, .52);
}

.custom-admin-quote-top > strong {
    font-size: 22px;
    white-space: nowrap;
}

.custom-admin-quote-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    margin: 14px 0;
    color: #8f9aba;
    font-size: 12px;
}

.custom-admin-quote p {
    line-height: 1.65;
}

.custom-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.custom-admin-actions form {
    display: flex;
    align-items: center;
    gap: 7px;
}

.tiny-btn.danger {
    border-color: rgba(255, 99, 132, .35);
    color: #ff9bb0;
}

.status-chip.processing {
    background: rgba(97, 168, 255, .12);
    color: #9ec9ff;
    border-color: rgba(97, 168, 255, .27);
}

@media (max-width: 1050px) {
    .custom-payment-layout,
    .custom-admin-grid {
        grid-template-columns: 1fr;
    }
    .custom-payment-side,
    .custom-admin-form-card {
        position: static;
    }
    .custom-admin-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .custom-payment-layout,
    .custom-admin-dashboard {
        width: min(100% - 22px, 1260px);
    }
    .custom-code-entry-row,
    .custom-payment-form-row,
    .custom-quote-details {
        grid-template-columns: 1fr;
    }
    .custom-quote-header,
    .custom-list-head,
    .custom-admin-quote-top {
        flex-direction: column;
    }
    .custom-admin-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .custom-admin-stats .panel:last-child {
        grid-column: 1 / -1;
    }
    .custom-code-entry-row .primary-btn {
        width: 100%;
    }
}

/* Stripe custom delivery additions */
.custom-payment-alert.processing {
    border-color: rgba(97, 168, 255, .35);
    background: rgba(48, 101, 170, .13);
}

.custom-stripe-note {
    margin: 12px 0 0;
    color: #8f9aba;
    font-size: 12px;
    line-height: 1.65;
    text-align: center;
}

.custom-delivery-admin-box {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(118, 103, 255, .24);
    border-radius: 18px;
    background: rgba(8, 13, 31, .68);
}

.custom-delivery-admin-head,
.custom-delivery-upload-actions,
.custom-admin-delivery-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.custom-delivery-admin-head > div,
.custom-admin-delivery-item > div {
    min-width: 0;
}

.custom-delivery-admin-head strong,
.custom-delivery-admin-head small,
.custom-admin-delivery-item strong,
.custom-admin-delivery-item span {
    display: block;
}

.custom-delivery-admin-head small,
.custom-admin-delivery-item span,
.custom-delivery-upload-form > small {
    color: #8f9aba;
    line-height: 1.55;
}

.custom-admin-delivery-list {
    display: grid;
    gap: 9px;
    margin: 15px 0;
}

.custom-admin-delivery-item {
    padding: 12px 13px;
    border: 1px solid rgba(132, 149, 197, .18);
    border-radius: 13px;
    background: rgba(255, 255, 255, .025);
}

.custom-admin-delivery-item span {
    margin-top: 4px;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.custom-delivery-upload-form {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(132, 149, 197, .14);
}

.custom-delivery-upload-form label {
    display: grid;
    gap: 7px;
    color: #aab4d0;
    font-weight: 800;
    font-size: 13px;
}

.custom-delivery-upload-form input,
.custom-delivery-upload-form textarea {
    width: 100%;
}

.custom-delivery-upload-form input[type="file"] {
    padding: 10px;
    border: 1px dashed rgba(141, 124, 255, .32);
    border-radius: 12px;
    background: rgba(255,255,255,.025);
}

@media (max-width: 720px) {
    .custom-delivery-admin-head,
    .custom-delivery-upload-actions,
    .custom-admin-delivery-item {
        align-items: stretch;
        flex-direction: column;
    }

    .custom-admin-delivery-item form,
    .custom-admin-delivery-item .tiny-btn,
    .custom-delivery-upload-actions .primary-btn {
        width: 100%;
    }
}
