/* Workspace polish: one calm shell for every internal screen. Homeowner pages do not load this. */
:root, :root[data-theme] {
  --on-accent: #201b10;
  --text-3: color-mix(in srgb, var(--text-2) 88%, var(--surface));
  --fs-sm: 13px;
  --gutter: 32px;
}
.app { isolation: isolate; }
.app .page { padding-top: 28px; }
.app .page-head { gap: 20px; margin-bottom: 24px; align-items: center; }
.app h1 { font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -.045em; line-height: 1.15; }
.app .page-head .sub { margin-top: 8px; color: var(--text-2); line-height: 1.5; }
.app .btn { font-weight: 650; }
.app .btn:not(.icon) { border-radius: 11px; }
.app .btn.primary { box-shadow: none; }
.app :where(button, a, input, select, textarea):focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
.app .card, .app .group { border: 1px solid var(--line); box-shadow: none; }
.app .table-wrap { border-radius: var(--r-lg); }
.app .table th { letter-spacing: .025em; font-weight: 650; }
.app .empty-state { max-width: 480px; margin-inline: auto; }

/* Less navigation competes with the page; secondary tools remain one click away. */
.sidebar { padding: 20px 14px 12px; background: var(--surface); border-right: 1px solid var(--line); }
.sidebar .brand { padding: 0 10px 24px; gap: 10px; }
.sidebar .brand__mark { width: 36px; height: 36px; border-radius: 12px; box-shadow: none; }
.sidebar .brand__sub { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.sidebar__navigation { flex: 1; }
.sidebar__section { margin-bottom: 10px; }
.sidebar [hidden] { display: none !important; }
.sidebar .nav-section { margin: 16px 10px 7px; font-size: 10px; color: var(--text-3); letter-spacing: .1em; }
.nav-section__toggle { width: calc(100% - 20px); display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding: 0; border: 0; background: none; font: 650 11px/1.3 var(--font-ui); text-align: left; text-transform: none; cursor: pointer; }
.sidebar .nav-section__toggle { margin-top: 4px; font-size: 12px; letter-spacing: 0; }
.sidebar .nav-item { min-height: 42px; gap: 11px; padding: 10px 12px; margin: 2px 0; border-radius: 10px; color: var(--text-2); }
.sidebar .nav-item.active { color: var(--text); background: var(--accent-soft); font-weight: 700; }
.sidebar .nav-item.active > svg { color: var(--accent-ink); }
.sidebar .nav-badge { font-size: 10px; padding: 2px 6px; }
.sidebar .nav-footer { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

.topbar { gap: 24px; padding-inline: var(--gutter); background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar__location { display: flex; flex-direction: column; min-width: 100px; gap: 2px; }
.topbar__location > span { color: var(--text-3); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.topbar__location strong { font-size: 13px; font-weight: 650; }
.topbar .search-trigger { width: min(380px, 42vw); background: var(--bg); border: 1px solid var(--line); height: 36px; box-shadow: none; }
.topbar .topbar__end { margin-left: auto; }
.topbar__identity { align-items: center; gap: 8px; min-width: 0; font-weight: 750; font-size: 13px; letter-spacing: -.02em; white-space: nowrap; }
.topbar__identity-text { display: flex; flex-direction: column; gap: 1px; }
.topbar__identity-text b { font-weight: 750; font-size: 12px; }
.topbar__identity-text small { font-size: 10px; color: var(--text-2); font-weight: 500; letter-spacing: 0; }
.topbar__mark { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-weight: 800; }
.topbar .badge { font-variant-numeric: tabular-nums; }

/* Today is an action overview first, with reports alongside it rather than mixed into the queue. */
.today-focus { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.today-inbox-link { margin-left: auto; }
.focus-item { display: flex; align-items: center; gap: 13px; padding: 18px; min-height: 90px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; color: var(--text); transition: border-color var(--dur-1), background var(--dur-1); }
.focus-item:hover { border-color: var(--line-strong); background: var(--surface-2); text-decoration: none; }
.focus-item__icon { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); }
.focus-item__body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.focus-item__value { font-size: 25px; font-weight: 750; line-height: 1.1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.focus-item__label { font-size: 12px; color: var(--text-2); }
.focus-item > svg { color: var(--text-3); }
.today-refresh-note { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line-strong); background: var(--surface); padding: 14px 16px; border-radius: 12px; margin-bottom: 22px; color: var(--text-2); font-size: 13px; }
.today-refresh-note > span { flex: 1; }
.today-refresh-note b { color: var(--text); }
.today .group-title { font-size: 13px; font-weight: 700; letter-spacing: -.01em; text-transform: none; color: var(--text); margin-top: 26px; margin-bottom: 10px; }
.today-main > .group-title:first-child, .today-side > .group-title:first-child { margin-top: 0; }
.today .group-title a { font-size: 12px; font-weight: 600; color: var(--text-2); }
.today .group-title a:hover { color: var(--accent-ink); }
.today .g-row { padding-block: 14px; }
.today .g-row__title { font-weight: 650; letter-spacing: -.015em; }
.today .g-row__sub { margin-top: 4px; font-size: 12px; line-height: 1.5; }
.today .appt { flex-basis: min(360px, 88%); border: 1px solid var(--line); border-radius: 16px; box-shadow: none; }
.today .appt__top { padding: 16px; gap: 6px; }
.appt__stamp { display: flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 12px; margin-bottom: 5px; }
.today .appt__when { text-transform: none; letter-spacing: 0; font-size: 13px; }
.today .appt__who { font-size: 21px; letter-spacing: -.035em; }
.today .appt__where { font-size: 12px; line-height: 1.5; }
.today .appt__acts { padding: 0 16px 16px; }
.today .todo__row { align-items: start; gap: 7px; }
.today .todo__check { margin-top: -6px; }
.today .todo .g-row__title { -webkit-line-clamp: 3; line-height: 1.5; }
.today .todo__row > .pill { margin-top: 2px; font-size: 10px; }
.todo__more { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 15px 15px; background: transparent; font: 650 12px var(--font-ui); color: var(--text-2); cursor: pointer; }
.todo__more:hover { color: var(--text); background: var(--surface-2); }
.todo__more[aria-expanded="true"] > svg, .nav-section__toggle[aria-expanded="true"] > svg { transform: rotate(180deg); }
.today .pipe__bar { height: 6px; }
.today .pipe__row { min-height: 43px; }
.today .money-strip .stat { border: 1px solid var(--line); border-radius: 14px; }

@media (max-width: 1100px) and (min-width: 901px) {
  .topbar { gap: 16px; }
  .topbar__location { min-width: 74px; }
  .focus-item { gap: 9px; padding: 14px; }
  .focus-item__icon { display: none; }
  .today-grid { gap: 22px; }
}
@media (max-width: 900px) {
  :root, :root[data-theme] { --gutter: 20px; }
  .app .page { padding-top: 22px; }
  .app .page-head { margin-bottom: 20px; gap: 12px; }
  .app h1 { font-size: 30px; }
  .app .page-head .sub { font-size: 12px; margin-top: 7px; }
  .topbar { height: 56px; padding-inline: 16px; gap: 8px; }
  .topbar__identity { display: flex; margin-right: auto; }
  .topbar .search-trigger { width: 44px; height: 44px; flex: 0 0 44px; border: 0; background: transparent; justify-content: center; }
  .topbar .btn.icon { width: 44px; height: 44px; min-width: 44px; }
  .topbar .search-trigger > span { display: none !important; }
  .topbar .topbar__end { margin-left: 0; gap: 2px !important; }
  .today-focus { gap: 8px; margin-bottom: 24px; }
  .focus-item { min-height: 86px; padding: 12px 10px; gap: 0; align-items: flex-start; }
  .focus-item__icon, .focus-item > svg { display: none; }
  .focus-item__value { font-size: 24px; }
  .focus-item__label { font-size: 11px; line-height: 1.4; margin-top: 4px; }
  .today-refresh-note { flex-wrap: wrap; align-items: start; font-size: 12px; }
  .today-refresh-note > span { flex-basis: calc(100% - 32px); }
  .today-refresh-note .btn { margin-left: 30px; }
  .today .g-row { padding-block: 13px; }
  .today .appt { flex-basis: 94%; }
  .today .appt__who { font-size: 20px; }
  .today .todo__row { flex-wrap: wrap; column-gap: 5px; }
  .today .todo__body { flex-basis: calc(100% - 70px); }
  .today .todo__row > .pill { margin: 0 0 0 49px; }
  .today .todo .g-row__title { font-size: 14px; -webkit-line-clamp: 3; }
  .today .today-side { margin-top: 26px; }
  .job-material-actions, .job-payment-actions { flex-wrap: wrap; }
  .job-material-actions > .right { margin-left: 0; }
  .mobile-nav { background: var(--surface); border-top: 1px solid var(--line); box-shadow: none; }
  .mobile-nav a { font-size: 10px; font-weight: 600; gap: 4px; }
  .mobile-nav a.active .ico { background: var(--accent-soft); color: var(--accent-ink); border-radius: 12px; padding: 3px 14px; margin: -3px -14px; }
}
@media (prefers-reduced-motion: reduce) {
  .app *, .app *::before, .app *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Work is readable in the office and on a phone, with no modal on every win. */
.workflow-card { padding:16px; border:1px solid var(--line); border-radius:14px; background:var(--surface); margin-bottom:16px; }
.workflow-card h3 { margin:0; }
.workflow-card summary { cursor:pointer; padding:12px 0; font-weight:600; min-height:44px; }
.workflow-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.workflow-review-row { padding:12px 0; border-top:1px solid var(--line); }
.workflow-card textarea { resize:vertical; min-height:72px; }
.row.wrap { flex-wrap:wrap; }
.workflow-card .field, .workflow-card input, .workflow-card textarea { min-width:0; max-width:100%; }
@media(max-width:600px) { .workflow-grid { grid-template-columns:1fr; } .workflow-card { padding:12px; } }
