* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body.storefront {
    min-height: 100vh;
    margin: 0;
    background: #080b10;
    color: #eef4ff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    letter-spacing: 0;
}

.sf-page {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

.sf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.sf-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #f8fbff;
    text-decoration: none;
}

.sf-brand:hover {
    color: #f8fbff;
    text-decoration: none;
}

.sf-logo {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(132, 246, 209, 0.35);
    border-radius: 8px;
    background: #121821;
    color: #38d9a9;
    font-weight: 800;
    box-shadow: 0 0 0 4px rgba(56, 217, 169, 0.08);
}

.sf-brand-title {
    display: block;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.1;
}

.sf-brand-subtitle {
    display: block;
    margin-top: 3px;
    color: #8994a8;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sf-button,
.sf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid rgba(132, 150, 177, 0.45);
    border-radius: 8px;
    background: #161b25;
    color: #f8fbff;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.sf-button:hover,
.sf-btn:hover {
    border-color: rgba(56, 217, 169, 0.75);
    background: #1c2430;
    color: #f8fbff;
    text-decoration: none;
    transform: translateY(-1px);
}

.sf-btn-primary {
    border-color: #17c991;
    background: #16c48e;
    color: #03120d;
}

.sf-btn-primary:hover {
    border-color: #38d9a9;
    background: #38d9a9;
    color: #03120d;
}

.sf-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.9fr);
    gap: 24px;
    align-items: start;
}

.sf-panel {
    border: 1px solid rgba(132, 150, 177, 0.26);
    border-radius: 8px;
    background: #151a21;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.sf-panel-main {
    padding: 34px;
}

.sf-panel-side {
    padding: 28px;
}

.sf-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    color: #a6b2c4;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sf-eyebrow::before {
    content: "";
    width: 24px;
    height: 1px;
    background: #38d9a9;
}

.sf-title {
    margin: 0 0 12px;
    color: #f8fbff;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1;
    font-weight: 850;
    letter-spacing: 0;
}

.sf-subtitle {
    max-width: 680px;
    margin: 0 0 28px;
    color: #a5afbf;
    font-size: 16px;
    line-height: 1.7;
}

.sf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.sf-product {
    display: flex;
    min-height: 260px;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    border: 1px solid rgba(132, 150, 177, 0.22);
    border-radius: 8px;
    background: #0f131b;
}

.sf-product:hover {
    border-color: rgba(56, 217, 169, 0.58);
}

.sf-tag {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(56, 217, 169, 0.12);
    color: #54e0b5;
    font-size: 12px;
    font-weight: 700;
}

.sf-product h3 {
    margin: 14px 0 8px;
    color: #f8fbff;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 800;
}

.sf-muted {
    color: #8994a8;
}

.sf-product-desc {
    min-height: 44px;
    margin: 0;
    color: #a5afbf;
    line-height: 1.55;
}

.sf-price-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin: 20px 0 16px;
}

.sf-price {
    color: #38d9a9;
    font-size: 30px;
    font-weight: 850;
    line-height: 1;
}

.sf-stock {
    color: #8994a8;
    font-size: 13px;
}

.sf-field {
    margin-bottom: 20px;
}

.sf-label {
    display: block;
    margin-bottom: 10px;
    color: #f8fbff;
    font-size: 14px;
    font-weight: 800;
}

.sf-control,
.sf-input,
.sf-textarea {
    width: 100%;
    min-height: 50px;
    padding: 13px 15px;
    border: 1px solid rgba(132, 150, 177, 0.25);
    border-radius: 8px;
    background: #0d1118;
    color: #f8fbff;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.sf-control:focus,
.sf-input:focus,
.sf-textarea:focus {
    border-color: #38d9a9;
    box-shadow: 0 0 0 4px rgba(56, 217, 169, 0.1);
}

.sf-control[readonly] {
    background: #101721;
}

.sf-help {
    display: block;
    margin-top: 8px;
    color: #8994a8;
    font-size: 13px;
    line-height: 1.5;
}

.sf-summary {
    display: grid;
    gap: 12px;
    margin: 24px 0;
}

.sf-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(132, 150, 177, 0.16);
    color: #a5afbf;
}

.sf-summary-row strong {
    color: #f8fbff;
}

.sf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.sf-actions .sf-btn,
.sf-actions .sf-button {
    flex: 1 1 180px;
}

.sf-steps {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.sf-step {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 14px;
}

.sf-step-number {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(56, 217, 169, 0.14);
    color: #38d9a9;
    font-weight: 850;
}

.sf-step strong {
    display: block;
    margin-bottom: 4px;
    color: #f8fbff;
}

.sf-step p {
    margin: 0;
    color: #8994a8;
    line-height: 1.55;
}

.sf-note {
    margin-top: 24px;
    padding: 18px;
    border: 1px solid rgba(56, 217, 169, 0.45);
    border-radius: 8px;
    background: rgba(20, 93, 72, 0.24);
    color: #c5f8e8;
    line-height: 1.65;
}

.sf-empty {
    padding: 26px;
    border: 1px solid rgba(132, 150, 177, 0.24);
    border-radius: 8px;
    background: #0f131b;
    color: #a5afbf;
}

.sf-payment-card {
    display: block;
    width: 100%;
    padding: 20px;
    border: 1px solid rgba(132, 150, 177, 0.28);
    border-radius: 8px;
    background: #0f131b;
    color: #f8fbff;
    text-align: left;
    cursor: pointer;
}

.sf-payment-card:hover {
    border-color: #38d9a9;
}

.sf-payment-card img {
    width: 42px;
    height: 42px;
    margin-right: 12px;
    vertical-align: middle;
}

.sf-qr {
    display: grid;
    place-items: center;
    width: 238px;
    height: 238px;
    margin: 24px auto;
    border: 1px solid rgba(132, 150, 177, 0.28);
    border-radius: 8px;
    background: #f8fbff;
}

.sf-qr img {
    width: 210px;
    height: 210px;
}

.sf-cardkey {
    padding: 24px;
    border: 1px solid rgba(56, 217, 169, 0.42);
    border-radius: 8px;
    background: rgba(56, 217, 169, 0.1);
    text-align: center;
}

.sf-cardkey-value {
    margin: 8px 0 18px;
    color: #f8fbff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 850;
    line-height: 1.25;
    word-break: break-all;
}

.sf-status-icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin: 0 0 22px;
    border-radius: 999px;
    background: rgba(56, 217, 169, 0.14);
    color: #38d9a9;
    font-size: 38px;
    font-weight: 850;
}

.sf-alert {
    padding: 16px;
    border-radius: 8px;
    background: rgba(255, 193, 7, 0.12);
    color: #ffe6a6;
    line-height: 1.65;
}

.sf-error {
    border: 1px solid rgba(255, 107, 107, 0.35);
    background: rgba(255, 107, 107, 0.1);
    color: #ffd0d0;
}

@media (max-width: 860px) {
    .sf-page {
        width: min(100% - 24px, 680px);
        padding-top: 20px;
    }

    .sf-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .sf-shell {
        grid-template-columns: 1fr;
    }

    .sf-panel-main,
    .sf-panel-side {
        padding: 24px;
    }

    .sf-title {
        font-size: 38px;
    }
}
