/* MedCertWatch mobile design system, aligned to the hi-fi prototype. */

/* ========== Tokens ========== */
:root {
  /* AI 科技风主色 */
  --primary:#2A6BF4;
  --primary-light:#E8F0FF;
  --primary-dark:#0A1A3F;
  --accent:#00C48C;
  --accent-light:#E6FFF5;
  --danger:#FF4D4F;
  --danger-light:#FFF1F1;
  --warning:#FFAA00;
  --warning-light:#FFFBE6;
  --purple:#8B5CF6;
  --purple-light:#F3EEFF;
  --amber:#EAB308;
  --amber-light:#FEFCE8;

  --ink:#0A1A3F;
  --muted:#4B5563;
  --soft:#9CA3AF;
  --line:#E5E7EB;
  --line-soft:#F3F4F6;
  --surface:#fff;
  --surface-muted:#F9FAFB;
  --screen:#f8fafc;
  --page:#f1f5f9;

  --radius:12px;
  --radius-sm:8px;
  --radius-md:10px;
  --shadow:0 4px 16px rgba(30,41,59,.08),0 1px 3px rgba(30,41,59,.06);
  --shadow-card:0 1px 3px rgba(30,41,59,.06);
  --shadow-active:0 2px 8px rgba(30,41,59,.1);
  --safe-bottom:env(safe-area-inset-bottom,0px);
  --nav-height:46px;
  --tab-height:50px;
  --content-pad:14px;
}

/* ========== Reset and App Shell ========== */
*,
*::before,
*::after {
  box-sizing:border-box;
  margin:0;
  padding:0;
  -webkit-tap-highlight-color:transparent;
}

html,
body {
  width:100%;
  height:100%;
  overflow:hidden;
}

body {
  background:linear-gradient(180deg, #E8F0FF 0%, #C1D9F9 100%);
  color:var(--ink);
  font-family:"Inter", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overscroll-behavior:none;
}

button,
input {
  font:inherit;
}

#app {
  width:100%;
  max-width:430px;
  height:100vh;
  height:100dvh;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  position:relative;
  overflow:hidden;
  background:transparent;
  box-shadow:0 0 0 1px rgba(148,163,184,.18);
}

.nav-bar {
  height:var(--nav-height);
  flex:0 0 var(--nav-height);
  background:var(--surface);
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  padding:0 48px;
  z-index:10;
}

.nav-bar .title {
  min-width:0;
  max-width:100%;
  color:var(--ink);
  font-size:15px;
  font-weight:600;
  line-height:1.2;
  text-align:center;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.nav-bar .back,
.nav-bar .action {
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  min-width:32px;
  min-height:32px;
  border-radius:8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--primary);
  cursor:pointer;
  user-select:none;
}

.nav-bar .back {
  left:8px;
  font-size:22px;
  line-height:1;
  padding:0 8px;
}

.nav-bar .action {
  right:10px;
  max-width:96px;
  padding:0 6px;
  font-size:12px;
  font-weight:500;
  white-space:nowrap;
}

.nav-bar .action.danger {
  color:var(--danger);
}

.nav-bar .back:active,
.nav-bar .action:active {
  background:var(--primary-light);
}

.content {
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:14px var(--content-pad) 8px;
  scrollbar-width:none;
}

.content::-webkit-scrollbar,
.filter-row::-webkit-scrollbar {
  width:0;
  height:0;
}

.tab-bar {
  height:calc(var(--tab-height) + var(--safe-bottom));
  flex:0 0 calc(var(--tab-height) + var(--safe-bottom));
  padding-bottom:var(--safe-bottom);
  display:flex;
  background:rgba(255,255,255,0.85);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border-top:1px solid rgba(255,255,255,0.25);
  z-index:10;
}

.tab-bar .tab-item {
  flex:1;
  min-width:0;
  height:var(--tab-height);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  color:var(--soft);
  font-size:10px;
  line-height:1.1;
  cursor:pointer;
  user-select:none;
}

.tab-bar .tab-icon {
  font-size:18px;
  line-height:1;
}

.tab-bar .tab-item.active {
  color:var(--primary);
  font-weight:600;
}

/* ========== Common Data Display ========== */
.badge {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:3px;
  min-height:18px;
  padding:3px 10px;
  border-radius:10px;
  font-size:10px;
  font-weight:600;
  line-height:1.2;
  white-space:nowrap;
}

.badge.danger { background:var(--danger-light); color:var(--danger); }
.badge.warning { background:var(--warning-light); color:var(--warning); }
.badge.info { background:var(--primary-light); color:var(--primary); }
.badge.success { background:var(--accent-light); color:var(--accent); }
.badge.muted { background:var(--line-soft); color:var(--muted); }
.badge.amber { background:var(--amber-light); color:var(--amber); }
.badge.purple { background:var(--purple-light); color:var(--purple); }

.badge-e {
  font-style:normal;
  margin-right:1px;
}

.badge-t {
  font-weight:600;
}

.ent-card,
.list-card,
.brief-card,
.notice-card,
.detail-panel,
.metric-card,
.cmp-summary,
.cmp-card {
  background:var(--surface);
  border:1px solid var(--line);
  box-shadow:var(--shadow-card);
}

.ent-card {
  border-radius:var(--radius);
  padding:14px 16px;
  display:flex;
  flex-direction:column;
  gap:6px;
  cursor:pointer;
  transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.ent-card:active {
  border-color:var(--primary);
  box-shadow:var(--shadow-active);
  transform:scale(.995);
}

.ent-card .top,
.list-card .top,
.notice-card .top {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:8px;
}

.ent-card .top {
  align-items:center;
}

.ent-card .name,
.enterprise-name {
  color:var(--ink);
  font-size:15px;
  font-weight:600;
  line-height:1.35;
}

.ent-card .code,
.enterprise-code {
  color:var(--soft);
  font-size:12px;
  line-height:1.4;
  margin-top:1px;
}

.status-line,
.ent-card .status-line {
  display:flex;
  align-items:center;
  gap:4px;
  color:var(--muted);
  font-size:11px;
  line-height:1.4;
}

.status-line .dot,
.status-line .status-dot,
.ent-card .status-line .dot,
.ent-card .status-line .status-dot {
  width:5px;
  height:5px;
  flex:0 0 5px;
  border-radius:50%;
  background:var(--accent);
}

.subtle {
  color:var(--soft);
  font-size:11px;
  line-height:1.5;
  padding:4px 0 8px;
  border-bottom:1px solid var(--line);
}

.bottom-hint {
  margin-top:auto;
  padding:8px 0;
  border-top:1px solid var(--line);
  color:var(--soft);
  font-size:11px;
  line-height:1.5;
  text-align:center;
}

.bottom-hint a {
  color:var(--primary);
  text-decoration:none;
}

.ent-header {
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:2px 0;
}

.ent-header .name {
  color:var(--ink);
  font-size:16px;
  font-weight:700;
  line-height:1.35;
}

.ent-header .desc {
  color:var(--muted);
  font-size:11px;
  line-height:1.45;
}

.summary-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.metric-card {
  min-width:0;
  border-radius:var(--radius-md);
  padding:10px;
  text-align:center;
}

.metric-card strong {
  display:block;
  font-size:20px;
  font-weight:600;
  line-height:1.2;
}

.metric-card span {
  display:block;
  margin-top:1px;
  color:var(--muted);
  font-size:11px;
  line-height:1.25;
}

.metric-card.danger strong { color:var(--danger); }
.metric-card.warning strong { color:var(--warning); }
.metric-card.amber strong { color:var(--amber); }
.metric-card.success strong { color:var(--accent); }

/* ========== Filters and Toolbars ========== */
.filter-row {
  display:flex;
  gap:6px;
  overflow-x:auto;
  min-height:28px;
  padding-bottom:2px;
  scrollbar-width:none;
}

.chip {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:26px;
  flex:0 0 auto;
  padding:5px 12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--surface);
  color:var(--muted);
  font-size:11px;
  font-weight:500;
  line-height:1.2;
  white-space:nowrap;
  cursor:pointer;
  user-select:none;
  transition:background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.chip:active {
  transform:scale(.96);
}

.chip.active {
  border-color:var(--ink);
  background:var(--ink);
  color:var(--surface);
}

.chip.time {
  border-color:#bfdbfe;
  background:var(--primary-light);
  color:var(--primary);
}

.chip.time.active {
  border-color:var(--primary);
  background:var(--primary);
  color:var(--surface);
}

.toolbar,
.select-row {
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

.toolbar .tb-item,
.select-row .select-box {
  flex:1 1 0;
  min-width:0;
  height:36px;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--surface);
  color:var(--ink);
  display:flex;
  align-items:center;
  gap:4px;
  padding:0 10px;
  font-size:11px;
  line-height:1;
  cursor:pointer;
  user-select:none;
  transition:border-color .15s ease, background-color .15s ease;
}

.toolbar .tb-item:active,
.select-row .select-box:active {
  border-color:var(--primary);
  background:#f8faff;
}

.toolbar .tb-icon,
.select-row .sel-icon {
  flex:0 0 auto;
  color:var(--soft);
  font-size:13px;
}

.toolbar .tb-label,
.select-row .sel-label {
  flex:1 1 auto;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.select-row .select-box.disabled {
  background:var(--surface-muted);
  color:var(--soft);
}

.step-badge {
  width:14px;
  height:14px;
  flex:0 0 14px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--primary);
  color:#fff;
  font-size:8px;
  font-weight:700;
  line-height:1;
}

.hint-bubble {
  display:inline-flex;
  align-items:center;
  gap:4px;
  align-self:flex-start;
  padding:3px 7px;
  border:1px solid #bfdbfe;
  border-radius:6px;
  background:var(--primary-light);
  color:var(--primary);
  font-size:9px;
  line-height:1.4;
}

.hint-bubble .hint-dot {
  width:4px;
  height:4px;
  flex:0 0 4px;
  border-radius:50%;
  background:var(--primary);
}

/* ========== Cards and Lists ========== */
.list-card {
  border-radius:var(--radius-md);
  padding:12px 14px;
  display:flex;
  flex-direction:column;
  gap:4px;
  cursor:pointer;
  transition:box-shadow .15s ease, transform .15s ease;
}

.list-card:active {
  box-shadow:var(--shadow-active);
  transform:scale(.995);
}

.list-title,
.list-card .list-title,
.notice-title,
.notice-card .notice-title,
.notice-card .list-title {
  color:var(--ink);
  font-size:13px;
  font-weight:600;
  line-height:1.35;
}

.notice-card .notice-title,
.notice-card .list-title {
  color:var(--primary);
}

.list-meta,
.list-card .list-meta {
  display:flex;
  flex-wrap:wrap;
  gap:3px 8px;
  margin-top:2px;
  color:var(--soft);
  font-size:10px;
  line-height:1.35;
}

.brief-desc,
.list-card .brief-desc,
.notice-desc,
.notice-card .notice-desc {
  color:var(--muted);
  font-size:11px;
  line-height:1.45;
}

.list-card .ai-note,
.ai-note {
  margin-top:4px;
  padding:5px 8px;
  border-top:1px solid var(--line);
  border-radius:6px;
  background:var(--surface-muted);
  color:var(--soft);
  font-size:10px;
  line-height:1.45;
}

.notice-card {
  border-color:#bfdbfe;
  border-radius:var(--radius-md);
  padding:12px 14px;
  background:#f8faff;
  display:flex;
  flex-direction:column;
  gap:6px;
  cursor:pointer;
  transition:background-color .15s ease, box-shadow .15s ease;
}

.notice-card:active {
  background:var(--primary-light);
  box-shadow:var(--shadow-active);
}

.brief-card {
  border-radius:var(--radius);
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.brief-card.critical { border-left:3px solid var(--danger); background:#fefcfb; }
.brief-card.warning { border-left:3px solid var(--warning); background:var(--warning-light); }
.brief-card.info { border-left:3px solid var(--primary); background:#f8faff; }
.brief-card.success { border-left:3px solid var(--accent); background:#f0fdf4; }
.brief-card.associate { border-left:3px solid var(--purple); background:var(--purple-light); }

.brief-head {
  display:flex;
  align-items:flex-start;
  gap:10px;
}

.brief-icon {
  flex:0 0 auto;
  font-size:18px;
  line-height:1.25;
}

.brief-copy {
  flex:1 1 auto;
  min-width:0;
}

.brief-title {
  color:var(--ink);
  font-size:13px;
  font-weight:600;
  line-height:1.4;
}

.brief-desc {
  margin-top:2px;
}

.section-title {
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--ink);
  font-size:12px;
  font-weight:600;
  line-height:1.4;
  padding:2px 0;
}

.section-title small {
  color:var(--soft);
  font-size:11px;
  font-weight:400;
}

.star {
  color:var(--soft);
  font-size:18px;
  line-height:1;
  cursor:pointer;
  user-select:none;
  transition:transform .15s ease, color .15s ease;
}

.star:active {
  transform:scale(1.18);
}

.star.on {
  color:#f59e0b;
}

.star.off {
  color:var(--soft);
}

/* ========== Report and AI Narrative ========== */
.ai-greeting,
.ai-hero {
  border:1px solid #bfdbfe;
  border-radius:14px;
  background:linear-gradient(135deg,#eef2ff,#f5f3ff);
  padding:14px 16px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.ai-hero {
  background:linear-gradient(135deg,#eef2ff,#f0fdf4);
}

.ai-greeting .g-header {
  display:flex;
  align-items:center;
  gap:10px;
}

.ai-greeting .g-avatar {
  width:36px;
  height:36px;
  flex:0 0 36px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--primary),var(--purple));
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:18px;
}

.ai-greeting .g-title {
  color:var(--ink);
  font-size:15px;
  font-weight:700;
  line-height:1.25;
}

.ai-greeting .g-meta {
  margin-top:1px;
  color:var(--muted);
  font-size:11px;
  line-height:1.35;
}

.ai-greeting .g-intro {
  padding:2px 0 0 46px;
  color:var(--muted);
  font-size:12px;
  line-height:1.6;
}

.ai-stream-shell .g-avatar {
  font-size:14px;
  font-weight:700;
  letter-spacing:.4px;
}

.ai-stream-shell .g-intro {
  padding:2px 0 0;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.stream-live {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  color:var(--muted);
  font-size:11px;
  line-height:1.45;
}

.stream-live-dot {
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 0 4px rgba(5,150,105,.08);
  animation:typing-generating-pulse 1.4s ease-in-out infinite;
}

.stream-live-meta {
  color:var(--primary);
  font-weight:600;
}

.stream-track {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
}

.stream-track-item {
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:0 8px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.82);
  color:var(--muted);
  font-size:10px;
  line-height:1.2;
}

.stream-track-item.active {
  border-color:var(--primary);
  background:var(--primary-light);
  color:var(--primary);
  font-weight:600;
}

.stream-metrics {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}

.stream-metrics > div {
  min-width:0;
  border:1px solid var(--line);
  border-radius:10px;
  background:rgba(255,255,255,.92);
  padding:8px 10px;
  text-align:center;
}

.stream-metrics strong {
  display:block;
  color:var(--ink);
  font-size:18px;
  line-height:1.1;
  font-weight:700;
}

.stream-metrics span {
  display:block;
  margin-top:2px;
  color:var(--muted);
  font-size:10px;
  line-height:1.2;
}

.stream-output-title {
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:2px;
  color:var(--ink);
  font-size:12px;
  font-weight:700;
}

.stream-output-title small {
  color:var(--soft);
  font-size:10px;
  font-weight:500;
}

.stream-output {
  display:flex;
  flex-direction:column;
  gap:10px;
}

.stream-card {
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface);
  padding:12px 14px;
  box-shadow:var(--shadow-card);
  overflow:hidden;
  transition:opacity .28s ease, transform .28s ease, max-height .34s ease, padding .28s ease, border-color .28s ease;
}

.stream-card.danger { border-left:3px solid var(--danger); }
.stream-card.purple { border-left:3px solid var(--purple); }
.stream-card.warning { border-left:3px solid var(--warning); }
.stream-card.info { border-left:3px solid var(--primary); }

.stream-card.stream-pending {
  max-height:0;
  opacity:0;
  transform:translateY(8px);
  padding-top:0;
  padding-bottom:0;
  border-color:transparent;
  pointer-events:none;
}

.stream-card.stream-visible {
  max-height:760px;
  opacity:1;
  transform:translateY(0);
}

.stream-card + .stream-card {
  margin-top:-2px;
}

.stream-card-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}

.stream-card-index {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  margin-right:6px;
  border-radius:999px;
  background:var(--primary-light);
  color:var(--primary);
  font-size:10px;
  font-weight:700;
}

.stream-card-title {
  color:var(--ink);
  font-size:12px;
  font-weight:700;
}

.stream-card-state {
  display:inline-flex;
  align-items:center;
  min-height:18px;
  padding:1px 8px;
  border-radius:8px;
  font-size:9px;
  font-weight:600;
  white-space:nowrap;
}

.stream-card-state.danger { background:var(--danger-light); color:var(--danger); }
.stream-card-state.purple { background:var(--purple-light); color:var(--purple); }
.stream-card-state.warning { background:var(--warning-light); color:var(--warning); }
.stream-card-state.info { background:var(--primary-light); color:var(--primary); }

.stream-deferred {
  opacity:0;
  transform:translateY(4px);
  transition:opacity .22s ease, transform .22s ease;
  pointer-events:none;
}

.stream-card.stream-complete .stream-deferred {
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}

.stream-final-action {
  overflow:hidden;
  transition:opacity .24s ease, transform .24s ease, max-height .3s ease, margin .24s ease;
}

.stream-final-action.stream-pending {
  max-height:0;
  margin-top:0 !important;
  opacity:0;
  transform:translateY(6px);
  pointer-events:none;
}

.stream-final-action.stream-visible {
  max-height:48px;
  opacity:1;
  transform:translateY(0);
}

.ai-hero .summary-line {
  color:var(--ink);
  font-size:14px;
  font-weight:600;
  line-height:1.5;
}

.ai-hero .meta-line {
  display:flex;
  gap:12px;
  color:var(--muted);
  font-size:11px;
  line-height:1.35;
}

.report-label {
  display:flex;
  align-items:center;
  gap:6px;
  margin-bottom:3px;
  color:var(--ink);
  font-size:12px;
  font-weight:700;
  line-height:1.45;
}

.report-label .lb,
.report-label .label-badge {
  display:inline-flex;
  align-items:center;
  min-height:16px;
  padding:1px 8px;
  border-radius:8px;
  font-size:9px;
  font-weight:600;
  line-height:1.25;
  white-space:nowrap;
}

.report-label .lb.danger,
.report-label .label-badge.danger { background:var(--danger-light); color:var(--danger); }
.report-label .lb.warning,
.report-label .label-badge.warning { background:var(--warning-light); color:var(--warning); }
.report-label .lb.info,
.report-label .label-badge.info { background:var(--primary-light); color:var(--primary); }
.report-label .lb.purple,
.report-label .label-badge.purple { background:var(--purple-light); color:var(--purple); }

.report-text {
  color:var(--ink);
  font-size:12px;
  line-height:1.8;
}

.report-text .hl,
.report-text .highlight,
.hl,
.highlight {
  color:var(--primary);
  font-weight:600;
}

.report-text .tag,
.tag {
  display:inline-flex;
  align-items:center;
  min-height:17px;
  margin:0 2px;
  padding:1px 8px;
  border-radius:8px;
  background:var(--line-soft);
  color:var(--muted);
  font-size:10px;
  line-height:1.25;
}

.report-text .em,
.em {
  color:var(--danger);
  font-weight:600;
}

.report-divider {
  height:1px;
  flex:0 0 1px;
  margin:6px 0 8px;
  background:linear-gradient(90deg,transparent,var(--line),transparent);
}

.evidence {
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--surface-muted);
  color:var(--soft);
  font-size:10px;
  line-height:1.55;
  padding:6px 8px;
}

.evidence strong {
  color:var(--muted);
  font-weight:600;
}

.ai-typing {
  position:relative;
}

.ai-typing[data-typing-running="1"],
.ai-typing.typing-generating,
.typing-generating {
  animation:typing-generating-pulse 1.4s ease-in-out infinite;
}

.ai-typing[data-typing-running="1"]::after {
  content:"";
  display:inline-block;
  width:1px;
  height:1em;
  margin-left:2px;
  background:currentColor;
  color:var(--primary);
  vertical-align:-.12em;
  animation:typing-cursor-blink 1s steps(2,start) infinite;
}

.ai-typing[data-typing-done="1"] {
  animation:none;
}

.typing-cursor {
  display:inline-block;
  width:1px;
  height:1em;
  margin-left:2px;
  background:currentColor;
  vertical-align:-.12em;
  animation:typing-cursor-blink 1s steps(2,start) infinite;
}

.ai-typing[data-state="streaming"] .typing-cursor {
  color:var(--primary);
}

@keyframes typing-cursor-blink {
  0%,45% { opacity:1; }
  46%,100% { opacity:0; }
}

@keyframes typing-generating-pulse {
  0%,100% { opacity:1; }
  50% { opacity:.62; }
}

/* ========== Actions and Forms ========== */
.actions {
  display:flex;
  gap:8px;
  margin-top:2px;
}

.actions .btn,
.btn-primary,
.btn-secondary {
  min-width:0;
  height:36px;
  border-radius:var(--radius-sm);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  padding:0 12px;
  font-size:12px;
  font-weight:600;
  line-height:1;
  cursor:pointer;
  user-select:none;
  transition:opacity .15s ease, transform .15s ease, box-shadow .15s ease;
}

.actions .btn {
  flex:1 1 0;
}

.actions .btn:active,
.btn-primary:active,
.btn-secondary:active {
  opacity:.82;
  transform:scale(.99);
}

.actions .btn.primary,
.btn-primary {
  background:var(--primary);
  color:var(--surface);
  border:1px solid var(--primary);
}

.actions .btn.secondary {
  background:var(--primary-light);
  color:var(--primary);
  border:1px solid #bfdbfe;
}

.btn-secondary,
.actions .btn.neutral {
  background:var(--surface);
  color:var(--muted);
  border:1px solid var(--line);
}

.actions .btn.accent {
  background:var(--purple);
  color:var(--surface);
  border:1px solid var(--purple);
}

.actions .btn.outline {
  background:transparent;
  color:var(--primary);
  border:1px solid var(--primary);
}

.actions .btn.sm {
  flex:0 0 auto;
  height:34px;
  padding:0 14px;
  font-size:12px;
}

.hero-btn {
  min-height:52px;
  border-radius:var(--radius);
  background:linear-gradient(135deg,var(--primary),#4f46e5);
  color:var(--surface);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:8px 14px;
  font-size:15px;
  font-weight:700;
  line-height:1.2;
  box-shadow:0 4px 12px rgba(26,86,219,.25);
  cursor:pointer;
  user-select:none;
  transition:opacity .15s ease, transform .15s ease;
}

.hero-btn:active {
  opacity:.88;
  transform:scale(.99);
}

.hero-btn .hero-sub {
  color:rgba(255,255,255,.75);
  font-size:10px;
  font-weight:400;
  line-height:1.3;
}

.form-page {
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:4px 0;
}

.form-field {
  display:flex;
  flex-direction:column;
  gap:4px;
}

.form-field label {
  color:var(--muted);
  font-size:11px;
  font-weight:500;
}

.form-field input,
.input-look {
  width:100%;
  height:42px;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--surface);
  color:var(--ink);
  display:flex;
  align-items:center;
  padding:0 14px;
  font-size:13px;
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease;
}

.form-field input:focus {
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(26,86,219,.08);
}

.form-field input::placeholder,
.input-look {
  color:var(--soft);
}

.input-look.filled {
  color:var(--ink);
}

.input-look.disabled {
  background:var(--surface-muted);
  color:var(--soft);
}

.input-look .date-icon {
  margin-left:auto;
  color:var(--soft);
  font-size:14px;
}

/* ========== Detail, Profile and Diffs ========== */
.detail-panel {
  border-radius:var(--radius-md);
  padding:12px 14px;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.detail-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:6px 0;
  border-bottom:1px solid var(--line-soft);
  color:var(--ink);
  font-size:12px;
  line-height:1.45;
}

.detail-row:last-child {
  border-bottom:none;
}

.detail-row .label,
.detail-row span:first-child {
  color:var(--soft);
}

.detail-row .value,
.detail-row span:last-child {
  max-width:58%;
  color:var(--ink);
  font-weight:500;
  text-align:right;
  overflow-wrap:anywhere;
}

.abstract {
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--surface-muted);
  color:var(--muted);
  font-size:12px;
  line-height:1.6;
  padding:10px 12px;
}

.abstract strong {
  color:var(--ink);
  font-weight:600;
}

.profile-top {
  display:flex;
  align-items:center;
  gap:14px;
  padding:10px 0 6px;
}

.profile-top .avatar {
  width:48px;
  height:48px;
  flex:0 0 48px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--primary),var(--purple));
  color:var(--surface);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  font-weight:700;
}

.profile-top .p-name,
.profile-top .name {
  color:var(--ink);
  font-size:15px;
  font-weight:600;
  line-height:1.35;
}

.profile-top .p-phone,
.profile-top .desc {
  margin-top:2px;
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
}

.diff-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:6px 0;
  color:var(--ink);
  font-size:12px;
  line-height:1.45;
}

.diff-label,
.diff-row .diff-label {
  color:var(--muted);
}

.diff-value,
.diff-row div {
  text-align:right;
}

.diff-old,
.old-value {
  color:var(--soft);
  font-size:11px;
  text-decoration:line-through;
}

.diff-new,
.new-value {
  color:var(--primary);
  font-size:13px;
  font-weight:600;
}

.version-info {
  padding:14px 0 6px;
  color:#d1d5db;
  font-size:11px;
  line-height:1.4;
  text-align:center;
}

/* ========== Feedback and Overlays ========== */
.toast {
  position:fixed;
  top:20px;
  left:50%;
  z-index:999;
  max-width:min(320px,calc(100vw - 32px));
  transform:translateX(-50%);
  border-radius:10px;
  background:rgba(15,23,42,.86);
  color:#fff;
  padding:10px 18px;
  font-size:13px;
  line-height:1.35;
  pointer-events:none;
  animation:toast-in .25s ease;
}

@keyframes toast-in {
  from { opacity:0; transform:translateX(-50%) translateY(-8px); }
  to { opacity:1; transform:translateX(-50%) translateY(0); }
}

.modal-overlay {
  position:fixed;
  inset:0;
  z-index:100;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(15,23,42,.42);
}

.dropdown-list {
  position:fixed;
  z-index:50;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
  box-shadow:var(--shadow);
}

.dropdown-item {
  padding:12px 14px;
  border-bottom:1px solid var(--line-soft);
  color:var(--ink);
  font-size:13px;
  line-height:1.35;
  cursor:pointer;
  transition:background-color .1s ease;
}

.dropdown-item:last-child {
  border-bottom:none;
}

.dropdown-item:active,
.dropdown-item.selected {
  background:var(--primary-light);
  color:var(--primary);
}

.dropdown-item.selected {
  font-weight:600;
}

.empty-state {
  padding:40px 20px;
  color:var(--soft);
  font-size:13px;
  line-height:1.8;
  text-align:center;
}

.empty-state .empty-icon {
  display:block;
  margin-bottom:12px;
  font-size:36px;
  line-height:1;
}

/* ========== Comparison Dashboard ========== */
.cmp-summary {
  border-radius:14px;
  padding:14px 16px;
}

.cmp-summary-row {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
  text-align:center;
}

.cmp-summary-cell strong {
  display:block;
  font-size:20px;
  font-weight:700;
  line-height:1.2;
}

.cmp-summary-cell span {
  display:block;
  margin-top:2px;
  color:var(--muted);
  font-size:10px;
  line-height:1.25;
}

.cmp-summary-cell.danger strong { color:var(--danger); }
.cmp-summary-cell.warning strong { color:var(--warning); }
.cmp-summary-cell.amber strong { color:var(--amber); }
.cmp-summary-cell.success strong { color:var(--accent); }

.cmp-bar {
  height:14px;
  display:flex;
  overflow:hidden;
  border-radius:7px;
  background:var(--line-soft);
}

.cmp-bar .bar-seg {
  height:100%;
  min-width:0;
}

.cmp-bar .bar-seg.expired { background:linear-gradient(90deg,#dc2626,#ef4444); }
.cmp-bar .bar-seg.w30 { background:linear-gradient(90deg,#d97706,#f59e0b); }
.cmp-bar .bar-seg.w60 { background:linear-gradient(90deg,#ca8a04,#eab308); }
.cmp-bar .bar-seg.ok { background:linear-gradient(90deg,#10b981,#34d399); }

.cmp-bar-legend {
  display:flex;
  justify-content:space-between;
  gap:6px;
  margin-top:8px;
  color:var(--soft);
  font-size:10px;
  line-height:1.3;
}

.cmp-bar-legend .dot {
  display:inline-block;
  width:8px;
  height:8px;
  margin-right:4px;
  border-radius:50%;
  vertical-align:middle;
}

.cmp-bar-legend .dot.danger { background:var(--danger); }
.cmp-bar-legend .dot.warning { background:var(--warning); }
.cmp-bar-legend .dot.amber { background:var(--amber); }
.cmp-bar-legend .dot.success { background:var(--accent); }

.cmp-card {
  position:relative;
  border-radius:14px;
  padding:14px 16px;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease;
}

.cmp-card:active {
  box-shadow:var(--shadow-active);
  transform:scale(.99);
}

.cmp-card.danger { border-left:3px solid var(--danger); }
.cmp-card.warning { border-left:3px solid var(--warning); }
.cmp-card.amber { border-left:3px solid var(--amber); }
.cmp-card.success { border-left:3px solid var(--accent); }

.cmp-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:4px;
}

.cmp-name {
  flex:1 1 auto;
  min-width:0;
  overflow:hidden;
  color:var(--ink);
  font-size:15px;
  font-weight:600;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.cmp-meta {
  margin-bottom:10px;
  color:var(--soft);
  font-size:11px;
  line-height:1.4;
}

.cmp-counts {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
  margin:10px 0;
}

.cmp-counts .cnt {
  min-height:42px;
  border-radius:var(--radius-sm);
  background:var(--surface-muted);
  padding:6px 2px;
  text-align:center;
}

.cmp-counts .cnt strong {
  display:block;
  font-size:16px;
  font-weight:700;
  line-height:1.2;
}

.cmp-counts .cnt span {
  display:block;
  margin-top:2px;
  color:var(--muted);
  font-size:9px;
  line-height:1.2;
}

.cmp-counts .cnt.danger strong { color:var(--danger); }
.cmp-counts .cnt.warning strong { color:var(--warning); }
.cmp-counts .cnt.amber strong { color:var(--amber); }
.cmp-counts .cnt.success strong { color:var(--accent); }

.cmp-foot {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding-top:8px;
  border-top:1px solid var(--line-soft);
  color:var(--muted);
  font-size:11px;
  line-height:1.35;
}

.cmp-foot strong {
  color:var(--ink);
  font-size:13px;
  font-weight:700;
}

.cmp-rate strong {
  color:var(--danger);
}

.cmp-navigate {
  color:var(--primary);
  font-size:13px;
  font-weight:600;
}

/* ========== Prototype-only Helpers Kept for Compatibility ========== */
.status-bar {
  height:40px;
  flex:0 0 40px;
  background:var(--surface);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 22px;
  color:var(--ink);
  font-size:12px;
  font-weight:600;
}

.status-icons {
  display:flex;
  align-items:center;
  gap:4px;
  color:var(--muted);
  font-size:11px;
}

.flow-connector {
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:2px;
  padding:3px 0 1px;
}

.flow-arrow {
  color:var(--primary);
  font-size:20px;
  line-height:1;
  opacity:.6;
}

.flow-label {
  border:1px solid #bfdbfe;
  border-radius:8px;
  background:var(--primary-light);
  color:var(--muted);
  padding:2px 12px;
  font-size:10px;
  font-weight:500;
  line-height:1.3;
  white-space:nowrap;
}

.flow-tab {
  color:var(--soft);
  font-size:9px;
  letter-spacing:1px;
  line-height:1.4;
}

/* ========== Chat-style AI Conversation (p02) ========== */
.chat-greeting {
  display:flex;
  align-items:center;
  gap:12px;
  padding:4px 0 2px;
}

.chat-avatar {
  width:38px;
  height:38px;
  flex:0 0 38px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--primary),var(--purple));
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  font-weight:700;
  letter-spacing:.3px;
}

.chat-name {
  color:var(--ink);
  font-size:15px;
  font-weight:700;
  line-height:1.3;
}

.chat-sub {
  color:var(--muted);
  font-size:11px;
  line-height:1.3;
  margin-top:1px;
}

.chat-wrap {
  display:flex;
  flex-direction:column;
  gap:6px;
  flex:1;
}

/* --- Message bubbles --- */
.chat-msg {
  max-width:88%;
  align-self:flex-start;
  border:1px solid #bfdbfe;
  border-radius:4px 14px 14px 14px;
  background:linear-gradient(135deg,#eef2ff,#f5f3ff);
  padding:10px 14px;
  opacity:0;
  transform:translateY(6px);
  transition:opacity .32s ease,transform .32s ease;
}

.chat-msg.chat-visible {
  opacity:1;
  transform:translateY(0);
}

.chat-msg .msg-body {
  color:var(--ink);
  font-size:13px;
  line-height:1.75;
}

.chat-msg .msg-body .hl {
  color:var(--primary);
  font-weight:600;
}

.chat-msg .msg-body .em {
  color:var(--danger);
  font-weight:600;
}

.chat-actions {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  justify-content:flex-end;
  margin-top:8px;
}

.chat-actions .btn {
  flex:0 0 auto;
  min-height:32px;
  padding:0 14px;
  border-radius:var(--radius-sm);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  user-select:none;
  transition:opacity .15s ease,transform .15s ease;
}

.chat-actions .btn:active {
  opacity:.82;
  transform:scale(.98);
}

.chat-actions .btn.primary {
  background:var(--primary);
  color:var(--surface);
  border:1px solid var(--primary);
}

.chat-actions .btn.secondary {
  background:var(--primary-light);
  color:var(--primary);
  border:1px solid #bfdbfe;
}

.chat-actions .btn.accent {
  background:var(--purple);
  color:var(--surface);
  border:1px solid var(--purple);
}

.chat-actions .btn.neutral {
  background:var(--surface);
  color:var(--muted);
  border:1px solid var(--line);
}

.chat-link {
  display:inline-flex;
  align-items:center;
  color:var(--primary);
  font-size:12px;
  font-weight:500;
  cursor:pointer;
  user-select:none;
  padding:4px 0;
  transition:opacity .15s ease;
}

.chat-link:hover {
  opacity:.75;
  text-decoration:underline;
}

.chat-link:active {
  opacity:.6;
}

/* --- Inline evidence within chat --- */
.chat-evidence {
  display:inline-block;
  font-size:10px;
  line-height:1.55;
  color:var(--soft);
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--surface-muted);
  padding:5px 8px;
  max-width:100%;
}

.chat-evidence strong {
  color:var(--muted);
  font-weight:600;
}

/* --- Thinking indicator --- */
.chat-think {
  align-self:flex-start;
  padding:8px 14px;
  border-radius:14px;
  background:var(--surface-muted);
  border:1px dashed var(--line);
  opacity:0;
  transform:translateY(4px);
  transition:opacity .25s ease,transform .25s ease,max-height .3s ease,padding .3s ease,margin .3s ease,border-width .3s ease;
  max-height:60px;
  overflow:hidden;
}

.chat-think.chat-visible {
  opacity:1;
  transform:translateY(0);
}

.chat-think.chat-hide {
  opacity:0;
  max-height:0;
  padding-top:0;
  padding-bottom:0;
  margin:0;
  border-width:0;
  pointer-events:none;
}

.think-dots {
  display:flex;
  gap:5px;
  align-items:center;
}

.think-dots span {
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--soft);
  animation:think-bounce 1.2s ease-in-out infinite;
}

.think-dots span:nth-child(2) { animation-delay:.15s; }
.think-dots span:nth-child(3) { animation-delay:.3s; }

@keyframes think-bounce {
  0%,60%,100% { transform:translateY(0); opacity:.4; }
  30% { transform:translateY(-4px); opacity:1; }
}

/* --- Pending / Final --- */
.chat-pending {
  display:none !important;
}

.chat-final {
  display:flex;
  margin-top:6px;
  padding-top:8px;
  border-top:1px solid var(--line-soft);
}

/* --- Skip button --- */
.chat-skip-wrap {
  text-align:right;
  padding:4px 0 2px;
}

.chat-skip {
  color:var(--soft);
  font-size:11px;
  cursor:pointer;
  user-select:none;
  padding:4px 8px;
  border-radius:6px;
  transition:color .15s ease,background .15s ease;
}

.chat-skip:hover {
  color:var(--primary);
  background:var(--primary-light);
}

.chat-skip:active {
  transform:scale(.96);
}

/* ========== Responsive and Accessibility ========== */
@media (min-width:480px) {
  #app {
    min-height:720px;
    max-height:100dvh;
  }
}

@media (max-width:359px) {
  :root {
    --content-pad:12px;
  }

  .nav-bar {
    padding:0 42px;
  }

  .ai-greeting .g-intro {
    padding-left:0;
  }

  .toolbar .tb-item {
    padding:0 8px;
  }

  .actions {
    gap:6px;
  }

  .summary-grid,
  .cmp-summary-row,
  .cmp-counts {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .cmp-summary-cell strong {
    font-size:18px;
  }

  .cmp-card {
    padding:12px 14px;
  }

  .cmp-counts .cnt strong {
    font-size:14px;
  }

  .cmp-head .badge {
    padding:3px 8px;
  }

  .cmp-head .badge-t {
    display:none;
  }

  .cmp-foot {
    font-size:10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior:auto !important;
    transition-duration:.01ms !important;
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
  }

  .typing-cursor,
  .typing-generating,
  .ai-typing[data-typing-running="1"],
  .ai-typing[data-typing-running="1"]::after,
  .ai-typing.typing-generating {
    animation:none !important;
  }

  .think-dots span {
    animation:none !important;
  }

  .chat-msg,
  .chat-think {
    transition-duration:.01ms !important;
  }
}

/* ============================================================
   Meeting 06-25: Card color coding + bottom button
   ============================================================ */

/* Expired cards — red background */
.card-danger {
  background: #fef2f2 !important;
  border-left: 3px solid #dc2626 !important;
}
.card-danger .list-title {
  color: #1e293b !important;
  font-weight: 700 !important;
}
.card-danger .list-meta span {
  color: #1e293b !important;
}

/* Within 30/60 days cards — amber background */
.card-warning {
  background: #fffbeb !important;
  border-left: 3px solid #d97706 !important;
}
.card-warning .list-title {
  color: #1e293b !important;
  font-weight: 600 !important;
}

/* Normal cards — green background */
.card-success {
  background: #f0fdf4 !important;
  border-left: 3px solid #059669 !important;
}

/* AI note — larger, bolder */
.ai-note {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #334155 !important;
  line-height: 1.5 !important;
}

/* Bottom fixed add button */
.bottom-fixed-btn {
  padding: 12px 0 4px;
  margin-top: auto;
}
.btn-primary-wide {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  gap: 6px;
}
.btn-primary-wide:active {
  opacity: 0.85;
}

/* ============================================================
   Meeting 06-25: Disclaimer + auto-fill section
   ============================================================ */

.disclaimer-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 11px;
  color: #92400e;
  line-height: 1.5;
  margin-bottom: 16px;
}

.auto-fill-section {
  margin-top: 12px;
}

.auto-fill-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================
   Meeting 06-25: Splash, Login, Home pages
   ============================================================ */

/* Splash Screen */
.splash-screen {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a56db 0%, #4f46e5 50%, #7c3aed 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
}
.splash-content {
  text-align: center;
}
.splash-logo {
  font-size: 64px;
  margin-bottom: 16px;
}
.splash-title {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}
.splash-subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  margin-top: 8px;
}
.splash-slogan {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-top: 20px;
  letter-spacing: 0.1em;
}
.splash-footer {
  position: absolute;
  bottom: 40px;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  transition: opacity .3s ease;
  z-index: 102;
}

/* Splash Carousel */
.splash-carousel-wrap {
  cursor: default;
}
.splash-slides {
  position: absolute;
  inset: 0;
}
.splash-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.splash-slide.active {
  opacity: 1;
}
.splash-slide[data-c] {
  cursor: pointer;
}
.splash-slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: auto;
}
.splash-slide-cta {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 32px;
  border-radius: 24px;
  background: rgba(255,255,255,0.92);
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  animation: splash-cta-pulse 2s ease-in-out infinite;
  z-index: 103;
}
@keyframes splash-cta-pulse {
  0%,100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.04); }
}
.splash-dots {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 102;
}
.splash-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: background .3s ease, transform .3s ease;
}
.splash-dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* Login Screen */
.login-screen {
  position: absolute;
  inset: 0;
  background: var(--screen);
  display: flex;
  flex-direction: column;
  padding: 0 24px;
}
.login-header {
  text-align: center;
  padding: 80px 0 40px;
}
.login-logo {
  font-size: 48px;
  margin-bottom: 12px;
}
.login-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}
.login-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
.login-form {
  margin-top: 20px;
}
.login-phone-box {
  display: flex;
  align-items: center;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 0 14px;
  gap: 10px;
}
.login-prefix {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.login-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  color: var(--ink);
  outline: none;
}
.login-btn-primary {
  height: 48px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  margin-top: 16px;
  cursor: pointer;
}
.login-btn-primary:active {
  opacity: 0.85;
}
.login-hint {
  text-align: center;
  font-size: 11px;
  color: var(--soft);
  margin-top: 12px;
}
.login-footer {
  margin-top: auto;
  text-align: center;
  font-size: 11px;
  color: var(--soft);
  padding: 20px 0;
}

/* Home Page */
.home-header {
  padding: 4px 0 12px;
}
.home-greeting {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.home-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.home-banner {
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}
.banner-icon {
  font-size: 28px;
}
.banner-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.banner-desc {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.banner-action {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  white-space: nowrap;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.home-entry {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.home-entry:active {
  border-color: var(--primary);
}
.entry-icon {
  font-size: 24px;
  margin-bottom: 6px;
}
.entry-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.entry-desc {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.home-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.home-alert-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.home-alert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
}
.alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-danger {
  background: #dc2626;
}
.dot-warning {
  background: #d97706;
}
.alert-info {
  flex: 1;
  min-width: 0;
}
.alert-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.alert-meta {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

/* ============================================================
   算力与AI模型配置 (p17)
   ============================================================ */

.model-current-box {
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
}
.model-current-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.model-current-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.model-option-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.model-option-card:active {
  opacity: 0.85;
}
.model-option-card.model-selected {
  border-color: var(--primary);
  background: #f0f7ff;
}
.model-option-card.model-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.model-option-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.model-option-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
}
.model-option-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}
.model-option-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.model-option-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 500;
  color: var(--primary);
  background: #e0e7ff;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: middle;
}
.model-option-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

.model-radio {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.model-radio-selected {
  color: var(--primary);
}
.model-radio-unselected {
  color: var(--soft);
}
.model-radio-disabled {
  color: #d1d5db;
}

.model-disabled-hint {
  font-size: 10px;
  color: #dc2626;
  margin-top: 6px;
  padding-left: 32px;
}

.model-footer-note {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  padding: 12px 0;
  margin-top: 8px;
}

/* ============================================================
   v1.2: Profile menu layout fix + Floating AI panel
   ============================================================ */

/* Profile menu list - left aligned */
.profile-menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.profile-menu-item:active {
  background: #f1f5f9;
}

.profile-menu-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.profile-menu-content {
  flex: 1;
  min-width: 0;
}

.profile-menu-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}

.profile-menu-desc {
  font-size: 11px;
  color: var(--muted);
}

.profile-menu-arrow {
  font-size: 18px;
  color: var(--soft);
  flex-shrink: 0;
}

.profile-footer {
  text-align: center;
  font-size: 11px;
  color: var(--soft);
  padding: 16px 0 8px;
  margin-top: auto;
  border-top: 1px solid var(--line);
}

/* ============================================================
   Floating AI Icon (draggable + message animation)
   ============================================================ */

.ai-float-btn {
  position: absolute;
  bottom: 70px;
  right: 16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: grab;
  z-index: 91;
  transition: left 0.3s cubic-bezier(0.32,0.72,0,1), top 0.3s cubic-bezier(0.32,0.72,0,1), box-shadow 0.2s;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.ai-float-btn:active {
  cursor: grabbing;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.6);
}

/* Message badge */
.ai-float-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF6B6B, #EE5A5A);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(238, 90, 90, 0.4);
  animation: badge-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  18% { transform: scale(1); }
  34% { transform: scale(1.3); }
  50% { transform: scale(0.9); }
  66% { transform: scale(1); }
}

/* Shake / bounce animation when there are messages */
.ai-float-btn-has-msg {
  animation: none;
}

.ai-float-btn-has-msg.ai-float-shake {
  animation: ai-shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) 3;
}

@keyframes ai-shake {
  0%, 100% { transform: rotate(0deg) scale(1); }
  10% { transform: rotate(-12deg) scale(1.1); }
  20% { transform: rotate(10deg) scale(1.1); }
  30% { transform: rotate(-8deg) scale(1.08); }
  40% { transform: rotate(6deg) scale(1.05); }
  50% { transform: rotate(-3deg) scale(1.02); }
  60% { transform: rotate(0deg) scale(1); }
}

/* Pulse ring when has messages - disabled */
.ai-float-btn-has-msg::after {
  display: none;
}

/* ============================================================
   AI Floating Panel (9/10 height)
   ============================================================ */

.ai-float-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 90vh;
  background: var(--screen);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.ai-float-panel.open {
  transform: translateY(0);
}

.ai-float-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.ai-float-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.ai-float-panel-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
}

.ai-float-panel-close:active {
  background: #e2e8f0;
}

.ai-float-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 20px;
  -webkit-overflow-scrolling: touch;
}

/* Overlay backdrop */
.ai-float-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.ai-float-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   Home tab bar - 3 items
   ============================================================ */

.home-tab-bar {
  height: 54px;
  display: flex;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.home-tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: rgba(0,0,0,0.45);
  font-weight: 500;
  letter-spacing: 0.2px;
  gap: 3px;
  cursor: pointer;
  transition: color 0.2s;
}

.home-tab-item .home-tab-icon {
  font-size: 20px;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(42,107,244,0.25));
}

.home-tab-item.active {
  color: var(--primary);
  font-weight: 500;
}

/* ============================================================
   Login - 小程序授权登录样式
   ============================================================ */

.login-auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 20px;
  margin: 20px 0;
  text-align: center;
}

.login-auth-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.login-auth-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.login-auth-desc {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.login-auth-permissions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.login-auth-perm {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink);
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 8px;
}

.login-auth-perm span {
  font-size: 16px;
}

.login-auth-footer {
  text-align: center;
  font-size: 11px;
  color: var(--soft);
  margin-top: 16px;
}

/* ============================================================
   Config-driven Home v2 — match POC home effect direction
   ============================================================ */
.home-content {
  padding: 0 0 10px;
  gap: 0;
  background: transparent;
}
.home-modern {
  min-height: 100%;
  padding-bottom: 12px;
}
.home-hero {
  position: relative;
  padding: 22px 18px 72px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,0.8), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.6), transparent 40%),
    linear-gradient(135deg, rgba(255,255,255,0.5), rgba(255,255,255,0.1)),
    linear-gradient(135deg, #1558d6 0%, #2477f2 46%, #6957e8 100%);
  border-radius: 0 0 26px 26px;
  overflow: visible;
}
.home-hero::after {
  content: '';
  position: absolute;
  right: -42px;
  top: 32px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.home-hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.home-hello {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -.02em;
}
.home-company {
  margin-top: 7px;
  font-size: 13px;
  color: rgba(255,255,255,.82);
}
.home-ent-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  margin-top: 8px;
  background: rgba(255,255,255,.15);
  border-radius: 20px;
  font-size: 13px;
  color: rgba(255,255,255,.9);
  cursor: pointer;
  transition: background .2s;
}
.home-ent-switcher:active {
  background: rgba(255,255,255,.25);
}
.home-hero-ai {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(19, 58, 150, .22);
  cursor: pointer;
}
.home-hero-card {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -42px;
  z-index: 2;
  min-height: 86px;
  padding: 18px 18px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.96);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(29, 78, 216, .18);
  cursor: pointer;
}
.home-hero-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}
.home-hero-desc {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}
.home-hero-link {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  font-size: 12px;
  font-weight: 700;
}
.home-feature-panel {
  margin: 58px 14px 12px;
  padding: 16px 10px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 8px 24px rgba(42,107,244,0.12);
}
.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  row-gap: 18px;
  column-gap: 4px;
}
.home-feature {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.home-feature:active {
  transform: scale(.96);
}
.home-feature-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f8fbff, #eef5ff);
  box-shadow: inset 0 0 0 1px rgba(226,232,240,.72), 0 6px 14px rgba(15, 23, 42, .06);
}
.home-feature-icon img {
  max-width: 38px;
  max-height: 38px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(42,107,244,0.25));
}
.home-feature-title {
  max-width: 72px;
  text-align: center;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  color: #263449;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 14px 12px;
}
.home-summary-card {
  min-height: 70px;
  border-radius: 18px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(42,107,244,0.12);
}
.home-summary-card b {
  font-size: 22px;
  line-height: 1;
  color: var(--primary);
  font-weight: 600;
}
.home-summary-card span {
  margin-top: 8px;
  font-size: 11px;
  color: #64748b;
}
.home-task-card {
  margin: 0 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 8px 24px rgba(42,107,244,0.12);
}
.home-card-head {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.home-card-head span {
  font-size: 15px;
  font-weight: 600;
  color: #0A1A3F;
}
.home-card-head em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: #2563eb;
  cursor: pointer;
}
.home-alert-modern {
  border-radius: 14px;
  background: #f8fafc;
  border-color: #eef2f7;
}
.home-empty-card {
  min-height: 92px;
}
.home-empty-text {
  padding: 10px 0 4px;
  color: #64748b;
  font-size: 12px;
}

/* Home v2 refinement — full-page light blue gradient + typed todo list */
.home-content {
  background: linear-gradient(135deg, #f3fbff 0%, #eaf6ff 44%, #dbeafe 100%);
}
.home-modern {
  min-height: 100%;
  background: linear-gradient(135deg, #f3fbff 0%, #eaf6ff 44%, #dbeafe 100%);
}
.home-hero {
  padding: 22px 18px 70px;
  color: #0f172a;
  background: transparent;
  border-radius: 0;
}
.home-hero::after {
  background: rgba(59, 130, 246, .08);
}
.home-company {
  color: #497096;
}
.home-hero-ai {
  border: 1px solid rgba(37, 99, 235, .18);
  background: rgba(255,255,255,.72);
  color: #2563eb;
}
.home-hero-card {
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(10px);
}
.home-feature-panel,
.home-summary-card,
.home-task-card {
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.home-card-head {
  margin-bottom: 12px;
}
.home-todo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.home-todo-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(248,250,252,.92);
  border: 1px solid rgba(226,232,240,.9);
  cursor: pointer;
}
.home-todo-item:active {
  transform: scale(.99);
}
.home-todo-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: 0 5px 12px rgba(15, 23, 42, .06);
}
.home-todo-icon img {
  max-width: 26px;
  max-height: 26px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.home-todo-main {
  min-width: 0;
  flex: 1;
}
.home-todo-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 750;
  color: #172033;
}
.home-todo-status {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: #d97706;
  background: #fffbeb;
}
.home-todo-meta {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.35;
  color: #64748b;
}
.home-todo-warning {
  border-color: rgba(251, 191, 36, .38);
  background: rgba(255, 251, 235, .72);
}
.home-todo-info {
  border-color: rgba(59, 130, 246, .25);
  background: rgba(239, 246, 255, .72);
}
.home-todo-primary {
  border-color: rgba(14, 165, 233, .25);
  background: rgba(240, 249, 255, .72);
}
.home-todo-purple {
  border-color: rgba(124, 58, 237, .22);
  background: rgba(245, 243, 255, .72);
}

/* Home banner carousel */
.home-banner-carousel {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -48px;
  z-index: 2;
  height: 112px;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255,255,255,.72);
  box-shadow: 0 14px 34px rgba(29, 78, 216, .16);
}
.home-banner-track,
.home-banner-slide {
  position: absolute;
  inset: 0;
}
.home-banner-slide {
  opacity: 0;
  transition: opacity .45s ease;
}
.home-banner-slide.active {
  opacity: 1;
}
.home-banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-banner-dots {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 3;
}
.home-banner-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  box-shadow: 0 0 0 1px rgba(15,23,42,.08);
  transition: width .25s ease, background .25s ease;
}
.home-banner-dot.active {
  width: 14px;
  border-radius: 999px;
  background: #fff;
}
.home-feature-panel {
  margin-top: 66px;
}

/* Home banner ratio fix — show full image, no crop, no squeeze */
.home-hero {
  padding-bottom: 18px;
}
.home-banner-carousel {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  margin-top: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.72);
}
.home-banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}
.home-feature-panel {
  margin-top: 12px;
}

/* Home banner ratio trial — 16:9 */
.home-banner-carousel {
  aspect-ratio: 16 / 9;
}

/* Mobile overflow fix — prevent accidental horizontal scroll */
html,
body,
#app,
.content,
.home-content,
.home-modern {
  max-width: 100%;
  overflow-x: hidden;
}
.home-hero {
  overflow: hidden;
}
.home-banner-carousel,
.home-feature-panel,
.home-task-card {
  max-width: 100%;
}

/* Splash adaptive full-screen fill for different phone heights */
.splash-screen {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.splash-slides,
.splash-slide {
  width: 100%;
  height: 100%;
}
.splash-slide img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center center;
}
.splash-dots {
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}
.splash-slide-cta {
  bottom: calc(44px + env(safe-area-inset-bottom, 0px));
}

/* Floating AI button legacy image style; current button uses inline SVG robot */
.ai-float-btn {
  background: rgba(255,255,255,.96);
  box-shadow: 0 6px 18px rgba(37, 99, 235, .22);
  overflow: visible;
}
.ai-float-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
}

/* WeChat authorization login page */
.login-wechat-screen {
  padding: 0 28px;
  background: #fff;
  color: #111827;
}
.login-wechat-header {
  padding-top: 74px;
  text-align: center;
}
.login-wechat-title {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  color: #111827;
}
.login-wechat-subtitle {
  margin-top: 8px;
  font-size: 14px;
  color: #8a8f99;
}
.login-app-info {
  margin-top: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.login-app-logo {
  width: 74px;
  height: 74px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f8fa;
  box-shadow: 0 6px 18px rgba(15,23,42,.06);
  overflow: hidden;
}
.login-app-logo img {
  max-width: 58px;
  max-height: 58px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.login-app-name {
  margin-top: 16px;
  font-size: 19px;
  line-height: 1.3;
  font-weight: 700;
  color: #111827;
}
.login-app-desc {
  margin-top: 8px;
  font-size: 13px;
  color: #8a8f99;
}
.login-permission-card {
  margin-top: 54px;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  padding: 18px 0;
}
.login-permission-title {
  margin-bottom: 14px;
  font-size: 13px;
  color: #8a8f99;
}
.login-permission-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  line-height: 1.4;
  color: #111827;
}
.login-permission-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #07c160;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 auto;
}
.login-wechat-actions {
  margin-top: auto;
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
}
.login-wechat-btn {
  height: 48px;
  border-radius: 8px;
  background: #07c160;
  font-size: 16px;
  font-weight: 700;
  margin-top: 0;
}
.login-wechat-btn:active {
  background: #06ad56;
  opacity: 1;
}

/* Floating AI transparent background */
.ai-float-btn {
  background: transparent;
  box-shadow: none;
}
.ai-float-btn:active {
  box-shadow: none;
}

/* Animated solid AI robot: nodding head + color-changing eyes */
.ai-float-btn {
  width: 56px;
  height: 56px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.ai-robot {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 8px 14px rgba(37, 99, 235, .22));
  pointer-events: none;
}
.ai-robot svg {
  width: 56px;
  height: 56px;
  overflow: visible;
}
.ai-robot-head {
  transform-box: fill-box;
  transform-origin: 50% 90%;
  animation: ai-robot-nod 2.4s ease-in-out infinite;
}
.ai-robot-face,
.ai-robot-ear,
.ai-robot-base,
.ai-robot-antenna-dot {
  fill: #2563eb;
}
.ai-robot-ear,
.ai-robot-base {
  opacity: .96;
}
.ai-robot-antenna {
  fill: none;
  stroke: #2563eb;
  stroke-width: 3;
  stroke-linecap: round;
}
.ai-robot-eye {
  fill: #22c55e;
  filter: drop-shadow(0 0 4px rgba(34,197,94,.8));
  animation: ai-robot-eye-color 2.4s ease-in-out infinite;
}
.ai-robot-mouth {
  fill: none;
  stroke: #dbeafe;
  stroke-width: 3;
  stroke-linecap: round;
}
@keyframes ai-robot-nod {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  18% { transform: rotate(0deg) translateY(0); }
  34% { transform: rotate(8deg) translateY(2px); }
  50% { transform: rotate(-5deg) translateY(1px); }
  66% { transform: rotate(0deg) translateY(0); }
}
@keyframes ai-robot-eye-color {
  0%, 100% {
    fill: #22c55e;
    filter: drop-shadow(0 0 4px rgba(34,197,94,.8));
  }
  33% {
    fill: #38bdf8;
    filter: drop-shadow(0 0 5px rgba(56,189,248,.85));
  }
  66% {
    fill: #a78bfa;
    filter: drop-shadow(0 0 5px rgba(167,139,250,.85));
  }
}

/* Corporate blue AI robot + data scanning animation */
.ai-robot {
  position: relative;
  filter: drop-shadow(0 8px 16px rgba(26, 86, 219, .26));
}
.ai-robot::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(26,86,219,0),
    rgba(26,86,219,.08),
    rgba(59,130,246,.72),
    rgba(34,211,238,.82),
    rgba(26,86,219,0) 38%,
    rgba(26,86,219,0)
  );
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%);
  mask: radial-gradient(circle, transparent 60%, #000 62%);
  animation: ai-data-scan-rotate 2.1s linear infinite;
  pointer-events: none;
}
.ai-robot::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  top: 14px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(147,197,253,.25), #38bdf8, rgba(147,197,253,.25), transparent);
  box-shadow:
    0 8px 0 -1px rgba(96,165,250,.38),
    0 16px 0 -1px rgba(59,130,246,.28),
    8px 24px 0 -1px rgba(34,211,238,.34);
  animation: ai-data-scan-line 2.1s ease-in-out infinite;
  pointer-events: none;
}
.ai-robot-face,
.ai-robot-ear,
.ai-robot-base,
.ai-robot-antenna-dot {
  fill: #1a56db;
}
.ai-robot-base {
  fill: #1e40af;
}
.ai-robot-antenna {
  stroke: #1a56db;
}
.ai-robot-eye {
  fill: #bfdbfe;
  filter: drop-shadow(0 0 5px rgba(96,165,250,.9));
  animation: ai-robot-eye-blue 2.4s ease-in-out infinite;
}
.ai-robot-mouth {
  stroke: #dbeafe;
}
@keyframes ai-data-scan-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes ai-data-scan-line {
  0%, 100% { transform: translateY(0); opacity: .28; }
  20% { opacity: .95; }
  50% { transform: translateY(21px); opacity: .9; }
  80% { opacity: .35; }
}
@keyframes ai-robot-eye-blue {
  0%, 100% {
    fill: #dbeafe;
    filter: drop-shadow(0 0 4px rgba(147,197,253,.82));
  }
  35% {
    fill: #38bdf8;
    filter: drop-shadow(0 0 6px rgba(56,189,248,.95));
  }
  70% {
    fill: #60a5fa;
    filter: drop-shadow(0 0 6px rgba(96,165,250,.95));
  }
}

/* Carousel swipe behavior */
.splash-carousel-wrap,
.home-banner-carousel {
  touch-action: pan-y;
}
.splash-slide,
.home-banner-slide {
  pointer-events: none;
}
.splash-slide.active,
.home-banner-slide.active {
  pointer-events: auto;
}

/* Todo item icons transparent background */
.home-todo-icon {
  background: transparent;
  box-shadow: none;
}

/* Tab bar icon image support */
.home-tab-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(42,107,244,0.2));
}

/* Glass sky-blue AI robot */
.ai-robot {
  filter:
    drop-shadow(0 10px 18px rgba(14, 165, 233, .28))
    drop-shadow(0 2px 6px rgba(255,255,255,.72));
}
.ai-robot-face,
.ai-robot-ear,
.ai-robot-base,
.ai-robot-antenna-dot {
  fill: rgba(56, 189, 248, .58);
  stroke: rgba(224, 242, 254, .92);
  stroke-width: 1.5;
}
.ai-robot-base {
  fill: rgba(14, 165, 233, .46);
}
.ai-robot-antenna {
  stroke: rgba(14, 165, 233, .86);
}
.ai-robot-eye {
  fill: #e0f2fe;
  filter:
    drop-shadow(0 0 5px rgba(125, 211, 252, .95))
    drop-shadow(0 0 9px rgba(14, 165, 233, .75));
  animation: ai-robot-eye-glass-blue 2.4s ease-in-out infinite;
}
.ai-robot-mouth {
  stroke: rgba(240, 249, 255, .95);
}
.ai-robot::before {
  background: conic-gradient(
    from 0deg,
    rgba(186,230,253,0),
    rgba(186,230,253,.18),
    rgba(125,211,252,.82),
    rgba(240,249,255,.95),
    rgba(14,165,233,0) 38%,
    rgba(14,165,233,0)
  );
}
.ai-robot::after {
  background: linear-gradient(90deg, transparent, rgba(224,242,254,.35), #e0f2fe, rgba(125,211,252,.5), transparent);
  box-shadow:
    0 8px 0 -1px rgba(186,230,253,.5),
    0 16px 0 -1px rgba(125,211,252,.42),
    8px 24px 0 -1px rgba(240,249,255,.55);
}
@keyframes ai-robot-eye-glass-blue {
  0%, 100% {
    fill: #e0f2fe;
    filter: drop-shadow(0 0 5px rgba(125,211,252,.95)) drop-shadow(0 0 9px rgba(14,165,233,.72));
  }
  45% {
    fill: #7dd3fc;
    filter: drop-shadow(0 0 6px rgba(125,211,252,1)) drop-shadow(0 0 11px rgba(56,189,248,.88));
  }
  75% {
    fill: #ffffff;
    filter: drop-shadow(0 0 7px rgba(224,242,254,1)) drop-shadow(0 0 12px rgba(14,165,233,.72));
  }
}

/* ============================================================
   Cert Manager v2 — Figma component spec implementation
   ============================================================ */
.cert-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 74px;
}
.cert-header {
  min-height: 120px;
  margin: -14px calc(var(--content-pad) * -1) 0;
  padding: 32px 24px 24px;
  color: #fff;
  background: linear-gradient(135deg, #2A6BF4 0%, #1F4FCC 100%);
  border-radius: 0 0 24px 24px;
}
.cert-company-name {
  font-size: 20px;
  line-height: 1.25;
  font-weight: 600;
  color: #fff;
}
.cert-company-subtitle {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(255,255,255,.82);
}
.cert-status-section {
  margin-top: -34px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.cert-status-card {
  min-height: 82px;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(31,79,204,.10);
  border: 1px solid rgba(229,229,229,.88);
  cursor: pointer;
}
.cert-status-card:active {
  transform: scale(.98);
}
.cert-status-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}
.cert-status-copy {
  min-width: 0;
}
.cert-status-label {
  font-size: 12px;
  line-height: 1.2;
  color: #666;
}
.cert-status-count {
  margin-top: 4px;
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  color: #1A1A1A;
}
.cert-status-expired .cert-status-icon { color: #E53935; background: #FEECEC; }
.cert-status-warning .cert-status-icon { color: #B7791F; background: #FFF8DB; }
.cert-status-info .cert-status-icon { color: #1E88E5; background: #E8F0FF; }
.cert-status-normal .cert-status-icon { color: #43A047; background: #EAF7EA; }
.cert-section {
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #E5E5E5;
  box-shadow: 0 4px 14px rgba(26,26,26,.04);
}
.cert-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.cert-section-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 600;
  color: #1A1A1A;
}
.cert-section-head span {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
}
.cert-pending-list,
.cert-license-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cert-pending-item {
  padding: 14px;
  border-radius: 14px;
  background: #F7F9FC;
  border: 1px solid #E8F0FF;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.cert-pending-main {
  min-width: 0;
  flex: 1;
}
.cert-pending-id {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
  color: #1A1A1A;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cert-pending-date {
  margin-top: 5px;
  font-size: 13px;
  color: #666;
}
.cert-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.cert-button-primary {
  height: 48px;
  width: 100%;
  color: #fff;
  background: #2A6BF4;
  font-size: 15px;
  border-radius: 12px;
}
.cert-button-secondary {
  color: #2A6BF4;
  background: #E8F0FF;
}
.cert-filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 12px;
}
.cert-filter-row::-webkit-scrollbar { display: none; }
.cert-filter-chip {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  background: #F7F9FC;
  border: 1px solid #E5E5E5;
  cursor: pointer;
}
.cert-filter-chip.active {
  color: #2A6BF4;
  background: #E8F0FF;
  border-color: rgba(42,107,244,.28);
}
.cert-license-card {
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #E5E5E5;
  box-shadow: 0 2px 10px rgba(26,26,26,.035);
}
.cert-license-expired { border-left: 4px solid #E53935; }
.cert-license-warning { border-left: 4px solid #FBC02D; }
.cert-license-normal { border-left: 4px solid #43A047; }
.cert-license-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.cert-license-id {
  min-width: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 500;
  color: #1A1A1A;
  overflow-wrap: anywhere;
}
.cert-status-tag {
  flex: 0 0 auto;
  min-height: 22px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.1;
  font-weight: 600;
}
.cert-tag-expired { color: #E53935; background: #FEECEC; }
.cert-tag-warning { color: #9A6B00; background: #FFF8DB; }
.cert-tag-normal { color: #43A047; background: #EAF7EA; }
.cert-license-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 14px;
  line-height: 1.35;
}
.cert-license-row span {
  flex: 0 0 auto;
  color: #666;
}
.cert-license-row b {
  min-width: 0;
  font-weight: 400;
  color: #1A1A1A;
  text-align: right;
}
.cert-license-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #F7F9FC;
  font-size: 13px;
  line-height: 1.45;
  color: #666;
}
.cert-empty-mini,
.cert-empty-state {
  padding: 18px 0;
  color: #999;
  font-size: 14px;
  text-align: center;
}
.cert-add-fixed {
  background: linear-gradient(180deg, rgba(247,249,252,0), #F7F9FC 35%);
}

/* Cert manager custom background and header image */
.cert-content {
  background: #C1D9F9;
}
.cert-page {
  background: #C1D9F9;
}
.cert-header {
  background:
    linear-gradient(90deg, rgba(42,107,244,.08), rgba(42,107,244,.02)),
    url('../assets/home/证照预警的背景图.png') center / cover no-repeat;
}

/* Cert manager reference-layout adjustment based on root 证照管家.png */
.cert-content {
  padding: 0 var(--content-pad) 10px;
  background: #C1D9F9;
}
.cert-page {
  gap: 12px;
  padding-bottom: 74px;
  background: #C1D9F9;
}
.cert-header {
  min-height: 285px;
  margin: 0 calc(var(--content-pad) * -1) 0;
  padding: calc(22px + env(safe-area-inset-top, 0px)) 20px 24px;
  border-radius: 0;
  background: url('../assets/home/证照预警的背景图.png') center top / cover no-repeat;
  position: relative;
  overflow: hidden;
}
.cert-hero-nav {
  position: relative;
  z-index: 1;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1F4FCC;
  font-size: 17px;
  font-weight: 700;
}
.cert-hero-back {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #1F4FCC;
  background: rgba(255,255,255,.45);
  cursor: pointer;
}
.cert-company-name {
  position: relative;
  z-index: 1;
  margin-top: 34px;
  max-width: 76%;
  color: #1F4FCC;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.28;
}
.cert-status-section {
  margin-top: -66px;
  position: relative;
  z-index: 2;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 14px 6px;
  border-radius: 22px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 30px rgba(31,79,204,.14);
  border: 1px solid rgba(255,255,255,.72);
}
.cert-status-card {
  min-height: 82px;
  padding: 8px 4px;
  border: 0;
  border-radius: 16px;
  box-shadow: none;
  background: transparent;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.cert-status-icon {
  width: 34px;
  height: 34px;
  border-radius: 14px;
}
.cert-status-copy {
  text-align: center;
}
.cert-status-label {
  font-size: 10px;
  white-space: nowrap;
}
.cert-status-count {
  margin-top: 3px;
  font-size: 20px;
}
.cert-section {
  border: 0;
  border-radius: 20px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 8px 20px rgba(31,79,204,.08);
}
.cert-pending-section {
  margin-top: 0;
}
.cert-list-section {
  padding-top: 15px;
}
.cert-license-card,
.cert-pending-item {
  border: 0;
  background: rgba(247,249,252,.96);
  box-shadow: none;
}
.cert-add-fixed {
  background: linear-gradient(180deg, rgba(193,217,249,0), #C1D9F9 35%);
}

/* Cert list fine-tuning: icon + content + badge + arrow card layout */
.cert-license-list {
  gap: 12px;
}
.cert-license-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 14px;
  align-items: center;
  column-gap: 12px;
  padding: 14px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 8px 20px rgba(31,79,204,.07);
  overflow: hidden;
}
.cert-license-card.cert-card-high {
  min-height: 116px;
}
.cert-license-card.cert-card-low {
  min-height: 98px;
}
.cert-license-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 0 8px 8px 0;
}
.cert-license-expired::before { background: #E53935; }
.cert-license-warning::before { background: #FBC02D; }
.cert-license-normal::before { background: #43A047; }
.cert-license-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
}
.cert-license-icon-expired,
.cert-license-icon-warning {
  color: #E53935;
  background: #FEECEC;
}
.cert-license-icon-normal {
  color: #43A047;
  background: #EAF7EA;
}
.cert-license-main {
  min-width: 0;
}
.cert-license-title-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.cert-license-id {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  color: #1A1A1A;
  overflow-wrap: anywhere;
}
.cert-license-meta {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.35;
  color: #666;
}
.cert-license-category {
  display: inline-flex;
  margin-top: 6px;
  padding: 3px 7px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #1E88E5;
  background: #E8F0FF;
}
.cert-license-action {
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.4;
  color: #999;
}
.cert-license-arrow {
  color: #C9D0DC;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
}
.cert-license-card .cert-status-tag {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
}

/* ============================================================
   Cert Manager v3 — layout based on image_c60e5d / root reference
   ============================================================ */
.cert-content {
  padding: 0 14px 10px;
  background: #C1D9F9;
}
.cert-v3-page {
  min-height: 100%;
  gap: 12px;
  padding-bottom: 76px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.18) 0%, rgba(193,217,249,0) 42%),
    #C1D9F9;
}
.cert-v3-hero {
  position: relative;
  min-height: 252px;
  margin: 0 -14px 0;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 18px 0;
  overflow: visible;
  background:
    radial-gradient(circle at 18% 10%, rgba(255,255,255,.88) 0 2px, transparent 3px),
    radial-gradient(circle at 66% 20%, rgba(255,255,255,.72) 0 1px, transparent 2px),
    radial-gradient(circle at 86% 34%, rgba(255,255,255,.65) 0 2px, transparent 3px),
    linear-gradient(135deg, rgba(255,255,255,.58), rgba(255,255,255,.12)),
    url('../assets/home/证照预警的背景图.png') center top / cover no-repeat;
}

.cert-v3-shield {
  width: 25px;
  height: 25px;
  border-radius: 9px 9px 12px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  background: linear-gradient(135deg, #2A6BF4, #1F4FCC);
  box-shadow: 0 8px 16px rgba(42,107,244,.24);
}
.cert-v3-slogan {
  margin-top: 5px;
  padding-left: 33px;
  color: rgba(55,78,122,.62);
  font-size: 12px;
}
.cert-v3-illustration {
  position: absolute;
  z-index: 2;
  right: 20px;
  top: 76px;
  width: 112px;
  height: 96px;
}
.cert-v3-doc {
  position: absolute;
  right: 28px;
  top: 4px;
  width: 58px;
  height: 76px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255,255,255,.85), rgba(232,240,255,.42));
  border: 1px solid rgba(255,255,255,.78);
  box-shadow: 0 16px 28px rgba(42,107,244,.16);
  transform: rotate(-8deg);
}
.cert-v3-doc::before,
.cert-v3-doc::after {
  content: '';
  position: absolute;
  left: 13px;
  right: 13px;
  height: 5px;
  border-radius: 99px;
  background: rgba(42,107,244,.28);
}
.cert-v3-doc::before { top: 23px; }
.cert-v3-doc::after { top: 39px; width: 24px; right: auto; }
.cert-v3-shield-3d {
  position: absolute;
  right: 0;
  bottom: 4px;
  width: 58px;
  height: 62px;
  border-radius: 18px 18px 26px 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(145deg, #6AA8FF, #2A6BF4 55%, #1F4FCC);
  box-shadow: 0 18px 28px rgba(42,107,244,.28);
}
.cert-v3-company-card {
  position: absolute;
  z-index: 3;
  left: 14px;
  right: 14px;
  bottom: 0;
  transform: translateY(50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.86);
  box-shadow: 0 16px 34px rgba(31,79,204,.15);
}
.cert-v3-building {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 21px;
  background: linear-gradient(135deg, #4D8DFF, #2A6BF4);
}
.cert-v3-company-name {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
  color: #1A1A1A;
}
.cert-v3-company-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #8A94A6;
}
.cert-v3-dashboard {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 16px 6px;
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 24px rgba(31,79,204,.10);
}
.cert-v3-stat {
  text-align: center;
  cursor: pointer;
}
.cert-v3-stat-num {
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
}
.cert-v3-stat-label {
  margin-top: 7px;
  color: #8A94A6;
  font-size: 11px;
  white-space: nowrap;
}
.cert-v3-expired { color: #E53935; }
.cert-v3-orange { color: #F59E0B; }
.cert-v3-blue { color: #2A6BF4; }
.cert-v3-normal { color: #43A047; }
.cert-v3-notice {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto 12px;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 8px 20px rgba(31,79,204,.08);
}
.cert-v3-notice-muted {
  grid-template-columns: 36px minmax(0, 1fr);
}
.cert-v3-notice-icon {
  width: 36px;
  height: 36px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2A6BF4;
  font-weight: 800;
  background: #E8F0FF;
}
.cert-v3-notice-title {
  font-size: 14px;
  font-weight: 800;
  color: #1A1A1A;
}
.cert-v3-notice-desc {
  margin-top: 4px;
  color: #7C8798;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cert-v3-notice-count {
  padding: 5px 9px;
  border-radius: 999px;
  color: #2A6BF4;
  font-size: 11px;
  font-weight: 800;
  background: #E8F0FF;
}
.cert-v3-arrow,
.cert-v3-card-arrow {
  color: #C6CEDA;
  font-size: 22px;
  font-weight: 300;
}
.cert-v3-tabs {
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.74);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.82);
  overflow-x: auto;
  scrollbar-width: none;
}
.cert-v3-tabs::-webkit-scrollbar { display: none; }
.cert-v3-tab {
  position: relative;
  flex: 1 0 auto;
  min-width: 58px;
  padding: 8px 10px;
  border-radius: 999px;
  color: #6D7788;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}
.cert-v3-tab:not(.active):not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  width: 1px;
  height: 14px;
  transform: translateY(-50%);
  background: rgba(138,148,166,.22);
}
.cert-v3-tab.active {
  color: #fff;
  background: #2A6BF4;
  box-shadow: 0 6px 14px rgba(42,107,244,.22);
}
.cert-v3-list-section {
  padding: 2px 0 0;
}
.cert-v3-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.cert-v3-list-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: #1A1A1A;
}
.cert-v3-sort-tags {
  display: flex;
  gap: 6px;
}
.cert-v3-sort-tags span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #8A94A6;
  font-size: 11px;
  background: rgba(255,255,255,.78);
}
.cert-v3-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cert-v3-card {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 104px;
  padding: 14px 11px 14px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 8px 20px rgba(31,79,204,.07);
  overflow: hidden;
}

.cert-v3-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}
.cert-v3-icon-expired { background: linear-gradient(135deg, #FF8A80, #E53935); }
.cert-v3-icon-orange { background: linear-gradient(135deg, #FDBA74, #F59E0B); }
.cert-v3-icon-normal { background: linear-gradient(135deg, #7DDE8A, #43A047); }
.cert-v3-card-main {
  min-width: 0;
}
.cert-v3-card-title {
  color: #1A1A1A;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.cert-v3-card-meta {
  margin-top: 6px;
  color: #7C8798;
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cert-v3-card-advice {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.35;
}
.cert-v3-advice-expired,
.cert-v3-advice-orange { color: #D97706; }
.cert-v3-advice-normal { color: #43A047; }
.cert-v3-card-side {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
}
.cert-v3-badge {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}
.cert-v3-badge-expired { color: #E53935; background: #FEECEC; }
.cert-v3-badge-orange { color: #D97706; background: #FFF4DE; }
.cert-v3-badge-normal { color: #43A047; background: #EAF7EA; }
.cert-v3-empty {
  padding: 28px 0;
  color: #8A94A6;
  text-align: center;
  font-size: 14px;
}
.cert-add-fixed {
  background: linear-gradient(180deg, rgba(193,217,249,0), #C1D9F9 36%);
}

/* Cert v3 requested removals / tabs placement */
.cert-v3-list-section .cert-v3-tabs {
  margin-bottom: 12px;
}

/* Cert v3 company info: transparent and placed under slogan */

.cert-v3-company-card {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
  margin-top: 14px;
  padding: 0 0 0 33px;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.cert-v3-building {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}
.cert-v3-company-name {
  color: #1F4FCC;
  text-shadow: 0 1px 0 rgba(255,255,255,.45);
}
.cert-v3-company-sub {
  color: rgba(55,78,122,.68);
}
.cert-v3-dashboard {
  margin-top: -30px;
  position: relative;
  z-index: 2;
}

/* Cert v3 glassmorphism refinement: move left/up and remove solid white cards */
.cert-v3-hero {
  min-height: 224px;
}
.cert-v3-slogan {
  padding-left: 29px;
}
.cert-v3-company-card {
  margin-top: 10px;
  padding-left: 12px;
}
.cert-v3-dashboard {
  margin-top: -44px;
  background: rgba(255,255,255,.24);
  border: 1px solid rgba(255,255,255,.38);
  box-shadow: 0 12px 28px rgba(31,79,204,.12), inset 0 1px 0 rgba(255,255,255,.28);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}
.cert-v3-notice,
.cert-v3-tabs,
.cert-v3-card,
.cert-v3-sort-tags span {
  background: rgba(255,255,255,.24);
  border: 1px solid rgba(255,255,255,.36);
  box-shadow: 0 10px 24px rgba(31,79,204,.10), inset 0 1px 0 rgba(255,255,255,.24);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}
.cert-v3-tabs {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.30), 0 8px 18px rgba(31,79,204,.08);
}
.cert-v3-notice-icon {
  background: rgba(232,240,255,.48);
  border: 1px solid rgba(255,255,255,.38);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cert-v3-notice-count,
.cert-v3-badge-expired,
.cert-v3-badge-orange,
.cert-v3-badge-normal {
  background: rgba(255,255,255,.34);
  border: 1px solid rgba(255,255,255,.34);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cert-v3-tab:not(.active) {
  background: transparent;
}
.cert-v3-list-section {
  margin-top: -2px;
}
.cert-v3-list-head {
  margin-bottom: 8px;
}
.cert-v3-list {
  gap: 10px;
}
.cert-v3-card-icon {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 8px 18px rgba(31,79,204,.12);
}

/* Cert v3 glass layers: more transparent */
.cert-v3-dashboard,
.cert-v3-notice,
.cert-v3-tabs,
.cert-v3-card,
.cert-v3-sort-tags span {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.24);
  box-shadow: 0 8px 20px rgba(31,79,204,.08), inset 0 1px 0 rgba(255,255,255,.18);
  backdrop-filter: blur(18px) saturate(165%);
  -webkit-backdrop-filter: blur(18px) saturate(165%);
}
.cert-v3-notice-icon,
.cert-v3-notice-count,
.cert-v3-badge-expired,
.cert-v3-badge-orange,
.cert-v3-badge-normal {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.22);
}

/* Cert v3 company card as standalone row below brand block */
.cert-v3-company-card {
  position: relative;
  z-index: 2;
  margin-top: 12px;
  margin-left: 12px;
  padding-left: 0;
}

/* Cert v3 dashboard position adjustment */
.cert-v3-dashboard {
  margin-top: -105px;
}

/* Cert v3 dashboard: almost fully transparent to reveal header background */
.cert-v3-dashboard {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.10);
  box-shadow: none;
  backdrop-filter: blur(4px) saturate(120%);
  -webkit-backdrop-filter: blur(4px) saturate(120%);
}

/* Cert v3 background follows home derived gradient */
.cert-content,
.cert-v3-page {
  background: linear-gradient(135deg, #f3fbff 0%, #eaf6ff 44%, #dbeafe 100%);
}
.cert-add-fixed {
  background: linear-gradient(180deg, rgba(243,251,255,0), #eaf6ff 36%, #dbeafe 100%);
}

/* Cert v3 refined glass — clean and restrained */
.cert-v3-dashboard,
.cert-v3-notice,
.cert-v3-tabs,
.cert-v3-card {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.34);
  box-shadow: 0 8px 22px rgba(31,79,204,.08);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
}
.cert-v3-dashboard,
.cert-v3-tabs {
  background: rgba(255,255,255,.12);
}
.cert-v3-notice-icon,
.cert-v3-notice-count,
.cert-v3-badge-expired,
.cert-v3-badge-orange,
.cert-v3-badge-normal {
  background: rgba(255,255,255,.26);
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cert-v3-card-icon,
.cert-v3-building {
  box-shadow: 0 8px 16px rgba(31,79,204,.12);
}

/* Cert v3 cards: remove left icon column and use status tint backgrounds */
.cert-v3-card {
  grid-template-columns: minmax(0, 1fr) auto;
  padding-left: 16px;
}
.cert-v3-card-expired {
  background: linear-gradient(135deg, rgba(229,57,53,.12), rgba(255,255,255,.16));
  border-color: rgba(229,57,53,.18);
}
.cert-v3-card-orange {
  background: linear-gradient(135deg, rgba(245,158,11,.12), rgba(255,255,255,.16));
  border-color: rgba(245,158,11,.18);
}
.cert-v3-card-normal {
  background: linear-gradient(135deg, rgba(67,160,71,.12), rgba(255,255,255,.16));
  border-color: rgba(67,160,71,.18);
}

/* ============================================================
   Profile Page (page=12) - 根据示意图重构
   ============================================================ */

.profile-content {
  padding: 0;
  background: linear-gradient(135deg, #f3fbff 0%, #eaf6ff 44%, #dbeafe 100%);
}

.profile-page {
  min-height: 100%;
  padding-bottom: 70px;
}

/* 顶部背景图区域 */
.profile-hero {
  position: relative;
  min-height: 220px;
  padding: calc(60px + env(safe-area-inset-top, 0px)) 20px 40px;
  background: url('../我的背景图.png') center top / cover no-repeat;
  display: flex;
  align-items: flex-end;
}

.profile-user-info {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2A6BF4, #1F4FCC);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(31,79,204,.25);
  flex-shrink: 0;
}

.profile-user-text {
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: 20px;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(255,255,255,.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-phone {
  margin-top: 4px;
  font-size: 14px;
  color: #607492;
  text-shadow: 0 1px 4px rgba(0,0,0,.1);
}

/* 企业信息卡片 */
.profile-info-card {
  margin: -20px 14px 14px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.34);
  box-shadow: 0 8px 22px rgba(31,79,204,.08);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  position: relative;
  z-index: 2;
}

.profile-info-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.18);
}

.profile-info-row:last-child {
  border-bottom: none;
}

.profile-info-label {
  font-size: 13px;
  color: rgba(0,0,0,.6);
  flex-shrink: 0;
}

.profile-info-value {
  color: #607492;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* 功能菜单 */
.profile-menu {
  margin: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: 0 4px 14px rgba(31,79,204,.06);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.profile-menu-item:active {
  transform: scale(.98);
  box-shadow: 0 2px 8px rgba(31,79,204,.08);
}

.profile-menu-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.profile-menu-content {
  flex: 1;
  min-width: 0;
}

.profile-menu-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
}

.profile-menu-desc {
  margin-top: 3px;
  font-size: 12px;
  color: #8a94a6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu-arrow {
  color: #c6ceda;
  font-size: 22px;
  font-weight: 300;
  flex-shrink: 0;
}

/* 底部信息 */
.profile-footer {
  margin-top: 30px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.7);
  padding: 0 20px;
}

/* Cert v3 add button next to title */
.cert-v3-add-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.34);
  box-shadow: 0 8px 22px rgba(31,79,204,.08);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  color: #2A6BF4;
  font-size: 24px;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s ease;
}
.cert-v3-add-btn:active {
  transform: scale(.9);
}

.profile-hero {
  display: none;
}

/* Profile hero with background image */
.profile-hero {
  position: relative;
  min-height: 260px;
  padding: calc(60px + env(safe-area-inset-top, 0px)) 20px 40px;
  background: url('../我的背景图.png') center top / cover no-repeat;
  display: flex;
  align-items: flex-end;
}

/* Profile info card - glass effect */
.profile-info-card {
  margin: -30px 14px 14px;
  padding: 20px;
  border-radius: 16px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.34);
  box-shadow: 0 8px 22px rgba(31,79,204,.08);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  position: relative;
  z-index: 2;
}
