/* 站点首页：未登录为登录入口，登录后为账号总览
   扁平、浅色、单一强调色；不使用渐变、玻璃拟态与发光效果。
   Date: 2026-10-26  Author: 小新  SystemName: XiaoPHP */

.g-main {
    flex: 1 1 auto;
    padding: 32px 16px 24px;
}

/* 内容列：卡片自己撑满，不再受 x-card 的 460px 限制 */
.g-wrap { max-width: 760px; margin: 0 auto; }

/* 四宫格页面需要更宽的一列 */
.g-wrap.g-wide { max-width: 1040px; }

/* 顶部右侧的登录入口 */
.g-login-top {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 18px;
    border-radius: 18px;
    border: 1px solid var(--accent);
    color: var(--accent);
    background: #fff;
    font-size: 14px;
    text-decoration: none;
}

.g-login-top:hover { background: #e8f0fe; }

/* ------------------------------------------------------------------
   未登录：左侧介绍 + 右侧登录窗口
   ------------------------------------------------------------------ */
.g-entry {
    display: flex;
    gap: 48px;
    align-items: center;
    justify-content: center;
    max-width: 900px;
    margin: 56px auto 0;
}

.g-intro { flex: 1 1 auto; max-width: 380px; text-align: center; }

.g-intro .g-pic {
    width: 96px;
    height: 96px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #e8f0fe;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.g-intro h1 {
    font-size: 24px;
    font-weight: 400;
    margin: 0 0 8px;
    color: var(--ink);
}

.g-intro .g-lead {
    font-size: 14px;
    color: var(--ink-2);
    line-height: 1.7;
    margin: 0;
}

.g-panel {
    flex: 0 0 380px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 26px 28px 22px;
    box-shadow: 0 1px 2px rgba(60, 64, 67, .06);
}

.g-panel h2 { font-size: 18px; font-weight: 500; margin: 0 0 18px; }

.g-panel .x-field { margin-bottom: 14px; }

.g-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
    color: var(--ink-2);
    font-size: 12px;
}

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

.g-social { display: flex; gap: 10px; }
.g-social .x-btn { flex: 1 1 50%; }

.g-links {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
    color: var(--ink-2);
}

.g-links a { color: var(--accent); text-decoration: none; }
.g-links a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------
   已登录：左侧栏 + 右侧概览
   ------------------------------------------------------------------ */
.g-ico {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.g-ico.blue   { background: #e8f0fe; color: #1a73e8; }
.g-ico.green  { background: #e6f4ea; color: #188038; }
.g-ico.teal   { background: #e4f7f8; color: #007b83; }
.g-ico.purple { background: #f3e8fd; color: #8430ce; }
.g-ico.orange { background: #feefe3; color: #b34900; }
.g-ico.pink   { background: #fce8e6; color: #c5221f; }

.g-id { text-align: center; padding: 24px 0 22px; }

.g-id .g-pic {
    width: 96px;
    height: 96px;
    margin: 0 auto 14px;
    border-radius: 50%;
    overflow: hidden;
    background: #e8eaed;
    color: var(--ink-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 500;
}

.g-id .g-pic img { width: 100%; height: 100%; object-fit: cover; }
.g-id h1 { font-size: 24px; font-weight: 400; margin: 0 0 6px; }
.g-id .g-mail { font-size: 14px; color: var(--ink-2); margin: 0; }

/* 首页（已登录）：左侧主卡 + 右侧信息卡 */
.g-home {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 16px;
    align-items: start;
}

.g-home .grow { flex: 1 1 auto; min-width: 0; }

.g-home .g-id {
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    padding: 0 0 18px;
    margin-bottom: 4px;
    border-bottom: 1px solid #f1f3f4;
}

.g-home .g-id .g-pic {
    width: 64px;
    height: 64px;
    margin: 0;
    flex: 0 0 auto;
    font-size: 24px;
}

.g-home .g-id h1 { font-size: 20px; margin: 0 0 4px; }

.g-home .x-actions { margin-top: 18px; }

.g-side { display: flex; flex-direction: column; gap: 14px; }

.g-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 1px 2px rgba(60, 64, 67, .06);
    text-decoration: none;
    color: var(--ink);
}

.g-mini:hover { background: #f8f9fa; }
.g-mini b { display: block; font-size: 18px; font-weight: 600; line-height: 1.3; }
.g-mini i { display: block; font-style: normal; font-size: 13px; color: var(--ink-2); }

@media (max-width: 900px) {
    .g-home { grid-template-columns: minmax(0, 1fr); }
}

.g-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.g-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    box-shadow: 0 1px 2px rgba(60, 64, 67, .06);
}

.g-card .g-ico { margin-top: 2px; }
.g-card h2 { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.g-card p { font-size: 13px; color: var(--ink-2); line-height: 1.65; margin: 0; }
.g-card .g-go {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
}

.g-card .g-go:hover { text-decoration: underline; }

@media (max-width: 860px) {
    .g-entry { flex-direction: column; gap: 24px; margin-top: 24px; }
    .g-panel { flex: 1 1 auto; width: 100%; max-width: 420px; }
}

@media (max-width: 520px) {
    .g-panel { padding: 20px; }
    .g-box { padding: 18px; }
}

/* ------------------------------------------------------------------
   用户后台：卡片式内容区
   ------------------------------------------------------------------ */
.g-stack { display: flex; flex-direction: column; gap: 16px; }

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

.g-box > h1 { font-size: 17px; font-weight: 600; margin: 0 0 4px; }
.g-box > h1 + .x-sub { margin-bottom: 18px; }
.g-box .x-row:first-of-type { border-top: 1px solid #f1f3f4; }

.g-box-h {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 16px;
}

.g-box-h .g-ico { width: 28px; height: 28px; font-size: 14px; }

/* 卡片里的提交按钮按内容宽度，不再横贯整行 */
.g-box .x-btn { width: auto; }

/* 账号安全：左侧分区菜单 + 右侧单个面板 */
.g-cols {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.g-col-main { min-width: 0; }

.g-menu {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(60, 64, 67, .06);
    padding: 10px;
    position: sticky;
    top: 72px;
}

.g-menu-t { font-size: 12px; color: var(--ink-2); padding: 8px 10px 10px; }

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

.g-menu a:hover { background: #f1f3f4; }
.g-menu a.on { background: #e8f0fe; color: #174ea6; font-weight: 600; }

/* 表单项不必铺满整栏 */
.g-form { max-width: 420px; }

/* 资料表单里有头像上传、验证码这类并排控件，需要比 420px 更宽 */
.g-form.g-form-lg { max-width: 560px; }
.g-hint { margin: 12px 0 0; line-height: 1.6; }

/* 个人资料：左边表单，右边个人信息卡 */
.g-profile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 16px;
    align-items: start;
}

.g-profile .g-box { min-width: 0; }
.g-profile .g-form,
.g-profile .g-form.g-form-lg { max-width: none; }

.g-profile-side {
    padding: 16px 18px;
    position: sticky;
    top: 72px;
}

.g-profile-side .g-box-h { margin-bottom: 6px; }
.g-profile-side .x-row { gap: 10px; }
.g-profile-side .x-row > span:last-child { text-align: right; word-break: break-all; }

/* 头像本身就是上传入口：隐藏的原生 file input 由 label 触发。
   选择器要多一层，否则 app.css 的 .x-field label 会盖掉这里的 display */
.x-field label.g-avatar-pick {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    color: var(--ink);
    font-size: 13px;
    margin-bottom: 0;
}

.g-avatar-pick .x-avatar {
    width: 64px;
    height: 64px;
    font-size: 26px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
}

.g-avatar-pick:hover .x-avatar { border-color: var(--accent); }
.g-avatar-pick b { display: block; font-size: 13px; font-weight: 600; margin-bottom: 2px; }

.g-file-hide {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

/* 移除头像：勾选框与文字同行，压住 .x-field label 的块级样式 */
.x-field label.g-avatar-remove {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0 0;
    cursor: pointer;
}

.g-avatar-remove input { margin: 0; }

@media (max-width: 1000px) {
    .g-profile { grid-template-columns: minmax(0, 1fr); }
    .g-profile-side { position: static; }
}

/* 会一直增长的列表：面板内滚动 */
.g-scroll {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 8px;
    overscroll-behavior: contain;
}

.g-scroll::-webkit-scrollbar { width: 8px; }
.g-scroll::-webkit-scrollbar-thumb { background: #dadce0; border-radius: 4px; }
.g-scroll::-webkit-scrollbar-thumb:hover { background: #bdc1c6; }
.g-scroll::-webkit-scrollbar-track { background: transparent; }

/* 应用授权：列表 + 分页 */
.g-tb { width: 100%; border-collapse: collapse; }
.g-tb th,
.g-tb td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
    font-size: 13px;
}
.g-tb th { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.g-tb th:first-child,
.g-tb td:first-child { padding-left: 0; }
.g-tb th:last-child,
.g-tb td:last-child { padding-right: 0; }
.g-tb tbody tr:last-child td { border-bottom: 0; }
.g-tb tbody tr:hover { background: #f5f5f5; }
.g-tb .nowrap { white-space: nowrap; }
.g-tb .act { text-align: right; white-space: nowrap; }

.g-app { display: flex; align-items: center; gap: 10px; }
.g-app-t { min-width: 0; }
.g-app-t b { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
.g-app-t span { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-2); }
.x-app-logo.sm { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 7px; }
.x-app-logo.sm.rect { width: 104px; }

.g-pager {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.g-pager .grow { flex: 1; }
.g-pager a,
.g-pager .cur,
.g-pager .off {
    padding: 3px 9px;
    border: 1px solid var(--line);
    border-radius: 5px;
    font-size: 12px;
    color: var(--ink-2);
    text-decoration: none;
}
.g-pager a:hover { background: #f1f3f4; color: var(--ink); }
.g-pager .cur { background: var(--accent); border-color: var(--accent); color: #fff; }
.g-pager .off { opacity: .45; }

/* 卡片底部的高危操作区 */
.g-danger {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f1f3f4;
}

.g-danger p { font-size: 12px; color: var(--ink-2); line-height: 1.7; margin: 0 0 12px; }
.g-danger p .bi { color: var(--danger); margin-right: 4px; }
.g-danger .x-btn { width: auto; }

/* 登录记录：一条记录 = 时间行 + 设备行，整体作为一个块 */
.g-log { padding: 12px 0; border-bottom: 1px solid var(--line); }
.g-log:first-child { border-top: 1px solid #f1f3f4; }
.g-log:last-child { border-bottom: 0; padding-bottom: 2px; }

.g-log-t {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    font-size: 13px;
}

.g-ua { margin-top: 6px; line-height: 1.6; word-break: break-all; }

@media (max-width: 900px) {
    .g-cols { grid-template-columns: minmax(0, 1fr); }
    .g-menu { position: static; }
    .g-scroll { max-height: 320px; }
}

