phase-4: scss upgrade

This commit is contained in:
Kazuma
2026-06-04 15:49:49 -04:00
parent 0a0a368b87
commit 104ed81b9f
18 changed files with 1275 additions and 819 deletions
+120 -163
View File
@@ -431,86 +431,85 @@
</div>
<style>
/* ── Page ── unique to this route ──────────────────────────────── */
.page { max-width: 1400px; }
/* ── Toolbar ─────────────────────────────────────────────────────── */
.toolbar { margin-bottom: 12px; }
.toolbar { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
/* btn-add = primary button style (same as btn-primary) */
.btn-add {
background: #2563eb;
background: var(--blue-dark);
color: #fff;
border: none;
border-radius: 8px;
border-radius: var(--radius-md);
padding: 9px 18px;
font-size: 13px;
font-size: var(--fs-md);
font-weight: 600;
cursor: pointer;
}
.btn-add:hover { background: #1d4ed8; }
.btn-add:hover { background: var(--blue-darker); }
.refreshing-hint {
font-size: 11px;
color: #475569;
font-size: var(--fs-sm);
color: var(--text-dimmer);
animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
0%, 100% { opacity: 0.4; }
50% { opacity: 1; }
}
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
/* ── Add holding form ────────────────────────────────────────────── */
.add-form {
background: #111827;
border: 1px solid #1e293b;
border-radius: 10px;
padding: 18px;
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: var(--space-xl);
margin-bottom: 16px;
}
.form-row {
display: flex;
gap: 12px;
align-items: flex-end;
flex-wrap: wrap;
.form-title {
font-size: var(--fs-sm);
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.07em;
color: var(--text-dimmer);
margin-bottom: 14px;
}
.field {
display: flex;
flex-direction: column;
gap: 5px;
}
.form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label {
font-size: 10px;
font-size: var(--fs-xs);
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.06em;
color: #475569;
color: var(--text-dimmer);
}
.field input::placeholder { color: #334155; }
.field input::placeholder { color: var(--text-faint); }
.field input {
background: #1e293b;
border: 1px solid #2d3f55;
border-radius: 6px;
color: #e2e8f0;
background: var(--bg-card);
border: 1px solid var(--border-input);
border-radius: var(--radius-sm);
color: var(--text-secondary);
padding: 8px 12px;
font-size: 13px;
font-size: var(--fs-md);
outline: none;
min-width: 100px;
height: 38px;
box-sizing: border-box;
}
.field input:focus { border-color: #3b82f6; }
.field input:focus { border-color: var(--blue); }
.field select {
background: #1e293b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
border: 1px solid #2d3f55;
border-radius: 6px;
color: #e2e8f0;
background: var(--bg-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
border: 1px solid var(--border-input);
border-radius: var(--radius-sm);
color: var(--text-secondary);
padding: 8px 32px 8px 12px;
font-size: 13px;
font-size: var(--fs-md);
outline: none;
min-width: 100px;
height: 38px;
@@ -519,83 +518,57 @@
-webkit-appearance: none;
cursor: pointer;
}
.field select:focus { border-color: #3b82f6; }
.field select:focus { border-color: var(--blue); }
.btn-save {
background: #2563eb;
background: var(--blue-dark);
color: #fff;
border: none;
border-radius: 6px;
border-radius: var(--radius-sm);
padding: 8px 20px;
font-size: 13px;
font-size: var(--fs-md);
font-weight: 600;
cursor: pointer;
align-self: flex-end;
}
.btn-save:hover:not(:disabled) { background: #1d4ed8; }
.btn-save:hover:not(:disabled) { background: var(--blue-darker); }
.btn-save:disabled { opacity: 0.5; cursor: default; }
.form-error {
color: #f87171;
font-size: 12px;
margin-top: 10px;
}
.form-error { color: var(--red); font-size: 12px; margin-top: 10px; }
/* ── Delete button ───────────────────────────────────────────────── */
.form-title {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.07em;
color: #475569;
margin-bottom: 14px;
}
.btn-cancel-edit {
background: transparent;
border: 1px solid #2d3f55;
color: #64748b;
border-radius: 6px;
padding: 8px 16px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
align-self: flex-end;
}
.btn-cancel-edit:hover { color: #94a3b8; }
tr.editing { background: #0d1e30; }
/* ── Inline row editing ──────────────────────────────────────────── */
tr.editing { background: var(--blue-badge); }
.inline-input {
background: #1e293b;
border: 1px solid #2d3f55;
border-radius: 4px;
color: #e2e8f0;
background: var(--bg-card);
border: 1px solid var(--border-input);
border-radius: var(--radius-xs);
color: var(--text-secondary);
padding: 3px 6px;
font-size: 12px;
width: 80px;
outline: none;
}
.inline-input:focus { border-color: #3b82f6; }
.inline-input:focus { border-color: var(--blue); }
.inline-select {
background: #1e293b;
border: 1px solid #2d3f55;
border-radius: 4px;
color: #e2e8f0;
background: var(--bg-card);
border: 1px solid var(--border-input);
border-radius: var(--radius-xs);
color: var(--text-secondary);
padding: 3px 6px;
font-size: 11px;
font-size: var(--fs-sm);
outline: none;
}
.btn-save-inline {
background: #14532d55;
border: none;
color: #4ade80;
font-size: 13px;
color: var(--green);
font-size: var(--fs-md);
cursor: pointer;
padding: 4px 8px;
border-radius: 4px;
border-radius: var(--radius-xs);
font-weight: 700;
}
.btn-save-inline:hover:not(:disabled) { background: #14532d99; }
@@ -604,64 +577,54 @@
.btn-cancel-inline {
background: none;
border: none;
color: #475569;
font-size: 13px;
color: var(--text-dimmer);
font-size: var(--fs-md);
cursor: pointer;
padding: 4px 8px;
border-radius: 4px;
border-radius: var(--radius-xs);
}
.btn-cancel-inline:hover { color: #94a3b8; }
.btn-cancel-inline:hover { color: var(--text-muted); }
.row-actions { display: flex; gap: 4px; align-items: center; }
.btn-edit {
background: none;
border: none;
color: #334155;
font-size: 13px;
color: var(--text-faint);
font-size: var(--fs-md);
cursor: pointer;
padding: 4px 8px;
border-radius: 4px;
border-radius: var(--radius-xs);
}
.btn-edit:hover { color: #60a5fa; background: #0f2240; }
.btn-edit:hover { color: var(--blue-muted); background: var(--blue-deep); }
.btn-delete {
background: none;
border: none;
color: #334155;
color: var(--text-faint);
font-size: 12px;
cursor: pointer;
padding: 4px 8px;
border-radius: 4px;
border-radius: var(--radius-xs);
}
.btn-delete:hover { color: #f87171; background: #450a0a33; }
.btn-delete:hover { color: var(--red); background: var(--red-bg); }
.loading-area {
display: flex;
justify-content: center;
align-items: center;
padding: 100px 0;
}
.error { color: #f87171; background: #450a0a33; border-radius: 8px; padding: 10px 14px; }
/* ── Loading / error ─────────────────────────────────────────────── */
.loading-area { display: flex; justify-content: center; align-items: center; padding: 100px 0; }
.error { color: var(--red); background: var(--red-bg); border-radius: var(--radius-md); padding: 10px var(--space-lg); }
/* ── P&L summary grid ────────────────────────────────────────────── */
.summary-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
gap: 10px;
margin-bottom: 20px;
}
.scard { background: #1e293b; border-radius: 8px; padding: 12px 14px; }
.scard { background: var(--bg-card); border-radius: var(--radius-md); padding: 12px var(--space-lg); }
.slabel-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 4px;
}
.slabel { font-size: 10px; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; }
.svalue { font-size: 18px; font-weight: 700; color: #f1f5f9; margin-top: 4px; }
.slabel-row { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.slabel { font-size: var(--fs-xs); color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.svalue { font-size: var(--fs-xl); font-weight: 700; color: var(--text-primary); margin-top: 4px; }
/* ── Summary card tooltips ───────────────────────────────────────── */
.stip-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
@@ -673,35 +636,32 @@
width: 13px;
height: 13px;
border-radius: 50%;
background: #0f1117;
border: 1px solid #334155;
color: #475569;
font-size: 9px;
background: var(--bg-base);
border: 1px solid var(--text-faint);
color: var(--text-dimmer);
font-size: var(--fs-2xs);
font-weight: 700;
cursor: help;
}
.stip-box {
display: none;
position: fixed;
width: 220px;
background: #1e293b;
border: 1px solid #334155;
border-radius: 6px;
padding: 8px 10px;
font-size: 11px;
color: #94a3b8;
line-height: 1.5;
z-index: 200;
pointer-events: none;
white-space: normal;
/* anchor via JS-free trick: use absolute + translate to float above icon */
position: absolute;
bottom: calc(100% + 6px);
left: 50%;
transform: translateX(-50%);
width: 220px;
background: var(--bg-card);
border: 1px solid var(--text-faint);
border-radius: var(--radius-sm);
padding: 8px 10px;
font-size: var(--fs-sm);
color: var(--text-muted);
line-height: 1.5;
z-index: 200;
pointer-events: none;
white-space: normal;
}
.stip-box::after {
content: '';
position: absolute;
@@ -709,64 +669,61 @@
left: 50%;
transform: translateX(-50%);
border: 5px solid transparent;
border-top-color: #334155;
border-top-color: var(--text-faint);
}
.stip-wrap:hover .stip-box { display: block; }
/* ── Card section (portfolio tables) ────────────────────────────── */
.card-section {
background: #111827;
border: 1px solid #1e293b;
border-radius: 10px;
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: 20px;
margin-bottom: 20px;
}
h2 {
font-size: 11px;
.card-section h2 {
font-size: var(--fs-sm);
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.07em;
color: #64748b;
color: var(--text-dim);
margin-bottom: 14px;
}
/* Portfolio table overrides (full-width, tighter padding) */
table { width: 100%; border-collapse: collapse; }
thead th {
text-align: left;
padding: 7px 10px;
font-size: 10px;
font-size: var(--fs-xs);
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
color: #475569;
border-bottom: 1px solid #1e293b;
color: var(--text-dimmer);
border-bottom: 1px solid var(--border);
white-space: nowrap;
}
tbody tr { border-bottom: 1px solid #1a2233; }
tbody tr { border-bottom: 1px solid var(--bg-row-alt); }
tbody tr:hover { background: #1e293b55; }
tbody td { padding: 9px 10px; vertical-align: middle; white-space: nowrap; }
th.sortable {
cursor: pointer;
user-select: none;
white-space: nowrap;
}
th.sortable:hover { color: #94a3b8; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--text-muted); }
.ticker { font-weight: 700; font-size: 14px; color: #f1f5f9; }
.num { font-variant-numeric: tabular-nums; color: #94a3b8; }
.tag { background: #1e293b; color: #94a3b8; padding: 2px 8px; border-radius: 4px; font-size: 11px; }
.reason { color: #94a3b8; font-size: 11px; white-space: normal; max-width: 260px; }
.right { text-align: right; }
.ticker { font-weight: 700; font-size: 14px; color: var(--text-primary); }
.num { font-variant-numeric: tabular-nums; color: var(--text-muted); }
.reason { color: var(--text-muted); font-size: var(--fs-sm); white-space: normal; max-width: 260px; }
.right { text-align: right; }
.green { color: #4ade80; font-weight: 600; }
.yellow { color: #facc15; font-weight: 600; }
.orange { color: #fb923c; font-weight: 600; }
.red { color: #f87171; font-weight: 600; }
.gray { color: #64748b; }
/* Signal colour classes (used via glClass / advClass helpers) */
.green { color: var(--green); font-weight: 600; }
.yellow { color: var(--yellow); font-weight: 600; }
.orange { color: var(--orange); font-weight: 600; }
.red { color: var(--red); font-weight: 600; }
.gray { color: var(--text-dim); }
.bar-bg { background: #1e293b; border-radius: 4px; height: 6px; }
.bar-fill { background: #3b82f6; border-radius: 4px; height: 6px; }
.bar-bg { background: var(--bg-card); border-radius: var(--radius-xs); height: 6px; }
.bar-fill { background: var(--blue); border-radius: var(--radius-xs); height: 6px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
</style>