:root {
  color-scheme: light;
  --bg: #eef1f4;
  --panel: #ffffff;
  --panel-2: #eef2f4;
  --ink: #172126;
  --muted: #66737c;
  --line: #d8dee2;
  --line-strong: #bdc7cd;
  --accent: #5b46bf;
  --accent-ink: #ffffff;
  --danger: #b5393b;
  --warning: #a15c00;
  --success: #23764d;
  --nav: #08111d;
  --nav-2: #111c2c;
  --nav-ink: #d6dde8;
  --hot: #ec3d73;
  --shadow: 0 16px 48px rgba(28, 40, 46, 0.14);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  min-width: 320px;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr) 332px;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

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

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

.app-shell.left-collapsed.right-collapsed {
  grid-template-columns: 0 minmax(0, 1fr) 0;
}

.app-shell.left-collapsed .sidebar,
.app-shell.right-collapsed .inspector {
  overflow: hidden;
  padding: 0;
  border: 0;
  pointer-events: none;
}

.sidebar,
.inspector {
  background: var(--panel);
  border-right: 1px solid var(--line);
  height: 100vh;
  min-height: 0;
  overflow: auto;
  position: relative;
}

.sidebar {
  background: var(--nav);
  color: var(--nav-ink);
  border-right: 0;
  overflow: auto;
  z-index: 20;
}

.inspector {
  border-left: 1px solid var(--line);
  border-right: 0;
}

.pane-restore {
  position: fixed;
  top: 50%;
  width: 16px;
  height: 96px;
  transform: translateY(-50%);
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: #5d6874;
  z-index: 10;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.pane-restore-left {
  border-radius: 0 10px 10px 0;
}

.pane-restore-right {
  border-radius: 10px 0 0 10px;
}

.pane-restore-left.open {
  left: 292px;
}

.pane-restore-left.collapsed {
  left: 0;
}

.pane-restore-right.open {
  right: 332px;
}

.pane-restore-right.collapsed {
  right: 0;
}

.pane-restore .icon {
  width: 14px;
  height: 36px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand h1 {
  font-size: 22px;
  line-height: 1;
  margin: 0;
  letter-spacing: 0;
}

.brand-logo {
  display: block;
  width: 142px;
  max-width: calc(100% - 96px);
  height: auto;
}

.brand-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.brand .icon-button {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--nav-ink);
}

.brand .notification-bell {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--nav);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}

.brand .icon-button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.brand .notification-bell.has-unread {
  background: #ffd84d;
  border-color: #ffd84d;
  color: #172126;
}

.brand .toolbar-badge {
  border-color: var(--nav);
}

.session {
  padding: 12px 16px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--nav-ink);
}

.session-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.session small,
.field small,
.muted,
.task-meta,
.report-meta {
  color: var(--muted);
}

.project-list {
  padding: 12px;
  min-width: 0;
  overflow: hidden;
}

.nav-section,
.settings-item {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 8px;
  background: transparent;
  color: var(--nav-ink);
  text-align: left;
  font-weight: 750;
  min-width: 0;
}

.nav-section:hover,
.settings-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-section b {
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #dbe3ef;
  font-size: 12px;
}

.nav-children {
  display: grid;
  gap: 4px;
  margin: 4px 0 12px;
  padding-left: 8px;
  min-width: 0;
  overflow: hidden;
}

.sidebar .section-title h2,
.sidebar .session small,
.sidebar .project-group {
  color: #9aa7b8;
}

.sidebar .button {
  background: var(--nav-2);
  color: var(--nav-ink);
  border-color: rgba(255, 255, 255, 0.1);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 4px 10px;
}

.section-title h2,
.inspector h2,
.dialog h2 {
  font-size: 15px;
  margin: 0;
  letter-spacing: 0;
}

.project-item {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  color: var(--ink);
  padding: 9px 8px;
  border-radius: var(--radius);
  text-align: left;
  min-width: 0;
  max-width: 100%;
}

.sidebar .project-item {
  color: var(--nav-ink);
  border-radius: 8px;
  min-height: 52px;
}

.project-item:hover,
.project-item.active {
  background: var(--panel-2);
}

.sidebar .project-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar .project-item.active {
  background: var(--accent);
  color: #fff;
}

.sidebar .pill {
  background: rgba(255, 255, 255, 0.1);
  color: #dbe3ef;
  justify-self: end;
  max-width: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16);
}

.project-name {
  display: inline-block;
  max-width: 100%;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-group {
  color: var(--muted);
  font-size: 12px;
}

.project-item > span:nth-child(2),
.settings-item span,
.nav-section span,
.session-row > div {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 6px 10px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.toolbar-date-nav {
  display: grid;
  gap: 2px;
  align-items: center;
  justify-items: center;
}

.toolbar h2 {
  font-size: 18px;
  line-height: 1;
  margin: 0;
  text-align: center;
  color: #172126;
  font-weight: 450;
  letter-spacing: 0;
  min-height: 20px;
  white-space: nowrap;
}

.toolbar h2 strong {
  font-weight: 850;
}

.toolbar-cluster,
.button-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.toolbar-compact {
  gap: 4px;
}

.toolbar-tools {
  justify-content: flex-start;
}

.tool-divider {
  width: 1px;
  height: 26px;
  background: var(--line-strong);
  margin: 0 4px;
}

.toolbar-filter {
  width: 150px;
  margin-left: auto;
}

.toolbar-filter summary {
  min-height: 34px;
  padding: 5px 8px;
  gap: 6px;
}

.toolbar-filter summary .icon {
  flex: 0 0 auto;
}

.toolbar-filter .multi-select-menu {
  min-width: 240px;
}

.week-people-filter {
  flex: 0 0 150px;
}

.week-people-filter summary span {
  display: none;
}

.week-people-filter summary b {
  max-width: 86px;
}

.day-mode-button {
  position: relative;
  width: 42px;
  padding: 0;
}

.day-mode-button .icon {
  width: 26px;
  height: 26px;
}

.day-mode-button span {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.button,
.icon-button,
.segmented button {
  min-height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  font-weight: 650;
  transition: transform 90ms ease, box-shadow 90ms ease, background-color 120ms ease, border-color 120ms ease, opacity 120ms ease;
}

.button:active,
.icon-button:active,
.segmented button:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: inset 0 2px 5px rgba(23, 33, 38, 0.16);
}

.button.is-saving,
.button[aria-busy="true"] {
  transform: translateY(1px);
  box-shadow: inset 0 2px 6px rgba(23, 33, 38, 0.22);
}

.button.primary,
.icon-button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.button.danger {
  color: var(--danger);
  border-color: #e3b8b9;
}

.danger-icon {
  color: var(--danger);
}

.icon-button.warn {
  color: var(--warning);
  border-color: rgba(161, 92, 0, 0.35);
  background: #fff7ed;
}

.icon-button {
  width: 36px;
  padding: 0;
  flex: 0 0 36px;
  position: relative;
}

.toolbar-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  border: 2px solid #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 850;
}

.notification-bell.has-unread {
  border-color: var(--accent);
  color: var(--accent);
}

.icon {
  width: 18px;
  height: 18px;
  display: block;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}

.segmented button {
  border: 0;
  border-radius: 0;
  min-height: 34px;
}

.segmented button.active {
  background: var(--ink);
  color: white;
}

[data-tooltip] {
  position: relative;
}

.pane-restore[data-tooltip] {
  position: fixed;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  margin-left: 0;
  border: 0;
  white-space: normal;
  width: max-content;
  max-width: 280px;
  background: #172126;
  color: #fff;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  box-shadow: var(--shadow);
  pointer-events: none;
}

.calendar-wrap {
  overflow: auto;
  padding: 14px;
  background: #e9edf1;
  min-height: 0;
}

.calendar {
  min-width: 780px;
  background: #fbfcfc;
  border: 1px solid #b9c0c8;
  border-radius: var(--radius);
  overflow: hidden;
}

.calendar-month {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.calendar-body {
  min-height: 0;
}

.calendar-month .calendar-body {
  display: grid;
  grid-auto-rows: auto;
}

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

.calendar-month.with-week-numbers .calendar-header {
  grid-template-columns: 54px repeat(7, minmax(0, 1fr));
}

.calendar-header div {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  border-right: 1px solid var(--line);
  background: #f4f7f9;
  color: #1b2633;
}

.calendar-header div:last-child {
  border-right: 0;
}

.calendar-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: 30px repeat(var(--month-lanes, 1), var(--month-lane-height, 26px)) minmax(0, 1fr);
  min-height: max(92px, calc((100vh - 190px) / 6), var(--month-row-content, 60px));
  position: relative;
  border-top: 1px solid #b9c0c8;
  background: #fbfcfc;
}

.calendar-month.with-week-numbers .calendar-row {
  grid-template-columns: 54px repeat(7, minmax(0, 1fr));
}

.day-cell {
  border-right: 1px solid #b9c0c8;
  padding: 8px;
  background: #fbfcfc;
  position: relative;
}

.day-cell.other-month {
  background: #fbfcfc;
}

.day-cell.other-month .day-number {
  color: #657381;
}

.calendar-header .weekend-day,
.day-cell.weekend-day,
.week-head.weekend-day,
.week-cell.weekend-day,
.cascade-date-cell.weekend-day,
.cascade-cell.weekend-day,
.gantt-day-head.weekend-day,
.gantt-hour-head.weekend-day,
.gantt-cell.weekend-day {
  background: #eef1f4;
  color: #7b8794;
}

.day-cell.today {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.day-cell.weekend-day.bank-holiday-day,
.week-cell.weekend-day.bank-holiday-day,
.week-head.weekend-day.bank-holiday-head,
.cascade-date-cell.weekend-day.bank-holiday-day,
.cascade-cell.weekend-day.bank-holiday-day,
.gantt-cell.weekend-day.bank-holiday-day,
.gantt-day-head.weekend-day.bank-holiday-head {
  background: #fde8e8;
  color: #172126;
}

.day-cell.bank-holiday-day,
.week-cell.bank-holiday-day,
.cascade-date-cell.bank-holiday-day,
.cascade-cell.bank-holiday-day,
.gantt-cell.bank-holiday-day {
  background: #fde8e8;
}

.month-inline-label {
  z-index: 5;
  align-self: start;
  justify-self: start;
  margin: 8px 0 0 8px;
  color: #172126;
  font-size: 26px;
  font-weight: 450;
  letter-spacing: 0;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 280ms ease, transform 280ms ease;
}

.month-inline-label strong {
  font-weight: 850;
}

.calendar-wrap.is-month-scrolling .month-inline-label {
  opacity: 1;
  transform: translateY(0);
}

.cascade-month-label {
  position: sticky;
  left: 160px;
  align-self: start;
  z-index: 7;
  width: max-content;
  margin-top: 6px;
  color: #172126;
  font-size: 26px;
  font-weight: 450;
  letter-spacing: 0;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 280ms ease, transform 280ms ease;
}

.cascade-month-label strong {
  font-weight: 850;
}

.calendar-wrap.is-month-scrolling .cascade-month-label {
  opacity: 1;
  transform: translateY(0);
}

.gantt-month-label {
  position: absolute;
  top: 50px;
  z-index: 4;
  color: #172126;
  font-size: 26px;
  font-weight: 450;
  letter-spacing: 0;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 280ms ease, transform 280ms ease;
}

.gantt-month-label strong {
  font-weight: 850;
}

.gantt-view.is-month-scrolling .gantt-month-label {
  opacity: 1;
  transform: translateY(0);
}

.day-cell.trim-target {
  box-shadow: inset 0 0 0 3px var(--warning);
}

.cascade-view {
  min-width: 980px;
  border: 1px solid #b9c0c8;
  border-radius: var(--radius);
  background: #fbfcfc;
  overflow: hidden;
}

.cascade-board {
  min-width: max-content;
}

.cascade-header,
.cascade-grid {
  display: grid;
}

.cascade-header {
  position: sticky;
  top: 0;
  z-index: 8;
  grid-template-columns: var(--cascade-columns);
}

.cascade-date-head,
.cascade-column-head {
  min-height: 48px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 8px 10px;
  background: #f4f7f9;
  border-right: 1px solid #b9c0c8;
  border-bottom: 1px solid #aeb7c1;
  color: #172126;
}

.cascade-date-head {
  position: sticky;
  left: 0;
  z-index: 9;
  font-weight: 850;
}

.cascade-column-head b {
  font-size: 14px;
  line-height: 1.1;
}

.cascade-column-head span {
  color: #657381;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cascade-grid {
  position: relative;
  grid-template-columns: var(--cascade-columns);
}

.cascade-date-cell,
.cascade-cell {
  min-height: var(--cascade-row-height, 64px);
  background: #fbfcfc;
  border-right: 1px solid #b9c0c8;
  border-bottom: 1px solid #b9c0c8;
}

.cascade-date-cell {
  position: sticky;
  left: 0;
  z-index: 5;
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 8px 10px;
  color: #172126;
  background: #f4f7f9;
}

.cascade-date-cell.today {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.cascade-date-cell b {
  font-size: 13px;
}

.cascade-date-cell span {
  color: #53616e;
  font-size: 20px;
  font-weight: 850;
  line-height: 1;
}

.cascade-date-cell em {
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
  color: #172126;
}

.cascade-cell {
  position: relative;
}

.cascade-cell.trim-target {
  box-shadow: inset 0 0 0 3px var(--warning);
}

.cascade-activity {
  align-self: stretch;
  min-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.cascade-activity .trim-handle {
  left: 0;
  right: 0;
  width: auto;
  height: 14px;
  cursor: ns-resize;
}

.cascade-activity .trim-start {
  top: 0;
  bottom: auto;
}

.cascade-activity .trim-end {
  top: auto;
  bottom: 0;
}

.cascade-activity.expanded-slot {
  width: 100% !important;
  margin-left: 0 !important;
}

.day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  font-size: 12px;
  line-height: 1;
  color: #1b2633;
  font-weight: 750;
  margin-bottom: 6px;
}

.bank-holiday-label {
  max-width: 100%;
  display: inline-block;
  padding: 3px 6px;
  border-radius: 4px;
  background: #f8bcbc;
  color: #172126;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}

.activity-block {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 2px;
  width: 100%;
  text-align: left;
  border-radius: 6px;
  color: white;
  padding: 7px 8px;
  margin-bottom: 0;
  min-height: 42px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  transition: opacity 120ms ease, box-shadow 120ms ease, outline-color 120ms ease;
}

.activity-block.focus-dimmed {
  opacity: 0.28;
}

.activity-block.selected {
  outline: 3px solid rgba(23, 33, 38, 0.35);
  outline-offset: 1px;
  z-index: 14;
}

.activity-block.linked {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75), inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.activity-block.task-child-block {
  background: color-mix(in srgb, var(--accent) 72%, #ffffff 28%) !important;
  border-left: 4px solid rgba(23, 33, 38, 0.45);
  padding-left: 10px;
}

.activity-task-preview {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin-top: 3px;
  font-style: normal;
}

.task-mini-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  color: #fff;
  line-height: 1.15;
}

.task-mini-block.done {
  opacity: 0.62;
}

.task-mini-block.running {
  background: rgba(255, 255, 255, 0.34);
}

.task-mini-block.more {
  justify-content: center;
  opacity: 0.8;
}

.task-mini-title,
.task-mini-status,
.task-mini-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 750;
}

.task-mini-status {
  flex: 0 0 auto;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(23, 33, 38, 0.2);
  font-size: 9px;
}

.task-mini-meta {
  flex: 0 0 auto;
  opacity: 0.82;
  font-weight: 700;
}

.task-link-mark {
  flex: 0 0 auto;
  width: 12px;
  height: 18px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.75;
}

.month-activity {
  align-self: stretch;
  margin: 0;
  min-height: 24px;
  max-height: none;
  padding: 3px 7px;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.month-activity.full-slot {
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 8px;
  z-index: 3;
}

.month-activity.expanded-slot {
  z-index: 16;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12), 0 8px 22px rgba(17, 24, 39, 0.18);
}

.trim-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18px;
  cursor: ew-resize;
  z-index: 3;
  display: block;
}

.month-activity:hover .trim-handle {
  background: rgba(255, 255, 255, 0.18);
}

.trim-start {
  left: 0;
}

.trim-end {
  right: 0;
}

.trim-handle:hover {
  background: rgba(255, 255, 255, 0.35);
}

.trim-time-handle {
  position: absolute;
  left: 0;
  right: 0;
  height: 16px;
  cursor: ns-resize;
  z-index: 3;
  display: block;
}

.trim-time-start {
  top: 0;
}

.trim-time-end {
  bottom: 0;
}

.trim-time-handle:hover {
  background: rgba(255, 255, 255, 0.35);
}

.is-trimming,
.is-trimming * {
  cursor: ew-resize !important;
}

.is-time-trimming,
.is-time-trimming * {
  cursor: ns-resize !important;
}

.month-activity.continues-before {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.month-activity.continues-after {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.activity-block strong {
  font-size: 11px;
  line-height: 1.1;
}

.activity-block span {
  font-size: 11px;
  opacity: 0.9;
}

.activity-block.block-text-small strong,
.gantt-bar.block-text-small b {
  font-size: 10px;
}

.activity-block.block-text-small span,
.gantt-bar.block-text-small span {
  font-size: 10px;
}

.activity-block.block-text-large strong,
.gantt-bar.block-text-large b {
  font-size: 13px;
}

.activity-block.block-text-large span,
.gantt-bar.block-text-large span {
  font-size: 12px;
}

.month-activity span:not(.trim-handle) {
  display: none;
}

.month-activity.full-slot span:not(.trim-handle) {
  display: block;
}

.month-activity .activity-task-preview {
  display: none;
}

.month-activity.full-slot .activity-task-preview,
.month-activity.expanded-slot .activity-task-preview {
  display: grid;
}

.month-activity.full-slot .task-mini-block,
.month-activity.expanded-slot .task-mini-block {
  display: flex;
}

.month-activity.full-slot .task-mini-title,
.month-activity.full-slot .task-mini-meta,
.month-activity.expanded-slot .task-mini-title,
.month-activity.expanded-slot .task-mini-meta {
  display: block;
}

.activity-tags {
  display: flex;
  align-self: start;
  align-items: flex-start;
  gap: 4px;
  flex-wrap: wrap;
  font-style: normal;
  min-height: 0;
  max-width: 100%;
  overflow: hidden;
}

.activity-tags[hidden] {
  display: none !important;
}

.activity-tags i {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  height: 18px;
  min-width: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  padding: 3px 6px;
  font-style: normal;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-activity .activity-tags {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 6px;
  max-height: 18px;
  overflow: hidden;
}

.more-activities {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 0 10px;
  z-index: 2;
}

.week-number-head,
.week-number-cell {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  justify-content: center;
  text-align: center;
  background: #fbfcfc;
  border-right: 1px solid var(--line);
}

.week-number-cell {
  display: flex;
  align-items: flex-start;
  padding-top: 10px;
}

.week-view {
  min-width: 900px;
}

.day-view {
  min-width: min(760px, 100%);
}

.week-grid {
  display: grid;
  grid-template-columns: 70px repeat(7, minmax(110px, 1fr));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.day-grid {
  grid-template-columns: 70px minmax(360px, 1fr);
}

.week-head,
.time-slot,
.week-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.week-head {
  min-height: 44px;
  display: grid;
  align-items: center;
  align-content: center;
  justify-content: center;
  font-weight: 750;
  color: var(--muted);
  font-size: 12px;
  background: #fbfcfc;
}

.week-head.bank-holiday-head,
.gantt-day-head.bank-holiday-head {
  background: #f8bcbc;
  color: #172126;
}

.week-head small,
.gantt-day-head em {
  max-width: calc(100% - 8px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #172126;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.time-slot {
  min-height: 64px;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
  background: #fbfcfc;
}

.time-slot.out-of-hours {
  background: #eef1f4;
  color: #7b8794;
}

.week-cell {
  min-height: 64px;
  padding: 4px;
}

.week-cell.out-of-hours {
  background: #f0f2f4;
}

.week-cell.out-of-hours.bank-holiday-day {
  background: #fde8e8;
}

.week-head.weekend-day,
.week-cell.weekend-day {
  background: #eef1f4;
  color: #7b8794;
}

.week-head.weekend-day.bank-holiday-head,
.week-cell.weekend-day.bank-holiday-day {
  background: #fde8e8;
  color: #172126;
}

.week-cell.trim-target {
  box-shadow: inset 0 0 0 3px var(--warning);
}

.week-activity {
  align-self: stretch;
  min-height: 44px;
  height: auto;
  margin: 0;
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding-bottom: 28px;
}

.week-activity .activity-task-preview {
  align-self: end;
}

.week-activity.expanded-slot {
  z-index: 16;
  overflow: visible;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12), 0 8px 22px rgba(17, 24, 39, 0.18);
}

.week-activity.expanded-slot strong,
.week-activity.expanded-slot span:not(.trim-time-handle) {
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.15;
}

.week-activity.expanded-slot .activity-tags {
  max-width: 100%;
  flex-wrap: nowrap;
  overflow: hidden;
}

.week-activity:hover .trim-time-handle {
  background: rgba(255, 255, 255, 0.18);
}

.gantt-view {
  min-width: 980px;
  overflow: auto;
  border: 1px solid #b9c0c8;
  border-radius: var(--radius);
  background: #fbfcfc;
  max-height: calc(100vh - 88px);
}

.gantt-filterbar {
  position: sticky;
  left: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px;
  background: #f4f7f9;
  border-bottom: 1px solid #b9c0c8;
}

.gantt-filterbar span {
  color: #657381;
  font-size: 12px;
  font-weight: 750;
}

.gantt-board {
  min-width: max-content;
  position: relative;
}

.gantt-header,
.gantt-row {
  display: grid;
  grid-template-columns: 220px 1fr;
}

.gantt-header {
  position: sticky;
  top: 0;
  z-index: 8;
}

.gantt-resource-head,
.gantt-resource {
  position: sticky;
  left: 0;
  z-index: 6;
  background: #f4f7f9;
  border-right: 1px solid #aeb7c1;
}

.gantt-resource-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-weight: 800;
  color: #344150;
  border-bottom: 1px solid #aeb7c1;
}

.gantt-days,
.gantt-cells {
  display: grid;
  position: relative;
}

.gantt-day-head {
  min-height: 42px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1px;
  background: #f4f7f9;
  border-right: 1px solid #b9c0c8;
  border-bottom: 1px solid #aeb7c1;
  color: #1b2633;
  font-size: 12px;
}

.gantt-hourly .gantt-resource-head {
  min-height: 64px;
}

.gantt-hourly .gantt-days {
  grid-template-rows: 36px 28px;
}

.gantt-day-span {
  min-height: 36px;
}

.gantt-hour-head {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef3f6;
  border-right: 1px solid #c4cbd2;
  border-bottom: 1px solid #aeb7c1;
  color: #53616e;
  font-size: 11px;
  font-weight: 750;
}

.gantt-day-head.today {
  background: #d7edf0;
  box-shadow: inset 0 0 0 2px var(--accent);
}

.gantt-day-head.today.weekend-day {
  background: #eef1f4;
}

.gantt-day-head.today.bank-holiday-head {
  background: #f8bcbc;
}

.gantt-day-head span {
  color: #53616e;
}

.gantt-row {
  min-height: var(--gantt-row-height, 96px);
}

.gantt-resource {
  appearance: none;
  font: inherit;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px 12px;
  border-bottom: 1px solid #b9c0c8;
  border-top: 0;
  border-left: 0;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.gantt-resource.highlighted {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35), inset -1px 0 0 rgba(0, 0, 0, 0.18);
}

.gantt-resource strong {
  font-size: 14px;
  color: #172126;
}

.gantt-resource span {
  color: #657381;
  font-size: 12px;
}

.gantt-resource.highlighted strong,
.gantt-resource.highlighted span {
  color: var(--accent-ink);
}

.gantt-cells {
  min-height: var(--gantt-row-height, 96px);
  border-bottom: 1px solid #b9c0c8;
}

.gantt-cell {
  min-height: var(--gantt-row-height, 96px);
  background: #fbfcfc;
  border-right: 1px solid #b9c0c8;
}

.gantt-hour-cell {
  border-right-color: #d6dce1;
}

.gantt-hour-head.out-of-hours,
.gantt-hour-cell.out-of-hours {
  background: #f0f2f4;
  color: #7b8794;
}

.gantt-hour-cell[data-gantt-hour="8"],
.gantt-hour-cell[data-gantt-hour="12"],
.gantt-hour-cell[data-gantt-hour="16"] {
  border-left: 1px solid #aeb7c1;
}

.gantt-day-head.weekend-day,
.gantt-hour-head.weekend-day,
.gantt-cell.weekend-day {
  background: #eef1f4;
  color: #7b8794;
}

.gantt-day-head.weekend-day.bank-holiday-head,
.gantt-cell.weekend-day.bank-holiday-day {
  background: #fde8e8;
  color: #172126;
}

.gantt-bar {
  position: absolute;
  height: 24px;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--bar-color);
  color: #fff;
  padding: 0 8px;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  transition: opacity 120ms ease, box-shadow 120ms ease, outline-color 120ms ease;
}

.gantt-bar.focus-dimmed {
  opacity: 0.28;
}

.gantt-bar.full-slot,
.gantt-bar.expanded-slot {
  align-items: flex-start;
  align-content: flex-start;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  padding: 8px;
}

.gantt-bar.expanded-slot {
  z-index: 16;
  overflow: visible;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12), 0 8px 22px rgba(17, 24, 39, 0.18);
}

.gantt-bar.hourly {
  min-width: 28px;
}

.gantt-bar .trim-handle {
  width: 14px;
}

.gantt-bar:hover .trim-handle {
  background: rgba(255, 255, 255, 0.2);
}

.gantt-bar.selected {
  outline: 3px solid rgba(23, 33, 38, 0.35);
  outline-offset: 1px;
  z-index: 14;
}

.gantt-bar.task-child-block {
  --bar-color: color-mix(in srgb, var(--accent) 72%, #ffffff 28%);
  border-left: 4px solid rgba(23, 33, 38, 0.45);
}

.month-activity.selected,
.week-activity.selected,
.gantt-bar.selected {
  z-index: 14;
}

.month-activity.expanded-slot,
.week-activity.expanded-slot,
.gantt-bar.expanded-slot {
  z-index: 16;
}

.gantt-bar b {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-bar.full-slot b,
.gantt-bar.expanded-slot b {
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.15;
}

.gantt-bar span {
  font-size: 11px;
  opacity: 0.88;
  flex: 0 0 auto;
}

.gantt-bar .activity-task-preview {
  width: 100%;
}

.gantt-bar .task-mini-block {
  width: 100%;
  display: flex;
}

.gantt-bar .task-mini-title,
.gantt-bar .task-mini-meta {
  font-size: 10px;
}

.gantt-bar .task-mini-title {
  flex: 1 1 auto;
}

.gantt-bar .activity-tags {
  flex: 0 0 auto;
  max-width: 35%;
  overflow: hidden;
  flex-wrap: nowrap;
}

.gantt-bar.expanded-slot .activity-tags,
.gantt-bar.full-slot .activity-tags {
  max-width: 100%;
  flex-wrap: wrap;
  overflow: visible;
}

.block-preview {
  min-height: 72px;
  display: grid;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f4f7f9;
}

.block-preview .activity-block {
  max-width: 420px;
  margin: 0;
}

.gantt-empty {
  min-height: 140px;
  display: grid;
  place-items: center;
  color: #53616e;
  background: #f4f7f9;
}

.inspector {
  padding: 16px;
  overflow: auto;
  background: #f4f6f8;
}

.inspector-panel {
  display: grid;
  gap: 12px;
}

.inspector-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #fbfcfc;
}

.stat b {
  display: block;
  font-size: 18px;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
}

.stat.quote-total-match {
  border-color: rgba(41, 128, 85, 0.28);
  background: #f0faf4;
}

.stat.quote-total-match b,
.stat.quote-total-match span {
  color: var(--success);
}

.stat.quote-total-mismatch {
  border-color: rgba(176, 59, 59, 0.28);
  background: #fff5f5;
}

.stat.quote-total-mismatch b,
.stat.quote-total-mismatch span {
  color: var(--danger);
}

.stat.variance-over b,
.variance-over {
  color: var(--danger);
}

.stat.variance-under b,
.variance-under {
  color: #23764d;
}

.quote-baseline {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.quote-baseline h4 {
  margin: 0;
  font-size: 13px;
}

.list {
  display: grid;
  gap: 8px;
}

.activity-summary,
.task-row,
.message-row,
.proposal-card,
.proposal-activity-line,
.quote-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 10px;
}

.activity-mini-list,
.proposal-list {
  display: grid;
  gap: 8px;
}

.proposal-activity-line {
  display: grid;
  gap: 3px;
}

.proposal-activity-line span,
.proposal-card-head span {
  color: var(--muted);
  font-size: 12px;
}

.proposal-card {
  display: grid;
  gap: 10px;
}

.proposal-card-head,
.proposal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.proposal-actions {
  justify-content: flex-end;
}

.agenda-list {
  display: grid;
  gap: 10px;
}

.agenda-day {
  border-top: 1px solid var(--line-strong);
}

.agenda-day header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  color: #53616e;
  font-weight: 750;
}

.agenda-day header b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #485465;
  color: #fff;
  font-size: 12px;
}

.agenda-item {
  position: relative;
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 12px 12px 12px 16px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.agenda-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--item-color);
}

.agenda-item:hover {
  background: #e9edf2;
}

.agenda-item span,
.agenda-item small {
  color: #657381;
  font-size: 12px;
}

.agenda-item b {
  font-size: 15px;
  color: #111827;
}

.agenda-item em {
  color: #1f2937;
  font-style: normal;
  font-size: 13px;
}

.activity-summary {
  display: grid;
  grid-template-columns: 5px 1fr;
  gap: 10px;
}

.activity-summary > i {
  border-radius: 999px;
}

.activity-summary b,
.task-row b,
.quote-row b {
  display: block;
  font-size: 13px;
}

.activity-summary span,
.quote-row span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.activity-warning {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid rgba(161, 92, 0, 0.28);
  border-radius: 6px;
  background: #fff7ed;
  color: var(--warning);
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.35;
}

.activity-warning .icon {
  width: 18px;
  height: 18px;
}

.billing-lock-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: var(--bg);
}

.login-shell {
  width: min(760px, 100%);
  min-height: min(460px, calc(100vh - 64px));
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-rail {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: var(--nav);
  color: var(--nav-ink);
}

.login-rail-logo {
  width: 168px;
  height: auto;
  transform: translateY(-42px);
}

.login-rail-footer {
  display: grid;
  gap: 4px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #98a4b5;
  font-size: 13px;
}

.login-rail-footer b {
  color: var(--nav-ink);
  font-size: 14px;
}

.login-workspace {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(8, 17, 29, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(8, 17, 29, 0.035) 1px, transparent 1px),
    #f5f7f8;
  background-size: 38px 38px;
}

.login-card {
  width: min(350px, 100%);
  display: grid;
  gap: 14px;
  padding: 18px;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(28, 40, 46, 0.1);
}

.login-card-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.login-card-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.login-card h1 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  letter-spacing: 0;
}

.login-card p {
  margin: 2px 0 0;
  color: var(--muted);
  font-weight: 650;
}

.login-card label {
  color: var(--ink);
}

.login-card select {
  background: #ffffff;
}

.login-card .button {
  min-height: 40px;
}

.session-loading-card {
  width: min(360px, 100%);
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 24px;
  color: var(--muted);
  font-weight: 750;
}

.session-loading-card img {
  width: 210px;
  height: auto;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field-note {
  align-content: end;
  min-height: 74px;
}

.field label {
  font-size: 12px;
  font-weight: 750;
  color: #39464d;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  min-height: 38px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
}

.inline-select-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
}

.inline-select-action .icon-button {
  width: 42px;
  height: 42px;
}

.project-color-field input[type="color"] {
  width: 54px;
  height: 38px;
  min-height: 38px;
  padding: 3px;
  border-radius: 10px;
  cursor: pointer;
  justify-self: start;
}

.project-color-field input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.project-color-field input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 7px;
}

.project-color-field input[type="color"]::-moz-color-swatch {
  border: 0;
  border-radius: 7px;
}

.quick-client-menu {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #f8fbfd;
  display: grid;
  gap: 8px;
  box-shadow: var(--shadow-soft);
}

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

.quick-client-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  font-size: 14px;
  font-weight: 750;
  color: #172126;
}

.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.multi-select-dropdown {
  position: relative;
  width: 100%;
}

.multi-select-dropdown.disabled {
  pointer-events: none;
  opacity: 0.75;
}

.multi-select-dropdown summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.multi-select-dropdown summary::-webkit-details-marker {
  display: none;
}

.multi-select-dropdown summary::after {
  content: "";
  margin-left: auto;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #657381;
}

.multi-select-dropdown[open] summary::after {
  transform: rotate(180deg);
}

.multi-select-dropdown summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-select-dropdown summary b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: #657381;
}

.multi-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 80;
  max-height: 220px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.multi-select-menu label {
  display: grid;
  grid-template-columns: 18px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 6px;
  border-radius: 6px;
  font-size: 13px;
  color: #172126;
}

.multi-select-menu label:hover {
  background: #f0f4f7;
}

.multi-select-menu input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

.multi-select-menu i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.multi-select-menu small {
  color: #657381;
  font-weight: 750;
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 18, 22, 0.42);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 20;
}

.dialog {
  width: min(980px, 100%);
  max-height: min(880px, calc(100vh - 40px));
  overflow: auto;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.movable-dialog {
  position: fixed;
}

.movable-dialog:not([style]) {
  position: relative;
}

[data-dialog-drag-handle] {
  cursor: move;
}

.finder-dialog {
  width: min(1180px, 100%);
}

.finder-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

.finder-tabs button {
  background: #fbfcfc;
  border: 1px solid var(--line);
  border-bottom: 0;
  min-height: 34px;
  padding: 0 14px;
}

.finder-tabs button.active {
  background: var(--panel);
  font-weight: 750;
}

.finder-search {
  grid-template-columns: auto minmax(220px, 1fr);
  align-items: center;
}

.finder-table {
  border: 1px solid var(--line);
}

.finder-table tbody tr:nth-child(even) {
  background: #f8fbfd;
}

.finder-footer {
  justify-content: space-between;
}

.client-editor-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  gap: 10px;
  background: var(--panel);
}

.compact-dialog {
  width: min(560px, 100%);
}

.dialog-header,
.dialog-footer {
  position: sticky;
  background: var(--panel);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.dialog-header {
  top: 0;
}

.dialog-footer {
  bottom: 0;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
}

.dialog-body {
  padding: 16px;
}

.billing-hub-overlay {
  background: rgba(78, 86, 92, 0.64);
}

.billing-hub-dialog {
  width: min(1180px, calc(100vw - 80px));
  min-height: min(540px, calc(100vh - 120px));
}

.billing-hub-body {
  min-height: 430px;
  background: #e5eaee;
}

.billing-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  align-content: start;
}

.billing-hub-card {
  display: grid;
  justify-items: start;
  gap: 10px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #f9fbfc;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  cursor: pointer;
}

.billing-hub-card:hover {
  border-color: #8f99a3;
  background: #fff;
  transform: translateY(-1px);
}

.billing-hub-card strong {
  font-size: 18px;
}

.billing-hub-card span:last-child {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.billing-hub-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
}

.billing-hub-icon .icon {
  width: 24px;
  height: 24px;
}

.rate-card-title {
  align-items: center;
  margin-bottom: 10px;
}

.rate-card-title p {
  margin: 4px 0 0;
}

.rate-card-import {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.rate-card-import input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.rate-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.project-quote-panel {
  margin-top: 14px;
}

.vfx-bid-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f9fb;
}

.vfx-bid-panel h4 {
  margin: 0 0 4px;
}

.vfx-bid-panel p {
  margin: 0;
}

.quote-schedule-actions {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(140px, 180px) auto;
  gap: 10px;
  align-items: end;
}

.quote-actual-project-filter {
  max-width: 360px;
}

.activity-tabs {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  margin-bottom: 14px;
}

.activity-tabs button {
  min-height: 36px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 0 14px;
  font-weight: 800;
  position: relative;
}

.activity-tabs button:last-child {
  border-right: 0;
}

.activity-tabs button.active {
  background: var(--ink);
  color: #fff;
}

.activity-tabs button.has-unread {
  padding-right: 26px;
}

.tab-unread-dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ffd84d;
  box-shadow: 0 0 0 2px #fff;
}

.dialog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.panel-block {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfc;
  margin-bottom: 12px;
}

.panel-block h3 {
  margin: 0;
  font-size: 14px;
}

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

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

.task-row {
  display: grid;
  gap: 8px;
}

.task-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.task-title-display {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: text;
}

.task-title-display:disabled {
  cursor: default;
}

.task-title-input {
  width: min(360px, 100%);
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 4px 8px;
  font-weight: 750;
}

.task-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.manual-time-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.manual-time-control input {
  width: 58px;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 4px 8px;
}

.manual-time-control span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  background: var(--panel-2);
  color: #334047;
  font-weight: 650;
}

.pill.success {
  background: #dff0e8;
  color: var(--success);
}

.pill.warn {
  background: #f8ead8;
  color: var(--warning);
}

.message-row {
  display: grid;
  gap: 3px;
}

.message-row b {
  font-size: 12px;
}

.message-row p {
  margin: 0;
  font-size: 13px;
}

.message-row textarea {
  width: 100%;
  min-height: 72px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 8px 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 8px;
  z-index: 30;
}

.notification-popups {
  position: fixed;
  right: 16px;
  top: 76px;
  display: grid;
  gap: 10px;
  z-index: 90;
  pointer-events: none;
}

.notification-popup {
  width: min(360px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--ink);
}

.notification-popup .icon {
  color: var(--accent);
}

.notification-popup b,
.notification-popup p {
  margin: 0;
}

.notification-popup p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.notification-list {
  display: grid;
  gap: 8px;
}

.notification-pref-list {
  display: grid;
  gap: 10px;
}

.notification-defaults {
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.notification-defaults ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.notification-pref-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.notification-pref-copy {
  display: grid;
  gap: 3px;
}

.notification-pref-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.notification-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 10px;
}

.notification-row.unread {
  border-color: var(--accent);
  box-shadow: inset 4px 0 0 var(--accent);
}

.notification-row b,
.notification-row p {
  margin: 0;
}

.notification-row p,
.notification-row span {
  color: var(--muted);
  font-size: 13px;
}

.notification-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.toast {
  background: #172126;
  color: #fff;
  border-radius: var(--radius);
  padding: 10px 12px;
  min-width: 220px;
  box-shadow: var(--shadow);
  font-size: 13px;
}

.reports {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

td input,
td select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 6px 8px;
  background: #fff;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 9px 7px;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  background: #fbfcfc;
}

.quote-total-foot th {
  font-size: 13px;
  font-weight: 800;
}

.quote-total-foot .icon {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}

.quote-total-match th {
  color: var(--success);
  background: #f0faf4;
}

.quote-total-mismatch th {
  color: var(--danger);
  background: #fff5f5;
}

.quote-total-combined th {
  color: var(--ink);
  background: #f3f6f8;
}

.quote-mismatch-warning {
  border-color: rgba(181, 57, 59, 0.28);
  background: #fff5f5;
  color: var(--danger);
}

.right {
  text-align: right;
}

.hidden {
  display: none !important;
}

.context-menu {
  position: fixed;
  z-index: 40;
  min-width: 220px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
}

.context-menu button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 0 10px;
  text-align: left;
}

.context-menu button:hover {
  background: var(--panel-2);
}

.tag-editor-row {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.room-editor-row {
  grid-template-columns: 20px minmax(140px, 1fr) minmax(120px, 0.7fr) auto;
}

.tag-editor-row input {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 6px 8px;
}

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

  .inspector {
    display: none;
  }
}

@media (max-width: 760px) {
  .login-screen {
    padding: 0;
  }

  .login-shell {
    min-height: 100vh;
    grid-template-columns: 1fr;
    border: 0;
    border-radius: 0;
  }

  .login-rail {
    min-height: 120px;
    padding: 24px 20px;
  }

  .login-rail-logo {
    transform: none;
  }

  .login-workspace {
    padding: 20px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-list {
    max-height: 220px;
    overflow: auto;
  }

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

  .toolbar h2 {
    text-align: center;
  }

  .dialog-grid,
  .reports,
  .two,
  .three {
    grid-template-columns: 1fr;
  }
}
