/* ═══════════════════════════════════════════════════════════════════
   长鑫云 (cxcloud) 落地页 — 二维码提取 / 客服登录
   [2026-08-01 21:34] 新增: 提取页 .cx-* + 登录页 .login-* 统一 teal 线性留白风
   依赖: theme.css, base.css
   ═══════════════════════════════════════════════════════════════════ */
@import url('/assets/css/cxcloud/theme.css');

body { background: var(--cx-bg-page); }

/* ═══ 提取页 ───────────────────────────────────────────── */

/* 主容器 */
.cx-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 20px 60px;
}

/* Logo 区 */
.cx-logo-wrap { text-align: center; margin-bottom: 24px; }
.cx-logo-wrap img {
    display: block;
    max-width: 200px;
    height: auto;
    max-height: 58px;
    object-fit: contain;
    margin: 0 auto;
}
.cx-subtitle {
    margin-top: 10px;
    font-size: 14px;
    color: var(--cx-text-muted);
    font-weight: 400;
    letter-spacing: .02em;
}

/* 状态行 */
.cx-status-row { display: flex; justify-content: center; margin-bottom: 16px; }
.cx-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    border-radius: var(--cx-radius-sm);
    background: var(--cx-bg-surface);
    border: 1px solid var(--cx-border);
    color: var(--cx-text-muted);
    font-size: 12px;
    font-weight: 500;
}
.cx-status.success { color: var(--cx-success); border-color: var(--cx-success-border); background: var(--cx-success-light); }
.cx-status.error   { color: var(--cx-danger); border-color: var(--cx-danger-border); background: var(--cx-danger-light); }
.cx-status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Flash */
.cx-flash {
    text-align: center;
    font-size: 13px;
    color: var(--cx-text-muted);
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: visible;
    opacity: 1;
    transition: opacity .2s;
}
.cx-flash[hidden] { visibility: hidden; opacity: 0; pointer-events: none; }

/* 表单卡片（线性留白：无阴影） */
.cx-card {
    background: var(--cx-bg-surface);
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius-md);
    width: 100%;
    max-width: 540px;
    padding: 28px 32px;
    margin-bottom: 20px;
    box-shadow: none;
}
.cx-card.is-result { padding: 24px 32px; }

/* 表单 */
.cx-form { display: grid; gap: 20px; }
.cx-field-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--cx-text-muted);
    letter-spacing: .04em;
    margin-bottom: 10px;
}

/* 标签页按钮组 */
.cx-tabs { display: flex; gap: 0; border-radius: var(--cx-radius-sm); overflow: hidden; }
.cx-tab {
    flex: 1;
    height: 36px;
    border: none;
    background: var(--cx-bg-soft);
    color: var(--cx-text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
    padding: 0 4px;
}
.cx-tab:first-child { border-radius: var(--cx-radius-sm) 0 0 var(--cx-radius-sm); }
.cx-tab:last-child  { border-radius: 0 var(--cx-radius-sm) var(--cx-radius-sm) 0; }
.cx-tab:hover { background: #dde9e9; }
.cx-tab.active { background: var(--cx-primary); color: #fff; }

/* 输入框 */
.cx-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--cx-border-strong);
    border-radius: var(--cx-radius-sm);
    background: var(--cx-bg-surface);
    color: var(--cx-text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.cx-input::placeholder { color: var(--cx-text-tertiary); }
.cx-input:focus { border-color: var(--cx-primary); box-shadow: 0 0 0 3px rgba(20,184,166,.12); }

.cx-mode-options {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    min-height: 26px;
}
.cx-mode-options label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--cx-text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.cx-mode-options input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--cx-primary);
    cursor: pointer;
}
.cx-mode-tip {
    margin-top: 2px;
    color: #e05a3c;
    font-size: 11px;
    text-align: center;
}

/* 按钮行 */
.cx-btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cx-btn-row .cx-btn:only-child { grid-column: 1 / -1; }
.cx-btn {
    height: 42px;
    border-radius: var(--cx-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: background .15s, color .15s, border-color .15s;
}
.cx-btn:disabled { opacity: .45; cursor: not-allowed; }
.cx-btn-primary { background: var(--cx-primary); color: #fff; }
.cx-btn-primary:hover:not(:disabled) { background: var(--cx-primary-hover); }
.cx-btn-secondary {
    background: var(--cx-bg-surface);
    color: var(--cx-text-secondary);
    border: 1px solid var(--cx-border-strong);
}
.cx-btn-secondary:hover:not(:disabled) { border-color: var(--cx-primary); color: var(--cx-primary); background: var(--cx-primary-lighter); }
.cx-force-tip {
    margin-top: 2px;
    font-size: 11px;
    color: var(--cx-primary-active);
    text-align: center;
}

/* 结果卡片 */
.cx-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--cx-border-light);
    margin-bottom: 20px;
}
.cx-result-head h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--cx-text-primary); }
.cx-result-state {
    color: var(--cx-text-tertiary);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    padding: 3px 10px;
    border-radius: var(--cx-radius-sm);
    background: var(--cx-bg-soft);
    white-space: nowrap;
}
.cx-result-state.success { color: var(--cx-success); background: var(--cx-success-light); }

/* 结果主体: 单列纵向, 二维码在上居中 */
.cx-result-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
    justify-items: center;
}
.cx-info-stack {
    width: 100%;
}

/* QR 码区域 */
.cx-qr-zone { display: grid; place-items: center; min-height: 200px; }
.cx-qr-placeholder { color: var(--cx-text-tertiary); font-size: 12px; font-weight: 500; }
#entry-qr-canvas, .cx-qr-image {
    width: 180px; height: 180px;
    border-radius: var(--cx-radius-sm);
    border: 1px solid var(--cx-border);
    background: #fff;
}

/* 信息堆叠 */
.cx-info-stack { display: grid; gap: 14px; }
.cx-info-line {
    display: grid;
    gap: 3px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--cx-border-light);
}
.cx-info-line:last-child { border-bottom: none; padding-bottom: 0; }
.cx-info-line span { color: var(--cx-text-muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.cx-info-line strong {
    color: var(--cx-text-primary);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    word-break: break-all;
}
.cx-info-line.is-empty strong { color: var(--cx-text-tertiary); }
.cx-info-line-link strong { font-size: 14px; color: var(--cx-primary-active); }
/* [2026-08-02 14:40] 准入说明: 红色加粗 */
#infoRule {
    color: var(--cx-danger);
    font-weight: 700;
}
.cx-info-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cx-action-row { display: flex; gap: 8px; padding-top: 6px; }
.cx-btn-sm {
    flex: 1;
    height: 36px;
    border-radius: var(--cx-radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background .15s;
}
.cx-btn-sm:disabled { opacity: .45; cursor: not-allowed; }
.cx-btn-sm.primary { background: var(--cx-primary); color: #fff; }
.cx-btn-sm.primary:hover:not(:disabled) { background: var(--cx-primary-hover); }
.cx-btn-sm.danger { background: var(--cx-danger); color: #fff; }
.cx-btn-sm.danger:hover:not(:disabled) { background: var(--cx-danger-hover, #b91c1c); }
.cx-btn-sm.secondary { background: var(--cx-bg-surface); color: var(--cx-text-secondary); border: 1px solid var(--cx-border-strong); }
.cx-btn-sm.secondary:hover:not(:disabled) { border-color: var(--cx-primary); color: var(--cx-primary); }

/* 复制弹窗 */
.cx-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.9);
    background: rgba(31,41,55,.92);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--cx-radius-md);
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: all .2s;
    z-index: 100;
}
.cx-toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* 元信息卡片 */
.cx-meta-panel { padding: 18px 24px; }
.cx-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--cx-border-light);
    font-size: 13px;
}
.cx-meta-row:last-child { border-bottom: none; }
.cx-meta-row span { color: var(--cx-text-muted); font-size: 12px; font-weight: 600; }
.cx-meta-row strong { color: var(--cx-text-primary); font-weight: 500; }

/* ═══ 登录页 ───────────────────────────────────────────── */

/* 居中卡片式 */
body.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cx-bg-page);
}
.login-card {
    width: 400px;
    background: var(--cx-bg-surface);
    border-radius: var(--cx-radius-md);
    border: 1px solid var(--cx-border);
    box-shadow: none;
    padding: 40px 36px;
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo img {
    display: block;
    max-width: 200px;
    height: auto;
    max-height: 58px;
    object-fit: contain;
    margin: 0 auto;
}
.login-title { text-align: center; font-size: 18px; font-weight: 600; color: var(--cx-text-primary); margin-bottom: 4px; }
.login-subtitle { text-align: center; font-size: 13px; color: var(--cx-text-tertiary); margin-bottom: 32px; }

.form-group { margin-bottom: 22px; position: relative; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--cx-text-secondary); margin-bottom: 8px; }
.form-group input {
    width: 100%;
    height: 40px;
    border: none;
    border-bottom: 1.5px solid var(--cx-border-strong);
    padding: 0 4px;
    font-size: 14px;
    color: var(--cx-text-primary);
    outline: none;
    background: transparent;
    transition: border-color .2s;
    border-radius: 0;
}
.form-group input:focus { border-bottom-color: var(--cx-primary); }
.form-group input.error { border-bottom-color: var(--cx-danger); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 36px; }
.pw-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--cx-text-tertiary);
    padding: 4px;
    display: flex;
    align-items: center;
}
.pw-toggle:hover { color: var(--cx-text-muted); }
.pw-toggle svg { width: 18px; height: 18px; }

.login-error {
    padding: 10px 14px;
    background: var(--cx-danger-light);
    border: 1px solid var(--cx-danger-border);
    border-radius: var(--cx-radius-sm);
    display: none;
    align-items: flex-start;
    gap: 8px;
    color: var(--cx-danger);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
}
.login-error.show { display: flex; }
.login-error svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

.btn-login {
    width: 100%;
    height: 44px;
    background: var(--cx-primary);
    color: #fff;
    border: none;
    border-radius: var(--cx-radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .2s;
    margin-top: 6px;
}
.btn-login:hover { background: var(--cx-primary-hover); }
.btn-login:disabled { opacity: .6; cursor: not-allowed; }
.btn-login svg { width: 18px; height: 18px; }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ 响应式 ═════════════════════════════════════════════ */
@media (max-width: 640px) {
    .cx-shell { padding: 24px 12px 40px; }
    .cx-card { padding: 20px 16px; }
    .cx-tab { font-size: 11px; padding: 0 2px; }
    .cx-result-main { grid-template-columns: 1fr; gap: 16px; }
    .cx-qr-zone { min-height: 160px; }
    #entry-qr-canvas, .cx-qr-image { width: 150px; height: 150px; }
    .cx-info-split { grid-template-columns: 1fr; }
}
@media (max-width: 440px) {
    body.login-body { background: var(--cx-bg-surface); }
    .login-card { width: 100%; border: none; border-radius: 0; padding: 36px 24px; box-shadow: none; }
    .cx-card { padding: 14px 10px; }
    .cx-tab { font-size: 10px; height: 32px; }
    .cx-input { height: 38px; font-size: 13px; }
    .cx-btn { height: 38px; font-size: 13px; }
}

/* ═══ 统计查询按钮（右上角固定） ═══════════════════════════ */
/* [2026-08-02 03:30] 新增: 提取页右上角固定"统计查询"入口 */
.cx-stat-btn {
    position: fixed;
    top: 12px;
    right: 24px;
    z-index: 20;
    height: 38px;
    padding: 0 20px;
    border-radius: 19px;
    border: 1px solid var(--cx-border);
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--cx-text-primary);
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--cx-shadow-sm);
    transition: all .2s;
    text-decoration: none;
}
.cx-stat-btn:hover {
    background: #fff;
    color: var(--cx-primary-active);
    border-color: var(--cx-primary-border);
    box-shadow: var(--cx-shadow-md);
    transform: translateY(-1px);
}
@media (max-width: 480px) {
    .cx-stat-btn { top: 10px; right: 14px; height: 32px; padding: 0 14px; font-size: 12px; }
}
