/* ============================================================
   Healthy Zone · Frutiger Aero 水光玻璃风
   设计要点：
   - 晴空水色渐变背景（缓慢漂移）+ 水面波光 + 缓缓上升的气泡（JS 生成）
   - 顶栏改 Aero 磨砂玻璃（backdrop-filter），全站去扁平化
   - 磁铁变「水光玻璃片」：PHP 内联底色保留为色相，CSS 叠加光泽渐变
     （顶部高光 + 底部内阴影 + 斜向扫光），圆角果冻质感
   - Segoe UI / 微软雅黑（Vista 时代字体栈，Aero 本命字体），大数字用 Light
   - 动效：入场弹跳 / 统计条生长 + 流光 / 气泡上浮 / 铃铛摆动 / 按钮按压力反馈
   - 尊重 prefers-reduced-motion
   ============================================================ */

:root {
    --aqua: #2E9FD4;         /* 深天水蓝（主色） */
    --aqua-deep: #1B7DB5;
    --teal: #00AFA0;         /* 清潭青 */
    --leaf: #74B83B;         /* 新叶绿 */
    --orange: #FF8A3D;       /* 鲜橙 */
    --red: #E8564A;          /* 珊瑚红 */
    --pink: #F26BB0;
    --violet: #8E6BCF;
    --lavender: #7E7CD8;
    --sun: #FFC93C;          /* 晴日黄 */
    --sky-top: #6FC3F0;
    --sky-mid: #C2E9FF;
    --sky-bot: #E2F7E7;
    --ink: #1D4B5E;          /* 深水笔墨色 */
    --muted: #5B7B8A;
    --panel: rgba(255, 255, 255, .72);
    --line: #C9E4F0;
    --font: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }

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

body {
    font-family: var(--font);
    background: linear-gradient(165deg, var(--sky-top) 0%, var(--sky-mid) 46%, #DDF3E9 76%, var(--sky-bot) 100%) fixed;
    background-size: 100% 170%;
    animation: skyDrift 30s ease-in-out infinite alternate;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.55;
    min-height: 100vh;
}

/* 天空缓缓飘移：整幅渐变上下呼吸，像云层在动 */
@keyframes skyDrift {
    from { background-position: 50% 0%; }
    to { background-position: 50% 100%; }
}

/* 水面波光：两团柔光在背景里缓慢游动 */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(46% 38% at 14% 10%, rgba(255, 255, 255, .55), transparent 70%),
        radial-gradient(38% 32% at 86% 26%, rgba(255, 255, 255, .38), transparent 70%),
        radial-gradient(30% 26% at 60% 84%, rgba(174, 231, 255, .4), transparent 70%);
    animation: lightDance 20s ease-in-out infinite alternate;
}
@keyframes lightDance {
    from { transform: translate(0, 0); }
    to { transform: translate(3%, -2.5%); }
}

/* 气泡层（JS 生成 .bubble） */
.bubbles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.bubble {
    position: absolute;
    bottom: -90px;
    border-radius: 50%;
    background: radial-gradient(circle at 31% 27%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .3) 40%, rgba(165, 224, 255, .14) 68%, rgba(165, 224, 255, .38) 100%);
    border: 1px solid rgba(255, 255, 255, .8);
    box-shadow: inset 0 -4px 10px rgba(120, 190, 235, .35), 0 1px 4px rgba(120, 190, 235, .25);
    animation: bubbleRise linear infinite;
}
@keyframes bubbleRise {
    0%   { transform: translateY(0) translateX(0) scale(.68); opacity: 0; }
    10%  { opacity: .9; }
    55%  { transform: translateY(-52vh) translateX(16px) scale(1); }
    90%  { opacity: .65; }
    100% { transform: translateY(-108vh) translateX(-10px) scale(1.06); opacity: 0; }
}

a { color: inherit; }

/* 内容层抬到气泡之上 */
.main, .footer, .auth-wrap { position: relative; z-index: 1; }

/* ---------------- 顶栏：Aero 磨砂玻璃 ---------------- */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .5));
    backdrop-filter: blur(16px) saturate(1.7);
    -webkit-backdrop-filter: blur(16px) saturate(1.7);
    border-bottom: 1px solid rgba(255, 255, 255, .9);
    box-shadow: 0 2px 18px rgba(31, 120, 170, .18), inset 0 1px 0 rgba(255, 255, 255, .95);
}
.topbar-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: var(--ink);
    margin-right: 6px;
}
/* 徽标：抛光玻璃球，缓缓浮动 */
.logo-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    font-size: 19px;
    background:
        radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .4) 16%, transparent 34%),
        radial-gradient(circle at 50% 55%, #7BD0F5 0%, var(--aqua) 58%, var(--aqua-deep) 100%);
    box-shadow: 0 3px 10px rgba(23, 119, 166, .45), inset 0 -3px 6px rgba(0, 60, 110, .4);
    animation: orbBob 5s ease-in-out infinite;
}
@keyframes orbBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2.5px); }
}
.logo-text {
    font-size: 16px;
    font-weight: 600;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .8);
}
.nav {
    display: flex;
    flex: 1;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav-item {
    padding: 7px 14px;
    color: #35677E;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    border-radius: 999px;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.nav-item:hover { background: rgba(46, 159, 212, .14); color: var(--aqua-deep); }
.nav-item.active {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .4), rgba(255, 255, 255, 0) 55%, rgba(0, 60, 110, .14)),
        linear-gradient(180deg, #58BCE8, var(--aqua));
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 3px 8px rgba(23, 119, 166, .4);
    text-shadow: 0 1px 2px rgba(0, 50, 90, .35);
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.bell {
    position: relative;
    font-size: 19px;
    text-decoration: none;
    padding: 4px 6px;
    line-height: 1;
    border-radius: 8px;
    transition: background .15s ease;
}
.bell:hover { background: rgba(46, 159, 212, .15); }
/* 有未读时铃铛轻轻摇摆 */
.bell:has(.badge) {
    animation: bellSwing 2.4s ease-in-out infinite;
    transform-origin: top center;
}
@keyframes bellSwing {
    0%, 100% { transform: rotate(0); }
    12% { transform: rotate(16deg); }
    26% { transform: rotate(-13deg); }
    40% { transform: rotate(9deg); }
    54% { transform: rotate(-6deg); }
    68% { transform: rotate(3deg); }
}
/* 角标：抛光红果 */
.badge {
    position: absolute;
    top: -7px; right: -9px;
    min-width: 19px; height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: radial-gradient(circle at 32% 26%, #FFA3A5 0%, var(--red) 52%, #C23027 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 2px 5px rgba(200, 40, 30, .45);
    text-shadow: 0 1px 1px rgba(140, 20, 10, .4);
}
.userchip {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    text-decoration: none;
    padding: 3px 8px 3px 4px;
    font-size: 13px;
    border-radius: 999px;
    transition: background .15s ease;
}
.userchip:hover { background: rgba(46, 159, 212, .14); }
.userchip-name { max-width: 96px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.logout {
    color: #35677E;
    font-size: 13px;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 999px;
    transition: background .15s ease, color .15s ease;
}
.logout:hover { background: rgba(232, 86, 74, .85); color: #fff; }

/* 头像：玻璃圆环包裹 */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #BFE6F8, #8FD0EE);
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    font-size: 22px;
    color: #fff;
    flex: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .8), 0 0 0 5px rgba(46, 159, 212, .3), 0 3px 8px rgba(23, 119, 166, .35);
    text-shadow: 0 1px 2px rgba(0, 60, 110, .4);
}
.avatar-none { font-size: 15px; }
.topbar .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 0 0 3.5px rgba(46, 159, 212, .3); }

/* ---------------- 主内容区 ---------------- */
.main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 78px 16px 30px;
}

.flash {
    padding: 10px 18px;
    margin-bottom: 14px;
    font-size: 14px;
    color: #fff;
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 12px rgba(23, 119, 166, .25);
    animation: cardIn .4s ease backwards;
}
.flash-ok {
    background: linear-gradient(180deg, #8CC85A, var(--leaf));
}
.flash-err {
    background: linear-gradient(180deg, #F27A6C, var(--red));
}

.page-head {
    margin: 4px 0 16px;
    display: flex;
    align-items: baseline;
    gap: 12px;
    animation: headIn .5s ease backwards;
}
@keyframes headIn {
    from { opacity: 0; transform: translateY(-8px); }
}
.page-head-title {
    font-size: 24px;
    font-weight: 300; /* Segoe UI Light */
    letter-spacing: .5px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .75);
}
.page-head-sub { font-size: 13px; opacity: .75; }

.footer {
    max-width: 1240px;
    margin: 10px auto 26px;
    padding: 0 16px;
    font-size: 12px;
    color: rgba(29, 75, 94, .55);
    text-align: center;
}

/* ---------------- 水光玻璃磁铁（PC 多列 / 手机单列） ---------------- */
.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin: 0 0 22px;
}
.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 150px;
    padding: 16px 18px;
    color: #fff;
    text-decoration: none;
    overflow: hidden;
    border-radius: 18px;
    text-shadow: 0 1px 2px rgba(0, 40, 70, .3);
    /* 内联底色作色相，这里叠光泽：顶部高光 + 底部浸水暗影 */
    background-image:
        radial-gradient(130% 95% at 18% 0%, rgba(255, 255, 255, .4), transparent 52%),
        linear-gradient(180deg, rgba(255, 255, 255, .42) 0%, rgba(255, 255, 255, .16) 34%, rgba(255, 255, 255, 0) 58%, rgba(0, 40, 70, .17) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .65),
        inset 0 -10px 18px rgba(0, 30, 60, .16),
        0 6px 16px rgba(31, 120, 170, .22);
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease, filter .25s ease;
    animation: tileIn .5s cubic-bezier(.34, 1.56, .64, 1) backwards;
}
/* 斜向扫光条（悬停时划过） */
.tile::before {
    content: "";
    position: absolute;
    top: -70%; left: -150%;
    width: 55%; height: 240%;
    background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, .34) 48%, rgba(255, 255, 255, .1) 58%, transparent 74%);
    transform: rotate(9deg);
    transition: left .6s ease;
    pointer-events: none;
}
.tile:hover::before { left: 170%; }
.tile:nth-child(2) { animation-delay: .05s; }
.tile:nth-child(3) { animation-delay: .1s; }
.tile:nth-child(4) { animation-delay: .15s; }
.tile:nth-child(5) { animation-delay: .2s; }
.tile:nth-child(6) { animation-delay: .25s; }
.tile:nth-child(7) { animation-delay: .3s; }
.tile:nth-child(8) { animation-delay: .35s; }
.tile:nth-child(9) { animation-delay: .4s; }
.tile:nth-child(10) { animation-delay: .45s; }
@keyframes tileIn {
    0%   { opacity: 0; transform: translateY(28px) scale(.9); }
    72%  { opacity: 1; transform: translateY(-4px) scale(1.012); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.tile:hover {
    filter: brightness(1.1);
    transform: translateY(-4px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .7),
        inset 0 -10px 18px rgba(0, 30, 60, .14),
        0 14px 30px rgba(31, 120, 170, .38);
}
.tile:active { transform: scale(.97); }
.tile-wide { grid-column: span 2; }
.tile-icon {
    font-size: 30px;
    line-height: 1.15;
    filter: drop-shadow(0 2px 2px rgba(0, 40, 70, .3));
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.tile:hover .tile-icon { transform: scale(1.14) rotate(-7deg); }
.tile-title { font-size: 19px; font-weight: 600; line-height: 1.3; }
.tile-desc { font-size: 13px; opacity: .92; line-height: 1.5; }
.tile .big {
    font-size: 30px;
    font-weight: 300; /* Segoe UI Light 大数字 */
    line-height: 1.2;
}
.tile .badge { position: absolute; top: 12px; right: 12px; }

/* 磁铁内的切换按钮与长文本 */
.tile-toggle-row { display: flex; gap: 6px; margin-top: 2px; flex-wrap: wrap; }
.tile-toggle {
    display: inline-block;
    font-size: 12px;
    padding: 4px 13px;
    background: rgba(255, 255, 255, .24);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-family: var(--font);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
    text-shadow: 0 1px 1px rgba(0, 40, 70, .25);
    transition: background .16s ease, transform .16s ease;
}
.tile-toggle.active {
    background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .82));
    color: var(--ink);
    text-shadow: none;
    box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(0, 40, 70, .25);
}
.tile-toggle:hover { background: rgba(255, 255, 255, .45); }
.tile-toggle:active { transform: scale(.94); }
.tile-toggle[disabled] { opacity: .55; cursor: wait; }
.tile-ai-text {
    white-space: pre-wrap;
    font-size: 12.5px;
    opacity: .96;
    line-height: 1.65;
    max-height: 150px;
    overflow-y: auto;
}

/* 磁铁内的统计条（深底白字） */
.tile .stat-row { margin-top: 4px; }
.tile .stat-row + .stat-row { margin-top: 8px; }
.tile .stat-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    flex-wrap: wrap;
}
.tile .stat-label { font-weight: 600; }
.tile .stat-num { opacity: .95; }
.tile .stat-num small { opacity: .75; font-size: 11px; }
.tile .stat-right { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; font-size: 11.5px; opacity: .9; }
.tile .bar { height: 10px; background: rgba(255, 255, 255, .3); margin-top: 3px; }
.tile .bar-fill { height: 100%; }

/* ---------------- 内容卡片（表单/表格页，磨砂玻璃） ---------------- */
.card {
    background: var(--panel);
    backdrop-filter: blur(10px) saturate(1.4);
    -webkit-backdrop-filter: blur(10px) saturate(1.4);
    color: var(--ink);
    margin: 0 0 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .85);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 6px 18px rgba(31, 120, 170, .16);
    animation: cardIn .45s ease backwards;
}
.card:nth-child(even) { animation-delay: .07s; }
@keyframes cardIn {
    from { opacity: 0; transform: translateY(14px); }
}
.card-head {
    padding: 11px 18px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 15px 15px 0 0;
    text-shadow: 0 1px 2px rgba(0, 40, 70, .35);
    /* 内联底色作色相，叠加玻璃光泽 */
    background-image:
        radial-gradient(130% 110% at 15% 0%, rgba(255, 255, 255, .35), transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, .32), rgba(255, 255, 255, 0) 55%, rgba(0, 40, 70, .14));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
}
.card-head .badge { position: static; }
.card-body { padding: 18px; }
.card-body p { margin: 0 0 12px; }
.card-body p:last-child { margin-bottom: 0; }

/* 卡片内的统计条（浅底深字） */
.card .stat-row + .stat-row { margin-top: 10px; }
.card .stat-head { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.card .stat-label { font-weight: 600; min-width: 52px; }
.card .stat-num { color: #44657A; }
.card .stat-num small { color: #8AA4B2; }
.card .stat-right { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; font-size: 12px; }
.card .stat-pct { color: #6F8FA0; }
.card .bar { height: 14px; background: rgba(180, 214, 231, .5); margin-top: 4px; }
.card .bar-fill { height: 100%; }

/* 统计条：胶囊 + 生长动画 + 流光 */
.bar {
    border-radius: 999px;
    box-shadow: inset 0 2px 4px rgba(0, 40, 70, .22), inset 0 -1px 0 rgba(255, 255, 255, .35);
}
.bar-fill {
    position: relative;
    overflow: hidden;
    border-radius: 999px;
    transform-origin: left center;
    animation: barGrow .9s cubic-bezier(.22, 1, .36, 1) backwards;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, .05) 48%, rgba(0, 30, 60, .14));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}
@keyframes barGrow {
    from { transform: scaleX(0); }
}
.stat-row:nth-of-type(2) .bar-fill { animation-delay: .08s; }
.stat-row:nth-of-type(3) .bar-fill { animation-delay: .16s; }
.stat-row:nth-of-type(4) .bar-fill { animation-delay: .24s; }
.stat-row:nth-of-type(5) .bar-fill { animation-delay: .32s; }
.stat-row:nth-of-type(6) .bar-fill { animation-delay: .4s; }
.bar-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
    transform: translateX(-100%);
    animation: barShine 2.6s ease-in-out 1.2s infinite;
}
@keyframes barShine {
    0% { transform: translateX(-100%); }
    55%, 100% { transform: translateX(100%); }
}

.bar-fill.bar-ok { background-color: var(--leaf); }
.bar-fill.bar-warn { background-color: var(--orange); }
.bar-fill.bar-danger { background-color: var(--red); }

/* ---------------- 标签（果冻胶囊） ---------------- */
.tag {
    display: inline-block;
    padding: 2px 9px;
    font-size: 12px;
    color: #fff;
    font-weight: 600;
    line-height: 1.6;
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 1px 3px rgba(0, 40, 70, .2);
    text-shadow: 0 1px 1px rgba(0, 40, 70, .25);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 60%, rgba(0, 30, 60, .1));
}
.tag-ok { background-color: var(--leaf); }
.tag-warn { background-color: var(--orange); }
.tag-danger { background-color: var(--red); }
.tag-gray { background-color: #7C97A5; }
.tag-muted { background-color: #B9CFD9; color: #3E5F6E; text-shadow: none; }

/* ---------------- 表单（圆润软边 + 水光聚焦环） ---------------- */
.field { margin-bottom: 14px; }
.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2E5A6E;
}
.field .hint { font-size: 12px; color: #7C97A5; margin-top: 3px; }
input[type="text"], input[type="password"], input[type="number"], input[type="url"], input[type="file"],
select, textarea {
    width: 100%;
    border: 2px solid #BFDEEF;
    padding: 9px 12px;
    font-size: 14px;
    font-family: var(--font);
    background: rgba(255, 255, 255, .88);
    color: var(--ink);
    border-radius: 10px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--aqua);
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(46, 159, 212, .18);
}
textarea { resize: vertical; min-height: 90px; }
.form-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.form-inline .field { flex: 1; min-width: 150px; margin-bottom: 0; }
.check-row { display: flex; gap: 16px; flex-wrap: wrap; }
.check-row label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; color: #3E5F6E; }
.check-row input[type="checkbox"] { width: auto; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--aqua); }

/* 按钮：水光胶囊，按下像软糖 */
.btn {
    display: inline-block;
    border: 0;
    border-radius: 999px;
    color: #fff;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background-color: var(--aqua);
    font-family: var(--font);
    text-decoration: none;
    text-shadow: 0 1px 1px rgba(0, 40, 70, .3);
    background-image:
        radial-gradient(120% 110% at 50% 0%, rgba(255, 255, 255, .4), transparent 58%),
        linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, 0) 55%, rgba(0, 40, 70, .16));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -3px 6px rgba(0, 50, 90, .28), 0 4px 10px rgba(23, 119, 166, .3);
    transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
.btn:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -3px 6px rgba(0, 50, 90, .25), 0 7px 16px rgba(23, 119, 166, .38);
}
.btn:active {
    transform: translateY(1px) scale(.98);
    box-shadow: inset 0 3px 8px rgba(0, 40, 70, .35);
}
.btn-green { background-color: var(--leaf); }
.btn-orange { background-color: var(--orange); }
.btn-red { background-color: var(--red); }
.btn-gray { background-color: #7C97A5; }
.btn-sm { padding: 6px 15px; font-size: 13px; }
.btn-ghost {
    background: rgba(255, 255, 255, .85);
    color: var(--aqua-deep);
    border: 2px solid var(--aqua);
    padding: 8px 20px;
    text-shadow: none;
    box-shadow: 0 3px 8px rgba(23, 119, 166, .2);
}
.btn-ghost:hover { background: #fff; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
    background:
        radial-gradient(120% 120% at 10% 0%, rgba(255, 255, 255, .3), transparent 55%),
        linear-gradient(180deg, #4FB3DF, var(--aqua));
    color: #fff;
    padding: 9px 10px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    text-shadow: 0 1px 1px rgba(0, 50, 90, .3);
}
.table th:first-child { border-radius: 12px 0 0 0; }
.table th:last-child { border-radius: 0 12px 0 0; }
.table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:nth-child(even) td { background: rgba(232, 246, 252, .6); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }

/* ---------------- 分页（糖果按钮） ---------------- */
.pager { display: flex; gap: 6px; margin: 14px 0 0; flex-wrap: wrap; }
.pager-item {
    min-width: 32px;
    padding: 5px 11px;
    text-align: center;
    background: rgba(255, 255, 255, .8);
    color: #3E5F6E;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .9);
    box-shadow: inset 0 1px 0 #fff, 0 2px 5px rgba(31, 120, 170, .15);
    transition: transform .15s ease, box-shadow .2s ease;
}
.pager-item.active {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 55%),
        linear-gradient(180deg, #4FB3DF, var(--aqua));
    color: #fff;
    text-shadow: 0 1px 1px rgba(0, 50, 90, .3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 3px 8px rgba(23, 119, 166, .35);
}
.pager-item:hover { transform: translateY(-2px); box-shadow: 0 5px 12px rgba(31, 120, 170, .25); }

/* ---------------- 登录页（晴空 + 大玻璃球） ---------------- */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 14px;
    gap: 18px;
}
.auth-hero { text-align: center; animation: headIn .6s ease backwards; }
.auth-hero .logo-tile {
    width: 78px; height: 78px;
    font-size: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .4) 16%, transparent 34%),
        radial-gradient(circle at 50% 55%, #7BD0F5 0%, var(--aqua) 58%, var(--aqua-deep) 100%);
    border-radius: 50%;
    box-shadow:
        0 0 0 5px rgba(255, 255, 255, .55),
        0 0 0 9px rgba(46, 159, 212, .18),
        0 10px 26px rgba(23, 119, 166, .4),
        inset 0 -5px 10px rgba(0, 60, 110, .4);
}
.auth-hero h1 {
    font-size: 27px;
    font-weight: 300;
    margin: 16px 0 6px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .8);
}
.auth-hero p { font-size: 13px; color: #3E6B80; margin: 0; }
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--panel);
    backdrop-filter: blur(14px) saturate(1.5);
    -webkit-backdrop-filter: blur(14px) saturate(1.5);
    color: var(--ink);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 10px 30px rgba(31, 120, 170, .22);
    overflow: hidden;
    animation: cardIn .5s ease backwards;
}
.auth-tabs { display: flex; }
.auth-tab {
    flex: 1;
    text-align: center;
    padding: 13px 6px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 60%),
        #7FA8BC;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    border: 0;
    font-family: var(--font);
    text-shadow: 0 1px 1px rgba(0, 40, 70, .25);
    transition: filter .18s ease;
}
.auth-tab:hover { filter: brightness(1.08); }
.auth-tab.active {
    background:
        radial-gradient(120% 120% at 20% 0%, rgba(255, 255, 255, .35), transparent 55%),
        linear-gradient(180deg, #4FB3DF, var(--aqua));
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5);
}
.auth-body { padding: 24px; }
.auth-switch { text-align: center; font-size: 13px; color: #4E7283; margin-top: 14px; }
.auth-switch a { color: var(--aqua-deep); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.auth-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------------- 聊天 ---------------- */
.chat-wrap { display: grid; grid-template-columns: 290px 1fr; gap: 14px; align-items: start; }
.chat-list { display: flex; flex-direction: column; gap: 8px; }
.chat-item {
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--panel);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--ink);
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 13px;
    border: 1px solid rgba(255, 255, 255, .85);
    border-left: 5px solid transparent;
    box-shadow: 0 3px 8px rgba(31, 120, 170, .12);
    transition: transform .18s ease, box-shadow .2s ease;
    animation: cardIn .4s ease backwards;
}
.chat-item:hover { transform: translateX(3px); box-shadow: 0 6px 14px rgba(31, 120, 170, .2); }
.chat-item.active {
    border-left-color: var(--aqua);
    background: rgba(255, 255, 255, .9);
}
.chat-item-main { flex: 1; min-width: 0; }
.chat-item-name { font-weight: 600; font-size: 14px; }
.chat-item-last { font-size: 12px; color: #7C97A5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-badge {
    background: radial-gradient(circle at 32% 26%, #FFA3A5 0%, var(--red) 52%, #C23027 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    min-width: 19px;
    height: 19px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 5px rgba(200, 40, 30, .4);
}
.chat-box {
    background: var(--panel);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--ink);
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 6px 18px rgba(31, 120, 170, .16);
    overflow: hidden;
    animation: cardIn .45s ease backwards;
}
.chat-box-head {
    padding: 10px 16px;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 1px 2px rgba(0, 40, 70, .35);
    background-image:
        radial-gradient(130% 110% at 15% 0%, rgba(255, 255, 255, .35), transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 55%, rgba(0, 40, 70, .14));
}
.chat-msgs {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    min-height: 300px;
    max-height: 52vh;
    display: flex;
    flex-direction: column;
}
.chat-tip { text-align: center; color: #8AA4B2; font-size: 12px; margin: 8px 0; }
.msg {
    max-width: 72%;
    margin: 0 0 10px;
    padding: 9px 14px;
    font-size: 14px;
    word-break: break-word;
    white-space: pre-wrap;
    line-height: 1.55;
    border-radius: 16px;
    animation: msgIn .32s cubic-bezier(.34, 1.56, .64, 1) backwards;
}
@keyframes msgIn {
    from { opacity: 0; transform: translateY(10px) scale(.94); }
}
.msg.mine {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 60%),
        linear-gradient(180deg, #4FB3DF, var(--aqua));
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 5px;
    text-shadow: 0 1px 1px rgba(0, 50, 90, .25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 3px 8px rgba(23, 119, 166, .3);
}
.msg.theirs {
    background: rgba(255, 255, 255, .92);
    color: var(--ink);
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 6px rgba(31, 120, 170, .14);
}
.msg .msg-time { display: block; font-size: 11px; opacity: .72; margin-top: 4px; }
.msg-record { background: linear-gradient(180deg, #FFF9E3, #FFF2C9) !important; border: 1px solid #F0D68C; color: #6B5320 !important; text-shadow: none; }
.msg-record .rec-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.msg-record .rec-line { font-size: 12.5px; color: #6B5320; }
.chat-input {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid rgba(201, 228, 240, .9);
    background: rgba(242, 250, 253, .75);
    align-items: center;
}
.chat-input input[type="text"] { flex: 1; }

/* 专家侧边资料面板 */
.peer-panel { background: var(--panel); color: var(--ink); margin-bottom: 14px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .85); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 4px 12px rgba(31, 120, 170, .14); }
.peer-panel .card-head { font-size: 14px; padding: 9px 16px; }

/* ---------------- 菜品卡片 ---------------- */
.dish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.dish-card {
    background: var(--panel);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--ink);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .85);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 4px 12px rgba(31, 120, 170, .14);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .25s ease;
    animation: cardIn .4s ease backwards;
}
.dish-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(31, 120, 170, .26); }
.dish-card-head {
    padding: 11px 14px;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    text-shadow: 0 1px 2px rgba(0, 40, 70, .35);
    background-image:
        radial-gradient(130% 110% at 15% 0%, rgba(255, 255, 255, .35), transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 55%, rgba(0, 40, 70, .14));
}
.dish-card-head .dish-tags { margin-left: auto; display: inline-flex; gap: 4px; }
.dish-card-body { padding: 12px 14px; font-size: 13px; }
.dish-nutr { display: flex; flex-wrap: wrap; gap: 4px 14px; color: #4E7283; margin-top: 6px; }
.dish-nutr b { color: var(--ink); }
.dish-qty { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.dish-qty select { width: 72px; }
.dish-ingr { color: #7C97A5; font-size: 12px; margin-top: 6px; }

/* ---------------- 模态框（玻璃面板 + 弹跳入场） ---------------- */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(20, 60, 90, .42);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal-mask.open { display: flex; }
.modal {
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--ink);
    width: 100%;
    max-width: 540px;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .95);
    box-shadow: inset 0 1px 0 #fff, 0 18px 50px rgba(15, 60, 95, .35);
    overflow: hidden;
}
.modal-mask.open .modal { animation: modalIn .32s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes modalIn {
    from { opacity: 0; transform: scale(.88) translateY(14px); }
}
.modal-head {
    padding: 12px 18px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: none;
    text-shadow: 0 1px 2px rgba(0, 40, 70, .35);
    background-image:
        radial-gradient(130% 110% at 15% 0%, rgba(255, 255, 255, .35), transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 55%, rgba(0, 40, 70, .14));
}
.modal-x {
    background: rgba(255, 255, 255, .22);
    border: 0;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    padding: 3px 9px;
    border-radius: 999px;
    transition: background .15s ease, transform .15s ease;
}
.modal-x:hover { background: rgba(0, 0, 0, .28); transform: rotate(90deg); }
.modal-body { padding: 18px; overflow-y: auto; font-size: 14px; }
.modal-foot {
    padding: 12px 18px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: rgba(232, 246, 252, .8);
    flex: none;
}
.modal table { font-size: 13px; }

/* ---------------- Toast（水珠弹跳） ---------------- */
.toast {
    position: fixed;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%) translateY(10px) scale(.92);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 60%),
        linear-gradient(180deg, #3E8FB4, #1D5F80);
    color: #fff;
    padding: 10px 24px;
    font-size: 14px;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1);
    max-width: 90vw;
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 24px rgba(20, 60, 90, .4);
    text-shadow: 0 1px 1px rgba(0, 40, 70, .3);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.toast-err {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, 0) 60%),
        linear-gradient(180deg, #F27A6C, var(--red));
}

/* ---------------- 预警/通知条目 ---------------- */
.notice-item {
    background: var(--panel);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--ink);
    padding: 13px 16px;
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border-radius: 13px;
    border: 1px solid rgba(255, 255, 255, .85);
    box-shadow: 0 3px 8px rgba(31, 120, 170, .12);
    transition: transform .18s ease, box-shadow .2s ease;
    animation: cardIn .38s ease backwards;
}
.notice-item:hover { transform: translateY(-2px); box-shadow: 0 7px 16px rgba(31, 120, 170, .2); }
.notice-item.unread {
    border-left: 6px solid var(--red);
    box-shadow: 0 4px 12px rgba(232, 86, 74, .2);
}
.notice-item.read { border-left: 6px solid #C4DCE7; opacity: .78; }
.notice-main { flex: 1; min-width: 0; }
.notice-title { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notice-detail { font-size: 13px; color: #4E7283; margin-top: 4px; }
.notice-time { font-size: 12px; color: #8AA4B2; margin-top: 4px; }
.notice-actions { display: flex; gap: 6px; flex: none; }

/* ---------------- 其他 ---------------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.hidden { display: none !important; }
.muted { color: #7C97A5; }
.nowrap { white-space: nowrap; }
.mt0 { margin-top: 0; }
.mt12 { margin-top: 12px; }
.mb0 { margin-bottom: 0; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.kv { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; color: #4E7283; margin: 3px 0; }
.kv b { color: var(--ink); }

/* 键盘可达性 */
:focus-visible {
    outline: 3px solid var(--aqua);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------------- 响应式：手机单列 ---------------- */
@media (max-width: 820px) {
    .tile-wide { grid-column: span 1; }
    .chat-wrap { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .logo-text { max-width: 130px; font-size: 14px; }
    .main { padding-top: 66px; }
    .page-head-title { font-size: 20px; }
    .msg { max-width: 88%; }
}

@media (max-width: 560px) {
    .tiles { grid-template-columns: 1fr; }
    .tile { min-height: 132px; }
    .userchip-name { display: none; }
    .nav-item { padding: 7px 10px; font-size: 13px; }
}

/* 动效偏好：减少动态 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
