Files
stash/stash-core/assets/dashboard.css
T

1019 lines
19 KiB
CSS

:root {
--bg: #f7f8fa;
--surface: #ffffff;
--surface-soft: #fbfbfd;
--ink: #1d2129;
--text: #2c343c;
--text-secondary: #4e5969;
--muted: #86909c;
--faint: #c9cdd4;
--border: #eef0f3;
--border-strong: #e6e8ec;
--primary: #3858f6;
--primary-dark: #2947db;
--primary-soft: #eef1ff;
--primary-wash: rgba(56, 88, 246, 0.09);
--warm: #ffba3a;
--warm-soft: #fff7df;
--success: #4abd86;
--danger: #ff3e3e;
--shadow-card: 0 12px 38px rgba(27, 26, 49, 0.045);
--shadow-hover: 0 20px 52px rgba(27, 26, 49, 0.09);
--radius-sm: 10px;
--radius-md: 16px;
--radius-lg: 24px;
--ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
min-width: 320px;
background: var(--bg);
}
body {
position: relative;
min-height: 100vh;
overflow-x: hidden;
background:
radial-gradient(circle at -5% 0%, rgba(255, 186, 58, 0.12), transparent 28rem),
radial-gradient(circle at 104% 7%, rgba(56, 88, 246, 0.1), transparent 34rem),
var(--bg);
color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
a {
color: inherit;
}
button,
input {
font: inherit;
}
.ambient {
position: fixed;
z-index: -1;
border-radius: 999px;
pointer-events: none;
filter: blur(1px);
}
.ambient-blue {
top: -120px;
right: 8%;
width: 360px;
height: 360px;
border: 1px solid rgba(56, 88, 246, 0.07);
background: rgba(56, 88, 246, 0.035);
}
.ambient-warm {
bottom: -170px;
left: -130px;
width: 320px;
height: 320px;
background: rgba(255, 186, 58, 0.045);
}
.workspace {
display: grid;
grid-template-columns: 286px minmax(0, 1fr);
gap: 28px;
width: min(1320px, calc(100% - 64px));
min-width: 0;
margin: 0 auto;
padding: 32px 0;
}
.sidebar {
position: sticky;
top: 32px;
display: flex;
flex-direction: column;
align-self: start;
min-width: 0;
min-height: calc(100vh - 64px);
padding: 26px;
border: 1px solid rgba(255, 255, 255, 0.9);
border-radius: var(--radius-lg);
background: rgba(255, 255, 255, 0.96);
box-shadow: var(--shadow-card);
backdrop-filter: blur(16px);
}
.sidebar-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
}
.brand {
display: inline-flex;
align-items: center;
gap: 10px;
color: var(--ink);
text-decoration: none;
}
.brand-mark {
display: inline-flex;
align-items: center;
justify-content: center;
width: 38px;
height: 38px;
border-radius: 12px;
background: var(--ink);
color: #ffffff;
box-shadow: 0 8px 20px rgba(29, 33, 41, 0.16);
}
.brand-name {
font-size: 23px;
font-weight: 750;
letter-spacing: -1.1px;
}
.brand-name span {
color: var(--primary);
}
.local-badge {
padding: 6px 9px;
border-radius: 999px;
background: var(--primary-soft);
color: var(--primary);
font-size: 9px;
font-weight: 800;
letter-spacing: 1.4px;
}
.sidebar-intro {
margin-top: 58px;
}
.eyebrow {
display: flex;
align-items: center;
gap: 8px;
color: var(--muted);
font-size: 10px;
font-weight: 750;
letter-spacing: 1.8px;
line-height: 1.4;
text-transform: uppercase;
}
.eyebrow-dot {
display: inline-block;
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--warm);
box-shadow: 0 0 0 4px var(--warm-soft);
}
.sidebar-intro h1 {
margin-top: 16px;
color: var(--ink);
font-size: clamp(34px, 3vw, 42px);
font-weight: 760;
letter-spacing: -2px;
line-height: 1.16;
}
.sidebar-lead {
margin-top: 18px;
color: var(--muted);
font-size: 13px;
line-height: 1.85;
}
.overview-card {
min-width: 0;
margin-top: 34px;
padding: 19px 20px 18px;
border: 1px solid var(--border);
border-radius: var(--radius-md);
background:
radial-gradient(circle at 100% 0%, rgba(56, 88, 246, 0.09), transparent 9rem),
var(--surface-soft);
}
.overview-label {
color: var(--muted);
font-size: 11px;
font-weight: 600;
}
.project-total {
display: flex;
align-items: baseline;
gap: 8px;
margin-top: 8px;
}
.project-total strong {
color: var(--primary);
font-size: 52px;
font-weight: 760;
letter-spacing: -3px;
line-height: 1;
}
.project-total span {
color: var(--text-secondary);
font-size: 12px;
font-weight: 600;
}
.service-status {
display: flex;
align-items: center;
gap: 9px;
margin-top: 16px;
padding-top: 14px;
border-top: 1px solid var(--border);
color: var(--text-secondary);
font-size: 11px;
}
.status-dot {
display: inline-block;
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--success);
box-shadow: 0 0 0 5px rgba(74, 189, 134, 0.12);
}
.sidebar-actions {
margin-top: 18px;
}
.refresh-button {
align-items: center;
justify-content: center;
gap: 9px;
width: 100%;
padding: 12px 16px;
border: 0;
border-radius: 12px;
background: var(--primary);
box-shadow: 0 9px 20px rgba(56, 88, 246, 0.2);
color: #ffffff;
font-size: 12px;
font-weight: 700;
cursor: pointer;
transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--ease);
}
.refresh-button:hover {
background: var(--primary-dark);
box-shadow: 0 12px 24px rgba(56, 88, 246, 0.26);
transform: translateY(-1px);
}
.refresh-button:focus-visible {
outline: 3px solid rgba(56, 88, 246, 0.24);
outline-offset: 3px;
}
.refresh-button:disabled {
cursor: wait;
opacity: 0.7;
transform: none;
}
.refresh-button.is-loading svg {
animation: spin 0.8s linear infinite;
}
.js-only {
display: none;
}
.is-enhanced .js-only {
display: flex;
}
.sidebar-hint {
margin-top: 12px;
color: var(--muted);
font-size: 10px;
line-height: 1.65;
text-align: center;
}
.sidebar-footer {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-top: auto;
padding-top: 22px;
border-top: 1px solid var(--border);
color: var(--faint);
font-size: 8px;
font-weight: 750;
letter-spacing: 1.3px;
}
.footer-ready {
display: inline-flex;
align-items: center;
gap: 6px;
color: var(--text-secondary);
}
.footer-ready i {
display: inline-block;
width: 5px;
height: 5px;
border-radius: 50%;
background: var(--success);
}
.content {
min-width: 0;
padding: 13px 2px 28px;
}
.content-header {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 28px;
margin: 0 4px 28px;
}
.content-heading h2 {
margin-top: 9px;
color: var(--ink);
font-size: clamp(29px, 3vw, 36px);
font-weight: 760;
letter-spacing: -1.6px;
line-height: 1.15;
}
.content-heading > p:last-child {
margin-top: 9px;
color: var(--muted);
font-size: 12px;
line-height: 1.7;
}
.content-meta {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
gap: 8px;
padding-bottom: 3px;
}
.live-pill,
.count-pill {
display: inline-flex;
align-items: center;
gap: 7px;
min-height: 32px;
padding: 7px 12px;
border: 1px solid rgba(255, 255, 255, 0.9);
border-radius: 999px;
background: rgba(255, 255, 255, 0.84);
box-shadow: 0 4px 16px rgba(27, 26, 49, 0.035);
color: var(--text-secondary);
font-size: 10px;
font-weight: 650;
backdrop-filter: blur(10px);
}
.live-pill i {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--success);
box-shadow: 0 0 0 4px rgba(74, 189, 134, 0.11);
}
.live-pill.is-live i {
animation: live-pulse 2.2s ease-out infinite;
}
.live-pill.is-reconnecting i {
background: var(--warm);
box-shadow: 0 0 0 4px rgba(255, 186, 58, 0.13);
animation: none;
}
.count-pill strong {
color: var(--primary);
font-size: 13px;
font-weight: 800;
}
.site-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
gap: 18px;
}
.site-item {
position: relative;
display: flex;
flex-direction: column;
min-width: 0;
min-height: 212px;
overflow: hidden;
padding: 20px;
border: 1px solid rgba(255, 255, 255, 0.94);
border-radius: 18px;
background: rgba(255, 255, 255, 0.96);
box-shadow: var(--shadow-card);
text-decoration: none;
opacity: 0;
transform: translateY(10px);
animation: card-arrive 0.55s var(--ease) forwards;
transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s var(--ease);
}
.site-item::before {
position: absolute;
top: 0;
right: 24px;
left: 24px;
height: 2px;
border-radius: 0 0 4px 4px;
background: linear-gradient(90deg, transparent, var(--primary), transparent);
content: "";
opacity: 0;
transition: opacity 0.25s ease;
}
.site-item:hover {
border-color: rgba(56, 88, 246, 0.16);
box-shadow: var(--shadow-hover);
transform: translateY(-4px);
}
.site-item:hover::before {
opacity: 1;
}
.site-item:focus-visible {
outline: 3px solid rgba(56, 88, 246, 0.22);
outline-offset: 3px;
}
.site-item:nth-child(2) {
animation-delay: 45ms;
}
.site-item:nth-child(3) {
animation-delay: 90ms;
}
.site-item:nth-child(4) {
animation-delay: 135ms;
}
.site-item:nth-child(5) {
animation-delay: 180ms;
}
.site-item:nth-child(6) {
animation-delay: 225ms;
}
.site-item:nth-child(n + 7) {
animation-delay: 270ms;
}
.site-card-top {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
}
.site-avatar {
display: inline-flex;
align-items: center;
justify-content: center;
width: 48px;
height: 48px;
border: 1px solid rgba(56, 88, 246, 0.08);
border-radius: 15px;
background:
linear-gradient(145deg, rgba(255, 255, 255, 0.6), transparent),
var(--primary-soft);
color: var(--primary);
font-size: 19px;
font-weight: 780;
}
.site-open {
display: inline-flex;
align-items: center;
justify-content: center;
width: 34px;
height: 34px;
border-radius: 50%;
background: var(--bg);
color: var(--muted);
transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease);
}
.site-item:hover .site-open {
background: var(--primary);
color: #ffffff;
transform: translate(2px, -2px);
}
.site-info {
margin-top: 25px;
min-width: 0;
}
.site-name {
overflow: hidden;
color: var(--ink);
font-size: 18px;
font-weight: 720;
letter-spacing: -0.45px;
line-height: 1.3;
text-overflow: ellipsis;
white-space: nowrap;
}
.site-desc {
display: block;
margin-top: 5px;
color: var(--muted);
font-size: 11px;
}
.site-card-footer {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-top: auto;
padding-top: 17px;
border-top: 1px solid var(--border);
}
.site-path {
max-width: calc(100% - 62px);
overflow: hidden;
color: var(--text-secondary);
font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
font-size: 9.5px;
text-overflow: ellipsis;
white-space: nowrap;
}
.site-ready {
flex-shrink: 0;
color: var(--primary);
font-size: 8px;
font-weight: 800;
letter-spacing: 1.1px;
}
.empty-state {
grid-column: 1 / -1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 430px;
padding: 54px 28px;
border: 1px solid rgba(255, 255, 255, 0.94);
border-radius: 22px;
background: rgba(255, 255, 255, 0.88);
box-shadow: var(--shadow-card);
text-align: center;
animation: card-arrive 0.5s var(--ease) both;
}
.empty-visual {
display: inline-flex;
align-items: center;
justify-content: center;
width: 78px;
height: 78px;
border: 1px solid rgba(56, 88, 246, 0.09);
border-radius: 24px;
background: var(--primary-soft);
color: var(--primary);
transform: rotate(-4deg);
}
.empty-state h3 {
margin-top: 24px;
color: var(--ink);
font-size: 20px;
font-weight: 730;
letter-spacing: -0.5px;
}
.empty-state p {
max-width: 410px;
margin-top: 9px;
color: var(--muted);
font-size: 12px;
line-height: 1.8;
}
.empty-state code {
padding: 2px 6px;
border-radius: 5px;
background: var(--bg);
color: var(--text-secondary);
font-family: "SFMono-Regular", Consolas, monospace;
font-size: 10px;
}
.refresh-status {
min-height: 18px;
margin-top: 14px;
padding-right: 3px;
color: var(--muted);
font-size: 10px;
text-align: right;
}
.error-page {
display: grid;
place-items: center;
padding: 28px;
}
.error-page::before {
position: fixed;
top: 15%;
right: 13%;
width: 240px;
height: 240px;
border-radius: 50%;
background: rgba(56, 88, 246, 0.065);
content: "";
filter: blur(2px);
}
.error-box {
position: relative;
width: min(100%, 480px);
overflow: hidden;
padding: 46px 42px 42px;
border: 1px solid rgba(255, 255, 255, 0.94);
border-radius: 26px;
background: rgba(255, 255, 255, 0.96);
box-shadow: var(--shadow-card);
text-align: center;
}
.error-box::before {
display: block;
margin-bottom: 30px;
color: var(--muted);
content: "STASH · 404";
font-size: 9px;
font-weight: 800;
letter-spacing: 2.2px;
}
.error-box::after {
position: absolute;
top: 0;
right: 25%;
left: 25%;
height: 3px;
border-radius: 0 0 4px 4px;
background: linear-gradient(90deg, transparent, var(--primary), transparent);
content: "";
}
.error-code {
margin-bottom: 15px;
background: linear-gradient(135deg, var(--primary), #6f88ff);
background-clip: text;
color: transparent;
font-size: 86px;
font-weight: 780;
letter-spacing: -6px;
line-height: 0.92;
}
.error-box h1 {
color: var(--ink);
font-size: 23px;
font-weight: 740;
letter-spacing: -0.7px;
}
.error-box p {
margin-top: 12px;
margin-bottom: 28px;
color: var(--muted);
font-size: 12px;
line-height: 1.75;
overflow-wrap: anywhere;
}
.error-box code {
padding: 3px 7px;
border-radius: 6px;
background: var(--bg);
color: var(--text-secondary);
font-family: "SFMono-Regular", Consolas, monospace;
font-size: 10px;
}
.button {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 42px;
padding: 10px 24px;
border-radius: 12px;
background: var(--primary);
box-shadow: 0 9px 20px rgba(56, 88, 246, 0.2);
color: #ffffff;
font-size: 12px;
font-weight: 700;
text-decoration: none;
transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--ease);
}
.button:hover {
background: var(--primary-dark);
box-shadow: 0 12px 24px rgba(56, 88, 246, 0.26);
transform: translateY(-1px);
}
.button:focus-visible {
outline: 3px solid rgba(56, 88, 246, 0.24);
outline-offset: 3px;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
@keyframes card-arrive {
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes live-pulse {
0%,
100% {
box-shadow: 0 0 0 4px rgba(74, 189, 134, 0.11);
}
50% {
box-shadow: 0 0 0 7px rgba(74, 189, 134, 0.04);
}
}
@media (max-width: 1080px) {
.workspace {
grid-template-columns: 252px minmax(0, 1fr);
gap: 22px;
width: min(100% - 40px, 1180px);
}
.sidebar {
padding: 22px;
}
.sidebar-intro {
margin-top: 44px;
}
.sidebar-intro h1 {
font-size: 34px;
}
.site-grid {
grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
gap: 15px;
}
}
@media (max-width: 820px) {
.workspace {
grid-template-columns: minmax(0, 1fr);
width: min(100% - 36px, 720px);
padding: 20px 0 28px;
}
.sidebar {
position: static;
min-height: 0;
padding: 22px;
}
.sidebar-intro {
margin-top: 34px;
}
.sidebar-intro h1 {
font-size: 36px;
}
.sidebar-lead {
max-width: 470px;
}
.overview-card {
margin-top: 24px;
}
.sidebar-actions {
display: flex;
align-items: center;
gap: 16px;
}
.refresh-button {
width: auto;
min-width: 142px;
flex-shrink: 0;
}
.sidebar-hint {
margin-top: 0;
text-align: left;
}
.sidebar-footer {
margin-top: 24px;
}
.content {
padding-top: 8px;
}
}
@media (max-width: 560px) {
body {
background:
radial-gradient(circle at 100% 0%, rgba(56, 88, 246, 0.09), transparent 23rem),
var(--bg);
}
.workspace {
width: calc(100% - 24px);
padding-top: 12px;
}
.sidebar {
padding: 18px;
border-radius: 20px;
}
.brand-mark {
width: 35px;
height: 35px;
border-radius: 11px;
}
.brand-name {
font-size: 21px;
}
.sidebar-intro {
margin-top: 24px;
}
.sidebar-intro h1 {
margin-top: 12px;
font-size: 29px;
letter-spacing: -1.4px;
}
.sidebar-intro h1 br {
display: none;
}
.sidebar-lead {
display: -webkit-box;
margin-top: 11px;
overflow: hidden;
font-size: 11.5px;
line-height: 1.65;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.overview-card {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
align-items: center;
gap: 2px 16px;
margin-top: 16px;
padding: 13px 15px;
}
.overview-label {
grid-column: 1;
font-size: 10px;
}
.project-total {
grid-column: 1;
margin-top: 2px;
}
.project-total strong {
font-size: 38px;
}
.service-status {
grid-column: 2;
grid-row: 1 / 3;
margin-top: 0;
padding-top: 0;
border-top: 0;
font-size: 10px;
white-space: nowrap;
}
.sidebar-actions {
display: block;
margin-top: 12px;
}
.refresh-button {
width: 100%;
}
.sidebar-hint {
display: none;
}
.sidebar-footer {
display: none;
}
.content-header {
flex-direction: column;
align-items: flex-start;
gap: 16px;
margin-bottom: 20px;
}
.content-meta {
justify-content: flex-start;
}
.site-grid {
grid-template-columns: minmax(0, 1fr);
gap: 13px;
}
.site-item {
min-height: 200px;
}
.empty-state {
min-height: 380px;
}
.error-page {
padding: 14px;
}
.error-box {
padding: 38px 24px 34px;
border-radius: 22px;
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
scroll-behavior: auto !important;
transition-duration: 0.01ms !important;
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
}
}