:root {
  --ink: #0d1735;
  --muted: #6f80a3;
  --line: #d5e4f4;
  --line-strong: #bfd8f3;
  --surface: #ffffff;
  --surface-soft: #f6faff;
  --blue: #0877ed;
  --blue-dark: #0567d4;
  --blue-soft: #eaf4ff;
  --green: #07965d;
  --red: #ef3f3f;
  --orange: #ee9b16;
  --sidebar-width: 284px;
  --shadow: 0 12px 34px rgba(36, 91, 145, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #f6faff;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.app-body {
  min-height: 100vh;
  background: #f8fbff;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.sidebar-brand {
  display: flex;
  min-height: 102px;
  align-items: center;
  gap: 15px;
  padding: 0 31px;
}

.brand-word {
  color: #0b271f;
  font-family: "Segoe UI Light", "Segoe UI", sans-serif;
  font-size: 29px;
  font-weight: 300;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-divider {
  width: 1px;
  height: 38px;
  background: #bac8db;
}

.brand-suffix {
  color: #38517b;
  font-size: 16px;
}

.sidebar-close {
  display: none;
  margin-left: auto;
}

.sidebar-nav {
  display: grid;
  gap: 5px;
  padding: 0 15px;
}

.nav-item {
  display: flex;
  min-height: 62px;
  align-items: center;
  gap: 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 22px;
  color: #254981;
  font-size: 17px;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-item svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #0877ed;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  flex: 0 0 auto;
}

.nav-item:hover {
  background: #f0f7ff;
  color: var(--blue);
}

.nav-item.active {
  border-color: #0877ed;
  background: #0877ed;
  box-shadow: 0 8px 22px rgba(8, 119, 237, 0.2);
  color: white;
}

.nav-item.active svg {
  stroke: white;
}

.nav-item.is-pending::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-left: auto;
  border-radius: 50%;
  background: #d6e2f0;
  opacity: 0;
  transition: opacity 160ms ease;
}

.nav-item.is-pending:hover::after {
  opacity: 1;
}

.sidebar-motto {
  margin: auto 37px 42px;
  color: #4c6390;
  font-size: 12px;
  letter-spacing: 0;
  line-height: 1.55;
  text-transform: uppercase;
}

.main-area {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.mobile-header {
  display: none;
}

.page-shell {
  width: 100%;
  max-width: 1660px;
  margin: 0 auto;
  padding: 42px 34px 34px;
}

.page-header {
  display: flex;
  min-height: 70px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.page-header h1 {
  margin: 0;
  font-size: 42px;
  font-weight: 720;
  line-height: 1.05;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.header-actions,
.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.select-control {
  display: flex;
  min-width: 210px;
  height: 48px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  padding: 0 14px;
}

.select-control > svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  flex: 0 0 auto;
}

.select-control > svg:last-child {
  width: 17px;
  height: 17px;
}

.select-control select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  appearance: none;
  cursor: pointer;
}

.user-chip {
  position: relative;
  display: flex;
  min-width: 214px;
  height: 54px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  padding: 0 0 0 28px;
  text-align: left;
}

.user-chip > svg {
  width: 17px;
  height: 17px;
  margin-left: auto;
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
}

.avatar {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #cde7ff;
  color: #0877ed;
  font-weight: 700;
}

.avatar.compact {
  width: 38px;
  height: 38px;
  font-size: 13px;
}

.user-chip-copy {
  display: grid;
  min-width: 0;
}

.user-chip-copy strong,
.user-chip-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip-copy strong {
  font-size: 15px;
}

.user-chip-copy small {
  color: var(--muted);
  font-size: 13px;
}

.primary-button,
.secondary-button,
.text-action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 7px;
  padding: 0 20px;
  font-weight: 650;
}

.primary-button {
  border: 1px solid var(--blue);
  background: var(--blue);
  box-shadow: 0 8px 22px rgba(8, 119, 237, 0.18);
  color: white;
}

.primary-button:hover {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
}

.primary-button svg,
.secondary-button svg,
.text-action svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: white;
  color: var(--ink);
}

.secondary-button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.text-action {
  border: 0;
  background: transparent;
  color: var(--blue);
  white-space: nowrap;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--blue);
}

.icon-button:hover {
  background: var(--blue-soft);
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.surface,
.metric-card,
.project-tab,
.board-surface {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(28, 78, 132, 0.035);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 18px;
}

.metric-card {
  min-height: 196px;
  padding: 27px;
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 16px;
}

.metric-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--blue);
}

.metric-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.metric-main {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 15px;
}

.metric-main > strong {
  color: #0877ed;
  font-size: 42px;
  line-height: 1;
  white-space: nowrap;
}

.sparkline {
  width: 110px;
  height: 48px;
}

.spark-path {
  fill: none;
  stroke: #0877ed;
  stroke-width: 2.5;
}

.spark-area {
  fill: #eaf4ff;
}

.metric-change {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 9px;
}

.metric-change span {
  color: var(--green);
  font-weight: 750;
}

.metric-change.negative span {
  color: var(--red);
}

.metric-change small {
  color: var(--muted);
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(330px, 0.95fr);
  gap: 15px;
  margin-bottom: 18px;
}

.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.15fr);
  gap: 15px;
}

.chart-surface,
.conversion-surface {
  min-height: 322px;
  padding: 24px 27px;
}

.surface-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.surface h2,
.board-surface h2,
.empty-state h2 {
  margin: 0;
  font-size: 22px;
}

.chart-legend {
  display: flex;
  gap: 24px;
  color: #33476b;
  font-size: 14px;
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.primary {
  background: #0877ed;
}

.dot.secondary {
  background: #78bcff;
}

.chart-canvas {
  width: 100%;
  height: 245px;
  margin-top: 12px;
}

.conversion-surface .surface-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.conversion-surface .surface-heading p strong {
  margin-right: 12px;
  color: var(--blue);
  font-size: 38px;
}

.funnel-list {
  display: grid;
  gap: 20px;
  margin-top: 30px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 120px minmax(90px, 1fr) 36px;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.funnel-track {
  height: 27px;
  overflow: hidden;
  border-radius: 5px;
  background: #edf3f9;
}

.funnel-track i {
  display: block;
  min-width: 8px;
  height: 100%;
  border-radius: 5px;
  background: #0877ed;
}

.funnel-row:nth-child(2) .funnel-track i {
  background: #409bf5;
}

.funnel-row:nth-child(3) .funnel-track i {
  background: #78bcf8;
}

.funnel-row:nth-child(4) .funnel-track i {
  background: #a8d5fa;
}

.attention-surface,
.upcoming-surface {
  min-height: 235px;
  padding: 20px 27px;
}

.attention-surface h2 {
  margin-bottom: 8px;
}

.attention-row {
  display: grid;
  min-height: 58px;
  grid-template-columns: 46px minmax(0, 1fr) 32px 22px;
  align-items: center;
  border-top: 1px solid #e5edf6;
}

.attention-row:nth-of-type(1) {
  border-top: 0;
}

.attention-row > svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #496185;
  stroke-width: 2;
}

.attention-row > strong {
  color: var(--red);
  font-size: 18px;
}

.attention-row.is-muted {
  opacity: 0.65;
}

.attention-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 7px;
  background: #fff0ef;
  color: var(--red);
}

.attention-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.upcoming-surface .surface-heading a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: 14px;
}

.upcoming-surface .surface-heading a svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.upcoming-list {
  margin-top: 8px;
}

.upcoming-row {
  display: grid;
  min-height: 58px;
  grid-template-columns: 34px minmax(180px, 1fr) auto 128px;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #e5edf6;
}

.task-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid #9bb0cb;
  border-radius: 5px;
}

.upcoming-copy {
  display: grid;
  min-width: 0;
}

.upcoming-copy strong,
.upcoming-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upcoming-copy small {
  color: var(--muted);
}

.project-pill {
  max-width: 170px;
  overflow: hidden;
  border-radius: 5px;
  background: #eaf4ff;
  padding: 5px 9px;
  color: #58719a;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upcoming-row time {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.upcoming-row time svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.8;
}

.empty-compact {
  display: grid;
  min-height: 150px;
  place-items: center;
  color: var(--muted);
}

/* Projects */
.create-project-button {
  min-width: 212px;
}

.project-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 20px;
}

.project-tab {
  display: grid;
  min-height: 93px;
  grid-template-columns: 52px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 13px;
  padding: 17px 22px;
  transition: border-color 160ms ease, background 160ms ease;
}

.project-tab:hover,
.project-tab.active {
  border-color: var(--blue);
  background: #f7fbff;
}

.project-tab-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--blue);
}

.project-tab-icon svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.project-tab > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.project-tab strong,
.project-tab small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-tab strong {
  font-size: 17px;
}

.project-tab small {
  color: var(--muted);
}

.project-tab-arrow {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
}

.board-surface {
  overflow: hidden;
}

.board-toolbar {
  display: flex;
  min-height: 112px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 17px 22px;
}

.board-toolbar > div:first-child {
  display: grid;
  gap: 10px;
}

.compact-select {
  min-width: 230px;
  width: fit-content;
  height: 42px;
}

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

.search-control {
  display: flex;
  width: min(330px, 28vw);
  height: 44px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: white;
  padding: 0 14px;
}

.search-control svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #64789b;
  stroke-width: 1.8;
}

.search-control input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
}

.kanban-scroll {
  overflow-x: auto;
  border-top: 1px solid #e5edf6;
  border-bottom: 1px solid #e5edf6;
  scrollbar-color: #bbd7f3 transparent;
  scrollbar-width: thin;
}

.kanban-grid {
  display: grid;
  width: max-content;
  min-width: 100%;
  grid-template-columns: repeat(var(--column-count), minmax(292px, 1fr));
  background: #f9fcff;
}

.kanban-column {
  width: 315px;
  min-height: 485px;
  border-right: 1px solid #deebf7;
  padding: 0 8px 12px;
}

.kanban-column > header {
  display: flex;
  height: 47px;
  align-items: center;
  justify-content: space-between;
  margin: 0 -8px 8px;
  background: var(--stage-color);
  padding: 0 20px;
}

.kanban-column > header strong {
  font-size: 16px;
}

.kanban-cards {
  min-height: 420px;
}

.kanban-cards.is-dragover {
  outline: 2px dashed #77baf9;
  outline-offset: -4px;
  background: #f0f8ff;
}

.lead-card {
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  box-shadow: 0 5px 14px rgba(36, 91, 145, 0.04);
  cursor: grab;
}

.lead-card:active {
  cursor: grabbing;
}

.lead-card.is-dragging {
  opacity: 0.45;
}

.lead-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 0;
}

.lead-card-title strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-card-title .icon-button {
  width: 28px;
  height: 28px;
}

.lead-card p {
  margin: 1px 14px 9px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-meta {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 14px 8px;
  color: var(--muted);
  font-size: 12px;
}

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

.lead-meta svg,
.lead-action svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.lead-action {
  display: grid;
  min-height: 37px;
  grid-template-columns: 18px minmax(0, 1fr) 17px;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #e6eef7;
  padding: 0 14px;
  color: #2a3f67;
  font-size: 12px;
}

.lead-action > svg:first-child {
  color: var(--blue);
}

.lead-action span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-empty {
  display: grid;
  min-height: 90px;
  place-items: center;
  border: 1px dashed #cadced;
  border-radius: 7px;
  color: #91a3bf;
  font-size: 12px;
}

.stage-overview {
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 22px;
  overflow-x: auto;
  padding: 10px 18px;
}

.stage-total {
  display: grid;
  min-width: 100px;
  padding-right: 18px;
  border-right: 1px solid var(--line);
}

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

.stage-overview > span {
  display: grid;
  min-width: 110px;
  grid-template-columns: 13px 1fr;
  gap: 4px 8px;
  color: #445b80;
  font-size: 11px;
}

.stage-overview > span i {
  width: 13px;
  height: 13px;
  border-radius: 50%;
}

.stage-overview > span strong {
  grid-column: 2;
  color: var(--ink);
  font-size: 15px;
}

.empty-state {
  display: grid;
  min-height: 430px;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
}

.empty-state p {
  max-width: 460px;
  margin: 0 0 10px;
  color: var(--muted);
}

.empty-state-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
}

.empty-state-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.app-dialog {
  width: min(520px, calc(100% - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(16, 44, 82, 0.25);
  padding: 0;
}

.app-dialog::backdrop {
  background: rgba(13, 23, 53, 0.35);
  backdrop-filter: blur(3px);
}

.app-dialog form {
  display: grid;
  gap: 9px;
  padding: 24px;
}

.app-dialog label {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 650;
}

.app-dialog input,
.app-dialog select,
.app-dialog textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: 0;
  padding: 11px 13px;
}

.app-dialog input:focus,
.app-dialog select:focus,
.app-dialog textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(8, 119, 237, 0.1);
}

.dialog-heading,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.dialog-heading h2 {
  margin: 0;
}

.dialog-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.user-popover {
  position: fixed;
  z-index: 80;
  width: 230px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.user-popover-head {
  display: grid;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.user-popover-head span {
  color: var(--muted);
  font-size: 13px;
}

.popover-action {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  border: 0;
  background: white;
  padding: 0 16px;
  text-align: left;
}

.popover-action:hover {
  background: #f5f9fe;
}

.popover-action svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.toast-stack {
  position: fixed;
  z-index: 90;
  top: 18px;
  right: 22px;
}

.toast {
  border: 1px solid #b9ddc9;
  border-radius: 7px;
  background: #effbf4;
  box-shadow: var(--shadow);
  padding: 12px 16px;
  color: #147547;
}

.sidebar-scrim {
  display: none;
}

@media (max-width: 1260px) {
  :root {
    --sidebar-width: 240px;
  }

  .sidebar-brand {
    padding: 0 23px;
  }

  .brand-word {
    font-size: 25px;
    letter-spacing: 0;
  }

  .nav-item {
    gap: 15px;
    padding: 0 16px;
    font-size: 15px;
  }

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

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

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

  .board-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .board-actions {
    width: 100%;
  }

  .search-control {
    width: min(440px, 45vw);
  }
}

@media (max-width: 900px) {
  .sidebar {
    width: min(310px, 88vw);
    transform: translateX(-102%);
    transition: transform 200ms ease;
  }

  .sidebar-close {
    display: grid;
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 20;
    inset: 0;
    display: block;
    background: rgba(13, 23, 53, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
  }

  .sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-open .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .main-area {
    margin-left: 0;
    padding-top: 66px;
  }

  .mobile-header {
    position: fixed;
    z-index: 18;
    inset: 0 0 auto 0;
    display: flex;
    height: 66px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    padding: 0 18px;
    backdrop-filter: blur(12px);
  }

  .mobile-header .brand-word {
    font-size: 22px;
  }

  .page-shell {
    padding: 24px 20px;
  }

  .page-header .user-chip {
    display: none;
  }

  .page-header h1 {
    font-size: 34px;
  }

  .project-tabs {
    display: flex;
    overflow-x: auto;
    padding-bottom: 5px;
  }

  .project-tab {
    min-width: 300px;
  }

  .board-actions {
    flex-wrap: wrap;
  }

  .search-control {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 20px 14px;
  }

  .page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .page-header h1 {
    font-size: 30px;
  }

  .header-actions,
  .filter-row {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .select-control,
  .create-project-button {
    width: 100%;
  }

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

  .metric-card {
    min-height: 170px;
    padding: 22px;
  }

  .metric-main > strong {
    font-size: 38px;
  }

  .chart-surface,
  .conversion-surface,
  .attention-surface,
  .upcoming-surface {
    padding: 20px;
  }

  .chart-legend {
    gap: 11px;
    font-size: 12px;
  }

  .funnel-row {
    grid-template-columns: 92px minmax(70px, 1fr) 28px;
    gap: 8px;
  }

  .upcoming-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    padding: 8px 0;
  }

  .upcoming-row .project-pill {
    display: none;
  }

  .upcoming-row time {
    grid-column: 2 / -1;
  }

  .project-tab {
    min-width: 270px;
  }

  .board-toolbar {
    padding: 18px 15px;
  }

  .board-actions .secondary-button {
    flex: 1;
  }

  .text-action {
    flex: 1;
  }

  .kanban-column {
    width: 286px;
  }

  .stage-overview {
    display: none;
  }
}

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



@media (min-width: 901px) {
  .sidebar .sidebar-close {
    display: none;
  }
}


/* Companies and import */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 650;
}
.back-link svg,
.company-toolbar svg,
.contact-type-icon svg,
.company-facts svg,
.external-link svg,
.project-mark svg,
.file-drop svg,
.import-history svg,
.import-alert svg,
.stat-icon svg,
.complete-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.compact-page-header { min-height: 78px; }
.page-context { margin: 10px 0 0; color: var(--muted); }
.company-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 16px;
  padding: 17px 20px;
}
.company-filter-form { display: flex; min-width: 0; flex: 1; align-items: flex-end; gap: 10px; }
.company-filter-form .compact-select { width: auto; min-width: 0; height: auto; }
.search-control.company-search {
  display: flex;
  width: min(420px, 36vw);
  height: 46px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: white;
  padding: 0 13px;
}
.company-search svg { flex: 0 0 auto; color: var(--blue); }
.company-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; }
.compact-select { display: grid; gap: 4px; }
.compact-select span { color: var(--muted); font-size: 11px; font-weight: 650; }
.compact-select select {
  min-width: 150px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: 0;
  background: white;
  padding: 0 34px 0 12px;
}
.toolbar-result { display: grid; min-width: 112px; border-left: 1px solid var(--line); padding-left: 20px; }
.toolbar-result strong { color: var(--blue); font-size: 26px; line-height: 1; }
.toolbar-result span { color: var(--muted); font-size: 12px; }
.company-table { overflow: hidden; }
.company-table-head,
.company-table-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) minmax(210px, 1.15fr) minmax(170px, .8fr) 90px 34px;
  align-items: center;
  gap: 18px;
}
.company-table-head { min-height: 46px; border-bottom: 1px solid var(--line); background: var(--surface-soft); padding: 0 20px; color: var(--muted); font-size: 12px; font-weight: 650; }
.company-table-row { min-height: 84px; border-bottom: 1px solid #e6eff8; padding: 10px 20px; transition: background 140ms ease; }
.company-table-row:last-child { border-bottom: 0; }
.company-table-row:hover { background: #f7fbff; }
.company-name-cell { display: flex; min-width: 0; align-items: center; gap: 13px; }
.company-name-cell > i,
.company-avatar,
.person-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue);
  font-style: normal;
  font-weight: 750;
}
.company-name-cell > span,
.company-place-cell,
.company-count-cell,
.company-contact-cell { display: grid; min-width: 0; gap: 4px; }
.company-name-cell strong,
.company-name-cell small,
.company-contact-cell small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-name-cell small,
.company-place-cell small,
.company-count-cell small,
.company-contact-cell small { color: var(--muted); font-size: 12px; }
.company-contact-cell small { display: flex; align-items: center; gap: 7px; }
.company-contact-cell svg { width: 15px; height: 15px; color: var(--blue); }
.company-count-cell strong { color: var(--blue); font-size: 19px; }
.row-chevron { display: grid; place-items: center; color: var(--blue); }
.row-chevron svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 18px; }
.pagination span { color: var(--muted); font-size: 13px; }

.entity-form-page { max-width: 1260px; }
.entity-form { display: grid; gap: 16px; }
.form-section { padding: 24px; }
.form-section-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.form-section-heading h2 { margin: 0; font-size: 21px; }
.form-section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.section-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 7px; background: var(--blue-soft); color: var(--blue); }
.section-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: grid; min-width: 0; gap: 7px; color: #263b61; font-size: 13px; font-weight: 650; }
.field.span-2 { grid-column: span 2; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: 0;
  background: white;
  padding: 11px 13px;
  font-weight: 400;
}
.field input,
.field select { height: 46px; }
.field textarea { resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(8,119,237,.1); }
.errorlist { margin: 0; padding: 0; color: var(--red); font-size: 12px; font-weight: 500; list-style: none; }
.form-errors { border: 1px solid #ffc5c5; border-radius: 7px; background: #fff4f4; padding: 13px 16px; color: #b51f1f; }
.form-footer-actions { display: flex; justify-content: flex-end; gap: 12px; padding-top: 3px; }

.company-title-line { display: flex; align-items: center; gap: 15px; }
.company-title-line .company-avatar { width: 54px; height: 54px; font-size: 22px; }
.company-title-line h1 { font-size: 36px; }
.company-title-line p { margin: 4px 0 0; color: var(--muted); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .65fr); gap: 16px; align-items: start; }
.detail-main,
.detail-sidebar { display: grid; gap: 16px; }
.detail-section { padding: 22px; }
.detail-section .surface-heading { align-items: center; margin-bottom: 18px; }
.detail-section h2 { margin: 0; font-size: 21px; }
.detail-section .eyebrow { margin-bottom: 4px; }
.contact-list { display: grid; }
.contact-row { display: grid; min-height: 66px; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 12px; border-top: 1px solid #e7eff8; }
.contact-row:first-child { border-top: 0; }
.contact-type-icon,
.project-mark { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 7px; background: var(--blue-soft); color: var(--blue); }
.contact-row > span:nth-child(2) { display: grid; min-width: 0; }
.contact-row small { color: var(--muted); font-size: 12px; }
.contact-row strong { overflow-wrap: anywhere; }
.status-badge { display: inline-flex; width: fit-content; align-items: center; border-radius: 999px; padding: 4px 8px; background: #edf3fa; color: #52698e; font-size: 11px; font-style: normal; font-weight: 700; white-space: nowrap; }
.status-badge.is-primary { background: #e7f6ef; color: #08784c; }
.people-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.person-item { min-width: 0; border: 1px solid #e0ebf6; border-radius: 7px; padding: 15px; }
.person-head { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; }
.person-avatar { width: 38px; height: 38px; }
.person-head > div { display: grid; min-width: 0; }
.person-head small,
.person-contacts,
.person-item p { color: var(--muted); font-size: 12px; }
.person-contacts { display: grid; gap: 3px; margin-top: 12px; }
.person-contacts strong { color: #31496f; font-weight: 600; overflow-wrap: anywhere; }
.person-item p { margin: 10px 0 0; }
.lead-summary-list { display: grid; }
.lead-summary-row { display: grid; min-height: 72px; grid-template-columns: 38px minmax(150px, .7fr) auto minmax(180px, 1fr); align-items: center; gap: 12px; border-top: 1px solid #e7eff8; }
.lead-summary-row:first-child { border-top: 0; }
.lead-summary-row > span:nth-child(2) { display: grid; }
.lead-summary-row small,
.lead-next { color: var(--muted); font-size: 12px; }
.stage-chip { border-left: 4px solid var(--stage-color); border-radius: 4px; background: #f4f8fd; padding: 6px 9px; font-size: 12px; font-style: normal; font-weight: 650; }
.company-info-section h2 { margin-bottom: 14px; }
.company-facts { margin: 0; }
.company-facts > div { border-top: 1px solid #e7eff8; padding: 13px 0; }
.company-facts dt { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.company-facts dt svg { width: 16px; height: 16px; color: var(--blue); }
.company-facts dd { margin: 5px 0 0 24px; overflow-wrap: anywhere; }
.external-link { display: flex; align-items: center; gap: 9px; border-top: 1px solid #e7eff8; padding-top: 14px; color: var(--blue); font-size: 13px; font-weight: 650; }
.external-link svg:last-child { margin-left: auto; }
.company-description { margin: 12px 0 0; color: #40577c; }
.section-empty { margin: 18px 0 4px; color: var(--muted); }
.dialog-two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-two-columns label { display: grid; gap: 8px; }
.checkbox-field { display: flex !important; align-items: center; gap: 10px; }
.app-dialog .checkbox-field input { width: 18px; height: 18px; padding: 0; }

.import-layout { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(300px,.65fr); gap: 16px; margin-bottom: 16px; }
.import-upload,
.import-note,
.recent-imports,
.preview-table,
.import-decision,
.import-complete { padding: 24px; }
.import-form { display: grid; gap: 18px; }
.file-drop { position: relative; display: grid; min-height: 230px; place-items: center; align-content: center; gap: 5px; border: 1px dashed #9fc8f0; border-radius: 8px; background: #f7fbff; text-align: center; transition: border-color 150ms ease, background 150ms ease; }
.file-drop:hover,
.file-drop.is-dragging { border-color: var(--blue); background: #edf6ff; }
.file-drop input { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; opacity: 0; }
.file-drop-icon { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 8px; background: var(--blue-soft); color: var(--blue); }
.file-drop-icon svg { width: 28px; height: 28px; }
.file-drop strong { margin-top: 8px; color: var(--blue); }
.file-drop small { color: var(--muted); }
.file-drop i { margin-top: 10px; color: #8393b0; font-size: 11px; font-style: normal; }
.import-submit { justify-self: end; }
.import-note h2 { margin: 0; font-size: 21px; }
.import-steps { display: grid; gap: 4px; margin: 22px 0 0; padding: 0; list-style: none; }
.import-steps li { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 12px; padding: 15px 0; border-top: 1px solid #e7eff8; }
.import-steps li > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 750; }
.import-steps li > div { display: grid; gap: 4px; }
.import-steps small { color: var(--muted); }
.recent-imports { margin-top: 16px; }
.import-history { margin: 18px -24px -24px; }
.import-history-head,
.import-history-row { display: grid; grid-template-columns: minmax(250px,1.4fr) minmax(150px,.8fr) 70px 130px 130px 24px; align-items: center; gap: 14px; padding: 0 24px; }
.import-history-head { min-height: 42px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); font-size: 12px; font-weight: 650; }
.import-history-row { min-height: 62px; border-bottom: 1px solid #e7eff8; font-size: 13px; }
.import-history-row:last-child { border-bottom: 0; }
.import-history-row:hover { background: #f8fbff; }
.import-history-row > span:first-child { display: flex; min-width: 0; align-items: center; gap: 9px; }
.import-history-row > span:first-child svg { flex: 0 0 auto; color: var(--blue); }
.import-history-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-completed,
.row-status-imported,
.row-status-updated { background: #e7f6ef; color: #08784c; }
.status-failed,
.row-status-error { background: #fff0f0; color: #c52828; }
.status-previewed,
.status-uploaded { background: var(--blue-soft); color: var(--blue); }
.row-status-duplicate,
.row-status-skipped { background: #fff5dd; color: #9a6500; }
.row-status-new { background: #e7f6ef; color: #08784c; }
.import-alert { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; border: 1px solid #f0d38a; border-radius: 7px; background: #fff9e9; padding: 13px 16px; color: #805900; }
.import-alert.is-error { border-color: #ffc5c5; background: #fff3f3; color: #a92626; }
.import-alert > div { display: grid; gap: 2px; }
.import-alert span { font-size: 13px; }
.import-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 16px; }
.import-stat { display: flex; min-height: 106px; align-items: center; gap: 14px; padding: 18px; }
.stat-icon { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border-radius: 7px; }
.stat-total { background: var(--blue-soft); color: var(--blue); }
.stat-new { background: #e7f6ef; color: var(--green); }
.stat-duplicate { background: #fff5dd; color: #b47700; }
.stat-error { background: #fff0f0; color: var(--red); }
.import-stat > div { display: grid; }
.import-stat small { color: var(--muted); }
.import-stat strong { font-size: 30px; line-height: 1.1; }
.import-decision { display: grid; grid-template-columns: minmax(230px,.7fr) minmax(0,1.3fr); gap: 26px; margin-bottom: 16px; }
.import-decision h2,
.import-complete h2 { margin: 0; font-size: 21px; }
.import-decision p:not(.eyebrow),
.import-complete p { color: var(--muted); }
.policy-form { display: grid; gap: 16px; }
.policy-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.policy-option { display: grid; min-height: 68px; grid-template-columns: 18px 1fr; align-items: start; gap: 9px; border: 1px solid var(--line); border-radius: 7px; padding: 11px; cursor: pointer; }
.policy-option:has(input:checked) { border-color: var(--blue); background: #f4f9ff; }
.policy-option input { margin-top: 4px; accent-color: var(--blue); }
.policy-option span { display: grid; gap: 2px; }
.policy-option small { color: var(--muted); font-size: 11px; }
.policy-form .primary-button { justify-self: end; }
.import-complete { display: grid; grid-template-columns: 52px minmax(0,1fr) auto; align-items: center; gap: 16px; margin-bottom: 16px; }
.complete-icon { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 8px; background: #e7f6ef; color: var(--green); }
.complete-icon svg { width: 28px; height: 28px; }
.import-complete p { margin: 5px 0 0; }
.preview-table .surface-heading { align-items: center; margin-bottom: 18px; }
.preview-table h2 { margin: 0; font-size: 21px; }
.table-note { color: var(--muted); font-size: 12px; }
.preview-table-scroll { overflow-x: auto; margin: 0 -24px -24px; }
.preview-head,
.preview-row { display: grid; min-width: 900px; grid-template-columns: 62px minmax(230px,1.3fr) minmax(180px,.9fr) 130px minmax(200px,1fr); align-items: center; gap: 15px; padding: 0 24px; }
.preview-head { min-height: 42px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); font-size: 12px; font-weight: 650; }
.preview-row { min-height: 68px; border-bottom: 1px solid #e7eff8; font-size: 13px; }
.preview-row:last-child { border-bottom: 0; }
.preview-row > span { display: grid; min-width: 0; gap: 3px; }
.preview-row small { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.row-number { color: var(--muted); }

@media (max-width: 1180px) {
  .company-toolbar { align-items: stretch; flex-direction: column; }
  .company-filter-form { flex-wrap: wrap; }
  .search-control.company-search { width: 100%; }
  .toolbar-result { display: flex; align-items: baseline; gap: 8px; border-left: 0; padding-left: 0; }
  .company-table-head,
  .company-table-row { grid-template-columns: minmax(220px,1.5fr) minmax(180px,1fr) minmax(140px,.8fr) 70px 24px; gap: 12px; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .import-layout { grid-template-columns: 1fr; }
  .import-note { display: none; }
  .import-history-head,
  .import-history-row { grid-template-columns: minmax(230px,1.2fr) minmax(130px,.7fr) 60px 120px 110px 24px; }
}
@media (max-width: 820px) {
  .company-table-head { display: none; }
  .company-table { display: grid; gap: 10px; overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .company-table-row { grid-template-columns: minmax(0,1fr) 24px; gap: 10px; border: 1px solid var(--line); border-radius: 8px; background: white; padding: 15px; }
  .company-contact-cell,
  .company-place-cell,
  .company-count-cell { grid-column: 1; padding-left: 55px; }
  .company-contact-cell { margin-top: 3px; }
  .company-place-cell { display: flex; gap: 8px; }
  .company-count-cell { display: flex; align-items: baseline; gap: 5px; }
  .row-chevron { grid-column: 2; grid-row: 1; }
  .form-grid-three { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .people-grid { grid-template-columns: 1fr; }
  .lead-summary-row { grid-template-columns: 38px minmax(0,1fr) auto; padding: 12px 0; }
  .lead-next { grid-column: 2 / -1; }
  .import-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .import-decision { grid-template-columns: 1fr; }
  .import-history { overflow-x: auto; }
  .import-history-head,
  .import-history-row { min-width: 820px; }
}
@media (max-width: 640px) {
  .company-filter-form { display: grid; grid-template-columns: 1fr 1fr; }
  .company-search { grid-column: 1 / -1; }
  .company-filter-form .compact-select { width: 100%; min-width: 0; }
  .compact-select select { width: 100%; min-width: 0; }
  .filter-submit { grid-column: 1 / -1; }
  .company-page .header-actions,
  .import-page .header-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .company-page .header-actions .user-chip,
  .import-page .header-actions .user-chip { display: none; }
  .company-title-line { align-items: flex-start; }
  .company-title-line h1 { font-size: 27px; overflow-wrap: anywhere; }
  .detail-sidebar { grid-template-columns: 1fr; }
  .detail-header .header-actions { width: 100%; }
  .detail-header .secondary-button { width: 100%; }
  .detail-section .surface-heading { align-items: flex-start; flex-direction: column; }
  .detail-section .surface-heading .secondary-button { width: 100%; }
  .contact-row { grid-template-columns: 38px minmax(0,1fr); padding: 10px 0; }
  .contact-row .status-badge { grid-column: 2; }
  .person-head { grid-template-columns: 38px minmax(0,1fr); }
  .person-head .status-badge { grid-column: 2; }
  .lead-summary-row { grid-template-columns: 34px minmax(0,1fr); }
  .lead-summary-row .stage-chip { grid-column: 2; width: fit-content; }
  .dialog-two-columns,
  .form-grid,
  .form-grid-three { grid-template-columns: 1fr; }
  .field.span-2 { grid-column: auto; }
  .form-section { padding: 18px; }
  .form-footer-actions > * { flex: 1; }
  .file-drop { min-height: 210px; }
  .import-upload,
  .recent-imports,
  .preview-table,
  .import-decision,
  .import-complete { padding: 18px; }
  .import-form .form-grid { gap: 12px; }
  .import-submit { width: 100%; }
  .import-stats { gap: 9px; }
  .import-stat { min-height: 90px; gap: 9px; padding: 12px; }
  .stat-icon { width: 36px; height: 36px; }
  .import-stat strong { font-size: 24px; }
  .policy-options { grid-template-columns: 1fr; }
  .policy-form .primary-button { width: 100%; }
  .import-complete { grid-template-columns: 44px minmax(0,1fr); }
  .import-complete .primary-button { grid-column: 1 / -1; width: 100%; }
  .preview-table-scroll { margin-right: -18px; margin-left: -18px; }
}
/* Communication timeline */
.communication-section .surface-heading { margin-bottom: 10px; }
.timeline { position: relative; display: grid; }
.timeline::before { content: ""; position: absolute; top: 42px; bottom: 28px; left: 18px; width: 1px; background: #dce8f5; }
.timeline-day { position: relative; z-index: 1; padding: 14px 0 8px 50px; }
.timeline-day span { display: inline-block; border-radius: 4px; background: #f1f6fc; padding: 4px 8px; color: #607497; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.timeline-event { position: relative; display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 12px; padding: 9px 0; }
.timeline-marker { position: relative; z-index: 1; display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #cae0f5; border-radius: 50%; background: white; color: var(--blue); }
.timeline-marker svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.communication-event.is-incoming .timeline-marker { border-color: #bce5d3; background: #effaf5; color: var(--green); }
.communication-event.is-internal .timeline-marker { border-color: #d8e1ed; background: #f5f7fa; color: #657896; }
.stage-event .timeline-marker { border-color: #f0d894; background: #fff8e7; color: #a56d00; }
.timeline-body { min-width: 0; border-bottom: 1px solid #e7eff8; padding: 1px 0 15px; }
.timeline-event:last-child .timeline-body { border-bottom: 0; }
.timeline-event-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.timeline-event-head > div { display: grid; min-width: 0; gap: 2px; }
.timeline-event-head small { color: var(--muted); font-size: 12px; }
.timeline-event-head time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.timeline-body > p { margin: 10px 0; color: #30476c; overflow-wrap: anywhere; }
.timeline-body > p small { color: var(--muted); }
.timeline-footer { display: flex; align-items: center; gap: 10px; }
.timeline-footer > span { color: #8291aa; font-size: 11px; }
.result-badge { display: inline-flex; border-radius: 999px; padding: 3px 8px; background: #edf3fa; color: #50688e; font-size: 11px; font-style: normal; font-weight: 700; }
.result-answered,
.result-interested,
.result-agreed { background: #e7f6ef; color: #08784c; }
.result-declined,
.result-blocked { background: #fff0f0; color: #c52828; }
.result-no_answer { background: #fff5dd; color: #986300; }
.timeline-empty { display: flex; min-height: 145px; align-items: center; justify-content: center; gap: 15px; color: var(--muted); }
.timeline-empty .empty-state-icon { width: 50px; height: 50px; }
.timeline-empty .empty-state-icon svg { width: 24px; height: 24px; }
.timeline-empty strong { color: var(--ink); }
.timeline-empty p { margin: 3px 0 0; }
.communication-dialog { width: min(780px, calc(100% - 28px)); max-height: min(900px, calc(100vh - 28px)); overflow-y: auto; }
.communication-dialog form { gap: 13px; }
.communication-dialog .dialog-heading { align-items: flex-start; }
.communication-dialog .dialog-heading .eyebrow { margin-bottom: 3px; }
.direction-switch { margin: 0; border: 0; padding: 0; }
.direction-switch legend { margin-bottom: 7px; font-size: 13px; font-weight: 650; }
.direction-switch > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.direction-switch label { position: relative; margin: 0; cursor: pointer; }
.direction-switch input { position: absolute; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.direction-switch label > span { display: flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 7px; background: white; padding: 0 10px; color: #40577c; }
.direction-switch label > span svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.direction-switch input:checked + span { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); box-shadow: 0 0 0 2px rgba(8,119,237,.08); }
.dialog-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.dialog-form-grid.three-columns { grid-template-columns: repeat(3,minmax(0,1fr)); }
.dialog-form-grid label,
.communication-dialog > form > label { display: grid; gap: 7px; margin: 0; }

@media (max-width: 700px) {
  .communication-section .surface-heading .primary-button { width: 100%; }
  .timeline-day { padding-left: 48px; }
  .timeline-event-head { gap: 7px; }
  .timeline-event-head time { font-size: 11px; }
  .timeline-footer { align-items: flex-start; flex-direction: column; gap: 5px; }
  .direction-switch > div { grid-template-columns: 1fr; }
  .dialog-form-grid,
  .dialog-form-grid.three-columns { grid-template-columns: 1fr; }
  .communication-dialog form { padding: 18px; }
}
/* Clients and finance */
.inline-action-form { margin: 0; }
.client-metrics,
.finance-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 16px; }
.client-detail-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
.client-metric,
.finance-metric { display: flex; min-height: 112px; align-items: center; gap: 14px; padding: 19px; }
.client-metric > span,
.finance-metric-icon { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border-radius: 7px; background: var(--blue-soft); color: var(--blue); }
.client-metric > span svg,
.finance-metric-icon svg,
.payment-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.client-metric > div,
.finance-metric > div { display: grid; min-width: 0; gap: 2px; }
.client-metric small,
.finance-metric small { color: var(--muted); }
.client-metric strong,
.finance-metric strong { font-size: 24px; line-height: 1.15; white-space: nowrap; }
.client-metric.has-alert > span { background: #fff0f0; color: var(--red); }
.client-metric.has-alert strong { color: var(--red); }
.client-table { overflow: hidden; }
.client-table-head,
.client-table-row { display: grid; grid-template-columns: minmax(250px,1.4fr) 90px minmax(145px,.75fr) 110px minmax(125px,.65fr) 24px; align-items: center; gap: 15px; padding: 0 20px; }
.client-table-head { min-height: 44px; border-bottom: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); font-size: 12px; font-weight: 650; }
.client-table-row { min-height: 78px; border-bottom: 1px solid #e7eff8; }
.client-table-row:last-child { border-bottom: 0; }
.client-table-row:hover { background: #f8fbff; }
.client-service-count,
.client-money { display: grid; }
.client-service-count small,
.client-money small { color: var(--muted); font-size: 11px; }
.client-money strong { color: var(--blue); }
.client-responsible { color: #42597c; font-size: 13px; }
.client-status-active { background: #e7f6ef; color: #08784c; }
.client-status-paused { background: #fff5dd; color: #986300; }
.client-status-closed { background: #edf2f7; color: #61728e; }
.client-detail-layout { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(285px,.65fr); align-items: start; gap: 16px; }
.service-list,
.payment-list { display: grid; }
.service-row { display: grid; min-height: 78px; grid-template-columns: 5px minmax(180px,1.2fr) minmax(110px,.55fr) minmax(115px,.6fr) auto; align-items: center; gap: 14px; border-top: 1px solid #e7eff8; }
.service-row:first-child { border-top: 0; }
.service-row.is-inactive { opacity: .58; }
.service-color { width: 5px; height: 42px; border-radius: 3px; background: var(--service-color); }
.service-copy,
.service-price,
.service-date { display: grid; min-width: 0; gap: 3px; }
.service-copy small,
.service-price small,
.service-date small { color: var(--muted); font-size: 11px; }
.service-price strong { color: var(--blue); }
.service-date.is-overdue strong { color: var(--red); }
.payment-row { display: grid; min-height: 70px; grid-template-columns: 38px minmax(170px,1fr) minmax(110px,.55fr) auto; align-items: center; gap: 12px; border-top: 1px solid #e7eff8; }
.payment-row:first-child { border-top: 0; }
.payment-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 7px; background: var(--blue-soft); color: var(--blue); }
.payment-row > span:not(.payment-icon) { display: grid; min-width: 0; }
.payment-row small { color: var(--muted); font-size: 11px; }
.payment-status-received { background: #e7f6ef; color: #08784c; }
.payment-status-pending { background: #fff5dd; color: #986300; }
.payment-status-refunded { background: #fff0f0; color: #c52828; }
.full-button { width: 100%; margin-top: 16px; }
.legal-section .surface-heading { margin-bottom: 8px; }
.finance-dialog { width: min(760px,calc(100% - 28px)); max-height: min(900px,calc(100vh - 28px)); overflow-y: auto; }
.finance-dialog label { display: grid; gap: 7px; }
.finance-metric > div > i { color: var(--green); font-size: 11px; font-style: normal; }
.finance-metric > div > i.is-negative { color: var(--red); }
.finance-metric-icon.recurring { background: #eeeaff; color: #6654c7; }
.finance-metric-icon.expected { background: #e8f8f1; color: var(--green); }
.finance-metric-icon.overdue { background: #fff0f0; color: var(--red); }
.finance-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-bottom: 16px; }
.finance-panel { min-height: 300px; padding: 22px; }
.finance-panel h2 { margin: 0; font-size: 21px; }
.finance-panel .surface-heading { margin-bottom: 14px; }
.schedule-list { display: grid; }
.schedule-row { display: grid; min-height: 68px; grid-template-columns: 42px minmax(0,1fr) auto 18px; align-items: center; gap: 11px; border-top: 1px solid #e7eff8; }
.schedule-row:first-child { border-top: 0; }
.schedule-row:hover { background: #f8fbff; }
.schedule-row time { display: grid; width: 38px; height: 44px; place-items: center; align-content: center; border-radius: 6px; background: var(--blue-soft); color: var(--blue); line-height: 1; }
.schedule-row time small { margin-top: 3px; font-size: 9px; text-transform: uppercase; }
.schedule-row > span { display: grid; min-width: 0; }
.schedule-row > span small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.schedule-row > b { white-space: nowrap; }
.schedule-row > svg { width: 18px; height: 18px; fill: none; stroke: var(--blue); stroke-width: 2; }
.overdue-list .schedule-row time { background: #fff0f0; color: var(--red); }
.overdue-list .schedule-row > b { color: var(--red); }
.direction-revenue { display: grid; gap: 16px; margin-top: 22px; }
.direction-revenue > div { display: grid; grid-template-columns: minmax(150px,.8fr) minmax(100px,1fr) auto; align-items: center; gap: 12px; }
.direction-revenue > div > span { display: flex; min-width: 0; align-items: center; gap: 8px; font-size: 13px; }
.direction-revenue > div > span i { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; }
.direction-revenue > div > div { height: 8px; overflow: hidden; border-radius: 4px; background: #edf2f8; }
.direction-revenue > div > div i { display: block; height: 100%; border-radius: 4px; }
.direction-revenue strong { font-size: 13px; white-space: nowrap; }
.recent-payment-list { display: grid; }
.recent-payment-list > a { display: grid; min-height: 62px; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 11px; border-top: 1px solid #e7eff8; }
.recent-payment-list > a:first-child { border-top: 0; }
.recent-payment-list > a > span:nth-child(2) { display: grid; min-width: 0; }
.recent-payment-list small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.recent-payment-list b { color: var(--green); white-space: nowrap; }

@media (max-width: 1180px) {
  .client-metrics,
  .finance-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .client-table-head,
  .client-table-row { grid-template-columns: minmax(220px,1.3fr) 70px minmax(125px,.7fr) 100px 24px; }
  .client-table-head > span:nth-child(5),
  .client-table-row .client-responsible { display: none; }
  .client-detail-layout { grid-template-columns: 1fr; }
  .client-detail-layout .detail-sidebar { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .client-table-head { display: none; }
  .client-table { display: grid; gap: 10px; overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .client-table-row { grid-template-columns: minmax(0,1fr) auto; gap: 9px; border: 1px solid var(--line); border-radius: 8px; background: white; padding: 15px; }
  .client-table-row .company-name-cell { grid-column: 1; }
  .client-service-count,
  .client-money,
  .client-table-row > span:nth-child(4) { grid-column: 1; margin-left: 55px; }
  .client-service-count,
  .client-money { display: flex; align-items: baseline; gap: 6px; }
  .client-table-row .row-chevron { grid-column: 2; grid-row: 1; }
  .finance-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .client-metrics,
  .finance-metrics,
  .client-detail-metrics { grid-template-columns: 1fr 1fr; gap: 9px; }
  .client-metric,
  .finance-metric { min-height: 98px; gap: 9px; padding: 13px; }
  .client-metric > span,
  .finance-metric-icon { width: 36px; height: 36px; }
  .client-metric strong,
  .finance-metric strong { font-size: 19px; white-space: normal; }
  .client-detail-layout .detail-sidebar { grid-template-columns: 1fr; }
  .legal-section .surface-heading { align-items: center; flex-direction: row; justify-content: space-between; }
  .service-row { grid-template-columns: 5px minmax(0,1fr) auto; padding: 12px 0; }
  .service-price,
  .service-date { grid-column: 2; }
  .service-row > .status-badge { grid-column: 3; grid-row: 1; }
  .payment-row { grid-template-columns: 36px minmax(0,1fr) auto; padding: 10px 0; }
  .payment-row > span:nth-child(3) { grid-column: 2; }
  .payment-row > .status-badge { grid-column: 3; grid-row: 1; }
  .finance-panel { min-height: 0; padding: 18px; }
  .direction-revenue > div { grid-template-columns: minmax(130px,1fr) auto; }
  .direction-revenue > div > div { grid-column: 1 / -1; }
  .schedule-row { grid-template-columns: 40px minmax(0,1fr) auto; }
  .schedule-row > svg { display: none; }
  .finance-dialog form { padding: 18px; }
}
/* Business profile and invoices */
.page-subtitle { max-width: 650px; margin: 7px 0 0; color: var(--muted); }
.settings-form { padding-bottom: 20px; }
.settings-layout { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(280px,.55fr); align-items: start; gap: 16px; }
.settings-main,
.settings-sidebar { display: grid; gap: 16px; }
.settings-section { padding: 22px; }
.settings-section h2 { margin: 0 0 18px; font-size: 21px; }
.settings-section .surface-heading { margin-bottom: 18px; }
.settings-section .surface-heading h2 { margin-bottom: 0; }
.form-stack { display: grid; gap: 14px; }
.profile-readiness { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 12px; padding: 18px; }
.profile-readiness > span { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 7px; background: #fff0f0; color: var(--red); }
.profile-readiness.is-ready > span { background: #e7f6ef; color: var(--green); }
.profile-readiness svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.profile-readiness strong { display: block; }
.profile-readiness p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.sticky-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 16px; border-top: 1px solid var(--line); padding: 16px 0 0; }

.invoice-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.invoice-table { overflow: hidden; }
.invoice-table-head,
.invoice-table-row { display: grid; grid-template-columns: minmax(150px,.85fr) minmax(190px,1.1fr) 100px 110px 120px 105px 20px; align-items: center; gap: 12px; padding: 0 18px; }
.invoice-table-head { min-height: 44px; border-bottom: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); font-size: 12px; font-weight: 650; }
.invoice-table-row { min-height: 76px; border-bottom: 1px solid #e7eff8; }
.invoice-table-row:last-child { border-bottom: 0; }
.invoice-table-row:hover { background: #f8fbff; }
.invoice-table-row > span:first-child,
.invoice-table-row > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.invoice-table-row small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.invoice-table-row .is-overdue { color: var(--red); font-weight: 700; }
.invoice-amount { color: var(--blue); font-weight: 750; white-space: nowrap; }
.invoice-status-draft { background: #edf2f7; color: #61728e; }
.invoice-status-issued { background: #e8f3ff; color: #0877ed; }
.invoice-status-sent { background: #eeeaff; color: #6654c7; }
.invoice-status-paid { background: #e7f6ef; color: #08784c; }
.invoice-status-cancelled { background: #f1f3f6; color: #7a879c; }
.invoice-status-overdue { background: #fff0f0; color: var(--red); }

.invoice-create-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(280px,.55fr); align-items: start; gap: 16px; padding-bottom: 20px; }
.invoice-create-main,
.invoice-create-sidebar { display: grid; gap: 16px; }
.invoice-create-layout .sticky-form-actions { grid-column: 1 / -1; width: 100%; }
.invoice-seller-summary { display: grid; gap: 5px; padding: 20px; }
.invoice-seller-summary strong { margin-top: 7px; font-size: 17px; }
.invoice-seller-summary span { color: var(--muted); font-size: 12px; }
.invoice-seller-summary a { margin-top: 10px; color: var(--blue); font-size: 13px; font-weight: 700; }
.field-hint { margin: 10px 0 0; color: var(--muted); font-size: 12px; }

.invoice-title-line { display: flex; align-items: center; gap: 12px; }
.invoice-action-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; padding: 14px 18px; }
.invoice-action-bar > div:first-child { display: grid; gap: 3px; }
.invoice-action-bar > div:first-child span { color: var(--muted); font-size: 12px; }
.invoice-actions,
.invoice-actions form { display: flex; align-items: center; gap: 8px; }
.invoice-actions select,
.invoice-actions input { min-height: 42px; border: 1px solid var(--line-strong); border-radius: 7px; background: white; padding: 0 10px; color: var(--ink); }
.success-button { background: #0a9761; }
.danger-button { border-color: #f0caca; color: var(--red); }

.invoice-paper { width: min(980px,100%); min-height: 1000px; margin: 0 auto; border: 1px solid #d9e2ec; background: white; padding: 42px 48px; color: #111827; box-shadow: 0 12px 30px rgba(24,55,92,.08); }
.invoice-paper h2 { margin: 30px 0 22px; border-bottom: 2px solid #111827; padding-bottom: 12px; font-size: 25px; }
.invoice-bank-grid { display: grid; grid-template-columns: 1fr 130px 240px; border-top: 1px solid #111827; border-left: 1px solid #111827; font-size: 12px; }
.invoice-bank-grid > div { display: grid; min-height: 58px; align-content: start; gap: 6px; border-right: 1px solid #111827; border-bottom: 1px solid #111827; padding: 7px 9px; }
.invoice-bank-grid > div:nth-child(4) { grid-column: 1 / 3; }
.invoice-bank-grid small { font-size: 10px; }
.invoice-bank-grid strong { overflow-wrap: anywhere; }
.invoice-parties { display: grid; gap: 12px; margin: 0 0 24px; }
.invoice-parties > div { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 8px; }
.invoice-parties dt { font-weight: 700; }
.invoice-parties dd { margin: 0; line-height: 1.45; }
.invoice-items { width: 100%; border-collapse: collapse; font-size: 12px; }
.invoice-items th,
.invoice-items td { border: 1px solid #111827; padding: 8px; text-align: right; }
.invoice-items th:nth-child(2),
.invoice-items td:nth-child(2) { text-align: left; }
.invoice-items th:first-child,
.invoice-items td:first-child { width: 42px; text-align: center; }
.invoice-totals { display: grid; justify-content: end; gap: 7px; margin-top: 14px; }
.invoice-totals > div { display: grid; grid-template-columns: 160px 150px; gap: 16px; text-align: right; }
.invoice-totals .grand-total { font-size: 16px; }
.invoice-summary { margin: 22px 0 10px; border-top: 1px solid #111827; padding-top: 10px; font-weight: 700; }
.invoice-note { color: #374151; font-size: 12px; line-height: 1.5; }
.invoice-signature { display: grid; grid-template-columns: auto 1fr minmax(170px,auto); align-items: end; gap: 14px; margin-top: 55px; }
.invoice-signature i { border-bottom: 1px solid #111827; }
.invoice-paper footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 65px; border-top: 1px solid #cbd5e1; padding-top: 12px; color: #64748b; font-size: 11px; }

@media (max-width: 1180px) {
  .settings-layout,
  .invoice-create-layout { grid-template-columns: 1fr; }
  .settings-sidebar,
  .invoice-create-sidebar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .invoice-create-layout .sticky-form-actions { grid-column: 1; }
  .invoice-table-head,
  .invoice-table-row { grid-template-columns: minmax(140px,.8fr) minmax(180px,1fr) 95px 115px 100px 20px; }
  .invoice-table-head > span:nth-child(4),
  .invoice-table-row > span:nth-child(4) { display: none; }
}
@media (max-width: 820px) {
  .invoice-table-head { display: none; }
  .invoice-table { display: grid; gap: 10px; overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .invoice-table-row { grid-template-columns: minmax(0,1fr) auto; gap: 8px; border: 1px solid var(--line); border-radius: 8px; background: white; padding: 15px; }
  .invoice-table-row > span { grid-column: 1; }
  .invoice-table-row > .row-chevron { grid-column: 2; grid-row: 1; }
  .invoice-table-row > span:nth-child(3)::before { content: "от "; color: var(--muted); }
  .invoice-table-row > span:nth-child(4) { display: block; }
  .invoice-table-row > span:nth-child(4)::before { content: "оплатить до "; color: var(--muted); font-weight: 400; }
  .invoice-action-bar { align-items: flex-start; flex-direction: column; }
  .invoice-actions { width: 100%; flex-wrap: wrap; }
  .invoice-actions form { flex-wrap: wrap; }
  .invoice-paper { padding: 28px 24px; }
}
@media (max-width: 640px) {
  .settings-sidebar,
  .invoice-create-sidebar { grid-template-columns: 1fr; }
  .sticky-form-actions > * { flex: 1; }
  .invoice-metrics { grid-template-columns: 1fr 1fr; }
  .invoice-title-line { align-items: flex-start; flex-direction: column; gap: 7px; }
  .invoice-actions,
  .invoice-actions form { width: 100%; }
  .invoice-actions form select,
  .invoice-actions form input,
  .invoice-actions form .secondary-button,
  .invoice-actions form .primary-button { flex: 1; min-width: 0; }
  .invoice-paper { min-height: 0; padding: 20px 16px; overflow-x: auto; }
  .invoice-bank-grid { min-width: 660px; }
  .invoice-paper h2 { min-width: 660px; font-size: 20px; }
  .invoice-parties,
  .invoice-items,
  .invoice-totals,
  .invoice-summary,
  .invoice-note,
  .invoice-signature,
  .invoice-paper footer { min-width: 660px; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  .sidebar,
  .mobile-header,
  .toast-stack,
  .no-print { display: none !important; }
  .app-shell,
  .main-area,
  .page-shell { display: block; width: 100%; margin: 0; padding: 0; }
  .invoice-paper { width: 100%; min-height: 0; border: 0; padding: 0; box-shadow: none; }
  body { background: white; }
}