:root {
    --rg-primary: #3159ad;
    --rg-primary-strong: #23458e;
    --rg-primary-soft: #edf3ff;
    --rg-ink: #172642;
    --rg-muted: #6f7f96;
    --rg-line: #e3e9f2;
    --rg-bg: #f4f7fb;
    --rg-card: #ffffff;
    --rg-danger: #d94a4a;
    --rg-success: #1c9b69;
    --rg-shadow: 0 14px 38px rgba(30, 55, 101, .09);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--rg-bg);
    color: var(--rg-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

button, input, select {
    font: inherit;
}

button, a {
    -webkit-tap-highlight-color: transparent;
}

.account-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    min-height: 72px;
    padding: 0 28px;
    border-bottom: 1px solid rgba(223, 231, 243, .9);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 5px 24px rgba(36, 64, 110, .05);
    backdrop-filter: blur(12px);
}

.account-brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    color: var(--rg-primary);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.02em;
    text-decoration: none;
}

.account-brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.account-top-nav {
    display: flex;
    flex: 1 1 auto;
    align-self: stretch;
    gap: 2px;
    min-width: 0;
    margin-left: 30px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.account-top-nav::-webkit-scrollbar {
    display: none;
}

.account-top-nav a {
    display: inline-flex;
    position: relative;
    flex: 0 0 auto;
    align-items: center;
    min-height: 72px;
    padding: 0 12px;
    color: #34435a;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.account-top-nav a:hover {
    color: var(--rg-primary);
    background: #f6f8fc;
}

.account-top-nav .rg-nav-new {
    padding: 2px 5px;
    border-radius: 4px;
    color: #fff;
    background: var(--rg-primary);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .04em;
}

.account-top-nav a:hover::after {
    position: absolute;
    right: 12px;
    bottom: 0;
    left: 12px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--rg-primary);
    content: '';
}

.account-header-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 12px;
    margin-left: 16px;
}

.account-header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    white-space: nowrap;
}

.account-header-user img {
    width: 34px;
    height: 34px;
    border: 1px solid var(--rg-line);
    border-radius: 50%;
    object-fit: cover;
}

#accountLogout {
    padding: 7px 12px;
    border: 0;
    background: transparent;
    color: var(--rg-muted);
    cursor: pointer;
}

#accountLogout:hover {
    color: var(--rg-danger);
}

.account-language-switcher.rg-language-switcher {
    position: static;
    top: auto;
    right: auto;
    z-index: auto;
    flex: 0 0 auto;
    box-shadow: none;
    backdrop-filter: none;
}

.account-shell {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 26px;
    width: min(1440px, calc(100% - 48px));
    margin: 30px auto 70px;
}

.account-sidebar {
    position: sticky;
    top: 96px;
    align-self: start;
    overflow: hidden;
    border: 1px solid var(--rg-line);
    border-radius: 16px;
    background: var(--rg-card);
    box-shadow: var(--rg-shadow);
}

.account-user-card {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 26px 22px 22px;
    border-bottom: 1px solid var(--rg-line);
    background: linear-gradient(145deg, #fff, #f3f7ff);
}

.account-user-card > img {
    width: 56px;
    height: 56px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 5px 16px rgba(49, 89, 173, .16);
    object-fit: cover;
}

.account-user-card strong {
    display: block;
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#copyCustomerId {
    display: flex;
    gap: 6px;
    align-items: center;
    max-width: 100%;
    margin-top: 7px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--rg-muted);
    cursor: pointer;
}

#copyCustomerId small {
    color: var(--rg-primary);
}

.vip-badge {
    grid-column: 1 / -1;
    justify-self: start;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f0f3f8;
    color: var(--rg-muted);
    font-size: 12px;
    font-weight: 700;
}

.vip-badge.active {
    background: linear-gradient(135deg, #283a66, #111a30);
    color: #f8d482;
}

.account-nav {
    padding: 12px;
}

.account-nav a {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 48px;
    margin: 4px 0;
    padding: 0 14px;
    border-radius: 10px;
    color: #42516a;
    text-decoration: none;
    transition: .18s ease;
}

.account-nav a:hover {
    background: #f6f8fc;
    color: var(--rg-primary);
}

.account-nav a.active {
    background: var(--rg-primary-soft);
    color: var(--rg-primary);
}

.account-nav a span {
    width: 22px;
    font-size: 21px;
    text-align: center;
}

.account-nav a b {
    font-size: 15px;
    font-weight: 650;
}

.nav-badge {
    min-width: 20px;
    margin-left: auto;
    padding: 2px 6px;
    border-radius: 999px;
    background: #ef5b60;
    color: #fff;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    text-align: center;
}

.account-content {
    position: relative;
    min-width: 0;
}

.account-section {
    display: none;
}

.account-section.active {
    display: block;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    min-height: 78px;
    margin-bottom: 18px;
}

.section-heading p,
.dialog-kicker {
    margin: 0 0 5px;
    color: var(--rg-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .15em;
}

.section-heading h1 {
    margin: 0;
    font-size: 28px;
}

.account-card,
.data-list {
    border: 1px solid var(--rg-line);
    border-radius: 14px;
    background: var(--rg-card);
    box-shadow: var(--rg-shadow);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.overview-stat {
    min-height: 112px;
    padding: 22px;
    border: 1px solid var(--rg-line);
    border-radius: 13px;
    background: linear-gradient(145deg, #fff, #f7f9fd);
}

.overview-stat strong {
    display: block;
    margin-top: 10px;
    color: var(--rg-primary);
    font-size: 27px;
}

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

.profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
    gap: 18px;
}

.account-card {
    padding: 26px;
}

.card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 22px;
}

.card-heading h2 {
    margin: 0 0 6px;
    font-size: 19px;
}

.card-heading p,
.security-row p {
    margin: 0;
    color: var(--rg-muted);
    font-size: 13px;
}

.account-form {
    display: grid;
    gap: 17px;
}

.account-form label {
    display: grid;
    gap: 7px;
    color: #3b4c64;
    font-size: 13px;
    font-weight: 650;
}

.account-form label small {
    color: var(--rg-muted);
    font-weight: 400;
}

.account-form input {
    width: 100%;
    height: 43px;
    padding: 0 13px;
    border: 1px solid #d7dfeb;
    border-radius: 8px;
    outline: 0;
    color: var(--rg-ink);
}

.account-form select {
    width: 100%;
    height: 43px;
    padding: 0 36px 0 13px;
    border: 1px solid #d7dfeb;
    border-radius: 8px;
    outline: 0;
    background: #fff;
    color: var(--rg-ink);
}

.account-form select:focus {
    border-color: var(--rg-primary);
    box-shadow: 0 0 0 3px rgba(49, 89, 173, .1);
}

.account-form input:focus {
    border-color: var(--rg-primary);
    box-shadow: 0 0 0 3px rgba(49, 89, 173, .1);
}

.account-form input:disabled {
    background: #f4f6f9;
    color: #7b889a;
}

.primary-button,
.secondary-button,
.danger-button {
    min-height: 40px;
    padding: 0 17px;
    border-radius: 8px;
    cursor: pointer;
}

.primary-button {
    justify-self: start;
    border: 1px solid var(--rg-primary);
    background: var(--rg-primary);
    color: #fff;
}

.primary-button:hover {
    background: var(--rg-primary-strong);
}

.secondary-button {
    border: 1px solid #b9c7dc;
    background: #fff;
    color: var(--rg-primary);
}

.primary-button:disabled,
.secondary-button:disabled {
    cursor: not-allowed;
    opacity: .62;
}

.danger-button {
    border: 1px solid #efc4c4;
    background: #fff8f8;
    color: var(--rg-danger);
}

.security-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
    border: 1px solid var(--rg-line);
    border-radius: 10px;
}

.security-note {
    margin-top: 16px;
    padding: 14px;
    border-radius: 9px;
    background: #f7f9fc;
    color: var(--rg-muted);
    font-size: 13px;
    line-height: 1.7;
}

.plans-card {
    margin-top: 18px;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.plan-item {
    padding: 18px;
    border: 1px solid #dce5f2;
    border-radius: 11px;
    background: #f9fbff;
}

.plan-item h3 {
    margin: 0 0 12px;
    font-size: 15px;
}

.plan-item dl {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin: 0;
    color: var(--rg-muted);
    font-size: 12px;
}

.plan-item dd {
    margin: 0;
    color: var(--rg-ink);
    font-weight: 650;
}

.segmented {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--rg-line);
    border-radius: 10px;
    background: #fff;
}

.segmented button {
    min-height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--rg-muted);
    cursor: pointer;
}

.segmented button.active {
    background: var(--rg-primary-soft);
    color: var(--rg-primary);
    font-weight: 700;
}

.data-list {
    overflow: hidden;
}

.refund-policy-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 14px;
    padding: 13px 15px;
    border: 1px solid #d7e3f7;
    border-radius: 10px;
    background: #f5f8ff;
    color: var(--rg-muted);
    font-size: 13px;
    line-height: 1.6;
}

.ai-points-balance {
    margin-bottom: 14px;
    padding: 22px 24px;
    border: 1px solid #cddcf4;
    border-radius: 14px;
    background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
    box-shadow: 0 8px 24px rgba(36, 75, 145, .07);
}

.ai-points-heading,
.ai-points-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.ai-points-heading h2 {
    margin: 0 0 5px;
    font-size: 18px;
}

.ai-points-heading p,
.ai-points-loading,
.ai-points-unavailable span {
    margin: 0;
    color: var(--rg-muted);
    font-size: 12px;
}

.ai-points-heading a {
    flex: 0 0 auto;
    padding: 9px 14px;
    border: 1px solid var(--rg-primary);
    border-radius: 8px;
    background: var(--rg-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.ai-points-metrics {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

.ai-points-metrics > div {
    padding: 14px 16px;
    border: 1px solid rgba(191, 208, 235, .8);
    border-radius: 10px;
    background: rgba(255, 255, 255, .78);
}

.ai-points-metrics span,
.ai-points-foot {
    color: var(--rg-muted);
    font-size: 11px;
}

.ai-points-metrics strong {
    display: block;
    margin-top: 5px;
    color: var(--rg-ink);
    font-size: 19px;
}

.ai-points-metrics .ai-points-primary strong {
    color: var(--rg-primary);
    font-size: 27px;
}

.ai-points-progress {
    overflow: hidden;
    height: 7px;
    margin: 14px 0 11px;
    border-radius: 999px;
    background: #dce6f5;
}

.ai-points-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--rg-primary), #5b88e2);
}

.ai-points-foot b {
    color: var(--rg-ink);
    font-weight: 650;
}

.ai-points-unavailable {
    display: grid;
    gap: 5px;
}

.refund-policy-note strong {
    flex: 0 0 auto;
    color: var(--rg-primary);
}

.order-card,
.report-card {
    padding: 22px 24px;
    border-bottom: 1px solid var(--rg-line);
}

.order-group {
    margin-bottom: 28px;
}

.order-group-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--rg-line);
}

.order-group-heading h2 {
    margin: 0 0 4px;
    font-size: 19px;
}

.order-group-heading p,
.order-group-heading > span {
    margin: 0;
    color: var(--rg-muted);
    font-size: 13px;
}

.order-card:last-child,
.report-card:last-child {
    border-bottom: 0;
}

.order-top,
.report-card {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    justify-content: space-between;
}

.order-title,
.report-main {
    min-width: 0;
}

.order-title h3,
.report-main h3 {
    margin: 0 0 8px;
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-meta,
.report-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 16px;
    color: var(--rg-muted);
    font-size: 12px;
}

.order-status {
    flex: 0 0 auto;
    padding: 5px 10px;
    border-radius: 999px;
    background: #f0f3f7;
    color: var(--rg-muted);
    font-size: 12px;
    font-weight: 700;
}

.order-status.success {
    background: #eaf8f2;
    color: var(--rg-success);
}

.order-status.pending {
    background: #fff5df;
    color: #b8760d;
}

.order-status.refund {
    background: #fff0f0;
    color: var(--rg-danger);
}

.order-quota {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-top: 17px;
    padding-top: 17px;
    border-top: 1px dashed #dce3ed;
}

.order-quota div {
    min-width: 0;
}

.order-quota span {
    display: block;
    margin-bottom: 5px;
    color: var(--rg-muted);
    font-size: 11px;
}

.order-quota strong {
    overflow: hidden;
    display: block;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-refund-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.refund-request-button {
    min-height: 36px;
    padding: 0 16px;
    border: 1px solid #c9d4e5;
    border-radius: 8px;
    background: #fff;
    color: var(--rg-primary);
    cursor: pointer;
    font-weight: 700;
}

.refund-request-button:hover {
    border-color: var(--rg-primary);
    background: var(--rg-primary-soft);
}

.refund-request-status {
    padding: 7px 11px;
    border-radius: 8px;
    background: #fff5df;
    color: #9a650c;
    font-size: 12px;
    font-weight: 700;
}

.report-type-mark {
    flex: 0 0 auto;
    min-width: 68px;
    padding: 13px 9px;
    border: 1px solid #cbd8ed;
    border-radius: 9px;
    background: #f3f7ff;
    color: var(--rg-primary);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.report-main {
    flex: 1 1 auto;
}

.report-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.report-actions a,
.report-actions button {
    min-height: 35px;
    padding: 0 13px;
    border: 1px solid #c9d4e5;
    border-radius: 8px;
    background: #fff;
    color: var(--rg-primary);
    cursor: pointer;
    font-size: 12px;
    line-height: 33px;
    text-decoration: none;
}

.report-actions .save-favorite.saved {
    border-color: #f0c76a;
    background: #fff8e6;
    color: #9a6900;
}

.empty-state {
    padding: 78px 24px;
    color: var(--rg-muted);
    text-align: center;
}

.empty-state strong {
    display: block;
    margin-bottom: 8px;
    color: #52637c;
    font-size: 17px;
}

.account-pager {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin-top: 18px;
}

.account-pager button {
    min-width: 38px;
    min-height: 36px;
    border: 1px solid var(--rg-line);
    border-radius: 8px;
    background: #fff;
    color: var(--rg-primary);
    cursor: pointer;
}

.account-pager button:disabled {
    color: #aeb8c6;
    cursor: default;
}

.account-loading {
    display: none;
    position: fixed;
    top: 82px;
    left: 50%;
    z-index: 3000;
    align-items: center;
    gap: 9px;
    padding: 9px 15px;
    border-radius: 999px;
    background: #172642;
    color: #fff;
    box-shadow: var(--rg-shadow);
    font-size: 12px;
    transform: translateX(-50%);
}

.account-loading.show {
    display: flex;
}

.account-loading span {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: account-spin .7s linear infinite;
}

@keyframes account-spin {
    to { transform: rotate(360deg); }
}

.account-message {
    display: none;
    position: fixed;
    top: 82px;
    left: 50%;
    z-index: 3200;
    padding: 10px 16px;
    border-radius: 8px;
    background: #172642;
    color: #fff;
    box-shadow: var(--rg-shadow);
    font-size: 13px;
    transform: translateX(-50%);
}

.account-message.show {
    display: block;
}

.account-message.error {
    background: var(--rg-danger);
}

.dialog-message {
    display: none;
    padding: 11px 13px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.55;
}

.dialog-message.show {
    display: block;
}

.dialog-message.error {
    border-color: #efc4c4;
    background: #fff3f2;
    color: #a2231d;
}

.dialog-message.success {
    border-color: #b9dfcf;
    background: #effaf5;
    color: #176747;
}

.account-dialog {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 5000;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.account-dialog.open {
    display: flex;
}

.dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 25, 47, .58);
    backdrop-filter: blur(3px);
}

.dialog-panel {
    position: relative;
    z-index: 1;
    width: min(570px, 100%);
    max-height: calc(100vh - 44px);
    overflow: auto;
    padding: 34px;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 26px 80px rgba(10, 25, 54, .25);
}

.dialog-panel h2 {
    margin: 0 0 25px;
}

.refund-dialog-panel h2 {
    margin-bottom: 12px;
}

.refund-dialog-notice {
    margin: 0 0 22px;
    padding: 13px 15px;
    border-left: 3px solid var(--rg-primary);
    border-radius: 6px;
    background: #f5f8ff;
    color: var(--rg-ink);
    line-height: 1.65;
}

.refund-order-summary {
    padding: 13px 15px;
    border: 1px solid var(--rg-line);
    border-radius: 9px;
    background: #fafbfd;
}

.refund-order-summary span,
.refund-order-summary strong {
    display: block;
}

.refund-order-summary span {
    margin-bottom: 4px;
    color: var(--rg-muted);
    font-size: 12px;
}

.refund-order-summary strong {
    overflow-wrap: anywhere;
}

.account-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 11px 13px;
    border: 1px solid #d7dfeb;
    border-radius: 8px;
    outline: 0;
    color: var(--rg-ink);
    font: inherit;
    line-height: 1.55;
    resize: vertical;
}

.account-form textarea:focus {
    border-color: var(--rg-primary);
    box-shadow: 0 0 0 3px rgba(49, 89, 173, .1);
}

.dialog-close {
    position: absolute;
    top: 14px;
    right: 15px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #f2f4f8;
    color: #64758c;
    cursor: pointer;
    font-size: 22px;
}

.sms-code-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

/* 我的订阅 */
.subscription-heading .primary-button {
    align-self: flex-end;
}

.subscription-summary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 16px;
    margin-bottom: 26px;
}

.subscription-intro-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 154px;
    background:
        radial-gradient(circle at 90% 10%, rgba(95, 139, 229, .17), transparent 34%),
        linear-gradient(135deg, #fff, #f4f8ff);
}

.subscription-eyebrow {
    color: var(--rg-primary);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .14em;
}

.subscription-intro-card h2 {
    max-width: 640px;
    margin: 9px 0 8px;
    font-size: 21px;
    line-height: 1.4;
}

.subscription-intro-card p,
.subscription-block-heading p {
    margin: 0;
    color: var(--rg-muted);
    font-size: 13px;
    line-height: 1.7;
}

.subscription-channel-pills {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 8px;
    flex: 0 0 auto;
}

.subscription-channel-pills span {
    padding: 7px 10px;
    border: 1px solid #d3def0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .8);
    color: #4e6488;
    font-size: 12px;
}

.subscription-count-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 154px;
}

.subscription-count-card > span {
    color: var(--rg-muted);
    font-size: 13px;
}

.subscription-count-card > strong {
    margin: 5px 0 9px;
    color: var(--rg-primary);
    font-size: 38px;
}

.text-button {
    align-self: flex-start;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--rg-primary);
    cursor: pointer;
    font-size: 12px;
}

.subscription-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr);
    gap: 22px;
}

.subscription-block-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin: 0 2px 12px;
}

.subscription-block-heading h2 {
    margin: 0 0 4px;
    font-size: 17px;
}

.subscription-rule-list,
.subscription-endpoint-list {
    display: grid;
    gap: 10px;
}

.subscription-rule,
.subscription-endpoint {
    border: 1px solid var(--rg-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(30, 55, 101, .055);
}

.subscription-rule {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    padding: 18px 20px;
}

.subscription-rule.disabled {
    opacity: .62;
}

.subscription-rule-top,
.subscription-rule-meta,
.subscription-rule-actions,
.subscription-endpoint-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.subscription-rule-top {
    gap: 8px;
}

.subscription-rule-top h3 {
    margin: 0;
    font-size: 16px;
}

.subscription-product-tag,
.subscription-match-tag {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--rg-primary-soft);
    color: var(--rg-primary);
    font-size: 11px;
    font-weight: 750;
}

.subscription-match-tag {
    background: #f1f4f8;
    color: #607189;
}

.subscription-rule-meta {
    gap: 7px 12px;
    margin-top: 11px;
    color: var(--rg-muted);
    font-size: 12px;
}

.subscription-rule-actions {
    align-content: center;
    justify-content: flex-end;
    gap: 7px;
}

.subscription-rule-actions button,
.subscription-endpoint button {
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid #d3ddea;
    border-radius: 7px;
    background: #fff;
    color: var(--rg-primary);
    cursor: pointer;
    font-size: 12px;
}

.subscription-rule-actions button[data-action="delete"] {
    color: var(--rg-danger);
}

.subscription-endpoint {
    padding: 17px;
}

.subscription-endpoint-top {
    justify-content: space-between;
    gap: 10px;
}

.subscription-endpoint strong {
    font-size: 14px;
}

.subscription-endpoint p {
    overflow: hidden;
    margin: 9px 0 0;
    color: var(--rg-muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.endpoint-state {
    color: var(--rg-muted);
    font-size: 11px;
}

.endpoint-state.active {
    color: var(--rg-success);
}

.notification-heading {
    margin-top: 30px;
}

.notification-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--rg-line);
    background: #fff;
}

.notification-item:last-child {
    border-bottom: 0;
}

.notification-item.unread {
    background: linear-gradient(90deg, #f3f7ff, #fff 42%);
    box-shadow: inset 3px 0 0 var(--rg-primary);
}

.notification-item h3 {
    margin: 0 0 9px;
    color: var(--rg-ink);
    font-size: 15px;
    line-height: 1.5;
}

.notification-item a {
    color: inherit;
    text-decoration: none;
}

.notification-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    color: var(--rg-muted);
    font-size: 12px;
}

.notification-open {
    align-self: center;
    padding: 8px 12px;
    border: 1px solid #cbd7e8;
    border-radius: 8px;
    color: var(--rg-primary) !important;
    font-size: 12px;
    white-space: nowrap;
}

.subscription-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.subscription-fieldset legend {
    margin-bottom: 9px;
    color: #3b4c64;
    font-size: 13px;
    font-weight: 650;
}

.subscription-fieldset > small {
    display: block;
    margin-top: 8px;
    color: var(--rg-muted);
    font-size: 11px;
}

.subscription-products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.subscription-products label {
    display: block;
    cursor: pointer;
}

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

.subscription-products label > span {
    display: block;
    min-height: 67px;
    padding: 13px 14px;
    border: 1px solid #d8e0ec;
    border-radius: 9px;
    background: #fff;
}

.subscription-products input:checked + span {
    border-color: var(--rg-primary);
    background: var(--rg-primary-soft);
    box-shadow: 0 0 0 2px rgba(49, 89, 173, .08);
}

.subscription-products b,
.subscription-products small {
    display: block;
}

.subscription-products b {
    margin-bottom: 4px;
    color: var(--rg-ink);
    font-size: 13px;
}

.subscription-products small {
    color: var(--rg-muted);
    font-size: 11px;
}

.subscription-form-row {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr) 145px;
    gap: 10px;
}

.subscription-presets > small {
    display: block;
    margin: -2px 0 12px;
}

.subscription-preset-group {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin-top: 10px;
}

.subscription-preset-group strong {
    padding-top: 7px;
    color: var(--rg-muted);
    font-size: 12px;
}

.subscription-preset-group > div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.subscription-preset-group button {
    padding: 7px 10px;
    border: 1px solid #d8e0ec;
    border-radius: 999px;
    background: #fff;
    color: var(--rg-ink);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.subscription-preset-group button:hover {
    border-color: var(--rg-primary);
    color: var(--rg-primary);
    background: var(--rg-primary-soft);
}

.subscription-channel-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.subscription-channel-options label {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid #d8e0ec;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.subscription-channel-options input {
    width: 17px;
    height: 17px;
}

.subscription-dialog-panel {
    width: min(680px, 100%);
}

@media (max-width: 1500px) {
    .account-header {
        flex-wrap: wrap;
        padding: 0 18px;
    }

    .account-top-nav {
        display: flex;
        order: 3;
        flex: 1 0 calc(100% + 36px);
        width: calc(100% + 36px);
        min-height: 44px;
        margin: 0 -18px;
        padding: 0 12px;
        border-top: 1px solid var(--rg-line);
        background: #fff;
    }

    .account-top-nav a {
        min-height: 44px;
        padding: 0 11px;
        font-size: 13px;
    }

    .rg-lang-en .account-top-nav a {
        padding: 0 8px;
        font-size: 12px;
    }

    .account-header-actions {
        margin-left: auto;
    }

    .account-sidebar {
        top: 132px;
    }
}

@media (max-width: 1050px) {
    .account-shell {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .overview-grid,
    .plans-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .order-quota {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 760px) {
    .account-header {
        min-height: 58px;
        padding: 0 14px;
    }

    .account-brand span,
    #accountLogout {
        display: none;
    }

    .account-brand img {
        width: 40px;
        height: 40px;
    }

    .account-header-actions {
        gap: 7px;
    }

    .account-header-user {
        gap: 6px;
    }

    .account-header-user img {
        width: 30px;
        height: 30px;
    }

    .account-header-user span {
        display: none;
    }

    .account-language-switcher.rg-language-switcher {
        padding: 2px;
    }

    .account-language-switcher.rg-language-switcher button {
        min-width: 38px;
        height: 28px;
        padding: 0 7px;
        line-height: 28px;
    }

    .account-top-nav {
        flex-basis: calc(100% + 28px);
        width: calc(100% + 28px);
        margin: 0 -14px;
        padding: 0 8px;
    }

    .account-shell {
        display: block;
        width: 100%;
        margin: 0;
    }

    .account-sidebar {
        position: sticky;
        top: 102px;
        z-index: 800;
        overflow: visible;
        border-width: 0 0 1px;
        border-radius: 0;
        box-shadow: 0 6px 18px rgba(34, 58, 99, .07);
    }

    .account-user-card {
        display: none;
    }

    .account-nav {
        display: flex;
        overflow-x: auto;
        padding: 7px 10px;
        scrollbar-width: none;
    }

    .account-nav::-webkit-scrollbar {
        display: none;
    }

    .account-nav a {
        flex: 0 0 auto;
        min-height: 40px;
        padding: 0 11px;
    }

    .account-nav a span {
        display: none;
    }

    .account-nav a b {
        font-size: 13px;
    }

    .account-content {
        padding: 18px 14px 50px;
    }

    .section-heading {
        display: block;
        min-height: 0;
        margin-bottom: 15px;
    }

    .section-heading h1 {
        font-size: 23px;
    }

    .segmented {
        width: 100%;
        margin-top: 16px;
        overflow-x: auto;
    }

    .segmented button {
        flex: 1 0 auto;
        padding: 0 10px;
    }

    .overview-grid,
    .plans-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .overview-stat {
        min-height: 94px;
        padding: 16px;
    }

    .account-card {
        padding: 20px 17px;
    }

    .order-card,
    .report-card {
        padding: 18px 16px;
    }

    .order-quota {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .refund-policy-note {
        display: block;
    }

    .ai-points-balance {
        padding: 18px 16px;
    }

    .ai-points-heading {
        align-items: flex-start;
    }

    .ai-points-heading a {
        padding: 8px 10px;
        white-space: nowrap;
    }

    .ai-points-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ai-points-metrics .ai-points-primary {
        grid-column: 1 / -1;
    }

    .ai-points-foot {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .refund-policy-note strong {
        display: block;
        margin-bottom: 2px;
    }

    .refund-request-button {
        width: 100%;
    }

    .report-card {
        flex-wrap: wrap;
    }

    .report-main {
        flex: 1 1 calc(100% - 90px);
    }

    .report-actions {
        flex: 1 0 100%;
        padding-left: 86px;
    }

    .report-actions a,
    .report-actions button {
        flex: 1 1 0;
        text-align: center;
    }

    .sms-code-row {
        grid-template-columns: 1fr;
    }

    .dialog-panel {
        padding: 28px 20px 22px;
    }

    .subscription-summary-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .subscription-intro-card {
        display: block;
        min-height: 0;
    }

    .subscription-channel-pills {
        grid-template-columns: repeat(4, max-content);
        margin-top: 18px;
        overflow-x: auto;
    }

    .subscription-count-card {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        min-height: 0;
    }

    .subscription-count-card > strong {
        grid-row: 1 / 3;
        grid-column: 2;
        margin: 0;
    }

    .subscription-rule {
        grid-template-columns: 1fr;
        padding: 17px;
    }

    .subscription-rule-actions {
        justify-content: flex-start;
    }

    .notification-item {
        grid-template-columns: 1fr;
        padding: 18px 17px;
    }

    .notification-open {
        justify-self: start;
    }

    .subscription-form-row {
        grid-template-columns: 1fr;
    }

    .subscription-preset-group {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .subscription-channel-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 430px) {
    .overview-grid {
        grid-template-columns: 1fr 1fr;
    }

    .overview-stat strong {
        font-size: 22px;
    }

    .plans-grid {
        grid-template-columns: 1fr;
    }

    .account-header-user span {
        max-width: 110px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .subscription-products {
        grid-template-columns: 1fr;
    }

    .subscription-heading .primary-button {
        width: 100%;
        margin-top: 14px;
    }
}
