/* Time Tracker - Dynamics 365 Business Central inspired theme */

:root {
    --bc-appbar: #0b2a4f;
    --bc-appbar-raised: #24456e;
    --bc-appbar-text: #ffffff;
    --bc-accent: #00838f;
    --bc-accent-hover: #006c75;
    --bc-accent-soft: #e3f2f3;
    --bc-bg: #f4f4f4;
    --bc-surface: #ffffff;
    --bc-border: #e1dfdd;
    --bc-border-strong: #8a8886;
    --bc-row: #edebe9;
    --bc-hover: #f3f2f1;
    --bc-text: #212121;
    --bc-muted: #605e5c;
    --bc-danger: #a4262c;
    --bc-danger-soft: #fde7e9;
    --bc-warning-soft: #fff4ce;
    --bc-info-soft: #e3f2f3;
    --bc-shadow: 0 1.6px 3.6px rgba(0, 0, 0, .13), 0 .3px .9px rgba(0, 0, 0, .11);
    --bc-shadow-lg: 0 6.4px 14.4px rgba(0, 0, 0, .13), 0 1.2px 3.6px rgba(0, 0, 0, .11);
    --bc-font: "Segoe UI", "Segoe UI Web (West European)", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
}

html { font-size: 14px; }

body {
    font-family: var(--bc-font);
    color: var(--bc-text);
    background: var(--bc-bg);
    margin: 0;
    min-height: 100vh;
}

a { color: var(--bc-accent); text-decoration: none; }
a:hover { color: var(--bc-accent-hover); text-decoration: underline; }

/* ---------- App bar ---------- */
.bc-appbar {
    height: 48px;
    background: var(--bc-appbar);
    color: var(--bc-appbar-text);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 1030;
}
.bc-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 15px; font-weight: 600; flex: none; max-width: 240px; }
.bc-brand-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.bc-anonymous .bc-brand { margin-right: auto; }
.bc-brand, .bc-brand:hover { color: #fff; text-decoration: none; cursor: default; }
.bc-brand-mark {
    width: 28px; height: 28px; border-radius: 4px; background: var(--bc-accent);
    display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
}
.bc-appbar-timer {
    display: inline-flex; align-items: center; gap: 8px; color: #fff; padding: 4px 12px;
    border-radius: 14px; background: rgba(255, 255, 255, .1); max-width: 360px;
}
.bc-appbar-timer:hover { background: rgba(255, 255, 255, .18); color: #fff; text-decoration: none; }
.bc-appbar-timer-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c9d6e6; }
.bc-pulse { width: 8px; height: 8px; border-radius: 50%; background: #3bd16f; flex: none; animation: bc-pulse 1.6s infinite; }
@keyframes bc-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.bc-avatar {
    width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--bc-appbar-raised); color: #fff;
    font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
}
.bc-avatar:hover { background: #33598a; }
.bc-menu { border-radius: 4px; border: 0; box-shadow: var(--bc-shadow-lg); padding: 4px 0; min-width: 240px; }
.bc-menu .dropdown-item { padding: 7px 16px; display: flex; gap: 10px; align-items: center; font-size: 14px; }
.bc-menu .dropdown-item i { color: var(--bc-accent); }
.bc-menu-header { padding: 10px 16px 8px; display: flex; flex-direction: column; border-bottom: 1px solid var(--bc-border); margin-bottom: 4px; }
.bc-menu-header span { color: var(--bc-muted); font-size: 12px; }

/* ---------- Main navigation, inside the app bar ---------- */
.bc-nav {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: stretch;
    gap: 2px;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, .18);
    overflow-x: auto;
    scrollbar-width: none;
}
.bc-nav::-webkit-scrollbar { display: none; }
.bc-nav a {
    color: #d3deea; padding: 0 12px; white-space: nowrap; border-bottom: 3px solid transparent; border-top: 3px solid transparent;
    display: inline-flex; align-items: center; gap: 7px;
}
.bc-nav a i { color: #9fb4cc; }
.bc-nav a:hover { background: rgba(255, 255, 255, .08); text-decoration: none; color: #fff; }
.bc-nav a.active { border-bottom-color: var(--bc-accent); color: #fff; font-weight: 600; }
.bc-nav a.active i { color: #4fc3cc; }
.bc-nav-sep { width: 1px; background: rgba(255, 255, 255, .18); margin: 12px 6px; flex: none; }

/* ---------- Page ---------- */
.bc-page { padding: 16px 24px 48px; max-width: 1400px; margin: 0 auto; }
.bc-page-header { display: flex; align-items: center; gap: 12px; margin: 4px 0 4px; flex-wrap: wrap; }
.bc-page-title { font-size: 24px; font-weight: 600; margin: 0; }
.bc-page-subtitle { color: var(--bc-muted); font-size: 14px; }
.bc-breadcrumb { font-size: 13px; color: var(--bc-muted); margin-top: 4px; }

/* Action bar: icon + caption buttons like BC's ribbon */
.bc-actionbar {
    display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
    border-bottom: 1px solid var(--bc-border); padding: 4px 0; margin-bottom: 16px;
}
.bc-actionbar form { display: inline; margin: 0; }
.bc-action {
    background: none; border: 0; padding: 6px 10px; color: var(--bc-text); font-size: 14px;
    display: inline-flex; align-items: center; gap: 6px; border-radius: 2px; cursor: pointer; white-space: nowrap;
}
.bc-action i { color: var(--bc-accent); font-size: 15px; }
.bc-action:hover { background: var(--bc-hover); text-decoration: none; color: var(--bc-text); }
.bc-action.danger i { color: var(--bc-danger); }
.bc-action:disabled { opacity: .45; cursor: default; }
.bc-actionbar-sep { width: 1px; height: 20px; background: var(--bc-border); margin: 0 6px; }
.bc-actionbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }

/* Buttons */
.bc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 16px;
    border: 1px solid var(--bc-border-strong); border-radius: 2px; background: var(--bc-surface); color: var(--bc-text);
    font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.bc-btn:hover { background: var(--bc-hover); text-decoration: none; color: var(--bc-text); }
.bc-btn-primary { background: var(--bc-accent); border-color: var(--bc-accent); color: #fff; }
.bc-btn-primary:hover { background: var(--bc-accent-hover); border-color: var(--bc-accent-hover); color: #fff; }
.bc-btn-danger { background: var(--bc-danger); border-color: var(--bc-danger); color: #fff; }
.bc-btn-danger:hover { background: #8a1f25; color: #fff; }
.bc-btn-sm { height: 26px; padding: 0 10px; font-size: 13px; }
.bc-icon-btn {
    width: 30px; height: 30px; border: 0; background: none; border-radius: 2px; color: var(--bc-muted);
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
.bc-icon-btn:hover { background: var(--bc-hover); color: var(--bc-text); }
.bc-icon-btn.on { color: var(--bc-accent); }

/* Cards / surfaces */
.bc-card { background: var(--bc-surface); box-shadow: var(--bc-shadow); border-radius: 4px; margin-bottom: 16px; }
.bc-card-pad { padding: 16px 20px; }
.bc-card-header { padding: 10px 16px; border-bottom: 1px solid var(--bc-border); display: flex; align-items: center; gap: 12px; }
.bc-card-title { font-weight: 600; font-size: 15px; margin: 0; }

/* ---------- Lists (BC grid) ---------- */
.bc-grid { width: 100%; border-collapse: collapse; background: var(--bc-surface); }
.bc-grid th {
    font-size: 12px; font-weight: 600; color: var(--bc-muted); text-align: left; padding: 8px 10px;
    border-bottom: 1px solid var(--bc-border); white-space: nowrap; background: var(--bc-surface);
}
.bc-grid td { padding: 7px 10px; border-bottom: 1px solid var(--bc-row); vertical-align: middle; }
.bc-grid tbody tr:hover td { background: var(--bc-hover); }
.bc-grid .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bc-grid .shrink { width: 1%; white-space: nowrap; }
.bc-grid a.bc-link { font-weight: 600; }
.bc-grid tfoot td { font-weight: 600; border-top: 2px solid var(--bc-border); border-bottom: 0; }
.bc-grid-wrap { overflow-x: auto; }
.bc-empty { padding: 32px; text-align: center; color: var(--bc-muted); }
.bc-empty i { font-size: 32px; display: block; margin-bottom: 8px; color: var(--bc-border-strong); }
.bc-muted { color: var(--bc-muted); }
.bc-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; vertical-align: middle; }
.bc-badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: var(--bc-row); color: var(--bc-muted); }
.bc-badge.accent { background: var(--bc-accent-soft); color: var(--bc-accent-hover); }
.bc-badge.danger { background: var(--bc-danger-soft); color: var(--bc-danger); }

/* ---------- Card pages: FastTabs ---------- */
.bc-fasttab { background: var(--bc-surface); box-shadow: var(--bc-shadow); border-radius: 4px; margin-bottom: 12px; }
.bc-fasttab > summary {
    list-style: none; cursor: pointer; padding: 12px 20px; font-size: 16px; font-weight: 600;
    display: flex; align-items: center; gap: 10px; user-select: none;
}
.bc-fasttab > summary::-webkit-details-marker { display: none; }
.bc-fasttab > summary::before { content: "\F282"; font-family: "bootstrap-icons"; font-size: 12px; color: var(--bc-muted); transform: rotate(-90deg); transition: transform .15s; }
.bc-fasttab[open] > summary::before { transform: rotate(0); }
.bc-fasttab > summary .bc-fasttab-summary { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--bc-muted); }
.bc-fasttab[open] > summary .bc-fasttab-summary { display: none; }
.bc-fasttab-body { padding: 4px 20px 20px; border-top: 1px solid var(--bc-row); }
.bc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
.bc-fields.one { grid-template-columns: minmax(0, 560px); }
.bc-field { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; align-items: center; gap: 12px; min-height: 40px; }
.bc-field > label, .bc-field > .bc-field-label {
    color: var(--bc-text); font-size: 14px; overflow: hidden; white-space: nowrap;
    /* BC's dotted leader between caption and value */
    background-image: linear-gradient(to right, var(--bc-border-strong) 1px, transparent 1px);
    background-size: 4px 1px; background-repeat: repeat-x; background-position: 0 78%;
}
.bc-field > label span, .bc-field > .bc-field-label span { background: var(--bc-surface); padding-right: 6px; }
.bc-field-value { min-height: 30px; display: flex; align-items: center; gap: 8px; }
.bc-help { font-size: 12px; color: var(--bc-muted); margin: -4px 0 6px; grid-column: 2; }

/* Inputs: BC uses underline-style fields */
.bc-input, .bc-select, .bc-textarea {
    width: 100%; height: 30px; border: 0; border-bottom: 1px solid var(--bc-border-strong); border-radius: 0;
    background: transparent; padding: 2px 4px; font: inherit; color: var(--bc-text); outline: none;
}
.bc-textarea { height: auto; min-height: 60px; resize: vertical; }
.bc-input:hover, .bc-select:hover, .bc-textarea:hover { border-bottom-color: var(--bc-text); }
.bc-input:focus, .bc-select:focus, .bc-textarea:focus { border-bottom: 2px solid var(--bc-accent); padding-bottom: 1px; }
.bc-input.boxed, .bc-select.boxed { border: 1px solid var(--bc-border-strong); border-radius: 2px; padding: 2px 8px; }
.bc-input.boxed:focus, .bc-select.boxed:focus { border: 1px solid var(--bc-accent); box-shadow: 0 0 0 1px var(--bc-accent); padding: 2px 8px; }
.bc-input[type="color"] { width: 48px; padding: 0; border: 1px solid var(--bc-border-strong); height: 28px; cursor: pointer; }
.bc-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.bc-check input { width: 16px; height: 16px; accent-color: var(--bc-accent); }
.field-validation-error, .text-danger { color: var(--bc-danger) !important; font-size: 12px; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }

/* Toggle switch (BC boolean field) */
.bc-switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.bc-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.bc-switch .bc-switch-track { width: 40px; height: 20px; border-radius: 10px; border: 1px solid var(--bc-border-strong); background: #fff; position: relative; transition: background .15s; }
.bc-switch .bc-switch-track::after { content: ""; position: absolute; top: 3px; left: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--bc-text); transition: left .15s; }
.bc-switch input:checked + .bc-switch-track { background: var(--bc-accent); border-color: var(--bc-accent); }
.bc-switch input:checked + .bc-switch-track::after { left: 23px; background: #fff; }
.bc-switch input:focus-visible + .bc-switch-track { outline: 2px solid var(--bc-text); outline-offset: 2px; }

/* ---------- Message bar ---------- */
.bc-messagebar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 12px; font-size: 14px; border-radius: 2px; }
.bc-messagebar.info { background: var(--bc-info-soft); }
.bc-messagebar.info i { color: var(--bc-accent); }
.bc-messagebar.error { background: var(--bc-danger-soft); }
.bc-messagebar.error i { color: var(--bc-danger); }
.bc-messagebar.warning { background: var(--bc-warning-soft); }
.bc-messagebar span { flex: 1; }
.bc-messagebar.validation-summary-valid { display: none; }
.bc-messagebar-close { border: 0; background: none; font-size: 18px; line-height: 1; color: var(--bc-muted); cursor: pointer; }

/* ---------- Role center: headline + cues ---------- */
.bc-headline { margin: 4px 0 16px; }
.bc-headline-label { font-size: 12px; color: var(--bc-muted); text-transform: uppercase; letter-spacing: .04em; }
.bc-headline-text { font-size: 26px; font-weight: 300; margin: 0; }
.bc-cues { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.bc-cue {
    width: 168px; height: 96px; background: var(--bc-accent); color: #fff; border-radius: 4px; padding: 10px 12px;
    display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--bc-shadow);
}
.bc-cue.neutral { background: var(--bc-surface); color: var(--bc-text); }
.bc-cue.neutral .bc-cue-label { color: var(--bc-muted); }
.bc-cue.dark { background: #3b3a39; }
.bc-cue-label { font-size: 13px; color: rgba(255, 255, 255, .9); line-height: 1.25; }
.bc-cue-value { font-size: 28px; font-weight: 300; text-align: right; font-variant-numeric: tabular-nums; line-height: 1; }

/* ---------- List page with filter pane + FactBox ---------- */
.bc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.bc-layout.with-filter { grid-template-columns: 260px minmax(0, 1fr); }
.bc-layout.with-factbox { grid-template-columns: minmax(0, 1fr) 300px; }
.bc-filterpane { background: var(--bc-surface); box-shadow: var(--bc-shadow); border-radius: 4px; padding: 12px 14px; align-self: start; position: sticky; top: 60px; max-height: calc(100vh - 76px); overflow-y: auto; }
.bc-filterpane h3 { font-size: 13px; font-weight: 600; margin: 14px 0 6px; color: var(--bc-muted); text-transform: uppercase; letter-spacing: .03em; }
.bc-filterpane h3:first-child { margin-top: 0; }
.bc-filter-list { max-height: 160px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.bc-factbox { align-self: start; }
.bc-factbox .bc-card-header { background: none; }
.bc-facts { padding: 8px 16px 12px; }
.bc-fact { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; font-size: 13px; }
.bc-fact span:first-child { color: var(--bc-muted); }

/* Pivot tabs */
.bc-pivot { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--bc-border); }
.bc-pivot a { padding: 8px 12px; color: var(--bc-text); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.bc-pivot a:hover { text-decoration: none; background: var(--bc-hover); }
.bc-pivot a.active { border-bottom-color: var(--bc-accent); font-weight: 600; }

/* ---------- Pickers (project / tags) ---------- */
.tt-picker {
    position: absolute; z-index: 1050; width: 340px; max-height: 380px; display: flex; flex-direction: column;
    background: var(--bc-surface); border-radius: 4px; box-shadow: var(--bc-shadow-lg);
}
.tt-picker-search { padding: 8px; border-bottom: 1px solid var(--bc-border); }
.tt-picker-list { overflow-y: auto; padding: 4px 0; }
.tt-picker-group { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--bc-muted); padding: 8px 12px 2px; }
.tt-picker-item { display: flex; align-items: center; gap: 8px; padding: 6px 12px; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; font-size: 14px; }
.tt-picker-item:hover, .tt-picker-item.focused { background: var(--bc-hover); }
.tt-picker-item.selected { font-weight: 600; }
.tt-picker-empty { padding: 12px; color: var(--bc-muted); font-size: 13px; }

/* Project chip */
.tt-project {
    display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 8px; border-radius: 2px;
    cursor: pointer; font-size: 14px; max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--bc-text);
}
.tt-project:hover { background: var(--bc-hover); }
.tt-project .tt-client { color: var(--bc-muted); }
.tt-project.empty { color: var(--bc-accent); font-weight: 600; }
.tt-project-name { overflow: hidden; text-overflow: ellipsis; }

/* ---------- Time tracker ---------- */
.tt-timerbar { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 16px; background: var(--bc-surface); box-shadow: var(--bc-shadow); border-radius: 4px; margin-bottom: 20px; flex-wrap: wrap; }
.tt-timerbar .tt-description { flex: 1 1 240px; border: 0; font-size: 16px; height: 40px; outline: none; background: transparent; min-width: 160px; }
.tt-timerbar .tt-sep { width: 1px; height: 28px; background: var(--bc-border); margin: 0 6px; }
.tt-elapsed { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 96px; text-align: right; margin: 0 8px; }
.tt-start { min-width: 96px; height: 38px; text-transform: uppercase; letter-spacing: .04em; }
.tt-manual { display: flex; align-items: center; gap: 6px; }
.tt-manual input { height: 32px; font-variant-numeric: tabular-nums; }
.tt-manual input[type="time"] { width: 100px; }
.tt-manual input[type="date"] { width: 140px; }
.tt-manual .tt-duration { width: 90px; text-align: right; font-weight: 600; }
.tt-modes { display: flex; flex-direction: column; margin-left: 4px; }
.tt-modes .bc-icon-btn { width: 24px; height: 20px; font-size: 13px; }

.tt-week { margin-bottom: 24px; }
.tt-week-header { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px 6px; color: var(--bc-muted); }
.tt-week-header strong { color: var(--bc-text); font-size: 15px; }
.tt-day { background: var(--bc-surface); box-shadow: var(--bc-shadow); border-radius: 4px; margin-bottom: 12px; }
.tt-day-header { display: flex; justify-content: space-between; padding: 10px 16px; background: #fafafa; border-bottom: 1px solid var(--bc-border); border-radius: 4px 4px 0 0; color: var(--bc-muted); }
.tt-day-header strong { color: var(--bc-text); }
.tt-entry { display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 16px; border-bottom: 1px solid var(--bc-row); }
.tt-entry .tt-project { flex: 0 1 auto; min-width: 0; }
.tt-entry .tt-tags { flex: 0 1 auto; min-width: 0; overflow: hidden; flex-wrap: nowrap; }
.tt-entry:last-child { border-bottom: 0; }
.tt-entry:hover { background: #fcfcfc; }
.tt-entry .tt-entry-desc { flex: 1 1 160px; border: 0; border-bottom: 1px solid transparent; height: 32px; font-size: 14px; background: transparent; outline: none; min-width: 120px; }
.tt-entry .tt-entry-desc:hover { border-bottom-color: var(--bc-border); }
.tt-entry .tt-entry-desc:focus { border-bottom: 2px solid var(--bc-accent); }
.tt-entry .tt-entry-desc::placeholder { color: var(--bc-border-strong); }
.tt-tags { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; max-width: 220px; }
.tt-tag { font-size: 12px; background: var(--bc-accent-soft); color: var(--bc-accent-hover); padding: 1px 8px; border-radius: 10px; white-space: nowrap; }
.tt-times { display: inline-flex; align-items: center; gap: 2px; }
.tt-times input { width: 74px; border: 1px solid transparent; border-radius: 2px; height: 30px; text-align: center; font-variant-numeric: tabular-nums; background: transparent; font-size: 14px; }
.tt-times input:hover { border-color: var(--bc-border); }
.tt-times input:focus { border-color: var(--bc-accent); outline: none; }
.tt-entry-duration { width: 88px; border: 1px solid transparent; border-radius: 2px; height: 30px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; background: transparent; font-size: 15px; padding-right: 6px; }
.tt-entry-duration:hover { border-color: var(--bc-border); }
.tt-entry-duration:focus { border-color: var(--bc-accent); outline: none; }
.tt-entry.running { background: var(--bc-accent-soft); }
.tt-billable { font-weight: 700; font-size: 15px; }
.tt-loadmore { display: flex; justify-content: center; margin: 8px 0 24px; }

/* ---------- Timesheet ---------- */
.ts-grid td, .ts-grid th { text-align: center; }
.ts-grid td:first-child, .ts-grid th:first-child { text-align: left; min-width: 240px; }
.ts-grid th.today { color: var(--bc-accent); }
.ts-grid th small { display: block; font-weight: 400; }
.ts-cell { width: 76px; height: 32px; text-align: center; border: 1px solid var(--bc-border); border-radius: 2px; font-variant-numeric: tabular-nums; background: #fff; }
.ts-cell:focus { border-color: var(--bc-accent); box-shadow: 0 0 0 1px var(--bc-accent); outline: none; }
.ts-cell.has-value { font-weight: 600; }
.ts-cell:disabled { background: var(--bc-hover); }
.ts-total { font-weight: 600; font-variant-numeric: tabular-nums; }
.ts-nav { display: inline-flex; align-items: center; gap: 4px; }
.ts-nav .ts-range { font-weight: 600; min-width: 200px; text-align: center; }

/* ---------- Reports ---------- */
.rp-chart { display: flex; align-items: flex-end; gap: 4px; height: 180px; padding: 16px 16px 0; overflow-x: auto; }
.rp-bar { flex: 1 0 18px; max-width: 48px; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; position: relative; }
.rp-bar-fill { background: var(--bc-accent); border-radius: 2px 2px 0 0; min-height: 0; }
.rp-bar-fill.nonbillable { background: #9dd2d6; border-radius: 0; }
.rp-axis { display: flex; gap: 4px; padding: 4px 16px 12px; overflow-x: auto; border-top: 1px solid var(--bc-border); margin: 0 16px; }
.rp-axis span { flex: 1 0 18px; max-width: 48px; text-align: center; font-size: 11px; color: var(--bc-muted); white-space: nowrap; overflow: hidden; }
.rp-legend { display: flex; gap: 16px; font-size: 12px; color: var(--bc-muted); padding: 0 16px 12px; }
.rp-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; background: var(--bc-accent); }
.rp-legend span.nonbillable::before { background: #9dd2d6; }
.rp-share { height: 6px; background: var(--bc-row); border-radius: 3px; overflow: hidden; min-width: 80px; }
.rp-share > div { height: 100%; background: var(--bc-accent); }
.rp-group > td { font-weight: 600; }
.rp-child td:first-child { padding-left: 34px; }
.rp-child td { color: var(--bc-muted); }
.rp-toggle { border: 0; background: none; padding: 0 6px 0 0; color: var(--bc-muted); cursor: pointer; }

/* ---------- Identity (sign in / register) ---------- */
body.bc-anonymous .bc-page { max-width: 480px; padding-top: 48px; }
.bc-page-identity h1 { font-size: 24px; font-weight: 600; margin-bottom: 16px; }
.bc-page-identity h2, .bc-page-identity h3 { font-size: 16px; font-weight: 600; }
.bc-page-identity hr { border-color: var(--bc-border); }
body.bc-anonymous .bc-page-identity .row > [class*="col-"] { width: 100%; max-width: 100%; flex: 1 1 100%; margin: 0 !important; }
body.bc-anonymous .bc-page-identity .col-md-6.col-md-offset-2, body.bc-anonymous .bc-page-identity section:has(> h3) { display: none; }
/* Sign-up is closed (accounts are created on the Team page), so hide the login page's register link. */
.bc-page-identity p:has(> a[href*="/Account/Register"]) { display: none; }
body.bc-anonymous .bc-page-identity section, body.bc-anonymous .bc-page-identity form#registerForm, body.bc-anonymous .bc-page-identity form#account {
    background: var(--bc-surface); box-shadow: var(--bc-shadow); border-radius: 4px; padding: 20px 24px;
}
.bc-page-identity .btn-primary { background: var(--bc-accent); border-color: var(--bc-accent); border-radius: 2px; font-weight: 600; }
.bc-page-identity .btn-primary:hover, .bc-page-identity .btn-primary:focus { background: var(--bc-accent-hover); border-color: var(--bc-accent-hover); }
.bc-page-identity .form-control { border-radius: 2px; }
.bc-page-identity .form-control:focus { border-color: var(--bc-accent); box-shadow: 0 0 0 1px var(--bc-accent); }
.bc-page-identity .nav-pills .nav-link.active { background: var(--bc-accent); }
.bc-page-identity .nav-pills .nav-link { color: var(--bc-text); border-radius: 2px; }
.bc-page-identity .form-check-input:checked { background-color: var(--bc-accent); border-color: var(--bc-accent); }

/* ---------- Responsive ---------- */
/* The single bar gets tight first: drop the workspace name, then the menu captions (icons keep their tooltips). */
@media (max-width: 1280px) {
    body:not(.bc-anonymous) .bc-brand-text { display: none; }
    .bc-appbar-timer-text { max-width: 140px; }
}
@media (max-width: 1080px) {
    .bc-nav a span { display: none; }
    .bc-nav a { padding: 0 10px; font-size: 16px; }
}
@media (max-width: 991px) {
    .bc-layout.with-filter, .bc-layout.with-factbox { grid-template-columns: minmax(0, 1fr); }
    .bc-filterpane { position: static; max-height: none; }
    .bc-fields { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .bc-page { padding: 12px 12px 40px; }
    .bc-appbar-timer-text { display: none; }
    .bc-appbar { padding: 0 8px; gap: 6px; }
    .bc-nav { margin-left: 4px; padding-left: 4px; }
    .bc-cue { width: calc(50% - 6px); }
    .tt-entry { flex-wrap: wrap; }
    .tt-entry .tt-times { display: none; }
    .bc-field { grid-template-columns: 1fr; gap: 0; }
}
