/* Generated by design/build_styles.py. Edit source files, then rebuild. */

/* Source: workspace-components.css */
@font-face{font-family:'Source Sans 3';src:url('fonts/source-sans-3.woff2') format('woff2');font-style:normal;font-weight:200 900;font-display:swap;}
/* Maintained workspace styles. Legacy active sources retired.
   Unslop guidance: Damir Sokolovsky (@heydamir), CC BY 4.0. */
:root {
  --brand: #c9383e;
  --coral: #ff5757;
  --ink: #2f2f2d;
  --muted: #6e6e68;
  --line: #f1f1ef;
  --bg: #f6f6f5;
  --nav: #fff;
  --soft: #fff0ef;
  --green: #16724c;
  --shadow: 0 3px 16px #62626205;
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,input,select,textarea {
  font: inherit;
}

button,.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #e3e3e0;
  background: white;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  line-height: 1.5;
  text-decoration: none;
  white-space: normal;
}

button:hover,.button:hover {
  background: #f6f6f5;
  text-decoration: none;
}

button.primary,.button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}

button.primary:hover,.button.primary:hover {
  background: #aa292f;
}

.full {
  width: 100%;
}

:focus-visible {
  outline: 3px solid #ffb0b0;
  outline-offset: 3px;
}

h1,h2,h3,p {
  margin-top: 0;
}

h1 {
  line-height: 1.25;
  margin-bottom: 0;
}

h2 {
  margin-bottom: 16px;
}

small,.small {
  font-size: .8125rem;
}

.muted {
  color: var(--muted);
}

.preserve {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.eyebrow {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .13em;
  color: var(--muted);
  margin-bottom: 10px;
}

.app-shell {
  display: grid;
  grid-template-columns: 244px minmax(0,1fr);
}

.sidebar {
  background: white;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  color: var(--ink);
}

.brand img {
  object-fit: cover;
}

.brand small {
  color: var(--muted);
  font-size: .6875rem;
  font-weight: 400;
  letter-spacing: 0;
}

.workspace-label {
  border: 1px solid var(--line);
  border-radius: 7px;
  margin: 0 18px 12px;
  padding: 10px;
  font-size: .8125rem;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.sidebar nav {
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
}

.nav-link:hover {
  background: #f6f6f5;
  text-decoration: none;
}

.nav-link.active {
  background: var(--soft);
}

.sidebar-bottom {
  border-top: 1px solid var(--line);
}

.user-link {
  display: flex;
  gap: 10px;
  color: var(--ink);
  align-items: center;
}

.user-link small {
  display: block;
  color: var(--muted);
}

.avatar {
  background: #f9e8e5;
  border: 1px solid #f0d5ce;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}

.avatar.mini {
  font-size: .6875rem;
}

.text-button {
  background: none;
  border: none;
  font-weight: 400;
  color: var(--muted);
}

.topbar {
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #626262;
}

.crumb {
  padding: 0 15px;
  color: #d4d4cf;
}

.top-right {
  display: flex;
  align-items: center;
}

.timezone {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 5px;
}

.main-shell {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.main-shell main {
  flex: 1;
  width: 100%;
  margin: auto;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
}

.intro {
  color: var(--muted);
  margin: 12px 0 28px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  margin: 26px 0;
}

.metric {
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
}

.metric>span {
  font-size: .8125rem;
  color: #626262;
  font-weight: 500;
}

.metric strong {
  display: block;
  margin: 9px 0 2px;
  overflow-wrap: anywhere;
}

.metric.attention strong {
  color: var(--brand);
}

.panel {
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-width: 0;
}

.panel.no-pad {
  padding: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0,2.3fr) minmax(270px,1fr);
  gap: 22px;
  align-items: start;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 0;
}

.stage-summary {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
  margin-bottom: 30px;
}

.stage-summary a {
  background: #f6f6f5;
  border: 1px solid #f1f1ef;
  color: var(--ink);
  display: block;
}

.stage-summary span {
  font-size: .75rem;
  color: var(--muted);
  display: block;
}

.stage-summary strong {
  font-size: 1.25rem;
  display: block;
  margin-top: 8px;
}

progress {
  width: 100%;
  height: 4px;
  accent-color: var(--coral);
  display: block;
  margin-top: 12px;
  border: 0;
}

progress::-webkit-progress-bar {
  background: #f1f1ef;
  border-radius: 4px;
}

progress::-webkit-progress-value {
  background: var(--coral);
  border-radius: 4px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background: #f6f6f5;
  white-space: nowrap;
}

td,th {
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.record-title:hover {
  color: var(--brand);
}

.badge {
  display: inline-flex;
  line-height: 1.5;
  white-space: nowrap;
  background: #f1f1ef;
}

.badge.green {
  background: #e9f5ee;
}

.badge.red {
  background: #fff0ee;
}

.badge.amber {
  background: #fff5df;
}

.count {
  background: #f6f6f5;
  border-radius: 5px;
}

.attention-item {
  display: flex;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  gap: 12px;
  color: var(--ink);
}

.attention-item strong {
  font-size: .8125rem;
  display: block;
}

.attention-item small {
  display: block;
  font-size: .75rem;
  color: var(--muted);
  margin: 4px 0 8px;
}

.attention-icon {
  background: #fff2ef;
  color: var(--brand);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  flex-shrink: 0;
}

.soft-box {
  background: #f6f6f5;
  border: 1px solid var(--line);
  padding: 18px;
  margin-top: 24px;
  font-size: .8125rem;
}

.soft-box p {
  color: var(--muted);
  font-size: .75rem;
  margin: 9px 0 12px;
}

.soft-box a {
  font-weight: 600;
}

.footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 20px;
  flex-wrap: wrap;
}

.search-form {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}

.search-form select {
  width: auto;
  margin: 0;
  max-width: 220px;
}

.search-label {
  margin: 0;
  display: flex;
  align-items: center;
  position: relative;
}

.search-label svg {
  position: absolute;
  left: 12px;
  color: var(--muted);
}

.search-label input {
  padding-left: 38px;
  margin: 0;
  width: 260px;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: .8125rem;
  flex-wrap: wrap;
}

.button.selected {
  background: var(--soft);
  color: var(--brand);
  border-color: #efc9c9;
}

.kanban {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 20px;
  min-height: 500px;
}

.kanban-column {
  background: #f1f1ef;
  min-width: 245px;
  width: 245px;
  padding: 14px;
}

.kanban-column h2 {
  font-size: .8125rem;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.kanban-column h2 span {
  color: var(--muted);
}

.work-card {
  display: block;
  background: white;
  border: 1px solid #e3e3e0;
  margin-bottom: 12px;
  color: var(--ink);
}

.work-card:hover {
  border-color: #dca8aa;
  text-decoration: none;
}

.work-card h3 {
  margin: 7px 0;
  font-size: .9375rem;
}

.work-card p,.work-card small {
  font-size: .75rem;
  color: var(--muted);
}

.work-card>div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .75rem;
  margin: 14px 0;
}

.empty {
  text-align: center;
  color: var(--muted);
}

.empty>span {
  display: inline-flex;
  padding: 12px;
  background: #f6f6f5;
  border-radius: 50%;
  margin-bottom: 10px;
}

.empty h3 {
  color: var(--ink);
  margin-bottom: 7px;
}

.empty p {
  margin: 0;
}

label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  margin-bottom: 16px;
}

label small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  margin-top: 5px;
}

input,select,textarea {
  display: block;
  width: 100%;
  border: 1px solid #e3e3e0;
  background: white;
  color: var(--ink);
  margin-top: 7px;
  min-width: 0;
}

textarea {
  resize: vertical;
}

input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
  margin: 6px 0;
}

input[type=file] {
  font-size: .8125rem;
}

input[readonly] {
  background: #f6f6f5;
}

.fields {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
}

.wide {
  grid-column: 1/-1;
}

.form-panel {
  max-width: 960px;
  margin-top: 25px;
}

.form-actions {
  display: flex;
  gap: 20px;
  align-items: center;
  padding-top: 20px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  font-size: .875rem;
}

.detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 24px 0;
}

.detail-heading a {
  font-size: .8125rem;
}

.detail-heading h2 {
  font-size: 1.5rem;
  margin: 12px 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0,1.8fr) minmax(300px,1fr);
  gap: 22px;
  align-items: start;
}

.details {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 22px;
  margin: 24px 0 0;
}

.details dt {
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.details dd {
  margin: 0;
  font-size: .875rem;
  overflow-wrap: anywhere;
}

.spaced {
  margin-top: 24px;
}

.activity {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.activity strong {
  font-size: .8125rem;
  display: block;
}

.activity small {
  font-size: .6875rem;
  color: var(--muted);
}

.notice {
  background: #eaf5ef;
  border: 1px solid #cde7d7;
  margin-bottom: 20px;
}

.demo-strip {
  color: #6d6054;
  background: #f4f0e9;
  border: 1px solid #e9e0d5;
  margin-bottom: 22px;
  letter-spacing: .02em;
}

.invoice-total strong {
  display: block;
  font-size: 1.7rem;
}

.invoice-total small {
  color: var(--muted);
}

.invoice-total p {
  font-size: .8125rem;
}

.calendar {
  padding: 0;
  overflow: auto;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7,minmax(115px,1fr));
}

.day-label {
  background: #f6f6f5;
  padding: 12px;
  font-size: .75rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.calendar-day {
  min-height: 135px;
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: .8125rem;
}

.calendar-day a {
  display: block;
  background: var(--soft);
  border-left: 2px solid var(--coral);
  padding: 4px 6px;
  margin-top: 6px;
  font-size: .6875rem;
  line-height: 1.4;
}

.calendar-day.today>strong {
  background: var(--brand);
  color: white;
  border-radius: 50%;
  padding: 3px 7px;
}

.calendar-day.outside {
  background: #f6f6f5;
}

.capacity-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 20px;
}

.person {
  display: flex;
  align-items: center;
  gap: 12px;
}

.person h2 {
  margin: 0;
}

.person small {
  color: var(--muted);
  font-size: .75rem;
}

.workload {
  display: flex;
  gap: 40px;
  margin: 24px 0;
}

.workload strong {
  font-size: 1.75rem;
}

.workload small {
  display: block;
  font-size: .75rem;
  font-weight: 400;
  color: var(--muted);
}

.workload-item {
  display: block;
  font-size: .8125rem;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  margin: 18px 0;
}

legend {
  font-size: .875rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 7px 0;
  font-weight: 400;
}

.settings-form {
  max-width: 1000px;
}

.portal-jobs {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 16px;
}

.portal-job {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 18px;
  font-size: .875rem;
}

.portal-job p {
  color: var(--muted);
  font-size: .8125rem;
  margin: 8px 0;
}

.portal-request {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.portal-request summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  gap: 15px;
}

.portal-request summary small {
  display: block;
  color: var(--muted);
  font-size: .8125rem;
}

.portal-request>p,.portal-request>form {
  margin-top: 20px;
}

.download-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  font-size: .875rem;
}

.download-row small {
  display: block;
  color: var(--muted);
}

.pagination {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
}

.auth-brand {
  background: #626262;
  padding: 60px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.auth-brand img {
  width: 180px;
  height: 130px;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  margin-bottom: 100px;
}

.auth-brand>span {
  font-size: .75rem;
  letter-spacing: .17em;
}

.auth-brand h1 {
  margin: 25px 0;
  line-height: 1.15;
  letter-spacing: -.04em;
}

.auth-brand small {
  margin-top: auto;
  padding-top: 60px;
}

.auth-form {
  max-width: 480px;
  width: 100%;
  margin: auto;
  padding: 50px;
}

.auth-form h1 {
  margin-bottom: 12px;
}

.auth-form form {
  margin-top: 34px;
}

.auth-form .small {
  margin-top: 24px;
  font-size: .75rem;
}

.auth>.panel {
  margin: auto;
  max-width: 600px;
  grid-column: 1/-1;
}

.print-actions {
  display: flex;
  gap: 15px;
  max-width: 850px;
  margin: 25px auto;
}

.paper {
  background: white;
  max-width: 850px;
  margin: 25px auto;
  padding: 60px;
  border: 1px solid var(--line);
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.invoice-header img {
  width: 150px;
  height: 100px;
  object-fit: cover;
}

.invoice-header>div {
  text-align: right;
}

.invoice-address {
  display: flex;
  justify-content: space-between;
  margin: 40px 0;
}

.invoice-address small {
  font-size: .6875rem;
  color: var(--muted);
  letter-spacing: .1em;
}

.invoice-address h2 {
  margin: 8px 0;
}

.invoice-sums {
  margin: 25px 0 40px;
  text-align: right;
}

.invoice-sums strong {
  margin-left: 40px;
}

.paper footer {
  border-top: 1px solid var(--line);
  margin-top: 50px;
  padding-top: 15px;
  color: var(--muted);
  font-size: .8125rem;
}

.skip {
  position: fixed;
  left: -9999px;
  top: 10px;
  background: white;
  padding: 10px;
  z-index: 100;
}

.skip:focus {
  left: 10px;
}

.mobile-menu {
  display: none;
}

@media(min-width:1500px) {
.stage-summary {
  grid-template-columns: repeat(6,1fr);
}
}

@media(max-width:1200px) {
.app-shell {
  grid-template-columns: 218px minmax(0,1fr);
}

.main-shell main {
  padding: 28px 24px;
}

.topbar {
  padding: 0 24px;
}

.dashboard-grid {
  grid-template-columns: 1fr;
}

.dashboard-grid>aside {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 25px;
}

.dashboard-grid>aside>.section-heading {
  grid-column: 1/-1;
}

.metrics {
  gap: 12px;
}

.metric {
  padding: 17px;
}

.capacity-grid {
  grid-template-columns: repeat(2,1fr);
}

.detail-grid {
  grid-template-columns: 1fr;
}

.metric strong {
  font-size: 1.7rem;
}
}

@media(max-width:800px) {
.sidebar {
  display: none;
  position: fixed;
  z-index: 20;
  box-shadow: 0 0 0 100vmax #0005;
}

.app-shell.menu-open .sidebar {
  display: flex;
}

.mobile-menu {
  display: inline-flex;
  padding: 4px 8px;
}

.topbar>span {
  font-size: .75rem;
}

.top-right>span:first-child {
  display: none;
}

.page-heading {
  align-items: flex-start;
}

h1 {
  font-size: 1.65rem;
}

.metrics {
  grid-template-columns: repeat(2,minmax(0,1fr));
}

.metric strong {
  font-size: 1.6rem;
}

.dashboard-grid>aside {
  display: block;
}

.fields,.details {
  grid-template-columns: 1fr;
}

.capacity-grid,.portal-jobs {
  grid-template-columns: 1fr;
}

.wide {
  grid-column: auto;
}

.panel {
  padding: 18px;
}

.stage-summary {
  grid-template-columns: repeat(2,1fr);
}

.auth {
  display: block;
}

.auth-brand {
  padding: 25px;
}

.auth-brand img {
  width: 100px;
  height: 70px;
  margin-bottom: 15px;
}

.auth-brand h1 {
  margin: 10px 0;
}

.auth-brand p,.auth-brand small,.auth-brand>span {
  display: none;
}

.auth-form {
  padding: 35px 25px;
}

.detail-heading {
  display: block;
}

.detail-heading .toolbar-actions {
  margin-top: 20px;
}

.footer {
  gap: 20px;
}

.search-form {
  width: 100%;
}

.search-label {
  flex: 1;
}

.search-label input {
  width: 100%;
}

.paper {
  padding: 25px;
  margin: 15px;
}

.print-actions {
  margin: 15px;
}

.invoice-header img {
  width: 100px;
  height: 70px;
}

.eyebrow {
  font-size: .625rem;
}
}

@media print {
@page {
size:A4;margin:16mm
}

body {
  background: white;
}

.print-actions {
  display: none;
}

.paper {
  margin: 0;
  padding: 0;
  border: 0;
  max-width: none;
  box-shadow: none;
}

.paper footer {
  position: static;
}

a {
  color: inherit;
}

.invoice-header img {
  print-color-adjust: exact;
}

.badge {
  border: 1px solid #ccc;
}

tr {
  break-inside: avoid;
}

.invoice-address {
  break-inside: avoid;
}
}

:root {
  --brand: #b93840;
  --ink: #2f2f2d;
  --muted: #6e6e68;
  --line: #e3e3e0;
  --bg: #fff;
  --soft: #f1f1ef;
  --shadow: none;
}

body {
  border-top: 3px solid #626262;
  background: #fff;
}

.app-shell {
  grid-template-columns: 200px minmax(0,1fr);
  min-height: calc(100vh - 3px);
}

.sidebar {
  background: #f3f3f3;
  height: calc(100vh - 3px);
  border-right: 1px solid #e3e3e3;
  top: 0;
}

.brand small {
  display: none;
}

.workspace-label {
  display: none;
}

.nav-link {
  font-weight: 400;
}

.nav-link svg,.recent-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.nav-link.active {
  background: white;
}

.nav-link:hover {
  background: #fff;
}

.avatar {
  width: 28px;
  height: 28px;
  background: #e6eeee;
  border-color: transparent;
}

.avatar.mini {
  width: 24px;
  height: 24px;
}

.recent-link {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.3;
}

.recent-link>span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.recent-link small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar {
  font-size: 12px;
}

.context-title {
  flex: 1;
  min-width: 150px;
  overflow: hidden;
}

.context-title strong {
  display: block;
  color: #626262;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-title small {
  display: block;
}

.global-search {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #e3e3e3;
  background: #fbfbfb;
  width: 42%;
}

.global-search svg {
  width: 14px;
  color: #666;
  flex-shrink: 0;
}

.global-search input {
  border: 0;
  background: transparent;
  margin: 0;
  padding: 6px 0;
  min-width: 0;
}

.global-search button {
  padding: 2px 5px;
  border: 0;
  background: transparent;
  color: #626262;
  min-height: 25px;
}

.global-search kbd {
  font: 10px Arial;
  white-space: nowrap;
  border: 1px solid #eee;
  background: white;
}

.top-right {
  gap: 8px;
}

.main-shell main {
  max-width: none;
}

.panel,.metric,.work-card {
  box-shadow: none;
  border-radius: 4px;
}

.metric.attention strong {
  color: #b93333;
}

.button.primary,button.primary {
  background: #b93840;
  border-color: #b93840;
}

.button.primary:hover,button.primary:hover {
  background: #a42f37;
  border-color: #a42f37;
}

.text-button {
  min-height: 0;
  padding: 6px 0;
  background: transparent;
}

.fields label,label {
  font-size: 13px;
}

.stage-summary a,.soft-box {
  border-radius: 3px;
}

.kanban-column {
  background: #f1f1ef;
}

.footer {
  background: #fff;
}

.demo-strip {
  margin: 0 0 16px;
  border-radius: 2px;
  padding: 6px 10px;
}

.main-shell main.job-workspace {
  padding: 0;
}

.job-workspace>.demo-strip,.job-workspace>.notice {
  margin: 10px 16px;
}

.work-inner {
  width: calc(100% - 48px);
}

.work-banner {
  background: linear-gradient(#fafafa,#f8f8f8);
  border-bottom: 1px solid #ddd;
}

.work-meta {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  margin: 0;
}

.work-meta>div {
  min-width: 72px;
  max-width: 220px;
}

.work-meta dt {
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 4px;
}

.work-meta dd {
  margin: 0;
  line-height: 1.5;
  color: #111;
}

.work-meta a {
  color: #626262;
}

.work-meta .meta-due {
  display: flex;
  gap: 5px;
  align-items: center;
}

.meta-due svg {
  width: 16px;
  height: 16px;
  color: #707780;
}

.meta-progress {
  display: flex;
  gap: 7px;
  align-items: center;
}

.meta-progress progress {
  width: 37px;
  height: 5px;
  margin: 0;
  accent-color: #64716e;
}

.meta-progress progress::-webkit-progress-value {
  background: #64716e;
}

.work-tabs {
  display: flex;
  overflow-x: auto;
}

.work-tabs a {
  min-width: 96px;
  text-align: center;
  border: 1px solid transparent;
  border-bottom: 0;
  background: #e8e8e8;
  border-radius: 4px 4px 0 0;
  color: #444;
  white-space: nowrap;
  margin-top: 1px;
}

.work-tabs a:hover {
  background: #e0e0e0;
  text-decoration: none;
}

.work-tabs a.current {
  background: white;
  border-color: #ddd;
}

.work-body {
  padding-top: 20px;
  padding-bottom: 60px;
  min-height: 65vh;
}

.timeline-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 23px;
}

.note-composer {
  max-width: 650px;
}

.note-composer summary {
  list-style: none;
  display: inline-flex;
  cursor: pointer;
}

.note-composer summary::-webkit-details-marker {
  display: none;
}

.note-composer[open] {
  flex-basis: 100%;
  width: 650px;
}

.note-composer form {
  margin-top: 12px;
  border: 1px solid #ddd;
  padding: 16px;
  background: #fafafa;
  border-radius: 3px;
}

.note-composer form .button {
  margin-left: 5px;
}

.stage-picker {
  position: relative;
}

.stage-picker summary {
  list-style: none;
  cursor: pointer;
}

.stage-picker summary::-webkit-details-marker {
  display: none;
}

.stage-picker form {
  position: absolute;
  left: 0;
  top: 25px;
  width: 260px;
  background: white;
  border: 1px solid #ccc;
  z-index: 30;
  max-width: 80vw;
}

.stage-picker small {
  display: block;
  color: #777;
  font-size: 11px;
  margin-top: 10px;
}

.stage-picker label {
  font-weight: 400;
}

.timeline-day {
  margin: 24px 0 13px;
}

.timeline-event {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid #ccc;
  background: #ededed;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 8px;
  min-height: 44px;
}

.timeline-event header {
  color: #626262;
}

.timeline-event header strong {
  font-weight: 500;
  color: #626262;
}

.timeline-event time {
  margin-left: 8px;
  color: #626262;
}

.timeline-event p {
  margin: 3px 0 0;
  line-height: 1.55;
}

.event-avatar {
  background: #2bb398;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.note-event {
  background: white;
  border-color: #e3e3e0;
  min-width: min(560px,100%);
  max-width: 760px;
}

.note-event p {
  color: #626262;
  margin-top: 8px;
}

.note-record-link {
  display: inline-block;
  font-size: 11px;
  margin-top: 8px;
}

.timeline-empty {
  padding: 25px 0;
  color: #727980;
}

.timeline-empty h2 {
  font-weight: 400;
  color: #626262;
}

.timeline-empty p {
  font-size: 13px;
}

.timeline-empty small {
  font-size: 12px;
}

.task-line {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #ddd;
  padding: 14px 8px;
}

.task-status {
  color: #999;
  font-size: 20px;
  line-height: 1;
}

.task-status.done {
  color: #258869;
}

.task-name {
  flex: 1;
  font-size: 14px;
}

.task-line>span:not(.task-status) {
  min-width: 65px;
}

.work-section {
  margin-bottom: 32px;
}

.work-details {
  max-width: 820px;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 25px 35px;
}

.work-details dd {
  font-size: 14px;
}

.work-details dt {
  font-size: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.auth-brand {
  background: #f1f1ef;
  color: #626262;
}

.auth-brand h1 {
  font-size: 34px;
}

.auth-brand p {
  color: #626262;
}

.auth-brand>span {
  color: #626262;
}

.auth-brand small {
  color: #626262;
}

@media(max-width:1100px) {
.work-meta {
  gap: 15px 20px;
}

.work-inner {
  width: calc(100% - 36px);
}

.task-line {
  flex-wrap: wrap;
}

.task-name {
  flex-basis: 45%;
}

.global-search {
  width: 45%;
}

.global-search kbd {
  display: none;
}
}

@media(max-width:800px) {
.topbar {
  min-height: 55px;
  flex-wrap: wrap;
}

.context-title {
  min-width: 120px;
}

.global-search {
  order: 4;
  width: 100%;
}

.top-right {
  margin-left: auto;
}

.work-inner {
  width: calc(100% - 28px);
}

.work-meta {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
}

.work-meta>div {
  min-width: 0;
  max-width: none;
}

.work-meta dd {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.work-tabs a {
  padding: 11px 13px;
  min-width: 85px;
}

.work-details {
  grid-template-columns: repeat(2,minmax(0,1fr));
}

.timeline-event {
  width: 100%;
  padding: 11px;
}

.note-event {
  min-width: 0;
}

.note-composer[open] {
  width: 100%;
}

.task-name {
  flex-basis: 70%;
}

.task-line {
  gap: 10px;
}

.task-line>span:not(.task-status) {
  min-width: 0;
}

.stage-picker form {
  left: auto;
  right: 0;
  width: 230px;
}

.work-body {
  padding-top: 18px;
}

.footer {
  padding: 14px 16px;
}

.auth-brand h1 {
  font-size: 25px;
}
}

@media print {
body {
  border: 0;
}

.paper {
  border: 0;
}

.work-banner {
  background: white;
}
}

.inline-task[hidden],.inline-task-error[hidden],.work-body>.empty[hidden] {
  display: none;
}

.inline-task {
  display: flex;
  align-items: end;
  gap: 12px;
  border: 1px solid #e3e3e0;
  background: #f6f6f5;
  margin-top: 10px;
}

.inline-task label {
  font-size: 11px;
  margin: 0;
  min-width: 110px;
}

.inline-task-title {
  flex: 1;
}

.inline-task input,.inline-task select {
  margin-top: 6px;
  font-size: 13px;
}

.inline-task-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  padding-bottom: 3px;
}

.inline-task-error {
  color: #b42318;
  flex-basis: 100%;
  margin: 0;
}

.inline-task {
  flex-wrap: wrap;
}

@media(max-width:800px) {
.inline-task-title {
  flex-basis: 80%;
}

.inline-task label {
  flex-grow: 1;
}

.inline-task-actions {
  width: 100%;
}
}

.main-shell main.mail-workspace {
  padding: 0;
}

.mailbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e3e3e0;
}

.mailbox-toolbar h1 {
  font-size: 18px;
  margin: 0;
}

.mailbox-folders {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 24px;
  border-bottom: 1px solid #e3e3e0;
}

.mailbox-folders a {
  padding: 16px 0;
  color: #626262;
  border-bottom: 2px solid transparent;
}

.mailbox-folders a[aria-current] {
  color: #b93840;
  border-color: #b93840;
  font-weight: 700;
}

.mailbox-folders small {
  margin-left: auto;
  color: #626262;
}

.mailbox-split {
  display: grid;
  grid-template-columns: minmax(260px,32%) minmax(0,1fr);
  min-height: 70vh;
}

.mailbox-list {
  border-right: 1px solid #e3e3e0;
  max-height: calc(100vh - 180px);
  overflow: auto;
}

.mailbox-search {
  display: flex;
  gap: 6px;
  padding: 12px;
  border-bottom: 1px solid #f1f1ef;
}

.mailbox-search input {
  min-width: 0;
}

.mailbox-item {
  display: flex;
  gap: 10px;
  padding: 16px 12px;
  border-bottom: 1px solid #e3e3e0;
  color: #626262;
}

.mailbox-item>div {
  min-width: 0;
  flex: 1;
}

.mailbox-item:hover {
  background: #f6f6f5;
}

.mailbox-item.current {
  background: #f1f1ef;
}

.mail-avatar {
  background: #b32233;
  color: white;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 600;
}

.mail-item-top {
  display: flex;
  gap: 10px;
  margin-bottom: 5px;
}

.mail-item-top strong {
  font-size: 12px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.mailbox-item b {
  font-size: 13px;
  display: block;
}

.mailbox-item p {
  margin: 6px 0;
  color: #626262;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mailbox-item small {
  color: #626262;
  font-size: 11px;
}

.mail-comment-preview {
  background: #e3e3e0;
  padding: 8px 10px;
  border-radius: 12px;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
}

.mailbox-reader {
  min-width: 0;
  max-height: calc(100vh - 180px);
  overflow: auto;
  scroll-behavior: smooth;
}

.mail-reader-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid #ddd;
  padding: 14px 18px;
}

.mail-reader-actions .button {
  background: #f6f6f5;
}

.mail-linker {
  margin-left: auto;
  font-size: 12px;
}

.mail-linker summary {
  cursor: pointer;
  color: #b93840;
}

.mail-linker form {
  padding: 12px;
  min-width: 230px;
}

.mail-message {
  padding: 22px 24px;
}

.mail-message h2 {
  font-size: 21px;
  margin: 6px 0 24px;
}

.mail-message-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #e3e3e0;
  padding-top: 18px;
  font-size: 12px;
}

.mail-message-meta small {
  display: block;
  margin-top: 5px;
  color: #626262;
}

.mail-message-meta time {
  margin-left: auto;
  font-size: 11px;
}

.mail-message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.75;
  padding: 26px 0;
  min-height: 120px;
  font-size: 14px;
}

.mail-delivery {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  background: #f6f6f5;
  margin: 16px 0;
  line-height: 1.6;
}

.mail-delivery form {
  margin: 0;
}

.mail-comments {
  padding: 20px 24px;
  border-top: 1px solid #ddd;
}

.mail-comments h3 {
  margin: 0;
}

.mail-comments>.muted {
  font-size: 12px;
}

.mail-comment {
  display: flex;
  gap: 12px;
  margin: 20px 0;
}

.mail-comment .mail-avatar {
  background: #b93840;
}

.mail-comment-bubble {
  background: #f1f1ef;
  border: 1px solid #e3e3e0;
  border-radius: 14px;
  padding: 14px 16px;
  max-width: 100%;
  min-width: 0;
}

.mail-comment-bubble time {
  font-size: 10px;
  color: #626262;
  margin-left: 10px;
}

.mail-comment-bubble p {
  overflow-wrap: anywhere;
}

.mail-tags span {
  font-size: 12px;
  background: #e3e3e0;
  padding: 2px 4px;
}

.mail-comment-form {
  margin-top: 24px;
}

.mail-comment-form>details {
  margin: 10px 0 16px;
}

.mail-comment-form summary {
  cursor: pointer;
  color: #b93840;
  font-size: 12px;
}

.mail-tag-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px;
  background: #f6f6f5;
  margin: 10px 0;
}

.mail-tag-choices .check {
  font-size: 12px;
  margin: 0;
}

.mail-compose {
  padding: 24px;
  border-bottom: 1px solid #ddd;
  background: #f6f6f5;
}

.mail-compose h2 {
  font-size: 18px;
}

.mail-compose textarea {
  min-height: 180px;
}

.mail-empty {
  padding: 16px;
}

@media(max-width:900px) {
.mailbox-split {
  grid-template-columns: 1fr;
}

.mailbox-list {
  max-height: 260px;
  border-bottom: 1px solid #ccc;
  border-right: 0;
}

.mailbox-reader {
  max-height: none;
}

.mailbox-folders {
  gap: 14px;
  padding: 0 14px;
  flex-wrap: wrap;
}

.mailbox-folders small {
  display: none;
}

.mailbox-toolbar {
  padding: 14px;
}

.mail-message,.mail-comments {
  padding: 18px;
}

.mail-message-meta {
  flex-wrap: wrap;
}

.mail-message-meta time {
  margin-left: 0;
}

.mail-linker {
  margin-left: 0;
}
}

@media print {
.mailbox-list,.mailbox-toolbar,.mailbox-folders,.mail-reader-actions,.mail-compose,.mail-comment-form {
  display: none;
}

.mailbox-split {
  display: block;
}

.mailbox-reader {
  max-height: none;
  overflow: visible;
}
}

.client-tab-header {
  background: #fafafa;
  border-bottom: 1px solid #dedede;
}

.client-tab-header h1 {
  display: flex;
  align-items: center;
  margin: 0;
}

.client-tab-body .work-tabs {
  margin: 0;
}

.client-event {
  border: 1px solid #e3e3e0;
  margin-top: 14px;
  background: white;
}

.client-event-meta {
  display: flex;
  margin-bottom: 8px;
}

.client-event p {
  margin-bottom: 0;
}

.client-details {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
}

.client-details div {
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
}

.client-details dd {
  overflow-wrap: anywhere;
}

.intake-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0 30px;
}

.intake-cards>a {
  display: block;
  color: inherit;
}

.intake-cards span {
  color: #b93840;
}

.intake-cards h3 {
  font-size: 15px;
}

.invoice-metrics {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 14px;
  margin: 18px 0 28px;
}

.task-row {
  border: 1px solid #e3e3e0;
  margin: 8px 0;
  border-radius: 3px;
}

.task-row .task-line {
  border-bottom: 0;
  margin: 0;
}

.task-toggle {
  margin: 0;
  display: flex;
  align-items: center;
}

.task-toggle input[type=checkbox] {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: #b93840;
}

.task-discussion {
  border-top: 1px solid #f1f1ef;
}

.task-discussion>summary {
  cursor: pointer;
}

.task-comments {
  padding: 14px;
}

.task-comments .mail-comment-bubble {
  margin-bottom: 12px;
}

.task-comments form>details {
  margin-bottom: 12px;
}

.task-comments textarea {
  min-height: 75px;
}

.task-comments .mail-comment-bubble p {
  font-size: 12px;
}

.mail-workspace .mailbox-split {
  grid-template-columns: minmax(245px,28%) minmax(0,1fr);
  min-height: 72vh;
}

.mail-workspace .mailbox-search input,.mail-workspace button,.mail-workspace .button {
  font-size: 11px;
  padding: 7px 10px;
  min-height: 30px;
}

.mail-workspace .mailbox-item p,.mail-workspace .mail-item-top strong {
  font-size: 11px;
}

.mail-workspace .mail-message-meta {
  padding-top: 12px;
}

.mail-workspace .mail-comment {
  margin: 14px 0;
  gap: 9px;
}

.mail-workspace .mailbox-list,.mail-workspace .mailbox-reader {
  max-height: calc(100vh - 145px);
}

@media(max-width:900px) {
.client-details {
  grid-template-columns: 1fr 1fr;
}

.invoice-metrics {
  grid-template-columns: 1fr 1fr;
}

.mail-workspace .mailbox-split {
  grid-template-columns: 1fr;
}

.mail-workspace .mailbox-list {
  max-height: 220px;
}

.mail-workspace .mailbox-reader {
  max-height: none;
}

.client-workspace .work-tabs {
  overflow: auto;
}

.client-workspace .work-tabs a {
  min-width: 90px;
}

.client-tab-body {
  padding: 18px 8px;
}
}

@media(max-width:550px) {
.client-details,.intake-cards {
  grid-template-columns: 1fr;
}

.invoice-metrics .metric strong {
  font-size: 18px;
}

.client-tab-header {
  padding: 0 6px;
}

.client-tab-header h1 {
  font-size: 15px;
}

.client-event {
  padding: 12px;
}

.client-event-meta {
  flex-wrap: wrap;
  gap: 6px;
}
}

:root {
  color: #626262;
}

body,input,textarea,select,button {
  font-family: Arial,"Segoe UI",sans-serif;
  font-size: 14px;
}

body {
  line-height: 1.45;
}

.page-heading {
  margin-bottom: 18px;
}

.eyebrow {
  display: none;
}

.sidebar {
  font-size: 13px;
}

button,.button {
  font-size: 13px;
  border-radius: 4px;
  min-height: 32px;
  padding: 7px 12px;
}

.work-meta dd {
  font-size: 13px;
}

.work-tabs a {
  font-size: 13px;
  padding: 14px 24px;
}

.mail-workspace {
  font-size: 13px;
}

.mail-workspace h1,.mail-workspace h2 {
  font-size: 19px;
}

.mail-comment-bubble {
  font-size: 13px;
}

.mail-comment-bubble header {
  font-size: 12px;
}

.mail-comment-bubble p {
  margin: 5px 0;
}

.mail-avatar {
  width: 28px;
  height: 28px;
  font-size: 13px;
}

.checklist-section {
  border: 1px solid #e3e3e0;
  background: white;
  overflow: hidden;
}

.checklist-section>summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.checklist-section>summary>span:before {
  content: '▾';
  color: #626262;
  display: inline-block;
  margin-right: 10px;
}

.checklist-section:not([open])>summary>span:before {
  content: '▸';
}

.checklist-section>summary .button {
  background: #f1f1ef;
  border: 0;
  font-weight: 400;
}

.checklist-section>.task-row {
  border: 0;
  border-top: 1px solid #f1f1ef;
  border-radius: 0;
  margin: 0;
}

.task-line {
  font-size: 13px;
  grid-template-columns: 24px minmax(200px,1fr) 100px 130px 110px 32px;
  gap: 12px;
}

.task-name {
  color: #626262;
  font-weight: 500;
}

.task-name small {
  display: block;
  white-space: pre-wrap;
  margin-top: 4px;
}

.task-toggle input {
  width: 17px;
  height: 17px;
  accent-color: #b93840;
}

.is-complete {
  background: #f6f6f7;
}

.is-complete .task-name {
  text-decoration: line-through;
}

.task-discussion {
  font-size: 12px;
}

.task-discussion>summary {
  cursor: pointer;
}

.task-comments {
  max-width: 740px;
}

.task-comments .mail-comment-bubble {
  background: #f1f1ef;
  border: 1px solid #f1f1ef;
  padding: 10px 14px;
  margin: 10px 0;
}

.task-comments form {
  padding: 12px 0;
}

.inline-task {
  flex-wrap: wrap;
}

.section-content {
  padding: 0 18px 14px;
}

.request-label {
  background: #626262;
  border-radius: 3px;
  margin-right: 10px;
}

.request-task {
  display: flex;
  gap: 24px;
  align-items: center;
  border-top: 1px solid #f1f1ef;
}

.request-task>a {
  flex: 1;
}

.week-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 270px;
}

.week-counts {
  display: grid;
  grid-template-columns: repeat(5,1fr);
}

.week-counts a {
  border: 1px solid #e3e3e0;
  text-align: center;
  background: white;
}

.week-counts strong {
  display: block;
  line-height: 1.4;
}

.week-counts .selected {
  background: #b93840;
  border-color: #b93840;
}

.week-filters {
  display: flex;
  margin: 18px 0 8px;
  flex-wrap: wrap;
}

.week-filters label {
  font-size: 11px;
  flex: 1;
  min-width: 130px;
}

.week-filters input,.week-filters select {
  margin-top: 4px;
  min-height: 34px;
}

.week-group {
  background: #f1f1ef;
}

.week-group summary {
  cursor: pointer;
}

.week-row {
  display: grid;
  grid-template-columns: 30px minmax(170px,1.4fr) minmax(120px,1fr) minmax(100px,1fr);
  align-items: center;
  border: 1px solid #e3e3e0;
  background: white;
  color: #626262;
  font-size: 13px;
}

.week-row:hover {
  border-color: #d4d4cf;
}

.week-row small,.agenda-item small {
  display: block;
  margin-top: 3px;
}

.client-initial {
  background: #b63c48;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
}

.week-row progress {
  display: block;
  width: 95%;
  height: 4px;
  margin-top: 8px;
  accent-color: #b93840;
}

.overdue {
  color: #ce3347;
}

.week-agenda {
  border-left: 1px solid #e3e3e0;
  padding-left: 20px;
}

.week-agenda form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  font-size: 12px;
}

.agenda-item {
  display: block;
  border-top: 1px solid #e3e3e0;
  color: #626262;
  font-size: 13px;
}

.agenda-item .badge {
  margin-top: 8px;
}

.record-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(840px,94vw);
  height: 100dvh;
  max-height: 100dvh;
  border: 0;
  border-left: 1px solid #e3e3e0;
  padding: 0;
  background: #f6f6f5;
  color: #626262;
}

.record-drawer::backdrop {
  background: #62626255;
}

.record-drawer>header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  border-bottom: 1px solid #e3e3e0;
  position: sticky;
  top: 0;
  z-index: 2;
}

.drawer-body .panel {
  box-shadow: none;
}

.drawer-body .fields {
  grid-template-columns: repeat(2,minmax(0,1fr));
}

.drawer-feedback:not(:empty) {
  background: #fff4dc;
}

.drawer-body .details {
  grid-template-columns: repeat(2,minmax(0,1fr));
}

.drawer-body .page-heading {
  display: none;
}

@media(max-width:1100px) {
.week-layout {
  grid-template-columns: minmax(0,1fr);
}

.week-agenda {
  border-left: 0;
  border-top: 1px solid #ddd;
  padding: 20px 0;
}

.task-line {
  grid-template-columns: 24px minmax(140px,1fr) 85px 100px;
}

.task-line>span:nth-last-child(2) {
  grid-column: 2;
}

.work-inner {
  margin: 0 18px;
}
}

@media(max-width:650px) {
.week-counts {
  grid-template-columns: repeat(3,1fr);
}

.week-row {
  grid-template-columns: 26px 1fr;
}

.week-row>span:nth-child(n+3) {
  grid-column: 2;
}

.drawer-body .fields,.drawer-body .details {
  grid-template-columns: 1fr;
}

.client-tab-body {
  padding: 18px 12px;
}

.task-line {
  grid-template-columns: 24px 1fr;
}

.task-line>*:nth-child(n+3) {
  grid-column: 2;
}

.checklist-section>summary {
  padding: 12px;
}

.request-task {
  flex-wrap: wrap;
}
}

.task-row .task-line {
  display: grid;
  padding: 0;
}

.task-line>span {
  min-width: 0;
}

.task-discussion {
  border-top: 0;
}

.task-preview {
  margin: 6px 0 0 36px;
  max-width: 680px;
  background: #f1f1ef;
  border: 1px solid #f1f1ef;
}

.task-row:has(.task-discussion[open]) .task-preview {
  display: none;
}

.week-layout .week-counts a {
  font-size: 13px;
}

main:has(.week-layout)>.page-heading {
  display: none;
}

.week-row progress::-webkit-progress-bar {
  background: #f1f1ef;
  border-radius: 4px;
}

.week-row progress::-webkit-progress-value {
  background: #b93840;
  border-radius: 4px;
}

.week-row progress::-moz-progress-bar {
  background: #b93840;
}

.portal-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid #e3e3e0;
  margin: 0 0 24px;
  padding: 0;
}

.portal-tabs a {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: #f1f1ef;
  color: #626262;
  border: 1px solid #e3e3e0;
  border-radius: 6px 6px 0 0;
  text-decoration: none;
}

.portal-tabs a:hover {
  background: #f1f1ef;
}

.portal-tabs a.current {
  background: #fff;
  color: #b93840;
  border-bottom-color: #fff;
  margin-bottom: -1px;
  font-weight: 700;
}

.portal-tab-overview .portal-requests,.portal-tab-overview .portal-documents,.portal-tab-overview .portal-support,.portal-tab-requests .portal-overview,.portal-tab-requests .portal-documents,.portal-tab-requests .portal-support,.portal-tab-documents .portal-overview,.portal-tab-documents .portal-requests,.portal-tab-documents .portal-support,.portal-tab-support .portal-overview,.portal-tab-support .portal-requests,.portal-tab-support .portal-documents {
  display: none;
}

.portal-support form {
  max-width: 720px;
}

:root {
  --brand: #b93840;
  --coral: #b93840;
  --ink: #2f2f2d;
  --muted: #6e6e68;
  --line: #f1f1ef;
  --bg: #fff;
  --soft: #f6f6f5;
  --shadow: 0 2px 8px #a42f3706;
  font-family: 'Source Sans 3','Segoe UI',Arial,sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

body {
  border-top: 0;
  background: #fff;
  color: var(--ink);
  font-family: 'Source Sans 3','Segoe UI',Arial,sans-serif;
  -webkit-font-smoothing: antialiased;
}

body,input,select,textarea,button {
  font-family: 'Source Sans 3','Segoe UI',Arial,sans-serif;
  font-size: 14px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #e3e3e0 transparent;
}

a {
  color: #b93840;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

a,button,summary,input,select,textarea {
  transition: background-color 140ms ease,border-color 140ms ease,color 140ms ease,box-shadow 140ms ease;
}

:focus-visible {
  outline: 2px solid #b93840;
  outline-offset: 3px;
}

a:focus:not(:focus-visible),button:focus:not(:focus-visible),summary:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

html[data-input="pointer"] a:focus,html[data-input="pointer"] button:focus,html[data-input="pointer"] summary:focus {
  outline: none;
}

input:focus,select:focus,textarea:focus {
  outline: none;
  border-color: #d4d4cf;
  box-shadow: 0 0 0 3px #b938400c;
}

input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline: 2px solid #b93840;
  outline-offset: 1px;
}

.app-shell {
  grid-template-columns: 216px minmax(0,1fr);
}

.sidebar {
  background: #f6f6f5;
  border-right: 1px solid var(--line);
  height: 100vh;
  top: 0;
}

.brand {
  padding: 24px 18px 22px;
  font-size: 14px;
  letter-spacing: -.025em;
  text-transform: none;
  font-weight: 650;
  gap: 10px;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.sidebar nav {
  padding: 0 12px 16px;
}

.nav-heading {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .085em;
  color: #6c7179;
  padding: 20px 10px 8px;
}

.nav-link {
  font-size: 13px;
  min-height: 35px;
  padding: 8px 10px;
  border-radius: 6px;
  margin: 2px 0;
  gap: 10px;
  color: #626262;
}

.nav-link svg {
  width: 16px;
  height: 16px;
  color: #6c727b;
}

.nav-link:hover {
  background: #f1f1ef;
  color: #626262;
}

.nav-link.active {
  background: #f1f1ef;
  color: #a42f37;
  font-weight: 600;
}

.nav-link.active svg {
  color: #b93840;
}

.recent-link {
  padding: 8px 10px;
  font-size: 12px;
  border-radius: 6px;
  color: #626262;
}

.recent-link:hover {
  background: #f1f1ef;
}

.recent-link small {
  font-size: 11px;
  max-width: 160px;
  color: #6c727a;
}

.sidebar-bottom {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}

.user-link {
  font-size: 13px;
}

.user-link small {
  font-size: 11px;
}

.avatar {
  background: #f1f1ef;
  color: #626262;
  border-radius: 8px;
  font-size: 12px;
}

.topbar {
  height: 60px;
  min-height: 60px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  gap: 24px;
}

.context-title strong {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.015em;
}

.context-title small {
  font-size: 12px;
  color: #626262;
  margin-top: 2px;
}

.global-search {
  border: 1px solid #f1f1ef;
  background: #f6f6f5;
  border-radius: 7px;
  max-width: 460px;
  min-height: 34px;
  padding: 0 10px;
}

.global-search input {
  font-size: 12px;
  box-shadow: none;
  outline: none;
}

.global-search:focus-within {
  border-color: #e3e3e0;
  background: white;
}

.global-search button {
  font-size: 11px;
}

.global-search kbd {
  color: #6b7179;
  border-color: #f1f1ef;
  border-radius: 4px;
  padding: 1px 5px;
}

.timezone {
  color: #626262;
  font-size: 10px;
}

.footer {
  color: #6c7179;
  font-size: 11px;
  border-top: 1px solid #f1f1ef;
  padding: 16px 30px;
}

.main-shell main {
  padding: 28px 32px;
}

.page-heading {
  margin: 0 0 24px;
}

h1 {
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -.035em;
}

h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.018em;
}

h3 {
  font-size: 14px;
  font-weight: 600;
}

.intro {
  font-size: 14px;
  color: #626262;
  margin-bottom: 24px;
}

.muted {
  color: var(--muted);
}

.button,button {
  border: 1px solid #f1f1ef;
  border-radius: 6px;
  background: #fff;
  color: #626262;
  padding: 7px 12px;
  min-height: 33px;
  font-size: 12px;
  font-weight: 550;
  box-shadow: 0 1px 2px #a42f3704;
  gap: 6px;
}

.button:hover,button:hover {
  background: #f6f6f5;
  border-color: #e3e3e0;
  color: #626262;
}

.button.primary,button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px #b9384020;
}

.button.primary:hover,button.primary:hover {
  background: #b93840;
  border-color: #b93840;
}

.button.selected {
  background: #f6f6f5;
  border-color: #f1f1ef;
  color: #b93840;
}

button:disabled {
  opacity: .55;
  cursor: wait;
}

.text-button {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #626262;
  font-size: 12px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading a {
  font-size: 12px;
  font-weight: 500;
}

input,select,textarea {
  border-color: #f1f1ef;
  border-radius: 6px;
  padding: 9px 11px;
  font-size: 13px;
  color: #626262;
}

label,.fields label {
  font-size: 12px;
  color: #626262;
  font-weight: 500;
}

label small {
  font-size: 11px;
}

textarea {
  line-height: 1.65;
}

input[type=checkbox] {
  accent-color: #b93840;
  border-radius: 4px;
}

.form-actions {
  border-color: var(--line);
}

.form-panel {
  border: 0;
  padding: 0;
  margin: 12px 0;
}

.fields {
  gap: 8px 22px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: none;
  padding: 22px;
}

.metrics {
  gap: 16px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
  padding: 20px 22px;
}

.metric strong {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -.04em;
  color: #626262;
}

.metric small {
  font-size: 11px;
  color: #626262;
}

.stage-summary a {
  border: 0;
  background: #f6f6f5;
  border-radius: 7px;
  padding: 14px;
}

.stage-summary strong {
  font-weight: 500;
}

.stage-summary a:hover {
  background: #f1f1ef;
}

.soft-box {
  border: 0;
  background: #f6f6f5;
  border-radius: 8px;
}

.attention-item {
  border-color: var(--line);
}

.attention-icon {
  background: #f6f6f5;
  color: #b93840;
}

table {
  font-size: 13px;
}

th {
  background: #f6f6f5;
  color: #626262;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .015em;
  border-color: var(--line);
}

td,th {
  padding: 13px 16px;
}

td {
  border-color: #f1f1ef;
  color: #626262;
}

td small {
  font-size: 11px;
  color: #6b727b;
}

.record-title {
  font-weight: 500;
  color: #626262;
}

tbody tr:hover {
  background: #f6f6f5;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.badge {
  border-radius: 5px;
  background: #f1f1ef;
  color: #626262;
  font-size: 11px;
  padding: 2px 7px;
  font-weight: 500;
}

.badge.green {
  background: #edf7f2;
  color: #477d66;
}

.badge.amber {
  background: #fbf5e8;
  color: #856f3b;
}

.badge.red {
  background: #fff0f0;
  color: #a65963;
}

.count {
  font-size: 11px;
  color: #626262;
  background: #f1f1ef;
  padding: 2px 6px;
}

.kanban-column {
  background: #f6f6f5;
  border-radius: 8px;
}

.work-card {
  border: 1px solid #f1f1ef;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 2px 4px #a42f3703;
}

.work-card:hover {
  border-color: #e3e3e0;
  box-shadow: 0 3px 10px #a42f3710;
}

.client-workspace {
  margin: -12px -12px 0;
}

.client-tab-header {
  background: white;
  padding: 0 12px;
  border-color: var(--line);
}

.client-tab-header h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.035em;
  padding: 16px 0 20px;
  gap: 12px;
}

.client-tab-header .mail-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f1f1ef;
  color: #626262;
  font-size: 15px;
}

.client-tab-body {
  padding: 26px 12px;
}

.client-tab-body h2 {
  font-size: 16px;
}

.client-details {
  gap: 26px 40px;
}

.client-details dt,.work-details dt {
  font-size: 11px;
  color: #6b717a;
}

.client-details dd,.work-details dd {
  font-size: 13px;
  color: #626262;
}

.client-details div {
  border-bottom: 1px solid #f1f1ef;
  padding-bottom: 18px;
}

.client-event {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 20px 6px;
  margin: 0;
  background: transparent;
}

.client-event:hover {
  background: #f6f6f5;
}

.client-event-meta {
  font-size: 11px;
  gap: 14px;
  color: #626262;
}

.client-event>a {
  color: #626262;
  font-size: 13px;
}

.client-event>a strong {
  font-weight: 550;
}

.client-event p {
  font-size: 13px;
  line-height: 1.65;
  color: #626262;
}

.intake-cards .panel {
  padding: 20px;
  border-radius: 9px;
  background: #f6f6f5;
}

.intake-cards .panel:hover {
  border-color: #e3e3e0;
  background: #f6f6f5;
}

.intake-cards p {
  font-size: 13px;
  color: #626262;
}

.intake-cards span {
  font-size: 12px;
}

.invoice-metrics .metric {
  border: 0;
  background: #f6f6f5;
  padding: 18px;
}

.invoice-metrics .metric strong {
  font-size: 24px;
  font-weight: 500;
}

.work-banner {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.work-inner {
  width: auto;
  max-width: none;
  margin: 0 30px;
}

.work-meta {
  padding: 22px 0;
  gap: 20px 28px;
}

.work-meta dt {
  font-size: 10px;
  letter-spacing: .05em;
  color: #626262;
}

.work-meta dd,.work-meta a {
  font-size: 13px;
  color: #626262;
}

.work-tabs {
  gap: 24px;
  padding: 0;
  overflow-x: auto;
}

.work-tabs a,.client-workspace .work-tabs a {
  min-width: 0;
  margin: 0;
  padding: 13px 2px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  box-shadow: none;
  color: #626262;
  font-size: 13px;
  font-weight: 500;
}

.work-tabs a:hover {
  background: transparent;
  color: #a42f37;
}

.work-tabs a.current {
  border-bottom-color: #b93840;
  color: #b93840;
  background: transparent;
  box-shadow: none;
  font-weight: 600;
}

.work-body {
  padding-top: 25px;
}

.stage-picker form {
  border-color: var(--line);
  border-radius: 9px;
  box-shadow: 0 8px 30px #62626216;
  padding: 18px;
}

.timeline-event {
  background: #f6f6f5;
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #626262;
}

.timeline-event header {
  font-size: 11px;
}

.note-event {
  background: #fff;
  border: 1px solid var(--line);
  padding: 18px;
}

.note-event p {
  font-size: 13px;
}

.event-avatar {
  background: #f1f1ef;
  color: #626262;
  width: 25px;
  height: 25px;
  font-size: 11px;
}

.timeline-day {
  font-size: 11px;
  color: #6b7179;
  font-weight: 500;
  letter-spacing: .025em;
}

.checklist-section {
  border-color: #f1f1ef;
  border-radius: 8px;
  margin: 14px 0;
}

.checklist-section>summary {
  padding: 13px 17px;
  min-height: 52px;
  background: #f6f6f5;
  font-size: 13px;
  color: #626262;
}

.checklist-section>summary .button {
  background: transparent;
  color: #626262;
  padding: 5px 9px;
  min-height: 29px;
  border: 1px solid transparent;
}

.checklist-section>summary .button:hover {
  background: #f6f6f5;
  color: #b93840;
  border-color: #f1f1ef;
}

.checklist-section>.task-row {
  padding: 12px 17px;
  border-top: 1px solid #f1f1ef;
}

.task-row:hover {
  background: #f6f6f5;
}

.task-row .task-line {
  grid-template-columns: 22px minmax(180px,1fr) 90px 120px 100px 30px;
  gap: 13px;
  min-height: 28px;
}

.task-line .task-name {
  font-size: 13px;
  font-weight: 500;
  color: #626262;
}

.task-name small {
  font-size: 12px;
  color: #6c727c;
  font-weight: 400;
}

.task-line>span {
  font-size: 12px;
  color: #626262;
}

.task-line>a:last-child {
  color: #626262;
  font-size: 11px;
}

.task-line>a:last-child:hover {
  color: #b93840;
}

.task-discussion {
  margin: 2px 0 0 35px;
}

.task-discussion>summary {
  font-size: 11px;
  color: #626262;
  padding: 2px 0;
}

.task-discussion>summary:hover {
  color: #b93840;
}

.is-complete,.is-complete:hover {
  background: #f6f6f5;
}

.is-complete .task-name {
  color: #6c7178;
}

.request-label {
  background: #f1f1ef;
  color: #626262;
  font-size: 9px;
  font-weight: 600;
  padding: 4px 6px;
}

.request-task {
  font-size: 12px;
  border-color: #f1f1ef;
  padding: 12px 0;
}

.request-task>a {
  color: #626262;
}

.task-preview {
  font-size: 12px;
  background: #f6f6f5;
  border: 0;
  border-radius: 7px;
  padding: 8px 12px;
  color: #626262;
}

.task-preview strong {
  color: #626262;
}

.inline-task {
  border-color: #f1f1ef;
  background: #f6f6f5;
  border-radius: 7px;
  padding: 16px;
  margin: 12px;
}

.task-comments .mail-comment-bubble {
  background: #f6f6f5;
  border: 0;
  border-radius: 9px;
}

.week-layout {
  gap: 28px;
  grid-template-columns: minmax(0,1fr) 245px;
}

.week-counts {
  gap: 10px;
}

.week-counts a {
  border-color: var(--line);
  border-radius: 8px;
  padding: 14px 8px;
  color: #626262;
  background: #f6f6f5;
}

.week-counts strong {
  font-size: 28px;
  letter-spacing: -.04em;
  font-weight: 500;
  color: #626262;
}

.week-counts .selected {
  background: #f6f6f5;
  color: #b93840;
  border-color: #e3e3e0;
}

.week-counts .selected strong {
  color: #b93840;
}

.week-counts a:hover {
  border-color: #e3e3e0;
  background: #f6f6f5;
}

.week-filters {
  gap: 12px;
  margin-top: 22px;
  align-items: center;
}

.week-filters label {
  margin: 0;
}

.week-filters button,.week-filters>.button {
  align-self: end;
  margin-bottom: 0;
}

.week-hint {
  font-size: 11px;
  color: #626262;
  margin: 12px 0 20px;
}

.week-group {
  padding: 0;
  background: transparent;
  border-radius: 0;
  margin: 24px 0;
}

.week-group summary {
  padding: 8px 4px 10px;
  color: #626262;
  font-size: 12px;
  font-weight: 550;
}

.week-row {
  border: 1px solid #f1f1ef;
  border-radius: 7px;
  padding: 12px;
  margin: 6px 0;
  grid-template-columns: 28px minmax(160px,1.4fr) minmax(110px,1fr) minmax(100px,1fr);
  gap: 12px;
  box-shadow: none;
}

.week-row:hover {
  border-color: #f1f1ef;
  background: #f6f6f5;
  box-shadow: none;
}

.week-row strong {
  color: #626262;
  font-size: 13px;
  font-weight: 550;
}

.week-row small {
  font-size: 11px;
  color: #626262;
}

.week-row>span:nth-child(n+3) {
  font-size: 12px;
  color: #626262;
}

.week-row>span.overdue {
  color: #a55e6b;
}

.client-initial {
  background: #f1f1ef;
  color: #626262;
  border-radius: 7px;
  font-size: 12px;
}

.week-agenda {
  border-color: var(--line);
  padding-left: 24px;
}

.week-agenda h2 {
  font-size: 13px;
  color: #626262;
  font-weight: 600;
}

.week-agenda h3 {
  font-size: 12px;
  color: #626262;
  margin-top: 22px;
}

.week-agenda form {
  gap: 7px;
}

.week-agenda label {
  margin: 0;
}

.week-agenda input {
  width: 135px;
  font-size: 12px;
}

.week-agenda .muted {
  font-size: 12px;
  color: #6c7179;
}

.agenda-item {
  padding: 16px 0;
  border-color: var(--line);
}

.agenda-item strong {
  font-size: 12px;
  color: #626262;
}

.agenda-item small {
  font-size: 11px;
  color: #626262;
}

.mail-workspace .mailbox-toolbar {
  padding: 15px 24px;
  border-color: var(--line);
}

.mail-workspace .mailbox-toolbar h1 {
  font-size: 16px;
  font-weight: 600;
}

.mail-workspace .mailbox-folders {
  padding: 0 24px;
  gap: 24px;
  border-color: var(--line);
}

.mail-workspace .mailbox-folders a {
  font-size: 12px;
  color: #626262;
  padding: 12px 0;
}

.mail-workspace .mailbox-folders a[aria-current] {
  color: #b93840;
  border-color: #b93840;
  font-weight: 600;
}

.mail-workspace .mailbox-split {
  grid-template-columns: minmax(280px,31%) minmax(0,1fr);
}

.mail-workspace .mailbox-list {
  background: #f6f6f5;
  border-color: var(--line);
}

.mail-workspace .mailbox-search {
  padding: 12px;
  border-color: var(--line);
}

.mail-workspace .mailbox-search input {
  font-size: 12px;
  padding: 8px 10px;
  background: white;
}

.mail-workspace .mailbox-item {
  padding: 16px 14px;
  gap: 10px;
  border-color: #f1f1ef;
  border-left: 2px solid transparent;
}

.mail-workspace .mailbox-item:hover {
  background: #f6f6f5;
}

.mail-workspace .mailbox-item.current {
  background: #f6f6f5;
  border-left-color: #b93840;
}

.mail-workspace .mail-item-top strong {
  font-size: 12px;
  color: #626262;
  font-weight: 500;
}

.mail-item-top time {
  font-size: 10px;
  color: #6a7079;
}

.mail-workspace .mailbox-item b {
  font-size: 13px;
  font-weight: 550;
  color: #626262;
}

.mail-workspace .mailbox-item p {
  font-size: 12px;
  color: #626262;
}

.mail-workspace .mail-avatar {
  width: 27px;
  height: 27px;
  background: #f1f1ef;
  color: #626262;
  border-radius: 8px;
  font-size: 11px;
}

.mail-workspace .mail-comment-preview {
  background: #f1f1ef;
  color: #626262;
  border-radius: 7px;
  font-size: 11px;
  padding: 7px 10px;
}

.mail-workspace .mail-reader-actions {
  padding: 13px 22px;
  gap: 8px;
  border-color: var(--line);
}

.mail-workspace button,.mail-workspace .button {
  font-size: 12px;
  border-radius: 6px;
  padding: 7px 11px;
}

.mail-reader-actions .button {
  background: #f6f6f5;
  border-color: transparent;
  color: #626262;
}

.mail-workspace .mail-message {
  padding: 24px 28px;
}

.mail-workspace .mail-message h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.025em;
  color: #626262;
  margin: 0 0 22px;
}

.mail-workspace .mail-message-meta {
  font-size: 12px;
  border-color: var(--line);
  color: #626262;
  padding-top: 18px;
}

.mail-message-meta time {
  color: #626262;
}

.mail-workspace .mail-message-body {
  font-size: 14px;
  line-height: 1.8;
  color: #626262;
  padding: 24px 0;
  min-height: 100px;
}

.mail-workspace .mail-comments {
  padding: 22px 28px;
  background: #f6f6f5;
  border-color: var(--line);
}

.mail-comments h3 {
  font-size: 13px;
  color: #626262;
}

.mail-workspace .mail-comment-bubble {
  background: #f6f6f5;
  border: 0;
  border-radius: 9px;
  padding: 12px 15px;
  font-size: 13px;
  color: #626262;
}

.mail-workspace .mail-comment-bubble header {
  font-size: 11px;
  color: #626262;
}

.mail-workspace .mail-comment-bubble p {
  font-size: 13px;
}

.mail-workspace .mail-comment-form textarea {
  font-size: 13px;
  min-height: 85px;
  border-color: #f1f1ef;
}

.mail-tags span {
  border-radius: 4px;
  background: #f1f1ef;
  color: #626262;
}

.mail-delivery {
  border-radius: 7px;
  font-size: 12px;
  background: #f6f6f5;
  color: #626262;
}

.record-drawer {
  background: #fff;
  border-color: var(--line);
  box-shadow: -12px 0 50px #a42f371a;
  animation: drawer-enter 180ms ease-out;
}

.record-drawer::backdrop {
  background: #62626233;
  backdrop-filter: blur(2px);
}

.record-drawer>header {
  padding: 18px 26px;
  border-color: var(--line);
  font-size: 13px;
  color: #626262;
}

.drawer-body {
  padding: 24px 28px;
}

.drawer-body .panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  margin-top: 8px;
}

.drawer-body h2 {
  font-size: 19px;
  margin-bottom: 4px;
  color: #626262;
}

.drawer-feedback:not(:empty) {
  background: #f6f6f5;
  color: #626262;
  padding: 12px 28px;
}

.notice {
  border: 0;
  background: #f0f7f4;
  color: #5a7667;
  border-radius: 7px;
  padding: 12px 16px;
  font-size: 12px;
}

.demo-strip {
  font-size: 10px;
  opacity: .8;
  border: 0;
  background: #f6f5f1;
}

.empty {
  padding: 48px 18px;
}

.empty h3 {
  font-size: 14px;
  color: #626262;
}

.empty p {
  font-size: 12px;
  color: #6c727a;
}

@keyframes drawer-enter {
from{opacity:0;transform:translateX(16px)}to{opacity:1;transform:translateX(0)}
}

@media(max-width:1200px) {
.app-shell {
  grid-template-columns: 200px minmax(0,1fr);
}

.week-layout {
  grid-template-columns: minmax(0,1fr) 210px;
  gap: 20px;
}

.week-agenda {
  padding-left: 18px;
}

.week-row {
  grid-template-columns: 26px minmax(135px,1.4fr) minmax(100px,1fr);
}

.week-row>span:last-child {
  grid-column: 2/-1;
}

.task-row .task-line {
  grid-template-columns: 22px minmax(160px,1fr) 75px 100px 88px 25px;
  gap: 9px;
}

.work-inner {
  margin: 0 24px;
}
}

@media(max-width:1000px) {
.week-layout {
  grid-template-columns: minmax(0,1fr);
}

.week-agenda {
  border-left: 0;
  border-top: 1px solid var(--line);
  padding: 20px 0;
}

.week-row {
  grid-template-columns: 28px minmax(160px,1.4fr) minmax(110px,1fr) minmax(100px,1fr);
}

.week-row>span:last-child {
  grid-column: auto;
}

.mail-workspace .mailbox-split {
  grid-template-columns: 270px minmax(0,1fr);
}

.task-row .task-line {
  grid-template-columns: 22px minmax(140px,1fr) 85px;
}

.task-line>*:nth-child(4),.task-line>*:nth-child(5),.task-line>*:nth-child(6) {
  grid-column: auto;
}

.task-line>*:nth-child(4) {
  grid-column: 2;
}

.mail-workspace .mail-message {
  padding: 20px;
}

.mail-message-meta {
  flex-wrap: wrap;
}
}

@media(max-width:800px) {
.sidebar {
  width: 216px;
}

.topbar {
  padding: 12px 18px;
  height: auto;
  gap: 12px;
}

.main-shell main {
  padding: 22px 18px;
}

.work-inner {
  margin: 0 18px;
}

.client-workspace {
  margin: 0;
}

.client-tab-header {
  padding: 0;
}

.client-tab-body {
  padding: 22px 0;
}

.work-tabs {
  gap: 20px;
}

.client-tab-header h1 {
  font-size: 20px;
}

.global-search {
  max-width: none;
}

.mail-workspace .mailbox-split {
  grid-template-columns: 1fr;
}

.mail-workspace .mailbox-list {
  max-height: 260px;
}

.mail-workspace .mailbox-reader {
  max-height: none;
}

.mail-workspace .mail-message-body {
  font-size: 14px;
}

.week-counts {
  gap: 6px;
}

.week-counts strong {
  font-size: 25px;
}

.record-drawer {
  width: 96vw;
}

.drawer-body {
  padding: 22px;
}

.invoice-metrics {
  grid-template-columns: repeat(2,minmax(0,1fr));
}
}

@media(max-width:550px) {
.week-row {
  grid-template-columns: 26px minmax(0,1fr);
}

.week-row>span:nth-child(n+3) {
  grid-column: 2;
}

.week-counts {
  grid-template-columns: repeat(3,minmax(0,1fr));
}

.week-counts a {
  font-size: 11px;
}

.task-row .task-line {
  grid-template-columns: 22px minmax(0,1fr);
}

.task-line>*:nth-child(n+3) {
  grid-column: 2;
}

.work-meta {
  gap: 16px;
}

.checklist-section>summary {
  padding: 12px;
  gap: 8px;
}

.mail-workspace .mail-message,.mail-workspace .mail-comments {
  padding: 18px;
}

.mail-workspace .mailbox-folders {
  gap: 15px;
  padding: 0 16px;
  overflow: auto;
}

.client-details {
  grid-template-columns: 1fr;
}

.drawer-body .fields {
  grid-template-columns: 1fr;
}

.record-drawer>header {
  padding: 16px 20px;
}

.footer {
  padding: 14px 18px;
}
}

@media(prefers-reduced-motion:reduce) {
*,*::before,*::after {
  animation: none!important;
  transition: none!important;
  scroll-behavior: auto!important;
}
}

@media print {
.paper {
  color: #626262;
}

.paper td,.paper dd,.paper p {
  color: #626262;
}

body {
  background: white;
}

.record-drawer {
  animation: none;
  box-shadow: none;
}
}

:root {
  --muted: #626262;
}

input::placeholder,textarea::placeholder {
  color: #626262;
  opacity: 1;
}

.mention-menu {
  display: flex;
  flex-direction: column;
  max-height: 240px;
  overflow: auto;
  background: white;
  border: 1px solid #f1f1ef;
  border-radius: 8px;
  box-shadow: 0 6px 20px #a42f3715;
  margin-top: 5px;
  padding: 5px;
  position: relative;
  z-index: 5;
  max-width: 360px;
}

.mention-menu[hidden] {
  display: none;
}

.mention-menu button {
  text-align: left;
  border: 0;
  background: transparent;
  box-shadow: none;
  justify-content: flex-start;
  padding: 9px 12px;
  font-size: 13px;
  color: #626262;
}

.mention-menu button.selected,.mention-menu button:hover {
  background: #f6f6f5;
  color: #b93840;
}

.mention-menu p {
  padding: 8px;
  margin: 0;
  font-size: 12px;
  color: #626262;
}

.request-conversation {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f1f1ef;
}

.request-conversation>p {
  font-size: 12px;
}

.request-conversation form {
  margin-top: 18px;
}

.request-conversation form>details {
  margin: 12px 0;
  font-size: 12px;
  color: #626262;
}

.request-reply {
  padding: 14px 16px;
  background: #f6f6f5;
  border-radius: 9px;
  margin: 12px 0;
  font-size: 13px;
}

.request-reply.from-client {
  background: #f6f6f5;
}

.request-reply header {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: #626262;
}

.request-reply header span,.request-reply time {
  font-size: 11px;
  color: #626262;
}

.request-reply time {
  margin-left: auto;
}

.request-reply p {
  margin: 8px 0 0;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.request-reply>small {
  display: block;
  margin-top: 8px;
  color: #626262;
}

.request-files {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.request-files a {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.request-context {
  grid-column: 1/-1;
  padding: 12px 14px;
  background: #f6f6f5;
  border-radius: 7px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #626262;
}

.portal-request:has(.request-conversation) {
  scroll-margin-top: 25px;
}

.delete-link {
  color: #ad4051!important;
  background: #fff8f9!important;
  border-color: #efdae0!important;
}

.delete-link:hover {
  background: #fbeef1!important;
}

.work-meta dd>a,.stage-picker>summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  line-height: 1.5;
}

.work-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  vertical-align: middle;
}

.work-chevron:before {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px,-1px);
}

.stage-picker>summary {
  list-style: none;
}

.stage-picker>summary::marker {
  content: "";
}

.stage-picker>summary::-webkit-details-marker {
  display: none;
}

.stage-picker[open]>summary .work-chevron {
  transform: rotate(180deg);
}

.platform-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px;
}

.platform-controls {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.platform-controls label {
  max-width: 160px;
}

.platform-shell small {
  display: block;
  max-width: 360px;
  overflow-wrap: anywhere;
}

.platform-shell .notice input {
  width: 100%;
}

.platform-shell th {
  white-space: nowrap;
}

@media(max-width:700px) {
.platform-shell {
  padding: 20px 12px;
}

.platform-shell .page-heading {
  display: block;
}
}

.platform-controls label {
  margin: 0;
}

.platform-controls input,.platform-controls select {
  margin-bottom: 0;
}

.platform-shell td>form+form {
  margin-top: 8px;
}

.platform-controls button {
  min-height: 38px;
}

.plan-cards {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 18px;
  margin: 22px 0;
}

.plan-cards article {
  border: 1px solid #f1f1ef;
  border-radius: 12px;
  padding: 22px;
  background: #f6f6f5;
}

.plan-cards article:nth-child(2) {
  border-color: #d4d4cf;
  background: #f6f6f5;
}

.plan-cards h3 {
  font-size: 21px;
  color: #b93840;
  margin: 0 0 8px;
}

.plan-cards ul {
  padding-left: 18px;
  line-height: 1.9;
  font-size: 13px;
}

.plan-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}

.invoice-links {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.invoice-links form {
  margin: 0;
}

.platform-invoice {
  max-width: 900px;
  margin: 40px auto;
  padding: 40px;
  background: white;
  border: 1px solid #f1f1ef;
  border-radius: 10px;
}

.platform-invoice header {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 2px solid #b93840;
  padding: 24px 0;
}

.platform-invoice section {
  padding: 20px 0;
}

.platform-invoice table {
  width: 100%;
}

.platform-invoice td,.platform-invoice th {
  padding: 16px;
}

.platform-invoice .invoice-totals {
  text-align: right;
}

.invoice-actions {
  display: flex;
  gap: 12px;
}

@media(max-width:750px) {
.plan-cards,.plan-checks {
  grid-template-columns: 1fr;
}

.platform-invoice {
  padding: 20px;
  margin: 12px;
}

.platform-invoice header {
  flex-direction: column;
}
}

@media print {
.invoice-actions {
  display: none!important;
}

.platform-invoice {
  border: 0;
  margin: 0;
  padding: 0;
  max-width: none;
  box-shadow: none;
}

body {
  background: white;
}

.platform-invoice header,.platform-invoice section,.platform-invoice tr {
  break-inside: avoid;
}
}

.operations-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.operations-chart {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 20px;
}

.operations-chart text {
  font: 16px Arial,sans-serif;
  fill: #626262;
}

.chart-track {
  fill: #f6f6f5;
}

.chart-overdue {
  fill: #dc5264;
}

.chart-today {
  fill: #e3a435;
}

.chart-week {
  fill: #b93840;
}

.chart-unscheduled {
  fill: #626262;
}

.chart-later {
  fill: #45a394;
}

.operations-chart a:hover rect:not(.chart-track),.operations-chart a:focus rect:not(.chart-track) {
  opacity: .7;
}

.operation-metrics a {
  text-decoration: none;
  color: inherit;
}

.operation-metrics a:hover {
  border-color: #b93840;
}

.mail-subnav {
  display: grid;
  padding: 0 10px 12px 42px;
  gap: 3px;
}

.mail-subnav a {
  padding: 6px;
  color: #626262;
  text-decoration: none;
  font-size: 13px;
}

.mail-subnav a[aria-current] {
  color: #a42f37;
  background: #f1f1ef;
  border-radius: 5px;
}

.mail-state-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 1px solid #f1f1ef;
}

.mail-state-actions form {
  margin: 0;
}

@media(max-width:1150px) {
.operations-charts {
  grid-template-columns: 1fr;
}
}

.operations-filter {
  justify-content: flex-start;
  align-items: end;
  gap: 12px;
}

.operations-filter label {
  margin: 0;
}

.operations-filter button,.operations-filter .button {
  margin-bottom: 0;
}

#mail-live-status {
  padding: 10px 20px;
  color: #626262;
  font-size: 12px;
  border-top: 1px solid #f1f1ef;
}

.request-attach {
  margin: 16px 0;
  padding: 12px 16px;
  border: 1px solid #f1f1ef;
  border-radius: 6px;
}

.request-attach summary {
  cursor: pointer;
  color: #a42f37;
}

.request-attach form {
  margin-top: 12px;
}

.request-attach small {
  display: block;
  color: #626262;
  margin-top: 6px;
}

.upload-progress {
  width: 100%;
  flex-basis: 100%;
  margin: 16px 0;
  padding: 12px 16px;
  border: 1px solid #f1f1ef;
  border-radius: 10px;
  background: #f6f6f5;
}

.upload-progress progress {
  display: block;
  width: 100%;
  height: 12px;
  accent-color: #b93840;
}

.upload-progress p {
  margin: 8px 0 0;
  font-size: 13px;
  color: #626262;
}

.client-contacts {
  width: 100%;
  margin: 20px 0;
}

.client-contacts h3 {
  margin: 0;
}

.client-contact-row {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  padding: 16px;
  margin: 12px 0;
  border: 1px solid #f1f1ef;
  border-radius: 8px;
  background: #f6f6f5;
}

.client-contact-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.client-contact-row button {
  justify-self: start;
}

.client-contact-card {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 14px 0;
  border-bottom: 1px solid #f1f1ef;
}

.client-contact-card strong {
  min-width: 160px;
}

.client-contacts [role=status] {
  font-size: 13px;
  color: #626262;
}

@media(max-width:600px) {
.client-contact-row {
  grid-template-columns: 1fr;
}
}

.ai-workspace {
  max-width: 1300px;
  margin: auto;
}

.ai-columns {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 20px;
}

.ai-columns .panel {
  min-width: 0;
}

.ai-columns label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.ai-columns textarea,.ai-columns select {
  width: 100%;
  box-sizing: border-box;
}

.ai-columns textarea {
  resize: vertical;
  line-height: 1.7;
  font-size: 14px;
}

.ai-columns .ai-confirm {
  flex-direction: row;
  align-items: flex-start;
  font-size: 13px;
}

.ai-confirm input {
  width: auto;
  flex: none;
  margin-top: 4px;
}

.ai-columns .muted {
  font-size: 13px;
  line-height: 1.6;
}

.ai-columns [data-ai-status] {
  font-size: 14px;
  line-height: 1.6;
}

.ai-columns button:disabled {
  opacity: .55;
  cursor: wait;
}

.ai-columns .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

@media(max-width:900px) {
.ai-columns {
  grid-template-columns: 1fr;
}
}

.ai-field-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 16px;
}

.ai-field-tools button {
  font-size: 12px;
  padding: 6px 10px;
  color: #b93840;
  background: #f6f6f5;
  border: 1px solid #f1f1ef;
  border-radius: 6px;
}

.ai-context-dialog {
  width: min(720px,calc(100vw - 32px));
  max-height: 90vh;
  overflow: auto;
  border: 1px solid #f1f1ef;
  border-radius: 12px;
  padding: 24px;
  color: #626262;
  background: #fff;
  box-shadow: 0 20px 80px #a42f3740;
}

.ai-context-dialog::backdrop {
  background: #a42f3760;
}

.ai-context-dialog h2 {
  font-size: 20px;
  margin: 0;
}

.ai-context-dialog label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 0;
  font-size: 13px;
}

.ai-context-dialog textarea,.ai-context-dialog select {
  width: 100%;
  box-sizing: border-box;
}

.ai-context-dialog textarea {
  line-height: 1.6;
  resize: vertical;
}

.ai-context-dialog .ai-confirm {
  flex-direction: row;
  align-items: flex-start;
}

.ai-context-dialog .muted {
  font-size: 12px;
  line-height: 1.6;
}

.ai-context-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-context-dialog [data-ai-status] {
  font-size: 13px;
}

.ai-context-dialog button:disabled {
  opacity: .5;
}

.ai-context-dialog [hidden] {
  display: none;
}

[data-ai-form][data-busy="1"] [data-ai-status] {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #a42f37;
  min-height: 28px;
}

[data-ai-form][data-busy="1"] [data-ai-status]::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #f1f1ef;
  border-top-color: #b93840;
  border-radius: 50%;
  animation: orbit-ai-spin .8s linear infinite;
}

@keyframes orbit-ai-spin {
to{transform:rotate(360deg)}
}

@media(prefers-reduced-motion:reduce) {
[data-ai-form][data-busy="1"] [data-ai-status]::before {
  animation: none;
}
}

.mail-compose-dialog {
  width: min(880px,calc(100vw - 32px));
  max-height: 90vh;
  overflow: auto;
  border: 1px solid #e3e3e0;
  border-radius: 12px;
  background: #fff;
  color: #626262;
  padding: 22px;
  box-shadow: 0 20px 80px #a42f3740;
}

.mail-compose-dialog::backdrop {
  background: #a42f3760;
}

.mail-compose-dialog>.section-heading h2 {
  font-size: 19px;
  margin: 0;
}

.mail-compose-dialog .mail-compose {
  padding: 10px 0;
}

.mail-compose-dialog .mail-compose>h2 {
  display: none;
}

.mail-format-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px;
  background: #f6f6f5;
  border-bottom: 1px solid #e3e3e0;
}

.mail-format-toolbar button {
  font-size: 12px;
  padding: 5px 8px;
}

.mail-format-toolbar select {
  width: auto;
  font-size: 12px;
  padding: 4px;
  min-height: 30px;
}

.mail-rich-box {
  border: 1px solid #e3e3e0;
  border-radius: 6px;
  overflow: hidden;
  margin: 0 0 14px;
}

.mail-rich-editor {
  min-height: 220px;
  max-height: 450px;
  overflow: auto;
  padding: 14px;
  outline-offset: -2px;
  white-space: pre-wrap;
  font-family: Arial,sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.mail-rich-editor p,.mail-rich-editor div {
  margin: 0;
}

.mail-rich-editor ul,.mail-rich-editor ol {
  margin: 6px 0;
  padding-left: 25px;
}

.mail-file-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}

.mail-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 0;
}

.mail-compose [hidden] {
  display: none!important;
}

.mail-compose input[type=file] {
  font-size: 13px;
}

@media(max-width:600px) {
.mail-compose-dialog {
  padding: 14px;
}

.mail-format-toolbar button {
  padding: 6px;
}

.mail-rich-editor {
  min-height: 160px;
}
}

.mail-compose .mail-format-toolbar {
  align-items: center;
  gap: 4px;
  padding: 8px;
  line-height: 1;
}

.mail-compose .mail-format-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  font-size: 14px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #626262;
  box-shadow: none;
}

.mail-compose .mail-format-toolbar button:hover {
  background: #f1f1ef;
  border-color: #e3e3e0;
}

.mail-compose .mail-format-toolbar button[data-command=bold] {
  font-weight: 700;
}

.mail-compose .mail-format-toolbar button[data-command=italic] {
  font-style: italic;
}

.mail-compose .mail-format-toolbar button[data-command=underline] {
  text-decoration: underline;
}

.mail-compose .mail-format-toolbar select {
  flex: 0 0 auto;
  width: 126px;
  max-width: 126px;
  height: 32px;
  min-height: 32px;
  margin: 0;
  padding: 4px 22px 4px 8px;
  font-size: 12px;
  line-height: 1.3;
}

.mail-compose .mail-format-toolbar select[aria-label=Size] {
  width: 102px;
}

.review-files {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.review-file {
  padding: 16px;
  border: 1px solid #e3e3e0;
  border-radius: 8px;
  background: #fff;
}

.review-file>small,.review-file form small {
  display: block;
  color: #626262;
  margin: 6px 0 12px;
}

.review-file form {
  margin-top: 12px;
}

.review-file details {
  margin-top: 12px;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
}

.health-grid>div {
  padding: 16px;
  background: #f6f6f5;
  border: 1px solid #f1f1ef;
  border-radius: 6px;
}

.health-grid dt {
  font-weight: 600;
}

.health-grid dd {
  margin: 8px 0 0;
}

.portal-actions {
  margin-bottom: 20px;
}

.portal-actions .download-row {
  gap: 12px;
  flex-wrap: wrap;
}

@media(max-width:700px) {
.review-file {
  padding: 12px;
}

.review-file .toolbar-actions {
  flex-wrap: wrap;
}

.review-file button,.portal-request button {
  min-height: 44px;
  margin: 4px 0;
}

.portal-request input,.portal-request textarea,.portal-request select {
  font-size: 16px;
  max-width: 100%;
}

.health-grid {
  grid-template-columns: 1fr;
}

.request-conversation form {
  min-width: 0;
}

.request-conversation {
  overflow-wrap: anywhere;
}

.portal-request summary {
  gap: 8px;
  align-items: flex-start;
}
}

.contact-access {
  border-top: 1px solid #f1f1ef;
  margin-top: 16px;
  padding-top: 16px;
}

.contact-access summary,.mail-thread summary,.mail-organization summary {
  cursor: pointer;
  font-weight: 600;
}

.contact-access form {
  margin-top: 12px;
}

.entity-selector {
  display: flex;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.entity-selector label {
  flex: 1;
  margin: 0;
}

.mail-organization,.mail-thread {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f1ef;
}

.mail-organization form {
  margin-top: 12px;
}

.mail-thread details {
  padding: 10px 0;
  border-top: 1px solid #f1f1ef;
}

.mail-thread summary {
  font-size: 13px;
  font-weight: 500;
}

.mail-thread p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.reply-presence {
  padding: 10px 12px;
  border-radius: 6px;
  background: #f6f6f5;
  color: #a42f37;
  font-size: 13px;
}

.mailbox-folders {
  flex-wrap: wrap;
}

.mailbox-folders a {
  white-space: nowrap;
}

@media(max-width:700px) {
.entity-selector {
  display: block;
}

.entity-selector button {
  margin-top: 8px;
}

.mail-thread,.mail-organization {
  padding: 12px;
}

.mail-organization .fields {
  display: block;
}
}

.release-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(270px,1fr));
  gap: 16px;
  margin: 18px 0;
}

.setup-card {
  border: 1px solid #e3e3e0;
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}

.setup-card h3 {
  font-size: 15px;
  margin: 10px 0;
}

.setup-card p,.setup-card li {
  font-size: 13px;
  line-height: 1.6;
}

.setup-card small,td small {
  display: block;
  color: #626262;
  margin-top: 4px;
}

.setup-card li {
  margin: 9px 0;
}

.import-preview {
  max-height: 520px;
  overflow: auto;
  margin: 18px 0;
}

.import-preview thead {
  position: sticky;
  top: 0;
  background: #f6f6f5;
}

.platform-shell details form {
  margin: 12px 0;
}

.platform-shell td {
  vertical-align: top;
}

.platform-shell label {
  display: block;
  margin: 8px 0;
}

.platform-shell details input,.platform-shell details select {
  max-width: 100%;
}

@media(max-width:650px) {
.release-grid {
  grid-template-columns: 1fr;
}

.setup-card {
  padding: 14px;
}

.platform-shell {
  padding: 12px;
}

.platform-shell .fields {
  grid-template-columns: 1fr;
}
}

.record-drawer.task-popup {
  inset: 0;
  margin: auto;
  width: min(760px,94vw);
  height: fit-content;
  max-height: 90dvh;
  border: 1px solid #e3e3e0;
  border-radius: 12px;
  box-shadow: 0 20px 70px #a42f3733;
  background: #fff;
}

.task-popup .drawer-body {
  padding: 20px 24px;
}

.task-popup .form-panel {
  border: 0;
  padding: 0;
  margin: 0;
  background: #fff;
}

.task-popup h2 {
  font-size: 18px;
  margin-top: 0;
}

.client-search {
  position: relative;
  min-width: 0;
}

.client-search label {
  display: block;
}

.client-search input[type=search] {
  width: 100%;
  margin-top: 5px;
}

.client-search-status {
  display: block;
  margin-top: 6px;
  color: #626262;
  font-size: 12px;
}

.client-results {
  position: absolute;
  left: 0;
  right: 0;
  top: 72px;
  z-index: 10;
  max-height: 220px;
  overflow: auto;
  background: white;
  border: 1px solid #e3e3e0;
  border-radius: 6px;
  box-shadow: 0 8px 22px #a42f3720;
}

.client-results button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 0;
  background: white;
  padding: 10px 12px;
  color: #a42f37;
  white-space: normal;
}

.client-results button:hover,.client-results button:focus-visible {
  background: #f6f6f5;
  outline: 2px solid #b93840;
  outline-offset: -2px;
}

[data-simple-work] [hidden] {
  display: none!important;
}

.pdf-intake-send {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 0;
}

.pdf-intake-send form {
  margin: 0;
}

.pdf-intake-send a {
  font-size: 13px;
}

@media(max-width:600px) {
.task-popup .drawer-body {
  padding: 16px;
}

.task-popup .fields {
  grid-template-columns: 1fr;
}
}

.app-shell {
  --line: #f1f1ef;
  --soft: #fff0ef;
  --ink: #2f2f2d;
  --muted: #6e6e68;
  grid-template-columns: 230px minmax(0,1fr);
  gap: 0;
  padding: 0;
  background: #f6f6f5;
  min-height: 100vh;
}

.app-shell .sidebar {
  top: 0;
  height: 100vh;
  height: 100dvh;
  border: 0;
  border-right: 1px solid #e3e3e0;
  border-radius: 0;
  background: #fff;
  overflow-y: auto;
  box-shadow: none;
}

.app-shell .brand {
  padding: 22px 18px 16px;
  font-size: 16px;
  gap: 10px;
}

.app-shell .brand img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

.app-shell .workspace-label {
  display: flex;
  margin: 0 14px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 500;
  color: #2f2f2d;
}

.app-shell .nav-heading {
  padding: 20px 14px 9px;
  font-size: 10px;
  letter-spacing: .09em;
}

.app-shell .nav-link {
  position: relative;
  border-radius: 11px;
  min-height: 41px;
  padding: 10px 13px;
  margin: 3px 0;
  font-size: 13px;
  gap: 12px;
}

.app-shell .nav-link svg {
  width: 18px;
  height: 18px;
}

.app-shell .nav-link.active {
  background: #f1f1ef;
  color: #b93840;
}

.app-shell .nav-link.active:before {
  content: '';
  position: absolute;
  left: -12px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 4px;
  background: #b93840;
}

.app-shell .nav-link:hover {
  background: #f6f6f5;
  transform: none;
}

.app-shell .sidebar-bottom {
  background: #fff;
  padding: 16px 18px;
  border-radius: 0;
}

.app-shell .avatar {
  border-radius: 50%;
  background: #f1f1ef;
  color: #a42f37;
}

.app-shell .main-shell {
  min-width: 0;
}

.app-shell .topbar {
  border: 0;
  border-bottom: 1px solid #e3e3e0;
  border-radius: 0;
  background: #fff;
  min-height: 56px;
  padding: 10px 24px;
  gap: 16px;
  margin-bottom: 0;
}

.app-shell .global-search {
  background: #f6f6f5;
  border-radius: 5px;
  min-height: 36px;
  border-color: #e3e3e0;
}

.app-shell .global-search input {
  background: transparent;
}

.app-shell .global-search button {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.app-shell .context-title strong {
  font-size: 15px;
}

.app-shell .main-shell>main {
  background: #f6f6f5;
  border: 0;
  border-radius: 0;
  padding: 28px;
  min-height: 0;
}

.app-shell .footer {
  border: 0;
  padding: 18px 24px;
  font-size: 11px;
}

.app-shell h1 {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -.04em;
}

.app-shell h2 {
  font-size: 16px;
  font-weight: 600;
}

.app-shell .page-heading {
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}

.app-shell .eyebrow {
  font-size: 9px;
  letter-spacing: .1em;
}

.app-shell :is(button,.button) {
  border-radius: 5px;
  padding: 8px 14px;
  min-height: 34px;
  box-shadow: none;
  transition: background .15s,border-color .15s,color .15s;
}

.app-shell :is(button,.button):active {
  transform: none;
}

.app-shell :is(button,.button).primary {
  background: #b93840;
  border-color: #b93840;
  box-shadow: none;
}

.app-shell :is(button,.button).primary:hover {
  background: #9e2e36;
  border-color: #9e2e36;
  box-shadow: none;
}

.app-shell :is(input,textarea,select) {
  border-radius: 10px;
  border-color: #f1f1ef;
  background: #fff;
}

.app-shell input[type=checkbox] {
  border-radius: 4px;
  accent-color: #b93840;
}

.app-shell :is(.panel,.metric,.work-card,.portal-job,.table-wrap) {
  border-radius: 18px;
  border-color: #f1f1ef;
  background: #fff;
  box-shadow: 0 4px 16px #a42f3703;
}

.app-shell .metric {
  padding: 23px;
}

.app-shell .metric strong {
  font-size: 32px;
  letter-spacing: -.04em;
}

.app-shell .work-card:hover {
  border-color: #e3e3e0;
  box-shadow: 0 8px 20px #a42f3709;
  transform: translateY(-2px);
}

.app-shell .kanban-column {
  border-radius: 20px;
  background: #f1f1ef;
  padding: 14px;
}

.app-shell :is(td,th) {
  padding: 14px 16px;
}

.app-shell th {
  background: #f6f6f5;
  font-size: 10px;
  letter-spacing: .04em;
}

.app-shell .badge {
  border-radius: 6px;
  padding: 3px 8px;
}

.app-shell .table-wrap {
  overflow-x: auto;
}

.app-shell .table-wrap table {
  margin: 0;
}

.app-shell .filters {
  gap: 12px;
  flex-wrap: wrap;
}

.app-shell .main-shell>main.job-workspace,.app-shell .main-shell>main.mail-workspace {
  padding: 0;
  overflow: clip;
}

.app-shell .work-header,.app-shell .client-tab-header {
  background: #f6f6f5;
  border-radius: 24px 24px 0 0;
}

.app-shell .work-tabs,.app-shell .portal-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 0;
  border-bottom: 1px solid #f1f1ef;
}

.app-shell :is(.work-tabs,.portal-tabs)>a {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 39px;
  padding: 9px 17px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  font-size: 13px;
  white-space: nowrap;
}

.app-shell :is(.work-tabs,.portal-tabs)>a:is(.active,.current,[aria-current]) {
  background: #f1f1ef;
  color: #b93840;
  font-weight: 600;
}

.app-shell .client-workspace {
  margin: 0;
}

.app-shell .client-tab-body {
  padding: 24px 4px;
}

.app-shell .client-event {
  background: #fff;
  border: 1px solid #f1f1ef;
  border-radius: 15px;
  padding: 18px;
  margin-bottom: 12px;
}

.app-shell .task-row {
  background: #fff;
  border-color: #f1f1ef;
  border-radius: 12px;
}

.app-shell .task-line {
  align-items: center;
}

.app-shell .task-discussion>summary {
  padding: 10px 14px;
}

.app-shell .week-counts {
  gap: 12px;
}

.app-shell .week-counts>a {
  border-radius: 16px;
  padding: 19px;
  background: #fff;
}

.app-shell .calendar-day {
  background: #fff;
  border-color: #f1f1ef;
}

.app-shell .calendar-day.today {
  background: #f6f6f5;
}

.app-shell .capacity-grid .panel {
  padding: 24px;
}

.app-shell .mailbox-toolbar {
  padding: 20px 24px;
}

.app-shell .mailbox-folders {
  padding: 4px 20px;
  gap: 8px;
  overflow-x: auto;
}

.app-shell .mailbox-folders a {
  white-space: nowrap;
  padding: 10px 13px;
  border: 0;
  border-radius: 18px;
}

.app-shell .mailbox-folders a[aria-current] {
  background: #f1f1ef;
  color: #b93840;
}

.app-shell .mailbox-item {
  margin: 5px 7px;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 13px 10px;
}

.app-shell .mailbox-item.current {
  background: #f1f1ef;
  border-color: #f1f1ef;
}

.app-shell .mailbox-list {
  background: #f6f6f5;
}

.app-shell .mailbox-reader {
  background: #fff;
}

.app-shell .mail-comment-bubble {
  background: #f6f6f5;
  border-color: #f1f1ef;
  border-radius: 16px;
}

.app-shell .mail-reader-actions {
  gap: 8px;
}

.app-shell .mail-message h2 {
  font-size: 20px;
}

.app-shell .portal-view {
  padding-top: 20px;
}

dialog.record-drawer,dialog.mail-compose-dialog,dialog.ai-dialog {
  border: 1px solid #f1f1ef;
  border-radius: 22px;
  box-shadow: 0 28px 90px #a42f3730;
}

dialog::backdrop {
  background: #a42f374d;
  backdrop-filter: blur(3px);
}

dialog[open] {
  animation: orbit-dialog-in .2s ease-out;
}

.app-shell main {
  animation: orbit-enter .25s ease-out;
}

.app-shell :is(.metric,.work-card) {
  transition: transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}

.app-shell :is(.metric):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px #a42f3708;
}

.app-shell [aria-busy=true]::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 2px solid #e3e3e0;
  border-top-color: #b93840;
  border-radius: 50%;
  animation: orbit-spin .8s linear infinite;
}

@keyframes orbit-enter {
from{opacity:.45;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}
}

@keyframes orbit-dialog-in {
from{opacity:0;transform:translateY(8px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}
}

@keyframes orbit-spin {
to{transform:rotate(360deg)}
}

@media(max-width:1200px) {
.app-shell {
  grid-template-columns: 210px minmax(0,1fr);
  gap: 12px;
  padding: 10px;
}

.app-shell .main-shell>main {
  padding: 22px;
}
}

@media(max-width:800px) {
.app-shell {
  display: block;
  padding: 8px;
}

.app-shell .sidebar {
  position: fixed;
  top: 8px;
  left: 8px;
  bottom: 8px;
  height: calc(100dvh - 16px);
  width: 230px;
  z-index: 60;
  transform: translateX(-260px);
  transition: transform .2s ease;
}

.app-shell.menu-open .sidebar {
  transform: translateX(0);
}

.app-shell .topbar {
  padding: 12px 15px;
  border-radius: 18px;
  gap: 10px;
}

.app-shell .main-shell>main {
  padding: 20px 16px;
  border-radius: 18px;
}

.app-shell .global-search {
  min-width: 0;
}

.app-shell .global-search kbd {
  display: none;
}

.app-shell h1 {
  font-size: 25px;
}

.app-shell .page-heading {
  flex-wrap: wrap;
}

.app-shell .mailbox-folders {
  flex-wrap: nowrap;
}

.app-shell .work-tabs {
  padding: 8px 12px;
}

.app-shell .mailbox-toolbar {
  padding: 16px;
}

.app-shell .portal-tabs {
  gap: 5px;
}
}

@media(max-width:480px) {
.app-shell .context-title strong {
  font-size: 13px;
}

.app-shell .top-right {
  gap: 5px;
}

.app-shell .global-search {
  max-width: 180px;
}

.app-shell .global-search button {
  display: none;
}

.app-shell :is(.work-tabs,.portal-tabs)>a {
  padding: 8px 12px;
}

.app-shell .page-heading .button {
  font-size: 12px;
}
}

@media(prefers-reduced-motion:reduce) {
.app-shell *,.app-shell main,dialog[open] {
  animation: none!important;
  transition: none!important;
  scroll-behavior: auto!important;
}

.app-shell :is(.metric,.work-card):hover {
  transform: none;
}

.app-shell .nav-link:hover {
  transform: none;
}
}

@media print {
.app-shell {
  display: block;
  padding: 0;
  background: white;
}

.app-shell .main-shell>main {
  border: 0;
  padding: 0;
  background: white;
}

.app-shell .topbar {
  display: none;
}

.app-shell * {
  animation: none!important;
  box-shadow: none!important;
}
}

#mail-live-status[hidden], .stage-picker button[hidden] {
  display: none !important;
}

.client-folder {
  border: 1px solid #f1f1ef;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  overflow-x: auto;
}

.folder-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 14px 0;
}

.folder-upload {
  display: flex;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px;
  background: #f6f6f5;
  border-radius: 8px;
  margin: 16px 0;
}

.folder-upload label {
  flex: 1;
  min-width: 180px;
}

.folder-upload small {
  flex-basis: 100%;
  color: #626262;
}

.client-folder table {
  width: 100%;
  border-collapse: collapse;
}

.client-folder th,.client-folder td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #f1f1ef;
}

.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(145px,1fr));
  gap: 14px;
  margin: 20px 0;
}

.folder-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 12px;
  border: 1px solid #f1f1ef;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  color: #626262;
  background: white;
}

.folder-tile:hover {
  background: #f6f6f5;
  border-color: #d4d4cf;
}

.folder-tile strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.folder-tile small {
  color: #626262;
  font-size: 12px;
}

.folder-picture {
  position: relative;
  width: 64px;
  height: 44px;
  background: #f3c35b;
  border-radius: 4px;
  box-shadow: inset 0 8px #ebaf3c;
  margin-top: 10px;
}

.folder-picture:before {
  content: "";
  position: absolute;
  top: -7px;
  left: 0;
  width: 28px;
  height: 10px;
  border-radius: 4px 4px 0 0;
  background: #ebaf3c;
}

.file-picture {
  display: grid;
  place-items: center;
  width: 46px;
  height: 54px;
  border: 2px solid #d4d4cf;
  border-radius: 4px;
  background: #f6f6f5;
  color: #626262;
  font-size: 10px;
}

.mail-original-frame {
  width: 100%;
  height: 620px;
  min-height: 300px;
  border: 0;
  background: white;
  display: block;
}

.document-notifications {
  padding: 20px;
  border: 1px solid #f1f1ef;
  border-radius: 12px;
  margin-bottom: 20px;
  background: #fff;
}

.document-notifications article {
  display: flex;
  gap: 12px;
  align-items: center;
  border-top: 1px solid #f1f1ef;
  padding: 12px 0;
}

.document-notifications article>div {
  flex: 1;
}

.upload-inbox-count {
  display: inline-block;
  border-radius: 4px;
  background: #b93840;
  color: white!important;
  padding: 1px 6px;
  margin: 0 12px 8px;
  text-decoration: none;
  font-weight: 600;
}

.upload-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  background: #b93840;
  color: white!important;
  padding: 18px 24px;
  border-radius: 12px;
  box-shadow: 0 5px 20px #0002;
  max-width: 360px;
}

.ai-builder form {
  margin: 20px 0;
}

.ai-builder label {
  display: block;
  margin: 12px 0;
}

.builder-table-wrap {
  overflow-x: auto;
}

.ai-builder table {
  width: 100%;
  border-collapse: collapse;
}

.ai-builder th,.ai-builder td {
  padding: 8px;
  text-align: left;
}

.ai-builder td:nth-child(2) {
  width: 50%;
}

.ai-builder input {
  min-width: 100px;
  width: 100%;
}

.ai-builder .check input {
  width: auto;
  min-width: 0;
}

.ai-builder form[hidden] {
  display: none!important;
}

.builder-loading:before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #e3e3e0;
  border-top-color: #b93840;
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
  animation: builder-spin .8s linear infinite;
}

@keyframes builder-spin {
to{transform:rotate(360deg)}
}

@media(prefers-reduced-motion:reduce) {
.builder-loading:before {
  animation: none;
}
}

:is(.app-shell, dialog) :is(.toolbar-actions,.timeline-actions,.mail-reader-actions,.mail-state-actions,.ai-context-actions,.ai-field-tools,.pdf-intake-send) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

:is(.app-shell, dialog) :is(.toolbar-actions,.timeline-actions,.mail-reader-actions,.mail-state-actions,.ai-context-actions,.ai-field-tools,.pdf-intake-send)>form {
  margin: 0;
}

:is(.app-shell, dialog) :is(.section-heading,.page-heading) {
  gap: 12px;
  flex-wrap: wrap;
}

:is(.app-shell, dialog) :is(form,p,.wide,td)>:is(button,a.button)+:is(button,a),
:is(.app-shell, dialog) :is(form,p,.wide,td)>a.button+button {
  margin-inline-start: 10px;
}

:is(.app-shell, dialog) :is(.toolbar-actions,.timeline-actions,.mail-reader-actions,.mail-state-actions,.ai-context-actions,.ai-field-tools,.pdf-intake-send)>:is(button,a) {
  margin-inline-start: 0;
}

:is(.app-shell, dialog) :is(.ai-field-tools,.pdf-intake-send,.ai-context-actions) {
  margin-block: 12px;
}

:is(.app-shell, dialog) :is(form,p,.wide,td)>:is(button,a.button) {
  margin-block: 4px;
}

@media(max-width:600px) {
:is(.app-shell,dialog) :is(.toolbar-actions,.timeline-actions,.mail-reader-actions,.mail-state-actions,.ai-context-actions,.ai-field-tools,.pdf-intake-send) {
  gap: 12px;
}

:is(.app-shell,dialog) :is(.toolbar-actions,.timeline-actions,.mail-reader-actions,.mail-state-actions,.ai-context-actions,.ai-field-tools,.pdf-intake-send)>:is(button,a.button) {
  min-height: 40px;
  max-width: 100%;
  white-space: normal;
}
}

.theme-toggle {
  white-space: nowrap;
  min-width: 95px;
}

@media screen {
html[data-theme=dark] {
  color-scheme: dark;
  --ink: #e7e7e5;
  --muted: #a5a5a2;
  --line: #303032;
  --bg: #141414;
  --nav: #1c1c1d;
  --soft: #282829;
  --brand: #d4d4cf;
  --green: #8dc5a8;
  --shadow: 0 4px 16px #0002;
  background: #141414;
  color: #e7e7e5;
}

html[data-theme=dark] body,html[data-theme=dark] .app-shell {
  background: #141414;
  color: #e7e7e5;
}

html[data-theme=dark] .app-shell :is(.sidebar,.sidebar-bottom,.topbar,.main-shell>main,.panel,.metric,.work-card,.portal-job,.table-wrap,.work-header,.work-banner,.client-tab-header,.client-folder,.folder-tile,.mailbox,.mailbox-list,.mailbox-reader,.mail-message,.document-notifications,.checklist-section,.task-row,.client-event,.setup-card,.plan-card) {
  background: #1c1c1d;
  color: #e7e7e5;
  border-color: #303032;
  box-shadow: none;
}

html[data-theme=dark] :is(dialog,.auth .panel,.record-drawer) {
  background: #1c1c1d;
  color: #e7e7e5;
  border-color: #303032;
}

html[data-theme=dark] :is(.app-shell,dialog,.auth) :is(h1,h2,h3,h4,strong,dt,label,.context-title,.task-name,.record-title,.brand,.nav-link) {
  color: #e7e7e5;
}

html[data-theme=dark] :is(.app-shell,dialog,.auth) :is(p,small,.muted,.eyebrow,.nav-heading,.timezone,time) {
  color: #aaa9a6;
}

html[data-theme=dark] :is(.app-shell,dialog,.auth) a:not(.button):not(.nav-link):not(.mailbox-item):not(.folder-tile) {
  color: #d4d4cf;
}

html[data-theme=dark] :is(.app-shell,dialog,.auth) :is(input,select,textarea,button,.button,[contenteditable=true]) {
  background: #242425;
  color: #e7e7e5;
  border-color: #3b3b3d;
}

html[data-theme=dark] :is(.app-shell,dialog,.auth) :is(input,textarea)::placeholder {
  color: #92928f;
  opacity: 1;
}

html[data-theme=dark] :is(.app-shell,dialog,.auth) :is(button,.button):hover {
  background: #303031;
}

html[data-theme=dark] :is(.app-shell,dialog,.auth) :is(button,.button).primary {
  background: #b93840;
  color: #fff;
  border-color: #b93840;
}

html[data-theme=dark] :is(.app-shell,dialog) :is(th,.filters,.folder-upload,.upload-progress,.mailbox-toolbar,.mailbox-folders,.mail-reader-actions,.mail-state-actions,.mail-message-meta,.work-meta,.section-content,.kanban-column,.mail-editor-toolbar,.workspace-label,.global-search,.checklist-section>summary) {
  background: #202021;
  color: #c4c4c1;
  border-color: #303032;
}

html[data-theme=dark] :is(.app-shell,dialog) :is(td,tr,header,footer,summary,.work-tabs,.portal-tabs,.mailbox-item,.task-line) {
  border-color: #303032;
}

html[data-theme=dark] .app-shell :is(.nav-link.active,.nav-link:hover,.mailbox-item.current,.mailbox-item:hover,.work-tabs>a.current,.portal-tabs>a.current,.folder-tile:hover) {
  background: #2c2c2e;
  color: #f0efeb;
  border-color: #48484a;
}

html[data-theme=dark] :is(.app-shell,dialog) :is(.mail-comment-bubble,.mail-comment-preview,.notice,.avatar,.mail-avatar,.count) {
  background: #29292b;
  color: #dededb;
  border-color: #3a3a3d;
}

html[data-theme=dark] .app-shell .badge {
  background: #2b2b2d;
  color: #c7c7c3;
}

html[data-theme=dark] .app-shell .badge.green {
  background: #23332b;
  color: #a8cdb5;
}

html[data-theme=dark] .app-shell .badge.amber {
  background: #383022;
  color: #d7bd8c;
}

html[data-theme=dark] .app-shell .badge.red {
  background: #3b292b;
  color: #dfacaf;
}

html[data-theme=dark] .app-shell .file-picture {
  background: #29292c;
  color: #c4c5ca;
  border-color: #535359;
}

html[data-theme=dark] :is(.app-shell,dialog) :focus-visible {
  outline: 3px solid #d4d4cf;
  outline-offset: 3px;
}

html[data-theme=dark] dialog::backdrop {
  background: #0009;
}

html[data-theme=dark] .mail-original-frame {
  background: white;
  color-scheme: light;
}
}

@media(max-width:600px) {
.theme-toggle {
  min-width: 0;
  font-size: 12px;
  padding: 7px 10px;
}

.top-right {
  flex-wrap: wrap;
}
}

@media screen {
html[data-theme=dark] .app-shell {
  gap: 0;
  padding: 0;
  background: #181819;
}

html[data-theme=dark] .app-shell .sidebar {
  background: #141415;
  border: 0;
  border-right: 1px solid #2c2c2e;
  border-radius: 0;
  box-shadow: none;
}

html[data-theme=dark] .app-shell .sidebar-bottom {
  background: #141415;
  border-radius: 0;
  border-top: 1px solid #262628;
}

html[data-theme=dark] .app-shell .topbar {
  background: #181819;
  border: 0;
  border-bottom: 1px solid #2c2c2e;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
  min-height: 68px;
}

html[data-theme=dark] .app-shell .main-shell>main {
  background: #181819;
  border: 0;
  border-radius: 0;
  padding-top: 28px;
  box-shadow: none;
}

html[data-theme=dark] .app-shell :is(.panel,.metric,.work-card,.portal-job,.table-wrap,.client-folder,.folder-tile,.checklist-section,.client-event,.setup-card,.plan-card) {
  border-radius: 8px;
  border-color: #303032;
  background: #202021;
}

html[data-theme=dark] .app-shell :is(.metric,.work-card):hover {
  transform: none;
  box-shadow: none;
  border-color: #454548;
}

html[data-theme=dark] .app-shell :is(button,.button) {
  border-radius: 6px;
  box-shadow: none;
  font-weight: 500;
}

html[data-theme=dark] :is(dialog,.record-drawer) {
  border-radius: 12px;
  box-shadow: 0 24px 80px #0008;
}

html[data-theme=dark] .app-shell .nav-link {
  border-radius: 6px;
  margin-block: 3px;
  color: #b1b1ad;
  font-weight: 400;
}

html[data-theme=dark] .app-shell .nav-link.active {
  background: #29292b;
  color: #f1f0eb;
  font-weight: 550;
  box-shadow: inset 2px 0 #b93840;
}

html[data-theme=dark] .app-shell .nav-link:hover {
  transform: none;
  background: #242426;
}

html[data-theme=dark] .app-shell :is(.workspace-label,.global-search) {
  border-radius: 6px;
  background: #1d1d1f;
}

html[data-theme=dark] .app-shell .global-search button {
  background: transparent;
  border: 0;
}

html[data-theme=dark] .app-shell :is(.work-tabs,.portal-tabs) {
  gap: 20px;
  background: transparent;
}

html[data-theme=dark] .app-shell :is(.work-tabs,.portal-tabs)>a {
  border-radius: 0;
  padding: 10px 3px;
  background: transparent;
  border-bottom: 2px solid transparent;
  color: #a5a5a2;
}

html[data-theme=dark] .app-shell :is(.work-tabs,.portal-tabs)>a.current {
  background: transparent;
  border-bottom-color: #d4d4cf;
  color: #eeede8;
}

html[data-theme=dark] .app-shell .mailbox-list {
  background: #19191b;
}

html[data-theme=dark] .app-shell :is(.mailbox-reader,.mail-message) {
  background: #1e1e20;
}

html[data-theme=dark] .app-shell .mailbox-item.current {
  background: #303033;
  box-shadow: inset 2px 0 #b93840;
}

html[data-theme=dark] .app-shell .task-row {
  background: #202021;
}

html[data-theme=dark] .app-shell .task-row:hover {
  background: #252527;
}

html[data-theme=dark] .app-shell .task-row.is-complete {
  background: #1c1c1e;
  color: #91918f;
}

html[data-theme=dark] .app-shell :is(.avatar,.mail-avatar) {
  background: #343437;
  color: #d3d3cf;
}

html[data-theme=dark] .app-shell :is(input,select,textarea) {
  border-radius: 6px;
  background: #1a1a1c;
  border-color: #414144;
}

html[data-theme=dark] .app-shell .theme-toggle {
  background: transparent;
  border-color: #39393d;
  color: #bab9b4;
}

html[data-theme=dark] .app-shell :is(.work-header,.work-banner,.client-tab-header) {
  background: #181819;
  border-radius: 0;
}

html[data-theme=dark] .app-shell :is(.badge,.count) {
  border-radius: 4px;
  box-shadow: none;
}
}

@media screen {
html[data-theme=dark] .app-shell .week-counts>a {
  background: #202021;
  border: 1px solid #343436;
  border-radius: 8px;
  color: #b8b8b4;
  box-shadow: none;
}

html[data-theme=dark] .app-shell .week-counts>a strong {
  color: #edede8;
  font-weight: 500;
}

html[data-theme=dark] .app-shell .week-counts>a:hover {
  background: #29292b;
  border-color: #505055;
}

html[data-theme=dark] .app-shell .week-counts>a.selected {
  background: #626262;
  border-color: #626262;
  color: #e3e3e0;
  box-shadow: inset 0 2px #626262;
}

html[data-theme=dark] .app-shell .week-group {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 26px 0;
}

html[data-theme=dark] .app-shell .week-group>summary {
  color: #bcbcb7;
  padding: 8px 2px 12px;
}

html[data-theme=dark] .app-shell .week-row {
  background: #202021;
  border: 1px solid #353538;
  border-radius: 7px;
  color: #c7c7c2;
  box-shadow: none;
  padding: 15px 16px;
  margin: 8px 0;
}

html[data-theme=dark] .app-shell .week-row:hover {
  background: #272729;
  border-color: #53535a;
  box-shadow: none;
}

html[data-theme=dark] .app-shell .week-row strong {
  color: #eeede8;
  font-weight: 550;
}

html[data-theme=dark] .app-shell .week-row small {
  color: #aaa9a6;
}

html[data-theme=dark] .app-shell .week-row .overdue {
  color: #e9a7ad;
}

html[data-theme=dark] .app-shell .week-row .client-initial {
  background: #343438;
  color: #d2d2cf;
}

html[data-theme=dark] .app-shell .week-row progress {
  background: #38383c;
  color: #626262;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
}

html[data-theme=dark] .app-shell .week-row progress::-webkit-progress-bar {
  background: #38383c;
}

html[data-theme=dark] .app-shell .week-row progress::-webkit-progress-value {
  background: #626262;
  border-radius: 4px;
}

html[data-theme=dark] .app-shell .week-row progress::-moz-progress-bar {
  background: #626262;
  border-radius: 4px;
}

html[data-theme=dark] .app-shell :is(.week-agenda,.agenda-item) {
  background: transparent;
  border-color: #343436;
  color: #c7c7c2;
}

html[data-theme=dark] .app-shell .week-hint {
  color: #aaa9a6;
}

html[data-theme=dark] .app-shell .calendar-day {
  background: #202021;
  border-color: #353538;
  color: #d6d6d1;
}

html[data-theme=dark] .app-shell .calendar-day.today {
  background: #626262;
  border-color: #626262;
}

html[data-theme=dark] .app-shell .sidebar {
  scrollbar-width: thin;
  scrollbar-color: #515154 #19191a;
}
}

@media screen {
html[data-theme=dark] :is(.app-shell,dialog) tbody tr:hover,
 html[data-theme=dark] :is(.app-shell,dialog) tbody tr:focus-within {
  background: #29292c;
  color: #e7e7e5;
}

html[data-theme=dark] :is(.app-shell,dialog) tbody tr:hover>td,
 html[data-theme=dark] :is(.app-shell,dialog) tbody tr:focus-within>td {
  background: #29292c;
  border-color: #3b3b3e;
}

html[data-theme=dark] .app-shell :is(.recent-link,.stage-summary a,.client-event,.intake-cards .panel):hover {
  background: #29292c;
  border-color: #454549;
  color: #e7e7e5;
}

html[data-theme=dark] .app-shell .checklist-section>summary .button:hover {
  background: #303033;
  color: #f1f1ef;
  border-color: #48484d;
}

html[data-theme=dark] .app-shell .task-row.is-complete:hover {
  background: #252527;
}

html[data-theme=dark] .app-shell .table-wrap td:last-child {
  color: #b1b1ad;
}
}

@media screen {
html[data-theme=dark] .app-shell .main-shell {
  background: #181819;
}

html[data-theme=dark] .app-shell .main-shell>.footer {
  background: #181819;
  color: #aaa9a6;
  border-top: 1px solid #303032;
  box-shadow: none;
}

html[data-theme=dark] .app-shell .main-shell>.footer :is(span,a) {
  color: #aaa9a6;
}
}

:root {
  --oa-text: #626262;
  --oa-secondary: #626262;
  --oa-link: #b93840;
}

@media screen {
html[data-theme=dark] {
  --oa-text: #e7e7e3;
  --oa-secondary: #b0b0aa;
  --oa-link: #d4d4cf;
}

:is(.app-shell,dialog,.auth,.public-site) {
  color: var(--oa-text);
}

:is(.app-shell,dialog,.auth,.public-site) :is(h1,h2,h3,h4,label,dt,dd,td,li) {
  color: var(--oa-text);
}

:is(.app-shell,dialog,.auth,.public-site) :is(.muted,.eyebrow,.nav-heading,.week-hint,time,small) {
  color: var(--oa-secondary);
}

:is(.app-shell,dialog,.auth,.public-site) input::placeholder,
 :is(.app-shell,dialog,.auth,.public-site) textarea::placeholder {
  color: var(--oa-secondary);
  opacity: 1;
}

html[data-theme=dark] :is(.app-shell,dialog,.auth) :is(.details,.details dd,.record-title,.task-name,.week-row,.agenda-item,.setup-card h3,.mail-message-body,.mail-comment-bubble p,.mail-comment-bubble strong,.task-preview,.portal-job strong,.download-row,.request-task,.request-task a) {
  color: var(--oa-text);
}

html[data-theme=dark] :is(.app-shell,dialog,.auth) :is(.details dt,.task-name small,.task-discussion>summary,.mail-message-meta small,.mail-item-top time,.mailbox-item p,.task-preview .muted,.folder-tile small) {
  color: var(--oa-secondary);
}

html[data-theme=dark] :is(.app-shell,dialog,.auth) :is(.download-row,.portal-request,.portal-job,.details>div,.import-preview,.drawer-body,.drawer-body .panel,.record-drawer>header) {
  background: #202021;
  border-color: #363639;
}

html[data-theme=dark] :is(.app-shell,dialog,.auth) :is(.download-row,.portal-request>summary):hover {
  background: #29292c;
}

html[data-theme=dark] :is(.app-shell,dialog) :is(.overdue) {
  color: #e9a7ad;
}

html[data-theme=dark] :is(.app-shell,dialog) :is(.badge.green,.badge.success) {
  color: #add1b9;
  background: #23332b;
}

html[data-theme=dark] :is(.app-shell,dialog) .badge.amber {
  color: #ddc08b;
  background: #383022;
}

html[data-theme=dark] :is(.app-shell,dialog) .badge.red {
  color: #e9a7ad;
  background: #3b292b;
}

.public-site :is(.lead,.feature-grid p,.price-card>p,.pricing-note,.work-row small,.preview-top span,.product-preview h3,.mini-stats div) {
  color: var(--oa-secondary);
}

.public-site :is(a:not(.button),.site-nav nav>a:not(.button)) {
  color: var(--oa-link);
}

.public-site :is(.price,.mini-stats b,.work-row strong) {
  color: var(--oa-text);
}

.public-site .brand .brand-copy strong {
  color: #e54549;
}

.public-site .brand .brand-copy small {
  color: var(--oa-text);
}

.public-site :is(.button.primary,.mini-stats div:first-child,.mini-stats div:first-child b) {
  color: #fff;
}

html[data-theme=dark] body.public-site {
  background: #141415;
  color: var(--oa-text);
  --bg: #141415;
  --ink: #e7e7e3;
  --muted: #b0b0aa;
  --line: #363639;
}

html[data-theme=dark] .public-site :is(.site-nav,main,footer) {
  background: #181819;
  border-color: #303032;
}

html[data-theme=dark] .public-site :is(.product-preview,.feature-grid article,.price-card,.public-form,.price-controls,.work-row,.mini-stats div,.reply) {
  background: #202021;
  border-color: #363639;
  box-shadow: none;
}

html[data-theme=dark] .public-site :is(.guarantee,.preview-note,.preview-top span,.pill,.badge,.avatar,.avatar.purple) {
  background: #626262;
  color: #e3e3e0;
  border-color: #626262;
}

html[data-theme=dark] .public-site :is(input,select,textarea,button,.button) {
  background: #242425;
  color: var(--oa-text);
  border-color: #47474a;
}

html[data-theme=dark] .public-site :is(button,.button):hover {
  background: #303033;
  color: #f1f1ed;
}

html[data-theme=dark] .public-site :is(button.primary,.button.primary) {
  background: #b93840;
  border-color: #b93840;
  color: #fff;
}

html[data-theme=dark] .public-site .site-nav nav>a:hover,
 html[data-theme=dark] .public-site .site-nav nav>a[aria-current=page] {
  background: #303036;
  color: #f1f1ef;
}

html[data-theme=dark] .public-site .mini-stats div:first-child {
  background: #a42f37;
  color: #fff;
  border-color: #626262;
}

html[data-theme=dark] .public-site .mini-stats div:first-child b {
  color: #fff;
}

html[data-theme=dark] .public-site .price-card.recommended {
  border-color: #b93840;
}

html[data-theme=dark] .public-site .feature-grid article:before {
  background: #626262;
  color: #e3e3e0;
}

html[data-theme=dark] .public-site .brand .brand-copy strong {
  color: #ff7578;
}

html[data-theme=dark] .public-site .brand .brand-copy small {
  color: #e7e7e3;
}

html[data-theme=dark] .public-site :is(.price small,.price-card li,.price-controls label,.public-form label) {
  color: var(--oa-secondary);
}

html[data-theme=dark] .public-site :focus-visible {
  outline-color: #d4d4cf;
}
}

@media screen {
html .auth {
  background: #f6f6f5;
  color: #626262;
}

html .auth .auth-brand {
  background: #202124;
  color: #f2f2ef;
}

html .auth .auth-brand h1 {
  color: #f2f2ef;
}

html .auth .auth-brand p {
  color: #d0d0cc;
}

html .auth .auth-brand small {
  color: #b6b6b2;
}

html .auth .auth-brand>span {
  color: #ff9b9d;
}

html .auth .auth-form {
  background: transparent;
  color: #626262;
}

html .auth .auth-form :is(h1,label) {
  color: #626262;
}

html .auth .auth-form :is(.muted,.eyebrow,small) {
  color: #626262;
}

html .auth .auth-form :is(input,select) {
  background: #fff;
  color: #626262;
  border: 1px solid #626262;
}

html .auth .auth-form input::placeholder {
  color: #626262;
  opacity: 1;
}

html .auth .auth-form input:autofill {
  -webkit-text-fill-color: #626262;
  box-shadow: 0 0 0 1000px #fff inset;
  caret-color: #626262;
}

html .auth .auth-form .primary {
  background: #b93840;
  color: #fff;
  border-color: #b93840;
}

html .auth .auth-form .primary:hover {
  background: #b93840;
  color: #fff;
}

html .auth .auth-form .notice {
  background: #f6f6f5;
  color: #a42f37;
  border: 1px solid #d4d4cf;
  padding: 12px;
  border-radius: 8px;
}

html .auth .auth-form .auth-theme-controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 28px;
}

html .auth .auth-form .theme-toggle {
  background: #fff;
  color: #626262;
  border: 1px solid #626262;
  border-radius: 6px;
}

html[data-theme=dark] .auth {
  background: #181819;
  color: #e7e7e3;
}

html[data-theme=dark] .auth .auth-brand {
  background: #141415;
  border-right: 1px solid #343437;
}

html[data-theme=dark] .auth .auth-form {
  background: #181819;
  color: #e7e7e3;
}

html[data-theme=dark] .auth .auth-form :is(h1,label) {
  color: #e7e7e3;
}

html[data-theme=dark] .auth .auth-form :is(.muted,.eyebrow,small) {
  color: #b0b0aa;
}

html[data-theme=dark] .auth .auth-form input {
  background: #222224;
  color: #ededeb;
  border-color: #66666b;
}

html[data-theme=dark] .auth .auth-form input::placeholder {
  color: #b0b0aa;
}

html[data-theme=dark] .auth .auth-form input:autofill {
  -webkit-text-fill-color: #ededeb;
  box-shadow: 0 0 0 1000px #222224 inset;
  caret-color: #ededeb;
}

html[data-theme=dark] .auth .auth-form .theme-toggle {
  background: #252527;
  color: #e7e7e3;
  border-color: #535358;
}

html[data-theme=dark] .auth .auth-form .notice {
  background: #626262;
  color: #f1f1ef;
  border-color: #626262;
}

html[data-theme=dark] .auth .auth-form :focus-visible {
  outline: 2px solid #d4d4cf;
  outline-offset: 3px;
}
}

@media screen {
.app-shell .sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.app-shell .sidebar>.brand {
  flex: 0 0 auto;
  padding: 22px 18px;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.app-shell .sidebar>.brand img {
  flex: 0 0 34px;
}

.app-shell .sidebar>.brand>span {
  min-width: 0;
  line-height: 1.4;
}

.app-shell .sidebar>.workspace-label {
  flex: 0 0 auto;
  justify-content: flex-start;
  gap: 9px;
  margin: 0 12px 10px;
  padding: 10px;
  min-width: 0;
}

.app-shell .sidebar .workspace-name {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.app-shell .sidebar>nav {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 10px 14px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #d4d4cf transparent;
  scrollbar-gutter: stable;
}

.app-shell .sidebar .nav-heading {
  padding: 20px 12px 8px;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: .1em;
}

.app-shell .sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin: 3px 0;
  padding: 10px 12px;
  line-height: 1.4;
  transform: none;
  border-radius: 8px;
  text-decoration: none;
}

.app-shell .sidebar .nav-link>svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.app-shell .sidebar .nav-link>span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.app-shell .sidebar .nav-link.active:before {
  left: 0;
  top: 12px;
  bottom: 12px;
  border-radius: 2px;
}

.app-shell .sidebar .nav-link .upload-inbox-count {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 23px;
  height: 22px;
  margin: 0;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1;
  border-radius: 4px;
}

.app-shell .sidebar .mail-subnav {
  display: grid;
  gap: 2px;
  margin: 4px 0 10px 20px;
  padding: 0 0 0 14px;
  border-left: 1px solid #e3e3e0;
}

.app-shell .sidebar .mail-subnav>a {
  display: block;
  margin: 0;
  padding: 8px 10px;
  line-height: 1.4;
  border-radius: 6px;
}

.app-shell .sidebar .recent-link {
  margin: 3px 0;
  padding: 9px 12px;
  overflow: hidden;
}

.app-shell .sidebar .recent-link small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-shell .sidebar>.sidebar-bottom {
  flex: 0 0 auto;
  padding: 14px 18px;
}

.app-shell .sidebar .user-link {
  min-width: 0;
  gap: 10px;
  line-height: 1.4;
}

.app-shell .sidebar .user-link>span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.app-shell .sidebar-bottom form {
  margin: 0;
  padding-left: 46px;
}

.app-shell .sidebar-bottom .text-button {
  padding: 6px 0;
}

html[data-theme=dark] .app-shell .sidebar {
  top: 0;
  height: 100dvh;
}

html[data-theme=dark] .app-shell .sidebar>nav {
  scrollbar-color: #49494c transparent;
}

html[data-theme=dark] .app-shell .sidebar .mail-subnav {
  border-color: #343437;
}

@media(max-width:800px) {
.app-shell .sidebar {
  display: none;
  top: 8px;
  left: 8px;
  bottom: 8px;
  width: min(260px,calc(100vw - 64px));
  height: calc(100vh - 16px);
  height: calc(100dvh - 16px);
}

.app-shell.menu-open .sidebar {
  display: flex;
}

html[data-theme=dark] .app-shell .sidebar {
  top: 8px;
  height: calc(100vh - 16px);
  height: calc(100dvh - 16px);
  border: 1px solid #343437;
  border-radius: 12px;
}
}
}

@media screen {
:root {
  --ui-page: #f6f6f5;
  --ui-surface: #fff;
  --ui-subtle: #f1f1ef;
  --ui-hover: #f1f1ef;
  --ui-border: #e3e3e0;
  --ui-text: #2f2f2d;
  --ui-muted: #6e6e68;
  --ui-accent: #b93840;
  --ui-selected: #fff0ef;
  --ui-link: #b93840;
  --ui-focus: #b93840;
}

html[data-theme=dark] {
  --ui-page: #181819;
  --ui-surface: #202022;
  --ui-subtle: #252528;
  --ui-hover: #2b2b2f;
  --ui-border: #38383d;
  --ui-text: #eeeeef;
  --ui-muted: #d4d4cf;
  --ui-accent: #b93840;
  --ui-selected: #626262;
  --ui-link: #e3e3e0;
  --ui-focus: #d4d4cf;
}

:is(html,html[data-theme]) .app-shell {
  grid-template-columns: 240px minmax(0,1fr);
  gap: 0;
  padding: 0;
  background: var(--ui-page);
  font-family: 'Source Sans 3','Segoe UI',Arial,sans-serif;
  font-size: 14px;
  line-height: 1.5;
  --brand: var(--ui-accent);
  --ink: var(--ui-text);
  --muted: var(--ui-muted);
  --line: var(--ui-border);
  --soft: var(--ui-selected);
  color: var(--ui-text);
}

:is(html,html[data-theme]) .app-shell .sidebar {
  top: 0;
  height: 100dvh;
  border: 0;
  border-right: 1px solid var(--ui-border);
  border-radius: 0;
  background: var(--ui-surface);
  box-shadow: none;
}

:is(html,html[data-theme]) .app-shell .sidebar-bottom {
  background: var(--ui-surface);
  border-color: var(--ui-border);
  border-radius: 0;
}

:is(html,html[data-theme]) .app-shell .workspace-label {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--ui-text);
  padding: 0 4px;
  margin: 0 14px 14px;
  font-size: 13px;
  font-weight: 500;
}

:is(html,html[data-theme]) .app-shell .sidebar .brand {
  color: var(--ui-text);
  font-size: 17px;
  letter-spacing: -.02em;
}

:is(html,html[data-theme]) .app-shell .sidebar .nav-link {
  color: var(--ui-muted);
  font-size: 13px;
  min-height: 40px;
  border-radius: 6px;
  font-weight: 500;
}

:is(html,html[data-theme]) .app-shell .sidebar .nav-link:hover {
  background: var(--ui-hover);
  color: var(--ui-text);
  transform: none;
}

:is(html,html[data-theme]) .app-shell .sidebar .nav-link.active {
  background: var(--ui-selected);
  color: var(--ui-link);
  box-shadow: none;
}

:is(html,html[data-theme]) .app-shell .sidebar .nav-link.active:before {
  background: var(--ui-accent);
}

.app-shell .nav-group {
  margin: 10px 0 0;
  border: 0;
  border-top: 1px solid var(--ui-border);
  padding-top: 5px;
}

.app-shell .nav-group>summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  padding: 11px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ui-muted);
  border-radius: 6px;
}

.app-shell .nav-group>summary::-webkit-details-marker {
  display: none;
}

.app-shell .nav-group>summary:after {
  content: '';
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  margin-right: 3px;
}

.app-shell .nav-group[open]>summary:after {
  transform: rotate(45deg);
}

.app-shell .nav-group>summary:hover {
  background: var(--ui-hover);
  color: var(--ui-text);
}

:is(html,html[data-theme]) .app-shell .topbar {
  min-height: 64px;
  height: auto;
  padding: 12px 28px;
  gap: 16px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--ui-border);
  border-radius: 0;
  background: var(--ui-surface);
}

:is(html,html[data-theme]) .app-shell .global-search {
  border: 1px solid var(--ui-border);
  background: var(--ui-page);
  border-radius: 5px;
}

:is(html,html[data-theme]) .app-shell .main-shell>main {
  background: var(--ui-page);
  border: 0;
  border-radius: 0;
  padding: 28px;
  min-height: 0;
}

:is(html,html[data-theme]) .app-shell .main-shell>main:is(.job-workspace,.mail-workspace) {
  padding: 0;
}

:is(html,html[data-theme]) .app-shell .footer {
  background: var(--ui-page);
  border-top: 1px solid var(--ui-border);
  color: var(--ui-muted);
  padding: 14px 28px;
}

:is(html,html[data-theme]) .app-shell h1 {
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -.025em;
  font-weight: 650;
}

:is(html,html[data-theme]) .app-shell h2 {
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: -.015em;
  font-weight: 600;
}

:is(html,html[data-theme]) .app-shell h3 {
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
}

:is(html,html[data-theme]) .app-shell .page-heading {
  margin-bottom: 24px;
  gap: 16px;
  align-items: center;
}

.app-shell .page-heading .eyebrow {
  display: none;
}

:is(html,html[data-theme]) .app-shell :is(.panel,.metric,.work-card,.portal-job,.table-wrap,.setup-card,.plan-card,.checklist-section,.client-event) {
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  box-shadow: none;
}

:is(html,html[data-theme]) .app-shell :is(.work-card,.metric):hover {
  transform: none;
  box-shadow: none;
}

:is(html,html[data-theme]) .app-shell :is(.work-header,.client-tab-header) {
  border-radius: 0;
  background: var(--ui-surface);
}

:is(html,html[data-theme]) :is(.app-shell,dialog,.record-drawer) :is(button,.button) {
  font-family: 'Source Sans 3','Segoe UI',Arial,sans-serif;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid var(--ui-border);
  border-radius: 6px;
  background: var(--ui-surface);
  color: var(--ui-text);
  box-shadow: none;
  transition: background-color .15s,border-color .15s;
}

:is(html,html[data-theme]) :is(.app-shell,dialog,.record-drawer) :is(button,.button):hover {
  background: var(--ui-hover);
  box-shadow: none;
  transform: none;
}

:is(html,html[data-theme]) :is(.app-shell,dialog,.record-drawer) :is(button,.button).primary {
  background: var(--ui-accent);
  border-color: var(--ui-accent);
  color: #fff;
  box-shadow: none;
}

:is(html,html[data-theme]) :is(.app-shell,dialog,.record-drawer) :is(button,.button).primary:hover {
  filter: brightness(.93);
}

:is(html,html[data-theme]) :is(.app-shell,dialog,.record-drawer) :is(button,.button):disabled {
  opacity: .55;
  cursor: not-allowed;
}

:is(html,html[data-theme]) .app-shell :is(.text-button,.global-search button) {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

:is(html,html[data-theme]) .app-shell .sidebar-bottom .text-button {
  min-height: 30px;
  padding: 4px 0;
  color: var(--ui-muted);
}

:is(html,html[data-theme]) :is(.app-shell,dialog,.record-drawer) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea) {
  font-family: 'Source Sans 3','Segoe UI',Arial,sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ui-text);
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: 6px;
  padding: 9px 11px;
  box-shadow: none;
}

:is(html,html[data-theme]) :is(.app-shell,dialog,.record-drawer) :is(input,textarea)::placeholder {
  color: var(--ui-muted);
  opacity: 1;
}

:is(html,html[data-theme]) :is(.app-shell,dialog,.record-drawer) :is(input,select,textarea):disabled {
  background: var(--ui-subtle);
  color: var(--ui-muted);
}

:is(html,html[data-theme]) :is(.app-shell,dialog,.record-drawer) label {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ui-text);
}

:is(html,html[data-theme]) .app-shell .global-search input {
  margin: 0;
  padding: 6px 8px;
  background: transparent;
  border: 0;
}

:is(html,html[data-theme]) .app-shell :is(.toolbar-actions,.form-actions,.filters) {
  gap: 10px;
}

:is(html,html[data-theme]) .app-shell :is(th,td) {
  padding: 12px 16px;
  line-height: 1.5;
  border-color: var(--ui-border);
}

:is(html,html[data-theme]) .app-shell th {
  background: var(--ui-subtle);
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .035em;
}

:is(html,html[data-theme]) .app-shell tbody tr:hover,:is(html,html[data-theme]) .app-shell tbody tr:hover>td {
  background: var(--ui-hover);
}

:is(html,html[data-theme]) .app-shell :is(.muted,.nav-heading,.user-link small,.recent-link small) {
  color: var(--ui-muted);
}

:is(html,html[data-theme]) .app-shell :is(.user-link,.record-title) {
  color: var(--ui-text);
}

:is(html,html[data-theme]) :is(.app-shell,dialog,.record-drawer) :focus-visible {
  outline: 2px solid var(--ui-focus);
  outline-offset: 3px;
}

@media(max-width:1050px) {
:is(html,html[data-theme]) .app-shell {
  grid-template-columns: 220px minmax(0,1fr);
}

:is(html,html[data-theme]) .app-shell .topbar {
  padding: 12px 20px;
}

:is(html,html[data-theme]) .app-shell .main-shell>main:not(.job-workspace):not(.mail-workspace) {
  padding: 22px;
}
}

@media(max-width:800px) {
:is(html,html[data-theme]) .app-shell {
  display: block;
}

:is(html,html[data-theme]) .app-shell .sidebar {
  top: 0;
  left: 0;
  bottom: 0;
  height: 100dvh;
  width: min(280px,calc(100vw - 48px));
  border: 0;
  border-right: 1px solid var(--ui-border);
  border-radius: 0;
  box-shadow: 4px 0 24px #2f2f2d14;
}

:is(html,html[data-theme]) .app-shell .topbar {
  padding: 10px 14px;
  flex-wrap: wrap;
  gap: 10px;
}

:is(html,html[data-theme]) .app-shell .global-search {
  order: 3;
  flex: 1 1 100%;
  max-width: none;
}

:is(html,html[data-theme]) .app-shell .main-shell>main:not(.job-workspace):not(.mail-workspace) {
  padding: 20px 16px;
}

:is(html,html[data-theme]) .app-shell h1 {
  font-size: 23px;
}

:is(html,html[data-theme]) .app-shell :is(button,.button) {
  min-height: 40px;
}

:is(html,html[data-theme]) .app-shell .footer {
  padding: 14px 16px;
}
}

@media(prefers-reduced-motion:reduce) {
:is(html,html[data-theme]) .app-shell *,:is(html,html[data-theme]) dialog * {
  transition: none!important;
  animation: none!important;
}
}
}

@media screen {
.app-shell .quick-views {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.app-shell .quick-views>a {
  padding: 8px 13px;
  border: 1px solid var(--ui-border);
  border-radius: 6px;
  background: var(--ui-surface);
  color: var(--ui-muted);
  font-size: 13px;
  text-decoration: none;
}

.app-shell .quick-views>a[aria-current] {
  background: var(--ui-selected);
  border-color: var(--ui-accent);
  color: var(--ui-link);
  font-weight: 600;
}

.app-shell .compact-work table {
  min-width: 1000px;
  width: 100%;
}

.app-shell .compact-work td:first-child {
  min-width: 240px;
  max-width: 340px;
}

.app-shell .compact-work td small {
  display: block;
  margin-top: 4px;
}

.app-shell .compact-work td [data-save-feedback] {
  font-size: 11px;
  color: var(--ui-link);
  white-space: normal;
  max-width: 300px;
}

html .app-shell .compact-work :is(select,input) {
  margin: 0;
  padding: 7px 9px;
  font-size: 13px;
  min-width: 140px;
  max-width: 200px;
}

.app-shell .compact-work progress {
  width: 110px;
  height: 5px;
  accent-color: var(--ui-accent);
}

.app-shell .client-tab-header {
  padding: 18px 20px 0;
  border: 1px solid var(--ui-border);
  border-radius: 8px 8px 0 0;
}

.app-shell .client-tab-header h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.app-shell .client-tab-header .work-tabs {
  gap: 4px;
  padding: 0;
}

.app-shell .client-tab-body {
  padding: 22px 0;
}

html .app-shell :is(.work-tabs,.portal-tabs)>a {
  border-radius: 6px 6px 0 0;
  border-bottom: 2px solid transparent;
  padding: 11px 16px;
}

html .app-shell :is(.work-tabs,.portal-tabs)>a:is(.current,.active,[aria-current]) {
  border-bottom-color: var(--ui-accent);
  background: var(--ui-selected);
  color: var(--ui-link);
}

html .app-shell .mailbox-split {
  grid-template-columns: minmax(280px,340px) minmax(0,1fr);
}

html .app-shell .mailbox-list,html .app-shell .mailbox-reader {
  max-height: calc(100dvh - 210px);
  min-height: 350px;
  overflow: auto;
  scrollbar-width: thin;
  background: var(--ui-surface);
}

html .app-shell .mailbox-item {
  border-bottom: 1px solid var(--ui-border);
  padding: 15px 16px;
  gap: 10px;
  background: var(--ui-surface);
  color: var(--ui-text);
  text-decoration: none;
}

html .app-shell .mailbox-item:hover {
  background: var(--ui-hover);
}

html .app-shell .mailbox-item.current {
  background: var(--ui-selected);
  box-shadow: inset 3px 0 var(--ui-accent);
}

.app-shell .mailbox-item>div {
  min-width: 0;
  flex: 1;
}

html .app-shell .mailbox-item.unread .mail-item-top strong {
  font-weight: 700;
  color: var(--ui-text);
}

html .app-shell .mail-unread-label {
  display: inline-block;
  color: var(--ui-link);
  font-weight: 600;
  font-size: 11px;
  margin-bottom: 4px;
}

html .app-shell .mailbox-folders {
  gap: 6px;
  padding: 8px 16px;
  overflow-x: auto;
  flex-wrap: nowrap;
  border-color: var(--ui-border);
}

html .app-shell .mailbox-folders>a {
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 6px;
}

html .app-shell .mail-state-actions,html .app-shell .mail-reader-actions {
  padding: 12px 18px;
  gap: 8px;
  display: flex;
  flex-wrap: wrap;
  border-color: var(--ui-border);
  background: var(--ui-surface);
}

.app-shell .mail-message-meta {
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}

.app-shell .mail-message-meta>div {
  min-width: 0;
}

@media(max-width:1000px) {
html .app-shell .mailbox-split {
  grid-template-columns: 1fr;
}

html .app-shell .mailbox-list {
  max-height: 320px;
  min-height: 0;
}

html .app-shell .mailbox-reader {
  max-height: none;
  min-height: 300px;
}

html .app-shell .mailbox-folders {
  flex-wrap: wrap;
}
}

@media(max-width:800px) {
.app-shell .client-tab-header {
  padding: 16px 12px 0;
}

.app-shell .client-tab-header .work-tabs {
  overflow-x: auto;
}

.app-shell .quick-views {
  gap: 6px;
}
}
}

@media screen {
.app-shell .client-focus-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--ui-muted);
}

.app-shell .client-focus-summary>.button {
  margin-left: auto;
}
}

@media screen {
.app-shell .saved-work-views {
  margin: -6px 0 18px;
  font-size: 13px;
}

.app-shell .saved-work-views summary {
  cursor: pointer;
  padding: 8px 0;
  color: var(--ui-link);
}

.app-shell .saved-views-content {
  max-width: 620px;
  padding: 16px;
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  background: var(--ui-surface);
}

.app-shell .saved-view-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--ui-border);
}

.app-shell .saved-view-row>a {
  overflow-wrap: anywhere;
}

.app-shell .saved-view-row form {
  margin: 0;
}

.app-shell .save-view-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}

.app-shell .save-view-form label {
  flex: 1;
  min-width: 180px;
  margin: 0;
}

.app-shell .keyboard-help {
  position: relative;
  font-size: 12px;
  margin-right: auto;
}

.app-shell .keyboard-help summary {
  cursor: pointer;
  color: var(--ui-link);
}

.app-shell .keyboard-help>div {
  position: absolute;
  bottom: 28px;
  left: 0;
  width: min(330px,80vw);
  padding: 18px;
  z-index: 10;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  box-shadow: 0 8px 30px #0002;
  color: var(--ui-text);
}

.app-shell .keyboard-help p:last-child {
  margin-bottom: 0;
}

.app-shell .footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

@media(prefers-reduced-motion:no-preference) {
@keyframes workspace-enter {
from{opacity:.6;transform:translateY(3px)}to{opacity:1;transform:none}
}
}
}

@media screen {
html[data-theme] .app-shell .mailbox-item {
  border: 0;
  border-bottom: 1px solid var(--ui-border);
  border-radius: 0;
  margin: 0;
  padding: 12px 14px;
  box-shadow: none;
  min-height: 90px;
}

html[data-theme] .app-shell .mailbox-item.current {
  background: var(--ui-selected);
  box-shadow: inset 3px 0 var(--ui-accent);
}

html[data-theme] .app-shell .mailbox-item b {
  color: var(--ui-text);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  font-weight: 500;
}

html[data-theme] .app-shell .mailbox-item.unread b {
  font-weight: 700;
}

html[data-theme] .app-shell .mailbox-item :is(p,time,small) {
  color: var(--ui-muted);
}

html[data-theme] .app-shell .mail-item-top strong {
  color: var(--ui-text);
}

html[data-theme] .app-shell .mailbox-item .mail-unread-label {
  font-size: 0;
  display: inline-block;
  width: 7px;
  height: 7px;
  padding: 0;
  border-radius: 50%;
  background: var(--ui-accent);
  float: right;
  margin: 5px 0 0 8px;
}

html[data-theme] .app-shell .mailbox-folders>a[aria-current],html[data-theme] .app-shell .mailbox-folders>a.current,html[data-theme] .app-shell .mail-subnav>a[aria-current] {
  background: var(--ui-selected);
  color: var(--ui-link);
  border-color: var(--ui-border);
}

html[data-theme] .app-shell .mail-more-actions {
  margin: 0;
  padding: 10px 18px;
  border-bottom: 1px solid var(--ui-border);
  background: var(--ui-surface);
  color: var(--ui-text);
}

.app-shell .mail-more-actions>summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--ui-muted);
}

html[data-theme] .app-shell .mail-reader-actions {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--ui-surface);
  padding: 12px 18px;
}

.app-shell .mail-reader-actions form {
  margin: 0;
}

html[data-theme] .app-shell .mail-reader-actions .mail-forward-action {
  color: #fff;
  background: var(--ui-accent);
  border-color: var(--ui-accent);
}

html[data-theme] .app-shell .mail-message h2 {
  color: var(--ui-text);
  font-size: 20px;
}

html[data-theme] .app-shell .mail-message-meta :is(strong,small,time) {
  color: var(--ui-muted);
}

html[data-theme] .app-shell :is(.mail-linker summary,.mail-more-actions summary) {
  color: var(--ui-link);
}

@media(max-width:650px) {
html[data-theme] .app-shell .mail-reader-actions {
  position: static;
}
}

@media(prefers-reduced-motion:no-preference) {
.app-shell .nav-group[open]>div {
  animation: clarity-reveal .16s ease-out;
}

.record-drawer[open] {
  animation: clarity-drawer .18s ease-out;
}

.mail-compose-dialog[open] {
  animation: clarity-reveal .16s ease-out;
}

@keyframes clarity-reveal {
from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:none}
}

@keyframes clarity-drawer {
from{opacity:.5;transform:translateX(16px)}to{opacity:1;transform:none}
}
}
}

@media screen {
html[data-theme] .app-shell .brand {
  color: var(--ui-text);
}

html[data-theme] .app-shell,html[data-theme] .app-shell :is(input,select,button,a,.panel) {
  transition-property: box-shadow,transform;
}
}

@media screen {
html[data-theme] :is(.ai-context-dialog,.ai-workspace) {
  color: var(--ui-text);
}

html[data-theme] .ai-context-dialog {
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: 16px;
  padding: 24px;
}

html[data-theme] :is(.ai-context-dialog,.ai-workspace) .ai-prompt-shell {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  padding: 14px;
  background: var(--ui-surface);
  color: var(--ui-text);
  overflow: hidden;
}

html[data-theme] :is(.ai-context-dialog,.ai-workspace) .ai-prompt-input {
  background: transparent;
  border: 0;
  box-shadow: none;
  margin: 0;
  padding: 6px 0;
  min-height: 100px;
  line-height: 1.65;
  color: var(--ui-text);
  resize: vertical;
}

html[data-theme] :is(.ai-context-dialog,.ai-workspace) .ai-prompt-input:focus-visible {
  outline: 0;
}

.ai-prompt-shell:focus-within {
  outline: 2px solid var(--ui-focus);
  outline-offset: 2px;
}

html[data-theme] .ai-prompt-hint {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--ui-muted);
}

.ai-prompt-count {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

html[data-theme] :is(.ai-context-dialog,.ai-workspace) [data-ai-generate] {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  border-radius: 9px;
  min-height: 42px;
  background: var(--ui-accent);
  border-color: var(--ui-accent);
  color: #fff;
  padding: 8px 10px 8px 16px;
}

.ai-send-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: #ffffff26;
  border-radius: 7px;
  font-size: 20px;
  line-height: 1;
}

html[data-theme] :is(.ai-context-dialog,.ai-workspace) [data-ai-status] {
  min-height: 24px;
  font-size: 13px;
  color: var(--ui-muted);
  margin: 12px 0 18px;
}

html[data-theme] [data-ai-form][data-state=ready] [data-ai-status] {
  color: #216b46;
}

html[data-theme=dark] [data-ai-form][data-state=ready] [data-ai-status] {
  color: #a7d8ba;
}

html[data-theme] [data-ai-form][data-state=error] [data-ai-status] {
  color: #ad3041;
}

html[data-theme=dark] [data-ai-form][data-state=error] [data-ai-status] {
  color: #f1aab5;
}

html[data-theme] [data-ai-form][data-state=working] .ai-prompt-shell {
  border-color: var(--ui-accent);
}

[data-ai-form][data-state=working] .ai-prompt-shell::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,transparent,#b93840,#d4d4cf,#b93840,transparent);
  background-size: 200% 100%;
  pointer-events: none;
}

html[data-theme] :is(.ai-context-dialog,.ai-workspace) .ai-result-shell {
  border-top: 1px solid var(--ui-border);
  padding-top: 18px;
  margin-top: 8px;
}

html[data-theme] :is(.ai-context-dialog,.ai-workspace) [data-ai-output] {
  background: var(--ui-surface);
  color: var(--ui-text);
  border-color: var(--ui-border);
  border-radius: 10px;
  line-height: 1.7;
}

@media(prefers-reduced-motion:no-preference) {
[data-ai-form][data-state=working] .ai-prompt-shell::after {
  animation: ai-shimmer 1.5s linear infinite;
}

[data-ai-generate]:hover:not(:disabled) .ai-send-icon {
  transform: translateY(-2px);
  transition: transform .16s ease;
}

.ai-result-ready .ai-result-shell {
  animation: ai-result-arrive .22s ease-out;
}

.ai-context-dialog[open] {
  animation: ai-result-arrive .18s ease-out;
}

.mail-comment:last-of-type,.task-comment:last-of-type {
  animation: ai-result-arrive .18s ease-out;
}

@keyframes ai-shimmer {
from{background-position:200% 0}to{background-position:0 0}
}

@keyframes ai-result-arrive {
from{opacity:.4;transform:translateY(5px)}to{opacity:1;transform:none}
}
}

@media(max-width:600px) {
html[data-theme] .ai-context-dialog {
  padding: 18px;
  width: calc(100vw - 20px);
  max-height: 92dvh;
}

.ai-context-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
}
}

:root {
  color-scheme: light;
}

[data-theme-toggle],.auth-theme-controls {
  display: none!important;
}

@media screen {
html[data-theme] .app-shell .ai-chat-launcher {
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 70;
  border-radius: 24px;
  padding: 12px 18px;
  background: var(--ui-accent);
  border-color: var(--ui-accent);
  color: #fff;
  box-shadow: 0 4px 20px #a42f3726;
}

html[data-theme] .app-shell .ai-chat-panel {
  position: fixed;
  right: 24px;
  bottom: 80px;
  width: min(410px,calc(100vw - 32px));
  height: min(700px,calc(100dvh - 110px));
  z-index: 71;
  margin: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ui-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 60px #a42f3730;
  background: var(--ui-surface);
  color: var(--ui-text);
}

html[data-theme] .app-shell .ai-chat-panel[hidden] {
  display: none;
}

.ai-chat-panel>header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--ui-border);
}

.ai-chat-panel>header small {
  display: block;
  font-size: 11px;
  margin-top: 3px;
  color: var(--ui-muted);
}

.ai-chat-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  padding: 18px;
  scrollbar-width: thin;
}

.ai-chat-panel label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 12px 0;
  font-size: 13px;
}

.ai-chat-panel .ai-confirm {
  flex-direction: row;
  align-items: flex-start;
  font-size: 12px;
  gap: 8px;
}

.ai-chat-panel .ai-confirm input {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 2px 0;
}

.ai-chat-panel .ai-chat-welcome {
  border-radius: 12px 12px 12px 3px;
  padding: 12px;
  background: var(--ui-selected);
  font-size: 13px;
  line-height: 1.6;
}

.ai-chat-panel .muted {
  font-size: 11px;
  line-height: 1.6;
}

.ai-chat-panel [data-ai-output] {
  min-height: 150px;
  resize: vertical;
}

.ai-chat-panel .ai-context-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

html[data-theme] .app-shell .ai-chat-panel .ai-prompt-input {
  min-height: 85px;
}

@media(max-width:600px) {
html[data-theme] .app-shell .ai-chat-launcher {
  right: 12px;
  bottom: 12px;
}

html[data-theme] .app-shell .ai-chat-panel {
  right: 12px;
  bottom: 70px;
  width: calc(100vw - 24px);
  height: calc(100dvh - 90px);
}
}

@media(prefers-reduced-motion:no-preference) {
.ai-chat-panel:not([hidden]) {
  animation: orbit-chat-open .18s ease-out;
}

@keyframes orbit-chat-open {
from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}
}
}
}

@media print {
.ai-chat-panel,.ai-chat-launcher {
  display: none!important;
}
}

@media screen {
html[data-theme=light] {
  --ui-page: #f6f6f5;
  --ui-surface: #fff;
  --ui-subtle: #f1f1ef;
  --ui-hover: #f0f0ee;
  --ui-border: #e3e3e0;
  --ui-text: #242424;
  --ui-muted: #626262;
  --ui-accent: #b93840;
  --ui-selected: #fbecee;
  --ui-link: #a42f37;
  --ui-focus: #b93840;
  --orbit-ease: cubic-bezier(.22,1,.36,1);
  color-scheme: light;
}

html[data-theme=light] :is(.app-shell,.auth,.public-site,dialog) {
  font-family: 'Source Sans 3','Segoe UI',Arial,sans-serif;
  font-size: 14px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

html[data-theme=light] .app-shell {
  --brand: var(--ui-accent);
  --ink: var(--ui-text);
  --muted: var(--ui-muted);
  --line: var(--ui-border);
  --soft: var(--ui-selected);
  color: var(--ui-text);
}

html[data-theme=light] .app-shell :is(h1,h2,h3) {
  color: var(--ui-text);
  font-weight: 600;
  letter-spacing: 0;
}

html[data-theme=light] .app-shell h1 {
  font-size: 28px;
  line-height: 1.25;
  font-weight: 500;
}

html[data-theme=light] .app-shell h2 {
  font-size: 18px;
  line-height: 1.4;
}

html[data-theme=light] .app-shell h3 {
  font-size: 15px;
}

html[data-theme=light] .app-shell :is(.muted,small,.eyebrow,.nav-heading,.work-meta-label) {
  color: var(--ui-muted);
  letter-spacing: 0;
}

html[data-theme=light] .app-shell :is(.eyebrow,.nav-heading,th,.work-meta-label) {
  text-transform: none;
  font-size: 12px;
  letter-spacing: 0;
}

html[data-theme=light] .app-shell .sidebar .nav-link {
  min-height: 36px;
  padding: 8px 12px;
  gap: 8px;
  font-size: 14px;
  font-weight: 400;
  border-radius: 5px;
}

html[data-theme=light] .app-shell .sidebar nav {
  gap: 4px;
}

html[data-theme=light] .app-shell .sidebar .nav-link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  stroke-width: 1.5;
  color: inherit;
}

html[data-theme=light] .app-shell .sidebar .nav-link.active {
  background: var(--ui-selected);
  color: var(--ui-link);
  font-weight: 600;
}

html[data-theme=light] .app-shell .nav-group {
  margin-top: 16px;
  padding-top: 8px;
}

html[data-theme=light] .app-shell .nav-group>summary {
  padding: 8px 12px;
  gap: 8px;
  font-size: 12px;
}

html[data-theme=light] .app-shell .nav-heading {
  padding: 0 12px;
  margin: 24px 0 8px;
}

html[data-theme=light] .app-shell .sidebar .brand {
  letter-spacing: 0;
  font-weight: 600;
}

html[data-theme=light] .app-shell .topbar {
  min-height:64px;
  background:var(--ui-surface);
  border-bottom:1px solid var(--ui-border);
  padding: 12px 24px;
}

html[data-theme=light] .app-shell .main-shell>main:not(.job-workspace):not(.mail-workspace) {
  padding: 24px;
}

html[data-theme=light] .app-shell :is(.panel,.table-wrap,.checklist-section,.client-event,.portal-job) {
  border-radius: 12px;
  box-shadow: none;
  border-color: var(--ui-border);
}

html[data-theme=light] :is(.app-shell,.auth,dialog,.record-drawer) :is(button,.button) {
  border-radius: 5px;
  padding: 8px 14px;
  min-height: 34px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
  transition: color 160ms var(--orbit-ease),background-color 160ms var(--orbit-ease),border-color 160ms var(--orbit-ease);
}

html[data-theme=light] :is(.app-shell,dialog,.record-drawer) :is(button,.button):hover {
  transform: none;
  filter: none;
}

html[data-theme=light] :is(.app-shell,dialog,.record-drawer) :is(button,.button).primary:hover {
  background: #9e2e36;
  border-color: #9e2e36;
  color: white;
}

html[data-theme=light] :is(.app-shell,.auth,dialog) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea) {
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ui-text);
  background-color: white;
  border-color: #d4d4cf;
  border-radius: 8px;
}

html[data-theme=light] :is(.app-shell,.auth,dialog) :is(input,textarea)::placeholder {
  color: #626262;
  opacity: 1;
}

html[data-theme=light] :is(.app-shell,.auth,.public-site,dialog) :focus-visible {
  outline: 2px solid var(--ui-focus);
  outline-offset: 3px;
}

html[data-theme=light] .app-shell :is(.actions,.form-actions,.mail-reader-actions,.ai-context-actions) {
  gap: 8px;
  flex-wrap: wrap;
}

html[data-theme=light] .app-shell table th {
  font-weight: 500;
  color: var(--ui-muted);
  background: #f6f6f5;
}

html[data-theme=light] .app-shell table :is(td,th) {
  padding: 16px 20px;
  border-color: var(--ui-border);
}

html[data-theme=light] .app-shell table tbody tr:hover {
  background: var(--ui-hover);
}

html[data-theme=light] .app-shell .record-title {
  color: var(--ui-text);
  font-weight: 500;
}

html[data-theme=light] .app-shell .record-title:hover {
  color: var(--ui-link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

html[data-theme=light] .app-shell .mailbox-item {
  padding: 16px;
  min-height: 88px;
  border-bottom: 1px solid var(--ui-border);
}

html[data-theme=light] .app-shell .mailbox-item.unread b {
  font-weight: 600;
}

html[data-theme=light] .app-shell .mail-reader-actions {
  padding: 12px 20px;
  gap: 8px;
  border-bottom: 1px solid var(--ui-border);
  background: #fff;
}

html[data-theme=light] .app-shell .mail-message h2 {
  font-size: 22px;
  font-weight: 500;
}

html[data-theme=light] .app-shell .ai-chat-launcher {
  bottom: 24px;
}

html[data-theme=light] .app-shell .ai-chat-panel {
  box-shadow: 0 12px 36px #24242424;
}

html[data-theme=light] .app-shell .ai-chat-panel>header,html[data-theme=light] .app-shell .ai-chat-scroll {
  padding: 16px;
}

html[data-theme=light] .app-shell .ai-chat-panel :is(.muted,header small) {
  font-size: 12px;
  line-height: 1.5;
}

html[data-theme=light] .auth {
  background: var(--ui-page);
}

html[data-theme=light] .auth .auth-brand {
  background: #242424;
  box-shadow: none;
}

html[data-theme=light] .auth .auth-brand:before,html[data-theme=light] .auth .auth-brand:after {
  display: none;
}

html[data-theme=light] .auth h1 {
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
}

html[data-theme=light] .auth .auth-brand>span {
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
}

html[data-theme=light] .auth .auth-form {
  padding: 48px;
}

html[data-theme=light] .auth .auth-form label {
  font-size: 14px;
  color: var(--ui-text);
}

html[data-theme=light] .auth .auth-form form {
  gap: 20px;
}

html[data-theme=light] body.public-site {
  background: #f6f6f5;
  padding: 0;
  color: #242424;
  --ink: #242424;
  --muted: #626262;
  --line: #e3e3e0;
  --soft: #fbecee;
}

html[data-theme=light] .public-site .site-nav {
  max-width: 1280px;
  padding: 20px 32px;
  margin: 0 auto;
  border: 0;
  border-bottom: 1px solid #e3e3e0;
  border-radius: 0;
  background: transparent;
}

html[data-theme=light] .public-site .site-nav nav>a {
  border-radius: 8px;
  font-size: 14px;
}

html[data-theme=light] .public-site main {
  max-width: 1280px;
  border: 0;
  border-radius: 0;
  background: white;
  animation: none;
}

html[data-theme=light] .public-site :is(h1,h2,h3) {
  color: #242424;
  font-weight: 500;
}

html[data-theme=light] .public-site .hero {
  padding: 80px 48px;
  gap: 48px;
  align-items: center;
}

html[data-theme=light] .public-site .hero h1 {
  font-size: clamp(36px,4.2vw,56px);
  line-height: 1.08;
  letter-spacing: -.025em;
}

html[data-theme=light] .public-site .lead {
  font-size: 18px;
  line-height: 1.6;
  color: #626262;
}

html[data-theme=light] .public-site .eyebrow {
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: #626262;
}

html[data-theme=light] .public-site .muted {
  font-size: 13px;
  color: #626262;
}

html[data-theme=light] .public-site :is(button,.button) {
  border-radius: 8px;
  min-height: 44px;
  padding: 12px 20px;
  font-weight: 500;
  box-shadow: none;
  transition: background-color 160ms var(--orbit-ease),border-color 160ms var(--orbit-ease);
}

html[data-theme=light] .public-site .button:hover {
  transform: none;
}

html[data-theme=light] .public-site .button.primary {
  background: #b93840;
  border-color: #b93840;
  color: white;
}

html[data-theme=light] .public-site .section {
  padding: 48px;
}

html[data-theme=light] .public-site .product-preview {
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 8px 24px #2424240a;
}

html[data-theme=light] .public-site .mini-stats {
  gap: 8px;
  margin: 24px 0;
}

html[data-theme=light] .public-site .mini-stats div {
  padding: 16px 12px;
  border-radius: 8px;
  background: #f6f6f5;
  color: #626262;
  font-size: 12px;
}

html[data-theme=light] .public-site .mini-stats div:first-child {
  background: #fbecee;
  color: #a42f37;
  border-color: #e3e3e0;
}

html[data-theme=light] .public-site .mini-stats b {
  font-size: 32px;
  font-weight: 500;
  color: #242424;
}

html[data-theme=light] .public-site .mini-stats div:first-child b {
  color: #a42f37;
}

html[data-theme=light] .public-site .work-row {
  padding: 16px 8px;
  gap: 12px;
  border-radius: 0;
}

html[data-theme=light] .public-site .work-row :is(small,.pill) {
  font-size: 12px;
  color: #626262;
}

html[data-theme=light] .public-site .preview-note {
  border-radius: 8px;
  border-left: 3px solid #b93840;
  background: #f6f6f5;
  color: #242424;
}

html[data-theme=light] .public-site .feature-grid article:before {
  display: none;
}

html[data-theme=light] .public-site .feature-grid article {
  padding: 24px;
  border-radius: 12px;
  box-shadow: none;
  transform: none;
  transition: none;
}

html[data-theme=light] .public-site .feature-grid p {
  font-size: 14px;
  line-height: 1.6;
  color: #626262;
}

html[data-theme=light] .public-site :is(.price-card,.public-form) {
  padding: 32px;
  border-radius: 12px;
  box-shadow: none;
  border-color: #e3e3e0;
}

html[data-theme=light] .public-site .price-card.recommended {
  border-color: #b93840;
  box-shadow: inset 0 3px #b93840;
}

html[data-theme=light] .public-site .price-card .price {
  font-weight: 500;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

html[data-theme=light] .public-site .price-controls {
  border-radius: 12px;
  padding: 16px;
  gap: 16px;
}

html[data-theme=light] .public-site .public-form :is(label,.muted) {
  font-size: 13px;
}

html[data-theme=light] .public-site :is(input,select,textarea) {
  font: inherit;
  border-color: #d4d4cf;
  border-radius: 8px;
  color: #242424;
  background: white;
}

html[data-theme=light] .public-site footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px;
  border-radius: 0;
  border: 0;
  border-top: 1px solid #e3e3e0;
  background: transparent;
  gap: 24px;
}

@media(max-width:760px) {
html[data-theme=light] .public-site .hero,html[data-theme=light] .public-site .section {
  padding: 32px 20px;
  gap: 24px;
}

html[data-theme=light] .public-site .site-nav {
  padding: 16px 20px;
}

html[data-theme=light] .public-site .public-form {
  padding: 24px;
}

html[data-theme=light] .auth .auth-form {
  padding: 32px 24px;
}
}

@media(max-width:600px) {
html[data-theme=light] .app-shell .main-shell>main:not(.job-workspace):not(.mail-workspace) {
  padding: 16px;
}

html[data-theme=light] .app-shell .topbar {
  padding: 12px 16px;
}

html[data-theme=light] .app-shell table :is(td,th) {
  padding: 12px 16px;
}

html[data-theme=light] .app-shell .ai-chat-launcher {
  bottom: 12px;
}

html[data-theme=light] .public-site .mini-stats div {
  padding: 12px 8px;
}

html[data-theme=light] .public-site .work-row {
  flex-wrap: wrap;
}
}

@media(prefers-reduced-motion:reduce) {
html[data-theme=light] :is(.app-shell,.public-site,.auth,dialog) *,html[data-theme=light] :is(.app-shell,.public-site,.auth,dialog) *::before,html[data-theme=light] :is(.app-shell,.public-site,.auth,dialog) *::after {
  animation: none!important;
  transition: none!important;
  scroll-behavior: auto!important;
}
}
}

@media screen {
html[data-theme=light] .app-shell .global-search input {
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

html[data-theme=light] .app-shell .sidebar .nav-link {
  margin: 2px 0;
}

html[data-theme=light] .app-shell .sidebar .nav-group {
  margin-top: 8px;
  padding-top: 8px;
}

html[data-theme=light] .app-shell .sidebar .nav-group>summary {
  min-height: 36px;
}
}

@media screen {
html[data-theme=light] .app-shell .ai-chat-launcher {
  display: grid;
  place-items: center;
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 52px;
  height: 52px;
  min-height: 52px;
  padding: 0;
  border-radius: 50%;
  background: #b93840;
  color: #fff;
  border: 1px solid #b93840;
  box-shadow: 0 4px 16px #24242424;
  z-index: 70;
}

html[data-theme=light] .app-shell .ai-chat-launcher:hover {
  background: #9e2e36;
  color: #fff;
}

html[data-theme=light] .app-shell .ai-chat-launcher svg {
  display: block;
  width: 24px;
  height: 24px;
}

html[data-theme=light] .app-shell .ai-chat-panel {
  bottom: 88px;
}

@media(max-width:600px) {
html[data-theme=light] .app-shell .ai-chat-launcher {
  right: 16px;
  bottom: 16px;
}

html[data-theme=light] .app-shell .ai-chat-panel {
  right: 12px;
  bottom: 80px;
  height: calc(100dvh - 96px);
}
}
}

@media screen {
html[data-theme=light] .app-shell .ai-conversation {
  height: min(620px,calc(100dvh - 112px));
  width: min(400px,calc(100vw - 24px));
}

.ai-conversation .orbit-chat-messages {
  flex: 1;
  min-height: 100px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overscroll-behavior: contain;
}

.orbit-chat-message {
  max-width: 92%;
  padding: 12px 16px;
  margin: 0;
  border-radius: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.55;
  flex-shrink: 0;
}

html[data-theme=light] .app-shell .orbit-chat-message.assistant {
  align-self: flex-start;
  background: #f1f1ef;
  color: #242424;
  border-bottom-left-radius: 4px;
}

html[data-theme=light] .app-shell .orbit-chat-message.user {
  align-self: flex-end;

  border-bottom-right-radius: 4px;
  background: var(--ui-selected);
  color: var(--ui-text);
}

.orbit-chat-suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 16px 12px;
}

.orbit-chat-suggestions[hidden] {
  display: none;
}

html[data-theme=light] .app-shell .orbit-chat-suggestions button {
  font-size: 12px;
  padding: 6px 10px;
  min-height: 32px;
  border-radius: 16px;
}

.orbit-chat-compose {
  margin: 0;
  padding: 12px 16px 16px;
  border-top: 1px solid #e3e3e0;
}

.orbit-chat-input {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px;
  border: 1px solid #d4d4cf;
  border-radius: 12px;
}

.orbit-chat-input:focus-within {
  border-color: #b93840;
  box-shadow: 0 0 0 2px #b9384018;
}

html[data-theme=light] .app-shell .orbit-chat-input textarea {
  border: 0;
  box-shadow: none;
  outline: none;
  resize: vertical;
  min-height: 48px;
  max-height: 120px;
  margin: 0;
  padding: 4px;
  flex: 1;
  min-width: 0;
  background: transparent;
}

html[data-theme=light] .app-shell .orbit-chat-input button {
  width: 36px;
  height: 36px;
  padding: 0;
  flex-shrink: 0;
  font-size: 22px;
}

.orbit-chat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 11px;
  color: #626262;
}

html[data-theme=light] .app-shell .orbit-chat-meta button {
  border: 0;
  min-height: 28px;
  padding: 4px;
  font-size: 12px;
  color: #a42f37;
}

.orbit-chat-privacy {
  font-size: 11px;
  line-height: 1.5;
  color: #626262;
  margin: 8px 0 0;
}

.orbit-chat-error {
  color: #a52e3b;
  font-size: 12px;
  margin: 8px 0 0;
}

.orbit-chat-error:empty {
  display: none;
}

.thinking:after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 8px;
  border: 2px solid #e3e3e0;
  border-top-color: #b93840;
  border-radius: 50%;
  animation: orbit-thinking .8s linear infinite;
}

@keyframes orbit-thinking {
to{transform:rotate(360deg)}
}

@media(prefers-reduced-motion:reduce) {
.thinking:after {
  animation: none;
}
}

@media(max-width:600px) {
html[data-theme=light] .app-shell .ai-conversation {
  height: min(620px,calc(100dvh - 96px));
}
}
}

@media screen {
html[data-theme=light] .app-shell .ai-conversation .orbit-chat-input textarea {
  border: 0!important;
  box-shadow: none!important;
  outline: none!important;
  background: transparent!important;
}
}

@media screen {
.orbit-chat-info {
  position: relative;
  display: block;
  margin-top: 4px;
  text-align: right;
}

.orbit-chat-info>summary {
  display: inline-block;
  cursor: pointer;
  color: #626262;
  list-style: none;
  font-size: 16px;
  line-height: 24px;
  padding: 0 4px;
}

.orbit-chat-info>summary::-webkit-details-marker {
  display: none;
}

.orbit-chat-info .orbit-chat-privacy {
  position: absolute;
  bottom: 28px;
  right: 0;
  width: 280px;
  max-width: calc(100vw - 80px);
  padding: 12px;
  background: #fff;
  border: 1px solid #e3e3e0;
  border-radius: 8px;
  box-shadow: 0 4px 16px #24242414;
  text-align: left;
  z-index: 2;
}
}

@media screen {
html[data-theme=light] .app-shell .ai-conversation {
  height: min(440px,calc(100dvh - 112px));
  border-radius: 16px;
  border: 1px solid var(--ui-border);
  box-shadow: 0 16px 48px #2424241a;
}

html[data-theme=light] .app-shell .ai-conversation.has-conversation {
  height: min(600px,calc(100dvh - 112px));
}

.ai-conversation:not(.has-conversation) .orbit-chat-messages {
  flex: 0 0 auto;
  min-height: 0;
  padding-bottom: 12px;
}

.ai-conversation:not(.has-conversation) .orbit-chat-suggestions {
  flex: 1;
  align-content: flex-start;
}

html[data-theme=light] .app-shell .ai-conversation .orbit-chat-message {
  font-size: 14px;
}

html[data-theme=light] .app-shell .ai-conversation .orbit-chat-meta {
  font-size: 12px;
}

@media(max-width:600px) {
html[data-theme=light] .app-shell .ai-conversation,html[data-theme=light] .app-shell .ai-conversation.has-conversation {
  max-height: calc(100dvh - 96px);
}

.orbit-chat-meta {
  flex-wrap: wrap;
}
}
}

@media screen and (max-width:600px) {
html[data-theme=light] .app-shell #dashboard-entity {
  grid-column: 1;
  grid-row: 2;
  width: 100%;
}

html[data-theme=light] .app-shell #dashboard-scope {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
}
}

html[data-theme=light] .app-shell .work-tabs {
  gap: 24px;
  padding: 0;
  background: transparent;
  border-bottom: 1px solid var(--ui-border);
  overflow-x: auto;
  flex-wrap: nowrap;
}

html[data-theme=light] .app-shell .work-tabs a {
  padding: 12px 4px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
  color: var(--ui-muted);
  font-size: 15px;
  font-weight: 400;
}

html[data-theme=light] .app-shell .work-tabs a.current {
  border-bottom-color: var(--ui-accent);
  color: var(--ui-link);
  font-weight: 500;
  background: transparent;
}

html[data-theme=light] .app-shell .checklist-section {
  border-radius: 8px;
  margin-bottom: 16px;
  background: #fff;
}

html[data-theme=light] .app-shell .checklist-section>summary {
  padding: 16px 20px;
  min-height: 56px;
  background: var(--ui-page);
  gap: 16px;
  font-size: 15px;
  font-weight: 500;
}

html[data-theme=light] .app-shell .task-row {
  padding: 16px 20px;
  border-top: 1px solid var(--ui-border);
  background: #fff;
}

html[data-theme=light] .app-shell .client-event {
  padding: 20px 24px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid var(--ui-border);
  background: #fff;
}

html[data-theme=light] .app-shell .client-event-meta {
  gap: 12px;
  color: var(--ui-muted);
  font-size: 13px;
  margin-bottom: 8px;
}

html[data-theme=light] .app-shell .portal-tabs {
  gap: 24px;
  flex-wrap: nowrap;
  overflow-x: auto;
  border-bottom: 1px solid var(--ui-border);
  margin-bottom: 24px;
}

html[data-theme=light] .app-shell .portal-tabs a {
  padding: 12px 4px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ui-muted);
  white-space: nowrap;
  font-size: 15px;
}

html[data-theme=light] .app-shell .portal-tabs a.current {
  border-bottom-color: var(--ui-accent);
  color: var(--ui-link);
  font-weight: 500;
  margin-bottom: 0;
}

html[data-theme=light] .app-shell .portal-job {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--ui-border);
  border-radius: 8px;
}

html[data-theme=light] .app-shell .mailbox-item.current {
  background: var(--ui-selected);
  box-shadow: inset 3px 0 var(--ui-accent);
}

html[data-theme=light] .app-shell .mailbox-item:hover {
  background: var(--ui-hover);
}

html[data-theme=light] .app-shell .mailbox-folders {
  gap: 20px;
  padding: 0 20px;
  overflow-x: auto;
  flex-wrap: nowrap;
}

html[data-theme=light] .app-shell .mailbox-folders a {
  white-space: nowrap;
  padding: 12px 0;
  border-radius: 0;
  font-size: 14px;
}

html[data-theme=light] .app-shell .mailbox-folders a[aria-current] {
  color: var(--ui-link);
  border-bottom: 2px solid var(--ui-accent);
  background: transparent;
}

html[data-theme=light] .app-shell .form-panel {
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--ui-border);
  box-shadow: none;
}

html[data-theme=light] .app-shell .fields {
  gap: 20px;
}

html[data-theme=light] .app-shell .mail-compose .mail-format-toolbar {
  gap: 4px;
  padding: 8px;
  background: var(--ui-page);
  border-bottom: 1px solid var(--ui-border);
  align-items: center;
}

html[data-theme=light] .app-shell .mail-compose .mail-format-toolbar button {
  min-height: 32px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
}

@media(max-width:600px){html[data-theme=light] .app-shell :is(.work-inner,.work-body){width:100%;min-width:0;padding-left:16px;padding-right:16px;}html[data-theme=light] .app-shell :is(.work-tabs,.portal-tabs){gap:20px;}html[data-theme=light] .app-shell :is(.task-row,.client-event,.form-panel){padding:16px;}html[data-theme=light] .app-shell .checklist-section>summary{padding:12px 16px;}html[data-theme=light] .app-shell .fields{grid-template-columns:minmax(0,1fr);}html[data-theme=light] .app-shell .mailbox-folders small{display:none;}}

/* Shared inbox: folder rail, conversation list and reading pane.
   Scoped to the mailbox; original email iframe styles remain untouched. */
html[data-theme=light] .app-shell .mailbox-focused .mailbox-split{display:grid;grid-template-columns:164px minmax(260px,304px) minmax(0,1fr);min-height:calc(100dvh - 148px);gap:0;align-items:stretch;}
html[data-theme=light] .app-shell .mailbox-focused .mailbox-folders{display:flex;flex-direction:column;align-items:stretch;gap:4px;padding:16px 12px;background:var(--ui-page);border:0;border-right:1px solid var(--ui-border);overflow:auto;flex-wrap:nowrap;}
html[data-theme=light] .app-shell .mailbox-focused .mailbox-folders a{padding:8px 12px;min-height:36px;border:0;border-radius:6px;font-size:14px;color:var(--ui-muted);font-weight:400;}
html[data-theme=light] .app-shell .mailbox-focused .mailbox-folders a[aria-current]{background:var(--ui-selected);color:var(--ui-link);font-weight:600;box-shadow:none;}
html[data-theme=light] .app-shell .mailbox-focused .mailbox-folders small{margin:24px 8px 0;font-size:12px;white-space:normal;line-height:1.5;}
html[data-theme=light] .app-shell .mailbox-focused :is(.mailbox-list,.mailbox-reader){min-width:0;min-height:360px;max-height:calc(100dvh - 148px);overflow:auto;}
html[data-theme=light] .app-shell .mailbox-focused .mailbox-search{position:sticky;top:0;z-index:1;background:white;padding:12px;gap:8px;}
html[data-theme=light] .app-shell .mailbox-focused .mailbox-search button{padding:8px;font-size:12px;}
html[data-theme=light] .app-shell .mailbox-focused .mailbox-item{padding:16px 12px;gap:12px;min-height:104px;}
html[data-theme=light] .app-shell .mailbox-focused .mailbox-item .mail-avatar{width:28px;height:28px;font-size:12px;background:var(--ui-subtle);color:var(--ui-muted);border-radius:8px;}
html[data-theme=light] .app-shell .mailbox-focused .mail-item-top{align-items:baseline;gap:8px;margin-bottom:4px;}
html[data-theme=light] .app-shell .mailbox-focused .mail-item-top strong{font-size:13px;}
html[data-theme=light] .app-shell .mailbox-focused .mail-item-top time{font-size:12px;color:var(--ui-muted);white-space:nowrap;}
html[data-theme=light] .app-shell .mailbox-focused .mailbox-item b{font-size:14px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
html[data-theme=light] .app-shell .mailbox-focused .mailbox-item.unread b{font-weight:600;}
html[data-theme=light] .app-shell .mailbox-focused .mailbox-item p{font-size:13px;margin:4px 0 0;}
html[data-theme=light] .app-shell .mailbox-focused .mail-reader-actions{position:sticky;top:0;z-index:2;padding:12px 20px;gap:8px;background:white;}
html[data-theme=light] .app-shell .mailbox-focused .mail-reader-actions .button{font-size:13px;padding:6px 12px;}
html[data-theme=light] .app-shell .mailbox-focused .mail-message{padding:24px;}
html[data-theme=light] .app-shell .mailbox-focused .mail-message h2{font-size:24px;line-height:1.3;font-weight:500;margin:0 0 24px;overflow-wrap:anywhere;}
html[data-theme=light] .app-shell .mailbox-focused .mail-message-meta{gap:12px;padding-bottom:20px;border-bottom:1px solid var(--ui-border);margin-bottom:20px;}
html[data-theme=light] .app-shell .mailbox-focused .mail-comments{padding:24px;border-top:1px solid var(--ui-border);background:#fafaf9;}
html[data-theme=light] .app-shell .mailbox-focused .mail-comment-bubble{background:#f7f1e8;color:var(--ui-text);border:1px solid #e8dfcf;border-radius:8px;padding:12px 16px;}
html[data-theme=light] .app-shell .mailbox-focused .mail-comment-form{padding:16px;border:1px solid var(--ui-border);border-radius:8px;background:white;}
html[data-theme=light] .app-shell .mail-context{margin:0 0 20px;border:1px solid var(--ui-border);border-radius:8px;padding:12px 16px;}
html[data-theme=light] .app-shell .mail-context summary{cursor:pointer;color:var(--ui-muted);font-size:13px;}
html[data-theme=light] .app-shell .mail-context>div{display:flex;gap:24px;flex-wrap:wrap;padding-top:12px;}
html[data-theme=light] .app-shell .mail-context a{display:grid;gap:4px;color:var(--ui-link);}
html[data-theme=light] .app-shell .mail-context small{color:var(--ui-muted);}
@media(max-width:1200px){html[data-theme=light] .app-shell .mailbox-focused .mailbox-split{grid-template-columns:minmax(240px,300px) minmax(0,1fr);}html[data-theme=light] .app-shell .mailbox-focused .mailbox-folders{grid-column:1/-1;flex-direction:row;overflow-x:auto;border-right:0;border-bottom:1px solid var(--ui-border);padding:8px 12px;}html[data-theme=light] .app-shell .mailbox-focused .mailbox-folders small{display:none;}html[data-theme=light] .app-shell .mailbox-focused :is(.mailbox-list,.mailbox-reader){max-height:calc(100dvh - 204px);}}
@media(max-width:700px){html[data-theme=light] .app-shell .mailbox-focused .mailbox-split{grid-template-columns:minmax(0,1fr);}html[data-theme=light] .app-shell .mailbox-focused .mailbox-list{max-height:280px;min-height:0;border-right:0;border-bottom:1px solid var(--ui-border);}html[data-theme=light] .app-shell .mailbox-focused .mailbox-reader{max-height:none;min-height:320px;}html[data-theme=light] .app-shell .mailbox-focused :is(.mail-message,.mail-comments){padding:16px;}html[data-theme=light] .app-shell .mailbox-focused .mail-reader-actions{position:static;padding:12px 16px;}html[data-theme=light] .app-shell .mailbox-focused .mail-message h2{font-size:22px;}}

/* ============================================================
   Phase 1 — staff shell firm-desk lock (Paper & Coral)
   Keep last so it wins over older soft-SaaS layers.
   ============================================================ */
@media screen {
html[data-theme=light] {
  --ink: #2f2f2d;
  --muted: #6e6e68;
  --ui-text: #2f2f2d;
  --ui-muted: #6e6e68;
  --ui-selected: #fff0ef;
  --soft: #fff0ef;
}

html[data-theme=light] .app-shell {
  gap: 0;
  padding: 0;
  background: #f6f6f5;
  color: var(--ui-text);
}

html[data-theme=light] .app-shell .sidebar {
  top: 0;
  height: 100vh;
  height: 100dvh;
  border: 0;
  border-right: 1px solid var(--ui-border);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

html[data-theme=light] .app-shell .sidebar-bottom {
  border-radius: 0;
  background: #fff;
  border-top: 1px solid var(--ui-border);
}

html[data-theme=light] .app-shell .brand {
  color: var(--ui-text);
  font-weight: 600;
  letter-spacing: 0;
}

html[data-theme=light] .app-shell .brand img {
  border-radius: 4px;
}

html[data-theme=light] .app-shell .brand small {
  color: var(--ui-muted);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
}

html[data-theme=light] .app-shell .workspace-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 14px 16px;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--ui-text);
}

html[data-theme=light] .app-shell .workspace-label .avatar {
  border-radius: 4px;
  background: #fff0ef;
  color: #a42f37;
  border: 1px solid #f0d5ce;
}

html[data-theme=light] .app-shell .topbar {
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--ui-border);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  min-height: 56px;
}

html[data-theme=light] .app-shell .main-shell>main {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #f6f6f5;
}

html[data-theme=light] .app-shell .global-search {
  border-radius: 5px;
  box-shadow: none;
}

html[data-theme=light] :is(.app-shell,dialog,.record-drawer) :is(button,.button) {
  border-radius: 5px;
  box-shadow: none;
}

html[data-theme=light] :is(.app-shell,dialog,.record-drawer) :is(button,.button).primary {
  box-shadow: none;
  filter: none;
}

html[data-theme=light] :is(.app-shell,dialog,.record-drawer) :is(button,.button).primary:hover {
  box-shadow: none;
  filter: none;
  background: #9e2e36;
  border-color: #9e2e36;
}

html[data-theme=light] .app-shell .sidebar .nav-link {
  border-radius: 5px;
  transform: none;
}

html[data-theme=light] .app-shell .sidebar .nav-link:hover {
  transform: none;
  background: #f6f6f5;
}

html[data-theme=light] .app-shell .sidebar .nav-link.active {
  background: #fff0ef;
  color: #b93840;
  font-weight: 600;
  box-shadow: none;
}

html[data-theme=light] .app-shell .sidebar .nav-link.active:before {
  left: 0;
  width: 2px;
  border-radius: 0;
  background: #b93840;
}

html[data-theme=light] .app-shell .sidebar .nav-link .upload-inbox-count,
html[data-theme=light] .app-shell .upload-inbox-count {
  border-radius: 4px;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
}

html[data-theme=light] .app-shell .avatar {
  border-radius: 4px;
}

html[data-theme=light] .app-shell h1,
html[data-theme=light] .app-shell .context-title strong,
html[data-theme=light] .app-shell .record-title,
html[data-theme=light] .app-shell .user-link {
  color: var(--ui-text);
}

html[data-theme=light] .app-shell :is(.muted,small,.eyebrow,.nav-heading,.intro,.user-link small) {
  color: var(--ui-muted);
}

/* Soft paper grain — subtle, not a decorative gradient */
html[data-theme=light] .app-shell .main-shell>main:not(.job-workspace):not(.mail-workspace) {
  background-color: #f6f6f5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.45 0 0 0 0 0.42 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (max-width: 800px) {
  html[data-theme=light] .app-shell .sidebar {
    top: 0;
    left: 0;
    bottom: 0;
    height: 100dvh;
    border-radius: 0;
    border-right: 1px solid var(--ui-border);
  }
}
}

/* Phase 2 - lists lock: Clients, Work, My work. Ruled paper tables, squared status chips, inline toolbars. */
@media screen {
  html[data-theme=light] .app-shell {
    --list-rule: #e6e6e2;
    --list-rule-strong: #d6d6d0;
    --list-head: #faf9f7;
    --list-row-hover: #faf9f7;
    --list-control-h: 34px;
  }

  html[data-theme=light] .app-shell .toolbar {
    margin: 16px 0 12px;
    gap: 10px 12px;
  }

  html[data-theme=light] .app-shell .search-form {
    gap: 8px;
  }

  html[data-theme=light] .app-shell .search-label svg {
    left: 11px;
    width: 16px;
    height: 16px;
    pointer-events: none;
  }

  html[data-theme=light] .app-shell .toolbar :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]),select:not([hidden]):not([multiple]):not([size]),button,.button),
  html[data-theme=light] .app-shell .week-filters :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]),select:not([hidden]):not([multiple]):not([size]),button,.button) {
    height: var(--list-control-h);
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    font-size: 13px;
    border-radius: 5px;
  }

  html[data-theme=light] .app-shell .toolbar .search-label input:not([type=hidden]):not([type=checkbox]):not([type=radio]) {
    padding-left: 34px;
  }

  html[data-theme=light] .app-shell .toolbar :is(button,.button) {
    display: inline-flex;
    align-items: center;
    padding-left: 12px;
    padding-right: 12px;
  }

  html[data-theme=light] .app-shell .toolbar-actions {
    gap: 6px;
  }

  html[data-theme=light] .app-shell .toolbar-actions .muted {
    margin-right: 6px;
    font-size: 12.5px;
  }

  html[data-theme=light] .app-shell .toolbar-actions .button.selected {
    background: var(--ui-subtle);
    border-color: var(--list-rule-strong);
    color: var(--ui-text);
    font-weight: 600;
  }

  html[data-theme=light] .app-shell .quick-views {
    gap: 22px;
    margin: 0 0 4px;
    border-bottom: 1px solid var(--list-rule);
  }

  html[data-theme=light] .app-shell .quick-views>a {
    padding: 8px 1px 9px;
    margin-bottom: -1px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--ui-muted);
    font-size: 13px;
    font-weight: 500;
  }

  html[data-theme=light] .app-shell .quick-views>a:hover {
    color: var(--ui-text);
    background: transparent;
  }

  html[data-theme=light] .app-shell .quick-views>a[aria-current] {
    background: transparent;
    border-bottom-color: var(--ui-accent);
    color: var(--ui-text);
    font-weight: 600;
  }

  html[data-theme=light] .app-shell .saved-work-views {
    margin: 6px 0 0;
  }

  html[data-theme=light] .app-shell .saved-work-views summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    list-style: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--ui-muted);
    cursor: pointer;
  }

  html[data-theme=light] .app-shell .saved-work-views summary::-webkit-details-marker {
    display: none;
  }

  html[data-theme=light] .app-shell .saved-work-views summary::marker {
    content: "";
  }

  html[data-theme=light] .app-shell .saved-work-views summary::after {
    content: "";
    width: 0;
    height: 0;
    margin-left: 1px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
  }

  html[data-theme=light] .app-shell .saved-work-views details[open]>summary::after {
    border-top: 0;
    border-bottom: 5px solid currentColor;
  }

  html[data-theme=light] .app-shell .saved-view-row>a {
    color: var(--ui-text);
    font-weight: 500;
  }

  html[data-theme=light] .app-shell .saved-view-row>a:hover {
    color: var(--ui-link);
    text-decoration: underline;
  }

  html[data-theme=light] .app-shell .saved-work-views summary:hover {
    color: var(--ui-text);
  }

  html[data-theme=light] .app-shell .saved-work-views summary:focus-visible {
    outline: 2px solid var(--ui-accent);
    outline-offset: 2px;
    border-radius: 3px;
  }

  html[data-theme=light] .app-shell .saved-work-views .saved-views-content {
    border-radius: 5px;
    padding: 12px 14px;
    box-shadow: none;
  }

  html[data-theme=light] .app-shell .panel.no-pad {
    border: 1px solid var(--list-rule);
    border-radius: 5px;
    box-shadow: none;
    overflow: hidden;
    background: var(--ui-surface);
  }

  html[data-theme=light] .app-shell .table-wrap {
    border: 1px solid var(--list-rule);
    border-radius: 5px;
    box-shadow: none;
    background: var(--ui-surface);
  }

  html[data-theme=light] .app-shell .panel.no-pad .table-wrap {
    border: 0;
    border-radius: 0;
  }

  html[data-theme=light] .app-shell table th {
    padding: 9px 14px;
    background: var(--list-head);
    border-bottom: 1px solid var(--list-rule-strong);
    color: var(--ui-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
  }

  html[data-theme=light] .app-shell table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--list-rule);
    vertical-align: middle;
  }

  html[data-theme=light] .app-shell table tbody tr:last-child td {
    border-bottom: 0;
  }

  html[data-theme=light] .app-shell table tbody tr:hover {
    background: var(--list-row-hover);
  }

  html[data-theme=light] .app-shell table .record-title {
    display: block;
    color: var(--ui-text);
    font-weight: 600;
  }

  html[data-theme=light] .app-shell table td small {
    display: block;
    margin-top: 2px;
    color: var(--ui-muted);
    font-size: 12px;
  }

  html[data-theme=light] .app-shell .badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border: 1px solid var(--list-rule-strong);
    border-radius: 3px;
    background: var(--ui-subtle);
    color: var(--ui-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    box-shadow: none;
  }

  html[data-theme=light] .app-shell .badge::before {
    display: none;
  }

  html[data-theme=light] .app-shell .badge.green {
    background: #f2f7f3;
    border-color: #cde0d3;
    color: #2e6a45;
  }

  html[data-theme=light] .app-shell .badge.amber {
    background: #fbf6ea;
    border-color: #e9d9b0;
    color: #86580a;
  }

  html[data-theme=light] .app-shell .badge.red {
    background: var(--ui-selected);
    border-color: #efc4c3;
    color: var(--ui-accent);
  }

  html[data-theme=light] .app-shell .count {
    min-width: 20px;
    padding: 0 6px;
    border-radius: 3px;
    background: var(--ui-subtle);
    color: var(--ui-muted);
    font-size: 12px;
    font-weight: 600;
  }

  html[data-theme=light] .app-shell .overdue {
    color: var(--ui-accent);
    font-weight: 600;
  }

  html[data-theme=light] .app-shell .compact-work table {
    min-width: 940px;
  }

  html[data-theme=light] .app-shell .compact-work :is(select:not([hidden]):not([multiple]):not([size]),input[type=date]:not([type=checkbox]):not([type=radio])) {
    height: 30px;
    min-width: 128px;
    padding: 0 8px;
    font-size: 13px;
    border-radius: 4px;
    border-color: var(--list-rule-strong);
    box-shadow: none;
  }

  html[data-theme=light] .app-shell .compact-work td .button {
    height: 28px;
    padding: 0 10px;
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
  }

  html[data-theme=light] .app-shell progress {
    height: 4px;
    border-radius: 0;
    accent-color: #5d5d57;
  }

  html[data-theme=light] .app-shell progress::-webkit-progress-bar {
    background: #e8e8e4;
    border-radius: 0;
  }

  html[data-theme=light] .app-shell progress::-webkit-progress-value {
    background: #5d5d57;
    border-radius: 0;
  }

  html[data-theme=light] .app-shell progress::-moz-progress-bar {
    background: #5d5d57;
    border-radius: 0;
  }

  html[data-theme=light] .app-shell .week-layout .week-counts {
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    gap: 0;
    border-top: 1px solid var(--list-rule);
    border-left: 1px solid var(--list-rule);
    border-radius: 5px;
    overflow: hidden;
    background: var(--ui-surface);
  }

  html[data-theme=light] .app-shell .week-layout .week-counts a {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 8px;
    min-height: 0;
    padding: 10px 14px;
    border: 0;
    border-right: 1px solid var(--list-rule);
    border-bottom: 1px solid var(--list-rule);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ui-muted);
    font-size: 13px;
    text-align: left;
  }

  html[data-theme=light] .app-shell .week-layout .week-counts a strong {
    font-size: 18px;
    font-weight: 600;
    color: var(--ui-text);
  }

  html[data-theme=light] .app-shell .week-layout .week-counts a.selected {
    background: var(--ui-selected);
    box-shadow: inset 0 -2px 0 var(--ui-accent);
    color: var(--ui-accent);
    font-weight: 600;
  }

  html[data-theme=light] .app-shell .week-layout .week-counts a.selected strong {
    color: var(--ui-accent);
  }

  html[data-theme=light] .app-shell .week-filters {
    margin-top: 16px;
    gap: 10px;
  }

  html[data-theme=light] .app-shell .week-filters label {
    font-size: 12px;
    color: var(--ui-muted);
    font-weight: 600;
  }

  html[data-theme=light] .app-shell .week-hint {
    margin: 10px 0 14px;
    font-size: 12.5px;
  }

  html[data-theme=light] .app-shell .week-group {
    margin: 14px 0;
    border: 1px solid var(--list-rule);
    border-radius: 5px;
    background: var(--ui-surface);
    overflow: hidden;
  }

  html[data-theme=light] .app-shell .week-group summary {
    padding: 8px 14px;
    background: var(--list-head);
    border-bottom: 1px solid var(--list-rule-strong);
    color: var(--ui-text);
    font-size: 12.5px;
    font-weight: 600;
  }

  html[data-theme=light] .app-shell .week-group:not([open]) summary {
    border-bottom: 0;
  }

  html[data-theme=light] .app-shell .week-row {
    margin: 0;
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid var(--list-rule);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-theme=light] .app-shell .week-row:last-child {
    border-bottom: 0;
  }

  html[data-theme=light] .app-shell .week-row:hover {
    background: var(--list-row-hover);
  }

  html[data-theme=light] .app-shell .week-row .client-initial {
    border-radius: 4px;
    background: var(--ui-subtle);
    color: var(--ui-muted);
    font-weight: 600;
  }

  html[data-theme=light] .app-shell .week-agenda {
    border-left: 1px solid var(--list-rule);
  }

  html[data-theme=light] .app-shell .week-agenda input:not([type=hidden]):not([type=checkbox]):not([type=radio]),
  html[data-theme=light] .app-shell .week-agenda button {
    height: 32px;
    border-radius: 5px;
    font-size: 13px;
  }

  html[data-theme=light] .app-shell .agenda-item {
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid var(--list-rule);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-theme=light] .app-shell .kanban-column {
    border-radius: 5px;
    background: var(--list-head);
    border: 1px solid var(--list-rule);
  }

  html[data-theme=light] .app-shell .work-card {
    padding: 12px 14px;
    border-radius: 4px;
    border-color: var(--list-rule);
    box-shadow: none;
  }

  html[data-theme=light] .app-shell .work-card:hover {
    border-color: var(--list-rule-strong);
    box-shadow: none;
  }

  html[data-theme=light] .app-shell .empty {
    padding: 40px 18px;
    text-align: center;
  }

  html[data-theme=light] .app-shell .empty h3 {
    margin: 0 0 4px;
    color: var(--ui-text);
    font-size: 14px;
    font-weight: 600;
  }

  html[data-theme=light] .app-shell .empty p {
    margin: 0;
    color: var(--ui-muted);
    font-size: 13px;
  }

  html[data-theme=light] .app-shell .empty>span {
    display: none;
  }

  html[data-theme=light] .app-shell .pagination {
    margin-top: 14px;
    gap: 6px;
  }

  html[data-theme=light] .app-shell .pagination .button {
    height: 30px;
    min-width: 30px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
  }

  html[data-theme=light] .app-shell .pagination .button.selected,
  html[data-theme=light] .app-shell .pagination .button[aria-current] {
    background: var(--ui-selected);
    border-color: var(--ui-accent);
    color: var(--ui-accent);
    font-weight: 600;
  }
}

@media screen and (max-width: 800px) {
  html[data-theme=light] .app-shell .week-layout .week-counts a {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 8px 8px;
    font-size: 11px;
  }

  html[data-theme=light] .app-shell .quick-views {
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* Phase 3 - job detail lock: work masthead, ruled tabs, checklist as paper sections, flat timeline, solid AI working hairline. */
@media screen {
  html[data-theme=light] .app-shell .work-banner {
    background: var(--ui-surface);
    border-bottom: 1px solid var(--list-rule-strong, #d6d6d0);
    box-shadow: none;
  }

  html[data-theme=light] .app-shell .work-banner .work-title {
    margin: 0;
    padding: 16px 0 2px;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--ui-text);
  }

  html[data-theme=light] .app-shell .work-banner .work-meta {
    gap: 8px 28px;
    padding: 10px 0 12px;
    margin: 0;
  }

  html[data-theme=light] .app-shell .work-banner .work-meta dt {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ui-muted);
    text-transform: none;
    letter-spacing: 0;
  }

  html[data-theme=light] .app-shell .work-banner .work-meta dd,
  html[data-theme=light] .app-shell .work-banner .work-meta dd a {
    font-size: 13.5px;
    color: var(--ui-text);
  }

  html[data-theme=light] .app-shell .work-banner .work-tabs {
    gap: 22px;
    margin: 0;
    border: 0;
    box-shadow: none;
  }

  html[data-theme=light] .app-shell .work-banner .work-tabs a {
    padding: 9px 1px 10px;
    margin-bottom: -1px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--ui-muted);
    font-size: 13.5px;
    font-weight: 500;
  }

  html[data-theme=light] .app-shell .work-banner .work-tabs a:hover {
    color: var(--ui-text);
  }

  html[data-theme=light] .app-shell .work-banner .work-tabs a.current {
    border-bottom-color: var(--ui-accent);
    color: var(--ui-text);
    font-weight: 600;
  }

  html[data-theme=light] .app-shell .work-body .section-heading {
    margin: 4px 0 12px;
  }

  html[data-theme=light] .app-shell .work-body .section-heading h2 {
    font-size: 16px;
    font-weight: 600;
  }

  html[data-theme=light] .app-shell .checklist-section {
    margin: 0 0 14px;
    border: 1px solid var(--list-rule, #e6e6e2);
    border-radius: 5px;
    background: var(--ui-surface);
    box-shadow: none;
    overflow: hidden;
  }

  html[data-theme=light] .app-shell .checklist-section>summary {
    padding: 9px 14px;
    background: var(--list-head, #faf9f7);
    border-bottom: 1px solid var(--list-rule-strong, #d6d6d0);
    font-size: 13px;
    font-weight: 600;
    color: var(--ui-text);
  }

  html[data-theme=light] .app-shell .checklist-section:not([open])>summary {
    border-bottom: 0;
  }

  html[data-theme=light] .app-shell .checklist-section>summary .button {
    height: 28px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    font-size: 12.5px;
  }

  html[data-theme=light] .app-shell .request-label {
    padding: 1px 6px;
    border: 1px solid var(--list-rule-strong, #d6d6d0);
    border-radius: 3px;
    background: var(--ui-subtle);
    box-shadow: none;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .03em;
    color: var(--ui-muted);
  }

  html[data-theme=light] .app-shell .checklist-section .task-row {
    margin: 0;
    padding: 9px 14px 8px;
    border: 0;
    border-bottom: 1px solid var(--list-rule, #e6e6e2);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-theme=light] .app-shell .checklist-section .task-row:last-of-type {
    border-bottom: 0;
  }

  html[data-theme=light] .app-shell .checklist-section .task-row:hover {
    background: var(--list-row-hover, #faf9f7);
  }

  html[data-theme=light] .app-shell .checklist-section .task-row.is-complete,
  html[data-theme=light] .app-shell .checklist-section .task-row.is-complete:hover {
    background: transparent;
  }

  html[data-theme=light] .app-shell .task-line .task-name {
    color: var(--ui-text);
    font-size: 13.5px;
    font-weight: 500;
  }

  html[data-theme=light] .app-shell .is-complete .task-name {
    color: var(--ui-muted);
  }

  html[data-theme=light] .app-shell .task-line>span {
    color: var(--ui-muted);
    font-size: 12.5px;
  }

  html[data-theme=light] .app-shell .task-line>a:last-child {
    color: var(--ui-muted);
    font-size: 12.5px;
  }

  html[data-theme=light] .app-shell .task-line>a:last-child:hover {
    color: var(--ui-link);
    text-decoration: underline;
  }

  html[data-theme=light] .app-shell .request-task {
    padding: 9px 14px;
    border: 0;
    border-bottom: 1px solid var(--list-rule, #e6e6e2);
    border-radius: 0;
    background: transparent;
    font-size: 13.5px;
  }

  html[data-theme=light] .app-shell .request-task:last-child {
    border-bottom: 0;
  }

  html[data-theme=light] .app-shell .checklist-section .section-content {
    padding: 0;
  }

  html[data-theme=light] .app-shell .inline-task {
    border-radius: 0;
    box-shadow: none;
  }

  html[data-theme=light] .app-shell .work-timeline .timeline-day {
    margin: 22px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--list-rule, #e6e6e2);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--ui-muted);
  }

  html[data-theme=light] .app-shell .timeline-event {
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid var(--list-rule, #e6e6e2);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ui-text);
    font-size: 13.5px;
  }

  html[data-theme=light] .app-shell .work-timeline .timeline-event {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  html[data-theme=light] .app-shell .timeline-event.note-event {
    padding: 12px 14px;
    margin: 6px 0;
    border: 1px solid var(--list-rule, #e6e6e2);
    border-radius: 5px;
    background: var(--ui-surface);
  }

  html[data-theme=light] .app-shell .timeline-event header {
    font-size: 12px;
    color: var(--ui-muted);
  }

  html[data-theme=light] .app-shell .timeline-event header strong {
    color: var(--ui-text);
    font-weight: 600;
  }

  html[data-theme=light] .app-shell .event-avatar {
    border-radius: 4px;
    background: var(--ui-subtle);
    color: var(--ui-muted);
    font-weight: 600;
  }

  html[data-theme] :is(.ai-context-dialog,.ai-workspace) .ai-prompt-shell {
    border-radius: 6px;
  }

  html[data-theme] .ai-context-dialog {
    border-radius: 8px;
  }

  html[data-theme] :is(.ai-context-dialog,.ai-workspace) [data-ai-generate] {
    border-radius: 5px;
    gap: 12px;
    min-height: 36px;
    padding: 6px 10px 6px 14px;
  }

  html[data-theme] .ai-send-icon {
    width: 22px;
    height: 22px;
    border-radius: 3px;
    font-size: 16px;
  }

  html[data-theme] :is(.ai-context-dialog,.ai-workspace) [data-ai-output] {
    border-radius: 5px;
  }

  html[data-theme] [data-ai-form][data-state=working] .ai-prompt-shell::after {
    height: 2px;
    background: var(--ui-accent);
    background-size: auto;
    animation: none;
  }
}

@media screen and (max-width: 800px) {
  html[data-theme=light] .app-shell .work-banner .work-tabs {
    gap: 18px;
    overflow-x: auto;
    white-space: nowrap;
  }

  html[data-theme=light] .app-shell .work-banner .work-title {
    font-size: 21px;
  }
}


/* Source: dashboard.css */
/* Authoritative dashboard component. Shared tokens come from workspace foundation.
   Unslop workflow: Damir Sokolovsky (@heydamir), CC BY 4.0. */
@media screen {
 #content .oa-dashboard{display:flex;flex-direction:column;gap:24px;max-width:1600px;margin:0 auto;padding:0;min-width:0;color:var(--ui-text);font:14px/1.5 'Source Sans 3','Segoe UI',Arial,sans-serif;font-variant-numeric:tabular-nums;}
 .oa-dashboard *{box-sizing:border-box;}
 #content .oa-dashboard h1{font-size:28px;line-height:1.2;font-weight:500;margin:0;letter-spacing:0;}
 #content .oa-dashboard h2{font-size:18px;line-height:1.4;font-weight:500;margin:0;letter-spacing:0;}
 #content .oa-dashboard h3{font-size:14px;font-weight:500;margin:0;}
 #content .oa-dashboard p{font-size:14px;color:var(--ui-muted);margin:4px 0 0;}
 .oa-eyebrow{display:none;}
 .oa-dash-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;}
 .oa-heading-actions{display:flex;flex-direction:column;align-items:flex-end;gap:12px;}
 .oa-heading-actions form{display:flex;align-items:center;gap:8px;margin:0;flex-wrap:wrap;}
 #content .oa-heading-actions :is(label,select,button){font-size:14px;margin:0;}
 #content .oa-heading-actions select{width:auto;min-width:120px;}
 .oa-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;}
 #content .oa-stat{display:flex;flex-direction:column;gap:8px;min-width:0;min-height:120px;padding:20px 24px;background:#fff;border:1px solid var(--ui-border);border-radius:12px;text-decoration:none;box-shadow:none;transform:none;transition:background-color 160ms ease,border-color 160ms ease;}
 #content .oa-stat>span,#content .oa-stat small{font-size:14px;font-weight:400;color:var(--ui-muted);}
 #content .oa-stat small{display:flex;justify-content:space-between;gap:8px;}
 #content .oa-stat strong{font-size:36px;line-height:1.2;font-weight:500;color:var(--ui-text);}
 #content .oa-tone-red strong{color:#ad3344;}
 #content .oa-stat.is-selected{background:var(--ui-selected);border-color:#e6b8bc;box-shadow:none;}
 #content .oa-stat:hover{border-color:#bfa6a8;}
 .oa-charts{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,1fr);gap:24px;align-items:start;}
 .oa-trend-card{grid-column:1;grid-row:1;}
 .oa-status-card{grid-column:2;grid-row:1;}
 #content .oa-card{min-width:0;overflow:hidden;background:#fff;border:1px solid var(--ui-border);border-radius:12px;box-shadow:none;}
 .oa-card-title{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:20px 24px 16px;}
 .oa-card-title>svg{width:18px;height:18px;flex-shrink:0;color:var(--ui-muted);}
 .oa-total{white-space:nowrap;font-size:12px;color:var(--ui-muted);}
 .oa-stage-list{padding:0 24px 20px;max-height:300px;overflow:auto;}
 .oa-stage-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 16px;padding:12px 0;font-size:14px;color:var(--ui-muted);text-decoration:none;}
 .oa-stage-item strong{font-weight:500;color:var(--ui-text);}
 .oa-stage-item meter{grid-column:1/-1;width:100%;height:6px;border:0;background:#eeeeeB;border-radius:3px;}
 .oa-stage-item meter::-webkit-meter-bar{background:#eeeeeB;border:0;border-radius:3px;}
 .oa-stage-item meter::-webkit-meter-optimum-value{background:#b9b9b3;border-radius:3px;}
 .oa-stage-item meter::-moz-meter-bar{background:#b9b9b3;}
 .oa-stage-item:first-child meter::-webkit-meter-optimum-value{background:var(--ui-accent);}
 .oa-stage-item:first-child meter::-moz-meter-bar{background:var(--ui-accent);}
 .oa-chart-footer{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:16px 24px;border-top:1px solid var(--ui-border);font-size:12px;color:var(--ui-muted);}
 .oa-deadline-summary{display:flex;align-items:baseline;gap:8px;padding:0 24px 12px;font-size:14px;color:var(--ui-muted);}
 .oa-deadline-summary strong{font-size:28px;font-weight:500;color:var(--ui-text);}
 .oa-chart-key{margin-left:auto;font-size:12px;}
 .oa-deadline-scroll{overflow:auto;padding:0 16px;}
 .oa-deadline-bars{display:block;width:100%;min-width:460px;max-height:320px;}
 .oa-deadline-bars text{font:14px 'Source Sans 3','Segoe UI',Arial,sans-serif;fill:#626262;text-anchor:middle;}
 .oa-axis-label{font-size:12px!important;text-anchor:end!important;}
 .oa-gridline{stroke:#e7e7e3;stroke-width:1;}
 .oa-bar-target{fill:transparent;}
 .oa-bar-column{fill:#b9b9b3;}
 .oa-day-bar.is-current .oa-bar-column{fill:#b93840;}
 .oa-deadline-bars .oa-bar-value{fill:#242424;font-weight:500;}
 .oa-deadline-bars .oa-bar-date{font-size:12px;}
 .oa-day-bar:hover .oa-bar-target,.oa-day-bar:focus-visible .oa-bar-target{fill:#b938400c;}
 #content .oa-deadline-caption{padding:12px 24px 20px;margin:0;font-size:12px;}
 .oa-deadline-empty{margin:0 24px 24px;padding:24px;border:1px dashed #d4d4cf;border-radius:8px;background:#fafaf9;}
 .oa-deadline-empty strong{font-size:16px;font-weight:500;}
 #content .oa-deadline-empty p{margin:8px 0 16px;}
 .oa-bottom{display:grid;grid-template-columns:minmax(0,2.4fr) minmax(260px,1fr);gap:24px;align-items:start;}
 .oa-side-stack{display:grid;gap:24px;min-width:0;}
 .oa-report-tabs{display:flex;gap:8px;padding:0 16px;border-bottom:1px solid var(--ui-border);overflow:auto;}
 .oa-report-tabs a{white-space:nowrap;padding:12px;border-bottom:2px solid transparent;color:var(--ui-muted);font-size:14px;text-decoration:none;}
 .oa-report-tabs a[aria-current]{border-bottom-color:var(--ui-accent);color:var(--ui-link);}
 .oa-table-scroll{overflow:auto;}
 #content .oa-dashboard table{width:100%;border-collapse:collapse;margin:0;font-size:14px;}
 #content .oa-dashboard :is(td,th){padding:16px 20px;border-bottom:1px solid var(--ui-border);font-size:14px;letter-spacing:0;text-transform:none;}
 #content .oa-dashboard th{background:#f6f6f5;color:var(--ui-muted);font-weight:500;white-space:nowrap;}
 #content .oa-dashboard td a{color:var(--ui-text);font-weight:500;text-decoration:none;}
 #content .oa-dashboard td small{display:block;margin-top:4px;font-size:12px;color:var(--ui-muted);}
 .oa-dashboard td:first-child{min-width:200px;}
 .oa-dashboard td:nth-child(3){white-space:nowrap;}
 #content .oa-dashboard .oa-overdue{color:#ad3344;}
 #content .oa-dashboard .badge{font-size:12px;white-space:nowrap;}
 .oa-pagination{display:flex;justify-content:flex-end;gap:16px;padding:12px 20px;font-size:14px;}
 .oa-pagination:empty{display:none;}
 #content .oa-dashboard .oa-empty{padding:20px 24px;font-size:14px;}
 .oa-workload{padding:0 24px 24px;}
 .oa-workload-row{margin-top:12px;}
 .oa-workload-row>div{display:flex;align-items:center;gap:8px;font-size:14px;}
 .oa-workload-row strong{margin-left:auto;font-weight:500;}
 .oa-person{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#fbecee;color:#a42f37;}
 .oa-workload meter{width:calc(100% - 36px);margin:8px 0 0 36px;height:6px;}
 .oa-workload meter::-webkit-meter-bar{background:#eeeeeB;border:0;}
 .oa-workload meter::-webkit-meter-optimum-value{background:#b9b9b3;}
 .oa-activity{display:flex;align-items:flex-start;gap:12px;padding:16px 24px;border-top:1px solid var(--ui-border);text-decoration:none;}
 .oa-activity div{flex:1;}
 .oa-activity :is(strong,small),.oa-activity div>span{display:block;font-size:14px;color:var(--ui-muted);}
 .oa-activity strong{color:var(--ui-text);font-weight:500;}
 .oa-activity-dot{width:8px;height:8px;border-radius:50%;background:var(--ui-accent);margin-top:6px;}
 .oa-quick{display:flex;gap:8px;flex-wrap:wrap;padding:20px 24px;border-top:1px solid var(--ui-border);}
 .oa-quick h3{flex-basis:100%;}
 .oa-dashboard :is(a,button,select):focus-visible{outline:2px solid var(--ui-focus);outline-offset:3px;}
 #dashboard-report{scroll-margin-top:20px;}
 @media(prefers-reduced-motion:reduce){.oa-dashboard *{transition:none!important;animation:none!important;}}
 @media(max-width:1100px){.oa-charts,.oa-bottom{grid-template-columns:1fr;}.oa-trend-card,.oa-status-card{grid-column:auto;grid-row:auto;}.oa-trend-card{order:-1;}.oa-side-stack{grid-template-columns:1fr 1fr;}}
 @media(max-width:800px){.oa-dash-heading{align-items:flex-start;flex-direction:column;}.oa-heading-actions{align-items:flex-start;width:100%;}.oa-side-stack{grid-template-columns:1fr;}}
 @media(max-width:600px){
  #content .oa-dashboard{gap:16px;}.oa-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
  #content .oa-stat{padding:16px;}.oa-stat small{font-size:12px!important;}
  .oa-heading-actions form{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:8px 12px;}
  .oa-heading-actions label[for=dashboard-entity]{grid-column:1;grid-row:1;}.oa-heading-actions label[for=dashboard-scope]{grid-column:2;grid-row:1;}
  #content #dashboard-entity{grid-column:1;grid-row:2;min-width:0;width:100%;}#content #dashboard-scope{grid-column:2;grid-row:2;min-width:0;width:100%;}
  .oa-heading-actions form button{grid-column:1/-1;grid-row:3;justify-self:start;}
  .oa-card-title{padding:16px;}.oa-charts,.oa-bottom{gap:16px;}.oa-deadline-empty{margin:0 16px 16px;padding:16px;}
 }
}

/* Phase 3 - dashboard tidy: one ruled summary strip, quieter squared cards, smaller type. */
@media screen {
 #content .oa-dashboard{gap:16px;}
 #content .oa-dashboard h1{font-size:24px;font-weight:600;}
 #content .oa-dashboard h2{font-size:15px;font-weight:600;}
 #content .oa-dashboard .oa-dash-heading>div>p{font-size:13.5px;}
 #content .oa-heading-actions{gap:8px;}
 #content .oa-heading-actions :is(select,button){height:34px;padding-top:0;padding-bottom:0;font-size:13px;border-radius:5px;}
 .oa-stats{gap:0;border-top:1px solid var(--ui-border);border-left:1px solid var(--ui-border);border-radius:5px;overflow:hidden;background:#fff;}
 #content .oa-stats .oa-stat{min-height:0;padding:10px 16px 11px;gap:2px;border:0;border-right:1px solid var(--ui-border);border-bottom:1px solid var(--ui-border);border-radius:0;background:transparent;}
 #content .oa-stats .oa-stat>span{font-size:12.5px;font-weight:600;}
 #content .oa-stats .oa-stat strong{font-size:24px;line-height:1.2;font-weight:600;}
 #content .oa-stats .oa-stat small{font-size:12px;}
 #content .oa-stats .oa-stat:hover{background:#faf9f7;border-color:var(--ui-border);}
 #content .oa-stats .oa-stat.is-selected{background:var(--ui-selected);border-color:var(--ui-border);box-shadow:inset 0 -2px 0 var(--ui-accent);}
 #content .oa-stats .oa-tone-red strong{color:var(--ui-accent);}
 .oa-charts,.oa-bottom,.oa-side-stack{gap:16px;}
 #content .oa-card{border-radius:5px;}
 .oa-card-title{padding:12px 16px;border-bottom:1px solid var(--ui-border);background:#faf9f7;}
 #content .oa-card-title p{font-size:12.5px;margin-top:2px;}
 .oa-card-title>svg{display:none;}
 .oa-stage-list{padding:4px 16px 8px;}
 .oa-stage-item{padding:8px 0;}
 .oa-stage-item meter{height:4px;border-radius:0;}
 .oa-stage-item meter::-webkit-meter-bar{border-radius:0;}
 .oa-stage-item meter::-webkit-meter-optimum-value{border-radius:0;}
 .oa-chart-footer{padding:10px 16px;}
 .oa-deadline-summary{padding:12px 16px 0;}
 .oa-deadline-summary strong{font-size:20px;font-weight:600;}
 .oa-deadline-bars{max-height:210px;}
 #content .oa-deadline-caption{padding:4px 16px 12px;}
 .oa-deadline-empty{margin:12px 16px 16px;padding:16px;border-radius:5px;}
 .oa-report-tabs{gap:18px;padding:0 16px;}
 .oa-report-tabs a{padding:9px 1px 10px;margin-bottom:-1px;font-size:13px;}
 .oa-report-tabs a[aria-current]{color:var(--ui-text);font-weight:600;}
 #content .oa-dashboard :is(td,th){padding:10px 16px;font-size:13.5px;}
 #content .oa-dashboard th{font-size:12px;font-weight:600;background:#faf9f7;}
 #content .oa-dashboard tbody tr:last-child td{border-bottom:0;}
 #content .oa-dashboard td a{font-weight:600;}
 #content .oa-dashboard .oa-overdue{color:var(--ui-accent);font-weight:600;}
 .oa-workload{padding:0 16px 14px;}
 .oa-workload-row{margin-top:10px;}
 .oa-person{width:24px;height:24px;border-radius:4px;font-size:12px;font-weight:600;}
 .oa-workload meter{height:4px;margin-left:32px;width:calc(100% - 32px);}
 .oa-activity{padding:12px 16px;}
 .oa-quick{padding:14px 16px;}
}

/* Shared refinements are maintained in workspace-components.css. */
