/* =============================================================
 *  NewZJI · WHMCS System Theme — main.css
 *  视觉对标 apps/zji（深蓝 #1e3543 + 橙 #e87820 + 圆角 2xl）
 *  设计令牌来自 ./tokens.css（由 design-tokens 同步），本文件只写布局 / 组件。
 *  字体：Plus Jakarta Sans（拉丁，已 link in head） + PingFang SC（中文，系统）
 * ============================================================= */

/* ---------- 全局基础 ---------- */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body.newzji-body {
    margin: 0;
    background: var(--color-surface-cream-light, #faf7f0);
    color: #475569;
    font-family: 'Plus Jakarta Sans', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

body.newzji-body a {
    color: inherit;
    text-decoration: none;
    transition: color 0.18s ease;
}

body.newzji-body a:hover {
    color: var(--color-accent-orange-dark, #c2691a);
}

body.newzji-body ::selection {
    background: var(--color-accent-orange, #e87820);
    color: #fff;
}

/* —— 干掉 twenty-one fallback 时残留的全屏遮罩，避免遮挡（警戒线 #3） —— */
#fullpage-overlay {
    display: none !important;
}

/* ---------- 布局容器 ---------- */
.container-x {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .container-x { padding-left: 24px; padding-right: 24px; }
}

@media (min-width: 1024px) {
    .container-x { padding-left: 32px; padding-right: 32px; }
}

/* ---------- 按钮 ---------- */
.nz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    user-select: none;
}

.nz-btn:focus-visible {
    outline: 2px solid var(--color-accent-orange, #e87820);
    outline-offset: 2px;
}

.nz-btn--primary {
    background: var(--color-accent-orange, #e87820);
    color: #fff;
    box-shadow: 0 2px 4px rgba(120, 53, 15, 0.18);
}

.nz-btn--primary:hover {
    background: var(--color-accent-orange-dark, #c2691a);
    color: #fff;
    box-shadow: 0 4px 12px rgba(120, 53, 15, 0.24);
    transform: translateY(-1px);
}

.nz-btn--secondary {
    background: #fff;
    color: var(--color-brand-800, #2a4554);
    border-color: #e7e5e4;
}

.nz-btn--secondary:hover {
    border-color: rgba(232, 120, 32, 0.6);
    color: var(--color-brand-900, #1e3543);
    box-shadow: 0 2px 6px rgba(30, 53, 67, 0.08);
}

.nz-btn--ghost {
    background: transparent;
    color: #475569;
}

.nz-btn--ghost:hover {
    background: #f5f5f4;
    color: var(--color-brand-800, #2a4554);
}

.nz-btn--lg {
    padding: 14px 28px;
    font-size: 15px;
    border-radius: 12px;
}

.nz-arrow {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.nz-btn--primary:hover .nz-arrow {
    transform: translateX(2px);
}

/* ---------- 卡片 ---------- */
.nz-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #f5f5f4;
    box-shadow: var(--shadow-card, 0 8px 24px -12px rgba(30, 53, 67, 0.18));
    padding: 24px;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.nz-card--hover:hover {
    box-shadow: var(--shadow-card-hover, 0 24px 48px -16px rgba(30, 53, 67, 0.28));
    border-color: rgba(232, 120, 32, 0.4);
    transform: translateY(-2px);
}

/* ---------- Logo ---------- */
.nz-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.nz-logo__mark {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3a5666 0%, #2a4554 50%, #14252f 100%);
    box-shadow: var(--shadow-glow, 0 30px 80px -30px rgba(232, 120, 32, 0.35)), inset 0 0 0 1px rgba(255,255,255,0.06);
    transition: transform 0.2s ease;
}

.nz-logo:hover .nz-logo__mark {
    transform: scale(1.04);
}

.nz-logo__letter {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.nz-logo__dot {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--color-accent-orange, #e87820);
    border: 2px solid rgba(255, 255, 255, 0.85);
}

.nz-logo__text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.nz-logo__name {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: var(--color-brand-900, #1e3543);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.nz-logo__sub {
    margin-top: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ---------- Header ---------- */
.nz-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.nz-header.is-scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(231, 229, 228, 0.7);
}

.nz-header__stripe {
    height: 4px;
    width: 100%;
    background: var(--gradient-top-stripe, linear-gradient(90deg, #f5a522 0%, #e87820 100%));
}

.nz-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 64px;
}

/* ---------- 导航 ---------- */
.nz-nav {
    display: none;
    align-items: center;
    gap: 4px;
    flex: 1 1 auto;
    justify-content: center;
}

@media (min-width: 1200px) {
    .nz-nav { display: flex; }
}

.nz-nav__item,
.nz-nav__trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.4;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nz-nav__item:hover,
.nz-nav__trigger:hover,
.nz-nav__group.is-open .nz-nav__trigger {
    color: var(--color-accent-orange, #e87820);
    background: #f5f5f4;
}

.nz-nav__group {
    position: relative;
}

.nz-nav__menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 280px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 32px -8px rgba(30, 53, 67, 0.18), 0 0 0 1px rgba(231, 229, 228, 0.7);
    padding: 8px;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 5;
}

.nz-nav__group.is-open .nz-nav__menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nz-nav__menu a {
    display: block;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    color: #475569;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nz-nav__menu a:hover {
    background: #faf7f0;
    color: var(--color-accent-orange-dark, #c2691a);
}

.nz-chev {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.6;
    transition: transform 0.18s ease;
}

.nz-nav__group.is-open .nz-chev,
.nz-account.is-open .nz-chev {
    transform: rotate(180deg);
}

.nz-ext-icon {
    font-size: 10px;
    opacity: 0.5;
    margin-left: 2px;
}

/* ---------- 客户中心按钮 / 账户下拉 ---------- */
.nz-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nz-account {
    position: relative;
    display: none;
}

@media (min-width: 1200px) {
    .nz-account { display: block; }
}

.nz-account__trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e7e5e4;
    cursor: pointer;
    font-family: inherit;
    color: var(--color-brand-800, #2a4554);
    font-weight: 600;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nz-account__trigger:hover,
.nz-account.is-open .nz-account__trigger {
    border-color: rgba(232, 120, 32, 0.6);
    box-shadow: 0 2px 6px rgba(30, 53, 67, 0.06);
}

.nz-account__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent-orange, #e87820) 0%, var(--color-accent-orange-light, #f5a522) 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1;
}

.nz-account__label {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nz-account__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 32px -8px rgba(30, 53, 67, 0.18), 0 0 0 1px rgba(231, 229, 228, 0.7);
    padding: 8px;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 5;
}

/* 透明伪元素填补 trigger 与 menu 之间 8px 视觉间隙,
   让鼠标穿越间隙时仍命中 group,避免 mouseleave 触发 close */
.nz-account__menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}

.nz-account.is-open .nz-account__menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nz-account__menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 14px;
    color: #475569;
}

.nz-account__menu a:hover {
    background: #faf7f0;
    color: var(--color-accent-orange-dark, #c2691a);
}

.nz-account__menu a i {
    color: #94a3b8;
    font-size: 13px;
}

.nz-account__sep {
    display: block;
    height: 1px;
    background: #f5f5f4;
    margin: 6px 8px;
}

.nz-account__logout {
    color: var(--color-accent-red, #c32547) !important;
}

.nz-account__logout i {
    color: var(--color-accent-red, #c32547) !important;
}

/* ---------- 移动端汉堡 + 面板 ---------- */
.nz-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    color: #475569;
    box-sizing: border-box;
}

.nz-burger:hover {
    background: #f5f5f4;
}

.nz-burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nz-burger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nz-burger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nz-burger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

@media (min-width: 1200px) {
    .nz-burger { display: none; }
}

.nz-mobile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 16px 20px;
    background: #fff;
    border-top: 1px solid #f5f5f4;
}

.nz-mobile[hidden] {
    display: none;
}

.nz-mobile > a,
.nz-mobile__group > summary {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    list-style: none;
}

.nz-mobile__group > summary::-webkit-details-marker {
    display: none;
}

.nz-mobile__group > summary::after {
    content: '';
    margin-left: auto;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.6;
    transition: transform 0.18s ease;
}

.nz-mobile__group[open] > summary::after {
    transform: rotate(180deg);
}

.nz-mobile > a:hover,
.nz-mobile__group > summary:hover {
    background: #f5f5f4;
    color: var(--color-accent-orange-dark, #c2691a);
}

.nz-mobile__group > a {
    display: flex;
    align-items: center;
    margin-left: 16px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    color: #64748b;
    border-left: 1px solid #e7e5e4;
}

.nz-mobile__group > a:hover {
    background: #faf7f0;
    color: var(--color-accent-orange-dark, #c2691a);
}

.nz-mobile__cta {
    margin-top: 12px;
}

/* ---------- 主体 ---------- */
.nz-main {
    padding: 28px 0 56px;
    min-height: 60vh;
}

.nz-main__row {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 992px) {
    .nz-main__row {
        flex-direction: row;
        align-items: flex-start;
    }
}

.nz-sidebar {
    flex: 0 0 auto;
    width: 100%;
}

@media (min-width: 992px) {
    .nz-sidebar { width: 280px; }
}

.nz-content {
    flex: 1 1 auto;
    min-width: 0;
}

/* ---------- Footer ---------- */
.nz-footer {
    position: relative;
    margin-top: 64px;
    background: linear-gradient(180deg, var(--color-brand-900, #1e3543) 0%, var(--color-brand-950, #14252f) 100%);
    color: #c7d4db;
}

.nz-footer__stripe {
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-top-stripe, linear-gradient(90deg, #f5a522 0%, #e87820 100%));
}

.nz-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-top: 24px;
    padding-bottom: 24px;
    text-align: center;
}

@media (min-width: 640px) {
    .nz-footer__inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        gap: 24px;
    }
}

.nz-footer__brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 20px;
}

@media (min-width: 640px) {
    .nz-footer__brand { justify-content: flex-start; }
}

.nz-logo__mark--footer {
    background: linear-gradient(135deg, #3a5666 0%, #2a4554 50%, #14252f 100%);
    box-shadow: var(--shadow-glow, 0 30px 80px -30px rgba(232, 120, 32, 0.35)), inset 0 0 0 1px rgba(255,255,255,0.1);
}

.nz-logo__mark--footer .nz-logo__dot {
    border-color: var(--color-brand-900, #1e3543);
}

.nz-footer__name {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nz-footer__name strong {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
}

.nz-footer__since {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #9eb6c0;
}

.nz-footer__copy {
    font-size: 12px;
    color: rgba(199, 212, 219, 0.7);
    white-space: nowrap;
}

.nz-footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    font-size: 12px;
}

.nz-footer__links a {
    color: rgba(199, 212, 219, 0.75);
    transition: color 0.15s ease;
}

.nz-footer__links a:hover {
    color: #fff;
}

/* ---------- 兜底首页 hero ---------- */
.nz-hero {
    padding: 56px 16px;
    background: linear-gradient(135deg, rgba(232,120,32,0.06) 0%, transparent 60%), #fff;
    border-radius: 24px;
    border: 1px solid #f5f5f4;
    box-shadow: var(--shadow-card, 0 8px 24px -12px rgba(30, 53, 67, 0.18));
    margin-bottom: 32px;
}

.nz-hero__inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.nz-hero__eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-accent-orange, #e87820);
    margin-bottom: 12px;
}

.nz-hero__title {
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: var(--color-brand-900, #1e3543);
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

.nz-hero__lead {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 28px;
}

.nz-hero__link {
    color: var(--color-accent-orange, #e87820);
    font-weight: 600;
}

.nz-hero__link:hover {
    color: var(--color-accent-orange-dark, #c2691a);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.nz-hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.nz-quicklinks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.nz-quicklink {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #f5f5f4;
    box-shadow: var(--shadow-card, 0 8px 24px -12px rgba(30, 53, 67, 0.18));
    text-align: center;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.nz-quicklink:hover {
    box-shadow: var(--shadow-card-hover, 0 24px 48px -16px rgba(30, 53, 67, 0.28));
    border-color: rgba(232, 120, 32, 0.4);
    transform: translateY(-2px);
}

.nz-quicklink__ico {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(232,120,32,0.12) 0%, rgba(245,165,34,0.12) 100%);
    color: var(--color-accent-orange, #e87820);
    font-size: 18px;
    margin-bottom: 12px;
}

.nz-quicklink__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-brand-900, #1e3543);
    margin-bottom: 4px;
}

.nz-quicklink__sub {
    font-size: 12px;
    color: #94a3b8;
}

/* =============================================================
 *  M2 + M3 组件:登录注册 / 用户资料 / 客户中心首页
 * ============================================================= */

/* ---------- 页面标题 ---------- */
.nz-page-title {
    margin-bottom: 24px;
}

.nz-page-title h1 {
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--color-brand-900, #1e3543);
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.nz-page-title__sub {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
}

/* ---------- 登录 / 注册容器(居中卡片) ---------- */
.nz-auth {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px 0;
}

.nz-auth--wide {
    display: block;
    max-width: 880px;
    margin: 0 auto;
    padding: 0;
}

.nz-auth__card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 18px;
    border: 1px solid #f5f5f4;
    box-shadow: var(--shadow-card, 0 8px 24px -12px rgba(30, 53, 67, 0.18));
    padding: 32px;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .nz-auth__card { padding: 24px 20px; border-radius: 14px; }
}

.nz-auth__head {
    margin-bottom: 24px;
}

.nz-auth__title {
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--color-brand-900, #1e3543);
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.nz-auth__sub {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
}

.nz-auth__foot {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f5f5f4;
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
}

.nz-auth__foot-text {
    margin-right: 4px;
}

/* ---------- 表单基础 ---------- */
.nz-form {
    width: 100%;
}

.nz-form-group {
    margin-bottom: 16px;
}

.nz-form-group--full {
    grid-column: 1 / -1;
}

.nz-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .nz-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.nz-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-brand-800, #2a4554);
    margin-bottom: 6px;
}

.nz-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 12px;
}

.nz-label-row .nz-label {
    margin-bottom: 0;
}

.nz-label__opt {
    font-weight: 400;
    color: #94a3b8;
    font-size: 12px;
}

.nz-input {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e7e5e4;
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    color: var(--color-brand-900, #1e3543);
    line-height: 1.4;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    appearance: none;
}

.nz-input::placeholder {
    color: #cbd5e1;
}

.nz-input:focus {
    outline: none;
    border-color: var(--color-accent-orange, #e87820);
    box-shadow: 0 0 0 3px rgba(232, 120, 32, 0.12);
}

.nz-input:disabled,
.nz-input[disabled] {
    background: #faf7f0;
    color: #94a3b8;
    cursor: not-allowed;
}

.nz-input--select {
    padding-right: 38px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.nz-input-group {
    position: relative;
    display: flex;
    align-items: stretch;
}

.nz-input-group__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    border: 1px solid #e7e5e4;
    border-right: none;
    background: #faf7f0;
    border-radius: 10px 0 0 10px;
    color: #94a3b8;
    font-size: 13px;
    flex-shrink: 0;
}

.nz-input-group .nz-input {
    border-radius: 0 10px 10px 0;
    flex: 1 1 auto;
    min-width: 0;
}

.nz-input-group .nz-input:focus {
    z-index: 1;
}

.nz-input-group__suffix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    border: 1px solid #e7e5e4;
    border-left: none;
    background: #fff;
    border-radius: 0 10px 10px 0;
    color: #64748b;
    cursor: pointer;
    flex-shrink: 0;
}

.nz-input-group__suffix:hover {
    color: var(--color-accent-orange-dark, #c2691a);
}

.nz-input-group .nz-input + .nz-input-group__suffix,
.nz-input-group__icon + .nz-input + .nz-input-group__suffix {
    border-radius: 0 10px 10px 0;
}

.nz-input-group__icon + .nz-input {
    border-radius: 0;
}

.nz-input-group__icon + .nz-input + .nz-input-group__suffix {
    border-radius: 0 10px 10px 0;
}

.nz-input-group--grow {
    flex: 1 1 auto;
}

.nz-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.nz-form-row-inline {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.nz-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.nz-form-submit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
}

.nz-form-tos {
    margin: 0 0 16px;
    text-align: center;
}

.nz-form-help {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #94a3b8;
}

.nz-customfield {
    /* WHMCS 注入的 customfield input 通常带 class="form-control" — 让它继承 nz-input 视觉 */
}

.nz-customfield input.form-control,
.nz-customfield select.form-control,
.nz-customfield textarea.form-control {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e7e5e4;
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    color: var(--color-brand-900, #1e3543);
    line-height: 1.4;
    box-sizing: border-box;
}

.nz-customfield input.form-control:focus,
.nz-customfield select.form-control:focus,
.nz-customfield textarea.form-control:focus {
    outline: none;
    border-color: var(--color-accent-orange, #e87820);
    box-shadow: 0 0 0 3px rgba(232, 120, 32, 0.12);
}

/* ---------- 复选框 / 单选 ---------- */
.nz-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.nz-checkbox input[type="checkbox"],
.nz-checkbox input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
    margin: 0;
}

.nz-checkbox input[type="radio"] {
    border-radius: 50%;
}

.nz-checkbox input[type="checkbox"]:checked {
    background: var(--color-accent-orange, #e87820) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'><path d='M2.5 6L5 8.5L9.5 4' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center no-repeat;
    border-color: var(--color-accent-orange, #e87820);
}

.nz-checkbox input[type="radio"]:checked {
    border: 5px solid var(--color-accent-orange, #e87820);
    background: #fff;
}

.nz-checkbox input:focus-visible {
    outline: 2px solid var(--color-accent-orange, #e87820);
    outline-offset: 2px;
}

/* ---------- 链接 ---------- */
.nz-link {
    color: var(--color-accent-orange-dark, #c2691a);
    text-decoration: none;
    transition: color 0.15s ease;
}

.nz-link:hover {
    color: var(--color-accent-orange, #e87820);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.nz-link--muted {
    color: #94a3b8;
    font-size: 13px;
}

.nz-link--muted:hover {
    color: var(--color-accent-orange-dark, #c2691a);
}

.nz-link--bold {
    font-weight: 700;
}

/* ---------- 提示框 ---------- */
.nz-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.55;
    margin-bottom: 16px;
}

.nz-alert > i {
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1.55;
}

.nz-alert--info {
    background: rgba(74, 142, 197, 0.12);
    border-color: rgba(74, 142, 197, 0.45);
    color: #1f5a83;
}

.nz-alert--success {
    background: rgba(141, 193, 66, 0.14);
    border-color: rgba(141, 193, 66, 0.45);
    color: #557823;
}

.nz-alert--warning {
    background: rgba(245, 165, 34, 0.14);
    border-color: rgba(245, 165, 34, 0.55);
    color: #a05512;
}

.nz-alert--error {
    background: rgba(195, 37, 71, 0.12);
    border-color: rgba(195, 37, 71, 0.45);
    color: #a01e3a;
}

/* ---------- 徽章 ---------- */
.nz-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.02em;
    vertical-align: middle;
}

.nz-badge--success {
    background: rgba(141, 193, 66, 0.15);
    color: var(--color-accent-green-dark, #6a962c);
}

.nz-badge--warning {
    background: rgba(245, 165, 34, 0.15);
    color: var(--color-accent-orange-dark, #c2691a);
}

.nz-badge--error {
    background: rgba(195, 37, 71, 0.15);
    color: var(--color-accent-red, #c32547);
}

.nz-badge--neutral {
    background: #f5f5f4;
    color: #64748b;
}

/* ---------- 卡片 form 变体 ---------- */
.nz-card--form {
    padding: 24px;
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .nz-card--form { padding: 28px; }
}

.nz-card__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--color-brand-900, #1e3543);
    margin: 0 0 18px;
    letter-spacing: -0.01em;
}

.nz-card__sub {
    font-size: 12px;
    font-weight: 400;
    color: #94a3b8;
    margin-left: 8px;
}

.nz-card__desc {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 14px;
    line-height: 1.6;
}

.nz-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ---------- 密码强度 meter(兼容 WHMCS PasswordStrength.js 注入的 BS progress) ---------- */
.nz-pw-meter {
    margin-top: 4px;
}

.nz-pw-meter__track,
.nz-pw-meter .progress {
    height: 6px;
    background: #f5f5f4;
    border-radius: 3px;
    overflow: hidden;
}

.nz-pw-meter__bar,
.nz-pw-meter .progress-bar {
    height: 100%;
    transition: width 0.25s ease, background-color 0.25s ease;
    background: var(--color-accent-orange, #e87820);
}

.nz-pw-meter__label {
    margin: 6px 0 0;
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
}

/* ---------- M3:欢迎条 ---------- */
.nz-welcome {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px 28px;
    background: linear-gradient(135deg, var(--color-brand-900, #1e3543) 0%, var(--color-brand-800, #2a4554) 100%);
    border-radius: 18px;
    color: #fff;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.nz-welcome::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(232, 120, 32, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

@media (min-width: 768px) {
    .nz-welcome {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
    }
}

.nz-welcome__text {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
}

.nz-welcome__title {
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}

.nz-welcome__sub {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.nz-welcome__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
}

.nz-welcome__actions .nz-btn--secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
}

.nz-welcome__actions .nz-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

/* ---------- M3:4 仪表盘 tile ---------- */
.nz-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .nz-tiles { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}

.nz-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 20px;
    background: #fff;
    border: 1px solid #f5f5f4;
    border-radius: 16px;
    box-shadow: var(--shadow-card, 0 8px 24px -12px rgba(30, 53, 67, 0.18));
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.nz-tile:hover {
    box-shadow: var(--shadow-card-hover, 0 24px 48px -16px rgba(30, 53, 67, 0.28));
    transform: translateY(-2px);
    border-color: rgba(232, 120, 32, 0.4);
}

.nz-tile__ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 15px;
    margin-bottom: 4px;
}

.nz-tile__stat {
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    font-size: 30px;
    font-weight: 800;
    color: var(--color-brand-900, #1e3543);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.nz-tile__label {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

.nz-tile__arrow {
    position: absolute;
    top: 18px;
    right: 18px;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    color: #cbd5e1;
    font-size: 12px;
}

.nz-tile:hover .nz-tile__arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--color-accent-orange, #e87820);
}

.nz-tile--blue .nz-tile__ico {
    background: rgba(74, 142, 197, 0.12);
    color: var(--color-accent-teal-dark, #2d6f9e);
}

.nz-tile--orange .nz-tile__ico {
    background: rgba(232, 120, 32, 0.14);
    color: var(--color-accent-orange-dark, #c2691a);
}

.nz-tile--red .nz-tile__ico {
    background: rgba(195, 37, 71, 0.12);
    color: var(--color-accent-red, #c32547);
}

.nz-tile--green .nz-tile__ico {
    background: rgba(141, 193, 66, 0.14);
    color: var(--color-accent-green-dark, #6a962c);
}

/* ---------- M3:panels(钩子兼容,套 nz 风格) ---------- */
.nz-panels {
    margin-top: 8px;
}

.nz-panels__cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 992px) {
    .nz-panels__cols { grid-template-columns: 1fr 1fr; }
}

.nz-panel {
    padding: 0;
    margin-bottom: 16px;
    overflow: hidden;
}

.nz-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid #f5f5f4;
}

.nz-panel__title {
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-brand-900, #1e3543);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}

.nz-panel__title i {
    color: var(--color-accent-orange, #e87820);
    font-size: 14px;
}

.nz-panel__body {
    padding: 16px 20px;
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
}

.nz-panel__list {
    padding: 4px 8px;
}

.nz-panel__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    color: #475569;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nz-panel__item:not(.nz-panel__item--text):hover {
    background: #faf7f0;
    color: var(--color-accent-orange-dark, #c2691a);
}

.nz-panel__item.is-current {
    background: rgba(232, 120, 32, 0.08);
    color: var(--color-accent-orange-dark, #c2691a);
    font-weight: 600;
}

.nz-panel__item-label {
    flex: 1 1 auto;
    min-width: 0;
}

.nz-panel__item i {
    color: #94a3b8;
    font-size: 12px;
    width: 16px;
    text-align: center;
}

/* —— servicesPanel JS 增强渲染样式
   WHMCS 8 内置 Active Products/Services panel children 是占位(menuItemName=0/1),
   newzji-chrome.js initServicesPanelEnhance 检测占位 → fetch services 页 → 替换 children 为下列结构 —— */
.nz-panel__item--service {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--color-brand-900, #1e3543);
    transition: background 0.15s ease;
}

.nz-panel__item--service:hover {
    background: rgba(232, 120, 32, 0.06);
}

.nz-panel__item--service.is-inactive {
    opacity: 0.55;
}

.nz-panel__item-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1 1 auto;
}

.nz-panel__item-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-brand-900, #1e3543);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nz-panel__item-domain {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
    color: #6b7280;
    background: #fafaf9;
    padding: 2px 7px;
    border-radius: 5px;
    align-self: flex-start;
}

.nz-panel__foot {
    padding: 12px 20px;
    border-top: 1px solid #f5f5f4;
    background: #faf7f0;
    font-size: 12.5px;
    color: #64748b;
}

/* ---------- panel 配色(WHMCS color 字段) ---------- */
.nz-panel--midnight-blue .nz-panel__title i { color: var(--color-accent-teal-dark, #2d6f9e); }
.nz-panel--asbestos .nz-panel__title i { color: #64748b; }
.nz-panel--sun-flower .nz-panel__title i { color: #d59f2c; }
.nz-panel--pomegranate .nz-panel__title i { color: var(--color-accent-red, #c32547); }
.nz-panel--teal .nz-panel__title i { color: var(--color-accent-teal, #4a8ec5); }
.nz-panel--green .nz-panel__title i { color: var(--color-accent-green-dark, #6a962c); }

/* ---------- 小按钮变体 ---------- */
.nz-btn--sm {
    padding: 6px 12px;
    font-size: 12.5px;
    border-radius: 8px;
}

/* ---------- addon 包裹 ---------- */
.nz-addon {
    margin-bottom: 16px;
}

/* =============================================================
 *  fallback 兼容:twenty-one fallback 出来的 BS class 视觉收敛
 *  原 M1 末尾的覆盖块,扩展到 alert/form-control/badge 等
 * ============================================================= */

.nz-content .card,
.nz-content .panel {
    border-radius: 14px;
    border-color: #f5f5f4;
}

.nz-content .btn-primary {
    background-color: var(--color-accent-orange, #e87820);
    border-color: var(--color-accent-orange, #e87820);
}

.nz-content .btn-primary:hover {
    background-color: var(--color-accent-orange-dark, #c2691a);
    border-color: var(--color-accent-orange-dark, #c2691a);
}

.nz-content .btn-default {
    background-color: #fff;
    border-color: #e7e5e4;
    color: var(--color-brand-800, #2a4554);
}

.nz-content .btn-default:hover {
    border-color: rgba(232, 120, 32, 0.6);
    color: var(--color-brand-900, #1e3543);
}

/* —— fallback 链接/标题:仅针对没有 nz-* class 的元素,避免覆盖我们自己的组件
   (2026-05-25 实测教训:.nz-content h1 优先级 0,1,1 比 .nz-welcome__title 的 0,1,0 高,
    会强制把欢迎条白色标题刷回深蓝看不清。加 :not([class*="nz-"]) 限定仅作用于 BS fallback 内容) —— */

.nz-content a:not([class*="nz-"]) {
    color: var(--color-accent-orange-dark, #c2691a);
}

.nz-content h1:not([class*="nz-"]),
.nz-content h2:not([class*="nz-"]),
.nz-content h3:not([class*="nz-"]),
.nz-content h4:not([class*="nz-"]) {
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    color: var(--color-brand-900, #1e3543);
    letter-spacing: -0.01em;
}

/* form-control fallback */
.nz-content .form-control,
.nz-content .form-control:focus {
    border-radius: 10px;
    border-color: #e7e5e4;
    box-shadow: none;
}

.nz-content .form-control:focus {
    border-color: var(--color-accent-orange, #e87820);
    box-shadow: 0 0 0 3px rgba(232, 120, 32, 0.12);
}

/* alert fallback */
.nz-content .alert {
    border-radius: 10px;
    border: 1px solid;
}

.nz-content .alert-info {
    background: rgba(74, 142, 197, 0.08);
    border-color: rgba(74, 142, 197, 0.3);
    color: var(--color-accent-teal-dark, #2d6f9e);
}

.nz-content .alert-success {
    background: rgba(141, 193, 66, 0.1);
    border-color: rgba(141, 193, 66, 0.3);
    color: var(--color-accent-green-dark, #6a962c);
}

.nz-content .alert-warning {
    background: rgba(245, 165, 34, 0.1);
    border-color: rgba(245, 165, 34, 0.35);
    color: var(--color-accent-orange-dark, #c2691a);
}

.nz-content .alert-danger {
    background: rgba(195, 37, 71, 0.08);
    border-color: rgba(195, 37, 71, 0.3);
    color: var(--color-accent-red, #c32547);
}

/* label fallback */
.nz-content .label {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.nz-content .label-default { background: #f5f5f4; color: #64748b; }
.nz-content .label-success { background: rgba(141, 193, 66, 0.15); color: var(--color-accent-green-dark, #6a962c); }
.nz-content .label-warning { background: rgba(245, 165, 34, 0.15); color: var(--color-accent-orange-dark, #c2691a); }
.nz-content .label-danger { background: rgba(195, 37, 71, 0.15); color: var(--color-accent-red, #c32547); }

/* table fallback(后续模块用) */
.nz-content .table {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #f5f5f4;
}

.nz-content .table thead th {
    background: #faf7f0;
    color: var(--color-brand-800, #2a4554);
    font-weight: 700;
    font-size: 13px;
    border-bottom: 1px solid #f5f5f4;
}

.nz-content .table td,
.nz-content .table th {
    border-color: #f5f5f4;
}

/* =============================================================
 *  M4 组件:表格 / 状态徽章 / sidebar / invoice 独立页 / addfunds
 * ============================================================= */

/* ---------- 表格 ---------- */
.nz-table-card {
    padding: 0;
    overflow: hidden;
    margin-bottom: 16px;
}

.nz-table-card .nz-card__title {
    padding: 18px 24px 0;
    margin: 0 0 16px;
}

.nz-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nz-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.nz-table__th {
    background: #faf7f0;
    color: var(--color-brand-800, #2a4554);
    font-weight: 700;
    font-size: 12.5px;
    text-align: left;
    padding: 12px 16px;
    border-top: 1px solid #f5f5f4;
    border-bottom: 1px solid #f5f5f4;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.nz-table__th--right { text-align: right; }
.nz-table__th--center { text-align: center; }

.nz-table__row {
    transition: background-color 0.15s ease;
}

.nz-table__row:hover {
    background: rgba(232, 120, 32, 0.04);
}

.nz-table__row.is-unpaid {
    background: rgba(232, 120, 32, 0.05);
}

.nz-table__td {
    padding: 14px 16px;
    border-bottom: 1px solid #f5f5f4;
    color: #475569;
    vertical-align: middle;
}

.nz-table__td--right { text-align: right; }
.nz-table__td--center { text-align: center; }
.nz-table__td--muted { color: #94a3b8; font-size: 13px; }
.nz-table__td--strong { font-weight: 700; color: var(--color-brand-900, #1e3543); }
.nz-table__td--mono {
    font-family: 'SF Mono', Menlo, Monaco, Consolas, 'Courier New', monospace;
    font-size: 12.5px;
    letter-spacing: -0.01em;
}

.nz-table__link {
    color: var(--color-accent-orange-dark, #c2691a);
    font-weight: 700;
}

.nz-table__link:hover {
    color: var(--color-accent-orange, #e87820);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.nz-table__totalrow {
    background: #faf7f0;
}

.nz-table__totalrow .nz-table__td {
    border-bottom: 1px solid #f5f5f4;
    color: var(--color-brand-800, #2a4554);
    font-weight: 600;
}

.nz-table__totalrow--final .nz-table__td {
    background: var(--color-brand-900, #1e3543);
    color: #fff;
    font-size: 15px;
    padding-top: 16px;
    padding-bottom: 16px;
    border-bottom: none;
}

.nz-table tr:last-child .nz-table__td {
    border-bottom: none;
}

.nz-tax-mark {
    color: var(--color-accent-orange, #e87820);
    font-weight: 700;
}

/* ---------- 状态徽章 ---------- */
.nz-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1.4;
}

.nz-status--lg {
    padding: 8px 22px;
    font-size: 14px;
    letter-spacing: 0.04em;
}

/* 已付 — 绿 */
.nz-status--paid {
    background: rgba(141, 193, 66, 0.15);
    color: var(--color-accent-green-dark, #6a962c);
}

/* 未付 — 橙 */
.nz-status--unpaid {
    background: rgba(232, 120, 32, 0.15);
    color: var(--color-accent-orange-dark, #c2691a);
}

/* 逾期 — 红 */
.nz-status--overdue {
    background: rgba(195, 37, 71, 0.15);
    color: var(--color-accent-red, #c32547);
}

/* 已取消 — 灰 */
.nz-status--cancelled {
    background: #f5f5f4;
    color: #64748b;
}

/* 退款 — 蓝 */
.nz-status--refunded {
    background: rgba(74, 142, 197, 0.15);
    color: var(--color-accent-teal-dark, #2d6f9e);
}

/* 催收 — 深 */
.nz-status--collections {
    background: rgba(20, 37, 47, 0.85);
    color: #fff;
}

/* 待审核 — 浅橙 */
.nz-status--paymentpending {
    background: rgba(245, 165, 34, 0.15);
    color: var(--color-accent-orange-dark, #c2691a);
}

/* 草稿 — 浅灰 */
.nz-status--draft {
    background: #f5f5f4;
    color: #94a3b8;
}

/* ---------- 空状态 ---------- */
.nz-empty {
    text-align: center;
    padding: 56px 24px;
    color: #94a3b8;
}

.nz-empty__ico {
    font-size: 40px;
    color: #cbd5e1;
    margin-bottom: 12px;
}

.nz-empty__text {
    font-size: 14px;
    margin: 0;
}

/* ---------- sidebar(M3 用 + M4 起客户中心通用) ---------- */
.nz-sidebar {
    flex: 0 0 280px;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (max-width: 991px) {
    .nz-sidebar { width: 100%; flex: 0 0 auto; }
}

.nz-sidebar-card {
    padding: 0;
    overflow: hidden;
}

.nz-sidebar-card__head {
    padding: 14px 18px;
    border-bottom: 1px solid #f5f5f4;
}

.nz-sidebar-card__title {
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--color-brand-900, #1e3543);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.005em;
}

.nz-sidebar-card__title i {
    color: var(--color-accent-orange, #e87820);
    font-size: 13px;
}

.nz-sidebar-card__body {
    padding: 14px 18px;
    font-size: 13px;
    color: #64748b;
}

.nz-sidebar-card__list {
    padding: 6px 8px;
}

.nz-sidebar-card__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    color: #475569;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nz-sidebar-card__item:not(.nz-sidebar-card__item--text):not(.is-disabled):hover {
    background: #faf7f0;
    color: var(--color-accent-orange-dark, #c2691a);
}

.nz-sidebar-card__item.is-current {
    background: rgba(232, 120, 32, 0.1);
    color: var(--color-accent-orange-dark, #c2691a);
    font-weight: 600;
}

.nz-sidebar-card__item.is-current .nz-sidebar-card__ico {
    color: var(--color-accent-orange, #e87820);
}

.nz-sidebar-card__item.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nz-sidebar-card__ico {
    color: #94a3b8;
    font-size: 13px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.nz-sidebar-card__label {
    flex: 1 1 auto;
    min-width: 0;
}

.nz-sidebar-card__foot {
    padding: 12px 18px;
    border-top: 1px solid #f5f5f4;
    background: #faf7f0;
    font-size: 12.5px;
    color: #64748b;
}

/* ---------- viewinvoice 独立页 ---------- */
.newzji-invoice-page {
    background: var(--color-surface-cream-light, #faf7f0);
    padding: 24px 12px;
}

.nz-invoice {
    max-width: 880px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nz-invoice__head {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--shadow-card, 0 8px 24px -12px rgba(30, 53, 67, 0.18));
    border: 1px solid #f5f5f4;
}

@media (min-width: 640px) {
    .nz-invoice__head {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 28px 32px;
    }
}

.nz-invoice__brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nz-invoice__logo {
    height: 44px;
    width: auto;
}

.nz-invoice__brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nz-invoice__title {
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--color-brand-900, #1e3543);
    margin: 0;
    letter-spacing: -0.015em;
}

.nz-invoice__company {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
    letter-spacing: 0.02em;
}

.nz-invoice__status-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

@media (min-width: 640px) {
    .nz-invoice__status-block { align-items: flex-end; }
}

.nz-invoice__due-date {
    font-size: 12.5px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nz-invoice__due-date strong {
    color: var(--color-brand-900, #1e3543);
}

.nz-invoice__pay {
    padding: 24px;
}

.nz-invoice__pay-form {
    margin-bottom: 14px;
}

.nz-invoice__pay-method {
    margin: 0 0 14px;
    color: #475569;
    font-size: 14px;
}

.nz-invoice__pay-btn {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nz-invoice__pay-btn .btn,
.nz-invoice__pay-btn button,
.nz-invoice__pay-btn input[type="submit"] {
    /* WHMCS 注入的支付按钮 — 强制套品牌橙 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: var(--color-accent-orange, #e87820);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(120, 53, 15, 0.18);
    transition: all 0.2s ease;
    font-family: inherit;
}

.nz-invoice__pay-btn .btn:hover,
.nz-invoice__pay-btn button:hover,
.nz-invoice__pay-btn input[type="submit"]:hover {
    background: var(--color-accent-orange-dark, #c2691a);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(120, 53, 15, 0.24);
}

.nz-invoice__credit {
    padding: 24px;
}

.nz-invoice__parties {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px;
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--shadow-card, 0 8px 24px -12px rgba(30, 53, 67, 0.18));
    border: 1px solid #f5f5f4;
}

@media (min-width: 640px) {
    .nz-invoice__parties { grid-template-columns: 1fr 1fr; padding: 28px 32px; }
}

.nz-invoice__party-label {
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: var(--color-accent-orange, #e87820);
    text-transform: uppercase;
    margin: 0 0 8px;
}

.nz-invoice__address {
    font-style: normal;
    font-size: 13.5px;
    color: var(--color-brand-900, #1e3543);
    line-height: 1.7;
    margin: 0;
}

.nz-invoice__meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px 24px;
    background: #faf7f0;
    border-radius: 12px;
    border: 1px solid #f5f5f4;
}

@media (min-width: 640px) {
    .nz-invoice__meta { grid-template-columns: 1fr 1fr; padding: 18px 28px; }
}

.nz-invoice__meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nz-invoice__meta-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.nz-invoice__meta-value {
    font-size: 14px;
    color: var(--color-brand-900, #1e3543);
    font-weight: 600;
}

.nz-invoice__items-title {
    padding: 18px 24px 0;
}

.nz-invoice__tax-note {
    padding: 0 24px 18px;
    margin: 0;
    font-size: 12.5px;
    color: #94a3b8;
}

.nz-invoice__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 0 8px;
}

.nz-invoice__actions-right {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ---------- 充值页 ---------- */
.nz-addfunds {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 640px;
    margin: 0 auto;
}

.nz-addfunds__limits {
    padding: 22px 24px;
}

.nz-addfunds__limits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 480px) {
    .nz-addfunds__limits-grid { grid-template-columns: 1fr; gap: 8px; }
}

.nz-addfunds__limit {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    background: #faf7f0;
    border-radius: 10px;
    text-align: center;
}

.nz-addfunds__limit-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.nz-addfunds__limit-value {
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    font-size: 17px;
    font-weight: 800;
    color: var(--color-brand-900, #1e3543);
}

.nz-addfunds__form-card {
    padding: 28px;
}

.nz-addfunds__notice {
    margin-top: 14px;
    color: #94a3b8;
    font-size: 12.5px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.5;
}

/* ---------- 兼容辅助 class ---------- */
.d-print-none { /* 占位,实际逻辑在 @media print */ }

/* ---------- 打印样式(viewinvoice) ---------- */
@media print {
    body.newzji-body,
    body.newzji-invoice-page {
        background: #fff !important;
        padding: 0 !important;
    }

    .d-print-none,
    .nz-header,
    .nz-footer,
    .nz-mobile,
    .nz-burger,
    .nz-actions,
    .nz-invoice__pay-btn,
    .nz-invoice__actions {
        display: none !important;
    }

    .nz-invoice {
        max-width: 100% !important;
        padding: 0 !important;
        gap: 12px;
    }

    .nz-invoice__head,
    .nz-card,
    .nz-invoice__parties {
        box-shadow: none !important;
        border: 1px solid #e7e5e4 !important;
        page-break-inside: avoid;
    }

    .nz-table__totalrow--final .nz-table__td {
        background: #1e3543 !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .nz-status {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

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

    a[href]:after {
        content: '';
    }
}

/* =============================================================
 *  M5 组件:工单 / 公告 / 知识库
 * ============================================================= */

/* ---------- 标题行(含操作按钮) ---------- */
.nz-page-title__row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

@media (min-width: 640px) {
    .nz-page-title__row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }
}

/* ---------- 步骤指示器(submit ticket) ---------- */
.nz-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 0 4px;
    flex-wrap: wrap;
}

.nz-stepper__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f5f5f4;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.nz-stepper__item.is-active {
    background: var(--color-accent-orange, #e87820);
    color: #fff;
}

.nz-stepper__item.is-done {
    background: var(--color-accent-green, #8dc142);
    color: #fff;
}

.nz-stepper__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    font-size: 12px;
    font-weight: 800;
}

.nz-stepper__item:not(.is-active):not(.is-done) .nz-stepper__num {
    background: #fff;
    color: #94a3b8;
}

.nz-stepper__sep {
    flex: 0 0 24px;
    height: 2px;
    background: #f5f5f4;
    border-radius: 2px;
}

.nz-stepper__sep.is-done {
    background: var(--color-accent-green, #8dc142);
}

@media (max-width: 480px) {
    .nz-stepper__sep { flex: 0 0 16px; }
    .nz-stepper__label { display: none; }
}

/* ---------- 部门选择卡(stepone) ---------- */
.nz-dept-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    text-decoration: none;
}

.nz-dept-card__ico {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(232, 120, 32, 0.12) 0%, rgba(245, 165, 34, 0.12) 100%);
    color: var(--color-accent-orange, #e87820);
    font-size: 18px;
}

.nz-dept-card__body {
    flex: 1 1 auto;
    min-width: 0;
}

.nz-dept-card__name {
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-brand-900, #1e3543);
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}

.nz-dept-card__desc {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.5;
}

.nz-dept-card__arrow {
    flex-shrink: 0;
    color: #cbd5e1;
    font-size: 14px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.nz-dept-card:hover .nz-dept-card__arrow {
    color: var(--color-accent-orange, #e87820);
    transform: translateX(4px);
}

/* ---------- 部门徽章(list 列表) ---------- */
.nz-dept-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: #faf7f0;
    color: var(--color-brand-800, #2a4554);
    border: 1px solid #f5f5f4;
}

/* ---------- 工单列表链接 ---------- */
.nz-ticket-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
}

.nz-ticket-link__num {
    font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace;
    font-size: 12.5px;
    color: #94a3b8;
    background: #f5f5f4;
    padding: 2px 7px;
    border-radius: 5px;
    flex-shrink: 0;
}

.nz-ticket-link__subject {
    font-size: 14px;
    color: var(--color-brand-900, #1e3543);
}

.nz-ticket-link__subject.is-unread {
    font-weight: 700;
}

.nz-ticket-link__dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-accent-orange, #e87820);
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(232, 120, 32, 0.2);
}

.nz-table__row.is-unread {
    background: rgba(232, 120, 32, 0.04);
}

/* ---------- 工单提交成功卡 ---------- */
.nz-ticket-confirm {
    text-align: center;
    padding: 40px 24px;
}

.nz-ticket-confirm__ico {
    margin-bottom: 16px;
    color: var(--color-accent-green, #8dc142);
    font-size: 56px;
}

.nz-ticket-confirm__title {
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--color-brand-900, #1e3543);
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}

.nz-ticket-confirm__num {
    margin: 0 0 10px;
    font-size: 15px;
    color: #475569;
}

.nz-ticket-confirm__desc {
    margin: 0 auto 24px;
    max-width: 560px;
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
}

/* ---------- 工单详情:头部 ---------- */
.nz-ticket-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--color-brand-900, #1e3543) 0%, var(--color-brand-800, #2a4554) 100%);
    border-radius: 16px;
    color: #fff;
    margin-bottom: 16px;
}

@media (min-width: 640px) {
    .nz-ticket-head {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
        padding: 22px 28px;
    }
}

.nz-ticket-head__main {
    display: flex;
    align-items: baseline;
    gap: 14px;
    min-width: 0;
}

.nz-ticket-head__id {
    font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    flex-shrink: 0;
}

.nz-ticket-head__subject {
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: -0.01em;
    word-break: break-word;
}

.nz-ticket-head__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.nz-ticket-head__actions .nz-btn--secondary {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.nz-ticket-head__actions .nz-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

/* ---------- 工单时间线 ---------- */
.nz-ticket-thread {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

.nz-ticket-msg {
    display: flex;
    gap: 12px;
    padding: 0;
}

@media (max-width: 480px) {
    .nz-ticket-msg { gap: 8px; }
}

.nz-ticket-msg__avatar {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 15px;
}

.nz-ticket-msg.is-staff .nz-ticket-msg__avatar {
    background: linear-gradient(135deg, var(--color-accent-orange, #e87820) 0%, var(--color-accent-orange-light, #f5a522) 100%);
    color: #fff;
}

.nz-ticket-msg.is-client .nz-ticket-msg__avatar {
    background: linear-gradient(135deg, var(--color-brand-700, #3a5666) 0%, var(--color-brand-800, #2a4554) 100%);
    color: #fff;
}

.nz-ticket-msg__body {
    flex: 1 1 auto;
    min-width: 0;
    background: #fff;
    border: 1px solid #f5f5f4;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-card, 0 8px 24px -12px rgba(30, 53, 67, 0.18));
}

.nz-ticket-msg.is-staff .nz-ticket-msg__body {
    border-left: 3px solid var(--color-accent-orange, #e87820);
}

.nz-ticket-msg__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: #faf7f0;
    border-bottom: 1px solid #f5f5f4;
    font-size: 13px;
}

.nz-ticket-msg__author {
    font-weight: 700;
    color: var(--color-brand-900, #1e3543);
}

.nz-ticket-msg__role {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.nz-ticket-msg__role--staff,
.nz-ticket-msg__role--admin,
.nz-ticket-msg__role--operator {
    background: rgba(232, 120, 32, 0.15);
    color: var(--color-accent-orange-dark, #c2691a);
}

.nz-ticket-msg__role--client,
.nz-ticket-msg__role--user {
    background: rgba(74, 142, 197, 0.15);
    color: var(--color-accent-teal-dark, #2d6f9e);
}

.nz-ticket-msg__date {
    margin-left: auto;
    color: #94a3b8;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 480px) {
    .nz-ticket-msg__date { margin-left: 0; width: 100%; }
}

.nz-ticket-msg__content {
    padding: 16px 18px;
    color: #475569;
    line-height: 1.7;
    word-break: break-word;
}

.nz-ticket-msg__ip {
    padding: 8px 18px 12px;
    font-size: 12px;
    color: #94a3b8;
    border-top: 1px dashed #f5f5f4;
}

.nz-ticket-msg__ip code {
    background: #f5f5f4;
    padding: 1px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace;
    font-size: 11.5px;
    color: var(--color-brand-800, #2a4554);
}

/* 附件 */
.nz-ticket-msg__attachments {
    padding: 12px 18px;
    border-top: 1px solid #f5f5f4;
    background: #faf7f0;
}

.nz-ticket-msg__attachments-title {
    margin: 0 0 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--color-brand-800, #2a4554);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.nz-ticket-attach-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.nz-attach-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e7e5e4;
    border-radius: 8px;
    font-size: 12.5px;
    color: var(--color-brand-800, #2a4554);
    text-decoration: none;
    transition: all 0.15s ease;
}

.nz-attach-item:hover {
    border-color: var(--color-accent-orange, #e87820);
    color: var(--color-accent-orange-dark, #c2691a);
}

.nz-attach-item__dl {
    color: #cbd5e1;
    font-size: 11px;
}

.nz-attach-item:hover .nz-attach-item__dl {
    color: var(--color-accent-orange, #e87820);
}

.nz-attach-item.is-removed {
    opacity: 0.5;
    color: var(--color-accent-red, #c32547);
    border-color: rgba(195, 37, 71, 0.3);
    background: rgba(195, 37, 71, 0.05);
    cursor: not-allowed;
}

/* 评分 */
.nz-ticket-msg__rate {
    padding: 12px 18px;
    border-top: 1px solid #f5f5f4;
}

.nz-rate {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.nz-rate__hint {
    margin-right: 8px;
    font-size: 12.5px;
    color: #64748b;
}

.nz-rate__star {
    cursor: pointer;
    color: #cbd5e1;
    transition: color 0.15s ease;
    font-size: 16px;
}

.nz-rate__star:hover,
.nz-rate__star.is-active,
.nz-rate__star.active {
    color: var(--color-accent-orange-light, #f5a522);
}

.nz-rate__star.is-active i,
.nz-rate__star.active i {
    font-weight: 900;
}

.nz-rate__label {
    margin-left: 8px;
    font-size: 12.5px;
    color: var(--color-accent-green-dark, #6a962c);
    font-weight: 600;
}

/* ---------- 工单底部操作栏(viewticket / kb / announce 共用) ---------- */
.nz-ticket-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
}

/* ---------- 附件输入(submit / reply) ---------- */
.nz-attachments {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nz-attachment-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nz-input--file {
    padding: 8px 12px;
    cursor: pointer;
}

.nz-input--file::-webkit-file-upload-button {
    margin-right: 12px;
    padding: 4px 12px;
    border: 1px solid #e7e5e4;
    border-radius: 6px;
    background: #fff;
    color: var(--color-brand-800, #2a4554);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.nz-input--file::-webkit-file-upload-button:hover {
    background: #faf7f0;
    border-color: rgba(232, 120, 32, 0.5);
}

.nz-textarea {
    min-height: 200px;
    resize: vertical;
    line-height: 1.6;
}

/* ---------- captcha 容器 ---------- */
.nz-form-captcha {
    text-align: center;
    padding: 20px 24px;
}

/* ---------- 大输入框(KB 搜索等) ---------- */
.nz-input-group--lg .nz-input-group__icon {
    width: 48px;
    font-size: 15px;
}

.nz-input-group--lg .nz-input {
    padding: 14px 16px;
    font-size: 15px;
}

.nz-input-group--lg .nz-btn {
    padding: 14px 24px;
    border-radius: 0 10px 10px 0;
}

/* ---------- danger 按钮(关闭工单) ---------- */
.nz-btn--danger {
    background: var(--color-accent-red, #c32547);
    color: #fff;
    border-color: var(--color-accent-red, #c32547);
}

.nz-btn--danger:hover {
    background: var(--color-accent-red-dark, #9b132c);
    border-color: var(--color-accent-red-dark, #9b132c);
    color: #fff;
}

/* ---------- 公告列表 ---------- */
.nz-announce-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

.nz-announce {
    padding: 22px 24px;
}

.nz-announce__meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: #94a3b8;
    margin-bottom: 10px;
}

.nz-announce__title {
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 12px;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.nz-announce__title a {
    color: var(--color-brand-900, #1e3543);
    transition: color 0.15s ease;
}

.nz-announce__title a:hover {
    color: var(--color-accent-orange-dark, #c2691a);
}

.nz-announce__excerpt {
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 14px;
}

.nz-announce__cta { /* uses nz-btn--secondary */ }

/* 公告详情 */
.nz-announce-detail {
    padding: 28px 32px;
    margin-bottom: 16px;
}

@media (max-width: 480px) {
    .nz-announce-detail { padding: 22px 20px; }
}

.nz-announce-detail__head {
    border-bottom: 1px solid #f5f5f4;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.nz-announce-detail__title {
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--color-brand-900, #1e3543);
    margin: 0 0 12px;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.nz-announce-detail__meta {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: #94a3b8;
}

.nz-announce-detail__meta li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nz-announce-detail__body {
    color: #475569;
    font-size: 15px;
    line-height: 1.8;
}

/* 公告空状态 */
.nz-empty-card {
    padding: 0;
}

/* 分页 */
.nz-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    margin: 20px 0 8px;
}

.nz-pagination__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #f5f5f4;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-brand-800, #2a4554);
    transition: all 0.15s ease;
}

.nz-pagination__item:hover:not(.is-disabled):not(.is-active) {
    border-color: var(--color-accent-orange, #e87820);
    color: var(--color-accent-orange-dark, #c2691a);
}

.nz-pagination__item.is-active {
    background: var(--color-accent-orange, #e87820);
    border-color: var(--color-accent-orange, #e87820);
    color: #fff;
}

.nz-pagination__item.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---------- 知识库 ---------- */
.nz-kb-search {
    margin-bottom: 24px;
}

.nz-kb-cats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .nz-kb-cats { grid-template-columns: 1fr 1fr; }
}

.nz-kb-cat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    text-decoration: none;
}

.nz-kb-cat__ico {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(232, 120, 32, 0.12) 0%, rgba(245, 165, 34, 0.12) 100%);
    color: var(--color-accent-orange, #e87820);
    font-size: 18px;
}

.nz-kb-cat__body {
    flex: 1 1 auto;
    min-width: 0;
}

.nz-kb-cat__name {
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-brand-900, #1e3543);
    margin: 0 0 3px;
    letter-spacing: -0.01em;
}

.nz-kb-cat__desc {
    margin: 0;
    font-size: 12.5px;
    color: #94a3b8;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nz-kb-cat__count {
    flex-shrink: 0;
}

.nz-kb-popular {
    padding: 0;
    margin-bottom: 16px;
    overflow: hidden;
}

.nz-kb-popular__head {
    padding: 16px 22px;
    border-bottom: 1px solid #f5f5f4;
}

.nz-kb-popular__title {
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-brand-900, #1e3543);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}

.nz-kb-popular__title i {
    color: var(--color-accent-orange, #e87820);
}

.nz-kb-popular__list {
    display: flex;
    flex-direction: column;
}

.nz-kb-article-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    border-bottom: 1px solid #f5f5f4;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.nz-kb-article-item:last-child {
    border-bottom: none;
}

.nz-kb-article-item:hover {
    background: #faf7f0;
}

.nz-kb-article-item__ico {
    flex-shrink: 0;
    color: #94a3b8;
    font-size: 14px;
}

.nz-kb-article-item__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nz-kb-article-item__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-brand-900, #1e3543);
}

.nz-kb-article-item:hover .nz-kb-article-item__title {
    color: var(--color-accent-orange-dark, #c2691a);
}

.nz-kb-article-item__excerpt {
    font-size: 12.5px;
    color: #94a3b8;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.nz-kb-article-item__arrow {
    color: #cbd5e1;
    font-size: 11px;
    transition: transform 0.2s ease;
}

.nz-kb-article-item:hover .nz-kb-article-item__arrow {
    color: var(--color-accent-orange, #e87820);
    transform: translateX(2px);
}

/* KB 文章 */
.nz-kb-article {
    padding: 28px 32px;
    margin-bottom: 16px;
}

@media (max-width: 480px) {
    .nz-kb-article { padding: 22px 20px; }
}

.nz-kb-article__head {
    border-bottom: 1px solid #f5f5f4;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.nz-kb-article__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--color-brand-900, #1e3543);
    margin: 0 0 12px;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.nz-kb-article__print {
    font-size: 12.5px;
}

.nz-kb-article__meta {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    font-size: 13px;
    color: #94a3b8;
}

.nz-kb-article__useful {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nz-kb-article__body {
    color: #475569;
    font-size: 15px;
    line-height: 1.85;
}

.nz-kb-article__rate {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #f5f5f4;
    text-align: center;
}

.nz-kb-article__rate-q {
    margin: 0 0 12px;
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-brand-900, #1e3543);
}

.nz-kb-article__rate-form {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* KB 建议(submit 内嵌) */
.nz-kb-suggestions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.nz-kb-suggestions__title {
    margin: 0 0 6px;
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-brand-900, #1e3543);
    display: flex;
    align-items: center;
    gap: 6px;
}

.nz-kb-suggestions__title i {
    color: var(--color-accent-orange-light, #f5a522);
}

.nz-kb-suggestions__desc {
    margin: 0 0 10px;
    font-size: 12.5px;
    color: #94a3b8;
}

.nz-kb-suggestion {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #f5f5f4;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.nz-kb-suggestion:hover {
    border-color: rgba(232, 120, 32, 0.5);
    background: #faf7f0;
}

.nz-kb-suggestion__ico {
    color: #94a3b8;
    font-size: 13px;
    flex-shrink: 0;
}

.nz-kb-suggestion__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nz-kb-suggestion__title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-brand-900, #1e3543);
}

.nz-kb-suggestion__excerpt {
    font-size: 12px;
    color: #94a3b8;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.nz-kb-suggestion__ext {
    color: #cbd5e1;
    font-size: 11px;
    flex-shrink: 0;
}

/* 空状态扩展(M4 已有,这里补 CTA) */
.nz-empty__cta {
    margin-top: 14px;
}

/* ---------- markdown-content 文章正文排版(M5 announce + KB + ticket message) ---------- */
.markdown-content {
    color: #475569;
    line-height: 1.8;
    word-break: break-word;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
    font-family: 'Plus Jakarta Sans', 'PingFang SC', sans-serif;
    color: var(--color-brand-900, #1e3543);
    letter-spacing: -0.01em;
    margin: 1.5em 0 0.6em;
    line-height: 1.4;
}

.markdown-content h1 { font-size: 22px; font-weight: 800; }
.markdown-content h2 { font-size: 19px; font-weight: 700; }
.markdown-content h3 { font-size: 16px; font-weight: 700; }
.markdown-content h4 { font-size: 14px; font-weight: 700; }

.markdown-content p {
    margin: 0 0 1em;
}

.markdown-content a {
    color: var(--color-accent-orange-dark, #c2691a);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.markdown-content a:hover {
    color: var(--color-accent-orange, #e87820);
}

.markdown-content ul,
.markdown-content ol {
    margin: 0 0 1em;
    padding-left: 1.5em;
}

.markdown-content li {
    margin-bottom: 0.4em;
}

.markdown-content strong,
.markdown-content b {
    color: var(--color-brand-900, #1e3543);
    font-weight: 700;
}

.markdown-content em,
.markdown-content i {
    font-style: italic;
}

.markdown-content code {
    background: #f5f5f4;
    color: var(--color-brand-800, #2a4554);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
}

.markdown-content pre {
    background: var(--color-brand-950, #14252f);
    color: #e3eaee;
    padding: 14px 18px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 1em 0;
    font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
}

.markdown-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.markdown-content blockquote {
    border-left: 3px solid var(--color-accent-orange, #e87820);
    background: #faf7f0;
    padding: 12px 16px;
    margin: 1em 0;
    border-radius: 0 8px 8px 0;
    color: #64748b;
    font-style: italic;
}

.markdown-content blockquote p:last-child {
    margin-bottom: 0;
}

.markdown-content hr {
    border: 0;
    border-top: 1px solid #f5f5f4;
    margin: 1.5em 0;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1em 0;
}

.markdown-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
    font-size: 13.5px;
}

.markdown-content table th,
.markdown-content table td {
    border: 1px solid #f5f5f4;
    padding: 8px 12px;
    text-align: left;
}

.markdown-content table th {
    background: #faf7f0;
    color: var(--color-brand-800, #2a4554);
    font-weight: 700;
}

/* ============================================================
   M6 · 服务管理 + 客户档案
   ============================================================ */

/* ---------- 服务状态徽章扩展 ---------- */
/* 沿用 M4 的 .nz-status / .nz-status--lg 基类,这里补服务状态变体 */
.nz-status--active {
    background: rgba(141, 193, 66, 0.15);
    color: var(--color-accent-green-dark, #6a962c);
}

.nz-status--pending {
    background: rgba(245, 165, 34, 0.15);
    color: var(--color-accent-orange-dark, #c2691a);
}

.nz-status--suspended {
    background: rgba(195, 37, 71, 0.15);
    color: var(--color-accent-red, #c32547);
}

.nz-status--terminated {
    background: #f5f5f4;
    color: #64748b;
}

.nz-status--fraud {
    background: rgba(195, 37, 71, 0.2);
    color: var(--color-accent-red, #c32547);
}

.nz-status--completed {
    background: rgba(74, 142, 197, 0.15);
    color: var(--color-accent-teal-dark, #2d6f9e);
}

/* ---------- 服务列表 ---------- */
.nz-svc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .nz-svc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .nz-svc-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.nz-svc-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #f5f5f4;
    border-radius: 16px;
    padding: 20px 22px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.nz-svc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border-color: rgba(232, 120, 32, 0.4);
    color: inherit;
}

.nz-svc-card.is-inactive {
    opacity: 0.78;
}

.nz-svc-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.nz-svc-card__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-brand-900, #1e3543);
    line-height: 1.35;
    min-width: 0;
}

.nz-svc-card__title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.nz-svc-card__ico {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(232, 120, 32, 0.12);
    color: var(--color-accent-orange, #e87820);
    border-radius: 10px;
    font-size: 14px;
}

.nz-svc-card__body {
    flex: 1;
    margin-bottom: 14px;
}

.nz-svc-card__domain {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 13.5px;
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nz-svc-card__domain i {
    color: var(--color-brand-700, #355466);
    font-size: 12px;
    flex-shrink: 0;
}

.nz-svc-card__meta {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nz-svc-card__meta-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 13px;
}

.nz-svc-card__meta-row dt {
    color: #94a3b8;
    font-weight: 500;
    margin: 0;
}

.nz-svc-card__meta-row dd {
    margin: 0;
    color: var(--color-brand-800, #2a4554);
    font-weight: 600;
    text-align: right;
}

.nz-svc-card__meta-row dd strong {
    color: var(--color-brand-900, #1e3543);
    font-weight: 700;
}

.nz-svc-card__cycle {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 400;
}

.nz-svc-card__foot {
    padding-top: 14px;
    border-top: 1px solid #f5f5f4;
}

.nz-svc-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-accent-orange, #e87820);
    font-weight: 600;
    font-size: 13px;
    transition: gap 0.15s ease;
}

.nz-svc-card:hover .nz-svc-card__link {
    gap: 10px;
}

/* ---------- 服务详情 hero ---------- */
.nz-product-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, var(--color-brand-900, #1e3543) 0%, var(--color-brand-700, #355466) 100%);
    color: #fff;
    border-radius: 18px;
    padding: 28px 32px;
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
}

.nz-product-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent-orange, #e87820) 0%, #f5a522 100%);
}

.nz-product-hero__main {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1 1 320px;
    min-width: 0;
}

.nz-product-hero__ico {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(232, 120, 32, 0.2);
    color: var(--color-accent-orange, #e87820);
    border-radius: 14px;
    font-size: 22px;
}

.nz-product-hero__text {
    min-width: 0;
}

.nz-product-hero__group {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.nz-product-hero__title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.nz-product-hero__domain {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13.5px;
}

.nz-product-hero__domain span {
    color: rgba(255, 255, 255, 0.85);
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    letter-spacing: 0.02em;
}

.nz-product-hero__side {
    flex-shrink: 0;
}

.nz-product-hero__side .nz-status--lg {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    backdrop-filter: blur(4px);
}

/* hero 状态变色（在白底卡片状态对比强烈的基础上,hero 内反白处理） */
.nz-product-hero--active .nz-product-hero__side .nz-status--lg {
    background: rgba(141, 193, 66, 0.4);
}

.nz-product-hero--suspended .nz-product-hero__side .nz-status--lg,
.nz-product-hero--fraud .nz-product-hero__side .nz-status--lg {
    background: rgba(195, 37, 71, 0.45);
}

.nz-product-hero--pending .nz-product-hero__side .nz-status--lg {
    background: rgba(245, 165, 34, 0.45);
}

.nz-product-hero--terminated .nz-product-hero__side .nz-status--lg,
.nz-product-hero--cancelled .nz-product-hero__side .nz-status--lg {
    background: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.7);
}

/* ---------- 服务详情 操作 + 钩子插槽 ---------- */
.nz-product-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #fff;
    border: 1px solid #f5f5f4;
    border-radius: 16px;
    padding: 20px 22px;
    margin-bottom: 18px;
}

.nz-product-actions__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nz-product-actions__buttons .nz-btn {
    flex: 1 1 auto;
    min-width: 140px;
    justify-content: center;
}

@media (max-width: 640px) {
    .nz-product-actions__buttons .nz-btn {
        flex-basis: 100%;
    }
}

/* —— 续费插槽 —— */
.nz-renewal-slot {
    border-top: 1px dashed #f5f5f4;
    padding-top: 14px;
}

.nz-renewal-fallback {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid #f5f5f4;
}

.nz-renewal-fallback__label {
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
}

.nz-renewal-fallback__value {
    color: var(--color-brand-900, #1e3543);
    font-weight: 700;
    font-size: 14px;
}

.nz-renewal-fallback__hint {
    color: #94a3b8;
    font-size: 12px;
    margin-left: auto;
}

@media (max-width: 640px) {
    .nz-renewal-fallback__hint {
        margin-left: 0;
        flex-basis: 100%;
    }
}

/* —— 备注插槽 —— */
.nz-notes-slot {
    display: flex;
    justify-content: flex-end;
}

.nz-notes-trigger {
    color: #64748b;
}

/* ---------- 详情 section（信息卡 / Tabs 替代） ---------- */
.nz-product-section {
    margin-bottom: 18px;
    padding: 22px 24px;
}

.nz-product-section__foot {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nz-product-hookout {
    margin-bottom: 18px;
}

.nz-product-module {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #f5f5f4;
}

/* ---------- 信息列表（dt / dd） ---------- */
.nz-info-list {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nz-info-list--compact .nz-info-row {
    padding: 6px 0;
    font-size: 13px;
}

.nz-info-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 2fr;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f4;
    align-items: baseline;
}

.nz-info-row:last-child {
    border-bottom: none;
}

.nz-info-row dt {
    color: #64748b;
    font-weight: 500;
    font-size: 13.5px;
    margin: 0;
}

.nz-info-row dd {
    margin: 0;
    color: var(--color-brand-900, #1e3543);
    font-weight: 500;
    word-break: break-word;
}

.nz-info-row dd code {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 13px;
    color: var(--color-brand-800, #2a4554);
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.nz-info-row--warning {
    background: rgba(245, 165, 34, 0.06);
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    border-radius: 8px;
    border-bottom-color: transparent;
}

.nz-info-row--warning dd {
    color: var(--color-accent-orange-dark, #c2691a);
}

.nz-info-row__hint {
    color: #94a3b8;
    font-size: 12px;
}

@media (max-width: 640px) {
    .nz-info-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .nz-info-row dt {
        font-size: 12px;
    }
}

/* ---------- 资源用量条 ---------- */
.nz-resource-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

@media (min-width: 640px) {
    .nz-resource-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.nz-resource-item {
    background: #fafafa;
    border: 1px solid #f5f5f4;
    border-radius: 12px;
    padding: 18px 20px;
}

.nz-resource-item__title {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--color-brand-800, #2a4554);
    font-weight: 600;
}

.nz-meter {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nz-meter__bar {
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.nz-meter__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent-orange, #e87820) 0%, #f5a522 100%);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.nz-meter[data-value="0"] .nz-meter__fill,
.nz-meter[data-value=""] .nz-meter__fill {
    background: #cbd5e1;
}

.nz-meter__text {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
}

.nz-meter__text strong {
    font-size: 18px;
    color: var(--color-brand-900, #1e3543);
    font-weight: 700;
}

.nz-meter__detail {
    color: #64748b;
    font-size: 12.5px;
}

.nz-resource-foot {
    margin: 16px 0 0;
    color: #94a3b8;
    font-size: 12px;
    text-align: right;
}

/* ---------- 下载列表 ---------- */
.nz-download-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nz-download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    background: #fafafa;
    border: 1px solid #f5f5f4;
    border-radius: 12px;
}

.nz-download-item__text {
    flex: 1;
    min-width: 0;
}

.nz-download-item__title {
    margin: 0 0 4px;
    font-size: 14px;
    color: var(--color-brand-900, #1e3543);
    font-weight: 600;
}

.nz-download-item__desc {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

@media (max-width: 640px) {
    .nz-download-item {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ---------- 附加产品 ---------- */
.nz-addon-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 768px) {
    .nz-addon-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.nz-addon-card {
    background: #fafafa;
    border: 1px solid #f5f5f4;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.nz-addon-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #f5f5f4;
}

.nz-addon-card__name {
    font-weight: 700;
    color: var(--color-brand-900, #1e3543);
    font-size: 14px;
}

.nz-addon-card__body {
    padding: 14px 16px;
    flex: 1;
}

.nz-addon-card__pricing {
    font-size: 13px;
    color: var(--color-brand-800, #2a4554);
    margin-bottom: 10px;
}

.nz-addon-card__foot {
    padding: 12px 16px;
    border-top: 1px solid #f5f5f4;
    background: #fff;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ---------- 客户档案专属 ---------- */
.nz-customfield {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 收敛 customfield 内 WHMCS 渲染的 BS form 控件 */
.nz-customfield input[type="text"],
.nz-customfield input[type="email"],
.nz-customfield input[type="tel"],
.nz-customfield input[type="number"],
.nz-customfield select,
.nz-customfield textarea {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: var(--color-brand-900, #1e3543);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nz-customfield textarea {
    height: auto;
    min-height: 88px;
    padding: 12px 14px;
    line-height: 1.6;
    resize: vertical;
}

.nz-customfield input:focus,
.nz-customfield select:focus,
.nz-customfield textarea:focus {
    outline: none;
    border-color: var(--color-accent-orange, #e87820);
    box-shadow: 0 0 0 3px rgba(232, 120, 32, 0.12);
}

.nz-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nz-checkbox-list .nz-checkbox {
    align-items: center;
}

/* ---------- 按钮变体补充 ---------- */
.nz-btn--success {
    background: var(--color-accent-green-dark, #6a962c);
    color: #fff;
    border: 1px solid var(--color-accent-green-dark, #6a962c);
}

.nz-btn--success:hover {
    background: #557823;
    border-color: #557823;
    color: #fff;
}

.nz-btn.is-disabled,
.nz-btn[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---------- Alert 变体补充 ---------- */
.nz-alert--with-action {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.nz-alert--with-action .nz-alert__body {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 200px;
}

.nz-alert--inline {
    margin-top: 14px;
}

/* warning alert 内的主按钮：琥珀黄底 + 深蓝字，在浅黄 alert 中比橙色更醒目 */
.nz-alert--warning .nz-btn--primary,
.nz-alert--warning .nz-btn--primary:focus {
    background: #fbbf24;
    color: var(--color-brand-900, #1e3543);
    box-shadow: 0 2px 4px rgba(180, 83, 9, 0.18);
}

.nz-alert--warning .nz-btn--primary:hover {
    background: #f59e0b;
    color: var(--color-brand-900, #1e3543);
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.28);
    transform: translateY(-1px);
}

/* ============================================================
   M7 · 中国本地化（ICP 条 / QQ 客服浮窗 / KYC banner / 未实名徽章）
   ============================================================ */

/* ---------- header 账户菜单未实名徽章 ---------- */
.nz-account__avatar {
    position: relative;
}

.nz-account__alert-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-accent-red, #c32547);
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(195, 37, 71, 0.3);
    animation: nz-pulse 2s infinite;
}

@keyframes nz-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(195, 37, 71, 0.6); }
    50% { box-shadow: 0 0 0 5px rgba(195, 37, 71, 0); }
}

.nz-account__kyc {
    color: var(--color-accent-orange-dark, #c2691a) !important;
    background: rgba(245, 165, 34, 0.06);
    font-weight: 600;
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.nz-account__kyc:hover {
    background: rgba(245, 165, 34, 0.12) !important;
}

.nz-account__kyc-badge {
    margin-left: auto;
    font-size: 10px;
    padding: 2px 8px;
}

/* ---------- 客户中心 KYC banner ---------- */
.nz-kyc-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(245, 165, 34, 0.08) 0%, rgba(232, 120, 32, 0.04) 100%);
    border: 1px solid rgba(232, 120, 32, 0.25);
    border-left: 4px solid var(--color-accent-orange, #e87820);
    border-radius: 14px;
    margin-bottom: 20px;
}

.nz-kyc-banner__ico {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(232, 120, 32, 0.15);
    color: var(--color-accent-orange, #e87820);
    font-size: 22px;
}

.nz-kyc-banner__text {
    flex: 1;
    min-width: 0;
}

.nz-kyc-banner__title {
    margin: 0 0 4px;
    font-size: 16px;
    color: var(--color-brand-900, #1e3543);
    font-weight: 700;
}

.nz-kyc-banner__desc {
    margin: 0;
    color: #64748b;
    font-size: 13.5px;
    line-height: 1.6;
}

.nz-kyc-banner__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.nz-kyc-banner__more {
    font-size: 12px;
}

@media (max-width: 768px) {
    .nz-kyc-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .nz-kyc-banner__ico {
        margin: 0 auto;
    }
    .nz-kyc-banner__actions {
        align-items: stretch;
    }
}

/* ---------- QQ 客服浮窗 ---------- */
.nz-qq-widget {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9000;
    font-family: inherit;
}

@media (min-width: 768px) {
    .nz-qq-widget {
        right: 24px;
        bottom: 24px;
    }
}

.nz-qq-widget__trigger {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent-orange, #e87820) 0%, #f5a522 100%);
    color: #fff;
    border: none;
    box-shadow: 0 8px 24px rgba(232, 120, 32, 0.35), 0 2px 6px rgba(15, 23, 42, 0.12);
    cursor: pointer;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nz-qq-widget__trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(232, 120, 32, 0.4), 0 4px 10px rgba(15, 23, 42, 0.16);
}

.nz-qq-widget__trigger:focus-visible {
    outline: 3px solid rgba(232, 120, 32, 0.4);
    outline-offset: 3px;
}

.nz-qq-widget[data-nz-qq-open] .nz-qq-widget__trigger {
    transform: scale(0.92);
    opacity: 0.7;
}

.nz-qq-widget__panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    width: 296px;
    max-width: calc(100vw - 36px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.08);
    border: 1px solid #f5f5f4;
    padding: 20px;
    transform-origin: bottom right;
    animation: nz-qq-pop 0.2s ease;
}

@keyframes nz-qq-pop {
    from { transform: scale(0.88) translateY(8px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.nz-qq-widget__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.nz-qq-widget__close:hover {
    background: #f5f5f4;
    color: var(--color-brand-900, #1e3543);
}

.nz-qq-widget__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-right: 24px;
}

.nz-qq-widget__icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(232, 120, 32, 0.12);
    color: var(--color-accent-orange, #e87820);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.nz-qq-widget__title {
    margin: 0 0 2px;
    font-size: 15px;
    color: var(--color-brand-900, #1e3543);
    font-weight: 700;
}

.nz-qq-widget__sub {
    margin: 0;
    color: #94a3b8;
    font-size: 12px;
}

.nz-qq-widget__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.nz-qq-widget__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #fafafa;
    border: 1px solid #f5f5f4;
    border-radius: 10px;
}

.nz-qq-widget__label {
    color: #64748b;
    font-size: 12px;
    flex-shrink: 0;
}

.nz-qq-widget__qq {
    flex: 1;
    font-size: 17px;
    color: var(--color-brand-900, #1e3543);
    font-weight: 800;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    letter-spacing: 0.02em;
}

.nz-qq-widget__copy {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nz-qq-widget__copy:hover {
    background: var(--color-accent-orange, #e87820);
    border-color: var(--color-accent-orange, #e87820);
    color: #fff;
}

.nz-qq-widget__copy.is-copied {
    background: var(--color-accent-green-dark, #6a962c);
    border-color: var(--color-accent-green-dark, #6a962c);
    color: #fff;
}

.nz-qq-widget__cta {
    width: 100%;
    justify-content: center;
}

.nz-qq-widget__tip {
    margin: 0;
    padding: 8px 12px;
    background: #fafafa;
    border-radius: 8px;
    color: #94a3b8;
    font-size: 11.5px;
    line-height: 1.5;
}

/* 打印时隐藏 QQ 浮窗 */
@media print {
    .nz-qq-widget {
        display: none !important;
    }
}

/* ============================================================
   M9 · 推广联盟（affiliates / affiliatessignup）
   ============================================================ */

/* ---------- 注册引导卡片 ---------- */
.nz-affiliate-intro {
    padding: 36px 32px;
    max-width: 720px;
    margin: 0 auto;
}

.nz-affiliate-intro__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.nz-affiliate-intro__ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(232, 120, 32, 0.12);
    color: var(--color-accent-orange, #e87820);
    font-size: 20px;
}

.nz-affiliate-intro__title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--color-brand-900, #1e3543);
}

.nz-affiliate-intro__lead {
    font-size: 15px;
    line-height: 1.65;
    color: #4b5563;
    margin: 0 0 18px;
}

.nz-affiliate-intro__list {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nz-affiliate-intro__list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--color-brand-800, #2a4554);
    font-size: 14px;
}

.nz-affiliate-intro__list li i {
    color: var(--color-accent-green, #8dc142);
    margin-top: 4px;
}

.nz-affiliate-intro__actions {
    text-align: center;
    margin: 0;
}

/* ---------- 统计卡片(3 列响应式) ---------- */
.nz-affiliate-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 640px) {
    .nz-affiliate-stats { grid-template-columns: 1fr; }
}

.nz-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #f5f5f4;
    box-shadow: var(--shadow-card, 0 8px 24px -12px rgba(30, 53, 67, 0.18));
}

.nz-stat-card__ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 20px;
    flex-shrink: 0;
}

.nz-stat-card__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.nz-stat-card__num {
    font-size: 26px;
    font-weight: 800;
    color: var(--color-brand-900, #1e3543);
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.1;
}

.nz-stat-card__label {
    font-size: 13px;
    color: #6b7280;
}

.nz-stat-card--blue .nz-stat-card__ico { background: rgba(74, 142, 197, 0.12); color: var(--color-accent-teal, #4a8ec5); }
.nz-stat-card--orange .nz-stat-card__ico { background: rgba(232, 120, 32, 0.12); color: var(--color-accent-orange, #e87820); }
.nz-stat-card--green .nz-stat-card__ico { background: rgba(141, 193, 66, 0.14); color: var(--color-accent-green-dark, #6a962c); }

/* ---------- 推广链接行 ---------- */
.nz-affiliate-link__row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

@media (max-width: 640px) {
    .nz-affiliate-link__row { flex-direction: column; }
}

.nz-affiliate-link__input {
    flex: 1 1 auto;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 13px;
    color: var(--color-brand-800, #2a4554);
    background: #fafaf9;
    cursor: text;
}

.nz-affiliate-link__input:focus {
    background: #fff;
}

.nz-affiliate-link__copy {
    flex-shrink: 0;
    white-space: nowrap;
}

.nz-affiliate-link__copy-done { display: none; }

.nz-affiliate-link__copy.is-copied {
    background: var(--color-accent-green, #8dc142);
    color: #fff;
}

.nz-affiliate-link__copy.is-copied .nz-affiliate-link__copy-label { display: none; }
.nz-affiliate-link__copy.is-copied .nz-affiliate-link__copy-done { display: inline; }

/* ---------- 佣金汇总 ---------- */
.nz-info-row--highlight {
    background: rgba(232, 120, 32, 0.04);
    margin: 0 -12px;
    padding: 0 12px;
    border-radius: 8px;
}

.nz-affiliate-balance__avail {
    color: var(--color-accent-orange, #e87820);
    font-size: 18px;
    font-weight: 800;
}

.nz-affiliate-balance__actions {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #f5f5f4;
    text-align: center;
}

.nz-affiliate-balance__hint {
    margin: 12px 0 0;
    font-size: 13px;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nz-affiliate-balance__hint i {
    color: var(--color-accent-orange, #e87820);
}

/* ---------- 推介列表空状态扩展 ---------- */
.nz-empty__hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #9ca3af;
}

/* ---------- 推广素材容器 ---------- */
.nz-affiliate-banners__body {
    padding: 12px;
    background: #fafaf9;
    border-radius: 10px;
    text-align: center;
    overflow-x: auto;
}

.nz-affiliate-banners__body img,
.nz-affiliate-banners__body textarea {
    max-width: 100%;
}

/* ============================================================
   M10 · 联系人 / 子帐户 / 邮件存档 / 邮件查看
   ============================================================ */

/* ---------- 顶部联系人切换条 ---------- */
.nz-contact-picker {
    margin-bottom: 16px;
    background: rgba(74, 142, 197, 0.06);
    border: 1px solid rgba(74, 142, 197, 0.18);
}

.nz-contact-picker__form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.nz-contact-picker__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-brand-800, #2a4554);
    flex-shrink: 0;
}

.nz-contact-picker__select {
    flex: 1 1 240px;
    min-width: 0;
}

/* ---------- 跨行表单字段 ---------- */
.nz-form-group--full {
    grid-column: 1 / -1;
}

/* ---------- 原生 <dialog> 弹窗 ---------- */
.nz-dialog {
    border: none;
    border-radius: 16px;
    padding: 0;
    background: #fff;
    box-shadow: 0 24px 64px -16px rgba(30, 53, 67, 0.32), 0 0 0 1px rgba(231, 229, 228, 0.6);
    max-width: 440px;
    width: calc(100% - 32px);
    color: var(--color-brand-900, #1e3543);
}

.nz-dialog::backdrop {
    background: rgba(20, 37, 47, 0.55);
    backdrop-filter: blur(2px);
}

.nz-dialog__content {
    display: flex;
    flex-direction: column;
}

.nz-dialog__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px 14px;
    border-bottom: 1px solid #f5f5f4;
}

.nz-dialog__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.nz-dialog__title i {
    color: var(--color-accent-red, #c32547);
}

.nz-dialog__close {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: #94a3b8;
    padding: 4px 10px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.nz-dialog__close:hover {
    background: #f5f5f4;
    color: var(--color-brand-900, #1e3543);
}

.nz-dialog__body {
    padding: 18px 22px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-brand-800, #2a4554);
}

.nz-dialog__body p { margin: 0; }

.nz-dialog__foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px 18px;
    border-top: 1px solid #f5f5f4;
    background: #fafaf9;
    border-radius: 0 0 16px 16px;
}

/* ---------- 通用 .nz-table 在裸 <th>/<td> 上的兜底样式
   (M5 用 .nz-table__th BEM,新写的 emails/users/contacts 直接 th/td;此处兜底)
   ---------- */
.nz-table thead th {
    background: #faf7f0;
    color: var(--color-brand-800, #2a4554);
    font-weight: 700;
    font-size: 12.5px;
    text-align: left;
    padding: 14px 18px;
    border-bottom: 2px solid #f0e6d2;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.nz-table tbody tr {
    transition: background-color 0.15s ease;
}

.nz-table tbody tr:hover {
    background: rgba(232, 120, 32, 0.04);
}

.nz-table tbody td {
    padding: 16px 18px;
    border-bottom: 1px solid #f5f5f4;
    color: #475569;
    vertical-align: middle;
    font-size: 14px;
}

.nz-table tbody tr:last-child td {
    border-bottom: none;
}

/* ---------- 邮件存档列表辅助类 ---------- */
.nz-table__actions-col {
    text-align: right;
    width: 1%;
    white-space: nowrap;
}

/* 旧 .nz-table__date 兼容(早期版本用过) */
.nz-table__date {
    white-space: nowrap;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12.5px;
    color: #4b5563;
}

.nz-email-attach-ico {
    margin-left: 8px;
    color: #94a3b8;
    font-size: 12px;
}

/* ---------- .nz-table--emails:邮件存档专属 ---------- */
.nz-table--emails {
    table-layout: fixed;
}

.nz-table--emails .nz-table__col--date {
    width: 200px;
}

.nz-table--emails .nz-table__actions-col {
    width: 140px;
}

.nz-table--emails .nz-email-row__date {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12.5px;
    color: #6b7280;
    white-space: nowrap;
    position: relative;
}

.nz-table--emails .nz-email-row__date::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-radius: 50%;
    background: var(--color-accent-orange, #e87820);
    opacity: 0.5;
}

.nz-table--emails .nz-email-row__date {
    padding-left: 36px;
}

.nz-table--emails .nz-email-row__subject {
    padding-right: 24px;
}

.nz-table--emails .nz-email-row__title {
    color: var(--color-brand-900, #1e3543);
    font-weight: 500;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.nz-table--emails .nz-email-row__view {
    gap: 6px;
}

@media (max-width: 800px) {
    .nz-table--emails {
        table-layout: auto;
    }
    .nz-table--emails .nz-table__col--date {
        width: auto;
    }
    .nz-table--emails .nz-email-row__date {
        padding-left: 18px;
    }
    .nz-table--emails .nz-email-row__date::before { display: none; }
    .nz-table--emails .nz-email-row__view span { display: none; }
}

/* ---------- viewemail 独立完整 HTML 页(popup) ---------- */
.nz-viewemail-body {
    margin: 0;
    background: #f5f5f4;
    font-family: 'Plus Jakarta Sans', 'PingFang SC', system-ui, sans-serif;
    color: var(--color-brand-900, #1e3543);
    padding: 16px;
    min-height: 100vh;
}

.nz-viewemail {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px -12px rgba(30, 53, 67, 0.18);
    overflow: hidden;
}

.nz-viewemail__head {
    padding: 18px 22px;
    background: linear-gradient(135deg, var(--color-brand-900, #1e3543) 0%, var(--color-brand-950, #14252f) 100%);
    color: #fff;
}

.nz-viewemail__title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nz-viewemail__title i {
    color: var(--color-accent-orange, #e87820);
}

.nz-viewemail__attachments {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 12.5px;
}

.nz-viewemail__attachments-label {
    color: rgba(255, 255, 255, 0.7);
    margin-right: 4px;
}

.nz-viewemail__attachment {
    background: rgba(255, 255, 255, 0.12);
    padding: 4px 10px;
    border-radius: 99px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.95);
}

.nz-viewemail__body {
    padding: 16px;
    background: #fff;
}

.nz-viewemail__iframe {
    width: 100%;
    height: 480px;
    border: 1px solid #e7e5e4;
    border-radius: 8px;
    background: #fff;
}

.nz-viewemail__foot {
    padding: 14px 22px 18px;
    text-align: right;
    border-top: 1px solid #f5f5f4;
    background: #fafaf9;
}

@media (max-width: 640px) {
    .nz-viewemail-body { padding: 0; }
    .nz-viewemail { border-radius: 0; }
    .nz-viewemail__iframe { height: 360px; }
}

/* ============================================================
   M11 · 用户管理（account-user-management / -permissions）
   ============================================================ */

/* ---------- 用户列表行 ---------- */
.nz-user-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.nz-user-row__email {
    font-weight: 600;
    color: var(--color-brand-900, #1e3543);
    word-break: break-all;
}

.nz-user-row__2fa {
    font-size: 13px;
    transition: color 0.15s ease;
}

.nz-user-row__2fa.is-on { color: var(--color-accent-green-dark, #6a962c); }
.nz-user-row__2fa.is-off { color: #cbd5e1; }

.nz-user-row__meta {
    margin-top: 6px;
    font-size: 12.5px;
    color: #6b7280;
}

.nz-user-row__divider td {
    background: #fafaf9;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--color-brand-800, #2a4554);
    border-top: 1px solid #f5f5f4;
    border-bottom: 1px solid #f5f5f4;
}

.nz-user-row__resend {
    display: inline;
    margin: 0;
}

/* ---------- card 辅助文字 ---------- */
.nz-card__lead {
    font-size: 14px;
    color: #4b5563;
    margin: 0 0 16px;
    line-height: 1.6;
}

.nz-card__footnote {
    margin: 16px 0 0;
    font-size: 12.5px;
    color: #94a3b8;
    line-height: 1.6;
}

/* ---------- 邀请表单:权限模式切换 ---------- */
.nz-invite-form__mode {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 14px 0;
    padding: 12px 14px;
    background: #fafaf9;
    border-radius: 10px;
}

.nz-radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-brand-800, #2a4554);
    user-select: none;
}

.nz-radio input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-accent-orange, #e87820);
    cursor: pointer;
}

/* ---------- 权限列表(邀请 + 编辑共用) ---------- */
.nz-invite-form__perms {
    margin: 0 0 18px;
    padding: 14px 16px;
    background: #fffaf3;
    border: 1px dashed rgba(232, 120, 32, 0.32);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nz-invite-form__perms[hidden] { display: none !important; }

.nz-checkbox-list--perms {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 24px;
}

.nz-checkbox--perm {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #f5f5f4;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.nz-checkbox--perm:hover {
    border-color: rgba(232, 120, 32, 0.4);
    background: #fffaf3;
}

.nz-checkbox--perm input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: var(--color-accent-orange, #e87820);
    flex-shrink: 0;
    cursor: pointer;
}

.nz-checkbox__main {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1 1 auto;
}

.nz-checkbox__title {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-brand-900, #1e3543);
}

.nz-checkbox__desc {
    font-size: 12.5px;
    color: #6b7280;
    line-height: 1.55;
}

/* ---------- dialog 内的灰色补充提示文字 ---------- */
.nz-dialog__hint {
    color: #94a3b8;
    font-size: 13px;
    margin-top: 8px !important;
}
