:root {
    color-scheme: light;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    --text: #18243e;
    --muted: #53627e;
    --blue: #294ee1;
    --blue-hover: #2040c7;
    --line: #dce4f1;
    --glass: rgba(255, 255, 255, .72);
    --danger: #c23b3b;
    --header-h: 58px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(ellipse at 5% 29%, #dde9ff 0%, transparent 39%),
        radial-gradient(ellipse at 90% 16%, #e6e2fa 0%, transparent 34%),
        radial-gradient(ellipse at 72% 86%, #d8edf0 0%, transparent 42%),
        #f2f5fb;
    font-size: 15px;
    line-height: 1.55;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
button:focus-visible, input:focus-visible { outline: 3px solid #7492ff; outline-offset: 2px; }
h1, p { margin: 0; }

/* ---------- 品牌标志 ---------- */
.brand-mark {
    width: 30px; height: 30px; border-radius: 9px; flex: none;
    background: linear-gradient(135deg, #3d63f2, #6f4fe0);
    display: grid; place-items: center;
    box-shadow: 0 6px 16px rgba(41, 78, 225, .28);
}
.brand-mark i { width: 12px; height: 12px; border-radius: 50%; border: 3px solid #fff; }

/* ---------- 按钮与输入 ---------- */
.button {
    border: 1px solid transparent; border-radius: 12px; padding: 9px 16px;
    font-weight: 600; transition: background .15s, border-color .15s;
}
.button-primary { background: var(--blue); color: #fff; }
.button-primary:hover:not(:disabled) { background: var(--blue-hover); }
.button-quiet { background: transparent; color: var(--muted); border-color: var(--line); }
.button-quiet:hover { background: rgba(255, 255, 255, .7); color: var(--text); }
.field-label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
.field {
    width: 100%; padding: 11px 13px; border-radius: 12px;
    border: 1px solid var(--line); background: #fff; color: var(--text);
}
.field:focus { border-color: #7492ff; outline: none; }
.form-note { min-height: 22px; margin: 10px 0 4px; font-size: 13px; color: var(--danger); }

/* ---------- 登录页 ---------- */
.login-page { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.login-card {
    width: min(400px, 100%); padding: 32px 28px;
    background: var(--glass); border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 24px; backdrop-filter: blur(18px);
    box-shadow: 0 20px 60px rgba(32, 52, 110, .12);
}
.login-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; margin-bottom: 26px; }
.login-card h1 { font-size: 24px; }
.login-sub { color: var(--muted); margin-top: 4px; }
.login-card .button-primary { width: 100%; padding: 12px; }

/* ---------- 应用外壳 ---------- */
.shell { height: 100%; display: flex; flex-direction: column; }
.shell-header {
    height: var(--header-h); flex: none;
    display: flex; align-items: center; gap: 18px; padding: 0 16px;
    background: rgba(255, 255, 255, .78); border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}
.shell-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; white-space: nowrap; }
.app-tabs { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.app-tabs::-webkit-scrollbar { display: none; }
.app-tab {
    border: 0; background: transparent; color: var(--muted);
    padding: 8px 16px; border-radius: 10px; font-weight: 600; white-space: nowrap;
}
.app-tab:hover { color: var(--text); background: rgba(41, 78, 225, .06); }
.app-tab[aria-selected="true"] { color: var(--blue); background: rgba(41, 78, 225, .1); }
.shell-account { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.shell-user { color: var(--muted); font-size: 14px; }
.shell-account .button { padding: 6px 12px; }
.app-stage { flex: 1; min-height: 0; position: relative; }
.app-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; }
.empty-apps { padding: 40px; text-align: center; color: var(--muted); }

@media (max-width: 640px) {
    .shell-header { gap: 8px; padding: 0 10px; }
    .shell-brand span:last-child, .shell-user { display: none; }
    .app-tab { padding: 8px 11px; }
}
