Spaces:
Running
Running
Download static/css/dashboard.css from Arrechenash/stocks: direct link, hf CLI and curl.
- Browser
- Download file 40 kB
-
https://huggingface.co/spaces/Arrechenash/stocks/resolve/main/static/css/dashboard.css
- Command line
-
hf download hf://spaces/Arrechenash/stocks/static/css/dashboard.css
-
curl -L -o dashboard.css https://huggingface.co/spaces/Arrechenash/stocks/resolve/main/static/css/dashboard.css
40 kB
/* Dashboard page β multi-widget live view that replaces the old single
global signals drawer.
Layout model: the page is a single full-height column (toolbar + grid).
Widget cards are height-capped rather than content-sized so that a row of
cards fills the viewport instead of leaving a dead band underneath, and so
.dash-widget__body's overflow:auto actually engages (a flex column only
scrolls its children once the column itself is height-constrained). */
.dashboard-page {
--dash-gutter: var(--space-lg);
/* Height of one card row: fill whatever the toolbar leaves, within sane
bounds. Cards are uniform so a row reads as one instrument panel. Kept
short so several widgets fit above the fold -- users resize individual
cards taller via the corner handle. --viewport-h carries the vh/dvh pair
(and its own vh fallback), so this is one declaration, not two. */
--widget-h: clamp(240px, calc(var(--viewport-h) - 340px), 620px);
}
.dashboard-page .page-wrapper {
/* .page-wrapper is shared and ships with zero horizontal padding, which
left dashboard content flush against the window edge. Scoped here so
other pages keep their current gutters. The top edge is left to the
shared rule: a `padding` shorthand here outranked the phone offset that
clears the floating menu button, and the title sat under it. */
padding-right: var(--dash-gutter);
padding-bottom: var(--space-xl);
padding-left: var(--dash-gutter);
}
/* ββ Toolbar βββββββββββββββββββββββββββββββββββββββββββββββ */
.dash-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-sm) var(--space-md);
flex-wrap: wrap;
padding-bottom: var(--space-xs);
margin-bottom: var(--space-sm);
border-bottom: 1px solid var(--border);
min-height: 0;
}
.dash-toolbar__title {
margin: 0;
font-size: var(--page-title-size);
font-weight: 600;
line-height: 1.2;
letter-spacing: 0.02em;
white-space: nowrap;
}
.dash-toolbar__actions {
display: flex;
align-items: center;
gap: var(--space-sm);
flex-shrink: 0;
}
/* Notification permission is a status, not an action, in 2 of its 3 states β
so it reads as a quiet chip rather than a second competing button. */
.dash-notify {
display: inline-flex;
align-items: center;
gap: var(--space-sm);
background: none;
border: 1px solid transparent;
border-radius: var(--radius-md);
padding: 5px var(--space-sm);
font-family: inherit;
font-size: var(--font-xs);
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--text-muted);
cursor: pointer;
transition: all var(--transition-fast);
}
.dash-notify:hover:not(:disabled) {
color: var(--text-primary);
border-color: var(--border);
}
.dash-notify:disabled {
cursor: default;
opacity: 0.75;
}
.dash-notify__dot {
width: var(--table-cell-pad-y);
height: var(--table-cell-pad-y);
border-radius: var(--radius-round);
background: var(--text-dim);
flex-shrink: 0;
}
.dash-notify[data-state="granted"] .dash-notify__dot {
background: var(--positive);
}
.dash-notify[data-state="denied"] .dash-notify__dot {
background: var(--negative);
}
.dash-notify[data-state="default"] .dash-notify__dot {
background: var(--warning);
}
/* ββ Tab bar (dashboard spaces) βββββββββββββββββββββββββββββββ */
.dash-tabs {
display: flex;
align-items: center;
gap: var(--space-2xs);
flex-wrap: wrap;
}
/* Tabs embedded in the slim toolbar: one compact row, no extra footprint. */
.dash-tabs--inline {
flex: 1 1 auto;
justify-content: center;
min-width: 0;
margin: 0;
}
.dash-tab {
display: inline-flex;
align-items: center;
gap: var(--space-2xs);
border: 1px solid transparent;
border-radius: var(--radius-md);
background: none;
min-height: var(--control-height);
padding: 0 var(--space-sm);
font-family: inherit;
font-size: var(--font-sm);
color: var(--text-secondary);
cursor: pointer;
transition: all var(--transition-fast);
}
.dash-tab:hover {
background: var(--surface-raised);
color: var(--text-primary);
}
.dash-tab.is-active {
background: color-mix(in srgb, var(--accent) 10%, transparent);
border-color: color-mix(in srgb, var(--accent) 35%, transparent);
color: var(--accent);
}
.dash-tab__name {
background: none;
border: none;
padding: 0;
margin: 0;
font: inherit;
color: inherit;
cursor: pointer;
}
.dash-tab__close {
background: none;
border: none;
padding: 0 var(--space-2xs);
margin: 0;
font-size: var(--font-md);
line-height: 1;
opacity: 0;
color: var(--text-dim);
cursor: pointer;
}
.dash-tab:hover .dash-tab__close,
.dash-tab.is-active .dash-tab__close {
opacity: 1;
}
.dash-tab__close:hover {
color: var(--negative);
}
.dash-tab--new {
border-style: dashed;
border-color: var(--border);
padding: 3px 10px;
}
/* ββ Grid ββββββββββββββββββββββββββββββββββββββββββββββββββ */
.dash-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(min(var(--dash-card-min), 100%), 1fr));
gap: var(--space-md);
align-items: start;
}
.dash-empty {
grid-column: 1 / -1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: var(--space-sm);
text-align: center;
min-height: var(--widget-h);
padding: var(--space-xl);
border: 1px dashed var(--border);
border-radius: var(--radius-lg);
background: color-mix(in srgb, var(--accent) 2%, transparent);
}
.dash-empty__title {
margin: 0;
font-size: var(--font-lg);
color: var(--text-secondary);
}
.dash-empty__text {
margin: 0 0 var(--space-sm);
max-width: 46ch;
font-size: var(--font-sm);
color: var(--text-muted);
line-height: 1.6;
}
.dash-empty__text strong {
color: var(--text-secondary);
font-weight: 600;
}
/* ββ Widget card βββββββββββββββββββββββββββββββββββββββββββ */
.dash-widget {
display: flex;
flex-direction: column;
position: relative;
background: var(--bg-surface, var(--bg-elevated));
border: 1px solid var(--border);
border-radius: var(--radius-lg);
overflow: hidden;
/* Custom per-card height wins (set via --row-h from the resize handle);
otherwise the page default. No height transition: the resize gesture
edits --row-h every frame, so a transition would lag behind it. */
height: var(--row-h, var(--widget-h));
transition: border-color var(--transition-fast);
}
/* Column span from the resize handle. The client clamps spans to the number
of columns that currently fit, but these guards also cover viewport
resizes after the span was stored (a wide span on a narrow screen would
force horizontal overflow). */
.dash-widget[data-col-span="2"] {
grid-column: span 2;
}
.dash-widget[data-col-span="3"] {
grid-column: span 3;
}
@media (width <= 1024px) {
.dash-widget[data-col-span="3"] {
grid-column: span 2;
}
}
/* intentional breakpoint: 640px is the small-phone mark below the 768px
tablet break, where a 380px card no longer fits beside a second one. */
@media (width <= 640px) {
.dash-widget[data-col-span="2"],
.dash-widget[data-col-span="3"] {
grid-column: span 1;
}
}
.dash-widget:hover {
border-color: var(--border-focus);
}
/* Type is carried by a 2px rail on the card edge instead of a pill badge in
the header β same information, none of the header real estate.
Eleven types map onto six colours, so the colour alone never identified a
widget: `toplist` and `news` share --positive, `watchlist`, `screener` and
`newsfeed` share --info, `stock_info` and `filings` share --warning,
`at_risk` and `dilution` share --danger. The second cue is the rail's
texture, grouped by what the widget is rather than by subject:
solid the widget is the page's own content: chart, toplist, watchlist
dashed the widget is a feed or a saved filter (news, newsfeed, screener,
filings) β a wider stream, narrowed to what is worth a card
dotted the widget is a computed read on one symbol (stock_info, at_risk,
dilution) β a verdict on that slice, not the slice itself
Three patterns over the existing six colours: no new colour enters the
palette, and two widgets that share a colour still differ in texture. The
three types with no rule below (alert, external_feed, custom) keep the base
solid rail. */
.dash-widget::before {
content: "";
position: absolute;
inset: 0 auto 0 0;
width: var(--radius-sm);
background: var(--info);
/* The two textures, declared once so every rail of the same texture is
literally the same gradient. 8px of ink every 14px reads as a dash, 2px
of ink every 7px as a dot; the dot has to stay short or the rail turns
back into a dash. These are rail geometry, not spacing or radius, so the
numbers are literals here even though --space-sm resolves to 8px. */
--rail-dash-on: 8px;
--rail-dash-cycle: 14px;
--rail-dot-on: 2px;
--rail-dot-cycle: 7px;
}
/* solid */
.dash-widget[data-type="toplist"]::before {
background: var(--positive);
}
.dash-widget[data-type="chart"]::before {
background: var(--accent);
}
.dash-widget[data-type="watchlist"]::before {
background: var(--info);
}
/* dashed */
.dash-widget[data-type="news"]::before {
background: repeating-linear-gradient(
to bottom,
var(--positive) 0 var(--rail-dash-on),
transparent var(--rail-dash-on) var(--rail-dash-cycle)
);
}
.dash-widget[data-type="screener"]::before {
background: repeating-linear-gradient(
to bottom,
var(--info) 0 var(--rail-dash-on),
transparent var(--rail-dash-on) var(--rail-dash-cycle)
);
}
.dash-widget[data-type="filings"]::before {
background: repeating-linear-gradient(
to bottom,
var(--warning) 0 var(--rail-dash-on),
transparent var(--rail-dash-on) var(--rail-dash-cycle)
);
}
.dash-widget[data-type="newsfeed"]::before {
background: repeating-linear-gradient(
to bottom,
var(--text-secondary) 0 var(--rail-dash-on),
transparent var(--rail-dash-on) var(--rail-dash-cycle)
);
}
/* dotted */
.dash-widget[data-type="stock_info"]::before {
background: repeating-linear-gradient(
to bottom,
var(--warning) 0 var(--rail-dot-on),
transparent var(--rail-dot-on) var(--rail-dot-cycle)
);
}
.dash-widget[data-type="at_risk"]::before {
background: repeating-linear-gradient(
to bottom,
var(--danger) 0 var(--rail-dot-on),
transparent var(--rail-dot-on) var(--rail-dot-cycle)
);
}
.dash-widget[data-type="dilution"]::before {
background: repeating-linear-gradient(
to bottom,
var(--danger) 0 var(--rail-dot-on),
transparent var(--rail-dot-on) var(--rail-dot-cycle)
);
}
.dash-widget--paused::before {
background: var(--text-dim);
}
.dash-widget__header {
display: flex;
flex-wrap: wrap; /* a narrow card (390 px phone) cannot fit the title plus 11 controls on one line; the action row wraps below instead of pushing the delete control past the card edge */
align-items: center;
gap: var(--space-sm);
row-gap: var(--space-xs);
padding: var(--space-sm) var(--space-md);
border-bottom: 1px solid var(--border);
background: linear-gradient(
180deg,
color-mix(in srgb, var(--accent) 3.5%, transparent),
transparent
);
flex-shrink: 0;
/* The header is the drag handle (widget-layout.js). Buttons stay
clickable -- the drag start ignores any interaction with button/a/
input/select. touch-action none keeps the pointer gesture uninterrupted
on touch; the widget body below still scrolls normally. */
cursor: grab;
touch-action: none;
user-select: none;
}
.dash-widget__header:active {
cursor: grabbing;
}
.dash-widget__kind {
flex-shrink: 0;
font-size: var(--font-xs);
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.09em;
color: var(--info);
}
.dash-widget[data-type="toplist"] .dash-widget__kind {
color: var(--positive);
}
.dash-widget[data-type="chart"] .dash-widget__kind {
color: var(--accent);
}
.dash-widget[data-type="watchlist"] .dash-widget__kind {
color: var(--info);
}
.dash-widget[data-type="stock_info"] .dash-widget__kind {
color: var(--warning);
}
.dash-widget[data-type="news"] .dash-widget__kind {
color: var(--positive);
}
.dash-widget[data-type="newsfeed"] .dash-widget__kind {
color: var(--text-secondary);
}
.dash-widget[data-type="at_risk"] .dash-widget__kind {
color: var(--danger);
}
.dash-widget[data-type="screener"] .dash-widget__kind {
color: var(--info);
}
.dash-widget[data-type="filings"] .dash-widget__kind {
color: var(--warning);
}
.dash-widget[data-type="dilution"] .dash-widget__kind {
color: var(--danger);
}
.dash-widget__title {
flex: 1;
min-width: 0; /* let the flex item shrink below its content width so ellipsis kicks in instead of pushing the action buttons out of the card */
margin: 0;
font-size: var(--font-md);
font-weight: 600;
letter-spacing: 0.01em;
color: var(--text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor: text; /* title is clickable/editable */
}
.dash-widget__state-tag {
flex-shrink: 0;
font-size: var(--font-xxs);
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
padding: var(--space-2xs) var(--space-xs-plus);
border-radius: var(--radius-sm);
background: var(--warning-bg, var(--accent-bg));
color: var(--warning, var(--text-muted));
}
/* ββ Header actions ββββββββββββββββββββββββββββββββββββββββ */
.dash-widget__actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--space-sm);
flex-shrink: 1;
min-width: 0; /* on a wrapped header line the action group shrinks to the card width and its groups wrap, instead of overflowing the card */
}
.dash-widget__action-group {
display: flex;
align-items: center;
gap: var(--space-2xs);
}
/* Mute/pause stay visible because their state is information. The
management group (clear/reorder/edit/delete) is the chrome that made the
header look like a toolbar, so it fades in on card hover or keyboard
focus rather than shouting on every card at rest. */
.dash-widget__action-group--secondary {
opacity: 0;
transition: opacity var(--transition-base);
}
.dash-widget:hover .dash-widget__action-group--secondary,
.dash-widget:focus-within .dash-widget__action-group--secondary {
opacity: 1;
}
.dash-widget__action {
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
padding: 0;
background: none;
border: 1px solid transparent;
border-radius: var(--radius-sm);
color: var(--text-dim);
cursor: pointer;
transition: all var(--transition-fast);
}
.dash-widget__action:hover {
color: var(--text-primary);
background: var(--surface-raised);
border-color: var(--border);
}
.dash-widget__action:focus-visible {
outline: var(--radius-sm) solid var(--accent);
outline-offset: var(--radius-sm);
}
/* A symbol row is a <td>/<tr>/<div> that behaves as a button, so it needs the
same focus ring the real action buttons get -- a table cell has no default
outline of its own. */
.dash-widget [data-symbol]:focus-visible {
/* Negative offset, against the shared 2px: the ring sits INSIDE a table
cell, where a positive offset would land on the neighbouring cell and be
clipped by the widget's own overflow. The width is still the spec's. */
outline: var(--radius-sm) solid var(--accent);
outline-offset: -2px;
border-radius: var(--radius-sm);
}
.dash-widget__action.is-active {
color: var(--warning);
background: var(--warning-bg);
}
.dash-widget__action--danger:hover {
color: var(--negative);
border-color: color-mix(in srgb, var(--negative) 50%, transparent);
background: var(--negative-bg);
}
/* ββ Body / table ββββββββββββββββββββββββββββββββββββββββββ */
/* Control row between the header and the scrolling body: the per-widget
symbol field (chart / stock info / news / filings / dilution) and the
toplist session picker. Kept OUT of the body so it can never be scrolled
out of reach; `hidden` until a widget actually mounts a control. */
.dash-widget__tools {
display: flex;
align-items: center;
gap: var(--space-sm);
padding: var(--space-xs) var(--space-md);
border-bottom: 1px solid var(--border);
}
.dash-widget__tools[hidden] {
display: none;
}
.dash-widget__body {
flex: 1;
min-height: 0; /* flex items default to a content-based min-height, which silently defeats overflow:auto in a height-capped flex column */
overflow: auto;
scrollbar-width: thin;
/* A dashboard is a dozen cards, most of them off-screen: skip laying out
and painting the contents of the ones nobody is looking at. The card's
own height is the height cap, not its content, so there is no size to
guess and no contain-intrinsic-size to declare -- skipping the subtree
cannot move a card. The body scrolls on its own and the resize handle
measures the card, never the content, so the gesture is unaffected. */
content-visibility: auto;
}
.dash-widget--paused .dash-widget__body {
opacity: 0.45;
}
.dash-feed-log {
margin: 0;
padding: var(--space-sm) var(--space-md);
font-size: var(--font-xs);
line-height: 1.4;
white-space: pre-wrap;
word-break: break-all;
color: var(--text-secondary);
}
.dash-feed-toolbar {
display: flex;
justify-content: flex-end;
padding: var(--space-xs) var(--space-md) 0;
}
.dash-feed-toggle {
font-size: var(--font-xxs);
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.06em;
padding: var(--space-2xs) var(--space-sm);
border-radius: var(--radius-sm);
border: 1px solid var(--border);
background: transparent;
color: var(--text-muted);
cursor: pointer;
}
.dash-feed-toggle.active {
color: var(--accent);
border-color: var(--accent);
}
.dash-event-filter {
display: flex;
flex-wrap: wrap;
gap: var(--space-xs) var(--space-md);
}
.dash-event-filter__item {
display: inline-flex;
align-items: center;
gap: var(--space-xs);
font-size: var(--font-sm);
color: var(--text-secondary);
cursor: pointer;
}
.dash-table {
width: 100%;
font-size: var(--font-sm);
table-layout: fixed;
}
.dash-col--sym {
width: 5rem;
}
.dash-col--price {
width: 5.75rem;
}
.dash-col--time {
width: 5.25rem;
}
.dash-table th {
white-space: nowrap;
}
.dash-table td {
border-bottom: 1px solid color-mix(in srgb, var(--accent) 5%, transparent);
color: var(--text-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.dash-table th:first-child,
.dash-table td:first-child {
padding-left: var(--space-md);
}
.dash-table th:last-child,
.dash-table td:last-child {
padding-right: var(--space-md);
}
.dash-table tbody tr:hover td {
background: color-mix(in srgb, var(--accent) 5%, transparent);
}
.dash-table tbody tr:last-child td {
border-bottom: none;
}
/* Numeric columns: right-aligned and tabular so digits line up column-wise
and magnitudes are comparable at a glance. */
.dash-table .num {
text-align: right;
font-family: var(--font-mono);
font-variant-numeric: tabular-nums;
font-feature-settings: "tnum";
}
.dash-table th.num {
font-family: inherit;
}
/* A volume such as "41,144,293" is wider than the equal-width numeric column
at 390 px; the default 8px cell padding left it 4px short and ellipsised it.
Numeric cells take the 4px step, which fits it at 390 px. */
.dash-table td.num {
padding-inline: var(--space-xs);
}
.dash-cell--sym {
font-weight: 700;
letter-spacing: 0.03em;
color: var(--text-primary);
}
.dash-cell--dim {
color: var(--text-muted);
}
.dash-cell--time {
color: var(--text-dim);
font-size: var(--font-xs);
}
.dash-table__empty td {
text-align: center;
color: var(--text-dim);
padding: var(--space-xl) var(--space-md);
font-size: var(--font-sm);
}
.dash-alert {
color: var(--text-secondary);
}
.dash-alert--up {
color: var(--positive, var(--success));
}
.dash-alert--down {
color: var(--negative, var(--danger));
}
/* Per-condition effectiveness strip on an alert widget. The signal table below
shows WHAT fired; this shows which leaf of the alert is producing it, since
a composite alert emits the same signal name for every branch and the table
alone cannot say whether volume_spike or the EMA cross is doing the work. */
.dash-alert-metrics {
border-bottom: 1px solid var(--border);
padding: var(--space-xs) var(--space-sm);
}
.dash-alert-metrics[hidden] {
display: none;
}
.dash-alert-metrics__head {
color: var(--text-dim);
display: flex;
font-size: var(--font-xs);
gap: var(--space-xs);
justify-content: space-between;
margin-bottom: var(--space-xs);
text-transform: uppercase;
}
.dash-alert-metrics__chips {
display: flex;
flex-wrap: wrap;
gap: var(--space-xs);
}
.dash-alert-metric {
align-items: baseline;
background: var(--surface-raised);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
display: inline-flex;
font-size: var(--font-xs);
gap: var(--space-xs);
padding: 1px var(--space-xs);
}
.dash-alert-metric__key {
color: var(--text-secondary);
font-family: var(--font-mono);
max-width: 18ch;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.dash-alert-metric__n {
color: var(--text-dim);
font-family: var(--font-mono);
}
/* Dimmed rather than red: a leaf under 50% is normal for one branch of a
composite alert, and colouring it as a failure would cry wolf on a stat
that is doing its job. */
.dash-alert-metric__rate {
color: var(--text-secondary);
font-family: var(--font-mono);
}
.dash-alert-metric__rate--weak {
color: var(--text-dim);
}
/* Drag-and-drop feedback (widget-layout.js): while a drag is active the
grid stops selecting text and the card being dragged fades slightly. */
.dash-grid.is-dragging,
.dash-grid.is-dragging .dash-widget__header {
cursor: grabbing;
}
.dash-grid.is-dragging {
user-select: none;
}
.dash-widget.is-dragging {
opacity: 0.55;
transform: scale(1.01) rotate(-0.5deg);
box-shadow: var(--shadow-lg);
transition: transform var(--transition-fast);
}
/* Drop-target feedback: the card the dragged widget will land against gets a
dashed accent ring so the user can see the slot before releasing. */
.dash-grid.is-dragging .dash-widget.is-drop-target {
box-shadow: inset 0 0 0 var(--radius-sm) var(--accent);
border-color: var(--accent);
}
/* ββ Resize handle (bottom-right corner) ββββββββββββββββββββ */
.dash-widget-resize {
position: absolute;
right: 0;
bottom: 0;
z-index: var(--z-2);
width: var(--icon-size);
height: var(--icon-size);
padding: 0;
border: none;
background: transparent;
cursor: nwse-resize;
touch-action: none;
/* Hidden until the card is hovered so it never eats clicks in the
corner; visibility is restored on :hover so the card itself keeps
working when the handle is not the gesture target. */
opacity: 0;
pointer-events: none;
transition: opacity var(--transition-fast);
}
.dash-widget-resize::after {
content: "";
position: absolute;
right: var(--space-xs);
bottom: var(--space-xs);
width: 9px;
height: 9px;
border-right: var(--radius-sm) solid var(--text-dim);
border-bottom: var(--radius-sm) solid var(--text-dim);
border-bottom-right-radius: var(--radius-sm);
transition: border-color var(--transition-fast);
}
.dash-widget:hover .dash-widget-resize,
.dash-widget.is-resizing .dash-widget-resize {
opacity: 1;
pointer-events: auto;
}
.dash-widget:hover .dash-widget-resize::after,
.dash-widget.is-resizing .dash-widget-resize::after {
border-color: var(--text-secondary);
}
/* No hover on touch screens: keep the handle always available. */
@media (hover: none) {
.dash-widget-resize {
opacity: 1;
pointer-events: auto;
}
}
/* ββ Status footer βββββββββββββββββββββββββββββββββββββββββ */
.dash-widget__status {
display: flex;
align-items: center;
gap: var(--space-sm);
flex-shrink: 0;
font-size: var(--font-xs);
color: var(--text-dim);
/* Extra right padding keeps the status text clear of the resize
handle that sits in the bottom-right corner. */
/* The 20px is room for the resize handle: the spacing scale has no 20px step, and --icon-size names glyphs. */
padding: var(--space-xs-plus) calc(var(--space-md) + 20px) var(--space-xs-plus) var(--space-md);
border-top: 1px solid var(--border);
background: var(--bg);
min-height: var(--control-height);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.dash-widget__status::before {
content: "";
width: var(--table-cell-pad-y);
height: var(--table-cell-pad-y);
border-radius: var(--radius-round);
background: var(--text-dim);
flex-shrink: 0;
}
.dash-widget[data-state="live"] .dash-widget__status::before {
background: var(--positive);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--positive) 15%, transparent);
}
.dash-widget[data-state="pending"] .dash-widget__status::before {
background: var(--warning);
}
.dash-widget[data-state="error"] .dash-widget__status::before {
background: var(--negative);
}
.dash-widget[data-state="live"] .dash-widget__status {
color: var(--text-muted);
}
/* ββ Help text βββββββββββββββββββββββββββββββββββββββββββββ */
.dash-help {
font-size: var(--font-xs);
line-height: 1.6;
color: var(--text-muted);
margin: var(--space-sm) 0 0;
}
.dash-help a {
color: var(--text-secondary);
text-decoration: underline;
text-underline-offset: var(--radius-sm);
}
.dash-help a:hover {
color: var(--text-primary);
}
/* ββ Add/Edit widget modal βββββββββββββββββββββββββββββββββ */
.dash-modal {
padding: 0;
border-radius: var(--radius-lg);
overflow: hidden;
}
.dash-modal__header {
padding: var(--space-lg) var(--space-lg) var(--space-md);
border-bottom: 1px solid var(--border);
}
.dash-modal__title {
margin: 0;
font-size: var(--font-xl);
letter-spacing: 0.02em;
}
.dash-modal__subtitle {
margin: var(--space-xs) 0 0;
font-size: var(--font-sm);
color: var(--text-muted);
}
.dash-modal__body {
padding: var(--space-lg);
}
.dash-modal__body .modal-field-group:last-child {
margin-bottom: 0;
}
.dash-field {
width: 100%;
box-sizing: border-box;
}
.dash-modal__actions {
display: flex;
justify-content: flex-end;
gap: var(--space-sm);
padding: var(--space-md) var(--space-lg);
border-top: 1px solid var(--border);
background: var(--bg);
}
/* ββ Undo snackbar ββββββββββββββββββββββββββββββββββββββββββ */
.dash-undo-snackbar {
display: flex;
align-items: center;
justify-content: center;
gap: var(--space-md);
padding: var(--space-sm) var(--space-md);
margin-top: var(--space-md);
box-shadow: var(--shadow-md);
opacity: 0;
transform: translateY(10px);
pointer-events: none;
transition: opacity var(--transition-base), transform var(--transition-base);
}
.dash-undo-snackbar.is-visible {
opacity: 1;
transform: translateY(0);
pointer-events: auto;
}
.dash-undo__msg {
font-size: var(--font-sm);
color: var(--text-secondary);
}
.dash-undo__btn {
padding: var(--space-xs) var(--space-md);
font-size: var(--font-xs);
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--accent);
background: none;
border: 1px solid var(--accent);
border-radius: var(--radius-sm);
cursor: pointer;
transition: all var(--transition-fast);
}
.dash-undo__btn:hover {
color: var(--bg-primary);
background: var(--accent);
}
.dash-undo__btn:focus-visible {
outline: var(--radius-sm) solid var(--accent);
outline-offset: var(--radius-sm);
}
/* Tab editing input */
.dash-tab__edit-input {
flex: 1;
min-width: 120px;
max-width: 200px;
padding: var(--space-2xs) var(--space-sm);
font: inherit;
font-size: var(--font-sm);
color: var(--text-primary);
background: var(--bg-elevated);
border: 1px solid var(--accent);
border-radius: var(--radius-md);
outline: none;
}
.dash-tab__edit-input:focus {
box-shadow: 0 0 0 var(--space-2xs) color-mix(in srgb, var(--accent) 20%, transparent);
}
.dash-tab--edit {
padding: 1px var(--space-sm);
}
/* ββ Responsive ββββββββββββββββββββββββββββββββββββββββββββ */
/* intentional breakpoint: gutter density only β no column count changes
here, the column-fit cut is the 1024px one above. */
@media (width <= 900px) {
.dashboard-page {
--dash-gutter: var(--space-md);
}
}
/* intentional breakpoint: 640px, not 768px β the widget grid keeps its
multi-column track here and only collapses on a small phone. */
@media (width <= 640px) {
.dash-grid {
grid-template-columns: 1fr;
}
.dashboard-page {
/* A fixed 420px ignored the height actually available, and the
desktop clamp ran on 100vh, which counts the strip the mobile
browser chrome hides β in landscape a single card did not fit on
screen at all. Clamp against the dynamic viewport instead. */
/* The 420px ceiling is this widget's own cap, not a chart stage: --chart-stage-height has the same value but is a chart card's height. */
--widget-h: clamp(200px, calc(100dvh - 300px), 420px);
}
.dash-toolbar {
align-items: flex-start;
}
.dash-toolbar__actions {
width: 100%;
justify-content: space-between;
}
/* No hover on touch β keep the management actions permanently visible. */
.dash-widget__action-group--secondary {
opacity: 1;
}
}
/* Dense dashboard-table columns: shared by phones in portrait and by the
320px-wide landscape case below, so the declaration list lives here once.
Weakest-first order means the later blocks still win where they differ. */
@media (width <= 480px), (orientation: landscape) and (width <= 900px) {
/* Dashboard tables: keep long numbers readable at phone widths without
clipping. Give volume room to auto-size and tighten numeric padding. */
.dash-table {
font-size: 0.625rem;
}
.dash-table td.num {
padding-inline: 0;
}
.dash-table .num {
font-size: 0.625rem;
letter-spacing: -0.06em;
font-variant-numeric: tabular-nums;
}
.dash-col--sym {
width: 2.375rem;
}
.dash-col--price {
width: 2.25rem;
}
.dash-col--chg,
.dash-col--time {
width: 2.25rem;
}
.dash-col--vol {
width: auto;
}
.dash-col--relvol {
width: 2rem;
}
.dash-cell--sym {
letter-spacing: -0.03em;
font-size: 0.625rem;
overflow: visible;
text-overflow: clip;
}
.dash-table th:first-child,
.dash-table td:first-child {
padding-left: 0;
}
.dash-table th:last-child,
.dash-table td:last-child {
padding-right: 0;
}
}
@media (width <= 480px) {
/* space-between across a 360px phone leaves a hole in the middle of the
toolbar, and a wrapped tab bar can take three rows on its own. Two
fixed rows instead β title + actions, then the tabs β with the tabs
scrolling sideways the way .tf-selector already does. */
/* minmax(0, β¦) lets the columns shrink below their content: a nowrap title
and the three-button action group together were 381px on a 360px phone.
The title wraps and the buttons wrap inside their own column. */
.dash-toolbar {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, auto);
grid-template-areas:
"title actions"
"tabs tabs";
gap: var(--space-xs) var(--space-sm);
}
.dash-toolbar__title {
grid-area: title;
white-space: normal;
min-width: 0;
}
.dash-toolbar__actions {
grid-area: actions;
width: auto;
min-width: 0;
flex-wrap: wrap;
justify-content: flex-end;
}
.dash-tabs--inline {
grid-area: tabs;
justify-content: flex-start;
flex-wrap: nowrap;
overflow-x: auto;
scrollbar-width: none;
}
.dash-tabs--inline::-webkit-scrollbar {
display: none;
}
.dash-tabs--inline .dash-tab {
flex-shrink: 0;
}
/* Touch targets: the tab name, the resize grip and the undo button were
20-25px tall. Each takes the dense 36px phone target; the grip stays
in the card corner, where it was. */
.dash-tab__name,
.dash-undo__btn {
min-height: var(--touch-target-size);
}
.dash-widget-resize {
width: var(--touch-target-size);
height: var(--touch-target-size);
}
}
@media (hover: none) {
.dash-widget__action-group--secondary {
opacity: 1;
}
}
/* Landscape is the one case a width cut cannot express: the phone is wide
but only ~360px tall, so the card has to shrink with the height. Placed
after the <=640px block so it wins for the phones it overlaps. */
/* intentional breakpoint: 900px because a tablet in landscape has the same
height problem as a phone, even though its width is in the tablet band. */
@media (orientation: landscape) and (width <= 900px) {
.dashboard-page {
--widget-h: clamp(180px, 55dvh, 320px);
}
}
/* ββ Cross-widget symbol selection βββββββββββββββββββββββββ
Any row carrying [data-symbol] is a picker: clicking it broadcasts the
symbol to every widget (widget-selection.js), and the matching row is
highlighted with an accent tint + left rail wherever it appears. */
.dash-table tbody tr[data-symbol] {
cursor: pointer;
}
.dash-table tbody tr[data-symbol].is-selected td,
.dash-table tbody tr[data-symbol].is-selected:hover td {
background: color-mix(in srgb, var(--accent) 12%, transparent);
box-shadow: inset var(--radius-sm) 0 0 var(--accent);
}
/* Row selection is a dashboard interaction (pick the row's symbol), so it
scopes the shared .news-item instead of restyling it. */
.dash-news-list .news-item[data-symbol]:not([data-symbol=""]) {
cursor: pointer;
}
.dash-news-list .news-item.is-selected {
background: color-mix(in srgb, var(--accent) 12%, transparent);
border-radius: var(--radius-sm);
box-shadow: inset var(--radius-sm) 0 0 var(--accent);
}
.dash-widget__placeholder {
display: block;
color: var(--text-dim);
font-size: var(--font-sm);
text-align: center;
padding: var(--space-xl) var(--space-md);
}
/* ββ Chart widget βββββββββββββββββββββββββββββββββββββββββ */
.dash-widget__body--chart {
padding: var(--space-sm);
}
.dash-chart-slot {
height: 100%;
min-height: 240px;
display: flex;
}
.dash-chart-slot stock-chart-card {
flex: 1;
min-width: 0;
}
/* wrapChartCards() puts a .flip-card between the slot and the card. As a flex item it
keeps its content width unless it grows, which leaves the right side of the slot empty. */
.dash-chart-slot .flip-card {
flex: 1 1 0;
min-width: 0;
}
/* ββ News / Newsfeed widgets ββββββββββββββββββββββββββββββ */
.dash-news-list {
display: flex;
flex-direction: column;
padding: var(--space-xs) var(--space-md) var(--space-sm);
}
.dash-news-tags {
display: flex;
flex-wrap: wrap;
gap: var(--space-xs-plus);
margin-top: var(--space-xs-plus);
}
.dash-news-tag {
font-size: var(--font-xxs);
font-weight: 700;
letter-spacing: 0.05em;
padding: 1px var(--space-xs-plus);
border-radius: var(--radius-sm);
background: color-mix(in srgb, var(--accent) 8%, transparent);
color: var(--accent);
}
.dash-feed-hint {
margin-right: auto;
font-size: var(--font-xs);
color: var(--text-dim);
}
/* ββ SEC Filings widget βββββββββββββββββββββββββββββββββββββ */
.dash-filings {
display: flex;
flex-direction: column;
padding: var(--space-xs) var(--space-md) var(--space-sm);
}
/* ββ Dilution widget ββββββββββββββββββββββββββββββββββββββββ */
/* ββ Dilution Risk Profile (shared with dilution page) ββββββββββββββββββββββ */
.dash-dilution-card {
padding: var(--space-md);
}
.dash-dilution-card .dilution-risk-profile {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius-md);
padding: var(--space-md);
margin: 0 0 var(--space-md);
}
.dash-dilution-card .dilution-risk-profile__head {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-md);
flex-wrap: wrap;
margin-bottom: var(--space-md);
padding-bottom: var(--space-sm);
border-bottom: 1px solid var(--border);
}
.dash-dilution-card .dilution-risk-profile__title {
font-family: var(--font-heading);
font-size: var(--font-md);
font-weight: 600;
color: var(--text);
}
.dash-dilution-card .dilution-risk-profile__row {
display: grid;
grid-template-columns: 120px 1fr;
gap: var(--space-sm);
padding: var(--space-xs) 0;
font-size: var(--font-sm);
align-items: start;
}
.dash-dilution-card .dilution-risk-profile__label {
color: var(--text-secondary);
font-weight: 500;
}
.dash-dilution-card .dilution-risk-profile__value {
color: var(--text);
overflow-wrap: anywhere;
}
/* ββ Stock info widget ββββββββββββββββββββββββββββββββββββ */
.dash-info {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr));
gap: var(--space-sm);
padding: var(--space-md);
}
/* Inline symbol input */
.dash-symbol-input {
width: 100%;
max-width: 160px;
padding: var(--space-2xs) var(--space-sm);
font-family: var(--font-mono);
font-size: var(--font-xs);
font-weight: 600;
letter-spacing: 0.04em;
color: var(--text);
background: var(--bg-input);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
outline: none;
}
.dash-symbol-input:focus {
border-color: var(--border-focus);
box-shadow: 0 0 0 var(--space-2xs) color-mix(in srgb, var(--accent) 20%, transparent);
}
.dash-symbol-input::placeholder {
color: var(--text-dim);
}
/* Header symbol input β replaces the tools-row input so the symbol appears
once (in the title) and the editor stays in the header, saving a row
of card height and eliminating the duplication. */
.dash-symbol-input--header {
flex: 1;
min-width: 0;
max-width: none;
width: 100%;
height: var(--control-height);
padding: 0 var(--space-sm);
font-size: var(--font-md);
font-weight: 600;
letter-spacing: 0.01em;
background: transparent;
border: none;
border-bottom: var(--radius-sm) solid var(--accent);
color: var(--text-primary);
}
.dash-symbol-input--header:focus {
outline: none;
border-bottom-color: var(--accent);
box-shadow: none;
}
/* Session picker (toplist widgets) -- sits in the same control row as the
symbol input, so it reads as part of the card rather than page chrome. */
.dash-session-select {
max-width: 180px;
font-size: var(--font-xs);
}
/* Touch screens have no hover: the widget management actions fade in on hover
and would never appear on a phone, so they stay visible there, and each
target is a usable size instead of 22px. */
@media (hover: none) {
.dash-widget__action-group--secondary {
opacity: 1;
}
}
@media (pointer: coarse) {
.dash-widget__action {
width: var(--touch-target-size);
height: var(--touch-target-size);
}
}
/* A phone is a touch screen even when the probe reports a fine pointer. */
@media (width <= 600px) {
.dash-widget__action {
width: var(--touch-target-size);
height: var(--touch-target-size);
}
}
/* Phone: dashboard tabs are 36px targets. */
@media (width <= 600px) {
.dash-tab,
.dash-tab-add {
min-height: var(--touch-target-size);
}
}
/* Dashboard page β multi-widget live view that replaces the old single
global signals drawer.
Layout model: the page is a single full-height column (toolbar + grid).
Widget cards are height-capped rather than content-sized so that a row of
cards fills the viewport instead of leaving a dead band underneath, and so
.dash-widget__body's overflow:auto actually engages (a flex column only
scrolls its children once the column itself is height-constrained). */
.dashboard-page {
--dash-gutter: var(--space-lg);
/* Height of one card row: fill whatever the toolbar leaves, within sane
bounds. Cards are uniform so a row reads as one instrument panel. Kept
short so several widgets fit above the fold -- users resize individual
cards taller via the corner handle. --viewport-h carries the vh/dvh pair
(and its own vh fallback), so this is one declaration, not two. */
--widget-h: clamp(240px, calc(var(--viewport-h) - 340px), 620px);
}
.dashboard-page .page-wrapper {
/* .page-wrapper is shared and ships with zero horizontal padding, which
left dashboard content flush against the window edge. Scoped here so
other pages keep their current gutters. The top edge is left to the
shared rule: a `padding` shorthand here outranked the phone offset that
clears the floating menu button, and the title sat under it. */
padding-right: var(--dash-gutter);
padding-bottom: var(--space-xl);
padding-left: var(--dash-gutter);
}
/* ββ Toolbar βββββββββββββββββββββββββββββββββββββββββββββββ */
.dash-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-sm) var(--space-md);
flex-wrap: wrap;
padding-bottom: var(--space-xs);
margin-bottom: var(--space-sm);
border-bottom: 1px solid var(--border);
min-height: 0;
}
.dash-toolbar__title {
margin: 0;
font-size: var(--page-title-size);
font-weight: 600;
line-height: 1.2;
letter-spacing: 0.02em;
white-space: nowrap;
}
.dash-toolbar__actions {
display: flex;
align-items: center;
gap: var(--space-sm);
flex-shrink: 0;
}
/* Notification permission is a status, not an action, in 2 of its 3 states β
so it reads as a quiet chip rather than a second competing button. */
.dash-notify {
display: inline-flex;
align-items: center;
gap: var(--space-sm);
background: none;
border: 1px solid transparent;
border-radius: var(--radius-md);
padding: 5px var(--space-sm);
font-family: inherit;
font-size: var(--font-xs);
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--text-muted);
cursor: pointer;
transition: all var(--transition-fast);
}
.dash-notify:hover:not(:disabled) {
color: var(--text-primary);
border-color: var(--border);
}
.dash-notify:disabled {
cursor: default;
opacity: 0.75;
}
.dash-notify__dot {
width: var(--table-cell-pad-y);
height: var(--table-cell-pad-y);
border-radius: var(--radius-round);
background: var(--text-dim);
flex-shrink: 0;
}
.dash-notify[data-state="granted"] .dash-notify__dot {
background: var(--positive);