/* 小新账号中心 · 授权端样式
   扁平、浅色、单一强调色；不使用渐变、玻璃拟态与发光效果。
   Date: 2026-10-26  Author: 小新  SystemName: XiaoPHP */

:root {
    --accent: #1a73e8;
    --accent-dark: #1557b0;
    --ink: #202124;
    --ink-2: #5f6368;
    --line: #dadce0;
    --bg: #f6f8fa;
    --danger: #d93025;
    --ok: #188038;
}

html, body { height: 100%; }

body.x-body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Roboto, sans-serif;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 顶部导航：站点标识 + 登录用户下拉菜单 */
.x-nav {
    background: #fff;
    border-bottom: 1px solid var(--line);
    height: 56px;
    flex: 0 0 auto;
}

.x-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    height: 56px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.x-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: .2px;
}

.x-brand .bi {
    color: var(--accent);
    font-size: 18px;
}

.x-logo { display: block; }
.x-logo.rect { height: 28px; width: auto; max-width: 170px; object-fit: contain; }
.x-logo.square { width: 32px; height: 32px; object-fit: cover; border-radius: 6px; }

.x-nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.x-timer {
    color: var(--ink-2);
    font-size: 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
}

.x-user { position: relative; }

.x-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 6px;
    font: inherit;
    font-size: 13px;
    color: var(--ink);
}

.x-user-btn:hover { background: #f1f3f4; }
.x-user-btn .bi-chevron-down { font-size: 12px; color: var(--ink-2); }

.x-user-name {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.x-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 210px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(60, 64, 67, .15);
    padding: 6px;
    display: none;
    z-index: 60;
}

.x-menu.on { display: block; }

.x-menu-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--line);
}

.x-menu-head b { font-size: 14px; font-weight: 600; }
.x-menu-head span { font-size: 12px; color: var(--ink-2); word-break: break-all; }

.x-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 6px;
    color: var(--ink);
    text-decoration: none;
    font-size: 14px;
}

.x-menu a:hover { background: #f1f3f4; }
.x-menu a .bi { color: var(--ink-2); }

.x-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
}

.x-avatar img { width: 100%; height: 100%; object-fit: cover; }

.x-main {
    flex: 1 1 auto;
    padding: 40px 16px 24px;
}

.x-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    max-width: 460px;
    margin: 0 auto;
    padding: 32px 32px 26px;
}

.x-card.x-wide { max-width: 720px; }

.x-card h1 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 6px;
}

.x-sub {
    color: var(--ink-2);
    font-size: 13px;
    margin: 0 0 22px;
    line-height: 1.6;
}

.x-field { margin-bottom: 16px; }

.x-field label {
    display: block;
    font-size: 12px;
    color: var(--ink-2);
    margin-bottom: 6px;
}

.x-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    outline: none;
    transition: border-color .15s;
}

textarea.x-input { height: auto; padding: 10px 12px; }

.x-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.x-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid transparent;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    width: 100%;
    transition: background .15s;
}

.x-btn:hover { background: var(--accent-dark); color: #fff; }
.x-btn:disabled { opacity: .55; cursor: not-allowed; }

.x-btn-ghost {
    background: #fff;
    color: var(--ink);
    border-color: var(--line);
}

.x-btn-ghost:hover { background: #f1f3f4; color: var(--ink); }

/* 高危操作：注销全部凭证一类不可逆的按钮 */
.x-btn-danger { background: var(--danger); }
.x-btn-danger:hover { background: #b3261e; color: #fff; }

.x-btn-sm { height: 32px; padding: 0 14px; font-size: 13px; width: auto; }

.x-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.x-actions .x-btn { width: auto; flex: 1; }

.x-split {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--ink-2);
    font-size: 12px;
}

.x-split:before, .x-split:after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.x-alert {
    border: 1px solid #f5c6c0;
    background: #fdecea;
    color: #b3261e;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 18px;
    line-height: 1.6;
}

.x-note {
    border: 1px solid var(--line);
    background: #f8f9fa;
    color: var(--ink-2);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 12px;
    margin-bottom: 18px;
    line-height: 1.6;
}

.x-foot {
    flex: 0 0 auto;
    padding: 16px;
    text-align: center;
    color: var(--ink-2);
    font-size: 12px;
}

/* 登录方式切换：密码登录 / 邮件登录 */
.x-auth-tabs {
    display: flex;
    gap: 24px;
    border-bottom: 1px solid var(--line);
    margin: 4px 0 22px;
}

.x-auth-tab {
    appearance: none;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 0 0 10px;
    font-size: 14px;
    color: var(--ink-2);
    cursor: pointer;
    transition: color .15s;
}

.x-auth-tab:hover { color: var(--ink); }

.x-auth-tab.on {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 500;
}

.x-panel[hidden] { display: none !important; }

.x-code-row { display: flex; gap: 8px; }

.x-code-row .x-input { flex: 1 1 auto; min-width: 0; }

.x-code-row .x-btn {
    flex: 0 0 auto;
    width: auto;
    height: 40px;
    padding: 0 14px;
    white-space: nowrap;
}

.x-hint {
    min-height: 18px;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--ink-2);
}

.x-hint.ok { color: #137333; }
.x-hint.err { color: #b3261e; }

/* 授权页：应用信息 + 权限清单 */
.x-app-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.x-app-logo {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #f1f3f4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--ink-2);
    overflow: hidden;
    flex: 0 0 auto;
}

.x-app-logo img { width: 100%; height: 100%; object-fit: contain; }

/* 长条 logo：高度不变，方框加宽，图片按高度等比缩放 */
.x-app-logo.rect { width: 160px; }

.x-scopes {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
}

.x-scopes li {
    padding: 12px 14px;
    font-size: 13px;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 10px;
    line-height: 1.6;
}

.x-scopes li:last-child { border-bottom: 0; }
.x-scopes li .bi { color: var(--accent); flex: 0 0 auto; margin-top: 2px; }

.x-who {
    background: #f8f9fa;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.x-inline { display: flex; gap: 10px; }
.x-inline .x-input { flex: 1; }

.x-code-btn {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
}

.x-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.x-row:last-child { border-bottom: 0; }

.x-muted { color: var(--ink-2); }
.x-small { font-size: 12px; }
.x-center { text-align: center; }
.x-mt { margin-top: 18px; }

/* 用户控制台：顶部标签 + 列表 */
.x-tabs {
    max-width: 900px;
    margin: 0 auto 18px;
    display: flex;
    gap: 4px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 5px;
}

.x-tabs a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    border-radius: 6px;
    color: var(--ink-2);
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

.x-tabs a:hover { background: #f1f3f4; color: var(--ink); }

.x-tabs a.on {
    background: var(--accent);
    color: #fff;
    font-weight: 500;
}

.x-console { max-width: 900px; margin: 0 auto; }
.x-console .x-card { max-width: none; }

.x-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.x-item:last-child { border-bottom: 0; }
.x-item .grow { flex: 1; min-width: 0; }
.x-item h3 { font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.x-item p { font-size: 12px; color: var(--ink-2); margin: 0 0 8px; line-height: 1.6; }
.x-item .x-app-logo,
.x-item form { margin-top: 2px; flex: 0 0 auto; }
.x-item .x-scopes { margin-top: 10px; }

.x-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    border: 1px solid var(--line);
    background: #f1f3f4;
    color: var(--ink-2);
    margin-right: 4px;
}

.x-badge.ok { border-color: #b7d9c0; background: #e6f4ea; color: #188038; }
.x-badge.warn { border-color: #f3d9a4; background: #fef7e0; color: #a06a00; }
.x-badge.bad { border-color: #f5c6c0; background: #fdecea; color: #b3261e; }

.x-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    color: var(--ink-2);
    word-break: break-all;
}

.x-checks {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px 14px;
}

.x-checks label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--ink);
    margin: 0;
}

.x-checks input { margin-top: 3px; }

.x-pager {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    font-size: 13px;
}

.x-pager a, .x-pager span {
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink-2);
    text-decoration: none;
}

.x-pager .on { background: var(--accent); border-color: var(--accent); color: #fff; }

.x-copy {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8f9fa;
    padding: 12px 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    word-break: break-all;
    margin: 0 0 14px;
}

.x-empty {
    text-align: center;
    color: var(--ink-2);
    font-size: 13px;
    padding: 32px 0;
}

/* 回调地址输入器：协议下拉框 + 主机路径 + 已登记列表 */
.u-row { display: flex; gap: 8px; align-items: center; }
.u-row .u-scheme { flex: 0 0 230px; min-width: 0; }
.u-row .u-rest { flex: 1 1 auto; min-width: 0; width: 100%; }
.u-row .u-add { flex: 0 0 auto; width: auto; }
.u-list { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
.u-item { display: flex; gap: 10px; align-items: center; padding: 7px 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.u-item code { flex: 1 1 auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--ink); word-break: break-all; }
.u-del { flex: 0 0 auto; border: 0; background: none; padding: 0; color: var(--danger); font-size: 12px; cursor: pointer; }
.u-del:hover { text-decoration: underline; }
.u-msg { margin-top: 7px; min-height: 17px; color: var(--ink-2); font-size: 12px; }
.u-raw { margin-top: 8px; color: var(--ink-2); font-size: 12px; }
.u-raw summary { cursor: pointer; }
.u-raw textarea { margin-top: 6px; }
@media (max-width: 640px) { .u-row { flex-wrap: wrap; } .u-row .u-scheme { flex: 1 1 100%; } }


/* 登录页：左侧登录框 + 右侧后台可编辑的信息栏 */
.x-login {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

.x-login .x-card { flex: 0 1 460px; margin: 0; border-radius: 14px; box-shadow: 0 1px 2px rgba(60, 64, 67, .06); }
.x-side { flex: 0 1 340px; display: flex; flex-direction: column; gap: 14px; }

.x-info {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 1px 2px rgba(60, 64, 67, .06);
}

.x-info b { display: block; font-size: 14px; margin-bottom: 6px; }
.x-info p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.75; white-space: pre-line; }

@media (max-width: 860px) {
    .x-login { flex-direction: column; align-items: stretch; }
    .x-login .x-card, .x-side { flex: 1 1 auto; max-width: none; }
}

/* 顶部导航：站点标识 + 账号分区链接 */
.x-nav-left { display: flex; align-items: center; gap: 10px; min-width: 0; }

.x-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.x-nav-links::-webkit-scrollbar { display: none; }

.x-nav-links a {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    border-radius: 17px;
    color: var(--ink);
    font-size: 14px;
    white-space: nowrap;
    text-decoration: none;
}

.x-nav-links a:hover { background: #f1f3f4; }

/* 当前分区：实心蓝色胶囊，和参考站的导航一致 */
.x-nav-links a.on {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

.x-nav-links a.on:hover { background: var(--accent-dark); color: #fff; }

@media (max-width: 900px) {
    .x-nav-inner { padding: 0 12px; }
    .x-nav-links a { padding: 0 10px; font-size: 13px; }
    .x-timer { display: none; }
}
