:root {
    color-scheme: light;
    --bg: #f7f8fa;
    --bg-soft: #f2f3f5;
    --card: #ffffff;
    --text: #1f2329;
    --text-2: #4e5969;
    --muted: #8f959e;
    --line: #eceef2;
    --primary: #1670f0;
    --primary-hover: #0e5fd6;
    --primary-soft: #e8f1ff;
    --ok: #16a34a;
    --err: #e5484d;
    --warn: #d97706;
    --r-card: 12px;
    --r-ctl: 8px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04);
    --shadow-pop: 0 10px 30px rgba(16, 24, 40, .12);
    --sider: 216px;
}
[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0f1216;
    --bg-soft: #1b2027;
    --card: #161a20;
    --text: #e6e9ee;
    --text-2: #b6bdc8;
    --muted: #7d8591;
    --line: #262c35;
    --primary: #4c8dff;
    --primary-hover: #3b7cf0;
    --primary-soft: #1a2940;
    --shadow: none;
    --shadow-pop: 0 10px 30px rgba(0, 0, 0, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
    background: var(--bg);
    color: var(--text);
    font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
img { max-width: 100%; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
b, strong { font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hint { color: var(--muted); font-size: 12px; margin-top: 8px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ico { width: 18px; height: 18px; flex: 0 0 auto; }
.ico-sm { width: 16px; height: 16px; }
.ico-lg { width: 26px; height: 26px; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }

/* ---------- buttons & controls ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 36px; padding: 0 16px; border-radius: var(--r-ctl);
    border: 1px solid transparent; background: var(--primary); color: #fff;
    font-size: 14px; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--primary-hover); }
.btn-block { width: 100%; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 46px; padding: 0 26px; font-size: 15px; border-radius: 10px; }
.btn-outline, .btn-ghost { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover, .btn-ghost:hover { background: var(--primary-soft); }
.btn-ghost { border-color: #c9dcfb; }
.btn-white, .btn-light { background: #fff; color: #1f2329; border-color: rgba(0,0,0,.06); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.btn-white:hover, .btn-light:hover { background: #f5f7fa; }
.btn-dark { background: #2b1d0e; color: #fff; }
.btn-dark:hover { background: #1a1107; }
.btn-wait, .btn-wait:hover, .btn:disabled { background: var(--bg-soft); color: #b3b8c0; border-color: #e3e5e8; cursor: not-allowed; }
[data-theme="dark"] .btn-ghost { border-color: #2d3f5f; }
[data-theme="dark"] .btn-white, [data-theme="dark"] .btn-light { background: #232a33; color: #e6e9ee; border-color: #2e3640; }

.icon-btn {
    width: 32px; height: 32px; border: 0; border-radius: var(--r-ctl);
    background: transparent; color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.icon-btn:hover { background: var(--bg-soft); }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: inline-flex; }
.tool-row { display: flex; align-items: center; gap: 2px; }

.input, .text, .copy-input, .input-wrap {
    width: 100%; height: 40px; border: 1px solid transparent; border-radius: var(--r-ctl);
    background: var(--bg-soft); padding: 0 12px; outline: none; transition: border-color .15s, background .15s;
}
textarea.text { height: auto; padding: 10px 12px; resize: vertical; }
select.input, select.text { padding-right: 30px; appearance: none; cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.input::placeholder, .text::placeholder, .input-wrap input::placeholder { color: #a9aeb6; }
.input:focus, .text:focus, .input-wrap:focus-within { border-color: var(--primary); background: var(--card); }
.input-wrap { display: flex; align-items: center; gap: 8px; }
.input-wrap input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; padding: 0; }
.eye { border: 0; background: none; padding: 0; color: var(--muted); cursor: pointer; display: inline-flex; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; cursor: pointer; }
.check input { width: 14px; height: 14px; accent-color: var(--primary); margin: 0; }

.alert { border-radius: var(--r-ctl); padding: 9px 12px; margin-bottom: 14px; font-size: 13px; }
.alert.err { background: #fff1f0; color: var(--err); }
.alert.ok { background: #ecfdf3; color: var(--ok); }
.alert a { margin-left: 8px; }
[data-theme="dark"] .alert.err { background: #3a1d20; }
[data-theme="dark"] .alert.ok { background: #13301f; }

.menu { position: relative; }
.menu-pop {
    position: absolute; right: 0; top: calc(100% + 6px); min-width: 168px; z-index: 40;
    background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 6px;
}
.menu-pop a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; color: var(--text); font-size: 13px; }
.menu-pop a:hover { background: var(--bg-soft); }
.menu-pop a.danger { color: var(--err); }
.menu-head { display: flex; flex-direction: column; padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; max-width: 220px; }
.menu-head small { color: var(--muted); }

.avatar {
    width: 28px; height: 28px; border-radius: 50%; background: #1f2329; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; overflow: hidden;
}
.avatar .ico { width: 70%; height: 70%; margin-top: 18%; }
.avatar-sm { width: 22px; height: 22px; }
.avatar-lg { width: 44px; height: 44px; }
[data-theme="dark"] .avatar { background: #e6e9ee; color: #161a20; }

.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; font-size: 16px; min-width: 0; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo-img, .logo-fallback { width: 30px; height: 30px; border-radius: 8px; object-fit: contain; flex: 0 0 auto; }
.logo-fallback { display: inline-flex; align-items: center; justify-content: center; background: var(--primary); color: #fff; font-size: 14px; }

/* ---------- auth ---------- */
.auth { display: flex; min-height: 100vh; }
.auth-side { flex: 1; min-width: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 72px 40px 40px; }
.auth-brand { position: absolute; left: 16px; top: 14px; }
.auth-hero { width: 100%; max-width: 640px; text-align: center; }
.auth-hero h1, .auth-kicker { font-size: 24px; line-height: 1.45; font-weight: 700; letter-spacing: .2px; }
.wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.4s ease-in-out infinite; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 30% { transform: rotate(14deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 30px; }
.feature-card { background: var(--card); border-radius: var(--r-card); padding: 22px 14px 18px; box-shadow: var(--shadow); }
.feature-card h3 { font-size: 14px; margin: 14px 0 6px; }
.feature-card p { font-size: 12px; color: var(--muted); line-height: 1.6; }
.art { position: relative; width: 76px; height: 70px; margin: 0 auto; }
.art-base {
    position: absolute; left: 6px; right: 6px; bottom: 0; height: 22px; border-radius: 50%;
    background: radial-gradient(ellipse at center, #dfe6f3 0%, #c2ccdc 55%, #aab6c9 100%);
    box-shadow: inset 0 -3px 0 rgba(0,0,0,.08);
}
.art-base::after { content: ""; position: absolute; inset: 5px 12px; border-radius: 50%; border: 2px solid rgba(58, 125, 255, .55); }
.art-tile {
    position: absolute; left: 50%; top: 2px; width: 44px; height: 44px; margin-left: -22px; border-radius: 13px;
    display: flex; align-items: center; justify-content: center; color: #fff;
    background: linear-gradient(150deg, #9cc4ff, #3d7dff); box-shadow: 0 8px 16px rgba(61, 125, 255, .35);
    animation: float 3.2s ease-in-out infinite;
}
.art-1 .art-tile { background: linear-gradient(150deg, #a9b8ff, #4f63f2); box-shadow: 0 8px 16px rgba(79, 99, 242, .35); animation-delay: -.8s; }
.art-2 .art-tile { background: linear-gradient(150deg, #c9d3ea, #6f7fa3); box-shadow: 0 8px 16px rgba(111, 127, 163, .35); animation-delay: -1.6s; }
.art-ico { width: 22px; height: 22px; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
[data-theme="dark"] .art-base { background: radial-gradient(ellipse at center, #2a3342 0%, #1f2632 100%); }

.auth-panel { width: 440px; flex: 0 0 440px; background: var(--card); position: relative; display: flex; align-items: center; justify-content: center; padding: 60px 40px; }
.auth-tools { position: absolute; right: 14px; top: 12px; }
.auth-form { width: 100%; max-width: 320px; }
.auth-brand-mobile { display: none; margin-bottom: 24px; }
.form-title { font-size: 18px; font-weight: 700; }
.form-sub { color: var(--muted); font-size: 12px; margin: 6px 0 18px; }
.auth-fields { display: flex; flex-direction: column; gap: 12px; }
.auth-fields .btn { height: 38px; }
.auth-fields .btn-outline { margin-top: 0; }
.form-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; margin: -2px 0 2px; }
.form-row a { font-size: 12px; }
.email-line, .code-line { display: flex; gap: 8px; }
.email-line .input:first-child, .code-line .input { flex: 1; min-width: 0; }
.suffix { width: 118px; flex: 0 0 118px; }
.code-line .btn { height: 40px; min-width: 104px; }
.setup-code { background: var(--bg-soft); border-radius: var(--r-ctl); padding: 10px 12px; overflow: auto; font-size: 13px; }

/* ---------- app shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sider {
    width: var(--sider); flex: 0 0 var(--sider); position: sticky; top: 0; height: 100vh;
    background: var(--card); border-right: 1px solid var(--line);
    display: flex; flex-direction: column; z-index: 30; transition: transform .2s ease;
}
.sider-brand { height: 56px; padding: 0 18px; }
.nav { flex: 1; overflow-y: auto; padding: 0 10px 12px; }
.nav-label { color: var(--muted); font-size: 11px; padding: 12px 10px 4px; }
.nav-item {
    display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: var(--r-ctl);
    color: var(--text-2); font-size: 13px; margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg-soft); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-ico { display: inline-flex; }
.nav-text { flex: 1; }
.badge {
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--err); color: #fff;
    font-style: normal; font-size: 11px; display: inline-flex; align-items: center; justify-content: center;
}
.sider-user {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 14px 20px;
    border-top: 1px solid var(--line); color: var(--text); text-align: center;
}
.sider-user .avatar { margin-bottom: 6px; }
.sider-user strong, .sider-user small { max-width: 100%; }
.sider-user small { color: var(--muted); font-size: 12px; }

.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 20; height: 56px; padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: rgba(247, 248, 250, .86); backdrop-filter: saturate(180%) blur(10px); -webkit-backdrop-filter: saturate(180%) blur(10px);
}
[data-theme="dark"] .topbar { background: rgba(15, 18, 22, .86); }
.topbar-title, .topbar-actions { display: flex; align-items: center; gap: 6px; min-width: 0; }
.topbar h1 { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content { flex: 1; padding: 4px 20px 32px; width: 100%; }
.mask { display: none; }
body.nav-collapsed .sider, html.nav-pre .sider { margin-left: calc(-1 * var(--sider)); }
.sider { transition: margin-left .2s ease, transform .2s ease; }

/* ---------- cards ---------- */
.card, .panel { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 18px; }
[data-theme="dark"] .card, [data-theme="dark"] .panel { border-color: var(--line); }
.panel + .panel, .card + .card { margin-top: 14px; }
.panel h3, .card h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.section-title { font-size: 16px; font-weight: 700; margin: 4px 0 12px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.section-head h3 { margin: 0; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.back { display: inline-block; margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.back:hover { color: var(--primary); }

.chip, .tag {
    display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px;
    font-size: 11px; border: 1px solid currentColor; line-height: 1; white-space: nowrap;
    color: #0e9f8e; background: rgba(14, 159, 142, .06);
}
.t-blue { color: #1670f0; background: rgba(22, 112, 240, .06); }
.t-green { color: #16a34a; background: rgba(22, 163, 74, .06); }
.t-purple { color: #7c5cf0; background: rgba(124, 92, 240, .06); }
.t-orange { color: #e07b00; background: rgba(224, 123, 0, .06); }
.t-teal { color: #0e9f8e; background: rgba(14, 159, 142, .06); }
.t-pink { color: #d9468f; background: rgba(217, 70, 143, .06); }

.status { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; }
.status.s0 { color: var(--warn); background: #fff7e6; }
.status.s1 { color: var(--primary); background: var(--primary-soft); }
.status.s2 { color: var(--muted); background: var(--bg-soft); }
.status.s3 { color: var(--ok); background: #ecfdf3; }
[data-theme="dark"] .status.s0 { background: #3a2a12; }
[data-theme="dark"] .status.s3 { background: #13301f; }

/* ---------- dashboard ---------- */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; align-items: start; }
.dash-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.hero {
    position: relative; overflow: hidden; display: flex; justify-content: space-between; gap: 20px;
    border-radius: var(--r-card); padding: 22px 24px; color: #0f2a55;
    background: linear-gradient(100deg, #4a9af5 0%, #74b6f8 45%, #a9d3fb 100%);
}
.hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255,255,255,.18); pointer-events: none; }
.hero-main { position: relative; z-index: 1; min-width: 0; }
.hello { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: #0b1f3f; }
.hero-kicker { margin-top: 10px; font-size: 12px; color: rgba(11, 31, 63, .7); }
.plan-name { font-size: 20px; font-weight: 800; margin: 2px 0 8px; color: #0b1f3f; }
.hero-meta { font-size: 12px; color: rgba(11, 31, 63, .78); line-height: 1.9; }
.hero-meta b { color: #0b1f3f; }
.meter { width: 240px; max-width: 100%; height: 5px; border-radius: 3px; background: rgba(255,255,255,.45); overflow: hidden; margin: 8px 0 2px; }
.meter span { display: block; height: 100%; background: #fff; border-radius: 3px; }
.hero .btn-white { margin-top: 14px; height: 32px; font-size: 13px; }

.wallet-stack { position: relative; z-index: 1; width: 230px; height: 138px; flex: 0 0 230px; align-self: center; }
.w-card {
    position: absolute; right: 0; border-radius: 12px; padding: 8px 12px;
    background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.7);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: #3a4a66;
}
.w-card b { font-size: 13px; color: #0b1f3f; }
.w-1 { top: 0; width: 88%; background: linear-gradient(90deg, rgba(255,236,190,.9), rgba(255,255,255,.7)); }
.w-2 { top: 26px; width: 94%; background: linear-gradient(90deg, rgba(120,170,255,.75), rgba(255,255,255,.7)); }
.w-3 {
    top: 52px; width: 100%; height: 86px; flex-direction: column; align-items: stretch; justify-content: space-between;
    padding: 12px 14px; background: rgba(255,255,255,.72); box-shadow: 0 10px 24px rgba(16, 60, 130, .15);
}
.w-top { display: flex; justify-content: space-between; align-items: center; }
.w-3 strong { font-size: 24px; color: #0b1f3f; letter-spacing: -.3px; }

.client-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.client-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    border-radius: var(--r-card); min-height: 72px; padding: 12px; text-align: center;
    transition: transform .15s ease, box-shadow .15s ease;
}
.client-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(16, 24, 40, .08); }
.client-card strong { font-size: 13px; font-weight: 600; }
.client-card small { font-size: 12px; opacity: .8; }
.brand-svg { width: 24px; height: 24px; }
.client-guide .client-card { min-height: 112px; }
.client-guide .brand-svg { width: 30px; height: 30px; }
.cc-windows { background: linear-gradient(135deg, #cfe5ff, #8ec3f6); color: #1767c9; }
.cc-ios { background: linear-gradient(135deg, #e6e1ff, #b4a8fb); color: #5f4bd8; }
.cc-android { background: linear-gradient(135deg, #d5f5e5, #8edcb8); color: #138a5b; }
.cc-macos { background: linear-gradient(135deg, #eeeeef, #c3c5c9); color: #5b5f66; }

.sub-box { display: flex; gap: 24px; align-items: center; }
.sub-main { flex: 1; min-width: 0; }
.field-label { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.import-label { margin-top: 18px; }
.copy-line { display: flex; align-items: center; gap: 6px; }
.copy-input { height: 36px; font-size: 13px; color: var(--text-2); background: var(--bg-soft); }
.import-row { display: flex; flex-wrap: wrap; gap: 10px; }
.import-link { position: relative; display: inline-flex; border-radius: 8px; transition: transform .15s ease; }
.import-link:hover { transform: translateY(-2px); }
.app-icon { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.tip {
    position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); white-space: nowrap;
    background: #1f2329; color: #fff; font-size: 11px; padding: 3px 7px; border-radius: 5px;
    opacity: 0; pointer-events: none; transition: opacity .15s;
}
.import-link:hover .tip { opacity: 1; }
.qr-side { width: 150px; flex: 0 0 150px; text-align: center; color: var(--muted); font-size: 11px; line-height: 1.5; }
.qr { width: 112px; height: 112px; margin: 0 auto 8px; padding: 6px; background: #fff; border-radius: 8px; }
.qr img, .qr canvas { width: 100% !important; height: 100% !important; }
.qr-lg { width: 180px; height: 180px; }

.invite-banner {
    position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 16px;
    border-radius: var(--r-card); padding: 22px 24px; color: #2b1d0e;
    background: linear-gradient(100deg, #ffe7c2 0%, #ffc278 45%, #ff9a3c 100%);
}
.invite-copy { position: relative; z-index: 1; }
.invite-copy h3 { font-size: 20px; line-height: 1.35; font-weight: 800; }
.rate-pill {
    display: inline-flex; align-items: center; gap: 10px; margin: 10px 0 8px; padding: 4px 14px 4px 4px;
    border-radius: 999px; background: #2b1d0e; color: #fff; font-size: 12px;
}
.rate-pill strong { background: #fff5e6; color: #2b1d0e; border-radius: 999px; padding: 2px 16px; font-size: 18px; }
.rate-pill small { font-size: 12px; margin-left: 1px; }
.invite-copy p { font-size: 12px; color: rgba(43, 29, 14, .75); margin-bottom: 10px; }
.invite-art { position: relative; width: 180px; height: 110px; flex: 0 0 180px; }
.gift-box {
    position: absolute; right: 26px; bottom: 6px; width: 76px; height: 76px; border-radius: 20px;
    display: flex; align-items: center; justify-content: center; color: #fff;
    background: linear-gradient(150deg, #ff7a45, #e8431a); box-shadow: 0 12px 24px rgba(232, 67, 26, .35); transform: rotate(-8deg);
}
.gift-box .ico { width: 38px; height: 38px; }
.coin {
    position: absolute; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(150deg, #ffe08a, #f5b21a); color: #9a5b00; font-weight: 800; font-size: 13px;
    box-shadow: 0 4px 10px rgba(180, 110, 0, .3); animation: float 3s ease-in-out infinite;
}
.c1 { left: 10px; top: 16px; }
.c2 { left: 52px; top: 62px; width: 22px; height: 22px; font-size: 10px; animation-delay: -1s; }
.c3 { right: 6px; top: 0; width: 24px; height: 24px; font-size: 11px; animation-delay: -2s; }

.notice-card { position: sticky; top: 70px; padding: 16px; }
.notice-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.notice-head h3 { margin: 0; font-size: 15px; }
.notice-item {
    display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; cursor: pointer;
    background: var(--bg-soft); border: 1px solid transparent; border-radius: 10px; padding: 10px 12px; transition: border-color .15s, background .15s;
}
.notice-item:hover { border-color: #cfe0fb; background: var(--primary-soft); }
.notice-item + .notice-item, .notice-item + template + .notice-item { margin-top: 8px; }
.notice-item strong { font-size: 13px; }
.notice-brief { display: block; width: 100%; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 18px 16px; }
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); animation: fade .18s ease; }
.modal-box {
    position: relative; width: 420px; max-width: 100%; max-height: calc(100vh - 36px); overflow-y: auto;
    background: var(--card); border-radius: 12px; padding: 18px 20px 16px; box-shadow: var(--shadow-pop); animation: pop .2s ease;
}
.modal-x { position: absolute; right: 10px; top: 8px; width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.modal-x:hover { background: var(--bg-soft); color: var(--text); }
.modal-title { font-size: 15px; font-weight: 700; padding-right: 28px; margin-bottom: 10px; }
.modal-body .prose { font-size: 13px; color: var(--text-2); }
.modal-time { display: block; margin-top: 12px; font-size: 12px; color: var(--muted); }
body.modal-open { overflow: hidden; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
.prose { line-height: 1.75; overflow-wrap: anywhere; color: var(--text-2); }
.prose img { border-radius: 8px; margin: 8px 0; height: auto; }
.prose a { word-break: break-all; }
.prose pre, .prose code { background: var(--bg-soft); border-radius: 6px; }
.prose pre { padding: 10px; overflow: auto; }
.prose table { width: 100%; border-collapse: collapse; }
.prose td, .prose th { border: 1px solid var(--line); padding: 6px 8px; }

/* ---------- knowledge ---------- */
.toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 18px 0 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 18px; flex-wrap: wrap; }
.tabs a, .tab-btn {
    position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 8px 0 10px;
    color: var(--text-2); font-size: 13px; border: 0; background: none; cursor: pointer;
}
.tabs a:hover, .tab-btn:hover { color: var(--primary); }
.tabs a.active { color: var(--primary); font-weight: 600; }
.tabs a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 1px; background: var(--primary); }
.tabs em { font-style: normal; font-size: 11px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bg-soft); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.tabs a.active em { background: var(--primary-soft); color: var(--primary); }
.page-tabs { margin: 0 0 14px; border-bottom: 1px solid var(--line); }
.search { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; margin-bottom: 8px; border-radius: var(--r-ctl); background: var(--card); border: 1px solid var(--line); color: var(--muted); width: 220px; }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 13px; color: var(--text); }
.search-note { margin: -4px 0 10px; }
.article-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.article { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.article:hover { border-color: #cfe0fb; box-shadow: 0 6px 16px rgba(16, 24, 40, .06); }
.article strong { font-size: 14px; }
.article-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.article-foot time, .article-meta time { color: var(--muted); font-size: 12px; }
.article-view h2 { font-size: 20px; margin: 10px 0 14px; }
.article-meta { display: flex; align-items: center; gap: 10px; }

/* ---------- generic pages ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.stat-grid:has(> :nth-child(5)) { grid-template-columns: repeat(5, 1fr); }
.stat-grid:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, 1fr); }
.stat { display: flex; flex-direction: column; gap: 4px; margin: 0 !important; }
.stat span { font-size: 12px; color: var(--muted); }
.stat strong { font-size: 20px; font-weight: 700; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0; }
.split > .panel, .split > .card { margin: 0; }
.stack-form { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.stack-form .btn { align-self: flex-start; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form .text { max-width: 280px; }
.inline { display: inline; }
.row-actions { display: flex; gap: 8px; }
.code-list, .ticket-list, .methods, .periods { display: flex; flex-direction: column; gap: 8px; }
.code-item, .ticket, .method, .period {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text); background: var(--card);
}
.code-item > div, .ticket > div { display: flex; flex-direction: column; min-width: 0; }
.code-item small, .ticket small, .node small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.ticket-list .ticket { margin: 0; }
.ticket:hover { border-color: #cfe0fb; }
.period, .method { cursor: pointer; justify-content: flex-start; }
.period span, .method span { display: flex; flex-direction: column; flex: 1; }
.period em { font-style: normal; color: var(--primary); font-weight: 600; }
.period:has(input:checked), .method:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.period input, .method input { accent-color: var(--primary); }
.method small { color: var(--muted); font-size: 12px; }

.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan-card { display: flex; flex-direction: column; gap: 12px; margin: 0 !important; }
.plan-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.plan-card header h3 { margin: 0; font-size: 16px; }
.price { color: var(--primary); font-size: 20px; font-weight: 800; white-space: nowrap; }
.price small { font-size: 12px; font-weight: 500; color: var(--muted); }
.plan-spec { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-spec li { font-size: 12px; background: var(--bg-soft); color: var(--text-2); border-radius: 6px; padding: 3px 8px; }
.plan-features li { position: relative; padding-left: 20px; font-size: 13px; line-height: 1.9; }
.plan-features li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 10px; height: 6px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.plan-features li.no { color: var(--muted); text-decoration: line-through; }
.plan-features li.no::before { border-color: #c4c8ce; }
.plan-card form { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.periods { margin: 0; }
.coupon-box { margin-top: 14px; }

.node-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.node { display: flex; align-items: center; gap: 12px; margin: 0 !important; padding: 14px 16px; }
.node-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #c4c8ce; flex: 0 0 auto; box-shadow: 0 0 0 3px rgba(196, 200, 206, .25); }
.dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.dot.off { background: var(--err); box-shadow: 0 0 0 3px rgba(229, 72, 77, .18); }
.toolbar .tabs:empty { display: none; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-size: 12px; background: var(--bg-soft); }
th:first-child { border-top-left-radius: 8px; }
th:last-child { border-top-right-radius: 8px; }
tbody tr:hover td { background: rgba(22, 112, 240, .03); }
tbody tr:last-child td { border-bottom: 0; }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
.pager { display: flex; gap: 4px; margin-top: 12px; }
.pager a { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); }
.pager a.active { background: var(--primary); color: #fff; }

.bill li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.bill li span { color: var(--muted); }
.bill { margin-bottom: 10px; }
.card-box { margin: 4px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.pay-wait { max-width: 460px; text-align: center; }
.pay-wait .copy-line { margin-top: 10px; }
.profile-id { display: flex; align-items: center; gap: 12px; }
.profile-id img { width: 44px; height: 44px; border-radius: 50%; }
/* ---------- landing ---------- */
.buy-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px;
    padding: 12px 14px; border-radius: 10px; background: var(--primary-soft); border: 1px solid #cfe0fb;
}
.buy-banner small { display: block; font-size: 12px; color: var(--primary); }
.buy-banner strong { font-size: 14px; }
.buy-price { font-size: 20px; font-weight: 800; color: var(--primary); white-space: nowrap; }

.landing-body { background: var(--bg); }
.lp-nav {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 12px 24px; background: rgba(255,255,255,.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
[data-theme="dark"] .lp-nav { background: rgba(15,18,22,.86); }
.lp-nav-right { display: flex; align-items: center; gap: 8px; }
.lp-main { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.lp-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: center; padding: 56px 0 40px; }
.lp-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 600; }
.lp-hero-copy h1 { font-size: 38px; line-height: 1.25; font-weight: 800; margin: 16px 0; letter-spacing: -.5px; }
.lp-hero-copy > p { font-size: 15px; color: var(--text-2); line-height: 1.8; max-width: 560px; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 18px; }
.lp-trust { display: flex; flex-wrap: wrap; gap: 16px; color: var(--text-2); font-size: 13px; }
.lp-trust span { display: inline-flex; align-items: center; gap: 5px; }
.lp-trust .ico { color: var(--ok); }
.lp-hero-art { position: relative; height: 300px; }
.lp-globe {
    position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: #fff;
    background: linear-gradient(150deg, #7fb2ff, var(--primary)); box-shadow: 0 20px 50px rgba(22, 112, 240, .35);
}
.lp-globe .ico { width: 78px; height: 78px; }
.lp-orbit {
    position: absolute; width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
    background: var(--card); box-shadow: var(--shadow-pop); color: var(--primary); animation: float 3.4s ease-in-out infinite;
}
.lp-orbit .ico { width: 24px; height: 24px; }
.o1 { left: 6%; top: 18%; color: #d9468f; }
.o2 { right: 8%; top: 30%; color: #e07b00; animation-delay: -1.1s; }
.o3 { right: 16%; bottom: 14%; color: #0e9f8e; animation-delay: -2.2s; }

.lp-section { padding: 44px 0; }
.lp-h2 { font-size: 26px; font-weight: 800; text-align: center; letter-spacing: -.3px; }
.lp-sub { text-align: center; color: var(--muted); margin-top: 8px; }
.lp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.lp-feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.lp-feature:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(16, 24, 40, .08); }
.lp-fico { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); }
.lp-fico .ico { width: 24px; height: 24px; }
.lp-feature h3 { font-size: 16px; margin: 16px 0 8px; }
.lp-feature p { font-size: 13px; color: var(--text-2); line-height: 1.7; }

.lp-price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; align-items: stretch; }
.lp-price { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 26px 22px; box-shadow: var(--shadow); }
.lp-price.hot { border-color: var(--primary); box-shadow: 0 16px 40px rgba(22, 112, 240, .16); }
.lp-badge { position: absolute; right: 18px; top: -12px; padding: 4px 12px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 600; }
.lp-price h3 { font-size: 17px; }
.lp-amount { display: flex; align-items: baseline; gap: 2px; margin: 12px 0; font-size: 40px; font-weight: 800; color: var(--text); letter-spacing: -1px; }
.lp-amount small { font-size: 18px; font-weight: 600; }
.lp-amount em { font-size: 14px; font-weight: 500; font-style: normal; color: var(--muted); }
.lp-traffic { font-size: 14px; color: var(--text-2); margin-bottom: 12px; }
.lp-plan-feat { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; flex: 1; }
.lp-plan-feat li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.lp-plan-feat .ico { color: var(--ok); flex: 0 0 auto; }

.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.lp-step { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; }
.lp-num { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--primary); color: #fff; font-weight: 700; }
.lp-step h3 { font-size: 15px; margin-bottom: 4px; }
.lp-step p { font-size: 13px; color: var(--muted); }

.lp-faq { max-width: 760px; margin: 28px auto 0; display: flex; flex-direction: column; gap: 10px; }
.lp-faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 4px 18px; }
.lp-faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; font-size: 15px; font-weight: 600; }
.lp-faq-sign { color: var(--muted); font-size: 20px; transition: transform .2s; }
.lp-faq-item[open] .lp-faq-sign { transform: rotate(45deg); }
.lp-faq-item p { padding: 0 0 14px; font-size: 13px; color: var(--text-2); line-height: 1.8; }

.lp-final { text-align: center; margin: 24px 0 64px; padding: 48px 24px; border-radius: 20px; background: linear-gradient(120deg, #1670f0, #4a9af5); color: #fff; }
.lp-final h2 { font-size: 26px; font-weight: 800; }
.lp-final p { margin: 10px 0 22px; opacity: .9; }
.lp-final .btn-primary { background: #fff; color: var(--primary); }
.lp-final .btn-primary:hover { background: #eef4ff; }

.lp-foot { border-top: 1px solid var(--line); padding: 24px; text-align: center; }
.lp-mirrors { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.lp-mirrors a { margin: 0 6px; }
.lp-copy { font-size: 12px; color: var(--muted); }

/* ---------- profile ---------- */
.profile-hero {
    position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    border-radius: var(--r-card); padding: 22px 26px; margin-bottom: 14px; color: #0b1f3f;
    background: linear-gradient(100deg, #e3efff 0%, #cfe3ff 55%, #b7d5ff 100%);
}
.profile-hero::after { content: ""; position: absolute; right: -50px; top: -90px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.3); pointer-events: none; }
.profile-main { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; min-width: 0; }
.profile-avatar { width: 56px; height: 56px; box-shadow: 0 0 0 4px rgba(255,255,255,.7); }
.profile-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.profile-text strong { font-size: 17px; font-weight: 700; }
.profile-text span { font-size: 12px; color: #4a5d7e; }
.profile-badge { align-self: flex-start; font-style: normal; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: #fff; color: var(--primary); margin-top: 2px; }
.profile-stats { position: relative; z-index: 1; display: flex; gap: 10px; }
.profile-stats div { min-width: 118px; padding: 10px 16px; border-radius: 10px; background: rgba(255,255,255,.65); border: 1px solid rgba(255,255,255,.8); }
.profile-stats span { display: block; font-size: 12px; color: #4a5d7e; }
.profile-stats b { font-size: 18px; font-weight: 800; color: #0b1f3f; }
[data-theme="dark"] .profile-hero { background: linear-gradient(100deg, #17243a 0%, #1a2d4d 55%, #1e3a66 100%); color: #e6eefc; }
[data-theme="dark"] .profile-text span, [data-theme="dark"] .profile-stats span { color: #9fb2d0; }
[data-theme="dark"] .profile-stats div { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.08); }
[data-theme="dark"] .profile-stats b { color: #e6eefc; }
[data-theme="dark"] .profile-hero::after { background: rgba(255,255,255,.04); }

.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.set-grid > .card { margin: 0; }
.set-card { display: flex; flex-direction: column; }
.set-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.set-head h3 { margin: 0; font-size: 15px; }
.set-head p { font-size: 12px; color: var(--muted); }
.set-ico { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.set-ico .ico { width: 19px; height: 19px; }
.si-blue { background: var(--primary-soft); color: var(--primary); }
.si-orange { background: rgba(224, 123, 0, .1); color: #e07b00; }
.si-pink { background: rgba(217, 70, 143, .1); color: #d9468f; }
.si-teal { background: rgba(14, 159, 142, .1); color: #0e9f8e; }
.si-purple { background: rgba(124, 92, 240, .1); color: #7c5cf0; }
.set-form { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.set-foot { margin-top: auto; padding-top: 4px; }
.set-note { font-size: 12px; color: var(--muted); }
.set-link { font-size: 13px; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--bg-soft); cursor: pointer; }
.switch-row > span { display: flex; flex-direction: column; min-width: 0; }
.switch-row b { font-size: 13px; font-weight: 600; }
.switch-row small { font-size: 12px; color: var(--muted); }
.switch {
    appearance: none; -webkit-appearance: none; position: relative; flex: 0 0 38px; width: 38px; height: 22px; margin: 0;
    border-radius: 11px; background: #c9ced6; cursor: pointer; transition: background .2s;
}
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.switch:checked { background: var(--primary); }
.switch:checked::after { transform: translateX(16px); }
.switch:focus-visible { outline: 2px solid var(--primary-soft); outline-offset: 2px; }
[data-theme="dark"] .switch { background: #3a424d; }

.bind-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--bg-soft); }
.bind-ico { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; }
.bind-ico svg { width: 18px; height: 18px; }
.bind-ico.tg { background: #229ed9; }
.bind-ico.ql { background: linear-gradient(150deg, #ffb547, #f07b12); }
.bind-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bind-text b { font-size: 13px; font-weight: 600; }
.bind-text small { font-size: 12px; color: var(--muted); }

.device-card .set-head { margin-bottom: 8px; }
.device-table th { background: transparent; border-bottom: 1px solid var(--line); color: var(--text-2); font-weight: 600; font-size: 13px; }
.device-table .t-right { text-align: right; }
.dev-name { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.dev-ico { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--bg-soft); color: var(--text-2); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.dev-more { display: none; }
.device-card.show-all .dev-more { display: table-row; }
.dev-toggle { display: block; width: 100%; margin-top: 8px; padding: 8px; border: 0; border-radius: 8px; background: var(--bg-soft); color: var(--primary); font-size: 13px; cursor: pointer; }
.dev-toggle:hover { background: var(--primary-soft); }

/* ---------- tickets ---------- */
.ticket-hero {
    position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 20px;
    border-radius: var(--r-card); padding: 26px 32px; margin-bottom: 14px; min-height: 150px;
    background: linear-gradient(100deg, #e3efff 0%, #cfe3ff 50%, #b7d5ff 100%);
}
.ticket-hero::before { content: ""; position: absolute; right: 18%; top: -70px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.35); }
.ticket-hero-copy { position: relative; z-index: 1; }
.ticket-hero h2 { font-size: 20px; font-weight: 800; color: #0b1f3f; }
.ticket-hero p { margin: 6px 0 16px; font-size: 13px; color: #4a5d7e; }
.btn-pill { height: 36px; padding: 0 20px; border-radius: 999px; gap: 6px; box-shadow: 0 6px 16px rgba(22, 112, 240, .28); }
.ticket-art { position: relative; z-index: 1; width: 240px; height: 150px; flex: 0 0 240px; margin: -10px 0; }
[data-theme="dark"] .ticket-hero { background: linear-gradient(100deg, #17243a 0%, #1a2d4d 50%, #1e3a66 100%); }
[data-theme="dark"] .ticket-hero h2 { color: #e6eefc; }
[data-theme="dark"] .ticket-hero p { color: #9fb2d0; }
[data-theme="dark"] .ticket-hero::before { background: rgba(255,255,255,.05); }

.ticket-card { padding: 6px 6px 2px; }
.ticket-table th { background: transparent; border-bottom: 1px solid var(--line); padding: 14px 16px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.ticket-table td { padding: 14px 16px; }
.ticket-table .t-right { text-align: right; }
.t-subject { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.t-subject a { color: var(--text); font-weight: 500; }
.t-subject a:hover { color: var(--primary); }
.ticket-table .status::before, .chat-meta .status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 5px; }
.empty-row:hover td { background: none !important; }
.ticket-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 0 44px; color: var(--muted); font-size: 13px; }
.envelope { width: 64px; height: 64px; border-radius: 18px; display: flex; align-items: center; justify-content: center; color: #9bbcf0; background: var(--primary-soft); }
.envelope .ico { width: 32px; height: 32px; stroke-width: 1.5; }

.modal-box.modal-lg { width: 560px; padding: 20px 24px 20px; }
.ticket-form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row > span { font-size: 13px; font-weight: 500; color: var(--text-2); }
textarea.input { height: auto; min-height: 96px; padding-top: 8px; padding-bottom: 8px; line-height: 1.6; resize: vertical; }
select.input { cursor: pointer; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

.uploader { display: flex; flex-direction: column; gap: 10px; }
.up-list { display: flex; flex-wrap: wrap; gap: 8px; }
.up-list:empty { display: none; }
.up-item { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); }
.up-item a, .up-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.up-item.loading img { opacity: .45; filter: blur(1px); }
.up-state { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--primary); font-weight: 600; }
.up-del {
    position: absolute; right: 3px; top: 3px; width: 20px; height: 20px; border: 0; border-radius: 50%; cursor: pointer;
    background: rgba(0,0,0,.55); color: #fff; font-size: 14px; line-height: 20px; padding: 0;
}
.up-del:hover { background: var(--err); }
.up-drop {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; cursor: pointer;
    border: 1.5px dashed #c9d6ea; border-radius: 10px; padding: 16px 12px; background: var(--bg-soft); color: var(--muted); transition: border-color .15s, background .15s;
}
.up-drop:hover, .up-drop.drag { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.up-ico { width: 26px; height: 26px; }
.up-text { font-size: 13px; font-weight: 600; color: var(--text-2); }
.up-drop small { font-size: 11px; }
[data-theme="dark"] .up-drop { border-color: #2d3a4d; }

.chat-card { padding: 0; overflow: hidden; }
.chat-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.chat-title { min-width: 0; }
.chat-title h3 { margin: 0 0 6px; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.thread { display: flex; flex-direction: column; gap: 16px; padding: 20px; max-height: 60vh; overflow-y: auto; background: var(--bg); }
.msg { display: flex; gap: 10px; align-items: flex-start; max-width: 80%; }
.msg.me { margin-left: auto; flex-direction: row-reverse; }
.msg-avatar { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #e7f6ee; color: var(--ok); }
.msg.me .msg-avatar { background: var(--primary-soft); color: var(--primary); }
.msg-body { min-width: 0; display: flex; flex-direction: column; }
.msg.me .msg-body { align-items: flex-end; }
.msg-info { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.bubble { background: var(--card); border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; padding: 10px 14px; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.msg.me .bubble { background: var(--primary); border-color: var(--primary); color: #fff; border-radius: 12px 4px 12px 12px; }
.msg.me .bubble a { color: #fff; text-decoration: underline; }
.t-img { display: inline-block; margin: 4px 4px 0 0; text-decoration: none !important; }
.t-img img { max-width: 220px; max-height: 180px; border-radius: 8px; object-fit: cover; background: rgba(0,0,0,.06); }
.reply-box { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line); }
.reply-box textarea.input { min-height: 80px; }
.reply-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.chat-closed { padding: 16px 20px; color: var(--muted); font-size: 13px; text-align: center; border-top: 1px solid var(--line); }
details.panel > summary.section-head { margin: 0; }
details.panel[open] > summary.section-head { margin-bottom: 10px; }
details.panel > summary h3::after { content: " +"; color: var(--muted); font-weight: 400; }
details.panel[open] > summary h3::after { content: " −"; }
.chart { display: flex; align-items: flex-end; gap: 6px; min-height: 150px; overflow-x: auto; padding: 8px 0 12px; }
.col { flex: 0 0 26px; text-align: center; }
.bar { display: block; width: 14px; margin: 0 auto 6px; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, #7fb2ff, var(--primary)); }
.col small { font-size: 10px; color: var(--muted); }
.ai-frame { width: 100%; height: calc(100vh - 110px); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); }

.toast {
    position: fixed; left: 50%; top: 20px; z-index: 60; transform: translate(-50%, -8px);
    background: #1f2329; color: #fff; font-size: 13px; padding: 8px 14px; border-radius: 8px;
    opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; box-shadow: var(--shadow-pop);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
    .dash { grid-template-columns: 1fr; }
    .notice-card { position: static; order: -1; }
    .plan-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
    .auth-side { display: none; }
    .auth-panel { flex: 1; width: auto; }
    .auth-brand-mobile { display: flex; }
    .sider { position: fixed; left: 0; top: 0; transform: translateX(-100%); box-shadow: var(--shadow-pop); }
    body.nav-open .sider { transform: none; }
    body.nav-open .mask { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, .3); }
    body.nav-collapsed .sider { margin-left: 0; }
    .stat-grid, .stat-grid:has(> :nth-child(5)), .stat-grid:has(> :nth-child(3):last-child) { grid-template-columns: repeat(2, 1fr); }
    .split { grid-template-columns: 1fr; }
    .set-grid { grid-template-columns: 1fr; }
    .lp-hero { grid-template-columns: 1fr; gap: 20px; padding: 36px 0 24px; }
    .lp-hero-art { display: none; }
    .lp-grid, .lp-price-grid, .lp-steps { grid-template-columns: 1fr; }
    .lp-hero-copy h1 { font-size: 30px; }
}
@media (max-width: 720px) {
    .content { padding: 4px 12px 24px; }
    .topbar { padding: 0 12px; }
    .hero { flex-direction: column; padding: 18px; }
    .wallet-stack { width: 100%; flex-basis: auto; }
    .client-row { grid-template-columns: repeat(2, 1fr); }
    .sub-box { flex-direction: column; align-items: stretch; }
    .qr-side { width: auto; flex-basis: auto; }
    .invite-art { display: none; }
    .ticket-hero { padding: 20px; }
    .profile-hero { padding: 18px; }
    .profile-stats { width: 100%; }
    .profile-stats div { flex: 1; min-width: 0; padding: 8px 10px; }
    .profile-stats b { font-size: 15px; }
    .ticket-art { display: none; }
    .msg { max-width: 94%; }
    .t-img img { max-width: 160px; }
    .reply-foot { flex-direction: column; align-items: stretch; }
    .article-grid, .node-grid, .plan-grid { grid-template-columns: 1fr; }
    .search { width: 100%; }
    .auth-panel { padding: 56px 20px 32px; }
    .lp-nav { padding: 10px 14px; }
    .lp-main { padding: 0 14px; }
    .lp-h2, .lp-final h2 { font-size: 22px; }
}
