.moon-license-center-page {
    margin-top: 10px;
}

.moon-product-tabs-wrap {
    margin-bottom: 10px;
}

.moon-product-tabs {
    margin-bottom: 0;
}

.moon-license-card {
    position: relative;
    border: 1px solid #e6eef8;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, .05);
    overflow: hidden;
}

.moon-license-tag {
    left: auto;
    right: 0;
    background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
    color: #fff;
    border-radius: 0 var(--main-radius, 5px) 0 var(--main-radius, 5px);
}

.moon-license-card .box-body + .box-body {
    border-top: 1px solid #eef2f7;
}

.moon-license-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.moon-license-head-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.moon-product-cover {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.moon-license-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #1f2937;
}

.moon-license-desc {
    color: #6b7280;
    font-size: 13px;
}

.moon-license-stats {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.moon-stat-item {
    min-width: 110px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #e5edf7;
    border-radius: 12px;
    padding: 12px 14px;
}

.moon-stat-label {
    display: block;
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 4px;
}

.moon-stat-item strong {
    color: #111827;
    font-size: 18px;
}

.moon-box-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1f2937;
}

.moon-license-input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.moon-license-input-group input {
    flex: 1;
    min-width: 240px;
}

#moon-license-domain,
.moon-change-domain-input {
    border-radius: 5px !important;
    border: 1px solid #dbe4ee !important;
    background: #fff !important;
    box-shadow: none !important;
}

#moon-license-domain:focus,
.moon-change-domain-input:focus {
    border-color: #60a5fa !important;
    box-shadow: 0 0 0 3px rgba(96,165,250,.15) !important;
}

.moon-license-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.moon-license-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid #e8eef5;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .03);
    flex-wrap: wrap;
 
}

.moon-license-item-main {
    flex: 1;
    min-width: 240px;
}

.moon-license-domain {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #111827;
}

.moon-license-key-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.moon-license-key code {
    word-break: break-all;
    display: inline-block;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #0f172a;
    padding: 8px 10px;
    border-radius: 10px;
}

.moon-copy-key-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 999px !important;
    padding: 6px 12px !important;
    transition: all .2s ease;
}

.moon-copy-key-btn:hover {
    background: #dbeafe !important;
    transform: translateY(-1px);
}

.moon-copy-key-btn.copied {
    background: #dcfce7 !important;
    color: #15803d !important;
    border-color: #86efac !important;
}

.moon-license-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.moon-disabled-tip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #dc2626;
    font-size: 12px;
    font-weight: 500;
    background: rgba(220, 38, 38, .08);
    padding: 4px 10px;
    border-radius: 999px;
}

.moon-badge-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.moon-badge-status.is-on {
    background: #dcfce7;
    color: #166534;
}

.moon-badge-status.is-off {
    background: #fee2e2;
    color: #991b1b;
}

.moon-license-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.moon-license-refresh-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 5px !important;
}

.moon-license-disable-btn {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 5px !important;
 
}



.moon-license-enable-btn {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 5px !important;
   
}





.moon-license-delete-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 5px !important;
 

}



.moon-license-change-domain-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 5px !important;

}



/* 禁用状态的授权项视觉效果 */
.moon-license-item.is-disabled {
    opacity: .75;
    background: linear-gradient(180deg, #fff 0%, #fef2f2 100%);
    border-color: #fed7d7;
}

.moon-license-item.is-disabled .moon-license-domain {
    color: #9ca3af;
}

.moon-license-item.is-disabled .moon-auth-key-text {
    background: #fef2f2;
    border-color: #fecaca;
    color: #d1d5db;
}

/* 按钮悬停和点击效果 */
.moon-license-item-actions .but {
    font-size: 13px;
    padding: 8px 14px !important;
    transition: all .25s ease !important;
}



.moon-license-item-actions .but:active {
    transform: translateY(0);
}

/* 按钮加载状态 */
.moon-license-item-actions .but:disabled,
.moon-license-item-actions .but[disabled] {
    opacity: .6;
    cursor: not-allowed;
    transform: none !important;
}

/* 动画效果 */
@keyframes moonItemPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
    50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.15); }
}

.moon-license-item.is-updating {
    animation: moonItemPulse .6s ease-in-out;
}

#moon-license-add-btn {
    border-radius: 5px !important;
}

.moon-change-domain-box {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.moon-change-domain-box input {
    flex: 1;
    min-width: 220px;
}

.moon-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 13px;
    user-select: none;
}

/* 夜间模式：保留色彩层次，而不是完全丢颜色 */
.dark-theme .moon-product-tab {
    background: #2d3b53;
    border-color: #3d4f6e;
    color: #c7dcff;
}

.dark-theme .moon-product-tab:hover {
    background: #34435d;
    border-color: #5372a5;
}

.dark-theme .moon-product-tab.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border-color: #2563eb;
}

.dark-theme .moon-license-card {
    background: #323335;
    border-color: rgba(255,255,255,.08);
    box-shadow: none;
}

.dark-theme .moon-license-card .box-body + .box-body {
    border-top-color: rgba(255,255,255,.06);
}

.dark-theme .moon-license-title,
.dark-theme .moon-license-domain,
.dark-theme .moon-box-title,
.dark-theme .moon-stat-item strong {
    color: #f3f4f6;
}

.dark-theme .moon-license-desc,
.dark-theme .moon-stat-label,
.dark-theme .moon-inline-check {
    color: #b4b6bb;
}

.dark-theme .moon-stat-item {
    background: #2b2c2f;
    border-color: rgba(255,255,255,.06);
}

.dark-theme #moon-license-domain,
.dark-theme .moon-change-domain-input {
    background: #2a2b2e !important;
    border-color: rgba(255,255,255,.08) !important;
    color: #f3f4f6 !important;
}

.dark-theme .moon-license-item {
    background: linear-gradient(180deg, #2f3033 0%, #2a2b2e 100%);
    border-color: rgba(255,255,255,.07);
    box-shadow: none;
}

.dark-theme .moon-license-key code {
    background: #252629;
    border-color: rgba(255,255,255,.06);
    color: #e5e7eb;
}

.dark-theme .moon-copy-key-btn {
    background: rgba(59,130,246,.12) !important;
    color: #93c5fd !important;
    border-color: rgba(147,197,253,.26) !important;
}

.dark-theme .moon-copy-key-btn.copied {
    background: rgba(34,197,94,.14) !important;
    color: #86efac !important;
    border-color: rgba(134,239,172,.26) !important;
}

/* 夜间模式：禁用状态 */
.dark-theme .moon-license-item.is-disabled {
    opacity: .8;
    background: linear-gradient(180deg, #2a2b2e 0%, #252326 100%);
    border-color: rgba(239, 68, 68, .2);
}

.dark-theme .moon-license-item.is-disabled .moon-license-domain {
    color: #6b7280;
}

.dark-theme .moon-license-item.is-disabled .moon-auth-key-text {
    background: #252629;
    border-color: rgba(255,255,255,.06);
    color: #6b7280;
}

/* 夜间模式：按钮样式优化 */
.dark-theme .moon-license-disable-btn {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
}

.dark-theme .moon-license-enable-btn {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
}

.dark-theme .moon-license-delete-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  
}

.dark-theme .moon-license-refresh-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.dark-theme .moon-license-change-domain-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

/* 禁用状态徽章优化 */
.dark-theme .moon-badge-status.is-off {
    background: rgba(239, 68, 68, .15);
    color: #fca5a5;
}

@media (max-width: 768px) {
    .moon-license-item {
        flex-direction: column;
    }

    .moon-license-key-row {
        align-items: stretch;
    }

    .moon-license-item-actions {
        width: 100%;
    }
}







.moon-license-item {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 18px;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .03);
    flex-wrap: wrap;
    transition: all .3s ease;
    animation: fadeInUp .4s ease;
}.moon-change-domain-box {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
    align-items: center;
    padding: 14px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px dashed #e5e7eb;
}









.moon-replace-contact-list {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-top: 12px;
}

.moon-replace-contact-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.moon-replace-contact-qrcode img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
}

.moon-replace-contact-qrcode .px12 {
    margin-top: 6px;
    line-height: 1.4;
}

.moon-replace-auth-form .badg input[type="radio"] {
    margin-right: 4px;
}

.moon-replace-auth-result {
    min-height: 20px;
}

















/**
 * 未创建授权信息模块
 */
.moon-auth-empty-box {
    min-height: 260px;
    padding: 80px 20px 60px;
    text-align: center;
}

.moon-auth-empty-text {
    font-size: 15px;
    color: #8a8f99;
    margin-bottom: 38px;
}

.moon-add-auth-open-btn {
    background: #eaf4ff !important;
    color: #3b8eea !important;
    border: 0 !important;
    border-radius: 6px !important;
    padding-left: 46px !important;
    padding-right: 46px !important;
    font-size: 16px !important;
    font-weight: 600;
}

.moon-add-auth-open-btn:hover {
    background: #dbeafe !important;
    color: #2563eb !important;
}

.moon-auth-action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.moon-add-auth-modal-content input[name="domain"] {
    border-radius: 6px !important;
}

.dark-theme .moon-auth-empty-text {
    color: #b4b6bb;
}

.dark-theme .moon-add-auth-open-btn {
    background: rgba(59, 130, 246, .16) !important;
    color: #93c5fd !important;
}


