/* 海鸥邮局 · 多渐变玻璃质感主题 */
:root {
  --ink: #23384f;
  --ink-2: #4a6b83;
  --ink-3: #8098ad;
  --blue: #4f9fd8;
  --blue-2: #7cc3f0;
  --blue-3: #d8ecfd;
  --mint: #6fc9b6;
  --peach: #f3a98f;
  --lilac: #a99be6;
  --line: rgba(126, 174, 214, .32);
  --glass-bg: linear-gradient(140deg, rgba(255, 255, 255, .84), rgba(246, 251, 255, .58));
  --glass-border: rgba(255, 255, 255, .82);
  --shadow: 0 14px 36px rgba(88, 140, 186, .15);
  --shadow-sm: 0 6px 16px rgba(88, 140, 186, .10);
  --radius: 22px;
  --radius-sm: 13px;
  --font: "PingFang SC", "Yuanti SC", "STYuanti-SC-Regular", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-t: "PingFang TC", "Yuanti TC", "Microsoft JhengHei", "Noto Sans TC", var(--font);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: .02em;
  background:
    radial-gradient(900px 620px at 8% -6%, rgba(255, 255, 255, .95) 0%, rgba(255,255,255,0) 62%),
    radial-gradient(760px 520px at 96% 4%, #e6f7ff 0%, rgba(230,247,255,0) 66%),
    radial-gradient(680px 520px at 88% 92%, #fdeee7 0%, rgba(253,238,231,0) 62%),
    radial-gradient(760px 560px at 4% 96%, #e7fbf5 0%, rgba(231,251,245,0) 64%),
    linear-gradient(158deg, #f8fbff 0%, #eef7ff 38%, #f5f0ff 72%, #eefaf6 100%);
  background-attachment: fixed;
}
body.page-app { padding-top: 66px; }
body.page-app[lang="zh-Hant"], body.page-auth[lang="zh-Hant"] { font-family: var(--font-t); }
a { color: var(--blue); text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; }

.bg-orbs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .55; animation: float 18s ease-in-out infinite; }
.orb.o1 { width: 320px; height: 320px; left: -80px; top: 8%; background: radial-gradient(circle at 30% 30%, #cfe8ff, rgba(207,232,255,0)); }
.orb.o2 { width: 420px; height: 420px; right: -120px; top: -60px; background: radial-gradient(circle at 70% 40%, #fbe3d8, rgba(251,227,216,0)); animation-delay: -6s; }
.orb.o3 { width: 280px; height: 280px; right: 12%; bottom: -100px; background: radial-gradient(circle at 40% 60%, #dcf7ee, rgba(220,247,238,0)); animation-delay: -12s; }
.orb.o4 { width: 360px; height: 360px; left: 8%; bottom: -140px; background: radial-gradient(circle at 50% 50%, #eae3ff, rgba(234,227,255,0)); animation-delay: -9s; }
@keyframes float { 0%,100% { transform: translate3d(0,0,0) } 50% { transform: translate3d(14px,-18px,0) } }

.glass {
  position: relative;
  background: linear-gradient(150deg, rgba(255,255,255,.9), rgba(238,247,255,.78));
  border: 1px solid rgba(255,255,255,.88);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.92);
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 66px;
  display: flex; align-items: center; gap: 10px; padding: 0 max(14px, env(safe-area-inset-left)) 0 12px;
  background: rgba(255, 255, 255, .72);
  border-bottom: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 6px 22px rgba(88, 140, 186, .10);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  z-index: 50;
}
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid transparent;
  background: rgba(255,255,255,.6); color: var(--ink-2); cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.icon-btn:hover { background: #fff; color: var(--blue); transform: translateY(-1px); }
.icon-btn .ico { width: 20px; height: 20px; }
.brand-min { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-min img { width: 34px; height: 34px; border-radius: 10px; object-fit: contain; background: rgba(255,255,255,.7); padding: 3px; }
.bm-text strong { display: block; font-size: 15px; letter-spacing: .04em; color: var(--ink); line-height: 1.2; }
.bm-text em { display: block; font-size: 11px; font-style: normal; color: var(--ink-3); letter-spacing: .12em; }
.top-right { display: flex; align-items: center; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 11px; border-radius: 999px;
  background: rgba(255,255,255,.72); border: 1px solid var(--line); color: var(--ink-2);
  font-size: 12px; white-space: nowrap;
}
.chip.ok { background: rgba(224,244,255,.9); color: #2f83bf; border-color: rgba(122,190,235,.5); }
.chip.warn { background: rgba(255,246,226,.92); color: #a97a24; border-color: rgba(236,205,140,.6); }
.chip.as-btn { cursor: pointer; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #bfe2ff, #e7f4ff);
  color: #2f6f9e; font-weight: 700; font-size: 14px; border: 1px solid #fff;
}
.avatar.big { width: 56px; height: 56px; font-size: 22px; }
.hide-sm { display: inline-flex; }
@media (max-width: 640px) { .hide-sm, .bm-text em { display: none; } }

/* ---------- 折叠菜单 ---------- */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(38, 74, 105, .18); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: opacity .28s ease, visibility .28s ease; z-index: 60;
}
.drawer-mask.show { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; left: 0; top: 0; bottom: auto; margin: 0; padding: 0; border: 0;
  width: min(86vw, 306px); height: 100vh; max-width: none; max-height: 100vh;
  color: var(--ink);
  background: linear-gradient(160deg, #ffffff, #f2f9ff);
  border-right: 1px solid rgba(255,255,255,.9);
  box-shadow: 26px 0 60px rgba(70, 120, 165, .18);
  overflow: visible;
}
.drawer[open] { display: flex; flex-direction: column; }
.drawer:not([open]) { display: none; }
.drawer::backdrop { background: rgba(38, 74, 105, .2); }
body.no-scroll { overflow: hidden; }
.drawer[open] { animation: drawerIn .28s cubic-bezier(.22,.61,.36,1) both; }
@keyframes drawerIn { from { transform: translateX(-100%) } to { transform: none } }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 10px; }
.drawer-head img { width: 38px; height: 38px; border-radius: 11px; background: #fff; padding: 4px; object-fit: contain; }
.drawer-head strong { display: block; font-size: 15px; }
.drawer-head em { font-style: normal; font-size: 11px; color: var(--ink-3); letter-spacing: .08em; }
.drawer-head .close { margin-left: auto; width: 34px; height: 34px; }
.drawer-user { margin: 4px 14px 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.9); }
.du-name { font-weight: 600; font-size: 14px; }
.du-meta { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; word-break: break-all; }
.drawer-nav { padding: 4px 10px 10px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.nav-label { font-size: 11px; letter-spacing: .16em; color: var(--ink-3); padding: 14px 12px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 13px;
  color: var(--ink-2); font-size: 14px; transition: background .2s ease, transform .2s ease, color .2s ease;
  border: 1px solid transparent; width: 100%; text-align: left;
}
.nav-item .ico { width: 19px; height: 19px; color: var(--ink-3); flex: none; }
.nav-item:hover { background: rgba(255,255,255,.8); color: var(--ink); transform: translateX(2px); }
.nav-item.active { background: linear-gradient(120deg, #ffffff, #eaf8f6 60%, #f2ecff); border-color: rgba(150,199,235,.45); color: #2b83c2; font-weight: 600; box-shadow: var(--shadow-sm); }
.nav-item.active .ico { color: #2b83c2; }
.nav-item.ext .ico.sm { margin-left: auto; }
.as-btn { background: none; border: 1px solid transparent; cursor: pointer; font-size: 14px; }
.drawer-foot { padding: 8px 10px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(150,199,235,.22); }
.ico.sm { width: 15px; height: 15px; }
.rot180 { display: inline-flex; transform: rotate(180deg); }

/* ---------- 页面骨架 ---------- */
.app-main { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 18px max(14px, env(safe-area-inset-left)) 40px; }
.page { display: flex; flex-direction: column; gap: 16px; }
.page-head h2 { margin: 4px 0 4px; font-size: 24px; letter-spacing: .02em; }
.page-head p { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.pagebar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.pagebar-title { margin-left: auto; color: var(--ink-3); font-size: 12.5px; letter-spacing: .08em; }
.app-foot { margin-top: 26px; text-align: center; font-size: 11.5px; color: var(--ink-3); letter-spacing: .06em; }

/* ---------- 通用卡片 ---------- */
.card { padding: 20px; }
.card-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.card-title .ico { width: 19px; height: 19px; color: var(--blue); }
.count { font-size: 12px; color: #fff; background: linear-gradient(135deg, #7cc3f0, #4b9bda); padding: 2px 8px; border-radius: 999px; font-weight: 500; }
.card-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head-row .card-title { margin: 0; }
.hint { color: var(--ink-3); font-size: 12.5px; margin: 6px 0; }
.mini { font-size: 12px; }
.empty, .empty-cell { color: var(--ink-3); font-size: 13px; padding: 14px 0; text-align: center; }
.section-title { margin: 8px 2px 0; font-size: 15px; color: var(--ink-2); font-weight: 600; letter-spacing: .06em; }

/* ---------- 按钮 / 表单 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  font-size: 14px; font-weight: 500; transition: transform .18s ease, box-shadow .22s ease, background .22s ease, color .2s ease;
  background: rgba(255,255,255,.7); color: var(--ink-2); white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0) scale(.99); }
.btn.primary { background: linear-gradient(135deg, #79c4ef 0%, #6fc9b6 100%); color: #fff; box-shadow: 0 8px 20px rgba(95, 170, 205, .28); }
.btn.primary:hover { box-shadow: 0 12px 26px rgba(95, 170, 205, .34); }
.btn.ghost { background: rgba(255,255,255,.66); border-color: rgba(150,199,235,.5); color: #3779a8; }
.btn.warm { background: linear-gradient(135deg, #ffd9c7, #f7b39a); color: #8a4a33; border-color: rgba(255,255,255,.8); }
.btn.danger { color: #b4595f; border-color: rgba(214,140,146,.5); background: rgba(255,247,247,.8); }
.btn.tiny { padding: 5px 11px; font-size: 12px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; color: var(--ink-2); letter-spacing: .04em; }
.field.full { grid-column: 1 / -1; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 11px; border: 1px solid rgba(150,199,235,.45);
  background: rgba(255,255,255,.86); color: var(--ink); font-size: 14px; font-family: inherit;
  transition: border .2s ease, box-shadow .2s ease, background .2s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #7cc3f0; box-shadow: 0 0 0 4px rgba(124,195,240,.18); background: #fff; }
textarea { resize: vertical; min-height: 44px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid.inner { margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(150,199,235,.4); }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form input { flex: 1 1 220px; }
.sticky-actions { position: sticky; bottom: 10px; display: flex; justify-content: flex-end; padding: 6px 0; }
.perm-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.perm { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.7); border: 1px solid rgba(150,199,235,.4); font-size: 12.5px; color: var(--ink-2); }
.perm input { width: auto; margin: 0; accent-color: #4b9bda; }
.badge { font-size: 11px; padding: 2px 9px; border-radius: 999px; background: rgba(255,255,255,.8); color: var(--ink-3); border: 1px solid var(--line); font-weight: 500; }
.badge.ok { color: #2f83bf; background: #eaf7ff; border-color: #b9dff7; }
.alert { padding: 11px 14px; border-radius: 13px; font-size: 13px; background: rgba(255,255,255,.85); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.alert.ok { background: #f0fbff; border-color: #c6e8f7; color: #2b7fa8; }
.alert.err { background: #fff4f4; border-color: #f0cdcd; color: #b0555b; }
.alert.info { background: #f4faff; border-color: #cfe6f8; }
.alert a.link { margin-left: 6px; font-weight: 600; }
.auto-hide { animation: fadeOut 8s ease forwards; }
@keyframes fadeOut { 0%, 78% { opacity: 1 } 100% { opacity: 0; height: 0; padding: 0; margin: 0; border: 0; overflow: hidden } }

/* ---------- 动画 ---------- */
.fade-up { animation: fadeUp .55s cubic-bezier(.22,.7,.35,1) both; }
.fade-up:nth-child(2) { animation-delay: .05s }
.fade-up:nth-child(3) { animation-delay: .1s }
.fade-up:nth-child(4) { animation-delay: .14s }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }
.rise { animation: rise .6s cubic-bezier(.22,.7,.35,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(22px) scale(.985) } to { opacity: 1; transform: none } }

/* ---------- 登录页 ---------- */
.page-auth { display: flex; flex-direction: column; min-height: 100vh; }
.auth-top { display: flex; justify-content: flex-end; padding: 16px 18px; position: relative; z-index: 2; }
.top-lang { font-size: 12px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.7); border: 1px solid var(--line); color: var(--ink-2); }
.auth-wrap { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 16px 40px; }
.auth-card { width: min(94vw, 404px); padding: 26px 24px 20px; }
.auth-brand { text-align: center; margin-bottom: 16px; }
.auth-brand .logo { width: 72px; height: 72px; object-fit: contain; margin: 0 auto 10px; display: block; filter: drop-shadow(0 8px 16px rgba(88,140,186,.18)); }
.auth-brand.small .logo { width: 58px; height: 58px; }
.auth-brand h1 { font-size: 23px; margin: 4px 0 2px; letter-spacing: .08em; }
.auth-brand .sub { margin: 0; font-size: 12.5px; color: var(--ink-3); letter-spacing: .16em; }
.tenant-chip { display: inline-block; margin: 10px 0 0; font-size: 11.5px; color: #3779a8; background: rgba(232,246,255,.9); border: 1px solid #cbe7f8; border-radius: 999px; padding: 3px 10px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.auth-form .btn { margin-top: 6px; padding: 12px; }
.demo-form { margin-top: 10px; }
.demo-form .btn { padding: 11px; color: #3779a8; }
.demo-form .hint { text-align: center; margin-top: 6px; }
.auth-links { display: flex; justify-content: center; gap: 8px; margin-top: 14px; font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; }
.auth-foot { position: relative; z-index: 1; text-align: center; font-size: 11.5px; color: var(--ink-3); padding-bottom: 18px; letter-spacing: .08em; }

/* ---------- 工作台 ---------- */
.hero-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px; overflow: hidden; }
.hero-card::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, rgba(163,214,250,.5), rgba(163,214,250,0)); pointer-events: none; z-index: 1; }
.hero-main, .hero-clock { position: relative; z-index: 2; }
.eyebrow { margin: 0; font-size: 12px; color: var(--ink-3); letter-spacing: .1em; }
.hero-main h2 { margin: 6px 0 8px; font-size: 26px; }
.hero-sub { margin: 0 0 10px; color: var(--ink-2); font-size: 13.5px; }
.hero-line { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.hero-clock { text-align: center; flex: none; }
.clock-num { font-size: 40px; font-weight: 300; letter-spacing: .06em; color: #2f76a8; font-variant-numeric: tabular-nums; }
.clock-date { font-size: 11.5px; color: var(--ink-3); letter-spacing: .16em; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-card { display: flex; align-items: center; gap: 12px; padding: 16px; }
.stat-ico { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(140deg, #eaf7ff, #d5ecfd); color: #3d8dc6; flex: none; }
.stat-ico .ico { width: 20px; height: 20px; }
.stat-card b { display: block; font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-card em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.mod-card { padding: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--ink); transition: transform .25s ease, box-shadow .25s ease; }
.mod-card:hover { transform: translateY(-3px); box-shadow: 0 18px 34px rgba(88,140,186,.2); }
.mod-ico { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(140deg, #ffffff, #e4f3ff); color: #3d8dc6; border: 1px solid rgba(255,255,255,.9); }
.mod-ico.sm { width: 32px; height: 32px; border-radius: 10px; }
.mod-ico .ico { width: 21px; height: 21px; }
.mod-name { font-weight: 600; font-size: 15px; }
.mod-desc { font-size: 12px; color: var(--ink-3); }
.tip-card { padding: 18px 20px; }
.tip-card h4 { margin: 0 0 6px; font-size: 14px; }
.tip-card p { margin: 0; font-size: 12.5px; color: var(--ink-2); }

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-card { align-items: flex-start; }
  .hero-main { padding-right: 76px; }
  .hero-clock { position: absolute; right: 20px; top: 22px; }
  .clock-num { font-size: 26px; }
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .app-main { padding: 14px 12px 30px; }
  .hero-main h2 { font-size: 21px; }
  .clock-num { font-size: 30px; }
  .mod-grid { grid-template-columns: 1fr 1fr; }
  .mod-card { padding: 14px; }
}

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 14px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 640px; }
.data-table th { text-align: left; font-weight: 600; color: var(--ink-2); padding: 10px 10px; border-bottom: 1px solid rgba(150,199,235,.35); white-space: nowrap; font-size: 12px; letter-spacing: .04em; }
.data-table td { padding: 10px; border-bottom: 1px solid rgba(150,199,235,.18); vertical-align: middle; color: var(--ink-2); }
.data-table tr:hover td { background: rgba(255,255,255,.55); }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; }
.ellipsis { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; background: rgba(255,255,255,.8); border: 1px solid var(--line); color: var(--ink-2); }
.tag.active { background: #effaf5; color: #2f8767; border-color: #c3e9d9; }
.tag.pending { background: #fff7e8; color: #a97a24; border-color: #f0dcb1; }
.tag.disabled { background: #f6f7f9; color: #8a949e; border-color: #dde3e9; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #cfd8e0; }
.dot.on { background: #55c08b; box-shadow: 0 0 0 4px rgba(85,192,139,.16); }
.act summary { list-style: none; cursor: pointer; }
.act summary::-webkit-details-marker { display: none; }
.act-body { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.8); border: 1px solid rgba(150,199,235,.4); min-width: 220px; }
.act-body input, .act-body select { font-size: 12.5px; padding: 7px 10px; }
.search-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.search-form input, .search-form select { width: auto; min-width: 130px; padding: 7px 10px; font-size: 12.5px; }
.row-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pager { display: flex; gap: 6px; justify-content: center; padding: 14px 0 4px; flex-wrap: wrap; }
.pg { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 9px; background: rgba(255,255,255,.7); border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); }
.pg.active { background: linear-gradient(135deg, #74bdf0, #4b9bda); color: #fff; border-color: transparent; }
.pg-dots { color: var(--ink-3); align-self: center; }

/* ---------- 闹钟 ---------- */
.alarm-list { display: flex; flex-direction: column; gap: 10px; }
.alarm-item { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.72); border: 1px solid rgba(150,199,235,.32); }
.alarm-item.off { opacity: .55; }
.al-time { font-size: 24px; font-weight: 300; color: #2f76a8; font-variant-numeric: tabular-nums; flex: none; letter-spacing: .04em; }
.al-main { flex: 1; min-width: 0; }
.al-title { font-weight: 600; font-size: 14px; }
.al-meta { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.al-actions { display: flex; gap: 6px; flex: none; }
@media (max-width: 520px) {
  .alarm-item { flex-wrap: wrap; }
  .al-actions { width: 100%; justify-content: flex-end; }
}

/* ---------- 日历 ---------- */
.cal-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cal-title { font-size: 18px; font-weight: 600; letter-spacing: .06em; margin: 0 auto; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 6px; }
.cal-week span { text-align: center; font-size: 11.5px; color: var(--ink-3); padding: 4px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-cell {
  position: relative; min-height: 62px; padding: 6px 5px 4px; border-radius: 11px;
  background: rgba(255,255,255,.62); border: 1px solid rgba(255,255,255,.9);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  cursor: pointer; transition: transform .18s ease, box-shadow .2s ease, background .2s ease;
  overflow: hidden;
}
.cal-cell:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); background: #fff; }
.cal-cell.dim { opacity: .42; }
.cal-cell.today { background: linear-gradient(150deg, #e8f6ff, #ffffff); border-color: #a9d9f5; box-shadow: 0 6px 18px rgba(90,160,215,.18); }
.cal-cell.selected { border-color: #74bdf0; box-shadow: 0 0 0 2px rgba(116,189,240,.35); }
.cal-day { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.cal-lunar { font-size: 10.5px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; }
.cal-fest { font-size: 10px; color: #c07a45; white-space: nowrap; }
.cal-jq { font-size: 10px; color: #2f83bf; }
.cal-cell .cal-dot { position: absolute; top: 5px; right: 5px; width: 5px; height: 5px; border-radius: 50%; background: #f0a06a; }
.cal-legend { display: flex; gap: 14px; margin-top: 10px; font-size: 11px; color: var(--ink-3); flex-wrap: wrap; }
.lg { display: inline-flex; align-items: center; gap: 5px; }
.dot-fest, .dot-jq, .dot-today { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot-fest { background: #f0a06a; }
.dot-jq { background: #74bdf0; }
.dot-today { background: #55c08b; }
.cal-detail { padding: 20px; }
.cal-detail .cd-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cd-date { font-size: 20px; font-weight: 600; }
.cd-lunar { color: var(--ink-2); font-size: 13px; }
.cd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 8px; }
.cd-item { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.7); border: 1px solid rgba(150,199,235,.32); font-size: 12.5px; }
.cd-item span { display: block; color: var(--ink-3); font-size: 11px; margin-bottom: 2px; }
.yi-ji { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
@media (max-width: 640px) { .cal-cell { min-height: 54px; } .cal-day { font-size: 13px; } .cal-lunar { font-size: 9.5px; } .yi-ji { grid-template-columns: 1fr; } }

/* ---------- 日期计算 ---------- */
.result-box { margin-top: 14px; padding: 16px; border-radius: 14px; background: linear-gradient(140deg, rgba(240,250,255,.9), rgba(255,255,255,.75)); border: 1px solid rgba(150,199,235,.4); min-height: 62px; }
.result-box .big-num { font-size: 26px; font-weight: 600; color: #2f76a8; }
.result-box .res-text { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
.ocr-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.upload-box { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 11px; border: 1px dashed rgba(120,180,225,.7); background: rgba(255,255,255,.8); font-size: 12.5px; color: #3779a8; cursor: pointer; }
.upload-box input { display: none; }
.upload-box.sm { padding: 6px 10px; }
.ocr-preview { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.ocr-preview img { max-height: 140px; border-radius: 10px; border: 1px solid var(--line); }
.ocr-text { margin-top: 8px; }

/* ---------- AI 聊天 ---------- */
.chat-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chat-body { display: flex; flex-direction: column; gap: 10px; max-height: 52vh; overflow-y: auto; padding: 6px 2px; }
.msg { display: flex; }
.msg.user { justify-content: flex-end; }
.bubble { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.msg.bot .bubble { background: linear-gradient(140deg, rgba(255,255,255,.96), rgba(238,248,255,.9)); border: 1px solid rgba(150,199,235,.4); border-bottom-left-radius: 6px; box-shadow: var(--shadow-sm); }
.msg.user .bubble { background: linear-gradient(135deg, #74bdf0, #4b9bda); color: #fff; border-bottom-right-radius: 6px; }
.chat-suggests { display: flex; gap: 6px; flex-wrap: wrap; }
.chat-input { display: flex; gap: 8px; align-items: flex-end; }
.chat-input textarea { flex: 1; max-height: 120px; }
@media (max-width: 520px) { .chat-body { max-height: 44vh; } }

/* ---------- 模块管理 ---------- */
.module-list { display: flex; flex-direction: column; gap: 8px; }
.module-row { border-radius: 13px; background: rgba(255,255,255,.66); border: 1px solid rgba(150,199,235,.3); padding: 8px 12px; }
.module-row summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; flex-wrap: wrap; }
.module-row summary::-webkit-details-marker { display: none; }
.mr-name { font-weight: 600; font-size: 13.5px; }
.mr-name em { font-style: normal; font-weight: 400; color: var(--ink-3); font-size: 11.5px; margin-left: 6px; }
.mr-sort { font-size: 11.5px; color: var(--ink-3); }
.inner-del { margin-top: 10px; }

/* ---------- 导出 / 资料 ---------- */
.exp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.exp-card { display: flex; align-items: center; gap: 12px; padding: 16px; color: var(--ink); transition: transform .2s ease, box-shadow .2s ease; }
.exp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.exp-card b { display: block; font-size: 14px; }
.exp-card em { font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.profile-head { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(150,199,235,.3); margin-bottom: 14px; }
.profile-head b { display: block; font-size: 17px; }
.profile-head em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.meta-grid div { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.66); border: 1px solid rgba(255,255,255,.9); }
.meta-grid span { display: block; font-size: 11px; color: var(--ink-3); }
.meta-grid b { font-size: 13px; font-weight: 600; word-break: break-all; }
.logo-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.logo-preview { width: 64px; height: 64px; object-fit: contain; border-radius: 14px; background: rgba(255,255,255,.8); padding: 6px; border: 1px solid rgba(255,255,255,.9); }
.sticky-actions .btn { min-width: 120px; }

/* ---------- 多渐变点缀 ---------- */
.g1 { background: linear-gradient(140deg, #eaf7ff, #cfe9fb); color: #2f7fb6; }
.g2 { background: linear-gradient(140deg, #e8fbf5, #c9efe4); color: #2f8a72; }
.g3 { background: linear-gradient(140deg, #fff1e9, #fbdbc9); color: #b96a48; }
.g4 { background: linear-gradient(140deg, #f2edff, #ddd3fb); color: #6a56b6; }
.g5 { background: linear-gradient(140deg, #eefaf2, #d4f0dd); color: #3c8a5c; }
.stat-ico.g1, .stat-ico.g2, .stat-ico.g3, .stat-ico.g4 { border: 1px solid rgba(255,255,255,.9); box-shadow: inset 0 1px 0 #fff; }
.logo-halo {
  width: 96px; height: 96px; margin: 0 auto 12px; border-radius: 26px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, rgba(255,255,255,.96), rgba(236,248,255,.6));
  border: 1px solid rgba(255,255,255,.95);
  box-shadow: 0 14px 28px rgba(88,140,186,.18), inset 0 1px 0 #fff;
}
.logo-halo .logo { width: 74px; height: 74px; margin: 0; }

/* ---------- 邮件列表 ---------- */
.mail-list { display: flex; flex-direction: column; gap: 8px; }
.mail-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 15px;
  background: rgba(255,255,255,.66); border: 1px solid rgba(255,255,255,.9);
  color: var(--ink); transition: transform .2s ease, box-shadow .22s ease, background .2s ease;
}
.mail-row:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); background: #fff; }
.mail-row.unread { background: linear-gradient(120deg, #ffffff, #f3fbff); border-color: rgba(150,199,235,.5); }
.mail-dot { width: 8px; height: 8px; border-radius: 50%; background: #dbe6ef; flex: none; }
.mail-row.unread .mail-dot { background: linear-gradient(135deg, #79c4ef, #6fc9b6); box-shadow: 0 0 0 4px rgba(111,201,182,.14); }
.mail-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.mail-subject { font-size: 14px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row.unread .mail-subject { color: #21597f; }
.mail-meta { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-snippet { font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-time { font-size: 11.5px; color: var(--ink-3); flex: none; white-space: nowrap; }
.mail-list.compact .mail-row { padding: 9px 12px; background: rgba(255,255,255,.55); }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.mailbox-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
  font-size: 12.5px; color: var(--ink-2); background: rgba(255,255,255,.7);
  border: 1px solid rgba(150,199,235,.35); transition: all .2s ease;
}
.tab:hover { background: #fff; color: var(--blue); }
.tab.active { background: linear-gradient(135deg, #eaf8ff, #eafaf5); color: #2b83c2; border-color: rgba(120,190,230,.6); font-weight: 600; box-shadow: var(--shadow-sm); }
.spacer { flex: 1; }
.center-actions { display: flex; justify-content: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- 邮箱账户 ---------- */
.account-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.account-card, .glass-inset {
  padding: 16px; border-radius: 16px;
  background: linear-gradient(150deg, rgba(255,255,255,.92), rgba(240,250,255,.72));
  border: 1px solid rgba(255,255,255,.92); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 10px;
}
.acc-main { display: flex; flex-direction: column; gap: 3px; }
.acc-name { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.acc-email { font-size: 12px; color: var(--ink-2); word-break: break-all; }
.acc-meta { display: flex; gap: 6px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); align-items: center; }
.acc-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.inline-check { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 4px; }
.inline-check label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.inline-check input { width: auto; accent-color: var(--blue); }
.act-form { display: flex; flex-direction: column; gap: 8px; }

/* ---------- 邮件详情 ---------- */
.mail-detail { padding: 22px; }
.mail-head { display: flex; flex-direction: column; gap: 12px; align-items: stretch; padding-bottom: 14px; border-bottom: 1px solid rgba(150,199,235,.3); }
.mail-head h2 { font-size: 21px; margin: 0; letter-spacing: .02em; line-height: 1.45; word-break: break-word; }
.mail-head-meta { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.mh-from { display: flex; gap: 10px; align-items: center; min-width: 0; }
.mh-from .avatar { flex: none; }
.mh-from b { font-size: 14.5px; display: block; }
.mh-from em { font-style: normal; color: var(--ink-3); font-size: 11.5px; word-break: break-all; }
.mh-side { text-align: right; font-size: 11.5px; color: var(--ink-3); margin-left: auto; }
.mail-detail h1 { font-size: 21px; margin: 16px 0 6px; letter-spacing: .02em; }
.mail-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0 14px; }
.mail-body {
  font-size: 14px; line-height: 1.9; color: var(--ink-2);
  padding: 16px; border-radius: 14px;
  background: linear-gradient(150deg, rgba(255,255,255,.94), rgba(248,252,255,.8));
  border: 1px solid rgba(150,199,235,.28);
  word-break: break-word; overflow-wrap: anywhere;
}
.mail-body pre, .mail-body p { margin: 0 0 10px; white-space: pre-wrap; font-family: inherit; }
.ai-summary-box {
  margin: 0 0 16px; padding: 14px 16px; border-radius: 15px;
  background: linear-gradient(140deg, rgba(238,250,255,.96), rgba(245,240,255,.85));
  border: 1px solid rgba(170,205,240,.55); box-shadow: var(--shadow-sm);
}
.asb-head { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; color: #2b6f9e; }
.asb-head em { font-style: normal; margin-left: auto; font-size: 11px; color: var(--ink-3); font-weight: 400; }
.asb-body { margin: 10px 0 8px; font-size: 13.5px; line-height: 1.85; color: var(--ink-2); white-space: pre-wrap; }
.asb-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.memo-form-card { scroll-margin-top: 80px; }

/* ---------- 备忘 ---------- */
.memo-list { display: flex; flex-direction: column; gap: 10px; }
.memo-item {
  display: flex; gap: 12px; align-items: center; padding: 13px 15px; border-radius: 15px;
  background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.92);
  transition: transform .2s ease, box-shadow .2s ease;
}
.memo-item:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.memo-item.done { opacity: .62; }
.memo-item.late { border-color: rgba(243,169,143,.65); background: linear-gradient(120deg, #fff, #fff6f1); }
.memo-main { flex: 1; min-width: 0; }
.memo-title { font-weight: 600; font-size: 14px; color: var(--ink); }
.memo-content { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.memo-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.memo-meta .tag { display: inline-flex; align-items: center; gap: 4px; }
.memo-actions { display: flex; gap: 6px; flex-wrap: wrap; flex: none; }
.tag.warning { background: #fff3ec; color: #b96a48; border-color: #f6d3c3; }
@media (max-width: 560px) {
  .memo-item { flex-wrap: wrap; }
  .memo-actions { width: 100%; justify-content: flex-end; }
  .mail-head { flex-wrap: wrap; }
  .mh-side { margin-left: 0; text-align: left; }
}

/* ---------- 工作台 AI 快搜 ---------- */
.ai-quick { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.ai-quick-head { display: flex; align-items: center; gap: 10px; }
.ai-quick-head b { font-size: 15px; }
.ai-quick-head em { font-style: normal; font-size: 12px; color: var(--ink-3); display: block; }
.ai-quick-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ai-quick-form input { flex: 1 1 240px; }
.ai-quick-out { margin-top: 4px; padding-top: 10px; border-top: 1px dashed rgba(150,199,235,.45); }
.ai-quick-reply { font-size: 13.5px; color: var(--ink-2); line-height: 1.8; white-space: pre-wrap; }
.ai-quick-items { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ai-quick-items a {
  display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ink-2);
  padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.72); border: 1px solid rgba(150,199,235,.3);
}
.ai-quick-items a:hover { background: #fff; color: var(--blue); }
.ai-quick-items a b { font-size: 11px; font-weight: 600; color: #2b83c2; background: #eaf7ff; border-radius: 6px; padding: 1px 6px; flex: none; }

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px);
  max-width: min(90vw, 460px); padding: 11px 18px; border-radius: 14px;
  background: rgba(255,255,255,.96); border: 1px solid rgba(255,255,255,.94);
  box-shadow: 0 14px 34px rgba(70,120,165,.22); color: var(--ink);
  font-size: 13px; line-height: 1.6; text-align: center; z-index: 80;
  opacity: 0; visibility: hidden; transition: opacity .24s ease, transform .24s ease, visibility .24s;
  backdrop-filter: blur(16px) saturate(1.2);
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast.err { background: #fff5f5; border-color: #f2d2d2; color: #a9555b; }

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *, .fade-up, .rise, .orb { animation: none !important; transition: none !important; }
}
