/* Readability for everyone: no working text under 12px, labels 11px at the least, clearer focus, comfortable
   tap targets. Loaded last, so it lifts the small sizes set across the older stylesheets. */

/* Tasks table */
.task-work-type strong, .task-timer-button b, .task-reviewer-cell small, .task-assignee-cell small, .task-assignee-person small,
.task-sub-add, .task-project-card small { font-size: 12px !important; }
.task-work-type small, .task-timer-cell small, .task-due-cell small, .project-task-count small,
.task-sort-heading span, .task-timer-heading span, .task-table-head { font-size: 11.5px !important; }
.task-filter-row label, .task-project-filters-box label, .task-filter-layout label { font-size: 12px !important; }
.task-due-week i { font-size: 10px !important; min-width: 16px; }
.task-timer-button i { font-size: 10px !important; }
.task-project-add-row .task-add-field, .task-project-add-row input { font-size: 13px !important; }

/* Overview charts and cards */
.project-size-counts span, .project-engagement-person span, .project-engagement-person b, .project-engagement-head span,
.project-engagement-head strong, .project-effort-legend span, .project-effort-legend b, .project-effort-legend small,
.project-size-meta span, .project-size-meta strong, .company-project-grid small, .company-project-status span,
.task-summary-legend span, .task-summary-legend strong, .task-summary-legend small, .project-line-legend span,
.scoreboard-metrics-detailed small, .kpi-rating small, .kpi-rating span, .task p, .panel-heading p { font-size: 12px !important; }

/* Organisation */
.org-person-info small, .org-team-label, .org-place-under, .org-edit-person, .org-collapse, .scoreboard-rank,
.scoreboard-metrics, .scoreboard-metrics b, .org-chart-hint { font-size: 12px !important; }

/* Projects, reports, shared bits */
.project-metrics span, .project-directory-status, .project-sub-pill, .project-time { font-size: 12px !important; }
.report-content small, .report-content b, .metric-card small, .metric-badge, .tag { font-size: 12px !important; }
.eyebrow { font-size: 11px !important; }
.brand-version, .brand-byline, .profile-mini small, .profile-org, .profile-layer, .text-button, .wiki-empty, .chart-note,
.wiki-local-note, .member-count { font-size: 12px !important; }
.notification em { font-size: 10px !important; }

/* Anyone using a keyboard can always see where they are. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--violet, #5b45ed); outline-offset: 2px; }

/* Controls are easy to hit: at least 36px tall on a computer, 44px on a phone. */
.page select, .page input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]), .secondary-button, .text-button { min-height: 36px; }
.text-button { display: inline-flex; align-items: center; }
@media (max-width: 860px) {
  .page select, .page input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]), .page .secondary-button, .page .primary-button { min-height: 44px; }
  .page .text-button { min-height: 40px; }
}
/* Muted text stays readable on white. */
:root { --muted: #6b7386; }
.dark { --muted: #a3acbd; }

/* In-between states (states.js). */
.doptor-state { position: fixed; right: 16px; bottom: 16px; z-index: 9400; padding: 7px 14px; border-radius: 999px; background: var(--ink, #182033); color: var(--surface, #fff); font: 600 12.5px Inter, system-ui, sans-serif; box-shadow: 0 8px 22px rgba(15, 20, 34, .2); }
.doptor-state[data-kind="saved"] { background: #15803d; color: #fff; }
.doptor-offline { position: fixed; left: 0; right: 0; top: 0; z-index: 9600; padding: 9px 16px; background: #92400e; color: #fff; font: 600 13px/1.4 Inter, system-ui, sans-serif; text-align: center; }
.doptor-offline[hidden], .doptor-state[hidden] { display: none; }
@keyframes doptor-spin { to { transform: rotate(360deg); } }
button.is-busy { position: relative; cursor: progress; }
button.is-busy::before { content: ""; flex: none; width: 14px; height: 14px; margin-right: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: doptor-spin .7s linear infinite; display: inline-block; vertical-align: -2px; }
.page-heading p.is-loading::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border: 2px solid var(--violet, #5b45ed); border-right-color: transparent; border-radius: 50%; animation: doptor-spin .7s linear infinite; }
@media (max-width: 860px) { .doptor-state { right: auto; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { button.is-busy::before, .page-heading p.is-loading::before { animation-duration: 2s; } }

/* Fixes after review. */
.brand-lockup.brand-two-line .brand-name, .brand-lockup.brand-two-line .brand-byline { font-size: 15px !important; }
.page select, .task-status-select, .page input[type="date"], .page input[type="search"], .page input[type="text"] { font-size: 13px !important; }
.task-record select, .task-status-cell select, .task-status { font-size: 12px !important; }
.task-project-add-row .task-add-field, .task-project-add-row input { font-size: 12px !important; }
.task-project-add-row input[type="date"] { padding-left: 4px !important; padding-right: 2px !important; }
.task-project-add-row .task-inline-title input { font-size: 13px !important; }

/* Names are never cut short: they show in full and wrap onto a second line if they must. */
.scoreboard-person { flex: 1 1 auto; }
.scoreboard-person strong { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; font-size: 13px; line-height: 1.25; text-align: left; }
@media (max-width: 860px) {
  .scoreboard-row-detailed { display: grid !important; grid-template-columns: minmax(0, 1fr) auto !important; gap: 8px 12px !important; align-items: center; }
  .scoreboard-row-detailed .scoreboard-person { grid-column: 1; grid-row: 1; min-width: 0; }
  .scoreboard-row-detailed .scoreboard-total { grid-column: 2; grid-row: 1; white-space: nowrap; }
  .scoreboard-row-detailed .scoreboard-metrics-detailed { grid-column: 1 / -1; grid-row: 2; }
  .task-assignee-person small, .task-assignee-cell small, .chat-members-capsule, .weekly-person-name, .org-person-info strong { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; }
}

/* Sign-in card: just the two boxes, with their hint inside in regular weight at half strength. */
.auth-card > input { min-height: 46px; padding: 0 14px; font-size: 15px; font-weight: 400; }
.auth-card input::placeholder { color: currentColor; opacity: .5; font-weight: 400; }

/* Company policies (Organisation, and the Policies tab in Attendance). */
.policy-group { margin: 22px 0 10px; font-size: 15px; font-weight: 800; }
.policy-card { margin-bottom: 10px; padding: 0; overflow: hidden; }
.policy-card summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; }
.policy-card summary::-webkit-details-marker { display: none; }
.policy-card summary::after { content: "+"; flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--violet-soft); color: var(--violet); font-weight: 700; }
.policy-card[open] summary::after { content: "–"; }
.policy-card summary strong { flex: 1; font-size: 15px; }
.policy-card summary small { color: var(--muted); font-size: 12px; }
.policy-card ul { margin: 0; padding: 0 18px 14px 36px; line-height: 1.65; font-size: 14px; }
.policy-card > .text-button { margin: 0 18px 14px; }
.company-project-status span { white-space: nowrap; }

/* Charts: lighter, cleaner and consistent. */
.task-donut-segment { stroke-width: 20; transition: stroke-width .18s ease, opacity .18s ease; }
.task-donut-segment:hover, .task-donut-segment:focus, .task-donut-segment.is-hovered { stroke-width: 25; filter: none; }
.task-summary-ring svg:hover .task-donut-segment:not(:hover):not(.is-hovered) { opacity: .45; }
.task-summary-ring strong { font-size: 34px; font-weight: 800; letter-spacing: -.03em; }
.task-summary-ring span { color: var(--muted); letter-spacing: .04em; text-transform: uppercase; font-size: 11px; }
.task-summary-legend > div { padding: 7px 0; border-bottom: 1px solid var(--line); }
.task-summary-legend > div:last-child { border-bottom: 0; }
.task-summary-legend i { width: 10px; height: 10px; border-radius: 3px; }
.task-summary-legend strong { font-variant-numeric: tabular-nums; }
/* Team engagement uses the full row, with projects side by side. */
.project-engagement-card { grid-column: 1 / -1; min-height: 0; }
.project-engagement-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; max-height: 420px; }
.project-engagement-list > section { padding: 14px 16px; border-radius: 14px; gap: 9px; }
.project-engagement-person i, .sync-bar-row > div { height: 8px; border-radius: 999px; }
.sync-bar-row > div { background: color-mix(in srgb, var(--line) 70%, transparent); }
.sync-bar-row i { border-radius: 999px; }
/* Line chart: softer grid, rounder lines. */
.project-size-scroll svg line { opacity: .1; }
.project-size-scroll svg path { stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.project-size-scroll svg circle { r: 4; stroke-width: 2; }
.project-size-scroll svg text { fill: var(--muted); font-size: 12px; }
.project-line-legend label { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; }
.project-line-legend { gap: 8px !important; }
/* Status bar on the overview. */
.delivery-status-bar { height: 12px; border-radius: 999px; overflow: hidden; gap: 2px; display: flex; }
.delivery-status-bar i { border-radius: 2px; }
/* Team engagement: names in full, a readable bar. */
.project-engagement-person { grid-template-columns: minmax(96px, .6fr) minmax(60px, 1fr) 28px; gap: 10px; font-size: 12.5px; }
.project-engagement-person > span { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; color: var(--ink); }
.project-engagement-person > div { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--line) 70%, transparent); }
.project-engagement-person b { font-size: 12.5px; }
@media (max-width: 560px) { .project-engagement-person { grid-template-columns: minmax(110px, .9fr) minmax(40px, 1fr) 24px; } .project-engagement-list { grid-template-columns: 1fr; } }
.project-engagement-head { flex-wrap: wrap; gap: 4px 10px; }
.project-engagement-head strong { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; font-size: 13.5px; }
.company-project-status, .company-project-status span { white-space: nowrap !important; }
.project-engagement-list > section { align-content: start; }

/* One search icon only: where the "Search tasks…" hint shows (phones and tablets), the old icon is hidden. */
@media (max-width: 860px) { .topbar .search > span:not(.search-hint) { display: none !important; } }
/* Tasks page: the top search bar is the one search, so the page's own "Search work" box is not shown. */
.task-results-toolbar > label { display: none !important; }

/* Phone Tasks page: the six project cards (and Future Tasks) sit two to a row, one row after another. */
@media (max-width: 860px) {
  .task-projects-cards { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; overflow: visible !important; padding: 2px 0 0; }
  .task-project-card { width: auto !important; min-width: 0; }
  .task-project-card .project-thumb, .task-project-thumb-future { height: 74px; }
}

/* List View / Weekly View: a labelled toggle. "View as" sits inside a pill switch whose knob is the chosen view. */
.task-mode-toggle { display: inline-flex !important; align-items: center; gap: 2px; align-self: center; height: auto !important; margin: 0 !important; padding: 4px !important; border: 1px solid var(--line); border-radius: 999px !important; background: color-mix(in srgb, var(--line) 55%, var(--surface)) !important; }
.task-mode-toggle::before { content: "View as"; padding: 0 8px 0 12px; color: var(--muted); font: 600 12px Inter, system-ui, sans-serif; white-space: nowrap; }
.task-mode-toggle button { flex: 0 0 auto !important; min-height: 34px !important; padding: 0 14px !important; border-radius: 999px !important; background: transparent !important; color: var(--muted) !important; font: 600 13px Inter, system-ui, sans-serif; white-space: nowrap; transition: background .18s, color .18s, box-shadow .18s; }
.task-mode-toggle button.active, .task-mode-toggle button[aria-pressed="true"] { background: var(--surface) !important; color: var(--ink) !important; box-shadow: 0 1px 4px rgba(15, 20, 34, .18); }
.dark .task-mode-toggle button.active { background: var(--violet) !important; color: #fff !important; }
@media (max-width: 860px) { .task-mode-toggle { display: flex !important; } .task-mode-toggle button { flex: 1 1 auto !important; padding: 0 8px !important; } .task-mode-toggle::before { padding: 0 4px 0 10px; } }
.task-project-add-row select[name="size"] { padding-left: 6px !important; padding-right: 16px !important; font-size: 11.5px !important; }
.page .task-filter-layout > .task-mode-toggle { align-self: center !important; height: 44px !important; min-height: 0 !important; border-radius: 999px !important; }
.page .task-filter-layout > .task-mode-toggle button { height: 34px !important; min-height: 0 !important; border-radius: 999px !important; }
/* Phone Tasks heading: "+ New task" comes first, then "Archived tasks". */
@media (max-width: 860px) { .page-heading #task-add { order: -1; } .page-heading .heading-actions:has(#task-add), .page-heading div:has(> #task-add) { display: flex; flex-wrap: wrap; gap: 8px; } }

/* Quick-add row: a task name box, the choices, then one clear "Add this task" button. */
.task-project-add-row .task-inline-title input { padding-left: 12px !important; border: 1px solid var(--line) !important; border-radius: 10px; background: var(--surface) !important; }
.task-project-add-row .task-add-submit { grid-column: 1 / -1; justify-self: start; width: auto !important; height: auto !important; min-height: 42px !important; padding: 5px 5px 5px 18px !important; border: 1.5px solid #b9b9b9 !important; border-radius: 999px !important; background: var(--surface) !important; color: var(--ink) !important; font: 500 14px Inter, system-ui, sans-serif !important; white-space: nowrap; filter: none !important; }
.dark .task-project-add-row .task-add-submit { border-color: #4a5163 !important; }
.task-project-add-row { height: auto !important; padding-top: 10px !important; padding-bottom: 10px !important; row-gap: 8px !important; }
@media (max-width: 860px) {
  .task-project-add-row .task-add-submit { order: 20; justify-self: start; min-height: 46px !important; font-size: 15px !important; }
  .task-project-add-row .task-inline-title input { min-height: 46px; font-size: 15px !important; }
  /* The View as toggle: label above, two equal halves, room to breathe. */
  .task-filter-layout { margin-top: 26px; }
  .page .task-filter-layout > .task-mode-toggle { position: relative; display: grid !important; grid-template-columns: 1fr 1fr; height: 48px !important; }
  .task-mode-toggle::before { position: absolute; left: 6px; top: -22px; padding: 0 !important; font-size: 12.5px; }
  .page .task-filter-layout > .task-mode-toggle button { height: 38px !important; padding: 0 6px !important; font-size: 14px !important; }
  .task-filter-layout > .task-filters-button { min-height: 48px; border-radius: 999px; }
}
.dark .task-mode-toggle { background: #1b2030 !important; border-color: #343c50; }

/* Recorded time is not part of Doptor: no timers, no logged hours. Task size (Small / Medium / Big) is the only time measure. */
html:root { --task-columns: minmax(220px, 1fr) 118px 180px 110px 176px 112px 28px; }
.task-timer-cell, .task-timer-heading, .task-project-add-row > span:empty, .project-time, .time-consumed-panel,
label:has(> input[name="minutesSpent"]), label:has(> #project-effort-metric), .forecast-grid article:nth-child(4) { display: none !important; }
.forecast-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Every date box has a visible edge and readable text in the light theme too. */
.task-project-add-row input[type="date"], .page input[type="date"], dialog input[type="date"] { border: 1px solid var(--line) !important; border-radius: 8px; background: var(--surface) !important; color: var(--ink) !important; padding: 0 8px !important; }
.page input[type="date"]::-webkit-datetime-edit, dialog input[type="date"]::-webkit-datetime-edit { color: var(--ink); opacity: .75; }
.page input[type="date"]::-webkit-calendar-picker-indicator { opacity: .7; cursor: pointer; }
.task-add-due { gap: 6px; }
@media (max-width: 860px) { .forecast-grid { grid-template-columns: 1fr !important; } }

/* Home: "Choose your UI colour" for everyone (accent.js). Dots, a Custom picker, and back to the company colour. */
.home-accent { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: -6px 0 20px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.home-accent > span { flex: none; color: var(--ink); font: 700 13px Inter, system-ui, sans-serif; }
.home-accent-dots { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 3px; }
.home-accent-dots > button { flex: none; width: 28px; height: 28px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: var(--c); cursor: pointer; }
.home-accent-dots > button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c, var(--ink)); }
.home-accent-dots .home-accent-reset { background: var(--bg); color: var(--muted); border: 1px solid var(--line); font-size: 15px; }
.home-accent-dots .home-accent-reset[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.home-accent-custom { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 12.5px Inter, system-ui, sans-serif; cursor: pointer; }
.home-accent-custom::before { content: ""; width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(#ef4444, #f59e0b, #22c55e, #06b6d4, #6366f1, #d946ef, #ef4444); }
.home-accent-custom.is-on::before { background: var(--c); }
.home-accent-custom.is-on { border-color: var(--c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 25%, transparent); }
.home-accent-custom input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0 !important; padding: 0; border: 0; opacity: 0; cursor: pointer; }
@media (max-width: 860px) { .home-accent { flex-direction: column; align-items: flex-start; gap: 8px; } }

/* Phone bottom bar: no coloured outline, a soft shadow lifts it off the page. */
@media (max-width: 860px) {
  .mobile-tabbar { border: 0 !important; box-shadow: 0 6px 22px rgba(15, 20, 34, .14), 0 1px 3px rgba(15, 20, 34, .08) !important; }
  .dark .mobile-tabbar { box-shadow: 0 6px 22px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .06) !important; }
}

/* The three top icons (theme, chat, notifications) follow the chosen UI colour. */
.top-actions .icon-button { border-color: color-mix(in srgb, var(--violet) 22%, var(--surface)) !important; background: var(--violet-soft) !important; color: var(--violet) !important; box-shadow: none; }
.top-actions .icon-button:hover { border-color: color-mix(in srgb, var(--violet) 45%, var(--surface)) !important; background: color-mix(in srgb, var(--violet) 18%, var(--surface)) !important; box-shadow: 0 3px 9px color-mix(in srgb, var(--violet) 18%, transparent); }
.top-actions .icon-button:focus-visible { outline-color: var(--violet) !important; }
#theme-toggle .theme-sun, #theme-toggle .theme-moon { color: var(--violet) !important; }
.top-actions .top-chat b { background: var(--violet) !important; }
.dark .top-actions .icon-button { background: color-mix(in srgb, var(--violet) 20%, var(--surface)) !important; border-color: color-mix(in srgb, var(--violet) 40%, var(--surface)) !important; color: color-mix(in srgb, var(--violet) 55%, #fff) !important; }
.dark #theme-toggle .theme-sun, .dark #theme-toggle .theme-moon { color: color-mix(in srgb, var(--violet) 55%, #fff) !important; }
/* The notification count grows into a pill for "99+" instead of spilling out of its circle. */
.top-actions .notification em, .top-actions .top-chat b { width: auto !important; min-width: 18px; padding: 0 4px !important; border-radius: 999px !important; white-space: nowrap; font-size: 10px !important; line-height: 14px; }

/* ===== Light theme visibility: every field, dropdown and outline button has an edge you can see. ===== */
:root { --field-line: #b4bccb; --line: #dde1ea; }
.dark { --field-line: #4a5470; --line: #2a3143; }
:where(.page, dialog, .sidebar, .topbar, .chat-drawer, .auth-card, .doptor-dialog) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not([type="hidden"]), select, textarea) { border: 1px solid var(--field-line) !important; background-color: var(--surface); color: var(--ink); }
:where(.page, dialog) :is(input, select, textarea):focus { border-color: var(--violet) !important; outline: 2px solid color-mix(in srgb, var(--violet) 30%, transparent); outline-offset: 0; }
:where(.page, dialog) :is(input, select, textarea)[readonly] { background-color: color-mix(in srgb, var(--line) 45%, var(--surface)); }
:where(.page, dialog) :is(input, textarea)::placeholder { color: var(--muted); opacity: .85; }
/* Fields that sit inside a framed box take their edge from the box. */
.topbar .search input, .future-quick input, .s47-chat__composer textarea, .home-accent-custom input, .auth-art .auth-card > input { border: 0 !important; background-color: transparent; }
.auth-art .auth-card > input { border: 1px solid rgba(255, 255, 255, .85) !important; background-color: rgba(255, 255, 255, .6); }
.topbar .search, .future-quick, .workspace-switcher, .sidebar-workspace-switcher { border-color: var(--field-line) !important; }
.sidebar .workspace-switcher select { border: 0 !important; }
.s47-chat__composer:not(.s47-chat__thread-composer), .s47-chat__thread-composer { border: 1px solid var(--field-line) !important; }
.page .wiki-title { border: 0 !important; border-bottom: 1px dashed var(--field-line) !important; border-radius: 0; }
/* Outline buttons and small controls. */
.secondary-button, .text-button.decline, .attendance-tab, .filter-chip, .org-zoom button, .org-view-switch button, .task-filters-button, .project-sub-pill, .task-sub-add { border-color: var(--field-line) !important; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--violet); outline: 1px solid var(--field-line); outline-offset: -1px; border-radius: 3px; }
/* Faint text found by the contrast check. */
.search kbd { color: #5f6878 !important; border-color: var(--field-line) !important; }
.kpi-rating > span, .kpi-rating span[aria-label] { color: #b45309 !important; }
.metric-top .trend.down, .trend.down { color: #b42318 !important; }
.metric-top .trend, .trend.up { color: #166534; }
.s47-chat { --chat-muted: #5a6577; }
.s47-chat__day, .s47-chat__byline time, .s47-chat__composer-tools span, .s47-chat__send-hint { color: #5a6577 !important; }
.dark .s47-chat__day, .dark .s47-chat__byline time, .dark .s47-chat__composer-tools span, .dark .s47-chat__send-hint { color: #aab3c5 !important; }
.dark .search kbd { color: #aab3c5 !important; }

/* ===== Check-in with location ===== */
.attendance-today { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.attendance-check-big { min-height: 48px; font-size: 15px !important; font-weight: 700 !important; }
.attendance-geo-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.attendance-geo-note.is-error { padding: 10px 12px; border: 1px solid #f1b4ae; border-radius: 10px; background: #fdf1f0; color: #9f1c12; font-weight: 600; }
.dark .attendance-geo-note.is-error { border-color: #7a2c26; background: #2c1614; color: #ffb4ab; }
.home-checkin { display: flex; flex-direction: column; gap: 12px; margin: 0 0 16px; padding: 16px; border: 1px solid color-mix(in srgb, var(--violet) 35%, var(--line)); border-radius: 18px; background: var(--violet-soft); }
.home-checkin strong { display: block; color: var(--ink); font-size: 16px; }
.home-checkin span { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.home-location-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.home-location-row > div { flex: 1 1 200px; min-width: 0; }
.home-location-row strong { display: block; font-size: 14px; }
.home-location-row span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.home-location-none { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
#home-location form { margin-top: 14px; }
#attendance-geofence-form .secondary-button, #attendance-geofence-form a.text-button { justify-self: start; }
@media (max-width: 860px) {
  /* The button people press every morning is the biggest thing on the screen. */
  .attendance-today.is-waiting { flex-direction: column; align-items: stretch; }
  .attendance-check-big, .home-checkin .attendance-check-big { width: 100% !important; min-height: 60px !important; justify-content: center; font-size: 18px !important; border-radius: 16px !important; }
  .attendance-today strong { font-size: 17px; }
}
/* Custom colour: the swatch is the colour wheel itself and shows the colour picked. */
.home-accent-custom::before { box-shadow: inset 0 0 0 2px var(--surface); outline: 1px solid var(--field-line); }
.home-accent-custom input[type="color"] { -webkit-appearance: none; appearance: none; }
/* Check in is a solid button in the UI colour, so it cannot be missed. */
.attendance-check-big, .home-checkin .attendance-check-big { border: 0 !important; background: var(--violet) !important; color: #fff !important; box-shadow: 0 6px 18px color-mix(in srgb, var(--violet) 32%, transparent) !important; }
.attendance-check-big::after { border-color: rgba(255, 255, 255, .85) !important; background-color: transparent !important; color: #fff !important; filter: brightness(0) invert(1); }
.attendance-check-big.is-busy, .attendance-check-big:disabled { opacity: .75; }
/* The search field takes its edge from its box only. */
.search input, .search .search-hint { border: 0 !important; outline-offset: 0; background-color: transparent !important; }
/* Home: the partner company's people, names only (no scores). */
.partner-team-panel { margin-top: 16px; }
.partner-team-list { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 16px 20px 20px; }
.partner-team-list .scoreboard-person { min-width: 0; }
.team-scoreboard-panel[hidden] { display: none !important; }

/* ===== Attendance: today's check in and check out, above the tabs ===== */
.checkio { display: grid; gap: 14px; max-width: 520px; margin: 0 0 20px; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.checkio-head strong { display: block; font-size: 16px; color: var(--ink); }
.checkio-head span { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.checkio-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkio-tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 1 / 1; max-height: 190px; min-width: 0; padding: 14px; border: 1.5px solid var(--field-line); border-radius: 18px; background: var(--bg); }
.checkio-tile small { color: var(--muted); font: 600 13px Inter, system-ui, sans-serif; }
.checkio-tile b { margin-top: 2px; color: var(--ink); font: 700 clamp(26px, 8vw, 34px)/1.1 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.checkio-tile em { margin-top: 4px; min-height: 18px; color: var(--muted); font: 500 13px/1.35 Inter, system-ui, sans-serif; font-style: normal; overflow-wrap: anywhere; }
.checkio-radio { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid var(--field-line); border-radius: 50%; background: var(--surface); }
.checkio-radio svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.checkio-tile.is-next { border-color: var(--violet); background: var(--violet-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 16%, transparent); }
.checkio-tile.is-next .checkio-radio { border-color: var(--violet); box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 12px var(--violet); }
.checkio-tile.is-done .checkio-radio { border-color: #15803d; background: #15803d; }
.checkio-tile:not(.is-done) b { color: var(--muted); opacity: .6; }
.checkio .attendance-check-big { width: 100% !important; min-height: 56px !important; justify-content: center; font-size: 17px !important; border-radius: 16px !important; }
.checkio .attendance-check-big::after { display: none !important; }
.checkio-again { justify-self: start; }
.checkio .attendance-geo-note { margin: 0; }

/* ===== Steady layout: nothing jumps or slides sideways ===== */
/* The scrollbar keeps its space, so pages do not shift left and right when their length changes. */
html { scrollbar-gutter: stable; }
/* Hovering lifts with a shadow only; nothing moves under the pointer. */
.wiki-folder-card:hover, .top-actions .icon-button:hover, .task-project-card:hover, .org-setup-card:hover, .project-card:hover, .project-directory-card:hover, .secondary-button:hover, .primary-button:hover { transform: none !important; }
/* Numbers keep the same width as they change. */
.scoreboard-metrics-detailed b, .scoreboard-total, .metric strong, .project-metrics b, .member-count, .attendance-table td { font-variant-numeric: tabular-nums; }
/* Pictures hold their place before they load. */
.project-thumb, .task-project-thumb, .project-home-head .project-thumb { background-color: color-mix(in srgb, var(--line) 60%, var(--surface)); }
.project-thumb img, .task-project-thumb img, .profile-photo, .chat-members-face img, .scoreboard-person img { object-fit: cover; }
/* Messages at the bottom sit above the phone's tab bar instead of on top of it. */
@media (max-width: 860px) { .doptor-toast, .doptor-sync, .doptor-uploads { bottom: calc(104px + env(safe-area-inset-bottom, 0px)) !important; } }
.doptor-toast { animation: doptor-toast-in .18s ease-out both; }
@keyframes doptor-toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .doptor-toast { animation: none !important; } }
.sample-tag { display: inline-block; margin-left: 8px; padding: 2px 8px; border: 1px solid var(--field-line); border-radius: 999px; color: var(--muted); font: 600 11px/1.5 Inter, system-ui, sans-serif; letter-spacing: .02em; vertical-align: middle; white-space: nowrap; }
