@font-face {
  font-family: Manrope;
  src: url("/assets/fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #f6f7f9;
  --surface: #fff;
  --surface-hover: #f2f4f7;
  --ink: #20232b;
  --muted: #626b79;
  --line: #e4e7ec;
  --accent: #c72d3a;
  --accent-hover: #aa2130;
  --accent-soft: #fff0f1;
  --sidebar: #171a20;
  --sidebar-ink: #aeb4c1;
  --success: #18794e;
  --warning: #8b5e12;
  --radius: 12px;
  --shadow: 0 12px 40px -16px #18203030;
  color-scheme: light;
  font-family: Manrope, ui-sans-serif, sans-serif;
  font-size: 14px;
  font-weight: 450;
  line-height: 1.6;
  font-synthesis: none;
}
html[data-theme="dark"] {
  --bg: #14171d;
  --surface: #1c2028;
  --surface-hover: #242a34;
  --ink: #f1f3f7;
  --muted: #a1abba;
  --line: #343b48;
  --accent: #f16c78;
  --accent-hover: #ff8994;
  --accent-soft: #37232c;
  --success: #75d7a8;
  --warning: #e9bd6e;
  --shadow: 0 12px 40px -16px #0008;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --bg: #14171d;
    --surface: #1c2028;
    --surface-hover: #242a34;
    --ink: #f1f3f7;
    --muted: #a1abba;
    --line: #343b48;
    --accent: #f16c78;
    --accent-hover: #ff8994;
    --accent-soft: #37232c;
    --success: #75d7a8;
    --warning: #e9bd6e;
    --shadow: 0 12px 40px -16px #0008;
    color-scheme: dark;
  }
}
* {
  box-sizing: border-box;
}
html {
  scrollbar-color: #b9bfca transparent;
  scrollbar-width: thin;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}
::selection {
  background: var(--accent);
  color: white;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
input,
textarea {
  caret-color: var(--accent);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  line-height: 1.25;
  font-weight: 750;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h2 {
  font-size: 16px;
  font-weight: 730;
  letter-spacing: -0.02em;
  line-height: 1.45;
}
h3 {
  font-size: 15px;
  line-height: 1.5;
  font-weight: 700;
  margin: 20px 0 10px;
}
p {
  margin: 0 0 12px;
}
p:last-child {
  margin-bottom: 0;
}
small {
  font-size: 12px;
}
button {
  border: 0;
  background: none;
}
code,
pre,
kbd {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
}
code {
  overflow-wrap: anywhere;
  background: var(--surface-hover);
  padding: 3px 6px;
  border-radius: 4px;
}
pre {
  overflow: auto;
  white-space: pre-wrap;
  background: var(--surface-hover);
  padding: 16px;
  border-radius: 8px;
}
time,
strong,
.metric,
progress {
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--muted);
}
.lead {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
}
.pre-wrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.hidden,
[hidden] {
  display: none !important;
}
.full-width {
  width: 100%;
  justify-content: center;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 1000;
  left: 12px;
  top: -80px;
  background: var(--accent);
  color: white;
  padding: 12px;
}
.skip-link:focus {
  top: 12px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  min-height: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  transition:
    background 0.16s ease-out,
    border-color 0.16s ease-out;
}
.button:hover {
  background: var(--surface-hover);
  border-color: var(--muted);
}
.button svg {
  width: 16px;
  height: 16px;
}
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.button.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
html[data-theme="dark"] .button.primary {
  color: #171a20;
}
.button.subtle {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}
.button.danger {
  color: var(--accent);
}
.button.small-button {
  min-height: 32px;
  padding: 6px 10px;
}
.text-button {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  padding: 6px 0;
}
.text-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 7px;
  color: var(--muted);
}
.icon-button:hover {
  background: var(--surface-hover);
  color: var(--ink);
}
.row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.inline-form input,
.inline-form select {
  min-width: 0;
  flex: 1;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 700;
  min-width: 0;
}
.field small {
  font-weight: 450;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.field input,
.field select,
.field textarea {
  width: 100%;
}
input:not([type="checkbox"]):not([type="color"]),
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
  min-height: 42px;
  font-size: 13px;
  line-height: 1.5;
  max-width: 100%;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
input[type="color"] {
  height: 42px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px;
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
textarea {
  resize: vertical;
  min-height: 110px;
}
.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  margin: 16px 0;
  line-height: 1.7;
}
.checkbox-field input {
  margin-top: 4px;
}
select[multiple] {
  min-height: 110px;
}
select[multiple] option {
  padding: 6px;
}
.form-error {
  color: var(--accent);
  font-size: 12px;
  white-space: normal;
}
.form-error:empty {
  display: none;
}
.input-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon > svg {
  position: absolute;
  left: 12px;
  width: 17px;
  color: var(--muted);
}
.input-icon > input {
  padding-left: 38px !important;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 240px;
  background: var(--sidebar);
  color: var(--sidebar-ink);
  display: flex;
  flex-direction: column;
  padding: 26px 15px 0;
  z-index: 40;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #3b414e transparent;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  color: #fff;
  padding: 0 12px;
  margin: 0 0 30px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.3;
}
.brand small {
  display: block;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.32em;
  color: #969eaf;
  margin-top: 4px;
}
.brand-mark {
  display: inline-block;
  width: 30px;
  height: 32px;
  background: #d63b46;
  position: relative;
  clip-path: polygon(
    0 0,
    100% 0,
    100% 43%,
    55% 43%,
    100% 100%,
    51% 100%,
    0 36%
  );
  flex-shrink: 0;
}
.workspace-switch {
  padding: 13px 9px;
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid #333943;
  border-radius: 8px;
  margin-bottom: 20px;
  min-width: 0;
}
.org-avatar {
  width: 31px;
  height: 31px;
  background: #363039;
  border: 1px solid #5c4048;
  color: #efb5bd;
  display: grid;
  place-items: center;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.workspace-switch div {
  min-width: 0;
  flex: 1;
}
.workspace-switch strong {
  display: block;
  font-size: 12px;
  color: #f0f2f7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workspace-switch small {
  font-size: 10px;
  color: #aeb4c1;
}
.workspace-switch > a svg {
  width: 12px;
}
.sidebar-search {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  width: 100%;
  color: #aeb4c1;
  padding: 9px;
  margin-bottom: 12px;
}
.sidebar-search svg {
  width: 16px;
}
.sidebar-search kbd {
  font-size: 9px;
  border: 1px solid #3b414c;
  border-radius: 4px;
  padding: 1px 4px;
  margin-left: auto;
}
.sidebar nav {
  flex: 1;
}
.nav-group {
  margin-bottom: 18px;
}
.nav-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: #919aab;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 12px;
  margin: 13px 0 7px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 35px;
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 580;
  border-radius: 6px;
  width: 100%;
  text-align: left;
  position: relative;
  margin: 2px 0;
  color: #aeb4c1;
}
.nav-item svg {
  width: 16px;
  height: 16px;
}
.nav-item:hover {
  background: #242931;
  color: #fff;
}
.nav-item.active {
  background: #37232b;
  color: #ffb7c0;
}
.nav-item.active svg {
  color: #f47c8b;
}
.nav-indicator {
  width: 5px;
  height: 5px;
  background: #ef6879;
  border-radius: 50%;
  margin-left: auto;
}
.sidebar-bottom {
  margin-top: 8px;
  padding-bottom: 18px;
}
.profile-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 18px 8px 0;
  margin-top: 13px;
  border-top: 1px solid #30353f;
}
.profile-link > div {
  min-width: 0;
  flex: 1;
}
.profile-link strong {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #eef0f5;
  overflow-wrap: anywhere;
}
.profile-link small {
  font-size: 9px;
}
.profile-link > svg {
  width: 12px;
}
.avatar {
  width: 33px;
  height: 33px;
  min-width: 33px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e9d8cd;
  color: #5f4036;
  font-size: 11px;
  font-weight: 750;
}
.avatar.small {
  width: 29px;
  height: 29px;
  min-width: 29px;
  font-size: 10px;
}
.avatar.tiny {
  width: 28px;
  height: 28px;
  min-width: 28px;
  font-size: 10px;
}
.app-main {
  margin-left: 240px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topbar {
  height: 70px;
  min-height: 70px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  min-width: 0;
}
.breadcrumb > a {
  color: var(--muted);
}
.breadcrumb > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.breadcrumb > svg {
  width: 11px;
  color: var(--muted);
}
.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}
.today {
  font-size: 10px;
  color: var(--muted);
  padding-right: 14px;
  border-right: 1px solid var(--line);
}
.notification-button {
  position: relative;
}
.notification-dot {
  position: absolute;
  right: 8px;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.page {
  padding: 34px 36px 44px;
  flex: 1;
  max-width: 1800px;
  width: 100%;
  margin: 0 auto;
  outline: none !important;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}
.page-heading p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
.heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.heading-actions select {
  font-size: 11px;
  min-height: 40px;
}
.app-footer {
  display: flex;
  justify-content: space-between;
  padding: 16px 36px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.mobile-menu,
.mobile-only,
.sidebar-scrim {
  display: none;
}
.title-count {
  display: inline-flex;
  font-size: 13px;
  line-height: 1.4;
  vertical-align: middle;
  margin-left: 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 8px;
  letter-spacing: 0;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  margin-bottom: 20px;
  overflow: hidden;
}
.padded {
  padding: 22px;
}
.padded > h2 {
  margin-bottom: 15px;
}
.padded p {
  font-size: 12px;
  line-height: 1.8;
}
.padded h3 {
  margin-top: 28px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  min-height: 66px;
}
.section-heading > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-heading > a {
  font-size: 10px;
  font-weight: 650;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-heading > a svg {
  width: 14px;
  height: 14px;
}
.section-heading > svg {
  color: var(--muted);
  width: 17px;
}
.count {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  background: var(--surface-hover);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  border-radius: 5px;
  padding: 0 5px;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 25px;
}
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.metric > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.metric > div svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
}
.metric > strong {
  display: block;
  font-size: 34px;
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.5;
  margin: 7px 0;
}
.metric > small {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}
.metric > small svg {
  width: 14px;
  height: 14px;
}
.metric:hover {
  border-color: var(--accent);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr);
  gap: 22px;
  align-items: start;
}
.dashboard-grid .panel {
  margin: 0;
  height: 100%;
}
.priority-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  min-height: 75px;
}
.priority-row:last-child {
  border-bottom: 0;
}
.priority-row:hover {
  background: var(--surface-hover);
}
.priority-row > div {
  min-width: 0;
  flex: 1;
}
.priority-row strong {
  font-size: 11px;
  display: block;
  overflow-wrap: anywhere;
}
.priority-row small {
  font-size: 9px;
  color: var(--muted);
}
.priority-row > time {
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
}
.priority-row > svg {
  width: 11px;
  color: var(--muted);
}
.task-status-dot {
  width: 9px;
  height: 9px;
  border: 2px solid #8993a3;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.task-status-dot.status-in_lavorazione,
.task-status-dot.status-trattativa {
  border-color: #b38a35;
  background: #edd7a0;
}
.task-status-dot.status-completato,
.task-status-dot.status-vinto {
  border-color: #328560;
  background: #a5ddc3;
}
.pipeline-total {
  padding: 20px 22px 10px;
}
.pipeline-total > strong {
  font-size: 30px;
  letter-spacing: -0.03em;
  font-weight: 750;
}
.pipeline-total > p {
  font-size: 10px;
  color: var(--muted);
}
.pipeline-stages {
  padding: 0 22px 16px;
}
.pipeline-stages > a {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 10px;
  margin: 13px 0;
}
.pipeline-stages > a > span:first-child {
  flex: 1;
  color: var(--muted);
}
.pipeline-panel > .button {
  width: calc(100% - 44px);
  margin: 0 22px 22px;
}
.project-list > a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.project-list > a:last-child {
  border: 0;
}
.project-list > a:hover {
  background: var(--surface-hover);
}
.project-icon {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 8px;
}
.project-icon svg {
  width: 17px;
}
.project-list > a > div {
  flex: 1;
  min-width: 0;
}
.project-list strong {
  display: block;
  font-size: 11px;
}
.project-list small {
  font-size: 9px;
  color: var(--muted);
}
progress {
  width: 80px;
  height: 5px;
  accent-color: var(--accent);
  border: 0;
  border-radius: 5px;
  overflow: hidden;
}
progress::-webkit-progress-bar {
  background: var(--surface-hover);
}
progress::-webkit-progress-value {
  background: var(--accent);
}
.project-list > a > span:last-child {
  font-size: 10px;
  color: var(--muted);
}
.agenda-list > a {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 17px 22px;
  border-bottom: 1px solid var(--line);
}
.agenda-list time {
  width: 37px;
  text-align: center;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.agenda-list time strong {
  font-size: 21px;
}
.agenda-list time span {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
}
.agenda-list a > div {
  min-width: 0;
}
.agenda-list a > div strong {
  display: block;
  font-size: 11px;
}
.agenda-list small {
  font-size: 9px;
  color: var(--muted);
}
.activity-list {
  padding: 0 22px;
  margin: 0;
  list-style: none;
}
.activity-list li {
  display: flex;
  gap: 11px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.activity-list li:last-child {
  border: 0;
}
.activity-list li > div {
  flex: 1;
  min-width: 0;
}
.activity-list p {
  font-size: 10px;
  color: var(--muted);
  margin: 0;
}
.activity-list strong {
  color: var(--ink);
}
.activity-list a {
  font-size: 10px;
  color: var(--muted);
}
.activity-list time {
  font-size: 8px;
  color: var(--muted);
  max-width: 85px;
  text-align: right;
}
.notes-panel > p {
  padding: 24px 22px 8px;
}
.notes-panel > .button {
  margin: 0 22px 22px;
}
.recent-note {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.recent-note strong {
  font-size: 12px;
}
.recent-note span {
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.recent-note small {
  font-size: 9px;
  color: var(--muted);
}
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 45px 24px;
  min-height: 230px;
}
.empty-state > svg {
  width: 30px;
  height: 30px;
  color: var(--muted);
  margin-bottom: 3px;
}
.empty-state h3 {
  font-size: 14px;
  margin: 12px 0 6px;
}
.empty-state p {
  font-size: 11px;
  color: var(--muted);
  max-width: 38ch;
  margin-bottom: 18px;
}
.quiet-empty {
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  min-height: 150px;
}
.quiet-empty > svg {
  width: 24px;
  height: 24px;
}
.overdue {
  color: var(--accent) !important;
}
.module-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}
.filter-form {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.filter-form input {
  width: 235px;
  font-size: 11px !important;
  min-height: 38px !important;
}
.filter-form select {
  min-height: 38px;
  font-size: 11px;
  max-width: 175px;
}
.view-actions {
  display: flex;
  gap: 3px;
  align-items: center;
  flex-wrap: wrap;
}
.view-toggle {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
  border-radius: 6px;
  padding: 8px 10px;
  white-space: nowrap;
}
.view-toggle svg {
  width: 14px;
  height: 14px;
}
.view-toggle.selected {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}
.table-panel {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.table-scroll {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  text-align: left;
}
.data-table th {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-hover);
  padding: 13px 18px;
  white-space: nowrap;
}
.data-table td {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  max-width: 300px;
  overflow-wrap: anywhere;
  vertical-align: middle;
}
.data-table tr:hover td {
  background: var(--surface-hover);
}
.data-table td small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
}
.table-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--ink);
  min-width: 0;
}
.record-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--surface-hover);
  color: var(--muted);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.record-icon svg {
  width: 16px;
  height: 16px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-hover);
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  padding: 3px 8px;
  border-radius: 5px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-attivo,
.status-completato,
.status-vinto,
.status-accettato,
.status-pubblicato,
.status-completed,
.status-approvato {
  background: #e9f5ef;
  color: #23734d;
}
.status-in_lavorazione,
.status-trattativa,
.status-in_attesa,
.status-in_preparazione,
.status-running {
  background: #fff4df;
  color: #855a17;
}
.status-urgente,
.status-alta,
.status-failed,
.status-perso,
.status-rifiutato {
  background: #fcebef;
  color: #b22d46;
}
.status-in_revisione,
.status-preventivo,
.status-programmato,
.status-inviato {
  background: #eeeffc;
  color: #5657a3;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
  padding: 20px 2px;
}
.pagination > div {
  display: flex;
  gap: 8px;
}
.kanban {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  align-items: flex-start;
  padding-bottom: 20px;
  scroll-snap-type: x proximity;
  min-height: 450px;
}
.kanban-column {
  min-width: 270px;
  max-width: 290px;
  flex: 1 0 270px;
  background: var(--surface-hover);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  scroll-snap-align: start;
  position: relative;
}
.kanban-column > header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 10px;
}
.kanban-column h2 {
  font-size: 11px;
  flex: 1;
}
.kanban-column > header .icon-button {
  width: 24px;
  min-width: 24px;
  height: 24px;
}
.kanban-column > header svg {
  width: 14px;
}
.kanban-cards {
  min-height: 40px;
}
.kanban-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px;
  margin-bottom: 10px;
}
.kanban-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 8px;
  color: var(--muted);
  margin-bottom: 5px;
}
.drag-handle {
  cursor: grab;
  touch-action: none;
  width: 22px;
  min-width: 22px;
  height: 22px;
}
.drag-handle svg {
  width: 13px;
  height: 13px;
}
.card-title {
  display: block;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.kanban-card > p {
  font-size: 10px;
  color: var(--muted);
  margin: 7px 0 14px;
  overflow-wrap: anywhere;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 0 10px;
  font-size: 9px;
  color: var(--muted);
}
.card-move select {
  padding: 5px 8px;
  font-size: 9px;
  min-height: 30px;
  width: 100%;
  background: var(--surface);
}
.kanban-empty {
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  padding: 0 0 12px;
}
.sortable-ghost {
  opacity: 0.3;
}
.sortable-drag {
  box-shadow: var(--shadow);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 18px;
}
.back-link svg {
  transform: rotate(180deg);
  width: 14px;
  height: 14px;
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}
.detail-main,
.detail-side {
  min-width: 0;
}
.properties {
  margin: 0;
}
.properties > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
  font-size: 10px;
}
.properties dt {
  color: var(--muted);
}
.properties dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 15px;
}
.record-history {
  list-style: none;
  padding: 0;
  margin: 0;
}
.record-history li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.record-history li:last-child {
  border: 0;
}
.record-history strong {
  font-size: 10px;
  font-weight: 600;
}
.record-history span {
  font-size: 9px;
  color: var(--muted);
}
.related-list > a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.related-list > a:hover {
  background: var(--surface-hover);
}
.related-list > a > span {
  flex: 1;
}
.related-list svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}
.version-list > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 9px;
  align-items: center;
  margin: 12px 0;
}
.version-list svg {
  width: 15px;
}
.document-editor {
  border: 0;
  border-radius: 0;
  width: 100%;
  padding: 22px !important;
  min-height: 360px;
  font-size: 13px !important;
  line-height: 1.9 !important;
  background: var(--surface) !important;
}
.editor-toolbar {
  padding: 10px 20px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.editor-toolbar .button {
  padding: 4px 9px;
  min-height: 29px;
  font-size: 10px;
}
.prose {
  padding: 24px;
  font-size: 13px;
  line-height: 1.9;
  overflow-wrap: anywhere;
  max-width: 75ch;
}
.prose h1 {
  font-size: 27px;
  margin: 16px 0;
}
.prose h2 {
  font-size: 22px;
  margin: 28px 0 12px;
}
.prose h3 {
  font-size: 17px;
}
.prose ul,
.prose ol {
  padding-left: 22px;
}
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose pre {
  font-size: 11px;
}
.prose table {
  border-collapse: collapse;
  width: 100%;
}
.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: 8px;
}
.heading-anchor {
  font-size: 0.6em;
  margin-left: 8px;
  color: var(--muted) !important;
}
.checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.checklist > label {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 12px;
}
.checklist > label input:checked + span {
  text-decoration: line-through;
  color: var(--muted);
}
.checklist form {
  margin-top: 12px;
}
.comments article {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.comments time {
  float: right;
  font-size: 9px;
  color: var(--muted);
}
.comments p {
  margin-top: 8px;
}
.member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  font-size: 12px;
}
.member-row > span:nth-child(2) {
  flex: 1;
}
.quote-items {
  padding: 12px 22px;
}
.quote-item {
  display: grid;
  grid-template-columns: minmax(100px, 2fr) repeat(4, minmax(65px, 1fr)) 30px;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.quote-item .field {
  margin: 0;
  font-size: 9px;
}
.quote-item input {
  font-size: 11px !important;
  padding: 8px !important;
  min-width: 0;
}
.quote-item .icon-button {
  margin-top: 22px;
  width: 28px;
  min-width: 28px;
}
.quote-totals {
  padding: 20px 22px;
  background: var(--surface-hover);
  text-align: right;
  font-size: 12px;
}
.quote-totals p {
  display: flex;
  justify-content: flex-end;
  gap: 35px;
}
.quote-totals strong {
  min-width: 110px;
}
.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.settings-links {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.settings-links > a {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}
.settings-links > a:last-child {
  border: 0;
}
.settings-links > a:hover {
  background: var(--surface-hover);
}
.settings-links > a > svg {
  color: var(--muted);
  width: 20px;
}
.settings-links > a > svg:last-child {
  width: 14px;
}
.settings-links > a > div {
  flex: 1;
}
.settings-links h2 {
  font-size: 12px;
  margin-bottom: 4px;
}
.settings-links p {
  font-size: 10px;
  color: var(--muted);
}
.summary-list {
  margin: 0;
}
.summary-list > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.summary-list > div:last-child {
  border: 0;
}
.summary-list dt {
  color: var(--muted);
  flex: 1;
}
.summary-list dd {
  margin: 0;
  flex: 1;
  text-align: right;
  overflow-wrap: anywhere;
}
.simple-list {
  padding-left: 18px;
  font-size: 12px;
  line-height: 2.2;
}
.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface-hover);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 16px;
  margin: 16px 0 22px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.notice > svg {
  color: var(--muted);
  margin-top: 2px;
}
.notice strong {
  font-size: 12px;
}
.notice p {
  margin: 5px 0;
  font-size: 11px;
  line-height: 1.8;
}
.notice code {
  display: block;
  white-space: pre-wrap;
  font-size: 10px;
  margin-top: 10px;
}
.notice.error {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
}
.notice.success {
  color: var(--success);
}
.notice.warning {
  color: var(--warning);
}
.job-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
}
.job-row:last-child {
  border: 0;
}
.job-row > span:last-child {
  overflow-wrap: anywhere;
}
.migration-row,
.session-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
}
.session-row > small {
  font-size: 9px;
  color: var(--muted);
}
.session-row > .text-button {
  align-self: flex-start;
}
.reports-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.report-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.report-row + .button {
  margin-top: 20px;
}
.notification-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.notification-row.unread {
  background: var(--accent-soft);
}
.notification-row > a {
  flex: 1;
  min-width: 0;
}
.notification-row small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.calendar-toolbar {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}
.calendar-toolbar > div {
  display: flex;
  gap: 10px;
  align-items: center;
}
.calendar-toolbar h2 {
  min-width: 135px;
  text-align: center;
  font-size: 14px;
}
.calendar-toolbar select {
  font-size: 11px;
  min-height: 35px;
}
.calendar-toolbar [data-calendar-prev] svg {
  transform: rotate(180deg);
}
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.calendar-weekdays > span {
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  padding: 12px;
}
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-day {
  min-height: 115px;
  padding: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.calendar-day:nth-child(7n) {
  border-right: 0;
}
.calendar-day > time {
  font-size: 11px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0 0 7px auto;
  border-radius: 50%;
}
.calendar-day.today > time {
  color: white;
  background: var(--accent);
}
.calendar-day.other-month {
  background: var(--surface-hover);
  color: var(--muted);
}
.calendar-event {
  display: block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
  padding: 4px 6px;
  margin-bottom: 4px;
  border-radius: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}
.calendar-list {
  padding: 10px 22px;
}
.calendar-list > a {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.calendar-list time {
  min-width: 90px;
  color: var(--muted);
  font-size: 10px;
}
.chat-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  height: calc(100dvh - 245px);
  min-height: 450px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.chat-conversations {
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.chat-conversations h2 {
  padding: 22px;
  font-size: 12px;
}
.chat-conversations > a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.chat-conversations > a.selected {
  background: var(--accent-soft);
}
.chat-conversations > a > div {
  flex: 1;
  min-width: 0;
}
.chat-conversations strong {
  display: block;
  overflow-wrap: anywhere;
}
.chat-conversations small {
  font-size: 9px;
  color: var(--muted);
}
.chat-thread {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.chat-thread > header {
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}
.chat-thread > header h2 {
  font-size: 13px;
}
.chat-search {
  padding: 10px 22px;
}
.chat-search input {
  width: 100%;
  min-height: 32px !important;
  font-size: 10px !important;
}
.chat-thread > .empty-state {
  flex: 1;
}
.chat-thread > .empty-state p {
  font-size: 12px;
  margin-top: 12px;
}
#chat-messages {
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1;
  padding: 14px 22px;
  min-height: 0;
}
.chat-message {
  margin-bottom: 20px;
  max-width: 85%;
  font-size: 12px;
}
.chat-message.mine {
  margin-left: auto;
}
.chat-message-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
  font-size: 10px;
}
.chat-message-header time {
  font-size: 8px;
  color: var(--muted);
}
.chat-message-body {
  padding: 10px 14px;
  border-radius: 9px;
  background: var(--surface-hover);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chat-message.mine .chat-message-body {
  background: var(--accent-soft);
}
.chat-message-actions {
  display: flex;
  gap: 9px;
}
.chat-message-actions button {
  font-size: 9px;
}
#message-form {
  padding: 15px 22px;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  border-top: 1px solid var(--line);
}
#message-form textarea {
  flex: 1;
  min-height: 44px;
  max-height: 150px;
  font-size: 12px;
}
#message-form input {
  width: 105px;
  min-height: 44px;
  font-size: 10px;
}
/* Focused overlays use native dialogs and return focus to their opener. */
dialog {
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 80px -20px #0005;
  max-height: calc(100dvh - 40px);
  max-width: calc(100vw - 30px);
}
dialog::backdrop {
  background: #11162070;
}
dialog[open] {
  animation: dialog-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.drawer {
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  width: 610px;
  border-radius: 14px 0 0 14px;
  border-right: 0;
}
.drawer form {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 24px;
}
.dialog-header h2 {
  font-size: 20px;
}
.dialog-header p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.dialog-body {
  padding: 24px;
  overflow-y: auto;
  min-height: 0;
  overscroll-behavior: contain;
}
.drawer .dialog-body {
  flex: 1;
}
.dialog-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dialog-footer .form-error {
  width: 100%;
}
.field.wide {
  grid-column: 1/-1;
}
.search-dialog {
  width: 620px;
  margin: 12dvh auto auto;
}
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.search-input-wrap > svg {
  color: var(--muted);
}
.search-input-wrap > input {
  flex: 1;
  border: 0 !important;
  outline: none;
  background: none;
  min-width: 0;
}
.search-results {
  padding: 18px 22px;
  min-height: 100px;
  max-height: 60dvh;
  overflow: auto;
}
.search-results h3 {
  font-size: 10px;
  color: var(--muted);
  margin: 18px 0 7px;
}
.search-results h3:first-child {
  margin-top: 0;
}
.search-results a {
  display: flex;
  padding: 10px 8px;
  border-radius: 6px;
  font-size: 12px;
}
.search-results a:hover {
  background: var(--surface-hover);
}
.search-dialog > footer {
  padding: 12px 22px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}
.action-dialog {
  width: 510px;
}
.action-dialog .dialog-body > p {
  font-size: 12px;
  line-height: 1.8;
  margin-bottom: 18px;
}
.action-dialog form > .dialog-body {
  max-height: 65dvh;
}
.toast-region {
  position: fixed;
  bottom: 25px;
  right: 25px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: calc(100vw - 40px);
  z-index: 100;
}
.toast {
  padding: 13px 18px;
  background: var(--ink);
  color: var(--surface);
  border-radius: 9px;
  box-shadow: var(--shadow);
  font-size: 12px;
  display: flex;
  gap: 15px;
  align-items: center;
  max-width: 420px;
}
.toast.error {
  background: var(--accent);
  color: white;
}
.toast button {
  color: inherit;
}
.skeleton {
  min-height: 60px;
  opacity: 0.5;
  background: var(--surface-hover);
  border-radius: 7px;
}
.import-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 20px 0;
}
.import-summary span {
  font-size: 10px;
  color: var(--muted);
}
.import-summary strong {
  display: block;
  font-size: 22px;
  color: var(--ink);
}
.mapping-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  padding: 8px 0;
}
.preview-table {
  max-height: 240px;
  overflow: auto;
}
#import-preview h3 {
  margin-top: 25px;
}
.setup-page {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(560px, 1.15fr);
  min-height: 100dvh;
  background: #fff;
}
.setup-aside {
  background: #171a20;
  color: #fff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100dvh;
  position: sticky;
  top: 0;
  height: 100dvh;
}
.setup-aside .brand {
  padding: 0;
  margin: 0;
}
.setup-message {
  padding: 60px 0;
}
.setup-message .setup-display {
  font-size: clamp(40px, 4.4vw, 67px);
  font-weight: 650;
  line-height: 1.14;
  letter-spacing: -0.04em;
  margin: 34px 0 24px;
}
.setup-message p {
  font-size: 14px;
  color: #adb4c1;
  line-height: 1.9;
}
.setup-symbol {
  display: block;
  width: 75px;
  height: 75px;
  position: relative;
  border: 1px solid #50535d;
  border-radius: 18px;
  transform: rotate(-12deg);
  margin-left: 7px;
}
.setup-symbol:before {
  content: "";
  display: block;
  position: absolute;
  width: 75px;
  height: 75px;
  border: 1px solid #a8404d;
  border-radius: 18px;
  top: -9px;
  left: 12px;
  transform: rotate(25deg);
}
.setup-symbol:after {
  content: "";
  display: block;
  position: absolute;
  width: 35px;
  height: 35px;
  top: 15px;
  left: 24px;
  background: #cf3545;
  border-radius: 8px;
  transform: rotate(12deg);
}
.setup-aside footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 9px;
  color: #a3acbb;
}
.setup-main {
  padding: 40px clamp(30px, 5vw, 90px) 24px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: #20232b;
  background: #fff;
}
.setup-top {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #626b79;
}
.setup-steps {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 30px 0 40px;
  gap: 5px;
  justify-content: space-between;
}
.setup-steps li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  flex: 1;
  position: relative;
  color: #626b79;
}
.setup-steps li > span {
  display: grid;
  place-items: center;
  border: 1px solid #e4e7ec;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  font-size: 10px;
  background: #fff;
  z-index: 1;
}
.setup-steps small {
  font-size: 8px;
}
.setup-steps li:after {
  content: "";
  position: absolute;
  left: 60%;
  width: 80%;
  height: 1px;
  background: #e4e7ec;
  top: 13px;
}
.setup-steps li:last-child:after {
  display: none;
}
.setup-steps li.current > span {
  color: white;
  background: #c72d3a;
  border-color: #c72d3a;
}
.setup-steps li.current small {
  color: #c72d3a;
  font-weight: 750;
}
.setup-steps li.done > span {
  color: #18794e;
  background: #edf7f1;
  border-color: #cde7d8;
}
.setup-content {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}
.setup-content > h1 {
  font-size: 30px;
  max-width: 22ch;
  margin-bottom: 12px;
}
.setup-content > .lead {
  font-size: 12px;
  max-width: 55ch;
  margin-bottom: 28px;
}
.setup-form {
  margin-top: 20px;
}
.setup-form .field {
  margin-bottom: 17px;
}
.setup-form input,
.setup-form select {
  font-size: 12px !important;
}
.checks {
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  overflow: hidden;
}
.checks > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #e4e7ec;
  font-size: 11px;
}
.checks > div:last-child {
  border: 0;
}
.check-result {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  flex-shrink: 0;
}
.check-result svg {
  width: 13px;
  height: 13px;
}
.check-result.ok {
  color: #18794e;
}
.check-result.fail {
  color: #c72d3a;
}
.setup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #e4e7ec;
}
.setup-bottom {
  text-align: center;
  font-size: 9px;
  color: #626b79;
  padding-top: 30px;
}
.auth-main {
  justify-content: center;
}
.auth-content {
  width: 100%;
  max-width: 390px;
  margin: 60px auto;
}
.auth-content > h1 {
  font-size: 34px;
  max-width: 16ch;
  margin-bottom: 15px;
}
.auth-content > .lead {
  font-size: 12px;
  margin-bottom: 35px;
}
.auth-content form > .button {
  margin-top: 7px;
}
.auth-link {
  font-size: 11px;
  text-align: center;
  color: var(--muted);
  margin: 22px 0 38px;
}
.auth-link a {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.auth-note {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
}
.auth-note svg {
  width: 15px;
  height: 15px;
}
.error-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 30px;
}
.error-page main {
  max-width: 500px;
}
.error-page h1 {
  font-size: 80px;
  margin: 20px;
}
.error-page p {
  color: var(--muted);
  margin-bottom: 25px;
}
body.sidebar-collapsed .sidebar {
  width: 75px;
  padding-inline: 10px;
}
body.sidebar-collapsed .sidebar .brand {
  padding-inline: 10px;
}
body.sidebar-collapsed .sidebar .brand > span:last-child,
body.sidebar-collapsed .sidebar .workspace-switch,
body.sidebar-collapsed .sidebar .sidebar-search,
body.sidebar-collapsed .sidebar .nav-label,
body.sidebar-collapsed .sidebar .nav-item > span,
body.sidebar-collapsed .sidebar .profile-link > div,
body.sidebar-collapsed .sidebar .profile-link > svg {
  display: none;
}
body.sidebar-collapsed .nav-item {
  justify-content: center;
}
body.sidebar-collapsed .app-main {
  margin-left: 75px;
}
body.sidebar-collapsed .profile-link {
  justify-content: center;
}
@keyframes dialog-in {
  from {
    transform: translateY(6px);
  }
  to {
    transform: translateY(0);
  }
}
@media (min-width: 1700px) {
  .page {
    padding-top: 42px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1fr);
  }
}
@media (max-width: 1200px) {
  .page {
    padding: 28px 26px;
  }
  .topbar {
    padding: 0 26px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 27px;
  }
  .metrics-grid {
    gap: 12px;
  }
  .metric {
    padding: 17px;
  }
  .heading-actions {
    flex-wrap: wrap;
  }
  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 18px;
  }
  .quote-item {
    grid-template-columns: repeat(4, minmax(0, 1fr)) 26px;
  }
  .quote-item > .field:first-child {
    grid-column: 1/-1;
  }
  .quote-item > .icon-button {
    margin-top: 20px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(240px, 1fr);
  }
  .priority-row {
    flex-wrap: wrap;
  }
  .priority-row > time {
    margin-left: auto;
  }
  .priority-row > .badge {
    display: none;
  }
  .data-table td,
  .data-table th {
    padding-inline: 14px;
  }
  .settings-layout {
    gap: 18px;
  }
  .chat-layout {
    grid-template-columns: 215px minmax(0, 1fr);
  }
  .today {
    display: none;
  }
}
@media (max-width: 1024px) {
  .sidebar {
    width: 210px;
    padding-inline: 12px;
  }
  .app-main {
    margin-left: 210px;
  }
  .page {
    padding: 26px 22px;
  }
  .topbar {
    padding-inline: 22px;
  }
  .brand {
    font-size: 15px;
  }
  .workspace-switch {
    gap: 7px;
    padding-inline: 7px;
  }
  .heading-actions {
    max-width: 230px;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .dashboard-grid .panel {
    height: auto;
  }
  .dashboard-grid .pipeline-panel {
    grid-row: 3;
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .detail-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .detail-side > .panel {
    margin: 0;
  }
  .detail-side > .button {
    align-self: start;
  }
  .reports-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .setup-page {
    grid-template-columns: 36% 64%;
  }
  .setup-aside {
    padding: 35px 26px;
  }
  .setup-message .setup-display {
    font-size: 42px;
  }
  .setup-main {
    padding-inline: 32px;
  }
  .setup-steps small {
    font-size: 7px;
  }
  .chat-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .chat-thread > header {
    flex-wrap: wrap;
  }
  .calendar-day {
    min-height: 90px;
    padding: 5px;
  }
}
@media (max-width: 767px) {
  .sidebar {
    width: 250px;
    transform: translateX(-100%);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .app-main,
  body.sidebar-collapsed .app-main {
    margin-left: 0;
  }
  .mobile-menu {
    display: flex;
  }
  .sidebar-scrim {
    position: fixed;
    inset: 0;
    background: #11162070;
    z-index: 35;
  }
  .mobile-nav-open .sidebar {
    transform: translateX(0);
  }
  .mobile-nav-open .sidebar-scrim {
    display: block;
  }
  .mobile-nav-open {
    overflow: hidden;
  }
  .topbar {
    height: 60px;
    min-height: 60px;
    padding: 0 18px;
  }
  .topbar-actions {
    gap: 4px;
  }
  .topbar .avatar {
    display: none;
  }
  .breadcrumb {
    gap: 7px;
    font-size: 10px;
  }
  .breadcrumb > a {
    display: none;
  }
  .breadcrumb > svg {
    display: none;
  }
  .page {
    padding: 25px 20px 35px;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  .page-heading {
    margin-bottom: 23px;
    gap: 15px;
    flex-wrap: wrap;
  }
  .page-heading > div:first-child {
    flex: 1;
    min-width: 200px;
  }
  .heading-actions {
    max-width: none;
    justify-content: flex-start;
    flex-shrink: 1;
  }
  .page-heading p {
    font-size: 11px;
  }
  .app-footer {
    padding-inline: 20px;
  }
  .app-footer span:last-child {
    display: none;
  }
  .module-toolbar {
    align-items: stretch;
  }
  .filter-form {
    width: 100%;
    flex-wrap: wrap;
  }
  .filter-form .input-icon {
    flex: 1;
    min-width: 140px;
  }
  .filter-form .input-icon input {
    width: 100%;
  }
  .filter-form select {
    flex: 1;
    min-width: 100px;
  }
  .view-actions {
    width: 100%;
  }
  .metrics-grid {
    gap: 12px;
  }
  .metric {
    padding: 16px;
  }
  .metric > div {
    font-size: 10px;
  }
  .metric > strong {
    font-size: 30px;
  }
  .metric > small {
    font-size: 8px;
  }
  .section-heading {
    padding: 16px 18px;
  }
  .section-heading h2 {
    font-size: 14px;
  }
  .section-heading > a {
    font-size: 9px;
  }
  .dashboard-grid {
    gap: 18px;
  }
  .priority-row {
    padding: 15px 18px;
  }
  .empty-state {
    min-height: 210px;
    padding: 32px 20px;
  }
  .detail-side {
    grid-template-columns: 1fr;
  }
  .panel {
    margin-bottom: 18px;
  }
  .padded {
    padding: 20px;
  }
  .settings-links > a {
    padding: 20px;
  }
  .setup-page {
    display: block;
  }
  .setup-aside {
    position: relative;
    min-height: auto;
    height: auto;
    padding: 25px;
  }
  .setup-aside > .brand {
    margin: 0;
  }
  .setup-message,
  .setup-aside > footer {
    display: none;
  }
  .setup-main {
    padding: 24px;
    min-height: calc(100dvh - 85px);
  }
  .setup-top {
    font-size: 9px;
  }
  .setup-steps {
    margin: 25px 0 32px;
  }
  .setup-steps small {
    font-size: 7px;
  }
  .setup-content > h1 {
    font-size: 27px;
  }
  .setup-content > .lead {
    font-size: 12px;
  }
  .setup-content {
    max-width: 600px;
  }
  .auth-main {
    min-height: calc(100dvh - 85px);
  }
  .auth-content {
    margin: 35px auto;
  }
  .auth-content > h1 {
    font-size: 34px;
  }
  .reports-grid {
    gap: 15px;
  }
  .calendar-toolbar {
    padding: 15px;
  }
  .calendar-toolbar > div {
    flex-wrap: wrap;
    gap: 6px;
  }
  .calendar-toolbar > div:last-child {
    width: 100%;
  }
  .calendar-toolbar select {
    flex: 1;
    min-width: 0;
  }
  .calendar-toolbar h2 {
    font-size: 12px;
    min-width: 120px;
  }
  .calendar-day {
    min-height: 90px;
  }
  .calendar-event {
    font-size: 8px;
    padding: 3px;
  }
  .calendar-weekdays > span {
    font-size: 9px;
  }
  .chat-layout {
    grid-template-columns: 1fr;
    height: calc(100dvh - 250px);
    min-height: 500px;
  }
  .chat-conversations {
    max-height: 110px;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom: 1px solid var(--line);
    border-right: 0;
    flex-wrap: nowrap;
  }
  .chat-conversations h2 {
    display: none;
  }
  .chat-conversations > a {
    min-width: 160px;
    max-width: 220px;
    border-right: 1px solid var(--line);
    padding: 10px 14px;
  }
  .chat-conversations > p {
    padding: 10px;
  }
  .chat-layout {
    grid-template-rows: auto minmax(0, 1fr);
  }
  .chat-thread > header {
    padding: 13px 16px;
  }
  .chat-thread > header .badge {
    display: none;
  }
  #message-form {
    padding: 12px;
    gap: 6px;
    flex-wrap: wrap;
  }
  #message-form textarea {
    flex-basis: 100%;
    min-height: 50px;
  }
  #message-form input {
    flex: 1;
    width: auto;
  }
  #chat-messages {
    padding: 15px;
  }
  .chat-message {
    max-width: 93%;
  }
  .chat-search {
    padding: 8px 14px;
  }
  .calendar-list {
    padding: 8px 15px;
  }
  dialog {
    max-width: calc(100vw - 24px);
  }
  .drawer {
    width: 100%;
    max-width: 100vw;
    border-radius: 0;
  }
  .dialog-header,
  .dialog-body {
    padding: 20px;
  }
  .dialog-footer {
    padding: 16px 20px;
  }
  .search-dialog {
    margin-top: 30px;
  }
  .drawer .dialog-body.form-grid {
    grid-template-columns: 1fr;
  }
  .toast-region {
    right: 15px;
    bottom: 15px;
  }
  .notification-row {
    padding: 16px;
    gap: 10px;
  }
  .notification-row strong {
    font-size: 11px;
  }
  .notification-row .text-button {
    font-size: 9px;
  }
  .row-actions {
    gap: 6px;
  }
  body.sidebar-collapsed .sidebar {
    width: 250px;
    padding: 26px 15px;
  }
  body.sidebar-collapsed .sidebar .brand > span:last-child,
  body.sidebar-collapsed .sidebar .workspace-switch,
  body.sidebar-collapsed .sidebar .sidebar-search,
  body.sidebar-collapsed .sidebar .nav-label,
  body.sidebar-collapsed .sidebar .nav-item > span,
  body.sidebar-collapsed .sidebar .profile-link > div,
  body.sidebar-collapsed .sidebar .profile-link > svg {
    display: revert;
  }
  body.sidebar-collapsed .nav-item {
    justify-content: flex-start;
  }
  body.sidebar-collapsed .sidebar .brand {
    padding: 0 12px;
  }
}
@media (max-width: 600px) {
  .data-table {
    display: block;
  }
  .data-table thead {
    display: none;
  }
  .data-table tbody {
    display: block;
    padding: 0 16px;
  }
  .data-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
    position: relative;
  }
  .data-table tr:last-child {
    border: 0;
  }
  .data-table td {
    display: block;
    max-width: none;
    padding: 0;
    border: 0;
    font-size: 11px;
    min-width: 0;
  }
  .data-table td:before {
    content: attr(data-label);
    display: block;
    font-size: 8px;
    color: var(--muted);
    margin-bottom: 3px;
  }
  .data-table td:first-child {
    grid-column: 1/-1;
    padding-right: 30px;
    margin-bottom: 7px;
  }
  .data-table td:first-child:before {
    display: none;
  }
  .data-table td:last-child:has(> .icon-button) {
    position: absolute;
    right: 0;
    top: 14px;
  }
  .data-table td:last-child:not([data-label]) {
    grid-column: 1/-1;
  }
  .table-title {
    gap: 9px;
  }
  .table-title .record-icon {
    width: 29px;
    height: 29px;
  }
  .table-panel {
    overflow: hidden;
  }
  .data-table tr:hover td {
    background: none;
  }
  .table-scroll {
    overflow-x: auto;
  }
  .table-scroll .data-table {
    display: table;
    min-width: 650px;
  }
  .table-scroll .data-table thead {
    display: table-header-group;
  }
  .table-scroll .data-table tbody {
    display: table-row-group;
  }
  .table-scroll .data-table tr {
    display: table-row;
  }
  .table-scroll .data-table td {
    display: table-cell;
    padding: 12px;
  }
  .table-scroll .data-table td:before {
    display: none;
  }
  .table-scroll .data-table td:last-child {
    position: static;
  }
  .table-scroll .data-table th {
    padding: 12px;
  }
  .mobile-only {
    display: initial;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .quote-item {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quote-item .icon-button {
    margin: 0;
    grid-column: 2;
    justify-self: end;
  }
  .reports-grid {
    grid-template-columns: 1fr;
  }
  .calendar-day {
    padding: 4px;
    min-height: 70px;
  }
  .calendar-day > time {
    width: 20px;
    height: 20px;
    font-size: 9px;
  }
  .calendar-event {
    font-size: 8px;
    padding: 3px 2px;
    letter-spacing: -0.02em;
  }
  .calendar-list > a {
    gap: 8px;
  }
  .calendar-list time {
    min-width: 65px;
    font-size: 9px;
  }
  .calendar-list .badge {
    display: none;
  }
  .checks > div {
    font-size: 10px;
    padding: 10px;
  }
  .check-result {
    font-size: 8px;
  }
  .setup-main {
    padding: 24px 20px;
  }
  .setup-steps small {
    display: none;
  }
  .setup-steps {
    margin-bottom: 27px;
  }
  .setup-content > h1 {
    font-size: 27px;
  }
  .setup-content .form-grid {
    grid-template-columns: 1fr;
  }
  .setup-actions > .button {
    flex: 1;
  }
  .summary-list > div {
    font-size: 10px;
  }
  .summary-list dt {
    flex: 1;
  }
  .summary-list dd {
    flex: 1.3;
  }
  .setup-main .checks {
    margin-top: 5px;
  }
  .notice {
    padding: 13px;
    gap: 9px;
  }
  .notice code {
    font-size: 9px;
  }
  .app-footer {
    font-size: 8px;
  }
  .button {
    font-size: 11px;
  }
  .page-heading > div:first-child {
    min-width: 170px;
  }
  .heading-actions {
    width: 100%;
  }
  .heading-actions .button {
    flex: 0 1 auto;
  }
  .priority-row > time {
    font-size: 8px;
  }
  .metrics-grid {
    gap: 10px;
  }
  .metric {
    padding: 15px 14px;
  }
  .metric > div svg {
    width: 15px;
    height: 15px;
  }
  .metric > strong {
    font-size: 29px;
  }
  .metric > small svg {
    display: none;
  }
  .import-summary {
    gap: 5px;
  }
  .import-summary strong {
    font-size: 20px;
  }
  .mapping-row select {
    font-size: 10px;
  }
  .chat-message-header {
    font-size: 9px;
    gap: 7px;
  }
  .chat-message-header time {
    font-size: 7px;
  }
}
@media (max-width: 360px) {
  .page {
    padding: 22px 15px;
  }
  .topbar {
    padding: 0 13px;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .metrics-grid {
    gap: 8px;
  }
  .metric {
    padding: 12px;
  }
  .metric > div {
    font-size: 9px;
  }
  .metric > div svg {
    display: none;
  }
  .metric > small {
    font-size: 7px;
  }
  .heading-actions > .button {
    padding: 8px 11px;
  }
  .kanban-column {
    min-width: 250px;
    flex-basis: 250px;
  }
  .section-heading {
    padding: 15px;
  }
  .section-heading > a {
    font-size: 8px;
  }
  .section-heading h2 {
    font-size: 13px;
  }
  .project-list > a {
    padding: 15px;
  }
  .project-list progress {
    width: 50px;
  }
  .auth-content > h1 {
    font-size: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.lookup-search {
  min-height: 32px !important;
  font-size: 10px !important;
  padding: 7px 10px !important;
}
.module-toolbar .filter-form {
  flex-wrap: wrap;
}
.module-toolbar .filter-form #filter-label {
  max-width: 155px;
}
.article-toc a {
  color: var(--accent);
}
/* Operational copy stays readable at everyday laptop and phone sizes. */
.nav-item {
  font-size: 12px;
}
.nav-label {
  font-size: 10px;
}
.metric > div {
  font-size: 12px;
}
.metric > small {
  font-size: 10px;
}
.priority-row strong,
.project-list strong,
.agenda-list a > div strong {
  font-size: 12px;
}
.priority-row small,
.project-list small,
.agenda-list small {
  font-size: 10px;
}
.activity-list p,
.activity-list a {
  font-size: 11px;
}
.activity-list time {
  font-size: 9px;
}
.data-table {
  font-size: 12px;
}
.data-table th {
  font-size: 10px;
}
.badge {
  font-size: 10px;
}
.card-title {
  font-size: 13px;
}
.kanban-column h2 {
  font-size: 12px;
}
.properties > div {
  font-size: 11px;
}
@media (max-width: 600px) {
  .metric > div {
    font-size: 10px;
  }
  .metric > small {
    font-size: 9px;
  }
  .activity-list p,
  .activity-list a {
    font-size: 10px;
  }
  .priority-row strong,
  .project-list strong,
  .agenda-list a > div strong {
    font-size: 11px;
  }
  .nav-item {
    font-size: 12px;
  }
}
.setup-message .setup-display {
  color: #fff;
}
.mobile-sidebar-close{display:none}
@media(max-width:767px){.mobile-sidebar-close{display:inline-flex;position:absolute;top:23px;right:10px;color:#aeb4c1}.sidebar>.brand{padding-right:20px}.mobile-sidebar-close:hover{background:#30353f;color:#fff}}
