* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: #344452;
    font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #f2f2f2;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.public-page {
    min-width: 320px;
}

.price-shell {
    width: min(1320px, calc(100% - 32px));
    margin: 16px auto 48px;
}

.price-title {
    display: inline-block;
    max-width: 100%;
    padding: 14px 22px;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
    background: #08a6ee;
}

.price-card {
    min-width: 0;
    border: 1px solid #e1e7ed;
    background: #fff;
}

.public-layout {
    display: grid;
    gap: 16px;
    align-items: start;
    grid-template-columns: 190px minmax(0, 1fr);
}

.price-sections {
    display: grid;
    min-width: 0;
    gap: 14px;
}

.price-section {
    scroll-margin-top: 16px;
}

.price-section-summary {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    color: #172838;
    border: 1px solid #dfe6ed;
    background: #fff;
    cursor: pointer;
    list-style: none;
}

.price-section-summary::-webkit-details-marker {
    display: none;
}

.summary-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.summary-nav-title {
    color: #08a6ee;
    font-size: 14px;
    font-weight: 700;
}

.summary-page-title {
    overflow: hidden;
    color: #182b3a;
    font-size: 18px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-toggle {
    flex: 0 0 auto;
    min-width: 42px;
    color: #5d6d7b;
    font-size: 13px;
    text-align: right;
}

.price-section[open] .summary-toggle {
    font-size: 0;
}

.price-section[open] .summary-toggle::after {
    content: "收起";
    font-size: 13px;
}

.bandwidth-filter {
    display: flex;
    flex: 1 1 auto;
    gap: 8px;
    align-items: center;
    justify-content: center;
    min-width: 260px;
    padding: 0 18px;
}

.bandwidth-filter-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 13px;
    color: #3f5364;
    font-size: 13px;
    line-height: 1;
    border: 1px solid #d7e2eb;
    background: #fff;
    cursor: pointer;
    user-select: none;
}

.bandwidth-filter-option:hover,
.bandwidth-filter-option:focus {
    color: #0879ad;
    border-color: #91d3f1;
    outline: none;
    background: #f2fbff;
}

.bandwidth-filter-option.is-active {
    color: #fff;
    border-color: #08a6ee;
    background: #08a6ee;
}

.price-description {
    padding: 20px 16px;
    color: #53616d;
    font-size: 15px;
    line-height: 2.3;
    background: #fff;
}

.table-area {
    padding: 24px 30px 32px;
    background: #fff;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

.price-table,
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.price-table {
    min-width: 1080px;
}

.price-table th,
.price-table td {
    padding: 14px 20px;
    font-size: 14px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid #e2e2e2;
}

.price-table th {
    color: #101820;
    font-weight: 700;
    background: #f4f7f9;
    border-top: 1px solid #e0e3e6;
}

.empty-row {
    color: #7b8791;
    text-align: center !important;
}

.filter-empty-row {
    display: none;
}

.page-nav {
    position: sticky;
    top: 16px;
    padding: 14px;
    border: 1px solid #e2e8ee;
    background: #fff;
}

.page-nav-title {
    margin-bottom: 10px;
    color: #172838;
    font-size: 15px;
    font-weight: 700;
}

.page-nav-link {
    display: block;
    margin-bottom: 8px;
    padding: 10px 11px;
    color: #435463;
    font-size: 14px;
    line-height: 1.35;
    border-left: 3px solid transparent;
    background: #fff;
}

.page-nav-link:hover {
    color: #0a78ad;
    border-left-color: #9bd8f5;
    background: #f2fbff;
}

.page-nav-link.is-active {
    color: #0677ab;
    border-left-color: #08a6ee;
    background: #f2fbff;
}

.page-nav-empty {
    color: #7b8791;
    font-size: 13px;
}

.notice {
    margin: 0 0 18px;
    padding: 13px 16px;
    color: #36526b;
    border: 1px solid #bdd7ec;
    border-radius: 6px;
    background: #eef7ff;
}

.notice-success {
    color: #1d6541;
    border-color: #bce0cd;
    background: #eefaf3;
}

.notice-error {
    color: #8a2e2b;
    border-color: #edc0bd;
    background: #fff1f0;
}

.admin-login-page,
.setup-page,
.admin-page {
    min-height: 100vh;
    background: #eef2f5;
}

.login-panel,
.setup-panel {
    width: min(440px, calc(100% - 32px));
    margin: 8vh auto;
    padding: 32px;
    border-radius: 8px;
    border: 1px solid #dfe6ed;
    background: #fff;
}

.setup-panel {
    width: min(760px, calc(100% - 32px));
}

.login-brand {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 24px;
}

.brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    border-radius: 8px;
    background: #08a6ee;
}

.login-brand h1,
.admin-topbar h1,
.panel h2 {
    margin: 0;
    color: #162432;
    font-weight: 700;
}

.login-brand h1 {
    font-size: 24px;
}

.login-brand p,
.admin-topbar p,
.panel-heading p {
    margin: 6px 0 0;
    color: #6d7884;
    font-size: 14px;
}

.form-grid,
.product-form {
    display: grid;
    gap: 18px;
}

label {
    display: grid;
    gap: 8px;
    color: #25384a;
    font-size: 14px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    color: #223242;
    border: 1px solid #cfd8e1;
    border-radius: 6px;
    outline: none;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #08a6ee;
    box-shadow: 0 0 0 3px rgba(8, 166, 238, 0.14);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 16px;
    color: #223242;
    border: 1px solid #ccd6df;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
    border-color: #aab9c7;
    background: #f7fafc;
}

.btn-primary {
    color: #fff;
    border-color: #08a6ee;
    background: #08a6ee;
}

.btn-primary:hover {
    color: #fff;
    border-color: #008fd0;
    background: #008fd0;
}

.btn-light {
    color: #146088;
    border-color: #c8e7f7;
    background: #f2fbff;
}

.btn-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    background: transparent;
}

.btn-danger {
    color: #9e2a2b;
    border-color: #f0c2c2;
    background: #fff5f5;
}

.btn-small {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

.muted-link {
    display: inline-flex;
    margin-top: 18px;
    color: #6c7b88;
    font-size: 14px;
}

.admin-topbar {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    padding: 24px max(24px, calc((100% - 1180px) / 2));
    color: #fff;
    background: #0f749e;
}

.admin-topbar h1,
.admin-topbar p {
    color: #fff;
}

.admin-actions,
.row-actions,
.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.inline-filter {
    margin: 0;
}

.inline-filter select {
    min-width: 160px;
}

.admin-actions form,
.row-actions form {
    margin: 0;
}

.admin-main {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 48px;
}

.admin-main-narrow {
    width: min(820px, calc(100% - 32px));
}

.panel {
    margin-bottom: 22px;
    padding: 24px;
    border: 1px solid #dfe6ed;
    border-radius: 4px;
    background: #fff;
}

.panel-heading {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 18px;
}

.admin-table {
    min-width: 980px;
}

.admin-table th,
.admin-table td {
    padding: 12px 14px;
    font-size: 13px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #e5ebf0;
}

.admin-table th {
    color: #203344;
    font-weight: 700;
    background: #f7fafc;
}

.strong-cell {
    color: #1f2d3a;
    font-weight: 700;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    color: #677989;
    font-size: 12px;
    border-radius: 999px;
    background: #eef2f5;
}

.badge-success {
    color: #17683f;
    background: #e8f8ef;
}

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

.form-section-title {
    color: #162432;
    font-size: 16px;
    font-weight: 700;
}

.bandwidth-editor {
    display: grid;
    gap: 14px;
    padding-top: 4px;
}

.bandwidth-editor-heading {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid #e5ebf0;
}

.bandwidth-editor-heading p {
    margin: 6px 0 0;
    color: #6d7884;
    font-size: 13px;
}

.bandwidth-rows {
    display: grid;
    gap: 10px;
}

.bandwidth-row {
    display: grid;
    gap: 10px;
    align-items: end;
    grid-template-columns: minmax(110px, 1fr) minmax(90px, 0.8fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr) 82px auto;
    padding: 14px;
    border: 1px solid #dfe6ed;
    background: #fbfdff;
}

.price-summary-list {
    display: grid;
    gap: 4px;
    min-width: 260px;
    color: #40515f;
    line-height: 1.55;
}

.checkbox-row {
    align-content: end;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
}

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

.setup-note {
    padding: 12px 14px;
    color: #5d6b77;
    font-size: 13px;
    line-height: 1.8;
    border: 1px solid #d8e5ee;
    border-radius: 6px;
    background: #f8fbfd;
}

.setup-complete-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 760px) {
    .price-shell {
        width: calc(100% - 18px);
        margin-top: 9px;
    }

    .price-title {
        padding: 12px 14px;
        font-size: 18px;
    }

    .price-description {
        padding: 16px 14px;
        font-size: 14px;
        line-height: 2;
    }

    .table-area {
        padding: 14px;
    }

    .public-layout {
        grid-template-columns: 1fr;
    }

    .page-nav {
        position: static;
        order: 0;
    }

    .summary-page-title {
        white-space: normal;
    }

    .price-section-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .bandwidth-filter {
        justify-content: flex-start;
        flex-wrap: wrap;
        min-width: 0;
        width: 100%;
        padding: 0;
    }

    .admin-topbar,
    .panel-heading,
    .form-two,
    .bandwidth-row {
        grid-template-columns: 1fr;
    }

    .admin-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .bandwidth-editor-heading {
        flex-direction: column;
    }

    .login-panel,
    .setup-panel,
    .panel {
        padding: 20px;
    }
}
