/* Time Report (Story 2375) -- what did I do, for a day, a week, a month, or any
   range. Reads the Daily Log; entries that came from checking a checklist item
   carry their checklist group, so the same entries regroup four ways. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: #F2F2F4; color: #222;
    font-family: "Segoe UI", system-ui, sans-serif; }

/* Pinned shell: only .tr-body scrolls, so the injected icon band and the
   header never scroll off. 100dvh tracks the phone URL bar; 100vh is the
   URL-bar-expanded height and would push the chrome off screen. */
.page-shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
#lwIconBand, .ct-header, .tr-controls, .tr-statusbar { flex: 0 0 auto; }

.ct-header {
    background: #3C3C3C; color: #fff; padding: 10px 16px;
    display: flex; align-items: center; gap: 12px;
}
.ct-header h1 { margin: 0; font-size: 14pt; font-weight: 600; flex: 1;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-header button {
    color: #fff; background: #4F46E5; border: none; border-radius: 4px;
    padding: 7px 14px; font: inherit; font-size: 13px; cursor: pointer;
}
.ct-header button:hover { background: #6257F0; }

/* ---- controls ---- */
.tr-controls { background: #fff; border-bottom: 1px solid #E5E5EA; padding: 10px 14px; }
.tr-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tr-row:last-child { margin-bottom: 0; }

.tr-chip {
    border: 1px solid #D0D0D8; background: #F4F4F7; color: #444;
    border-radius: 999px; padding: 6px 16px; font: inherit; font-size: 12px; cursor: pointer;
}
.tr-chip.active { background: #4F46E5; border-color: #4F46E5; color: #fff; }

.tr-step {
    border: 1px solid #D0D0D8; background: #F4F4F7; color: #333;
    border-radius: 6px; padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer;
}
.tr-step:hover { background: #E8E8EE; }
.tr-period-label { flex: 1; text-align: center; font-size: 12pt; font-weight: 600; color: #1A1A1A; }

/* A lone input on a row spans the full width and lines up with the content
   above and below it. */
.tr-date { flex: 1; display: flex; align-items: center; gap: 8px; }
.tr-date span { font-size: 12px; color: #666; }
.tr-date input { flex: 1; width: 100%; padding: 7px 10px; font: inherit; font-size: 13px;
    border: 1px solid #D0D0D8; border-radius: 6px; background: #fff; color: #222; }

/* nowrap: "Group by" wrapping to two lines silently made this row twice as
   tall, which is exactly the vertical space the report is not allowed to take. */
.tr-groupby label { font-size: 12px; color: #666; white-space: nowrap; }
.tr-groupby select { flex: 1; width: 100%; min-width: 0; padding: 7px 10px; font: inherit; font-size: 13px;
    border: 1px solid #D0D0D8; border-radius: 6px; background: #fff; color: #222; }

/* Collapse all / Expand all rides at the end of the Group by row rather than
   claiming a row of its own -- the chrome above the report is already three
   rows deep and every further row is stolen from the data. */
.tr-fold-all {
    flex: 0 0 auto; border: 1px solid #D0D0D8; background: #F4F4F7; color: #444;
    border-radius: 6px; padding: 7px 12px; font: inherit; font-size: 12px;
    cursor: pointer; white-space: nowrap;
}
.tr-fold-all:hover { background: #E8E8EE; }

/* ---- body ---- */
.tr-body { flex: 1; min-height: 0; overflow: auto; padding: 14px 14px 30px 14px; }
.tr-loading, .tr-empty { padding: 30px 6px; text-align: center; color: #888; font-size: 12pt; }

.tr-tiles { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.tr-tile {
    flex: 1 1 130px; background: #fff; border: 1px solid #E7E7EC; border-radius: 10px;
    padding: 10px 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.tr-tile .k { font-size: 9pt; color: #888; text-transform: uppercase; letter-spacing: .04em; }
.tr-tile .v { font-size: 15pt; font-weight: 700; color: #1A1A1A; margin-top: 3px; }
.tr-tile .s { font-size: 9pt; color: #999; margin-top: 2px; }

.tr-band { background: #fff; border: 1px solid #E7E7EC; border-radius: 12px;
    margin-bottom: 10px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.tr-band-head {
    width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
    background: #FAFAFC; border: none; border-bottom: 1px solid #EFEFF3;
    padding: 12px 14px; font: inherit; cursor: pointer; color: #1A1A1A;
}
.tr-band-head:hover { background: #F4F4F8; }
.tr-band.collapsed .tr-band-head { border-bottom: none; }
.tr-band-caret { color: #999; font-size: 11px; width: 12px; }
.tr-band-title { flex: 1; min-width: 0; font-size: 12pt; font-weight: 700; }
.tr-band-sub { font-size: 9pt; font-weight: 400; color: #999; margin-left: 8px; }
.tr-band-count { font-size: 10pt; color: #4F46E5; font-weight: 700; }
.tr-band-body { padding: 4px 0; }
.tr-band.collapsed .tr-band-body { display: none; }

.tr-entry { display: flex; align-items: baseline; gap: 10px; padding: 8px 14px;
    border-bottom: 1px solid #F2F2F6; }
.tr-entry:last-child { border-bottom: none; }
.tr-entry-text { flex: 1; min-width: 0; font-size: 11pt; color: #222; }
.tr-entry-meta { font-size: 9pt; color: #A0A0A8; white-space: nowrap; }
.tr-entry.from-checklist .tr-entry-text::before {
    content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    background: #4F46E5; margin-right: 7px; vertical-align: middle;
}

.tr-statusbar { background: #EDEDF0; border-top: 1px solid #DEDEE4; color: #666;
    font-size: 10pt; padding: 6px 14px; }
