oxedyne/daimond/www/css/spend.css
4.6 KiB, 1 run
created by r2519314175:1129, which is this file's identity for as long as the history lasts, whatever it is later renamed to
download · who wrote it · its history
| 1 | /* spend.css — the Spending view. |
| 2 | * |
| 3 | * Two calm tracks (Inference, Credits), a small daily bar graph each, a |
| 4 | * category breakdown and a plain table. All colour comes from the theme |
| 5 | * variables, so light and dark are handled for free. No hyperbole in the |
| 6 | * design: quiet reassurance, precise figures. */ |
| 7 | |
| 8 | .spend-view { |
| 9 | height: 100%; |
| 10 | overflow-y: auto; |
| 11 | overflow-x: hidden; |
| 12 | /* 10px is the dock's one body inset, so Agents, Email, Workspace and |
| 13 | Spending all start on the same edge under a 4px header. Four panels used |
| 14 | to start at 6, 10, 14 and 11. */ |
| 15 | padding: 12px 10px 24px; |
| 16 | font-size: var(--fs-sm); |
| 17 | color: var(--text-primary); |
| 18 | } |
| 19 | |
| 20 | .spend-intro { |
| 21 | color: var(--text-secondary); |
| 22 | font-size: var(--fs-xs); |
| 23 | line-height: 1.45; |
| 24 | margin: 0 0 14px; |
| 25 | padding-bottom: 12px; |
| 26 | border-bottom: 1px solid var(--border); |
| 27 | } |
| 28 | |
| 29 | .spend-sec { |
| 30 | margin: 0 0 6px; |
| 31 | } |
| 32 | |
| 33 | .spend-sec-head { |
| 34 | display: flex; |
| 35 | align-items: baseline; |
| 36 | gap: 8px; |
| 37 | flex-wrap: wrap; |
| 38 | margin: 4px 0 10px; |
| 39 | } |
| 40 | .spend-sec-title { |
| 41 | margin: 0; |
| 42 | font-size: var(--fs-lg); |
| 43 | font-weight: 600; |
| 44 | letter-spacing: 0.01em; |
| 45 | } |
| 46 | .spend-sec-hint { |
| 47 | font-size: var(--fs-2xs-xs); |
| 48 | color: var(--text-muted); |
| 49 | } |
| 50 | |
| 51 | /* Headline stats row. */ |
| 52 | .spend-totals { |
| 53 | display: flex; |
| 54 | gap: 18px; |
| 55 | flex-wrap: wrap; |
| 56 | margin: 0 0 12px; |
| 57 | } |
| 58 | .spend-stat { |
| 59 | display: flex; |
| 60 | flex-direction: column; |
| 61 | gap: 2px; |
| 62 | } |
| 63 | .spend-stat-val { |
| 64 | font-size: var(--fs-4xl); |
| 65 | font-weight: 650; |
| 66 | font-variant-numeric: tabular-nums; |
| 67 | line-height: 1.1; |
| 68 | } |
| 69 | .spend-stat-lbl { |
| 70 | font-size: var(--fs-2xs); |
| 71 | color: var(--text-muted); |
| 72 | text-transform: lowercase; |
| 73 | } |
| 74 | |
| 75 | /* Week / Month toggle. */ |
| 76 | .spend-toggle { |
| 77 | display: inline-flex; |
| 78 | gap: 2px; |
| 79 | padding: 2px; |
| 80 | background: var(--bg-tertiary); |
| 81 | border: 1px solid var(--border-strong); |
| 82 | border-radius: var(--radius-sm); |
| 83 | margin: 0 0 12px; |
| 84 | } |
| 85 | .spend-toggle-btn { |
| 86 | appearance: none; |
| 87 | border: 0; |
| 88 | background: transparent; |
| 89 | color: var(--text-secondary); |
| 90 | font: inherit; |
| 91 | font-size: var(--fs-xs); |
| 92 | padding: 3px 12px; |
| 93 | border-radius: var(--radius-sm); |
| 94 | cursor: pointer; |
| 95 | } |
| 96 | .spend-toggle-btn.on { |
| 97 | background: var(--bg-secondary); |
| 98 | color: var(--text-primary); |
| 99 | box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); |
| 100 | } |
| 101 | |
| 102 | /* The bar chart. */ |
| 103 | .spend-chart { |
| 104 | margin: 0 0 14px; |
| 105 | } |
| 106 | .spend-bars { |
| 107 | display: block; |
| 108 | width: 100%; |
| 109 | height: 88px; |
| 110 | } |
| 111 | .spend-bar-track { |
| 112 | fill: var(--bg-tertiary); |
| 113 | } |
| 114 | .spend-bar { |
| 115 | fill: var(--accent); |
| 116 | } |
| 117 | .spend-axis { |
| 118 | display: flex; |
| 119 | justify-content: space-between; |
| 120 | margin-top: 3px; |
| 121 | font-size: var(--fs-3xs-2xs); |
| 122 | color: var(--text-muted); |
| 123 | } |
| 124 | .spend-empty { |
| 125 | color: var(--text-muted); |
| 126 | font-size: var(--fs-xs); |
| 127 | padding: 10px 0; |
| 128 | } |
| 129 | |
| 130 | /* Category breakdown. */ |
| 131 | .spend-sub { |
| 132 | font-size: var(--fs-xs); |
| 133 | color: var(--text-secondary); |
| 134 | font-weight: 600; |
| 135 | margin: 6px 0 6px; |
| 136 | } |
| 137 | .spend-breakdown { |
| 138 | display: flex; |
| 139 | flex-direction: column; |
| 140 | gap: 6px; |
| 141 | margin: 0 0 14px; |
| 142 | } |
| 143 | .spend-bd-row { |
| 144 | display: grid; |
| 145 | grid-template-columns: minmax(84px, 34%) 1fr auto; |
| 146 | align-items: center; |
| 147 | gap: 10px; |
| 148 | } |
| 149 | .spend-bd-label { |
| 150 | color: var(--text-secondary); |
| 151 | white-space: nowrap; |
| 152 | overflow: hidden; |
| 153 | text-overflow: ellipsis; |
| 154 | } |
| 155 | .spend-bd-bar { |
| 156 | position: relative; |
| 157 | height: 8px; |
| 158 | background: var(--bg-tertiary); |
| 159 | border-radius: 999px; |
| 160 | overflow: hidden; |
| 161 | } |
| 162 | .spend-bd-fill { |
| 163 | position: absolute; |
| 164 | inset: 0 auto 0 0; |
| 165 | background: var(--accent); |
| 166 | border-radius: 999px; |
| 167 | } |
| 168 | .spend-bd-amt { |
| 169 | font-variant-numeric: tabular-nums; |
| 170 | color: var(--text-primary); |
| 171 | white-space: nowrap; |
| 172 | } |
| 173 | |
| 174 | /* The plain table. */ |
| 175 | .spend-table { |
| 176 | width: 100%; |
| 177 | border-collapse: collapse; |
| 178 | margin: 4px 0 8px; |
| 179 | font-size: var(--fs-xs); |
| 180 | } |
| 181 | .spend-table th { |
| 182 | text-align: left; |
| 183 | font-weight: 600; |
| 184 | color: var(--text-muted); |
| 185 | font-size: var(--fs-2xs); |
| 186 | padding: 4px 8px 4px 0; |
| 187 | border-bottom: 1px solid var(--border); |
| 188 | white-space: nowrap; |
| 189 | } |
| 190 | .spend-table td { |
| 191 | padding: 5px 8px 5px 0; |
| 192 | border-bottom: 1px solid var(--border); |
| 193 | color: var(--text-secondary); |
| 194 | vertical-align: top; |
| 195 | } |
| 196 | .spend-table th.num, |
| 197 | .spend-table td.num { |
| 198 | text-align: right; |
| 199 | font-variant-numeric: tabular-nums; |
| 200 | padding-right: 0; |
| 201 | white-space: nowrap; |
| 202 | } |
| 203 | .spend-table td.spend-model { |
| 204 | color: var(--text-primary); |
| 205 | font-family: var(--font-mono); |
| 206 | font-size: var(--fs-2xs); |
| 207 | word-break: break-all; |
| 208 | } |
| 209 | .spend-table td.spend-when { |
| 210 | color: var(--text-muted); |
| 211 | white-space: nowrap; |
| 212 | } |
| 213 | .spend-table td.debit { color: var(--text-primary); } |
| 214 | .spend-table td.credit { color: var(--ok); } |
| 215 | |
| 216 | .spend-note { |
| 217 | color: var(--text-secondary); |
| 218 | font-size: var(--fs-xs-sm); |
| 219 | line-height: 1.5; |
| 220 | background: var(--bg-tertiary); |
| 221 | border: 1px solid var(--border); |
| 222 | border-radius: var(--radius); |
| 223 | padding: 12px 14px; |
| 224 | } |
| 225 | |
| 226 | /* Two provenance lines in a row are two statements, not one paragraph. */ |
| 227 | .spend-note + .spend-note { |
| 228 | margin-top: 8px; |
| 229 | } |
| 230 | |
| 231 | .spend-divider { |
| 232 | height: 1px; |
| 233 | background: var(--border); |
| 234 | margin: 16px 0 14px; |
| 235 | } |