.server-status{min-height:28px;padding:0 8px;border:1px solid var(--line);border-radius:5px;color:var(--muted);display:inline-flex;align-items:center;gap:6px;font-size:10px;white-space:nowrap}
.server-status i{width:6px;height:6px;border-radius:50%;background:#b98a34}
.server-status.is-connected{color:var(--forest)}
.server-status.is-connected i{background:#3f956f}
.server-status.is-offline{color:#914435}
.server-status.is-offline i{background:#b75d4f}
/* ── 登录页 ───────────────────────────────────────────────────
   后台唯一的"门面"：员工每天第一眼看到的就是它。原先只有一个上下边框，
   没有卡片层次、字号 8–12px 偏小、背景与内容区同色，观感像未完成。
   现在改为：柔和渐变背景 + 带阴影的卡片 + 清晰标题层级 + 更大的触控目标。 */
/* 登录页整屏铺开：原来 .auth-screen 被 #adminRoot 的 1240px 内边距框住，
   深色渐变只会是一块圆角矩形，不像登录页。 */
body.is-auth-screen #adminRoot{width:100%;max-width:none;padding:0}
body.is-auth-screen .admin-topbar{border-bottom-color:rgba(255,255,255,.09);background:rgba(8,40,31,.72);backdrop-filter:blur(14px)}
body.is-auth-screen .admin-brand{color:#eaf3ef}
body.is-auth-screen .admin-brand small{color:rgba(214,232,225,.62)}
body.is-auth-screen .admin-brand>span{background:rgba(255,255,255,.14)}
body.is-auth-screen .topbar-actions a{color:rgba(214,232,225,.78)}

.auth-screen{
  min-height:calc(100vh - 64px);display:grid;place-items:center;padding:56px 20px;
  /* 品牌深墨绿渐变 + 细网格。网格用 1px 半透明白线，34px 一格，
     透明度压到 .04 —— 只在近看时形成质感，远看仍是纯色。 */
  background-color:#0a3527;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    radial-gradient(1260px 620px at 18% -12%, rgba(58,178,133,.34), transparent 60%),
    radial-gradient(940px 540px at 92% 114%, rgba(11,122,92,.46), transparent 58%),
    linear-gradient(148deg, #0e5138 0%, #0a3527 46%, #062019 100%);
  background-size:34px 34px, 34px 34px, auto, auto, auto;
}
/* 顶部压暗，让卡片成为唯一视觉焦点 */
.auth-screen::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(120% 78% at 50% 50%, transparent 38%, rgba(4,18,13,.42) 100%);
}
.auth-screen{position:relative}
.auth-panel{position:relative}
.auth-panel{
  width:min(100%,420px);box-sizing:border-box;padding:40px 36px 32px;
  border:1px solid rgba(255,255,255,.10);border-radius:22px;background:var(--paper);
  /* 深色背景上要更重的投影才"浮"得起来：近距一层定轮廓、中距一层给体量、
     远距一层铺氛围，最后用一道内高光模拟纸面受光。 */
  box-shadow:
    0 1px 1px rgba(4,18,13,.16),
    0 12px 28px -12px rgba(4,18,13,.38),
    0 40px 80px -32px rgba(4,18,13,.55),
    inset 0 1px 0 rgba(255,255,255,.9);
}
.auth-mark{
  width:48px;height:48px;border-radius:14px;background:var(--forest);color:#fff;
  display:grid;place-items:center;box-shadow:0 8px 20px -8px rgba(11,122,92,.55);
}
.auth-mark svg{width:23px}
.auth-panel h1{margin:22px 0 0;font-size:26px;line-height:1.25;letter-spacing:-.01em}
.auth-panel>p{margin:10px 0 0;color:var(--muted);font-size:13px;line-height:1.7}
.auth-panel label{margin-top:20px;display:flex;flex-direction:column;gap:8px}
.auth-panel label span{font-size:12px;font-weight:720;color:var(--ink)}
.auth-panel input{
  height:46px;padding:0 14px;border:1px solid var(--line);border-radius:10px;
  background:#fff;color:var(--ink);font-size:14px;transition:border-color .15s,box-shadow .15s;
}
.auth-panel input:focus{outline:0;border-color:var(--forest);box-shadow:0 0 0 3px rgba(11,122,92,.13)}
.auth-panel button{
  width:100%;height:46px;margin-top:14px;border:1px solid var(--forest);border-radius:10px;
  background:var(--forest);color:#fff;font-size:14px;font-weight:720;cursor:pointer;
  transition:filter .15s,transform .05s;
}
.auth-panel button:hover:not(:disabled){filter:brightness(1.08)}
.auth-panel button:active:not(:disabled){transform:translateY(1px)}
.auth-panel button:disabled{opacity:.55;cursor:wait}
.auth-panel .wecom-login-button{display:flex;align-items:center;justify-content:center;gap:9px;margin-top:22px;background:#176b50}
.auth-panel .wecom-login-button svg{width:19px}
.auth-panel-wecom{width:min(100%,384px);padding:30px 28px 26px;text-align:center}
.wecom-qr-login{margin-top:0}
/* 容器不再 overflow:hidden —— 企业微信默认面板比 300px 高，裁切正是
   二维码显示不全的直接原因。这里放宽尺寸，即使 href 样式没生效也能完整显示。 */
.wecom-qr-mount{width:300px;min-height:344px;margin:0 auto;display:grid;place-items:center;border:1px solid var(--line);border-radius:8px;background:#fff}
.wecom-qr-frame{width:300px;min-height:344px;display:grid;place-items:center;background:#fff}
.wecom-qr-mount iframe{display:block;width:300px;height:344px;border:0;background:#fff}

/* ── 个人专区 ─────────────────────────────────────────────── */
.portal-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));margin-top:18px}
.portal-card{border:1px solid var(--line);border-radius:14px;background:var(--paper);padding:18px}
.portal-card>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.portal-card>header strong{font-size:14px}
.portal-badge{font-size:11px;padding:3px 9px;border-radius:999px;background:#eef2f0;color:#5a6b64;white-space:nowrap}
.portal-badge.is-ready{background:#e5f6eb;color:#1e6040}
.portal-badge.is-denied{background:#fff3db;color:#7a4f0d}
.portal-badge.is-unavailable{background:#eef2f0;color:#5a6b64}
.portal-badge.is-error{background:#fff0f0;color:#9b2c2c}
.portal-hint{margin:0;font-size:12px;line-height:1.65;color:#7a4f0d;background:#fffaf0;border-radius:8px;padding:10px 12px}
.portal-errcode{margin:8px 0 0;font-size:11px;color:var(--muted);font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.portal-empty{margin:0;font-size:12px;color:var(--muted)}
.portal-note{margin:12px 0 0;font-size:12px;line-height:1.6}
.portal-note.is-ok{color:#1e6040}
.portal-note.is-fail{color:#9b2c2c}
.portal-person{display:flex;align-items:center;gap:14px}
.portal-avatar{width:52px;height:52px;border-radius:50%;object-fit:cover;flex:0 0 52px}
.portal-avatar-fallback{display:grid;place-items:center;background:#eef2f0;color:#5a6b64}
.portal-name{display:block;font-size:16px}
.portal-position{margin:4px 0 0;font-size:13px;color:#3f4d47}
.portal-meta{margin:4px 0 0;font-size:12px;color:var(--muted)}
.portal-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.portal-item{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:transparent;font:inherit;cursor:pointer}
.portal-item.is-static{cursor:default}
.portal-item span{display:flex;flex-direction:column;min-width:0}
.portal-item strong{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.portal-item small{font-size:11px;color:var(--muted)}
.portal-notice{display:flex;flex-direction:column;gap:12px}
.portal-notice label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#3f4d47}
.portal-notice select,.portal-notice input,.portal-notice textarea{width:100%;box-sizing:border-box;padding:8px 10px;border:1px solid var(--line);border-radius:8px;font:inherit;font-size:13px;background:var(--paper)}
.portal-notice button{align-self:flex-start}

.wecom-qr-loading,.wecom-qr-error{min-height:280px;padding:28px;display:grid;place-items:center;align-content:center;gap:10px;color:var(--muted);font-size:10px;line-height:1.5}
.wecom-qr-loading svg,.wecom-qr-error svg{width:24px;color:var(--forest)}
.wecom-qr-loading strong,.wecom-qr-error strong{color:var(--ink);font-size:12px}
.wecom-qr-loading small,.wecom-qr-error small{max-width:190px}
.wecom-qr-refresh{width:auto!important;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 16px;height:38px!important;margin-top:14px!important;background:transparent!important;color:var(--forest)!important;border-color:var(--line)!important;font-size:12.5px!important;border-radius:10px!important}
.wecom-qr-refresh svg{width:14px}
.auth-hint{margin-top:14px!important;font-size:12px!important;line-height:1.65;color:var(--muted)}
.auth-divider{margin-top:26px;border-top:1px solid var(--line);display:flex;justify-content:center}
.auth-divider span{padding:0 12px;transform:translateY(-50%);background:var(--paper);color:var(--muted);font-size:11px;letter-spacing:.02em}
.auth-password-form{margin-top:0}
.auth-error{min-height:20px;margin-top:14px!important;color:#914435!important;font-size:12px!important;line-height:1.6}
.auth-error:not(:empty){padding:10px 12px;border-radius:10px;background:#fff0f0;border:1px solid rgba(196,73,73,.22)}
.auth-note{margin-top:22px;padding-top:16px;border-top:1px solid var(--line);display:flex;gap:9px;color:var(--muted);font-size:11.5px;line-height:1.65}
.auth-note svg{width:16px;flex:none;margin-top:1px}
.password-hint{margin-top:8px;color:var(--muted);font-size:10px;line-height:1.5}
.password-settings{margin-top:30px;padding:20px 0;border-block:1px solid var(--line);display:grid;grid-template-columns:minmax(220px,.7fr) minmax(320px,1fr);gap:32px;align-items:start}.password-settings>div{display:grid;grid-template-columns:28px minmax(0,1fr);gap:9px;align-items:start}.password-settings>div>svg{width:19px;color:var(--forest)}.password-settings>div span{display:flex;flex-direction:column}.password-settings>div strong{font-size:11px}.password-settings>div small{margin-top:6px;color:var(--muted);font-size:9px;line-height:1.5}.password-settings form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.password-settings label{display:flex;flex-direction:column;gap:6px}.password-settings label span{font-size:10px;font-weight:720}.password-settings input{width:100%;height:40px;padding:0 10px;border:1px solid var(--line);border-radius:6px;background:#fff}.password-settings button{height:40px;border:1px solid var(--forest);border-radius:6px;background:var(--forest);color:#fff;font-size:10px;font-weight:720;cursor:pointer}.password-settings .password-hint,.password-settings .auth-error{grid-column:1/-1;margin:0!important}.password-settings button:disabled{opacity:.5;cursor:wait}@media(max-width:760px){.password-settings{grid-template-columns:1fr}.password-settings form{grid-template-columns:1fr}.password-settings .password-hint,.password-settings .auth-error{grid-column:auto}}
body.is-auth-screen .admin-sidebar,body.is-auth-screen .global-search,body.is-auth-screen #notificationButton,body.is-auth-screen #logoutButton{display:none}
body.is-auth-screen .admin-shell{grid-template-columns:1fr}
body.is-auth-screen .admin-topbar{padding-inline:24px}
body.is-auth-screen .topbar-actions{width:100%;justify-content:flex-end}
.loading-screen{min-height:calc(100vh - 124px);display:grid;place-items:center;color:var(--muted);font-size:10px}
@media(max-width:760px){.server-status{padding:0 6px}.server-status{font-size:0}.server-status i{width:7px;height:7px}}

/* ── 首页运营 KPI ────────────────────────────────────────────
   与系统指标分开：运营每天要看的是"今天有没有人照护、有没有人互动"，
   而不是对象存储与 API 能力。 */
.ops-kpi-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px;margin-bottom:22px}
.ops-kpi-row article{display:flex;gap:13px;align-items:flex-start;padding:18px 20px;border:1px solid var(--line);border-radius:14px;background:var(--paper);box-shadow:0 1px 2px rgba(16,32,26,.03)}
.ops-kpi-row article>i{width:20px;flex:none;margin-top:3px;color:var(--forest)}
.ops-kpi-row article>span{display:flex;flex-direction:column;min-width:0}
.ops-kpi-row small{color:var(--muted);font-size:12px;font-weight:650}
.ops-kpi-row strong{margin-top:5px;font-size:26px;line-height:1.15;font-variant-numeric:tabular-nums;color:var(--ink)}
.ops-kpi-row em{margin-top:5px;color:var(--muted);font-size:11.5px;font-style:normal;line-height:1.5}
