/* 会员中心基础组件 */
:root {
    --mc-ink: #2a2e34;
    --mc-muted: #86909c;
    --mc-line: #eef0f4;
    --mc-line-strong: #e2e8f0;
    --mc-surface: #fff;
    --mc-accent: #3141b3;
    --mc-accent-hover: #2e3eae;
    --mc-accent-soft: rgba(49, 65, 179, .06);
    --mc-danger: #b42318;
    --mc-ok: #167445;
    --mc-warn: #9a3412;
    --mc-radius: 8px;
}

.mc-panel {
    width: 100%;
    margin: 0;
}

.mc-panel ::selection,
.mc-auth ::selection {
    background: rgba(49, 65, 179, .18);
    color: var(--mc-ink);
}

.mc-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: .75rem;
    row-gap: 0;
    margin: 0 0 1.15rem;
    padding: 0;
    border-bottom: 1px solid var(--mc-line);
    background: transparent;
    overflow: visible;
}

.mc-nav-track {
    display: flex;
    flex: 1 1 16rem;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    margin: 0;
    min-width: 0;
    overflow: visible;
}

.mc-nav-tools {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: .85rem;
    margin-left: auto;
    padding: .45rem 0 .5rem;
}

.mc-nav-tools a {
    color: #86909c;
    font-size: .8125rem;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none !important;
}

.mc-nav-tools a:hover {
    color: var(--mc-accent);
}

.mc-nav-track a {
    position: relative;
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: .55rem .7rem;
    border-radius: 0;
    color: #657387;
    font-size: .875rem;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none !important;
    background: transparent;
}

.mc-nav-track a:hover {
    color: var(--mc-accent);
    background: transparent;
}

.mc-nav-track a.is-active {
    color: var(--mc-ink);
    font-weight: 700;
    background: transparent;
}

.mc-nav-track a.is-active::after {
    content: "";
    position: absolute;
    left: .7rem;
    right: .7rem;
    bottom: -1px;
    height: 2px;
    background: var(--mc-accent);
    border-radius: 1px;
}

.mc-nav-logout:hover {
    color: var(--mc-danger) !important;
}

.mc-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.mc-auth {
    width: min(100%, 26.25rem);
    margin: 0 auto;
}

.mc-auth .artcile-title {
    text-align: center;
}

.mc-auth-links {
    margin: 1rem 0 0;
    color: var(--mc-muted);
    font-size: .875rem;
    text-align: center;
}

.mc-auth-links a {
    font-weight: 700;
    color: var(--mc-accent);
}

.mc-card {
    margin-bottom: 1.25rem;
    padding: 0 0 1.25rem;
    border: 0;
    border-bottom: 1px solid var(--mc-line);
    background: transparent;
}

.mc-card:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.mc-card-panel,
.mc-auth .mc-card {
    padding: clamp(1rem, 2.5vw, 1.75rem) clamp(1rem, 3vw, 1.875rem);
    border: 1px solid #eef0f4;
    border-radius: 12px;
    background: var(--mc-surface);
    box-shadow: none;
}

.mc-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
    margin-bottom: 15px;
}

.mc-card-head h1,
.mc-card > h1,
.mc-panel .artcile-title h1,
.mc-auth .artcile-title h1 {
    margin: 0;
    color: var(--mc-ink);
    font-size: 24px;
    font-weight: 500;
    line-height: 1.5;
}

.mc-card-desc,
.mc-hero-sub {
    margin: 0;
    color: #666;
    font-size: .875rem;
    line-height: 1.6;
}

.mc-tips {
    margin: 0 0 15px;
    padding: 16px 18px;
    border: 0;
    border-radius: 0;
    background: rgba(22, 181, 151, .1);
    color: #657387;
    font-size: .875rem;
    line-height: 1.8;
    opacity: .9;
}

.mc-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    color: #475569;
    font-size: .875rem;
    font-weight: 600;
}

.mc-methods label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.mc-token {
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px solid var(--mc-line);
    border-radius: 10px;
    background: #f8fafc;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .8125rem;
    word-break: break-all;
    line-height: 1.6;
    user-select: all;
}

.mc-group-title {
    margin: 4px 0 0;
    color: var(--mc-muted);
    font-size: .875rem;
    font-weight: 700;
}

.mc-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.mc-hero-body {
    flex: 1 1 12rem;
    min-width: 0;
}

.mc-hero h1,
.mc-hero-name {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
    color: var(--mc-ink);
    line-height: 1.4;
}

.mc-meta {
    margin: .75rem 0 0;
    color: #666;
    font-size: 14px;
    line-height: 1.7;
}

.mc-meta strong {
    color: var(--mc-ink);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.mc-meta-sep {
    margin: 0 .4rem;
    color: #c0c6d0;
}

.mc-panel .artcile-title,
.mc-auth .artcile-title {
    margin-bottom: 15px;
}

.mc-card-head .artcile-title {
    margin-bottom: 0;
}

.mc-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--mc-accent);
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none !important;
}

.mc-link:hover {
    color: var(--mc-accent-hover);
}

.mc-avatar {
    position: relative;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--mc-accent-soft);
    color: var(--mc-accent);
    font-size: 1.15rem;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px #cfd8ff;
}

.mc-avatar-letter {
    position: relative;
    z-index: 0;
    line-height: 1;
}

.mc-avatar-img {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    background: #fff;
}

.mc-avatar.has-img .mc-avatar-letter {
    opacity: 0;
}

.mc-avatar-edit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
}

.mc-avatar-edit .mc-avatar {
    width: 52px;
    height: 52px;
}

.mc-avatar-edit input {
    flex: 1;
    min-width: 0;
}

.mc-stats {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1.35rem;
    margin: 0 0 1rem;
    padding: .85rem 0;
    border-top: 1px solid var(--mc-line);
    border-bottom: 1px solid var(--mc-line);
}

.mc-stat {
    min-width: 0;
}

.mc-stat-label {
    display: block;
    color: var(--mc-muted);
    font-size: .75rem;
    font-weight: 600;
}

.mc-stat-value {
    display: block;
    margin-top: 2px;
    color: var(--mc-ink);
    font-size: 1.05rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.mc-balance {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--mc-ink);
    font-variant-numeric: tabular-nums;
}

.mc-actions,
.mc-wallet-links {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: .6rem .75rem;
}

.mc-actions .mc-btn {
    flex: 0 1 auto;
    min-width: min(100%, 8.5rem);
}

.mc-wallet-links {
    margin-top: 1rem;
}

.mc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #2a2e34;
    font: inherit;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: background .15s ease-out, border-color .15s ease-out, color .15s ease-out;
}

.mc-btn:hover {
    border-color: #3141b3;
    color: var(--mc-accent);
    background: #f4f6fc;
}

.mc-btn:focus-visible,
.mc-link:focus-visible,
.mc-nav-track a:focus-visible,
.mc-ops a:focus-visible,
.mc-ops button:focus-visible {
    outline: 2px solid rgba(49, 65, 179, .45);
    outline-offset: 2px;
}

.mc-btn-primary {
    border-color: #3141b3;
    background: #3141b3;
    color: #fff;
}

.mc-btn-primary:hover {
    border-color: #2e3eae;
    background: #2e3eae;
    color: #fff;
}

.mc-btn-ghost {
    border-color: #cbd5e1;
    background: #fff;
    color: #1e293b;
}

.mc-btn.is-loading {
    pointer-events: none;
    opacity: .72;
}

.mc-btn.is-loading::after {
    content: "";
    width: 14px;
    height: 14px;
    margin-left: 4px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: mc-spin .7s linear infinite;
}

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

.mc-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mc-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.mc-field label {
    color: #334155;
    font-size: .8125rem;
    font-weight: 700;
}

.mc-field input,
.mc-field select,
.mc-field textarea {
    width: 100%;
    padding: .7rem .8rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-weight: 500;
    outline: none;
}

.mc-field textarea {
    min-height: 6.5rem;
    resize: vertical;
}

.mc-field input:focus,
.mc-field select:focus,
.mc-field textarea:focus {
    border-color: #3141b3;
    box-shadow: 0 0 0 3px rgba(49, 65, 179, .14);
}

.mc-field input::placeholder,
.mc-field textarea::placeholder {
    color: #94a3b8;
}

.mc-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
}

.mc-check input {
    accent-color: #3141b3;
}

.mc-code-row {
    display: flex;
    gap: 8px;
}

.mc-code-row input {
    flex: 1;
}

.mc-code-row .mc-btn {
    flex: none;
}

.mc-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: .75rem;
    padding: .875rem 0;
    border-bottom: 1px solid var(--mc-line);
}

.mc-row > div:first-child {
    flex: 1 1 12rem;
    min-width: 0;
}

.mc-row:last-child {
    border-bottom: 0;
}

.mc-list-soft .mc-row {
    padding: .9rem 0;
}

.mc-row-title {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: .95rem;
    font-weight: 700;
}

.mc-row-meta {
    color: var(--mc-muted);
    font-size: .8125rem;
    word-break: break-all;
    line-height: 1.55;
}

.mc-ops {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mc-ops a,
.mc-ops button {
    border: 0;
    background: none;
    color: var(--mc-accent);
    font: inherit;
    font-size: .8125rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.mc-badge {
    display: inline-flex;
    align-items: center;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: .75rem;
    font-weight: 700;
}

.mc-badge.is-ok {
    background: #dcfce7;
    color: var(--mc-ok);
}

.mc-badge.is-warn {
    background: #ffedd5;
    color: var(--mc-warn);
}

.mc-empty {
    margin: 4px 0 0;
    padding: 8px 0 4px;
    border: 0;
    color: #86909c;
    font-size: .9375rem;
    font-weight: 500;
    line-height: 1.7;
    text-align: left;
}

.mc-empty-title {
    margin: 0 0 6px;
    color: var(--mc-ink);
    font-size: 1rem;
    font-weight: 600;
}

.mc-empty-desc {
    margin: 0 0 14px;
    color: #86909c;
    font-size: .875rem;
    line-height: 1.7;
}

.mc-empty > .mc-btn {
    margin-top: 2px;
}

.mc-msg .mc-row-title::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 8px;
    border-radius: 50%;
    background: transparent;
    vertical-align: middle;
}

.mc-msg.unread .mc-row-title::before {
    background: #3141b3;
}

.apply-message {
    margin: 0 0 1rem;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
}

.apply-message-success {
    background: #f0fdf4;
    color: var(--mc-ok);
}

.apply-message-danger {
    background: #fef2f2;
    color: var(--mc-danger);
}

.content-page {
    text-align: center;
    margin-top: 1.25rem;
}

.content-page .page-navigator {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.content-page .page-navigator a,
.content-page .page-navigator span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-size: .875rem;
    font-weight: 700;
}

.content-page .page-navigator a:hover,
.content-page .page-navigator .current span {
    border-color: #3141b3;
    background: #3141b3;
    color: #fff;
    text-decoration: none;
}

.content-page .page-navigator .disabled a {
    opacity: .45;
    pointer-events: none;
}

body.night .mc-card-panel,
body.night .mc-auth .mc-card,
body.night .mc-field input,
body.night .mc-field select,
body.night .mc-field textarea,
body.night .mc-btn,
body.night .mc-btn-ghost {
    background: #2e2d2d;
    border-color: #444;
    color: #e8eef8;
}

body.night .mc-nav {
    border-bottom-color: #333;
}

body.night .mc-nav-track a,
body.night .mc-nav-tools a {
    color: #9aa4b2;
}

body.night .mc-nav-track a.is-active,
body.night .mc-nav-track a:hover,
body.night .mc-nav-tools a:hover {
    background: transparent;
    color: #e8eef8;
}

body.night .mc-nav-track a.is-active::after {
    background: #b9c2ff;
}

body.night .mc-card-head h1,
body.night .mc-card > h1,
body.night .mc-hero h1,
body.night .mc-hero-name,
body.night .mc-panel .artcile-title h1,
body.night .mc-row-title,
body.night .mc-meta strong,
body.night .mc-balance,
body.night .mc-field label {
    color: #e8eef8;
}

body.night .mc-btn-primary {
    background: #3141b3;
    border-color: #3141b3;
    color: #fff;
}

body.night .mc-link {
    color: #b9c2ff;
}

@media (prefers-reduced-motion: reduce) {
    .mc-btn {
        transition: none !important;
    }
}

.mc-panel,
.mc-nav,
.mc-card,
.mc-card-panel,
.mc-actions {
    max-width: 100%;
    box-sizing: border-box;
}

.mc-card-head {
    gap: .65rem .85rem;
}

.mc-card-head > .mc-btn,
.mc-card-head > a.mc-btn {
    flex: 0 1 auto;
}

.mc-row {
    gap: .55rem .75rem;
}

.mc-code-row {
    flex-wrap: wrap;
}

.mc-code-row .mc-btn {
    flex: 1 1 7rem;
}

.mc-auth {
    width: min(100%, 26.25rem);
}

.mc-meta {
    word-break: break-word;
}

@media (max-width: 768px) {
    .dh-content .topbar-crumb {
        display: none;
    }

    .mc-nav-track a {
        padding: .5rem .55rem;
        font-size: .8125rem;
    }

    .mc-nav-tools {
        flex: 1 1 100%;
        margin-left: 0;
        padding-top: .45rem;
        border-top: 1px solid var(--mc-line);
    }

    .mc-card-head {
        align-items: stretch;
    }

    .mc-card-head > .mc-btn,
    .mc-card-head > a.mc-btn {
        flex: 1 1 100%;
    }

    .mc-row {
        flex-direction: column;
        align-items: stretch;
    }

    .mc-ops {
        width: 100%;
    }

    .mc-field input,
    .mc-field select,
    .mc-field textarea {
        font-size: 1rem;
    }
}
