/* 画个标 · 设计中枢(home.html 专属样式) 复用主站设计变量:浅色底 / 靛蓝主色 / 8-14px 圆角 / 轻阴影 */ :root { --primary: #4f46e5; --primary-dark: #4338ca; --bg: #f3f4f6; --panel: #ffffff; --border: #e5e7eb; --text: #1f2937; --text-dim: #6b7280; --text-faint: #9ca3af; --hover: #eef2ff; --radius: 12px; --shadow: 0 1px 3px rgba(0, 0, 0, .06); --shadow-hover: 0 10px 28px -12px rgba(31, 41, 55, .28); --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Consolas, monospace; } * { box-sizing: border-box; } html, body { margin: 0; padding: 0; } body { min-height: 100vh; font-family: var(--font); color: var(--text); background: var(--bg); background-image: radial-gradient(900px 420px at 12% -12%, rgba(79, 70, 229, .09), transparent 62%), radial-gradient(700px 360px at 92% 0%, rgba(14, 165, 233, .07), transparent 60%); background-repeat: no-repeat; -webkit-font-smoothing: antialiased; } a { color: inherit; text-decoration: none; } h1, h2, h3, p, ul { margin: 0; } ul { padding: 0; list-style: none; } kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; font-family: var(--mono); font-size: 11px; color: var(--text-dim); background: #f9fafb; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; } /* ============ 顶栏 ============ */ .hub-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; height: 60px; padding: 0 24px; background: rgba(255, 255, 255, .82); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); } .hub-brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; } .hub-brand-icon { display: block; border-radius: 6px; } .hub-brand-name { font-size: 16px; font-weight: 700; letter-spacing: .2px; } .hub-brand-tag { padding: 2px 7px; font-size: 11px; color: var(--primary); background: var(--hover); border-radius: 999px; white-space: nowrap; } /* 搜索框:首页的主入口,放宽、聚焦时给 ring */ .hub-search { position: relative; display: flex; align-items: center; flex: 1; max-width: 460px; height: 36px; padding: 0 10px 0 12px; background: #f9fafb; border: 1px solid var(--border); border-radius: 9px; transition: background .15s, border-color .15s, box-shadow .15s; } .hub-search:focus-within { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); } .hub-search-icon { margin-right: 7px; font-size: 16px; line-height: 1; color: var(--text-faint); } .hub-search input { flex: 1; min-width: 0; height: 100%; padding: 0; font-family: inherit; font-size: 13px; color: var(--text); background: transparent; border: 0; outline: none; } .hub-search input::placeholder { color: var(--text-faint); } .hub-kbd { flex-shrink: 0; margin-left: 6px; } .hub-top-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; flex-shrink: 0; } /* API 状态 */ .api-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; font-size: 11px; color: var(--text-dim); background: #f9fafb; border: 1px solid var(--border); border-radius: 999px; white-space: nowrap; } .api-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-faint); } .api-status.is-ok .api-dot { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, .14); } .api-status.is-ok { color: #047857; border-color: #a7f3d0; background: #ecfdf5; } .api-status.is-down .api-dot { background: #f59e0b; } .hub-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; font-size: 13px; font-weight: 500; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 8px; transition: border-color .15s, background .15s, transform .15s; } .hub-btn:hover { border-color: #c7d2fe; background: var(--hover); } .hub-btn.primary { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-color: transparent; box-shadow: 0 4px 14px -6px rgba(79, 70, 229, .7); } .hub-btn.primary:hover { filter: brightness(1.06); transform: translateY(-1px); } /* ============ 主体 ============ */ .hub-main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 34px 24px 56px; } .hub-hero { margin-bottom: 30px; } .hub-hero h1 { font-size: 30px; font-weight: 700; letter-spacing: -.3px; line-height: 1.25; } .hub-hero-sub { max-width: 720px; margin-top: 9px; font-size: 13.5px; line-height: 1.75; color: var(--text-dim); } .hub-hero-sub b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; } /* 最近访问 */ .hub-recent { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; } .recent-label { font-size: 11px; color: var(--text-faint); letter-spacing: .5px; } .recent-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; font-size: 12px; color: var(--text-dim); background: #fff; border: 1px solid var(--border); border-radius: 999px; transition: color .15s, border-color .15s, background .15s; } .recent-chip:hover { color: var(--primary); background: var(--hover); border-color: #c7d2fe; } /* ============ 区块 ============ */ .hub-section { margin-bottom: 28px; } .hub-section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; } .hub-section-head h2 { font-size: 14px; font-weight: 650; letter-spacing: .2px; } .hub-section-head span { font-size: 11.5px; color: var(--text-faint); } /* ============ 工作台卡片 ============ */ .hub-workspaces { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } .ws-card { position: relative; display: flex; flex-direction: column; min-height: 196px; padding: 18px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; } /* 顶部一条细的品类色带 */ .ws-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--ws); opacity: .85; } .ws-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--ws) 36%, var(--border)); box-shadow: var(--shadow-hover); } .ws-card:focus-visible, .hub-item:focus-visible, .audit-chip:focus-visible, .recent-chip:focus-visible, .hub-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; } .ws-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; } .ws-emoji { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; font-size: 19px; background: color-mix(in srgb, var(--ws) 11%, #fff); border-radius: 10px; transition: transform .18s ease; } .ws-card:hover .ws-emoji { transform: scale(1.06) rotate(-3deg); } .ws-arrow { font-size: 15px; color: var(--text-faint); transition: transform .18s ease, color .18s ease; } .ws-card:hover .ws-arrow { color: var(--ws); transform: translateX(3px); } .ws-card h3 { font-size: 15.5px; font-weight: 650; letter-spacing: .1px; } .ws-card p { margin-top: 6px; font-size: 12.5px; line-height: 1.65; color: var(--text-dim); } .ws-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 14px; } .ws-tags li { padding: 2px 7px; font-size: 10.5px; color: var(--text-dim); background: #f9fafb; border: 1px solid var(--border); border-radius: 999px; white-space: nowrap; } /* ============ 两列区 ============ */ .hub-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } .hub-list { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; } .hub-item { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-bottom: 1px solid #f1f3f5; transition: background .15s; } .hub-item:last-child { border-bottom: 0; } .hub-item:hover { background: #fafbff; } .hi-emoji { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; font-size: 15px; background: #f5f7ff; border-radius: 9px; flex-shrink: 0; } .hi-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; } .hi-title { font-size: 13px; font-weight: 600; } .hi-desc { font-size: 11.5px; line-height: 1.5; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .hi-meta { flex-shrink: 0; font-size: 11.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; } .hi-meta b { font-weight: 600; color: var(--text-dim); } /* ============ 审计条 ============ */ .hub-audits { display: flex; flex-wrap: wrap; gap: 8px; } .audit-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; font-size: 12px; color: var(--text-dim); background: #fff; border: 1px solid var(--border); border-radius: 8px; transition: color .15s, border-color .15s, background .15s; } .audit-chip:hover { color: var(--text); background: var(--hover); border-color: #c7d2fe; } /* ============ 空状态 / 页脚 ============ */ .hub-empty { margin-top: 10px; padding: 28px 16px; text-align: center; font-size: 13px; color: var(--text-dim); background: #fff; border: 1px dashed var(--border); border-radius: 12px; } .hub-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1180px; margin: 0 auto; padding: 18px 24px 30px; font-size: 11.5px; color: var(--text-faint); border-top: 1px solid var(--border); } .hub-foot-dim { display: inline-flex; align-items: center; gap: 3px; } .is-hidden { display: none !important; } /* ============ 响应式 ============ */ @media (max-width: 1080px) { .hub-workspaces { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hub-brand-tag { display: none; } } @media (max-width: 860px) { .hub-cols { grid-template-columns: 1fr; } .hub-top { gap: 12px; padding: 0 16px; } .hub-search { max-width: none; } .hub-btn.primary { padding: 0 11px; font-size: 12px; } .api-status { display: none; } } @media (max-width: 680px) { .hub-main { padding: 24px 16px 40px; } .hub-hero h1 { font-size: 24px; } .hub-workspaces { grid-template-columns: 1fr; } .ws-card { min-height: 0; } .hub-kbd { display: none; } .hub-foot { padding: 16px; } } @media (prefers-reduced-motion: reduce) { * { transition: none !important; } .ws-card:hover { transform: none; } .hub-btn.primary:hover { transform: none; } .ws-card:hover .ws-emoji { transform: none; } .ws-card:hover .ws-arrow { transform: none; } }