/* ============================================================
   圣麟社区 —— 液态玻璃主题（淡蓝 → 青绿）
   流动水底 + 毛玻璃浮层；手机竖屏优先，≥900px 自动切换电脑端双栏
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
    --primary: #11998e;
    --primary-2: #38bdf8;
    --primary-deep: #0b7c74;
    --text: #10323a;
    --text2: #5b7c86;
    --danger: #f5455c;
    --gold: #ff9d42;

    /* 玻璃层 */
    --glass: rgba(255, 255, 255, 0.50);
    --glass-soft: rgba(255, 255, 255, 0.34);
    --glass-strong: rgba(255, 255, 255, 0.64);
    --glass-border: rgba(255, 255, 255, 0.72);
    --blur: blur(18px) saturate(175%);
    --blur-soft: blur(12px) saturate(150%);
    --glass-shadow: 0 8px 26px rgba(8, 61, 74, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    --radius: 22px;

    --tabbar-h: 62px;
}
html, body { height: 100%; }
body {
    font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    background: #dff2f6; color: var(--text); font-size: 15px;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-deep); text-decoration: none; }
img { vertical-align: middle; }
button { font-family: inherit; }

/* ============ 应用容器 ============ */
#app {
    position: relative; margin: 0 auto; max-width: 480px; height: 100dvh;
    overflow: hidden; display: flex; flex-direction: column;
    background: linear-gradient(165deg, #dbeafe 0%, #c7f0ec 45%, #a9efe0 100%);
    box-shadow: 0 0 60px rgba(20, 90, 110, .25);
}

/* ---- 水底：淡蓝→青绿的流动光斑 ---- */
#app::before {
    content: ''; position: absolute; inset: -25%;
    background:
        radial-gradient(42% 42% at 20% 18%, rgba(125, 211, 252, .80), transparent 68%),
        radial-gradient(40% 40% at 82% 26%, rgba(94, 234, 212, .70), transparent 70%),
        radial-gradient(45% 45% at 60% 88%, rgba(52, 211, 153, .60), transparent 70%),
        radial-gradient(34% 34% at 22% 80%, rgba(147, 197, 253, .65), transparent 72%),
        radial-gradient(30% 30% at 52% 52%, rgba(167, 243, 208, .55), transparent 70%);
    filter: blur(34px);
    animation: waterDrift 22s ease-in-out infinite alternate;
    z-index: 0; pointer-events: none;
}
@keyframes waterDrift {
    0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
    50%  { transform: translate(3%, -2%) rotate(5deg) scale(1.08); }
    100% { transform: translate(-3%, 2%) rotate(-6deg) scale(1.14); }
}
#app::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.32) 0%, transparent 22%, transparent 78%, rgba(255,255,255,.24) 100%);
    z-index: 0; pointer-events: none;
}

/* ============ 顶栏（玻璃条） ============ */
#topbar {
    position: relative; z-index: 5;
    margin: 10px 12px 0; height: 52px; padding: 0 8px 0 16px;
    padding-top: env(safe-area-inset-top);
    display: flex; align-items: center; gap: 8px;
    background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border); border-radius: 20px; box-shadow: var(--glass-shadow);
}
.tb-title {
    font-size: 17px; font-weight: 800; flex: 1; letter-spacing: .5px;
    background: linear-gradient(120deg, #0e7490, #11998e, #0ea5e9);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 1px 0 rgba(255,255,255,.85));
}
.tb-btn {
    background: var(--glass-soft); backdrop-filter: var(--blur-soft); -webkit-backdrop-filter: var(--blur-soft);
    border: 1px solid var(--glass-border); color: var(--text);
    border-radius: 16px; padding: 8px 14px; font-size: 14px; min-height: 38px; font-weight: 600;
}
.tb-btn:active { background: rgba(255,255,255,.75); }

/* ============ 内容区（手机：单列；电脑：左侧栏） ============ */
#sidebar {
    position: relative; z-index: 2; flex: 1; min-height: 0;
    display: flex; flex-direction: column;
}
#desk-tabs { display: none; }

/* ============ 底部导航（手机） ============ */
#tabbar {
    position: relative; z-index: 5; flex-shrink: 0;
    margin: 8px 14px calc(12px + env(safe-area-inset-bottom));
    height: var(--tabbar-h); display: flex; align-items: center;
    background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border); border-radius: 26px;
    box-shadow: 0 10px 30px rgba(8, 61, 74, .16), inset 0 1px 0 rgba(255,255,255,.9);
}
.tab {
    flex: 1; height: 100%; background: none; border: none; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--text2); border-radius: 22px; position: relative;
    transition: background .2s, color .2s;
}
.tab-ico {
    font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center;
    width: 40px; height: 30px; border-radius: 14px; transition: transform .2s;
}
.tab-txt { font-size: 11px; font-weight: 600; }
.tab.on { color: var(--primary-deep); }
.tab.on .tab-ico {
    background: linear-gradient(135deg, rgba(17,153,142,.22), rgba(56,189,248,.22));
    transform: translateY(-2px) scale(1.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}
.tab:active .tab-ico { transform: scale(.92); }

/* ============ 页签页 ============ */
.page {
    flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 10px;
}
.chat-item, .menu, .me-points-card {
    background: var(--glass);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
}
.list { display: flex; flex-direction: column; gap: 10px; }
.sec-head {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px; font-weight: 700; color: var(--text2); padding: 8px 6px 0; letter-spacing: .5px;
}
.chat-item {
    display: flex; align-items: center; gap: 11px; border-radius: var(--radius);
    padding: 12px 14px; cursor: pointer; transition: transform .12s, background .2s;
}
.chat-item:hover { background: rgba(255,255,255,.68); }
.chat-item:active { transform: scale(.975); background: rgba(255,255,255,.78); }
.ci-avatar {
    width: 46px; height: 46px; border-radius: 15px; flex-shrink: 0; object-fit: cover;
    box-shadow: 0 3px 10px rgba(8,61,74,.16);
}
.ci-avatar.gav {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(56,189,248,.28), rgba(17,153,142,.28));
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    font-size: 21px; color: var(--primary-deep);
}
.ci-body { flex: 1; min-width: 0; }
.ci-name {
    font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    display: flex; align-items: center;
}
.ci-sub { font-size: 12px; color: var(--text2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-arrow { color: rgba(16,50,58,.3); font-size: 20px; flex-shrink: 0; font-weight: 700; }
.ci-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; align-self: flex-start; padding-top: 3px; }
.ci-time { font-size: 11px; color: rgba(16,50,58,.35); }
.btn-join {
    background: linear-gradient(135deg, #11998e, #38bdf8); color: #fff; border: none;
    border-radius: 16px; padding: 7px 16px; font-size: 13px; flex-shrink: 0; min-height: 34px; font-weight: 600;
    box-shadow: 0 4px 14px rgba(17,153,142,.35);
}
.btn-join:active { transform: scale(.94); }
.link-btn {
    border: 1px solid var(--glass-border); background: var(--glass-soft);
    backdrop-filter: var(--blur-soft); -webkit-backdrop-filter: var(--blur-soft);
    color: var(--primary-deep); border-radius: 14px; padding: 6px 12px; font-size: 12px; min-height: 30px; font-weight: 600;
}
.empty-tip { text-align: center; color: var(--text2); font-size: 13px; padding: 40px 20px; }
.mini-tip { text-align: center; color: var(--text2); font-size: 12px; padding: 8px 0; }

/* ---- 未读角标 ---- */
.unread-badge {
    min-width: 19px; height: 19px; border-radius: 10px;
    background: linear-gradient(135deg, #ff6b81, #f5455c); color: #fff;
    font-size: 11px; font-weight: 800; line-height: 19px; text-align: center; padding: 0 5px; flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(245,69,92,.4), inset 0 1px 0 rgba(255,255,255,.45);
}
#tabbar .tab .unread-badge, #desk-tabs .dtab .unread-badge { position: absolute; top: 4px; left: calc(50% + 4px); }

/* ============ 蓝V ============ */
.vbadge {
    display: inline-block; width: 16px; height: 16px; border-radius: 50%;
    background: linear-gradient(135deg, #4ac8f5, #0e8fd6); color: #fff;
    font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; margin-left: 4px; flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(14,143,214,.45), inset 0 1px 0 rgba(255,255,255,.5);
}

/* ============ 我的 ============ */
.me-card {
    border-radius: 26px; padding: 24px 20px; display: flex; align-items: center; gap: 14px;
    background: linear-gradient(135deg, rgba(255,255,255,.55), rgba(255,255,255,.30));
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
}
.me-avatar {
    width: 66px; height: 66px; border-radius: 50%; border: 2px solid rgba(255,255,255,.9);
    box-shadow: 0 6px 18px rgba(8,61,74,.22); flex-shrink: 0; background: #fff;
}
.me-info { flex: 1; min-width: 0; }
.me-name { font-size: 19px; font-weight: 800; display: flex; align-items: center; }
.me-sig { font-size: 12px; color: var(--text2); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-points-card {
    border-radius: var(--radius); padding: 15px 18px;
    display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--text2);
}
.me-points-card b { font-size: 21px; color: var(--gold); filter: drop-shadow(0 2px 4px rgba(255,157,66,.3)); }
.menu { border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; }
.menu-item {
    background: none; border: none; text-align: left; cursor: pointer;
    padding: 15px 18px; font-size: 15px; color: var(--text);
    display: flex; align-items: center; gap: 11px;
    border-bottom: 1px solid rgba(255,255,255,.55); min-height: 52px; font-weight: 500;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: rgba(255,255,255,.42); }
.menu-item:active { background: rgba(255,255,255,.6); }
.menu-item.danger { color: var(--danger); }
.mi-ico { font-size: 17px; }
.mi-extra { margin-left: auto; font-size: 12px; color: var(--text2); }
.menu-item:disabled { color: var(--text2); }

/* ============ 聊天页 ============ */
#page-chat {
    position: absolute; inset: 0; z-index: 30;
    display: none; flex-direction: column;
    background: rgba(219, 244, 244, .42);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
#page-chat.show { display: flex; }
#chat-head {
    flex-shrink: 0; display: flex; align-items: center; gap: 6px;
    margin: 10px 12px 0; min-height: 54px; padding: 8px 8px;
    padding-top: calc(8px + env(safe-area-inset-top));
    background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border); border-radius: 20px; box-shadow: var(--glass-shadow);
}
.ch-body { flex: 1; min-width: 0; text-align: center; }
#chat-title { font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-sub { font-size: 11px; color: var(--text2); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#btn-back { background: none; border: none; font-size: 22px; padding: 4px 10px; color: var(--text); }
.tb-btn.quit { font-size: 12px; padding: 6px 10px; }

#announcement {
    margin: 10px 14px 0; flex-shrink: 0;
    background: rgba(255, 236, 190, .42); backdrop-filter: var(--blur-soft); -webkit-backdrop-filter: var(--blur-soft);
    border: 1px solid rgba(255, 205, 100, .5); border-radius: 16px;
    color: #8a6a00; font-size: 12px; padding: 8px 14px;
}
#msg-list {
    flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 16px 14px 10px; display: flex; flex-direction: column; justify-content: flex-end;
}

/* ---- 玻璃气泡 ---- */
.msg { display: flex; gap: 9px; margin-bottom: 15px; max-width: 86%; }
.msg.mine { margin-left: auto; flex-direction: row-reverse; }
.msg-avatar {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    border: 1.5px solid rgba(255,255,255,.85); box-shadow: 0 3px 10px rgba(8,61,74,.18);
}
.msg-main { min-width: 0; }
.msg-meta { font-size: 11px; color: var(--text2); margin-bottom: 3px; display: flex; align-items: center; gap: 4px; }
.msg.mine .msg-meta { justify-content: flex-end; }
.bubble {
    background: var(--glass-strong);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border); border-radius: 4px 18px 18px 18px;
    padding: 10px 14px; word-break: break-word; white-space: pre-wrap; font-size: 15px; line-height: 1.5;
    box-shadow: var(--glass-shadow);
}
.msg.mine .bubble {
    background: linear-gradient(135deg, rgba(17,153,142,.88), rgba(56,189,248,.85));
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 18px 4px 18px 18px;
    box-shadow: 0 6px 20px rgba(17,153,142,.32);
}
.bubble img.chat-img { max-width: 220px; max-height: 260px; border-radius: 12px; display: block; }
.img-cap { margin-top: 5px; font-size: 13px; }

.file-card {
    display: flex; align-items: center; gap: 10px;
    background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border); border-radius: 18px; padding: 12px 14px; min-width: 210px;
    box-shadow: var(--glass-shadow);
}
.msg.mine .file-card { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.3); }
.msg.mine .file-card .fc-size, .msg.mine .fc-dl { color: rgba(255,255,255,.85); }
.file-ico { font-size: 28px; flex-shrink: 0; }
.fc-body { flex: 1; min-width: 0; }
.fc-name { font-size: 14px; font-weight: 700; word-break: break-all; }
.fc-size { font-size: 11px; color: var(--text2); margin-top: 2px; }
.fc-dl { font-size: 13px; white-space: nowrap; flex-shrink: 0; font-weight: 600; }
.msg.mine .fc-dl { color: #fff; text-decoration: underline; }

.transfer-card {
    background: linear-gradient(135deg, rgba(255,157,66,.92), rgba(255,120,80,.88));
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.4); color: #fff;
    border-radius: 18px; padding: 13px 15px; min-width: 200px;
    box-shadow: 0 8px 22px rgba(255,140,70,.4);
}
.tc-t { font-size: 15px; font-weight: 700; }
.tc-n { font-size: 11px; opacity: .9; margin-top: 3px; }

.msg-system {
    align-self: center; text-align: center; color: var(--text2); font-size: 11px; margin: 8px 0;
    background: var(--glass-soft); border: 1px solid var(--glass-border); border-radius: 14px; padding: 5px 12px;
    backdrop-filter: var(--blur-soft); -webkit-backdrop-filter: var(--blur-soft);
}

/* ---- 输入台 ---- */
#composer {
    flex-shrink: 0; display: flex; align-items: flex-end; gap: 8px;
    margin: 6px 12px calc(12px + env(safe-area-inset-bottom)); padding: 8px 10px;
    background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border); border-radius: 24px;
    box-shadow: 0 10px 30px rgba(8,61,74,.14), inset 0 1px 0 rgba(255,255,255,.85);
}
.icon-btn {
    border: 1px solid var(--glass-border); background: var(--glass-soft);
    color: var(--text2); width: 40px; height: 40px; border-radius: 50%; font-size: 20px; flex-shrink: 0;
}
#input {
    flex: 1; border: none; outline: none; resize: none; font-size: 15px;
    padding: 9px 14px; max-height: 110px; font-family: inherit;
    background: rgba(255,255,255,.55); border-radius: 18px; line-height: 1.4; color: var(--text);
}
#input::placeholder { color: rgba(16,50,58,.35); }
.btn-send {
    background: linear-gradient(135deg, #11998e, #38bdf8); color: #fff;
    border: none; border-radius: 18px; padding: 9px 17px; font-size: 14px;
    flex-shrink: 0; min-height: 40px; font-weight: 700;
    box-shadow: 0 5px 16px rgba(17,153,142,.4);
}
.btn-send:active { transform: scale(.94); }

/* ============ 弹窗 ============ */
.modal-mask {
    position: fixed; inset: 0; background: rgba(10, 40, 55, .32);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    display: none; align-items: flex-end; justify-content: center; z-index: 100;
}
.modal-mask.show { display: flex; }
.modal {
    width: 100%; max-width: 480px;
    background: var(--glass-strong);
    backdrop-filter: blur(26px) saturate(180%); -webkit-backdrop-filter: blur(26px) saturate(180%);
    border: 1px solid rgba(255,255,255,.85); border-bottom: none;
    border-radius: 28px 28px 0 0; padding: 10px 20px calc(22px + env(safe-area-inset-bottom));
    max-height: 88dvh; overflow-y: auto;
    box-shadow: 0 -12px 40px rgba(8,61,74,.25);
    animation: slideUp .25s ease-out;
}
@keyframes slideUp { from { transform: translateY(45%); opacity: .4; } to { transform: none; opacity: 1; } }
.modal-bar { width: 40px; height: 4.5px; border-radius: 3px; background: rgba(16,50,58,.22); margin: 4px auto 12px; }
.modal h3 { font-size: 17px; margin-bottom: 4px; }
.lbl { display: block; font-size: 12px; color: var(--text2); margin: 14px 0 6px; font-weight: 600; }
.modal-ops { display: flex; gap: 10px; margin-top: 22px; }
.modal-ops .btn { flex: 1; min-height: 46px; }
.btn {
    border: 1px solid var(--glass-border); background: var(--glass-soft);
    backdrop-filter: var(--blur-soft); -webkit-backdrop-filter: var(--blur-soft);
    color: var(--text); border-radius: 16px; padding: 11px 16px; font-size: 14px;
    cursor: pointer; min-height: 46px; font-weight: 600;
}
.btn:hover { background: rgba(255,255,255,.6); }
.btn:active { background: rgba(255,255,255,.78); transform: scale(.98); }
.btn-primary {
    background: linear-gradient(135deg, #11998e, #38bdf8); border: none; color: #fff;
    box-shadow: 0 6px 18px rgba(17,153,142,.4);
}
.btn-mini { padding: 6px 12px; font-size: 12px; min-height: 34px; border-radius: 12px; }
.btn-accept { background: linear-gradient(135deg, #11998e, #38bdf8); border: none; color: #fff; }
.btn-danger-mini { color: var(--danger); border-color: rgba(245,69,92,.4); }
.ipt {
    width: 100%; border: 1px solid rgba(255,255,255,.7); border-radius: 14px;
    padding: 11px 14px; font-size: 14px; outline: none;
    background: rgba(255,255,255,.55); color: var(--text); min-height: 46px;
    transition: border .15s, background .15s;
}
.ipt:focus { border-color: var(--primary); background: rgba(255,255,255,.8); }
.ipt::placeholder { color: rgba(16,50,58,.35); }
.load-more {
    display: block; margin: 0 auto 14px; background: var(--glass-soft);
    border: 1px solid var(--glass-border); backdrop-filter: var(--blur-soft); -webkit-backdrop-filter: var(--blur-soft);
    color: var(--text2); border-radius: 16px; padding: 8px 18px; font-size: 13px; min-height: 36px;
}
.req-avatar { background: linear-gradient(135deg, rgba(255,157,66,.4), rgba(255,120,120,.4)); }
.req-item { display: flex; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.6); }
.req-item:last-child { border-bottom: none; }
.req-note { font-size: 12px; color: var(--text2); margin-top: 2px; }
.req-ops { display: flex; gap: 6px; margin-left: auto; flex-shrink: 0; align-items: center; }
.modal .sec-label { font-size: 12px; color: var(--text2); margin: 16px 0 4px; font-weight: 700; letter-spacing: .5px; }
.tag {
    display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 6px;
    background: rgba(16,50,58,.08); color: var(--text2); vertical-align: 1px; font-weight: 600;
}
.tag-ok { background: rgba(17, 153, 142, .16); color: #0b7c74; }
.tag-refused { background: rgba(16,50,58,.08); color: var(--text2); }

/* ---- Toast ---- */
#toast {
    position: fixed; top: calc(74px + env(safe-area-inset-top)); left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(12, 55, 62, .78);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,.25); color: #fff;
    padding: 11px 20px; border-radius: 22px; font-size: 13px;
    opacity: 0; pointer-events: none; transition: all .25s; z-index: 200;
    max-width: 80vw; text-align: center; box-shadow: 0 10px 30px rgba(8,40,48,.3);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: rgba(200, 40, 60, .85); }

/* ============ 登录 / 注册 ============ */
.auth-body {
    min-height: 100dvh; display: flex; align-items: center; justify-content: center;
    padding: 20px 16px; position: relative; overflow: hidden;
    background: linear-gradient(165deg, #dbeafe 0%, #c7f0ec 45%, #a9efe0 100%);
}
.auth-body::before {
    content: ''; position: absolute; inset: -25%;
    background:
        radial-gradient(40% 40% at 20% 25%, rgba(125, 211, 252, .85), transparent 68%),
        radial-gradient(38% 38% at 80% 30%, rgba(94, 234, 212, .75), transparent 70%),
        radial-gradient(42% 42% at 60% 90%, rgba(52, 211, 153, .65), transparent 70%),
        radial-gradient(30% 30% at 28% 85%, rgba(147, 197, 253, .7), transparent 72%);
    filter: blur(36px); animation: waterDrift 24s ease-in-out infinite alternate;
}
.auth-card {
    position: relative; width: 100%; max-width: 400px;
    background: var(--glass-strong);
    backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,.85); border-radius: 30px; padding: 36px 26px;
    box-shadow: 0 20px 60px rgba(8, 61, 74, .22), inset 0 1px 0 rgba(255,255,255,.95);
}
.auth-logo { font-size: 25px; text-align: center; margin-bottom: 6px; font-weight: 800; }
.auth-sub { text-align: center; color: var(--text2); margin-bottom: 24px; font-size: 13px; }
.auth-err {
    background: rgba(245, 69, 92, .14); border: 1px solid rgba(245,69,92,.3);
    color: var(--danger); border-radius: 14px; padding: 10px 12px; margin-bottom: 14px; font-size: 13px;
}
.auth-card .ipt { margin-bottom: 13px; }
.auth-card .btn-block { font-size: 16px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--text2); }

/* 管理端独立入口：深色玻璃 */
.auth-body.mgr { background: linear-gradient(165deg, #0b2029 0%, #0f3b3f 55%, #13565c 100%); }
.mgr-shield {
    width: 66px; height: 66px; margin: 0 auto 14px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(56,189,248,.9), rgba(17,153,142,.9));
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center; font-size: 30px;
    border: 1px solid rgba(255,255,255,.35);
    box-shadow: 0 10px 30px rgba(20, 150, 160, .5), inset 0 1px 0 rgba(255,255,255,.5);
}
.auth-card.mgr-card { background: rgba(18, 52, 60, .55); border-color: rgba(255,255,255,.18); }
.mgr-card .auth-logo { color: #e6fbff; }
.mgr-card .auth-sub { color: rgba(230,251,255,.6); }
.mgr-card .ipt { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); color: #e6fbff; }
.mgr-card .ipt::placeholder { color: rgba(230,251,255,.4); }
.mgr-card .auth-foot a { color: rgba(230,251,255,.55); }
.mgr-btn {
    background: linear-gradient(135deg, #11998e, #38bdf8); border: none; color: #fff; font-weight: 700;
    box-shadow: 0 8px 24px rgba(17,153,142,.5);
}

/* ============================================================
   电脑端（≥900px）：左侧栏 + 右侧聊天区 双栏自适应
   ============================================================ */
@media (min-width: 900px) {
    #app {
        max-width: 1280px; height: 100dvh;
        padding: 0 18px 18px; margin: 0 auto;
        display: grid;
        grid-template-columns: 340px minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        gap: 14px;
        background: none; box-shadow: none;
    }
    #app::before, #app::after { border-radius: 26px; }

    #topbar { grid-column: 1 / 3; grid-row: 1; margin: 16px 0 0; height: 56px; }

    #sidebar {
        grid-column: 1; grid-row: 2;
        overflow-y: auto; -webkit-overflow-scrolling: touch;
        padding-right: 4px;
        display: flex; flex-direction: column; gap: 10px;
    }
    #desk-tabs {
        display: flex; gap: 6px; flex-shrink: 0;
        background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
        border: 1px solid var(--glass-border); border-radius: 18px; padding: 6px;
        box-shadow: var(--glass-shadow);
    }
    .dtab {
        flex: 1; background: none; border: none; cursor: pointer; position: relative;
        padding: 9px 6px; border-radius: 14px; font-size: 13px; font-weight: 600; color: var(--text2);
        min-height: 40px;
    }
    .dtab:hover { background: rgba(255,255,255,.45); }
    .dtab.on {
        color: #fff;
        background: linear-gradient(135deg, #11998e, #38bdf8);
        box-shadow: 0 4px 14px rgba(17,153,142,.35);
    }

    .page { padding: 0; flex: none; }
    #tabbar { display: none; }

    #page-chat {
        grid-column: 2; grid-row: 2;
        position: relative; inset: auto;
        display: flex;                 /* 电脑端常驻显示 */
        border-radius: 26px; overflow: hidden;
        background: rgba(255, 255, 255, .34);
        border: 1px solid var(--glass-border);
        box-shadow: var(--glass-shadow);
    }
    #chat-head { margin: 12px 12px 0; border-radius: 18px; }
    #btn-back { display: none; }
    #composer { margin: 6px 12px 12px; }
    .msg { max-width: 72%; }
    .bubble img.chat-img { max-width: 320px; max-height: 340px; }
    #msg-list { padding: 18px 18px 10px; }

    /* 电脑端弹窗改为居中卡片 */
    .modal-mask { align-items: center; }
    .modal {
        max-width: 460px; border-radius: 28px; border-bottom: 1px solid rgba(255,255,255,.85);
        animation: popIn .2s ease-out;
    }
    @keyframes popIn { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
    .modal-bar { display: none; }
}

/* 平板中间尺寸（600–899px）适度放宽 */
@media (min-width: 600px) and (max-width: 899px) {
    #app { max-width: 560px; }
    .msg { max-width: 80%; }
}
