:root {
    --bg: #f7f5ef;
    --panel: #fffdf9;
    --line: #e7e1d4;
    --text: #171914;
    --muted: #77766d;
    --blue: #007bff;
    --blue-2: #e9f7ff;
    --amber: #9a5c18;
    --red: #b42318;
    --shadow: 0 20px 55px rgba(35, 31, 24, .08);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    letter-spacing: 0;
}

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr;
}

.topbar {
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 max(20px, 5vw);
    border-bottom: 1px solid var(--line);
    background: rgba(255, 253, 249, .88);
    backdrop-filter: blur(14px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    font-weight: 700;
    white-space: nowrap;
}

.mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background:
        radial-gradient(circle at 70% 18%, rgba(255, 255, 255, .24), transparent 28%),
        linear-gradient(145deg, #0757b8 0%, #007bff 58%, #35a5ff 100%);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .25),
        0 8px 18px rgba(0, 123, 255, .2);
    overflow: hidden;
}

.mark svg {
    width: 24px;
    height: 24px;
    display: block;
}

.top-status {
    color: var(--muted);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.main {
    width: min(1080px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 42px 0 54px;
}

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

.hero {
    padding: 26px;
}

.hero-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

h1, h2, p {
    margin: 0;
}

h1 {
    font-size: 28px;
    line-height: 1.25;
}

h2 {
    font-size: 17px;
    line-height: 1.35;
}

.subtext {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
}

.badge {
    min-width: 78px;
    height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--blue-2);
    color: var(--blue);
    border: 1px solid rgba(0, 123, 255, .18);
    font-weight: 750;
    white-space: nowrap;
}

.badge.off {
    background: #fff7ed;
    color: var(--amber);
    border-color: rgba(154, 92, 24, .2);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.stat {
    min-height: 86px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfaf7;
}

.stat span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.stat strong {
    display: block;
    margin-top: 10px;
    font-size: 20px;
    line-height: 1.35;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.section-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 18px;
}

.section-card.full {
    grid-column: 1 / -1;
}

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

.input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    padding: 0 14px;
    font: inherit;
    font-size: 16px;
    outline: none;
}

.input:focus {
    border-color: rgba(0, 123, 255, .55);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, .12);
}

.button {
    min-height: 46px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    border-radius: 8px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: inherit;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.button:hover {
    border-color: rgba(0, 123, 255, .3);
    background: var(--blue-2);
    color: var(--blue);
}

.button.primary {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.button.primary:hover {
    background: #0062cc;
    color: #fff;
}

.back-link {
    min-width: 74px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px 0 10px;
    flex: 0 0 auto;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.back-link:hover {
    border-color: rgba(0, 123, 255, .3);
    background: var(--blue-2);
    color: var(--blue);
}

.back-link svg {
    width: 15px;
    height: 15px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.button-row .button {
    flex: 1 1 180px;
}

.plans {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.plan {
    position: relative;
    display: block;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfaf7;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.plan input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.plan-body {
    min-height: 74px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.plan-title {
    display: block;
    font-weight: 720;
    line-height: 1.4;
}

.plan-note {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.price {
    font-size: 22px;
    font-weight: 800;
    color: var(--blue);
    white-space: nowrap;
}

.plan input:checked + .plan-body {
    background: var(--blue-2);
    box-shadow: inset 0 0 0 1px rgba(0, 123, 255, .28);
}

.plan:has(input:checked) {
    border-color: rgba(0, 123, 255, .45);
}

.footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

@media (max-width: 760px) {
    .topbar { padding: 0 16px; }
    .top-status { display: none; }
    .main { padding: 22px 0 34px; }
    .hero { padding: 18px; }
    .hero-head {
        display: grid;
        gap: 12px;
    }
    h1 { font-size: 24px; }
    .status-grid,
    .section-grid {
        grid-template-columns: 1fr;
    }
    .plan-body {
        min-height: 68px;
        padding: 13px 14px;
    }
    .back-link {
        justify-self: start;
        height: 34px;
        min-width: 68px;
        font-size: 13px;
    }
}
