/* ── 基础 ─────────────────────────────────────────────────────── */
:root {
    --bg:        #eef2f8;
    --bg-2:      #e2e9f5;
    --card:      #ffffff;
    --text:      #1a1f2b;
    --text-2:    #5b6577;
    --text-3:    #8b93a3;
    --line:      #e3e8f0;
    --radius:    18px;
    --shadow:    0 10px 30px rgba(23, 43, 77, .07), 0 2px 6px rgba(23, 43, 77, .04);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at 15% -10%, #dbe6ff 0%, transparent 55%),
        radial-gradient(900px 500px at 100% 0%, #e5f6ee 0%, transparent 50%),
        var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    font-size: 15px;
    line-height: 1.6;
}

.page {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 56px 18px 64px;
}

/* ── 卡片 ─────────────────────────────────────────────────────── */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 34px 28px 28px;
    margin-bottom: 18px;
}

.card-head {
    text-align: center;
    margin-bottom: 26px;
}

.card-head h1 {
    font-size: 23px;
    line-height: 1.3;
    margin: 0 0 6px;
    letter-spacing: -.3px;
}

.card-head p {
    margin: 0;
    color: var(--text-2);
    font-size: 13.5px;
}

.card-head strong {
    color: var(--text);
    font-weight: 600;
}

/* ── 登录按钮 ─────────────────────────────────────────────────── */
.oauth-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.oauth-btn {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: transform .16s ease, box-shadow .16s ease,
                border-color .16s ease, background .16s ease;
}

.oauth-btn:hover {
    transform: translateY(-1px);
    border-color: #ccd6e6;
    background: #fbfcfe;
    box-shadow: 0 8px 20px rgba(23, 43, 77, .09);
}

.oauth-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.oauth-label {
    flex: 1;
    text-align: left;
}

.chev {
    color: var(--text-3);
    font-size: 19px;
    line-height: 1;
    transition: transform .16s ease;
}

.oauth-btn:hover .chev {
    transform: translateX(2px);
}

/* 品牌图标 */
.brand {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: #fff;
    flex: none;
}

.brand svg {
    width: 22px;
    height: 22px;
    display: block;
}

.brand.qq     { background: linear-gradient(140deg, #35c8ff, #0b9bdf); }
.brand.wechat { background: linear-gradient(140deg, #34dc84, #06bd5b); }
.brand.alipay { background: linear-gradient(140deg, #4b95ff, #1058e0); }

/* ── 已登录资料 ───────────────────────────────────────────────── */
.profile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fafbfd;
    margin-bottom: 16px;
}

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    flex: none;
    object-fit: cover;
    background: #e8edf6;
    border: 1px solid #e0e6f0;
}

.avatar.placeholder {
    display: grid;
    place-items: center;
    font-size: 24px;
    font-weight: 700;
    color: #7d8798;
}

.profile-meta {
    min-width: 0;
    flex: 1;
}

.nickname {
    font-size: 16.5px;
    font-weight: 650;
    margin-bottom: 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-meta dl {
    margin: 0;
    font-size: 12.5px;
    color: var(--text-2);
}

.profile-meta dl > div {
    display: flex;
    gap: 8px;
    line-height: 1.75;
}

.profile-meta dt {
    color: var(--text-3);
    flex: none;
    width: 62px;
}

.profile-meta dd {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, monospace;
    font-size: 11.5px;
}

/* ── 按钮 / 标签 ──────────────────────────────────────────────── */
.btn {
    display: block;
    text-align: center;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 600;
    transition: .16s ease;
}

.btn.ghost {
    border: 1px solid var(--line);
    color: var(--text-2);
    background: #fff;
}

.btn.ghost:hover {
    border-color: #cfd8e6;
    color: var(--text);
    background: #f7f9fc;
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.6;
}

.tag.ok   { background: #e6f7ee; color: #0b9455; }
.tag.warn { background: #fff4e0; color: #b5730a; }
.tag.off  { background: #eef1f6; color: #7b8496; }

.card-head .tag {
    margin-bottom: 12px;
}

/* ── 未配置时的空状态 ─────────────────────────────────────────── */
.empty {
    padding: 22px 18px;
    border: 1px dashed #d6deea;
    border-radius: 14px;
    background: #fafbfd;
    color: var(--text-2);
    font-size: 13.5px;
}

.empty strong {
    display: block;
    color: var(--text);
    margin-bottom: 6px;
    font-size: 14px;
}

.empty p { margin: 0; }

.empty code,
.panel code {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    background: #eef2f8;
    padding: 1.5px 5px;
    border-radius: 5px;
    color: #2b4a7e;
}

/* ── 诊断面板 ─────────────────────────────────────────────────── */
.panel {
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(210, 220, 235, .9);
    border-radius: var(--radius);
    padding: 22px 24px 20px;
    backdrop-filter: blur(6px);
}

.panel h2 {
    font-size: 13px;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--text-3);
    margin: 0 0 14px;
    font-weight: 700;
}

.kv > div {
    display: flex;
    gap: 10px;
    align-items: baseline;
    padding: 7px 0;
    border-bottom: 1px dashed #e6ebf3;
    font-size: 13px;
}

.kv > div:last-child { border-bottom: 0; }

.kv span {
    color: var(--text-3);
    flex: none;
    width: 84px;
}

.kv code {
    flex: 1;
    min-width: 0;
    word-break: break-all;
    background: transparent;
    padding: 0;
    font-size: 12px;
    color: #2b4a7e;
}

.kv code.copy {
    user-select: all;
    cursor: copy;
}

.status {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
    font-size: 13px;
}

.status th {
    text-align: left;
    font-weight: 600;
    color: var(--text-3);
    font-size: 11.5px;
    letter-spacing: .4px;
    text-transform: uppercase;
    padding: 0 0 8px;
    border-bottom: 1px solid #e6ebf3;
}

.status td {
    padding: 9px 0;
    border-bottom: 1px solid #f0f3f8;
}

.status tr:last-child td { border-bottom: 0; }

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: 1px;
}

.dot.qq     { background: #12b7f5; }
.dot.wechat { background: #07c160; }
.dot.alipay { background: #1677ff; }

.footnote {
    margin: 18px 0 0;
    font-size: 12px;
    line-height: 1.85;
    color: var(--text-3);
}

.footnote a {
    color: #2f6bff;
    text-decoration: none;
}

.footnote a:hover { text-decoration: underline; }

/* ── 小屏适配 ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .page { padding: 28px 14px 44px; }
    .card { padding: 28px 20px 22px; }
    .card-head h1 { font-size: 21px; }
    .panel { padding: 20px 18px 18px; }
    .kv span { width: 72px; }
}
