/* =============================================================================
   Bill Tracking IV -> Utilities (Story 5722): one band per utility (electricity,
   natural gas, water) with a month-by-month bar graph of the usage or the charge,
   and the bills under it as folding cards.
   ========================================================================== */

#utilToolsBar .util-warn { flex-basis: 100%; color: #F2C94C; font-size: 11px; line-height: 1.4; }
#utilToolsBar .util-warn b { color: #fff; }

.ut-band { background: #fff; border-bottom: 1px solid #E6E6E8; }
.ut-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; user-select: none; }
.ut-head:hover { background: #F5F5F7; }
.ut-caret { width: 14px; color: #666; font-size: 12px; flex-shrink: 0; }
.ut-swatch { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.ut-title { flex: 1; min-width: 0; }
.ut-name { font-size: 14px; font-weight: 600; color: #111; }
.ut-sub { font-size: 11px; color: #777; margin-top: 1px; }
.ut-latest { text-align: right; flex-shrink: 0; font-size: 12px; color: #333; }
.ut-latest b { font-size: 13px; }
.ut-need { display: inline-block; background: #FFF3CD; color: #7A5600; border-radius: 10px; padding: 1px 8px; font-size: 10px; font-weight: 600; margin-left: 6px; }
.ut-high { display: inline-block; background: #FCE8E8; color: #AA0000; border-radius: 10px; padding: 1px 8px; font-size: 10px; font-weight: 600; margin-left: 6px; }

.ut-body { padding: 0 14px 12px; }
.ut-band.collapsed .ut-body { display: none; }

.ut-chart-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 2px 0 6px; }
.ut-chart-tools .hdr-spacer { flex: 1; }
.ut-seg { display: inline-flex; border: 1px solid #C9C9CC; border-radius: 4px; overflow: hidden; }
.ut-seg button { background: #fff; color: #333; border: none; border-right: 1px solid #C9C9CC; padding: 5px 10px; font: 12px "Segoe UI", system-ui, sans-serif; cursor: pointer; }
.ut-seg button:last-child { border-right: none; }
.ut-seg button.on { background: #0A66C2; color: #fff; }
.ut-add { background: #1A7A3C; color: #fff; border: 1px solid #1A7A3C; border-radius: 4px; padding: 5px 10px; font: 12px "Segoe UI", system-ui, sans-serif; cursor: pointer; }

/* The graph: one column per month, oldest on the left. Plain boxes, so the labels stay
   readable at phone width (an SVG viewBox would shrink them). */
.ut-chart { position: relative; height: 140px; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid #BBB; padding-top: 14px; }
.ut-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; cursor: pointer; }
.ut-col:hover .ut-bar, .ut-col.picked .ut-bar { filter: brightness(0.85); }
.ut-col.picked { background: rgba(10, 102, 194, 0.08); }
.ut-bar { border-radius: 2px 2px 0 0; min-height: 2px; }
.ut-bar.high { background: #D93025 !important; }
.ut-bar.missing { background: transparent !important; border: 1px dashed #999; border-bottom: none; height: 18px; }
.ut-avg { position: absolute; left: 0; right: 0; border-top: 1px dashed #555; pointer-events: none; }
.ut-avg span { position: absolute; right: 0; top: -14px; font-size: 10px; color: #555; background: rgba(255,255,255,0.85); padding: 0 3px; }
.ut-axis { display: flex; gap: 2px; margin-top: 2px; }
.ut-axis span { flex: 1 1 0; min-width: 0; text-align: center; font-size: 9px; color: #777; overflow: hidden; white-space: nowrap; }
.ut-axis span.yr { color: #111; font-weight: 600; }
.ut-pick { font-size: 12px; color: #333; min-height: 16px; margin: 6px 0 2px; }
.ut-empty { padding: 14px 0; color: #888; font-style: italic; font-size: 12px; }

/* A bill: its head line (month, usage, charge, View / Edit); the rest folds away. */
.ut-cards { margin-top: 8px; border-top: 1px solid #EEE; }
.ut-card { border-bottom: 1px solid #EEE; }
.ut-card-head { display: flex; align-items: center; gap: 8px; padding: 8px 0; cursor: pointer; }
.ut-card-head .ut-caret { font-size: 11px; }
.ut-card-main { flex: 1; min-width: 0; font-size: 13px; color: #111; }
.ut-card-main .dim { color: #777; }
.ut-link { background: none; border: none; color: #0A66C2; text-decoration: underline; font: 12px "Segoe UI", system-ui, sans-serif; cursor: pointer; padding: 2px 4px; }
.ut-link.danger { color: #C00000; }
.ut-card-body { padding: 0 0 10px 22px; font-size: 12px; color: #444; line-height: 1.6; }
.ut-card.collapsed .ut-card-body { display: none; }
.ut-card-body .ut-notes { white-space: pre-wrap; color: #555; }

@media (max-width: 480px) {
    .ut-head { padding: 10px 10px; }
    .ut-body { padding: 0 10px 12px; }
    .ut-chart { height: 120px; gap: 1px; }
    .ut-axis { gap: 1px; }
}
