/* Today, time reports and personal pages: the dashboard, My day, the timetable and month report, profile, MCP keys,
   Telavox and the sign-in page. Tabler first; only what Tabler has no component for lives here. */

/* ---------------------------------------------------------------- page hero (a page header with a greeting) */
.today-hero { margin-top: .25rem; }
.today-greeting { font-size: 1.6rem; font-weight: 600; letter-spacing: -.015em; }

/* ---------------------------------------------------------------- stat cards: icon avatar, one number, a label */
.today-stat .card-body { min-height: 5.25rem; }
.today-stat-value { font-size: 1.5rem; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.today-stat-of { font-size: .85rem; font-weight: 400; color: var(--tblr-secondary); }
.today-stat-label { font-weight: 500; }
.today-stat-attention { box-shadow: inset 3px 0 0 var(--tblr-yellow); }
a.today-stat { color: inherit; text-decoration: none; }

/* A progress ring: --p is the percentage (0-100); the colour follows the top bar's bands. */
.today-ring {
  --p: 0; --c: var(--tblr-primary); flex: 0 0 auto; position: relative; display: grid; place-items: center;
  width: 3.4rem; height: 3.4rem; border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--tblr-border-color) 0);
}
.today-ring::before { content: ""; position: absolute; inset: .3rem; border-radius: 50%; background: var(--tblr-bg-surface); }
.today-ring > span { position: relative; font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.today-ring-red { --c: var(--tblr-red); } .today-ring-yellow { --c: var(--tblr-yellow); }
.today-ring-azure { --c: var(--tblr-azure); } .today-ring-green { --c: var(--tblr-green); }

/* ---------------------------------------------------------------- dashboard: schedule timeline */
.today-timeline { margin-bottom: 0; }
.today-timeline .timeline-event-card { margin-bottom: 0; }
.today-slot-time { font-weight: 600; font-variant-numeric: tabular-nums; }
.today-slot-past .timeline-event-card { opacity: .62; }
.today-slot-now .timeline-event-card { box-shadow: inset 3px 0 0 var(--tblr-primary); }

/* ---------------------------------------------------------------- dashboard: queues and the firestarter board */
.today-queues .list-group-item { font-size: .875rem; }
.today-open { background: var(--tblr-bg-surface-secondary); color: var(--tblr-secondary); }
.today-rank { width: 1.5rem; text-align: center; font-weight: 600; color: var(--tblr-secondary); font-variant-numeric: tabular-nums; }
.today-rank .ti { font-size: 1.15rem; }
.today-rank-1 { color: #f5b301; } .today-rank-2 { color: #9aa5b1; } .today-rank-3 { color: #c97a3d; }
.today-week { gap: .2rem; }
.today-day {
  display: inline-flex; align-items: center; justify-content: center; gap: .1rem; min-width: 2.1rem; height: 1.45rem; padding: 0 .25rem;
  border-radius: var(--tblr-border-radius-pill); font-size: .7rem; font-variant-numeric: tabular-nums;
  color: var(--tblr-secondary); background: var(--tblr-bg-surface-secondary);
}
.today-day-hit { background: rgba(var(--tblr-primary-rgb), .16); color: var(--tblr-primary); font-weight: 600; }
.today-day-today { outline: 1px solid var(--tblr-border-color-dark, var(--tblr-border-color)); }

/* ---------------------------------------------------------------- dashboard and news: posts */
.today-post-img { height: 9rem; overflow: hidden; border-top-left-radius: inherit; border-top-right-radius: inherit; background: var(--tblr-bg-surface-secondary); }
.today-post-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.today-post-img-logo { background: #000; }
.today-post-img-logo img { object-fit: contain; padding: 1.25rem; }
.today-post-title { font-size: .95rem; line-height: 1.3; }
.today-post-teaser { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.today-article-img { max-height: 22rem; width: 100%; object-fit: cover; border-radius: var(--tblr-border-radius); }
.today-article-body img { max-width: 100%; height: auto; }

/* ---------------------------------------------------------------- My day: the calendar */
.today-total { font-weight: 500; font-size: .8rem; padding: .35em .6em; }
.today-calendar {
  --fc-button-bg-color: var(--tblr-bg-surface); --fc-button-border-color: var(--tblr-border-color);
  --fc-button-text-color: var(--tblr-body-color); --fc-button-hover-bg-color: var(--tblr-bg-surface-secondary);
  --fc-button-hover-border-color: var(--tblr-border-color); --fc-button-active-bg-color: rgba(var(--tblr-primary-rgb), .14);
  --fc-button-active-border-color: var(--tblr-primary);
}
.today-calendar .fc-button { font-size: .8125rem; font-weight: 500; padding: .3rem .75rem; text-transform: none; box-shadow: none !important; }
.today-calendar .fc-button-active, .today-calendar .fc-button:not(:disabled).fc-button-active { color: var(--tblr-primary); }
.today-calendar .fc-button:focus-visible { outline: 2px solid var(--tblr-primary); outline-offset: 1px; }
.today-calendar .fc-toolbar.fc-header-toolbar { margin-bottom: .75rem; flex-wrap: wrap; gap: .5rem; }
.today-calendar .fc-toolbar-title { font-size: 1.05rem; font-weight: 600; }
.today-calendar .fc-col-header-cell-cushion { font-weight: 500; }
.today-calendar .fc-event { border-radius: 4px; }

/* The legend: the calendar's own colours (crm.css .fc .event-*) and the note types' chosen colours. */
.today-swatch { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; margin-inline-end: .35rem; vertical-align: -.1em; }
.today-swatch-registration { background: #0047ab; }
.today-swatch-scheduling { background: #7f00ff; }
.today-swatch-done { background: repeating-linear-gradient(45deg, #6c757d, #6c757d 3px, #868e96 3px, #868e96 6px); }
.today-swatch-private { background: #0047ab; box-shadow: inset 0 0 0 2px #ca0000; }
.today-swatch-task { background: #7f00ff; }
.today-swatch-full { background: var(--tblr-success); }
.today-swatch-over { background: var(--tblr-danger); }

/* ---------------------------------------------------------------- My day: the side panel */
.today-side .card-header-tabs .nav-link { white-space: nowrap; }
.today-timer { padding: .75rem 1rem; border-bottom: 1px solid var(--tblr-border-color); }
.today-timer:last-child { border-bottom: 0; }
.today-timer-1 { background: rgba(var(--tblr-green-rgb), .07); box-shadow: inset 3px 0 0 var(--tblr-green); }
.today-timer-1 [data-timer-field="minutes"] { font-weight: 600; color: var(--tblr-green); }
.today-timer-2 { opacity: .72; }
.today-timer-minutes { width: 7rem; flex: 0 0 auto; }
.today-timer-minutes .form-control { font-variant-numeric: tabular-nums; }
.today-timer-pickspace { display: inline-block; width: 1rem; }
.today-timer textarea { resize: vertical; min-height: calc(1.5em + .5rem + 2px); }
.today-tasks.crm-myday-tasks { max-height: max(20rem, calc(100vh - 25rem)); }
.min-w-0 { min-width: 0; }

/* ---------------------------------------------------------------- reports: timetable and month report */
/* Chart.js sizes a responsive chart to its container, so the height sits on a wrapper around the canvas. */
.today-chart { position: relative; height: 15rem; }
.today-chart-tall { position: relative; height: 26rem; }
.today-weeks { max-height: 34rem; overflow-y: auto; }
.today-idx { white-space: nowrap; }
.today-bar { display: inline-block; width: 3.5rem; height: .35rem; margin-inline-start: .4rem; border-radius: 1rem; background: var(--tblr-bg-surface-secondary); vertical-align: middle; overflow: hidden; }
.today-bar > span { display: block; height: 100%; border-radius: inherit; }
.today-expand .ti { transition: transform .15s; }
.today-expand:not(.collapsed) .ti { transform: rotate(180deg); }
.today-week-detail { background: var(--tblr-bg-surface-secondary); padding: .25rem 1rem .5rem 2rem; }
.today-week-detail .table { background: transparent; --tblr-table-bg: transparent; }
.today-money-flag { white-space: nowrap; }

/* ---------------------------------------------------------------- settings pages: profile, MCP keys, Telavox */
.today-avatar-xl { font-size: 1.6rem; }
.today-profile-thumb { height: 5.5rem; width: auto; }
.today-setting { cursor: pointer; }
.today-setting .form-switch .form-check-input { margin-top: .15rem; }
.today-code {
  display: block; padding: .5rem .75rem; border-radius: var(--tblr-border-radius); background: var(--tblr-bg-surface-secondary);
  border: 1px solid var(--tblr-border-color); color: var(--tblr-body-color); font-size: .8125rem; white-space: pre-wrap; word-break: break-all;
}
.today-facts li { display: flex; gap: .5rem; align-items: baseline; margin-bottom: .35rem; }
.today-new-key { box-shadow: inset 3px 0 0 var(--tblr-green); }

/* ---------------------------------------------------------------- sign in and access denied (_LayoutBare) */
.today-bare {
  background:
    radial-gradient(60rem 30rem at 50% -10rem, rgba(var(--tblr-primary-rgb), .14), transparent 70%),
    var(--tblr-body-bg);
}
.today-bare-brand { font-size: 1.6rem; }
.today-bare-brand .crm-brand-name { font-size: 1.6rem; }
.today-signin { border-top: 3px solid var(--crm-tiger); }
.today-local-login summary { cursor: pointer; list-style-position: inside; }
.today-local-login summary:focus-visible { outline: 2px solid var(--tblr-primary); outline-offset: 2px; border-radius: 2px; }
.today-stat-value .badge { font-size: .7rem; vertical-align: middle; }
.today-timer-status { flex: 0 0 auto; width: 1.6rem; height: 1.6rem; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
