Files
yovision/prototypes/assets/styles.css
T

245 lines
18 KiB
CSS

:root {
color-scheme: light;
--bg: #f5f7fb;
--surface: #ffffff;
--surface-muted: #f8fafc;
--text: #172033;
--text-muted: #5d687c;
--border: #dce2ec;
--primary: #2563eb;
--primary-hover: #1d4ed8;
--primary-soft: #e8f0ff;
--success: #16794a;
--success-soft: #e9f7ef;
--warning: #a15c00;
--warning-soft: #fff5df;
--danger: #c62828;
--danger-soft: #fff0f0;
--neutral-soft: #eef2f7;
--sidebar: #111b2e;
--sidebar-muted: #91a0b8;
--focus: #0b6bcb;
--radius-sm: 6px;
--radius: 10px;
--radius-lg: 16px;
--shadow-sm: 0 1px 2px rgba(18, 32, 56, 0.06);
--shadow-md: 0 8px 24px rgba(18, 32, 56, 0.09);
--space-1: 4px;
--space-2: 8px;
--space-3: 12px;
--space-4: 16px;
--space-5: 20px;
--space-6: 24px;
--sidebar-width: 240px;
font-family: Inter, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a, [role="button"] { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; }
svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 42%, transparent); outline-offset: 2px; }
#main-content:focus { outline: none; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 1000; background: var(--surface); padding: 10px 14px; border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 14px; background: var(--sidebar); color: #fff; z-index: 40; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 8px 18px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; font-weight: 800; letter-spacing: -0.04em; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: 0.01em; }
.brand-subtitle { display: block; color: var(--sidebar-muted); font-size: 11px; font-weight: 500; }
.side-label { margin: 12px 10px 6px; color: var(--sidebar-muted); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.side-nav { display: grid; gap: 4px; }
.side-nav button, .side-nav a { width: 100%; min-height: 44px; border: 0; border-radius: 8px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; background: transparent; color: #c8d1e0; text-align: left; text-decoration: none; transition: background 180ms ease, color 180ms ease; }
.side-nav button:hover, .side-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-nav button.active, .side-nav a.active { background: #243653; color: #fff; box-shadow: inset 3px 0 0 #60a5fa; }
.side-note { margin: 18px 4px 0; padding: 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: rgba(255,255,255,.04); color: #c8d1e0; font-size: 12px; }
.side-note strong { color: #fff; display: block; margin-bottom: 4px; }
.main-column { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 24px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.94); backdrop-filter: blur(10px); }
.topbar-left, .topbar-actions, .inline { display: flex; align-items: center; gap: 10px; }
.btn.mobile-menu { display: none; }
.page-eyebrow { color: var(--text-muted); font-size: 12px; }
.page-name { margin: 0; font-size: 18px; line-height: 1.25; }
.prototype-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 4px 9px; border: 1px solid #b8cdf8; border-radius: 999px; background: var(--primary-soft); color: #194fae; font-size: 12px; font-weight: 650; white-space: nowrap; }
.prototype-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.content { width: min(1540px, 100%); margin: 0 auto; padding: 24px; }
.view { display: none; animation: fade-in 180ms ease-out; }
.view.active { display: block; }
@keyframes fade-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.page-header h1 { margin: 0 0 4px; font-size: clamp(22px, 2vw, 30px); line-height: 1.25; letter-spacing: -0.02em; }
.page-header p { margin: 0; color: var(--text-muted); max-width: 760px; }
.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.btn { min-height: 40px; padding: 8px 13px; border: 1px solid var(--border); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--surface); color: var(--text); font-weight: 650; text-decoration: none; transition: border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease; }
.btn:hover { border-color: #a9b5c8; background: #f8fafc; }
.btn-primary { border-color: var(--primary); background: var(--primary); color: #fff; }
.btn-primary:hover { border-color: var(--primary-hover); background: var(--primary-hover); }
.btn-danger { border-color: #e7b8b8; background: var(--danger-soft); color: var(--danger); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--text-muted); }
.btn-icon { width: 42px; padding: 8px; }
.btn:disabled { cursor: not-allowed; opacity: .48; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.metric { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.metric-label { color: var(--text-muted); font-size: 12px; font-weight: 650; }
.metric-value { margin: 5px 0 3px; font-size: 26px; font-weight: 760; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.metric-foot { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 12px; }
.metric-foot strong { color: var(--success); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: minmax(0, 1.6fr) minmax(280px, .9fr); }
.grid-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.card-header { min-height: 54px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); }
.card-header h2, .card-header h3 { margin: 0; font-size: 15px; }
.card-body { padding: 16px; }
.card-subtitle { margin: 2px 0 0; color: var(--text-muted); font-size: 12px; }
.stack { display: grid; gap: 12px; align-content: start; }
.status { min-height: 25px; padding: 3px 8px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; font-size: 12px; font-weight: 680; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-success { background: var(--success-soft); color: var(--success); }
.status-warning { background: var(--warning-soft); color: var(--warning); }
.status-danger { background: var(--danger-soft); color: var(--danger); }
.status-neutral { background: var(--neutral-soft); color: #4c5a70; }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 12px; }
.field { display: grid; gap: 5px; min-width: 170px; }
.field.grow { flex: 1 1 240px; }
.field label { font-size: 12px; font-weight: 680; color: #465268; }
.input, select.input, textarea.input { width: 100%; min-height: 42px; border: 1px solid #cfd7e4; border-radius: 8px; padding: 8px 11px; background: #fff; color: var(--text); }
.input:focus { border-color: var(--focus); outline: 3px solid color-mix(in srgb, var(--focus) 18%, transparent); outline-offset: 0; }
.help { color: var(--text-muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { background: var(--surface-muted); color: #465268; font-size: 12px; font-weight: 720; }
td { font-variant-numeric: tabular-nums; }
tbody tr { transition: background 160ms ease; }
tbody tr:hover { background: #f8fbff; }
.table-title { font-weight: 680; }
.table-subtitle { display: block; margin-top: 2px; color: var(--text-muted); font-size: 12px; }
.empty-row { text-align: center; color: var(--text-muted); padding: 30px; }
.video-stage { position: relative; min-height: 360px; overflow: hidden; border-radius: 9px; background: radial-gradient(circle at 45% 38%, #31445d, #172337 55%, #0d1524); color: #dfe8f4; }
.video-stage::before { content: ""; position: absolute; inset: 18% 12%; border: 1px solid rgba(255,255,255,.12); background: linear-gradient(145deg, transparent 45%, rgba(255,255,255,.04)); }
.camera-caption { position: absolute; left: 14px; top: 14px; display: flex; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 7px; background: rgba(7,13,24,.72); font-size: 12px; }
.video-time { position: absolute; right: 14px; bottom: 12px; font: 12px ui-monospace, SFMono-Regular, Consolas, monospace; }
.zone-shape { position: absolute; inset: 24% 22% 18% 18%; border: 2px solid #60a5fa; background: rgba(37,99,235,.16); clip-path: polygon(8% 14%, 88% 0, 100% 72%, 42% 100%, 0 78%); }
.zone-label { position: absolute; left: 23%; top: 30%; padding: 4px 7px; border-radius: 5px; background: #1d4ed8; color: #fff; font-size: 11px; font-weight: 700; }
.activity-list { display: grid; gap: 10px; }
.activity-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: 0; }
.activity-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: var(--primary-soft); color: var(--primary); }
.activity-title { font-weight: 680; }
.activity-meta { color: var(--text-muted); font-size: 12px; }
.activity-time { color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.pipeline { display: grid; grid-template-columns: repeat(6, minmax(112px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.pipeline-step { position: relative; min-height: 116px; padding: 13px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.pipeline-step:not(:last-child)::after { content: ""; position: absolute; right: -9px; top: 50%; width: 9px; border-top: 2px solid #9fb2ce; }
.pipeline-index { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 750; font-size: 12px; }
.pipeline-step h3 { margin: 9px 0 3px; font-size: 13px; }
.pipeline-step p { margin: 0; color: var(--text-muted); font-size: 12px; }
.pipeline-step.running { border-color: #8bb2ff; box-shadow: inset 0 0 0 1px #8bb2ff; }
.alert-row { display: grid; grid-template-columns: 5px minmax(0, 1fr) auto; gap: 12px; padding: 13px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); cursor: pointer; }
.alert-row:hover, .alert-row.selected { border-color: #9db7e8; background: #f8fbff; }
.severity-bar { border-radius: 999px; background: var(--danger); }
.severity-bar.medium { background: var(--warning); }
.alert-title { font-weight: 720; }
.alert-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 4px; color: var(--text-muted); font-size: 12px; }
.timeline { position: relative; display: grid; gap: 0; }
.timeline-item { position: relative; padding: 0 0 18px 26px; }
.timeline-item::before { content: ""; position: absolute; left: 6px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.timeline-item:not(:last-child)::after { content: ""; position: absolute; left: 10px; top: 19px; bottom: 2px; border-left: 1px solid #bbcae0; }
.timeline-title { font-weight: 680; }
.timeline-meta { color: var(--text-muted); font-size: 12px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; overflow-x: auto; }
.tabs button { min-height: 42px; padding: 8px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--text-muted); font-weight: 650; white-space: nowrap; }
.tabs button[aria-selected="true"] { border-bottom-color: var(--primary); color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 18px; background: rgba(7, 13, 24, .55); }
.modal-backdrop.open { display: flex; }
.modal { width: min(520px, 100%); max-height: min(760px, calc(100vh - 36px)); overflow-y: auto; border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 24px 70px rgba(0,0,0,.28); animation: modal-in 180ms ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.modal-header, .modal-footer { padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.modal-header { border-bottom: 1px solid var(--border); }
.modal-header h2 { margin: 0; font-size: 17px; }
.modal-body { padding: 18px; }
.modal-footer { border-top: 1px solid var(--border); justify-content: flex-end; }
.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: grid; gap: 8px; width: min(360px, calc(100vw - 36px)); }
.toast { padding: 12px 14px; border: 1px solid #b9c8dc; border-radius: 9px; background: #172033; color: #fff; box-shadow: var(--shadow-md); animation: toast-in 180ms ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.prototype-home { min-height: 100vh; background: radial-gradient(circle at 80% 0%, #dbeafe, transparent 30%), var(--bg); }
.home-nav { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px clamp(18px, 5vw, 72px); border-bottom: 1px solid var(--border); background: rgba(255,255,255,.88); }
.home-main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: clamp(42px, 8vw, 92px) 0; }
.hero { max-width: 850px; }
.hero h1 { margin: 14px 0 16px; font-size: clamp(34px, 6vw, 64px); line-height: 1.05; letter-spacing: -0.045em; }
.hero p { max-width: 720px; margin: 0; color: var(--text-muted); font-size: clamp(16px, 2vw, 20px); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 44px; }
.product-card { min-height: 300px; padding: 22px; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-lg); background: rgba(255,255,255,.94); box-shadow: var(--shadow-sm); text-decoration: none; transition: border-color 180ms ease, box-shadow 180ms ease; }
.product-card:hover { border-color: #9db7e8; box-shadow: var(--shadow-md); }
.product-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.product-icon svg { width: 26px; height: 26px; }
.product-card h2 { margin: 22px 0 8px; font-size: 23px; }
.product-card p { margin: 0; color: var(--text-muted); }
.product-card ul { padding-left: 18px; color: #465268; }
.card-link { margin-top: auto; display: flex; align-items: center; justify-content: space-between; color: var(--primary); font-weight: 720; }
.boundary-note { margin-top: 20px; padding: 14px 16px; border-left: 4px solid var(--warning); border-radius: 6px; background: var(--warning-soft); color: #714300; }
@media (max-width: 1080px) {
.metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-2, .grid-even { grid-template-columns: 1fr; }
.product-grid { grid-template-columns: 1fr; }
.product-card { min-height: auto; }
}
@media (max-width: 760px) {
.app-shell { display: block; }
.sidebar { position: fixed; left: 0; top: 0; width: min(300px, 88vw); transform: translateX(-102%); transition: transform 200ms ease; box-shadow: var(--shadow-md); }
.sidebar.open { transform: translateX(0); }
.btn.mobile-menu { display: inline-flex; }
.topbar { padding: 9px 14px; }
.topbar-actions .prototype-pill { display: none; }
.content { padding: 18px 14px 28px; }
.page-header { display: grid; }
.page-actions { justify-content: flex-start; }
.metric-grid { grid-template-columns: 1fr 1fr; }
.metric-value { font-size: 22px; }
.video-stage { min-height: 260px; }
.pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
.pipeline-step:not(:last-child)::after { display: none; }
.home-nav { padding: 10px 16px; }
.home-main { width: min(100% - 28px, 1180px); padding-top: 44px; }
}
@media (max-width: 430px) {
.metric-grid { grid-template-columns: 1fr; }
.topbar-actions .btn { display: none; }
.page-actions .btn { flex: 1 1 auto; }
.activity-item { grid-template-columns: auto minmax(0, 1fr); }
.activity-time { grid-column: 2; }
.pipeline { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}