/* ============================================================ * shell.scss — W1:布局壳(demo-c-aurora 原文直译,变量改引 tokens 单一来源) * 职责:极光背景/topbar/sidebar(H1 折叠+H2 滚动条)/page-head/main/ * card/metrics/badge/delta/quick-item/lf-* 登录件/语义徽章/基础重置。 * 变量:一律 var(--gosms-*)(tokens.scss);EP 控件走 ep-theme.scss 变量映射。 * ============================================================ */ body { font-family: var(--gosms-font); font-size: var(--gosms-fs-body); color: var(--gosms-text); background: var(--gosms-bg-page); } /* ---- 极光背景:三层径向光斑(demo 原文) ---- */ .aurora { position: fixed; inset: -20%; z-index: 0; pointer-events: none; filter: blur(90px); opacity: 0.55; } html:not(.dark) .aurora { opacity: 0.3; } .aurora::before, .aurora::after { content: ''; position: absolute; border-radius: 50%; } .aurora::before { width: 46vw; height: 46vw; left: -6vw; top: -10vh; background: radial-gradient(circle, rgba(45,212,191,0.5), transparent 65%); animation: drift1 20s ease-in-out infinite alternate; } .aurora::after { width: 40vw; height: 40vw; right: -8vw; top: 30vh; background: radial-gradient(circle, rgba(14,165,233,0.4), transparent 65%); animation: drift2 26s ease-in-out infinite alternate; } @keyframes drift1 { to { transform: translate(14vw, 10vh) scale(1.15); } } @keyframes drift2 { to { transform: translate(-10vw, -8vh) scale(0.9); } } @media (prefers-reduced-motion: reduce) { .aurora::before, .aurora::after { animation: none; } } .num { font-family: var(--gosms-font-num); font-variant-numeric: tabular-nums; } .num-glow { text-shadow: 0 0 22px var(--gosms-primary-soft); } /* ---- 入场动画(W2:原 theme 层佚失类补回;登录卡/错误卡消费) ---- */ @keyframes slide-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } } .animate-slide-up { animation: slide-up 0.45s ease-out both; } @media (prefers-reduced-motion: reduce) { .animate-slide-up { animation: none; } } /* ---- 顶栏(demo 原文) ---- */ .topbar { position: sticky; top: 0; z-index: 50; height: 54px; padding: 0 20px; display: flex; align-items: center; gap: 16px; background: rgba(11, 16, 22, 0.72); backdrop-filter: blur(14px); border-bottom: 1px solid var(--gosms-border); } html:not(.dark) .topbar { background: rgba(255, 255, 255, 0.72); } .brand { display: flex; align-items: center; gap: 10px; } .brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--gosms-gradient); display: grid; place-items: center; font-size: 15px; box-shadow: 0 0 18px var(--gosms-glow); } .brand-name { font-weight: 700; font-size: 15px; color: var(--gosms-text-bright); letter-spacing: 0.02em; } .brand-sub { font-size: 10px; color: var(--gosms-text-muted); letter-spacing: 0.14em; } .top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; } .avatar-chip { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 5px; border-radius: 999px; border: 1px solid var(--gosms-border); cursor: pointer; transition: all 0.2s; } .avatar-chip:hover { border-color: var(--gosms-border-glow); box-shadow: 0 0 14px var(--gosms-primary-soft); } .avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--gosms-gradient); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; } .avatar-name { font-size: 12px; color: var(--gosms-text-bright); } .theme-btn { font-size: 12px; color: var(--gosms-text-muted); background: none; border: 1px solid var(--gosms-border); border-radius: 8px; padding: 5px 12px; cursor: pointer; transition: all 0.2s; } .theme-btn:hover { color: var(--gosms-primary); border-color: var(--gosms-primary); box-shadow: 0 0 12px var(--gosms-primary-soft); } /* 移动端汉堡(项目补充,demo 无;纯原生,不引入 EP) */ .menu-btn { display: none; width: 34px; height: 34px; place-items: center; border: 1px solid var(--gosms-border); border-radius: 8px; background: none; color: var(--gosms-text-muted); cursor: pointer; font-size: 15px; } .menu-btn:hover { color: var(--gosms-primary); border-color: var(--gosms-primary); } /* ---- 布局(demo 原文) ---- */ .shell { position: relative; z-index: 1; display: flex; min-height: 100vh; } .sidebar { width: 224px; flex-shrink: 0; position: sticky; top: 54px; height: calc(100vh - 54px); padding: 16px 12px; overflow: hidden; display: flex; flex-direction: column; background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(14px); border-right: 1px solid var(--gosms-border); } /* W6:菜单滚动区(flex:1 承接)+底脚收起按钮固定最下方 */ .nav-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; } .nav-scroll::-webkit-scrollbar { display: none; } .sidebar-foot { flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 10px 0 0; margin-top: 8px; border-top: 1px solid var(--gosms-border); } .sidebar.collapsed .sidebar-foot { justify-content: center; flex-direction: column; gap: 6px; } html:not(.dark) .sidebar { background: rgba(255, 255, 255, 0.55); } .nav-group { font-size: 10px; color: var(--gosms-text-muted); letter-spacing: 0.16em; padding: 16px 12px 6px; } .nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; color: var(--gosms-text); cursor: pointer; position: relative; transition: all 0.2s; margin-bottom: 2px; text-decoration: none; } .nav-item .ic { width: 17px; text-align: center; font-size: 14px; opacity: 0.8; } .nav-item:hover { background: var(--gosms-card-hover); color: var(--gosms-text-bright); } .nav-item.active { background: var(--gosms-primary-soft); color: var(--gosms-primary); font-weight: 600; } .nav-item.active::before { content: ''; position: absolute; left: -12px; top: 20%; bottom: 20%; width: 3px; border-radius: 3px; background: var(--gosms-gradient); box-shadow: 0 0 10px var(--gosms-glow); } .main { flex: 1; padding: 22px 26px; min-width: 0; } .page-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; } .page-head h2 { font-size: 17px; font-weight: 700; color: var(--gosms-text-bright); margin: 0; } .page-head .sub { font-size: 11px; color: var(--gosms-text-muted); letter-spacing: 0.08em; } .page-head-extra { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; } .live-chip { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--gosms-primary); background: var(--gosms-primary-soft); padding: 4px 12px; border-radius: 999px; } .live-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--gosms-primary); box-shadow: 0 0 8px var(--gosms-glow); animation: pulse 2s infinite; } @keyframes pulse { 50% { opacity: 0.4; } } /* ---- stagger 入场(demo 原文) ---- */ .stagger > * { opacity: 0; animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards; } .stagger > *:nth-child(1) { animation-delay: 0.05s; } .stagger > *:nth-child(2) { animation-delay: 0.13s; } .stagger > *:nth-child(3) { animation-delay: 0.21s; } .stagger > *:nth-child(4) { animation-delay: 0.29s; } @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } } @media (prefers-reduced-motion: reduce) { .stagger > * { animation: none; opacity: 1; } } /* ---- 玻璃卡 + 渐变描边(demo 原文) ---- */ .card { position: relative; border-radius: 16px; padding: 18px 20px; background: var(--gosms-card-veil); backdrop-filter: blur(12px); border: 1px solid var(--gosms-border); transition: all 0.25s; } .card::before { content: ''; position: absolute; inset: -1px; border-radius: 17px; padding: 1px; background: linear-gradient(135deg, rgba(45, 212, 191, 0.45), transparent 40%, transparent 60%, rgba(14, 165, 233, 0.3)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.3s; pointer-events: none; } .card:hover { background: var(--gosms-card-hover); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35); } .card:hover::before { opacity: 1; } html:not(.dark) .card:hover { box-shadow: 0 8px 28px rgba(13, 148, 136, 0.12); } /* ---- 指标卡(demo 原文) ---- */ .metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; } .metric .label { font-size: 11px; color: var(--gosms-text-muted); display: flex; align-items: center; gap: 6px; } .metric .value { font-family: var(--gosms-font-num); font-size: 32px; font-weight: 600; color: var(--gosms-text-bright); margin: 10px 0 8px; line-height: 1; text-shadow: 0 0 22px var(--gosms-primary-soft); } .metric .value .unit { font-size: 14px; color: var(--gosms-text-muted); font-weight: 400; text-shadow: none; } .delta { font-size: 11.5px; display: inline-flex; gap: 5px; align-items: center; padding: 2px 9px; border-radius: 999px; } .delta.up { color: var(--gosms-primary); background: var(--gosms-primary-soft); } .delta.down { color: var(--gosms-red); background: rgba(248, 113, 113, 0.1); } .delta.warn { color: var(--gosms-amber); background: rgba(251, 191, 36, 0.1); } /* ---- 图表 + 快捷(demo 原文) ---- */ .duo { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-top: 14px; } .card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--gosms-text-bright); } .card-head small { margin-left: auto; font-weight: 400; font-size: 10.5px; color: var(--gosms-text-muted); } .trend-svg { width: 100%; height: auto; display: block; } .quick-item { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 11px; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; } .quick-item:hover { background: var(--gosms-primary-soft); border-color: var(--gosms-border-glow); } .quick-item .qic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--gosms-primary-soft); font-size: 15px; } .quick-item .qt { font-size: 12.5px; color: var(--gosms-text-bright); } .quick-item .qd { font-size: 10.5px; color: var(--gosms-text-muted); margin-top: 2px; } .quick-item .arrow { margin-left: auto; color: var(--gosms-text-muted); transition: transform 0.2s; } .quick-item:hover .arrow { transform: translateX(3px); color: var(--gosms-primary); } /* ---- 表格语义(demo 原文;页面内 el-table 由 EP-bridge 对齐) ---- */ .ch-table { width: 100%; border-collapse: collapse; font-size: 12.5px; } .ch-table thead th { font-size: 10.5px; color: var(--gosms-text-muted); letter-spacing: 0.1em; text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--gosms-border); white-space: nowrap; font-weight: 600; } .ch-table thead th.r, .ch-table td.r { text-align: right; } .ch-table tbody td { padding: 11px 12px; border-bottom: 1px solid var(--gosms-border); white-space: nowrap; } .ch-table tbody tr { transition: background 0.15s; } .ch-table tbody tr:hover { background: var(--gosms-primary-soft); } .mono { font-family: var(--gosms-font-num); color: var(--gosms-text-bright); } .badge { font-size: 10.5px; padding: 3px 10px; border-radius: 999px; border: 1px solid; font-weight: 500; display: inline-block; } .badge.ok { color: var(--gosms-primary); border-color: var(--gosms-border-glow); background: var(--gosms-primary-soft); } .badge.warn { color: var(--gosms-amber); border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.08); } .badge.err { color: var(--gosms-red); border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.08); } .badge.violet { color: var(--gosms-violet); border-color: rgba(167, 139, 250, 0.35); background: rgba(167, 139, 250, 0.08); } .rate-bar { display: inline-flex; align-items: center; gap: 8px; } .rate-bar .rb { width: 54px; height: 4px; border-radius: 4px; background: var(--gosms-border); overflow: hidden; } .rate-bar .rb i { display: block; height: 100%; background: var(--gosms-gradient); border-radius: 4px; } /* ---- 项目全局工具类(demo 语义补充;E 阶段 legacy 收编) ---- */ .hint { font-size: 11px; color: var(--gosms-text-muted); } .page-stack { display: flex; flex-direction: column; gap: 14px; } .glass-card { position: relative; border-radius: 16px; padding: 18px 20px; background: var(--gosms-card-veil); backdrop-filter: blur(12px); border: 1px solid var(--gosms-border); } .btn-gradient { background: var(--gosms-gradient); color: #fff; border: none; border-radius: 11px; padding: 11px 20px; font-size: 13.5px; font-weight: 700; cursor: pointer; letter-spacing: 0.04em; box-shadow: 0 4px 20px var(--gosms-glow); transition: all 0.2s; } .btn-gradient:hover { filter: brightness(1.1); box-shadow: 0 6px 28px var(--gosms-glow); transform: translateY(-1px); } /* ---- H1:侧栏收起/展开(64px 图标态;无 popup/无复制 logo,双菜单免疫) ---- */ .collapse-btn { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--gosms-border); border-radius: 8px; background: none; color: var(--gosms-text-muted); cursor: pointer; font-size: 13px; transition: all 0.2s; } .collapse-btn:hover { color: var(--gosms-primary); border-color: var(--gosms-primary); } .collapse-btn .cg { display: inline-block; transition: transform 0.25s; } /* Issue#4:侧栏底脚版本 chip(折叠按钮旁;点击进发布日志,未读新版本红点闪烁) */ .ver-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--gosms-border); border-radius: 999px; color: var(--gosms-text-dim, #909399); font-family: ui-monospace, monospace; font-size: 12px; text-decoration: none; white-space: nowrap; transition: all 0.2s; position: relative; } .ver-chip:hover { color: var(--gosms-primary); border-color: var(--gosms-primary); } .ver-chip .ver-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #f56c6c; animation: gosms-ver-blink 1.1s ease-in-out infinite; } @keyframes gosms-ver-blink { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(245, 108, 108, 0.55); } 50% { opacity: 0.45; box-shadow: 0 0 0 5px rgba(245, 108, 108, 0); } } /* 折叠态(64px):chip 缩为无边框短版本(1.5);红点转绝对定位悬浮右上(badge 式,不占宽防溢出) */ .sidebar.collapsed .ver-chip { height: auto; padding: 2px 4px; border-color: transparent; font-size: 10px; gap: 0; } .sidebar.collapsed .ver-chip .ver-dot { position: absolute; top: -2px; right: -4px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35); } .sidebar.collapsed { width: 64px; padding: 16px 8px; } .sidebar.collapsed .nav-item { justify-content: center; padding: 8px 0; } .sidebar.collapsed .nav-item .txt { display: none; } .sidebar.collapsed .nav-item.active::before { left: -8px; } .sidebar.collapsed .nav-group { color: transparent; padding: 12px 0 8px; position: relative; } .sidebar.collapsed .nav-group::after { content: ''; position: absolute; left: 24%; right: 24%; top: 50%; height: 1px; background: var(--gosms-border); } /* ---- H2:滚动条——侧栏视觉消除(滚动能力保留,职责在 .nav-scroll),全局 demo 化细条 ---- */ * { scrollbar-width: thin; scrollbar-color: var(--gosms-border) transparent; } ::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: var(--gosms-border); border-radius: 3px; } ::-webkit-scrollbar-thumb:hover { background: var(--gosms-primary-soft); } /* ---- 移动端(demo 断点 900 + 项目汉堡抽屉补充) ---- */ @media (max-width: 900px) { .sidebar { display: none; } .duo { grid-template-columns: 1fr; } .menu-btn { display: grid; } .sidebar.open { display: flex; flex-direction: column; position: fixed; top: 54px; left: 0; z-index: 60; height: calc(100vh - 54px); background: var(--gosms-bg-2); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35); } .nav-scrim { position: fixed; inset: 54px 0 0 0; z-index: 55; background: rgba(0, 0, 0, 0.45); } .main { padding: 16px 14px; } .collapse-btn, .sidebar-foot { display: none; } /* 抽屉态强制全宽+文字回归(collapsed 组合免疫) */ .sidebar.open { width: 224px; padding: 16px 12px; } .sidebar.open .nav-item { justify-content: flex-start; padding: 8px 12px; } .sidebar.open .nav-item .txt { display: inline; } .sidebar.open .nav-item.active::before { left: -12px; } .sidebar.open .nav-group { color: var(--gosms-text-muted); padding: 16px 12px 6px; } .sidebar.open .nav-group::after { display: none; } } @media (min-width: 901px) { .nav-scrim { display: none; } } /* ---- P3:全局键盘焦点可见性(只加强不重置;与 aurora 主色一致) ---- */ :focus-visible { outline: 2px solid var(--gosms-primary); outline-offset: 2px; } /* ============================================================ * 基础重置(原 index.scss 职责并入) * ============================================================ */ * { box-sizing: border-box; } html, body, #app { height: 100%; margin: 0; padding: 0; } body { font-variant-numeric: tabular-nums; } table, .el-table { font-variant-numeric: tabular-nums; } ::selection { background: var(--gosms-primary-soft); } /* ============================================================ * 语义徽章/趋势胶囊/说明文字(原 semantics.scss 职责并入) * ============================================================ */ .sem-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; line-height: 18px; border: 1px solid transparent; } .sem-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; } .sem-badge--ok { color: var(--el-color-success); background: var(--el-color-success-light-9); border-color: var(--el-color-success-light-7); } .sem-badge--fail { color: var(--el-color-danger); background: var(--el-color-danger-light-9); border-color: var(--el-color-danger-light-7); } .sem-badge--pending { color: var(--el-color-warning); background: var(--el-color-warning-light-9); border-color: var(--el-color-warning-light-7); } .sem-badge--off { color: var(--gosms-text-muted); background: var(--el-fill-color-light); border-color: var(--gosms-border); } .hint { font-size: var(--gosms-fs-xs); color: var(--gosms-text-muted); line-height: 1.5; } .trend-up, .trend-down, .trend-flat { display: inline-flex; align-items: center; gap: 3px; padding: 2px 9px; border-radius: 999px; font-size: var(--gosms-fs-sm); font-weight: 500; line-height: 16px; width: fit-content; } .trend-up { color: var(--el-color-success); background: var(--el-color-success-light-9); } .trend-down { color: var(--el-color-danger); background: var(--el-color-danger-light-9); } .trend-flat { color: var(--gosms-text-muted); background: var(--gosms-input-veil); }