snowflake-dashboard/styles.css

271 lines
4.3 KiB
CSS

:root {
--bg-primary: #0d1117;
--bg-secondary: #161b22;
--bg-hover: #1c2128;
--text-primary: #c9d1d9;
--text-secondary: #8b949e;
--border-color: #30363d;
--accent-color: #58a6ff;
--success-color: #3fb950;
--error-color: #f85149;
--bottom-grid-height: clamp(700px, 85vh, 1000px);
--scrollbar-track: rgba(255, 255, 255, 0.04);
--scrollbar-thumb: rgba(201, 209, 217, 0.22);
--scrollbar-thumb-hover: rgba(201, 209, 217, 0.35);
}
@media (prefers-color-scheme: light) {
:root {
--bg-primary: #ffffff;
--bg-secondary: #f6f8fa;
--bg-hover: #f0f3f6;
--text-primary: #24292f;
--text-secondary: #57606a;
--border-color: #d0d7de;
--accent-color: #0969da;
--success-color: #1a7f37;
--error-color: #cf222e;
--scrollbar-track: rgba(0, 0, 0, 0.04);
--scrollbar-thumb: rgba(36, 41, 47, 0.18);
--scrollbar-thumb-hover: rgba(36, 41, 47, 0.3);
}
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
max-width: 1200px;
margin: 0 auto;
padding: 20px;
background: var(--bg-primary);
color: var(--text-primary);
}
.grid {
display: grid;
gap: 20px;
margin-bottom: 20px;
}
.grid-top {
grid-template-columns: repeat(3, 1fr);
}
.grid-bottom {
grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
align-items: stretch;
}
.stat {
background: var(--bg-secondary);
padding: 30px;
border-radius: 12px;
border: 1px solid var(--border-color);
}
.big {
font-size: 48px;
font-weight: bold;
color: var(--accent-color);
margin-top: 10px;
}
.label {
color: var(--text-secondary);
font-size: 14px;
text-transform: uppercase;
letter-spacing: 1px;
margin-bottom: 15px;
}
.metric-row {
display: flex;
justify-content: space-between;
padding: 8px 0;
border-bottom: 1px solid var(--border-color);
}
.metric-row:last-child {
border-bottom: none;
}
table {
width: 100%;
margin-top: 20px;
border-collapse: collapse;
}
.table-scroll {
overflow: auto;
scrollbar-gutter: stable;
margin-top: 20px;
}
.table-scroll,
#activity-log {
scrollbar-width: thin;
scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
.table-scroll::-webkit-scrollbar,
#activity-log::-webkit-scrollbar {
width: 10px;
height: 10px;
}
.table-scroll::-webkit-scrollbar-track,
#activity-log::-webkit-scrollbar-track {
background: var(--scrollbar-track);
border-radius: 999px;
}
.table-scroll::-webkit-scrollbar-thumb,
#activity-log::-webkit-scrollbar-thumb {
background: var(--scrollbar-thumb);
border: 2px solid transparent;
background-clip: content-box;
border-radius: 999px;
}
.table-scroll::-webkit-scrollbar-thumb:hover,
#activity-log::-webkit-scrollbar-thumb:hover {
background: var(--scrollbar-thumb-hover);
border: 2px solid transparent;
background-clip: content-box;
}
.table-scroll table {
margin-top: 0;
}
#activity-log {
overflow: auto;
scrollbar-gutter: stable;
}
th,
td {
padding: 12px;
text-align: left;
border-bottom: 1px solid var(--border-color);
}
th {
background: var(--bg-primary);
color: var(--text-secondary);
font-weight: 600;
text-transform: uppercase;
font-size: 12px;
}
tr:hover {
background: var(--bg-hover);
}
tr:last-child td {
border-bottom: none;
}
.error {
color: var(--error-color);
}
.success-rate {
color: var(--success-color);
}
.flag {
font-size: 20px;
margin-right: 8px;
}
.left-column {
display: flex;
flex-direction: column;
gap: 20px;
}
@media (min-width: 769px) {
.grid-bottom {
height: var(--bottom-grid-height);
align-items: stretch;
}
.left-column {
height: 100%;
min-height: 0;
}
.left-column > .stat:first-child {
flex-shrink: 0;
}
.left-column > .stat:last-child {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
}
.left-column > .stat:last-child #activity-log {
flex: 1;
min-height: 0;
}
.grid-bottom > .stat {
display: flex;
flex-direction: column;
min-height: 0;
max-height: 100%;
}
.grid-bottom > .stat .table-scroll {
flex: 1;
min-height: 0;
overflow: auto;
}
}
@media (max-width: 768px) {
body {
padding: 10px;
}
.grid {
gap: 15px;
}
.grid-bottom {
grid-template-columns: 1fr;
height: auto;
}
.stat {
padding: 20px;
}
.big {
font-size: 36px;
}
.label {
font-size: 12px;
}
th,
td {
padding: 8px 4px;
font-size: 13px;
}
.metric-row {
flex-wrap: nowrap;
}
#activity-log {
max-height: clamp(250px, 35vh, 400px);
}
.table-scroll {
max-height: clamp(350px, 55vh, 550px);
}
}