/* 账号页工作区壳兼容样式 */
#accountPage.aff-page-shell {
    max-width: none;
    margin: 0;
}

.aff-hero-card-account {
    min-height: 240px;
}

#accountPage .aff-hero-card-account.acc-header {
    padding: 16px 18px 18px;
    border-radius: 22px;
}

#accountPage .aff-hero-card-account::after {
    width: 150px;
    height: 150px;
    inset: auto -4% -16% auto;
}

#accountPage .aff-hero-card-account .aff-kicker {
    padding: 5px 10px;
    font-size: 0.64rem;
    letter-spacing: 0.14em;
}

#accountPage .aff-hero-card-account .acc-title {
    font-size: clamp(1.4rem, 2.1vw, 2.1rem);
    letter-spacing: -0.03em;
}

#accountPage .aff-hero-card-account .acc-subtitle {
    font-size: 0.8rem;
    line-height: 1.52;
}

#accountPage .aff-account-status-card {
    padding: 12px 14px;
    border-radius: 16px;
}

#accountPage .aff-account-status-text {
    margin-top: 6px;
    font-size: 0.76rem;
    line-height: 1.52;
}

#accountPage .acc-btn-primary-hero {
    border-radius: 16px;
    padding: 10px 14px;
    font-size: 0.84rem;
}

.aff-hero-card-account .acc-header-main,
.aff-hero-card-account .acc-header-actions {
    position: relative;
    z-index: 1;
}

.aff-hero-card-account.acc-header {
    margin-bottom: 0;
    padding-bottom: 28px;
    border-bottom: none;
    align-items: stretch;
}

.aff-hero-card-account .acc-header-actions {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    min-width: 320px;
}

.aff-hero-card-account .acc-title {
    color: #fffaf3;
    font-size: clamp(1.9rem, 3vw, 3rem);
    letter-spacing: -0.04em;
}

.aff-hero-card-account .acc-subtitle {
    color: rgba(255, 250, 243, 0.82);
    font-size: 0.96rem;
    line-height: 1.75;
}

.aff-account-status-card {
    min-height: 100%;
}

.aff-account-status-text {
    margin: 12px 0 0;
    color: rgba(255, 250, 243, 0.78);
    font-size: 0.88rem;
    line-height: 1.7;
}

.acc-btn-primary-hero {
    width: 100%;
    justify-content: center;
    border-radius: 18px;
    padding: 14px 20px;
    box-shadow: 0 18px 30px rgba(239, 123, 0, 0.22);
}

#accountPage .acc-stats-grid {
    margin-bottom: 0;
}

#accountPage .acc-stat-card,
#accountPage .acc-section {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(216, 190, 150, 0.45);
    box-shadow: 0 22px 50px rgba(49, 38, 24, 0.08);
}

#accountPage .acc-stat-card:hover,
#accountPage .acc-section:hover {
    border-color: rgba(239, 123, 0, 0.35);
    box-shadow: 0 26px 56px rgba(49, 38, 24, 0.11);
}

#accountPage .acc-stat-card::before {
    background: linear-gradient(90deg, rgba(255, 158, 44, 0.95), rgba(239, 123, 0, 0.95));
}

#accountPage .acc-license-box,
#accountPage .acc-input {
    background: rgba(255, 250, 244, 0.9);
    border-color: rgba(201, 176, 136, 0.45);
}

@media (max-width: 980px) {
.aff-hero-card-account .acc-header-actions {
        min-width: 0;
    }

#accountPage .aff-hero-card-account.acc-header {
        grid-template-columns: 1fr;
        padding: 18px;
    }
}

@media (max-width: 900px) {
#accountPage .acc-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
.aff-hero-card-account.acc-header {
        padding-bottom: 22px;
    }

#accountPage .acc-stats-grid {
        grid-template-columns: 1fr;
    }

#accountPage .acc-stat-card-device {
        grid-column: span 1;
    }
}

[data-theme="dark"] #accountPage .acc-stat-card,
[data-theme="dark"] #accountPage .acc-section {
    background: rgba(27, 35, 49, 0.82);
    border-color: rgba(96, 114, 138, 0.45);
}

/* ==================== 账号信息页面（AccX v3：玻璃拟态 + 动效） ==================== */

.accx-page {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 20px;
    padding: 24px;
    background: radial-gradient(1200px 600px at 10% 10%, rgba(255, 159, 64, 0.10), transparent 58%),
                radial-gradient(1000px 520px at 90% 20%, rgba(56, 189, 248, 0.08), transparent 58%),
                radial-gradient(900px 480px at 55% 110%, rgba(255, 193, 7, 0.06), transparent 60%),
                linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.accx-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.accx-orb {
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    filter: blur(86px);
    opacity: 0.18;
    transform: translate3d(0, 0, 0);
    animation: accxFloat 10s ease-in-out infinite;
}

.accx-orb-1 {
    top: -220px;
    left: -220px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 159, 64, 0.8), rgba(255, 159, 64, 0.05) 60%, transparent 70%);
    animation-duration: 12s;
}

.accx-orb-2 {
    top: -260px;
    right: -260px;
    background: radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.75), rgba(56, 189, 248, 0.05) 60%, transparent 72%);
    animation-duration: 14s;
    animation-direction: reverse;
}

.accx-orb-3 {
    bottom: -260px;
    left: 40%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 193, 7, 0.65), rgba(255, 193, 7, 0.05) 60%, transparent 72%);
    animation-duration: 16s;
}

.accx-noise {
    position: absolute;
    inset: 0;
    display: none;
}

.accx-shell {
    position: relative;
    z-index: 1;
    width: 100%;
}

.accx-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 4px 2px 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.accx-hero-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.accx-title {
    font-size: 32px;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.5px;
}

.accx-subtitle {
    margin-top: 8px;
    color: #64748b;
    font-size: 14px;
}

.accx-primary-btn {
    border-radius: 12px;
    padding: 12px 20px;
    box-shadow: 0 10px 24px rgba(255, 159, 64, 0.25);
    will-change: transform;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.accx-primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(255, 159, 64, 0.35);
}

.btn-icon-wrapper svg {
    display: block;
}

.accx-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 18px;
}

.accx-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.accx-card {
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 24px -10px rgba(15, 23, 42, 0.12);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accx-card-glass {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(18px);
}

.accx-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 159, 64, 0.28);
    box-shadow: 0 16px 34px -14px rgba(255, 159, 64, 0.28);
}

.accx-card-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.accx-card-title {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.accx-ico {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 159, 64, 0.12);
    color: #ff9f40;
}

.accx-ico svg {
    width: 20px;
    height: 20px;
    stroke-width: 2px;
}

.accx-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.accx-field {
    padding: 14px;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.75);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.accx-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 500;
}

.accx-value {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.accx-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.accx-chip {
    border: 1px solid rgba(203, 213, 225, 0.6);
    background: rgba(255, 255, 255, 0.8);
    color: #475569;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.accx-chip:hover {
    transform: translateY(-2px);
    border-color: #ff9f40;
    color: #d97706;
    box-shadow: 0 4px 12px rgba(255, 159, 64, 0.15);
}

.accx-chip:active {
    transform: translateY(0);
}

.accx-chip-ok {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.05);
    color: #16a34a;
}

.accx-chip-ok:hover {
    border-color: #16a34a;
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

.accx-keybox {
    border-radius: 14px;
    padding: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.92));
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
    position: relative;
    overflow: hidden;
}

/* 卡密盒子的光效 */
.accx-keybox::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(600px 140px at 10% 0%, rgba(255, 159, 64, 0.12), transparent 55%),
                radial-gradient(520px 140px at 90% 110%, rgba(56, 189, 248, 0.10), transparent 55%);
    pointer-events: none;
}

.accx-key {
    display: block;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 15px;
    letter-spacing: 1.2px;
    color: #0f172a;
    user-select: text;
    overflow-wrap: anywhere;
    text-align: center;
}

.accx-hint {
    margin-top: 12px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.6;
    text-align: center;
}

.accx-kv {
    display: grid;
    gap: 16px;
}

.accx-kv-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.75);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.accx-kv-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.accx-kv-value {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    text-align: right;
}

.accx-kv-big {
    font-size: 26px;
    font-weight: 800;
    color: #ff9f40;
    text-shadow: 0 2px 4px rgba(255, 159, 64, 0.1);
}

.accx-unit {
    margin-left: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    text-shadow: none;
}

.accx-device-counter {
    font-weight: 800;
    color: #0f172a;
    font-size: 18px;
}

.accx-muted {
    color: #94a3b8;
    font-weight: 600;
    margin: 0 2px;
}

.accx-progress {
    margin-top: 16px;
}

.accx-track {
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.accx-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff9f40 0%, #ffc107 100%);
    box-shadow: 0 0 10px rgba(255, 159, 64, 0.4);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.accx-progress-text {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-align: right;
}

.accx-tip {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 159, 64, 0.08);
    border: 1px solid rgba(255, 159, 64, 0.2);
    color: #d97706;
    font-size: 13px;
    font-weight: 600;
}

.accx-tip-ico {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #d97706;
}

.accx-tip-ico svg {
    width: 16px;
    height: 16px;
}

.accx-card-sticky {
    position: sticky;
    top: 24px;
}

/* 账号页-激活卡密和购买记录区域 */
.accx-section {
    margin-top: 32px;
}

.accx-card-full {
    width: 100%;
}

.accx-section-desc {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.6;
}

.accx-activate-form {
    display: flex;
    gap: 16px;
    align-items: center;
}

.accx-license-input {
    flex: 1;
    padding: 16px 20px;
    font-size: 16px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    letter-spacing: 1px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    color: #0f172a;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.accx-license-input:focus {
    outline: none;
    border-color: #ff9f40;
    box-shadow: 0 0 0 4px rgba(255, 159, 64, 0.15);
}

.accx-license-input::placeholder {
    color: #cbd5e1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: normal;
}

.accx-activate-btn {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(255, 159, 64, 0.2);
}

.accx-loading {
    padding: 40px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

/* 购买记录列表样式 */
.accx-history-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.accx-order-item {
    padding: 20px;
    border-radius: 16px;
    background: white;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.accx-order-item:hover {
    border-color: #ff9f40;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.accx-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.accx-order-no {
    font-size: 13px;
    color: #64748b;
    font-family: 'JetBrains Mono', monospace;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
}

.accx-order-status {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.accx-order-status.success {
    background: #dcfce7;
    color: #166534;
}

.accx-order-status.warning {
    background: #fef3c7;
    color: #b45309;
}

.accx-order-status.error {
    background: #fee2e2;
    color: #991b1b;
}

.accx-order-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.accx-order-info {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 15px;
    color: #0f172a;
    font-weight: 500;
}

.accx-order-time {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.accx-order-time small {
    font-size: 13px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.accx-order-licenses {
    margin-top: 16px;
    padding: 16px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.accx-order-licenses label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.accx-license-code-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    margin-top: 8px;
    border-radius: 8px;
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.accx-license-code-item code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: #0f172a;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.accx-license-code-item .copy-btn {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: white;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.accx-license-code-item .copy-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.accx-empty-history {
    padding: 60px 24px;
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    border: 1px dashed #cbd5e1;
}

.accx-empty-history .icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    opacity: 0.5;
}

.accx-empty-history p {
    font-size: 15px;
    color: #64748b;
    font-weight: 500;
}

.accx-history-error {
    padding: 32px;
    text-align: center;
    color: #ef4444;
    font-size: 14px;
    background: #fee2e2;
    border-radius: 12px;
    border: 1px solid #fecaca;
}

.accx-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.accx-pagination button {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: white;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.accx-pagination button:hover:not(:disabled) {
    background: #fff7ed;
    border-color: #ff9f40;
    color: #c2410c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 159, 64, 0.1);
}

.accx-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9;
}

.accx-pagination span {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

@media (max-width: 640px) {
    .accx-activate-form {
        flex-direction: column;
    }
    .accx-activate-btn {
        width: 100%;
    }
}

/* 状态徽章（由 js/account.js 渲染） */
.accx-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.accx-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.accx-badge--ok {
    border-color: rgba(34, 197, 94, 0.2);
    background: #dcfce7;
    color: #15803d;
}

.accx-badge--ok::before {
    background: #16a34a;
}

.accx-badge--warn {
    border-color: rgba(245, 158, 11, 0.2);
    background: #fef3c7;
    color: #b45309;
}

.accx-badge--warn::before {
    background: #d97706;
}

.accx-badge--bad {
    border-color: rgba(239, 68, 68, 0.2);
    background: #fee2e2;
    color: #991b1b;
}

.accx-badge--bad::before {
    background: #dc2626;
}

.accx-badge--none {
    border-color: rgba(148, 163, 184, 0.2);
    background: #f1f5f9;
    color: #64748b;
}

.accx-badge--none::before {
    background: #94a3b8;
}

/* 入场动画：由 JS 加 accx-enter 类触发 */
.accx-page.accx-enter .accx-hero,
.accx-page.accx-enter .accx-card {
    animation: accxEnter 600ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.accx-page.accx-enter .accx-card:nth-child(2) {
    animation-delay: 100ms;
}

.accx-page.accx-enter .accx-card:nth-child(3) {
    animation-delay: 200ms;
}

.accx-page.accx-enter .accx-col-side .accx-card:nth-child(2) {
    animation-delay: 300ms;
}

@keyframes accxEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes accxFloat {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(0, 20px, 0) scale(1.05);
    }
}

@media (prefers-reduced-motion: reduce) {
    .accx-orb {
        animation: none;
    }
    .accx-page.accx-enter .accx-hero,
    .accx-page.accx-enter .accx-card {
        animation: none;
    }
    .accx-fill {
        transition: none;
    }
}

@media (max-width: 980px) {
    .accx-grid {
        grid-template-columns: 1fr;
    }
    .accx-card-sticky {
        position: static;
    }
}

@media (max-width: 640px) {
    .accx-page {
        padding: 20px;
    }
    .accx-title {
        font-size: 24px;
    }
    .accx-fields {
        grid-template-columns: 1fr;
    }
}

/* ==================== 账号中心仪表盘样式 ==================== */

.acc-dashboard {
    width: 100%;
    padding: var(--space-6);
    animation: accFadeIn 0.5s var(--ease-out);
}

@keyframes accFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 页面头部 */
.acc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--color-border-light);
}

.acc-header-main {
    flex: 1;
}

.acc-title {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 var(--space-2) 0;
    letter-spacing: -0.5px;
}

.acc-subtitle {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0;
}

.acc-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.acc-status-badge {
    display: inline-flex;
}

.acc-status-badge .accx-badge {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
}

.acc-status-badge .accx-badge--ok {
    background: var(--color-success-light);
    color: var(--color-success);
}

.acc-status-badge .accx-badge--warn {
    background: var(--color-warning-light);
    color: #B45309;
}

.acc-status-badge .accx-badge--bad {
    background: var(--color-error-light);
    color: var(--color-error);
}

.acc-status-badge .accx-badge--none {
    background: var(--color-surface-hover);
    color: var(--color-text-muted);
}

/* 主要按钮 */
.acc-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 10px 20px;
    background: var(--gradient-primary);
    color: var(--color-text-inverse);
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 600;
    font-family: var(--font-display);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-bounce);
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.25);
}

.acc-btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-glow);
}

.acc-btn-primary:active {
    transform: translateY(0) scale(0.98);
}

/* 幽灵按钮 */
.acc-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 8px 14px;
    background: var(--color-surface);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.acc-btn-ghost:hover {
    background: var(--color-surface-hover);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.acc-btn-copy:hover {
    color: var(--color-success);
    border-color: var(--color-success);
}

/* 统计卡片网格 */
.acc-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    margin-bottom: var(--space-6);
}

/* 统计卡片 */
.acc-stat-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.acc-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-out);
}

.acc-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.acc-stat-card:hover::before {
    opacity: 1;
}

/* 统计图标 */
.acc-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
    transition: transform var(--duration-normal) var(--ease-bounce);
}

.acc-stat-card:hover .acc-stat-icon {
    transform: scale(1.1);
}

.acc-stat-icon svg {
    width: 28px;
    height: 28px;
}

.acc-stat-icon-user {
    background: linear-gradient(135deg, #E0F2FE 0%, #BAE6FD 100%);
    color: #0284C7;
}

.acc-stat-icon-time {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, #FFE4CC 100%);
    color: var(--color-primary);
}

/* 统计内容 */
.acc-stat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.acc-stat-value {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.2;
    margin-bottom: var(--space-1);
    word-break: break-all;
    max-width: 100%;
}

.acc-stat-value-big {
    font-size: var(--text-4xl);
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.acc-stat-unit {
    font-size: var(--text-lg);
    font-weight: 500;
    color: var(--color-text-muted);
}

.acc-stat-label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-1);
}

.acc-stat-sub {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acc-stat-sub-tip {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: var(--space-2);
    padding: 4px 10px;
    background: var(--color-surface-hover);
    border-radius: var(--radius-full);
}

/* 环形进度图 */
.acc-stat-card-device {
    flex-direction: row;
    gap: var(--space-5);
    padding: var(--space-5);
}

.acc-stat-card-device .acc-stat-content {
    align-items: flex-start;
    text-align: left;
}

.acc-ring-container {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.acc-ring-progress {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.acc-ring-bg {
    stroke: var(--color-border-light);
}

.acc-ring-fill {
    stroke: var(--color-success);
    transition: stroke-dashoffset 0.8s var(--ease-out),
                stroke 0.3s var(--ease-out);
}

.acc-ring-fill.acc-ring-full {
    stroke: var(--color-primary);
}

.acc-ring-fill.acc-ring-warning {
    stroke: var(--color-warning);
}

.acc-ring-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.acc-ring-value {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-text-primary);
}

/* 区块样式 */
.acc-section {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-5);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
    transition: all var(--duration-normal) var(--ease-out);
}

.acc-section:hover {
    box-shadow: var(--shadow-md);
}

.acc-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.acc-section-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-text-primary);
}

.acc-section-title svg {
    color: var(--color-primary);
}

.acc-section-actions {
    display: flex;
    gap: var(--space-2);
}

.acc-section-desc {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0 0 var(--space-4) 0;
    line-height: 1.6;
}

.acc-section-hint {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-3);
}

.acc-unbind-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px dashed var(--color-border);
}

.acc-btn-unbind {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    font-size: 12px;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.acc-btn-unbind:hover {
    background: #fee2e2;
    border-color: #f87171;
}

.acc-unbind-hint {
    font-size: 11px;
    color: var(--color-text-muted);
}

/* 卡密显示框 */
.acc-license-box {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
    text-align: center;
    transition: all var(--duration-fast) var(--ease-out);
}

.acc-license-box:hover {
    border-color: var(--color-primary);
}

.acc-license-code {
    font-family: var(--font-mono);
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--color-text-primary);
    letter-spacing: 1px;
    user-select: all;
}

/* 激活表单 */
.acc-activate-form {
    display: flex;
    gap: var(--space-3);
    align-items: stretch;
}

.acc-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-family: var(--font-mono);
    color: var(--color-text-primary);
    transition: all var(--duration-fast) var(--ease-out);
}

.acc-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.15);
}

.acc-input::placeholder {
    color: var(--color-text-muted);
    font-family: var(--font-body);
}

.acc-btn-activate {
    white-space: nowrap;
    padding: 12px 24px;
}

/* 响应式 */
@media (max-width: 900px) {
    .acc-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .acc-stat-card-device {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .acc-dashboard {
        padding: var(--space-4);
    }

    .acc-header {
        flex-direction: column;
        gap: var(--space-4);
    }

    .acc-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .acc-stats-grid {
        grid-template-columns: 1fr;
    }

    .acc-stat-card-device {
        grid-column: span 1;
    }

    .acc-activate-form {
        flex-direction: column;
    }

    .acc-btn-activate {
        width: 100%;
        justify-content: center;
    }
}

/* 深色模式 - 仪表盘 */
[data-theme="dark"] .acc-stat-card {
    background: var(--color-surface);
    border-color: var(--color-border);
}

[data-theme="dark"] .acc-stat-icon-user {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(56, 189, 248, 0.15) 100%);
}

[data-theme="dark"] .acc-stat-icon-time {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.2) 0%, rgba(245, 166, 35, 0.15) 100%);
}

[data-theme="dark"] .acc-section {
    background: var(--color-surface);
    border-color: var(--color-border);
}

[data-theme="dark"] .acc-license-box {
    background: var(--color-bg);
    border-color: var(--color-border);
}

[data-theme="dark"] .acc-input {
    background: var(--color-bg);
    border-color: var(--color-border);
}

[data-theme="dark"] .acc-ring-bg {
    stroke: var(--color-border);
}

[data-theme="dark"] .acc-stat-sub-tip {
    background: var(--color-bg);
}
