/* ============================================================
   授权中心 · 前台门户样式
   ============================================================ */

body.front {
    background:
        radial-gradient(1200px 600px at 50% -200px, rgba(99, 102, 241, .10), transparent 70%),
        var(--bg);
    color: var(--text);
}

.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

/* ---------- 顶部导航 ---------- */
.site-head {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--surface) 78%, transparent);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--line);
}
.site-head-inner { height: 66px; display: flex; align-items: center; gap: 18px; }

.logo { display: flex; align-items: center; gap: 11px; color: var(--text); flex: none; }
.logo .mark {
    width: 36px; height: 36px; border-radius: 11px;
    background: var(--grad); color: #fff;
    display: grid; place-items: center;
    box-shadow: 0 10px 20px -12px rgba(99, 102, 241, .95);
}
.logo .mark svg { width: 20px; height: 20px; }
.logo b { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.logo span { display: block; font-size: 10px; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-left: 18px; }
.site-nav a {
    padding: 8px 12px; border-radius: 9px;
    font-size: 13px; font-weight: 500; color: var(--text-2);
    transition: background .16s, color .16s;
}
.site-nav a:hover { background: var(--bg-soft); color: var(--text); }
.site-nav a.active { background: var(--brand-soft); color: var(--brand-600); font-weight: 600; }

.site-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.site-actions .btn { height: 36px; }

/* ---------- Hero ---------- */
.hero { padding: 54px 0 26px; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }

.hero-copy .eyebrow { color: var(--brand-600); }
.hero-copy h1 {
    margin: 14px 0 16px;
    font-size: clamp(30px, 4.2vw, 48px);
    line-height: 1.15;
    letter-spacing: -.04em;
    font-weight: 760;
}
.hero-copy h1 .grad {
    background: linear-gradient(120deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-copy p { margin: 0 0 22px; font-size: 14.5px; line-height: 1.9; color: var(--text-2); max-width: 520px; }

.hero-points { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-point {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 13px; border-radius: 11px;
    background: var(--surface); border: 1px solid var(--line);
    font-size: 12.5px; color: var(--text-2); box-shadow: var(--shadow-xs);
}
.hero-point svg { width: 15px; height: 15px; color: var(--brand); }

.hero-panel {
    position: relative;
    background:
        radial-gradient(80% 80% at 100% 0%, rgba(99, 102, 241, .35), transparent 60%),
        linear-gradient(150deg, #101827 0%, #1a2440 100%);
    border-radius: 22px;
    padding: 24px;
    color: #fff;
    box-shadow: 0 30px 60px -30px rgba(15, 23, 42, .7);
    overflow: hidden;
}
.hero-panel::after {
    content: ""; position: absolute; right: -40px; bottom: -60px;
    width: 180px; height: 180px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 0 0 30px rgba(255, 255, 255, .04);
}
.hero-panel h3 { margin: 0 0 4px; font-size: 15px; font-weight: 650; }
.hero-panel .sub { margin: 0 0 18px; font-size: 12px; color: rgba(203, 213, 225, .7); }
.step-row { display: flex; gap: 12px; align-items: flex-start; position: relative; z-index: 1; margin-bottom: 14px; }
.step-row .no {
    width: 24px; height: 24px; border-radius: 8px; flex: none;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .16);
    font-size: 11.5px; font-weight: 700; color: #c7d2fe;
}
.step-row b { display: block; font-size: 12.8px; font-weight: 600; color: #e2e8f0; }
.step-row span { font-size: 11.5px; color: rgba(148, 163, 184, .8); }
.hero-panel .contact {
    position: relative; z-index: 1;
    margin-top: 18px; padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    display: flex; justify-content: space-between; font-size: 11.5px; color: rgba(148, 163, 184, .8);
}
.hero-panel .contact a { color: #a5b4fc; }

/* ---------- 商品区 ---------- */
.catalog { padding: 26px 0 70px; }
.catalog-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 18px; margin-bottom: 20px; flex-wrap: wrap;
}
.catalog-head h2 { margin: 0 0 4px; font-size: 22px; font-weight: 720; letter-spacing: -.03em; }
.catalog-head p { margin: 0; font-size: 13px; color: var(--muted); }
.catalog-count { font-size: 12px; color: var(--muted); }

/* 自定义下拉 */
.sel { position: relative; min-width: 240px; }
.sel-btn {
    width: 100%; height: 42px; padding: 0 14px;
    display: flex; align-items: center; gap: 10px;
    background: var(--surface); border: 1px solid var(--line-strong);
    border-radius: 12px; cursor: pointer;
    font-family: var(--font); font-size: 13px; color: var(--text);
    box-shadow: var(--shadow-xs);
    transition: border-color .16s, box-shadow .16s;
}
.sel-btn:hover { border-color: var(--brand); }
.sel-btn svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.sel-btn .sel-label { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-btn .caret { transition: transform .2s; color: var(--muted); }
.sel.open .sel-btn .caret { transform: rotate(180deg); }
.sel-menu {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 14px; box-shadow: var(--shadow-pop);
    padding: 6px; z-index: 30; max-height: 280px; overflow: auto;
    display: none;
}
.sel.open .sel-menu { display: block; animation: pop .16s ease-out; }
.sel-menu button {
    width: 100%; text-align: left; padding: 9px 11px;
    border: 0; background: transparent; border-radius: 9px;
    font-family: var(--font); font-size: 13px; color: var(--text-2); cursor: pointer;
}
.sel-menu button:hover { background: var(--bg-soft); color: var(--text); }
.sel-menu button.on { background: var(--brand-soft); color: var(--brand-600); font-weight: 600; }

/* 商品卡 */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 18px; }

.pcard {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column;
    transition: transform .22s, box-shadow .22s, border-color .22s;
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }

.pcard-cover {
    position: relative; height: 132px;
    background: linear-gradient(135deg, #4f46e5, #0ea5e9);
    background-size: cover; background-position: center;
    display: flex; align-items: flex-end; padding: 14px;
    color: #fff;
}
.pcard-cover::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(8, 12, 24, .05) 20%, rgba(8, 12, 24, .62) 100%);
}
.pcard-cover .tag {
    position: relative; z-index: 1;
    font-size: 10.5px; font-weight: 600; letter-spacing: .04em;
    padding: 3px 9px; border-radius: 99px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .28);
    backdrop-filter: blur(6px);
}
.pcard-body { padding: 15px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.pcard-body h3 { margin: 0 0 6px; font-size: 15.5px; font-weight: 680; letter-spacing: -.01em; color: var(--text); }
.pcard-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pcard-meta span {
    font-size: 11.5px; color: var(--text-2);
    background: var(--bg-soft); border-radius: 7px; padding: 3px 8px;
}
.pcard-price { display: flex; align-items: baseline; gap: 3px; margin-bottom: 14px; }
.pcard-price em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--brand-600); }
.pcard-price b { font-size: 27px; font-weight: 760; letter-spacing: -.04em; color: var(--text); font-variant-numeric: tabular-nums; }
.pcard-price span { font-size: 11.5px; color: var(--muted); margin-left: 3px; }
.pcard-actions { margin-top: auto; display: flex; gap: 8px; }
.pcard-actions .btn { flex: 1; height: 36px; font-size: 12.5px; }
.pcard-actions .icon-link {
    width: 36px; height: 36px; border-radius: 10px; flex: none;
    display: grid; place-items: center;
    border: 1px solid var(--line-strong); color: var(--text-2);
}
.pcard-actions .icon-link:hover { border-color: var(--brand); color: var(--brand); }
.pcard-actions svg { width: 15px; height: 15px; }

/* 骨架屏 / 空状态 */
.skeleton { height: 300px; border-radius: 18px; background: linear-gradient(100deg, var(--bg-soft) 30%, var(--surface) 50%, var(--bg-soft) 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty-state {
    grid-column: 1 / -1;
    padding: 60px 20px; text-align: center;
    border: 1px dashed var(--line-strong); border-radius: 18px;
    background: var(--surface); color: var(--muted);
}
.empty-state svg { width: 44px; height: 44px; opacity: .4; margin-bottom: 10px; }
.empty-state h3 { margin: 0 0 6px; font-size: 15px; color: var(--text-2); }
.empty-state p { margin: 0; font-size: 12.5px; }

/* ---------- 页脚 ---------- */
.site-foot { border-top: 1px solid var(--line); background: var(--surface); }
.site-foot-inner {
    padding: 30px 0; display: flex; align-items: center; justify-content: space-between;
    gap: 20px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted);
}
.site-foot-links { display: flex; gap: 16px; flex-wrap: wrap; }
.site-foot-links a { color: var(--text-2); }
.site-foot-links a:hover { color: var(--brand); }

/* ---------- 通用内容页（查询 / 换绑 / 代理开通） ---------- */
.page-hero { padding: 42px 0 10px; }
.page-hero h1 { margin: 10px 0 8px; font-size: 30px; letter-spacing: -.035em; font-weight: 740; }
.page-hero p { margin: 0; font-size: 13.5px; color: var(--text-2); max-width: 640px; line-height: 1.85; }

.panel {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 18px; box-shadow: var(--shadow-sm);
    padding: 22px;
}
.panel + .panel { margin-top: 16px; }
.panel-title { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; font-size: 14px; font-weight: 650; }
.panel-title svg { width: 16px; height: 16px; color: var(--brand); }

.fld { margin-bottom: 15px; }
.fld > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.fld input, .fld select, .fld textarea {
    width: 100%; height: 44px; padding: 0 13px;
    border: 1px solid var(--line-strong); border-radius: 11px;
    background: var(--surface); color: var(--text);
    font-family: var(--font); font-size: 13.5px; outline: 0;
    transition: border-color .16s, box-shadow .16s;
}
.fld textarea { height: auto; padding: 11px 13px; }
.fld input:focus, .fld select:focus, .fld textarea:focus {
    border-color: var(--brand); box-shadow: 0 0 0 4px rgba(99, 102, 241, .12);
}
.fld .tip { margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-actions { margin-top: 20px; }
.btn-block {
    width: 100%; height: 46px; border: 0; border-radius: 12px;
    background: var(--grad); color: #fff; font-family: var(--font);
    font-size: 14px; font-weight: 600; cursor: pointer;
    box-shadow: 0 14px 30px -16px rgba(99, 102, 241, 1);
}
.btn-block:hover { filter: brightness(1.05); }
.btn-block[disabled] { opacity: .65; cursor: default; }

.radio-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-pills label {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 14px; border-radius: 10px;
    border: 1px solid var(--line-strong); background: var(--surface);
    font-size: 12.5px; color: var(--text-2); cursor: pointer;
    transition: all .16s;
}
.radio-pills input { accent-color: var(--brand); width: 15px; height: 15px; margin: 0; }
.radio-pills label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-700); font-weight: 600; }

.result-box { margin-top: 16px; }
.result-card { padding: 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); line-height: 1.9; }
.result-card b { color: var(--text); }

/* ---------- 购买弹窗（iframe 内容） ---------- */
body.buy-page { background: var(--bg); padding: 18px; }
.buybox { max-width: 520px; margin: 0 auto; }
.buy-summary {
    background: linear-gradient(140deg, #131c30, #1e2a4a);
    color: #fff; border-radius: 16px; padding: 16px 18px; margin-bottom: 16px;
}
.buy-summary h2 { margin: 0 0 4px; font-size: 16px; font-weight: 680; }
.buy-summary p { margin: 0; font-size: 12px; color: rgba(203, 213, 225, .75); }
.buy-summary .price { float: right; font-size: 20px; font-weight: 750; letter-spacing: -.03em; }
.buy-summary .price em { font-size: 12px; font-style: normal; color: #a5b4fc; margin-right: 2px; }

/* MDL 兜底美化（历史表单） */
body.buy-page .mdl-textfield, body.flat-blue .mdl-textfield { width: 100% !important; padding: 0; margin-bottom: 14px; }
body.buy-page .mdl-textfield__label, body.flat-blue .mdl-textfield__label {
    position: static; display: block; margin-bottom: 6px;
    font-size: 12.5px; font-weight: 600; color: var(--text-2); top: auto;
}
body.buy-page .mdl-textfield__input, body.flat-blue .mdl-textfield__input {
    border: 1px solid var(--line-strong) !important; border-radius: 11px;
    height: 44px; padding: 0 13px; font-size: 13.5px; background: var(--surface); color: var(--text);
}
body.buy-page .mdl-textfield__input:focus, body.flat-blue .mdl-textfield__input:focus {
    border-color: var(--brand) !important; box-shadow: 0 0 0 4px rgba(99, 102, 241, .12);
}
body.buy-page .mdl-button, body.flat-blue .mdl-button {
    border-radius: 11px; height: 42px; line-height: 42px;
    font-family: var(--font); font-size: 13px; font-weight: 600;
    box-shadow: none; text-transform: none;
}
body.buy-page .mdl-button--raised.mdl-button--accent, body.flat-blue .mdl-button--raised.mdl-button--accent {
    background: var(--grad); color: #fff;
}
body.buy-page .mdl-radio, body.flat-blue .mdl-radio { margin-right: 12px; }

@media (max-width: 980px) {
    .hero-inner { grid-template-columns: 1fr; gap: 26px; }
    .hero { padding-top: 34px; }
    .site-nav { display: none; }
}
@media (max-width: 640px) {
    .wrap { width: calc(100% - 28px); }
    .site-actions .btn span { display: none; }
    .catalog-head { align-items: stretch; }
    .sel { width: 100%; }
    .hero-copy h1 { font-size: 30px; }
    .fld-row { grid-template-columns: 1fr; }
}

/* ---------- 支付渠道不可用态 ---------- */
.radio-pills label.pill-off {
    opacity: .45; cursor: not-allowed;
    background: var(--surface-2); border-style: dashed;
}
.radio-pills label.pill-off input { pointer-events: none; }
.radio-pills label.pill-off:has(input:checked) { background: var(--surface-2); border-color: var(--line-strong); color: var(--text-2); }
#payHint:empty { display: none; }
#payHint { color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 9px; padding: 8px 11px; }

/* ---------- 代理申请页：两栏 → 窄屏单栏 ---------- */
.agent-grid { grid-template-columns: 1fr 1.05fr; align-items: start; }
@media (max-width: 980px) {
    .agent-grid { grid-template-columns: 1fr; }
    .agent-grid .panel { padding: 18px; }
    .agent-grid .quick .qt span { font-size: 12px; line-height: 1.6; }
}


/* ---------------- 授权查询页签 ---------------- */
#qTabs .mb-tab {
    border: 0; background: transparent; font: inherit; font-size: 13px;
    outline: none; box-shadow: none; appearance: none;
}
#qTabs .mb-tab.active { background: var(--surface, #fff); box-shadow: 0 6px 18px -12px rgba(15, 23, 42, .45); }

/* ---------------- 授权查询结果行 ---------------- */
.lic-row {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
    padding: 14px 0; border-bottom: 1px dashed var(--line);
}
.lic-row:first-child { padding-top: 4px; }
.lic-row:last-child { border-bottom: 0; padding-bottom: 0; }
.lic-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.lic-main > b { font-size: 14px; color: var(--text); }
.lic-sub { font-size: 12px; color: var(--muted); line-height: 1.6; }
.lic-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.lic-meta .btn { height: 28px; }

@media (max-width: 560px) {
    .lic-row { flex-direction: column; gap: 8px; }
    .lic-meta { align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: 8px; }
}
