.services-page,
.dialogs-page {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

/* Author-level display rules on sidebar items must never override hidden. */
[data-services-nav][hidden],
[data-services-view][hidden],
[data-service-dialogs-nav][hidden],
[data-service-dialogs-view][hidden] {
  display: none !important;
}

.services-page-head {
  align-items: flex-start;
  gap: 20px;
}

.services-contract-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #bddbcd;
  border-radius: 8px;
  background: #eef9f3;
  color: #126a43;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.services-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px) minmax(180px, 240px);
  gap: 12px;
  margin: 24px 0 18px;
}

.services-toolbar label,
.services-search {
  position: relative;
  display: block;
}

.services-toolbar input,
.services-toolbar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d9e4de;
  border-radius: 8px;
  background: #fff;
  color: #17211c;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  outline: none;
  padding: 0 14px;
}

.services-search input {
  padding-left: 42px;
}

.services-search > span {
  position: absolute;
  top: 50%;
  left: 16px;
  z-index: 1;
  color: #728078;
  font-size: 20px;
  transform: translateY(-52%);
}

.services-toolbar input:focus,
.services-toolbar select:focus {
  border-color: #55a57e;
  box-shadow: 0 0 0 3px rgba(8, 116, 67, .1);
}

.services-readiness {
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid #ecd99d;
  border-radius: 8px;
  background: #fff9e7;
  color: #76560c;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 18px;
}

.service-card {
  display: flex;
  flex-direction: column;
  min-height: 390px;
  padding: 22px;
  border: 1px solid #dfe8e3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(32, 66, 50, .06);
}

.service-card.is-active {
  border-color: #9fd2b8;
  background: #f8fcfa;
}

.service-card > header,
.service-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.service-card-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: var(--service-accent);
  color: #fff;
  box-shadow: none;
  font-size: 16px;
  font-weight: 900;
}

.service-card-state {
  padding: 6px 10px;
  border-radius: 8px;
  background: #f1f4f2;
  color: #66736c;
  font-size: 11px;
  font-weight: 850;
}

.service-card-state.is-active {
  background: #e4f7ec;
  color: #087443;
}

.service-card-copy {
  margin: 22px 0 16px;
}

.service-card-copy > span {
  color: #087443;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.service-card-copy h2 {
  margin: 6px 0 9px;
  color: #17211c;
  font-size: 21px;
  line-height: 1.22;
}

.service-card-copy p {
  margin: 0;
  color: #65726b;
  font-size: 14px;
  line-height: 1.55;
}

.service-card ul {
  display: grid;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.service-card li {
  position: relative;
  padding-left: 21px;
  color: #435149;
  font-size: 13px;
  font-weight: 700;
}

.service-card li::before {
  position: absolute;
  top: 1px;
  left: 0;
  color: #15945b;
  content: "✓";
  font-weight: 900;
}

.service-card > footer {
  align-items: flex-end;
  margin-top: auto;
}

.service-card > footer span {
  max-width: 150px;
  color: #7b8780;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.35;
  text-align: right;
}

.service-card-link {
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6a756f;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.service-card-link:hover {
  color: #a33b36;
}

.service-card button:disabled {
  cursor: not-allowed;
  filter: grayscale(.2);
  opacity: .58;
}

.lidforma-automation {
  min-width: 0;
  margin-top: 28px;
  padding: 26px 0 4px;
  overflow-x: clip;
  border-top: 1px solid #dfe8e3;
}

.lidforma-automation-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.lidforma-automation-head > div {
  min-width: 0;
}

.lidforma-automation-head h2 {
  margin: 5px 0 7px;
  color: #17211c;
  font-size: 22px;
  line-height: 1.25;
}

.lidforma-automation-head p:last-child {
  max-width: 680px;
  margin: 0;
  color: #69766f;
  font-size: 13px;
  line-height: 1.5;
}

.lidforma-automation-state {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #b8ddca;
  border-radius: 7px;
  background: #eef9f3;
  color: #087443;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.lidforma-automation-form {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .75fr);
  gap: 22px 30px;
  align-items: start;
  margin-top: 22px;
}

.lidforma-automation-options {
  display: grid;
  min-width: 0;
}

.lidforma-automation-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 64px;
  padding: 12px 0;
  border-bottom: 1px solid #e5ece8;
  cursor: pointer;
}

.lidforma-automation-option:first-child {
  padding-top: 0;
}

.lidforma-automation-option input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: #087443;
}

.lidforma-automation-option span,
.lidforma-automation-option strong,
.lidforma-automation-option small {
  display: block;
  min-width: 0;
}

.lidforma-automation-option strong,
.lidforma-automation-responsible > span {
  color: #24342c;
  font-size: 13px;
  font-weight: 800;
}

.lidforma-automation-option small,
.lidforma-automation-responsible small {
  margin-top: 4px;
  color: #758179;
  font-size: 11px;
  line-height: 1.45;
}

.lidforma-automation-option:has(input:disabled) {
  cursor: default;
  opacity: .66;
}

.lidforma-automation-responsible {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.lidforma-automation-responsible select {
  width: 100%;
  min-height: 44px;
  padding: 0 38px 0 12px;
  border: 1px solid #cfddd5;
  border-radius: 7px;
  background: #fff;
  color: #24342c;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.lidforma-automation-responsible select:focus-visible,
.lidforma-automation-option input:focus-visible {
  outline: 3px solid rgba(8, 116, 67, .14);
  outline-offset: 2px;
}

.lidforma-automation-form > footer {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
}

.lidforma-automation-message {
  min-width: 0;
  color: #66736c;
  font-size: 12px;
  font-weight: 700;
}

.lidforma-automation-message.is-success {
  color: #087443;
}

.lidforma-automation-message.is-error {
  color: #a33832;
}

.lidforma-analytics {
  min-width: 0;
  margin-top: 28px;
  padding: 26px 0 4px;
  overflow-x: clip;
  border-top: 1px solid #dfe8e3;
}

.lidforma-analytics-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.lidforma-analytics-head > div {
  flex: 1 1 340px;
  min-width: 0;
}

.lidforma-analytics-head h2 {
  margin: 3px 0 7px;
  color: #17211c;
  font-size: 23px;
}

.lidforma-analytics-head p:last-child {
  max-width: 650px;
  margin: 0;
  color: #66736c;
  font-size: 14px;
  line-height: 1.5;
}

.lidforma-analytics-controls {
  flex: 1 1 620px;
  display: grid;
  grid-template-columns: auto 132px 132px auto;
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.lidforma-analytics-periods,
.lidforma-analytics-slices {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  overflow: hidden;
  border: 1px solid #d5e1da;
  border-radius: 8px;
  background: #fff;
}

.lidforma-analytics-periods button,
.lidforma-analytics-slices button {
  min-width: 0;
  min-height: 44px;
  padding: 0 11px;
  border: 0;
  border-right: 1px solid #e1e9e5;
  background: #fff;
  color: #5d6a63;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.lidforma-analytics-periods button:last-child,
.lidforma-analytics-slices button:last-child {
  border-right: 0;
}

.lidforma-analytics-periods button:hover,
.lidforma-analytics-slices button:hover {
  background: #f3f8f5;
  color: #243129;
}

.lidforma-analytics-periods button[aria-pressed="true"],
.lidforma-analytics-slices button[aria-selected="true"] {
  background: #e8f5ee;
  color: #087443;
}

.lidforma-analytics-controls label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #66736c;
  font-size: 11px;
  font-weight: 750;
}

.lidforma-analytics-controls input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid #d5e1da;
  border-radius: 8px;
  background: #fff;
  color: #243129;
  font: inherit;
  font-size: 13px;
}

.lidforma-analytics-controls button:focus-visible,
.lidforma-analytics-controls input:focus-visible,
.lidforma-analytics-slices button:focus-visible,
.lidforma-analytics-notice button:focus-visible {
  outline: 3px solid rgba(8, 116, 67, .2);
  outline-offset: 2px;
}

.lidforma-analytics-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px solid #e2eae6;
  border-radius: 8px;
  background: #f8faf9;
  color: #425048;
  font-size: 13px;
  font-weight: 700;
}

.lidforma-analytics-notice.is-error {
  border-color: #efc9c5;
  background: #fff4f2;
  color: #983c36;
}

.lidforma-analytics-notice button {
  flex: 0 0 auto;
  min-height: 44px;
}

.lidforma-analytics-loading,
.lidforma-analytics-empty {
  display: grid;
  grid-template-columns: repeat(3, minmax(40px, 90px)) minmax(180px, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 118px;
  margin-top: 18px;
  padding: 18px 0;
  border-top: 1px solid #e2eae6;
  border-bottom: 1px solid #e2eae6;
}

.lidforma-analytics-loading > span {
  height: 48px;
  border-radius: 6px;
  background: #e7efeb;
  animation: lidforma-analytics-pulse 1.2s ease-in-out infinite alternate;
}

.lidforma-analytics-loading > span:nth-child(2) {
  animation-delay: .15s;
}

.lidforma-analytics-loading > span:nth-child(3) {
  animation-delay: .3s;
}

.lidforma-analytics-loading strong,
.lidforma-analytics-empty strong {
  color: #34413a;
  font-size: 14px;
}

.lidforma-analytics-empty {
  grid-template-columns: 1fr;
  gap: 5px;
  color: #738078;
  font-size: 13px;
}

@keyframes lidforma-analytics-pulse {
  from { opacity: .45; }
  to { opacity: 1; }
}

.lidforma-analytics-content {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(360px, 1.2fr);
  gap: 24px;
  min-width: 0;
  margin-top: 18px;
  transition: opacity .16s ease;
}

.lidforma-analytics-content.is-refreshing {
  opacity: .5;
}

.lidforma-analytics-funnel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-width: 0;
  overflow: hidden;
  border-top: 1px solid #dfe8e3;
  border-bottom: 1px solid #dfe8e3;
}

.lidforma-analytics-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  min-width: 0;
  padding: 15px 16px;
  border-right: 1px solid #e2eae6;
}

.lidforma-analytics-step:last-child {
  border-right: 0;
}

.lidforma-analytics-step > span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #536159;
  font-size: 12px;
  font-weight: 800;
}

.lidforma-analytics-step > strong {
  color: #17211c;
  font-size: 20px;
}

.lidforma-analytics-step > small {
  grid-column: 1 / -1;
  color: #77847d;
  font-size: 11px;
}

.lidforma-analytics-step > i,
.lidforma-analytics-list > li > i {
  grid-column: 1 / -1;
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: #e8efeb;
}

.lidforma-analytics-step > i > b,
.lidforma-analytics-list > li > i > b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #15945b;
}

.lidforma-analytics-daily,
.lidforma-analytics-breakdown {
  min-width: 0;
  padding-top: 2px;
}

.lidforma-analytics-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin-bottom: 12px;
}

.lidforma-analytics-subhead h3 {
  margin: 0;
  color: #243129;
  font-size: 15px;
}

.lidforma-analytics-subhead > span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #77847d;
  font-size: 10px;
  white-space: nowrap;
}

.lidforma-analytics-subhead > span i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #9ecfba;
}

.lidforma-analytics-subhead > span i:last-of-type {
  margin-left: 5px;
  background: #087443;
}

.lidforma-analytics-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 100%;
  height: 176px;
  min-width: 0;
  padding: 12px 4px 0;
  overflow: hidden;
  border-top: 1px solid #e2eae6;
  border-bottom: 1px solid #e2eae6;
  background: #fafcfb;
}

.lidforma-analytics-day {
  position: relative;
  flex: 1 1 0;
  height: 100%;
  min-width: 1px;
}

.lidforma-analytics-day > i,
.lidforma-analytics-day > b {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  min-height: 0;
  border-radius: 2px 2px 0 0;
  background: #9ecfba;
}

.lidforma-analytics-day > b {
  right: 20%;
  left: 20%;
  background: #087443;
}

.lidforma-analytics-slices {
  min-width: 0;
}

.lidforma-analytics-slices button {
  min-height: 44px;
  padding: 0 9px;
  font-size: 11px;
}

.lidforma-analytics-list {
  display: grid;
  gap: 0;
  min-width: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid #e2eae6;
  list-style: none;
}

.lidforma-analytics-list > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 12px;
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid #edf2ef;
}

.lidforma-analytics-list > li > span:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.lidforma-analytics-list strong {
  overflow: hidden;
  color: #34413a;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lidforma-analytics-list small,
.lidforma-analytics-list-value {
  color: #77847d;
  font-size: 10px;
}

.lidforma-analytics-list-value {
  align-self: center;
  white-space: nowrap;
}

.lidforma-analytics-list > li.is-empty {
  grid-template-columns: 1fr;
  min-height: 72px;
}

.lidforma-projects {
  margin-top: 28px;
  padding: 26px 0 0;
  overflow-x: clip;
  border-top: 1px solid #dfe8e3;
  background: transparent;
}

.lidforma-projects-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.lidforma-projects-head h2 {
  margin: 3px 0 7px;
  color: #17211c;
  font-size: 23px;
}

.lidforma-projects-head p:last-child {
  max-width: 720px;
  margin: 0;
  color: #66736c;
  font-size: 14px;
  line-height: 1.5;
}

.lidforma-projects-status {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #eef9f3;
  color: #126a43;
  font-size: 13px;
  font-weight: 750;
}

.lidforma-projects-status.is-error {
  background: #fff0ee;
  color: #a33b36;
}

.lidforma-project-list {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.lidforma-project-card {
  padding: 20px;
  border: 1px solid #dfe8e3;
  border-radius: 8px;
  background: #fff;
}

.lidforma-project-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.lidforma-project-card h3 {
  margin: 0 0 5px;
  color: #17211c;
  font-size: 18px;
}

.lidforma-project-card a {
  color: #087443;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.lidforma-project-kicker,
.lidforma-workspace-title span {
  display: block;
  margin-bottom: 5px;
  color: #66736c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lidforma-project-state {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 8px;
  background: #e4f7ec;
  color: #087443;
  font-size: 11px;
  font-weight: 850;
}

.lidforma-project-state.is-off {
  background: #f1f4f2;
  color: #66736c;
}

.lidforma-project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.lidforma-project-actions button {
  min-height: 44px;
}

.lidforma-project-actions .is-success {
  border-color: #15945b;
  background: #e8f7ef;
  color: #087443;
}

.lidforma-project-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid #e2eae6;
  border-radius: 8px;
  background: #e2eae6;
}

.lidforma-project-summary > span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  background: #f8faf9;
}

.lidforma-project-summary small {
  color: #78847d;
  font-size: 11px;
}

.lidforma-project-summary strong {
  overflow-wrap: anywhere;
  color: #243129;
  font-size: 13px;
}

.lidforma-install-code {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 16px;
}

.lidforma-install-code code {
  min-width: 0;
  padding: 11px 13px;
  overflow: auto;
  border: 1px solid #dfe8e3;
  border-radius: 8px;
  background: #fff;
  color: #34413a;
  font-size: 11px;
  white-space: nowrap;
}

.lidforma-install-code.is-disabled code {
  color: #77827c;
  white-space: normal;
}

.lidforma-install-code button {
  min-height: 44px;
}

.lidforma-project-workspace {
  min-width: 0;
  max-width: 100%;
  padding: 24px 0 8px;
  overflow-x: clip;
  border-top: 2px solid #d7e5de;
}

.lidforma-workspace-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.lidforma-workspace-title h3 {
  margin: 0;
  color: #17211c;
  font-size: 20px;
}

.lidforma-workspace-title button {
  min-height: 44px;
}

.lidforma-project-editor {
  min-width: 0;
  max-width: 100%;
}

.lidforma-project-editor > details {
  margin-bottom: 12px;
  border: 1px solid #dfe8e3;
  border-radius: 8px;
  background: #fff;
}

.lidforma-project-editor summary {
  padding: 14px 16px;
  color: #243129;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}

.lidforma-editor-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-width: 0;
  border-bottom: 1px solid #dce6e1;
}

.lidforma-editor-tabs button {
  min-width: 0;
  min-height: 46px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #66736c;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.lidforma-editor-tabs button:hover {
  background: #f4f8f6;
  color: #243129;
}

.lidforma-editor-tabs button[aria-selected="true"] {
  border-bottom-color: #087443;
  color: #087443;
}

.lidforma-editor-tabs button:focus-visible,
.lidforma-preview-controls button:focus-visible,
.lidforma-preview-state button:focus-visible,
.lidforma-project-editor button:focus-visible,
.lidforma-project-editor input:focus-visible,
.lidforma-project-editor select:focus-visible,
.lidforma-project-editor textarea:focus-visible {
  outline: 3px solid rgba(8, 116, 67, .2);
  outline-offset: 2px;
}

.lidforma-editor-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 28px;
  min-width: 0;
}

.lidforma-editor-fields {
  min-width: 0;
}

.lidforma-editor-panel {
  min-width: 0;
  padding: 24px 0 8px;
}

.lidforma-editor-panel[hidden] {
  display: none !important;
}

.lidforma-section-head {
  margin-bottom: 18px;
}

.lidforma-section-head h4 {
  margin: 0 0 5px;
  color: #17211c;
  font-size: 16px;
}

.lidforma-section-head p {
  margin: 0;
  color: #66736c;
  font-size: 13px;
  line-height: 1.45;
}

.lidforma-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0 16px 16px;
}

.lidforma-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #46534c;
  font-size: 12px;
  font-weight: 750;
}

.lidforma-field.is-wide {
  grid-column: 1 / -1;
}

.lidforma-field input:not([type="checkbox"]),
.lidforma-field select,
.lidforma-field textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #d5e1da;
  border-radius: 8px;
  background: #fff;
  color: #17211c;
  font: inherit;
  font-size: 14px;
  font-weight: 550;
}

.lidforma-field input[aria-invalid="true"],
.lidforma-field select[aria-invalid="true"],
.lidforma-field textarea[aria-invalid="true"] {
  border-color: #b94a43;
  box-shadow: 0 0 0 3px rgba(185, 74, 67, .1);
}

.lidforma-field > small {
  color: #77827c;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
}

.lidforma-field .lidforma-field-error {
  color: #a33b36;
}

.lidforma-color-control {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.lidforma-color-control input[type="color"] {
  width: 52px;
  min-height: 44px;
  padding: 4px;
  cursor: pointer;
}

.lidforma-color-control output {
  min-width: 0;
  color: #34413a;
  font-size: 13px;
  font-weight: 750;
}

.lidforma-contrast-note {
  padding: 8px 10px;
  border-left: 3px solid #c18b14;
  background: #fff9e8;
  color: #76560c !important;
}

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

.lidforma-check {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 43px;
  color: #34413a;
  font-size: 13px;
  font-weight: 750;
}

.lidforma-check input {
  width: 18px;
  height: 18px;
  accent-color: #087443;
}

.lidforma-state-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e2eae6;
}

.lidforma-state-summary > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.lidforma-state-summary span,
.lidforma-diagnostics span {
  color: #78847d;
  font-size: 11px;
}

.lidforma-state-summary strong,
.lidforma-diagnostics strong {
  overflow-wrap: anywhere;
  color: #243129;
  font-size: 13px;
}

.lidforma-employees {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}

.lidforma-employee {
  padding: 14px;
  border: 1px solid #dfe8e3;
  border-radius: 8px;
  background: #fbfdfc;
}

.lidforma-avatar-field {
  margin-top: 12px;
}

.lidforma-employee-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 130px 130px auto;
  gap: 10px;
  align-items: end;
}

.lidforma-work-days {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.lidforma-work-days label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  font-size: 12px;
}

.lidforma-work-days input {
  width: 17px;
  height: 17px;
  accent-color: #087443;
}

.lidforma-add-employee {
  min-height: 44px;
  margin-top: 14px;
}

.lidforma-diagnostics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid #e2eae6;
  border-radius: 8px;
  background: #e2eae6;
}

.lidforma-diagnostics > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  background: #f8faf9;
}

.lidforma-preview {
  align-self: start;
  position: sticky;
  top: 16px;
  min-width: 0;
  margin-top: 24px;
  padding: 14px;
  border: 1px solid #dce6e1;
  border-radius: 8px;
  background: #fff;
}

.lidforma-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.lidforma-preview-head > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.lidforma-preview-head span {
  color: #78847d;
  font-size: 11px;
}

.lidforma-preview-head strong {
  color: #243129;
  font-size: 12px;
}

.lidforma-preview-controls,
.lidforma-preview-state {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  padding: 2px;
  border: 1px solid #dce6e1;
  border-radius: 8px;
  background: #f5f8f6;
}

.lidforma-preview-controls button,
.lidforma-preview-state button {
  min-height: 34px;
  padding: 5px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #66736c;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.lidforma-preview-controls button[aria-pressed="true"],
.lidforma-preview-state button[aria-pressed="true"] {
  background: #fff;
  color: #087443;
  box-shadow: 0 1px 4px rgba(32, 66, 50, .1);
}

.lidforma-preview-state {
  margin: 12px 0;
}

.lidforma-preview-frame {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #cfdcd5;
  border-radius: 8px;
  background: #edf3f0;
  transition: width .18s ease;
}

.lidforma-preview-frame[data-device="mobile"] {
  width: min(100%, 278px);
  margin-inline: auto;
}

.lidforma-preview-browser {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  border-bottom: 1px solid #d6e1db;
  background: #fff;
}

.lidforma-preview-browser i {
  width: 6px;
  height: 6px;
  border-radius: 6px;
  background: #9da9a2;
}

.lidforma-preview-browser span {
  min-width: 0;
  margin-left: 5px;
  overflow: hidden;
  color: #7b8780;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lidforma-preview-stage {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  background: #f3f7f5;
}

.lidforma-preview-frame[data-device="mobile"] .lidforma-preview-stage {
  min-height: 470px;
}

.lidforma-preview-window {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  grid-template-rows: auto minmax(150px, 1fr) auto;
  width: min(310px, calc(100% - 20px));
  min-width: 0;
  max-height: calc(100% - 20px);
  overflow: hidden;
  border: 1px solid rgba(23, 33, 28, .12);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(32, 66, 50, .14);
}

.lidforma-preview-window header {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 9px;
  min-height: 64px;
  padding: 10px;
}

.lidforma-preview-window header > span:nth-child(2) {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.lidforma-preview-window header strong,
.lidforma-preview-window header small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lidforma-preview-window header strong {
  font-size: 12px;
}

.lidforma-preview-window header small {
  opacity: .82;
  font-size: 9px;
}

.lidforma-preview-window header button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, .18);
  color: currentColor;
  font-size: 18px;
}

.lidforma-preview-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 8px;
  background: rgba(255, 255, 255, .22);
  color: currentColor;
  font-size: 11px;
  font-weight: 850;
}

.lidforma-preview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lidforma-preview-chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 12px 10px;
  overflow: hidden;
  background: #f7f9f8;
}

.lidforma-preview-message {
  max-width: 86%;
  padding: 8px 9px;
  border-radius: 8px 8px 8px 2px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(32, 66, 50, .08);
  color: #243129;
  font-size: 10px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.lidforma-preview-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
}

.lidforma-preview-replies span {
  max-width: 100%;
  padding: 5px 7px;
  overflow: hidden;
  border: 1px solid #c8ddd2;
  border-radius: 8px;
  background: #fff;
  color: #087443;
  font-size: 8px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lidforma-preview-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 7px 8px 7px 10px;
  border-top: 1px solid #e3eae6;
  background: #fff;
}

.lidforma-preview-input span {
  overflow: hidden;
  color: #98a29d;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lidforma-preview-input b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 13px;
}

.lidforma-preview-collapsed {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 8px;
  max-width: calc(100% - 28px);
}

.lidforma-preview-greeting {
  max-width: 230px;
  padding: 9px 11px;
  border: 1px solid #dce6e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(32, 66, 50, .1);
  color: #243129;
  font-size: 10px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.lidforma-preview-launcher {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 9px 24px rgba(32, 66, 50, .18);
}

.lidforma-preview-launcher.is-standard {
  justify-content: flex-start;
  width: min(250px, 100%);
  padding: 0 12px 0 9px;
  gap: 9px;
}

.lidforma-preview-launcher.is-standard strong {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lidforma-preview-launcher .lidforma-preview-avatar {
  border-color: rgba(255, 255, 255, .32);
}

.lidforma-preview-launcher.has-animation {
  animation: lidforma-preview-pulse 2.4s ease-in-out infinite;
}

.lidforma-preview-message-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 22px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 6px;
}

.lidforma-preview-message-icon i {
  width: 2px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.lidforma-preview.is-inactive .lidforma-preview-frame {
  opacity: .62;
}

.lidforma-validation-summary {
  margin-top: 14px;
  padding: 11px 13px;
  border-left: 3px solid #b94a43;
  border-radius: 6px;
  background: #fff1ef;
  color: #8f322d;
  font-size: 13px;
  font-weight: 750;
}

@keyframes lidforma-preview-pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@media (prefers-reduced-motion: reduce) {
  .lidforma-preview-frame,
  .lidforma-preview-launcher.has-animation {
    animation: none;
    transition: none;
  }
}

.lidforma-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding: 16px 0 max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid #e2eae6;
}

.lidforma-editor-actions button {
  min-height: 44px;
}

.services-empty,
.dialogs-integration-placeholder {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 160px;
  padding: 24px;
  border: 1px dashed #cbd9d1;
  border-radius: 8px;
  background: #fbfdfc;
  color: #66736c;
}

.services-empty {
  flex-direction: column;
  justify-content: center;
  grid-column: 1 / -1;
  text-align: center;
}

.dialogs-integration-shell {
  min-height: 560px;
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid #dfe8e3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 15px 42px rgba(32, 66, 50, .08);
}

.dialogs-integration-placeholder > span {
  display: grid;
  place-items: center;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: #087443;
  color: #fff;
  font-weight: 900;
}

.dialogs-integration-placeholder strong {
  display: block;
  color: #243129;
  font-size: 16px;
}

.dialogs-integration-placeholder p {
  max-width: 680px;
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 1120px) {
  .lidforma-editor-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .lidforma-preview {
    position: static;
    width: min(100%, 440px);
    margin-top: 0;
  }
}

@media (max-width: 820px) {
  .services-page-head {
    display: block;
  }

  .services-contract-badge {
    margin-top: 12px;
  }

  .services-toolbar {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

  .services-toolbar input,
  .services-toolbar select {
    min-height: 48px;
    font-size: 16px;
  }

  .service-card {
    min-height: 0;
    padding: 18px;
  }

  .service-card > footer {
    align-items: stretch;
    flex-direction: column;
  }

  .service-card > footer .primary-button {
    width: 100%;
  }

  .service-card > footer span {
    max-width: none;
    text-align: left;
  }

  .lidforma-automation {
    padding: 18px 0 max(4px, env(safe-area-inset-bottom));
  }

  .lidforma-automation-head {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .lidforma-automation-state {
    align-self: flex-start;
    white-space: normal;
  }

  .lidforma-automation-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .lidforma-automation-option {
    min-height: 68px;
  }

  .lidforma-automation-form > footer {
    align-items: stretch;
    flex-direction: column;
  }

  .lidforma-automation-form > footer .primary-button {
    width: 100%;
    min-height: 44px;
  }

  .dialogs-integration-shell {
    min-height: 440px;
    margin-top: 16px;
  }

  .dialogs-integration-placeholder {
    align-items: flex-start;
    min-height: 180px;
  }

  .lidforma-analytics {
    padding: 18px 0 max(4px, env(safe-area-inset-bottom));
  }

  .lidforma-analytics-head {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
  }

  .lidforma-analytics-head > div,
  .lidforma-analytics-controls {
    flex-basis: auto;
  }

  .lidforma-analytics-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .lidforma-analytics-periods,
  .lidforma-analytics-controls > button {
    grid-column: 1 / -1;
  }

  .lidforma-analytics-controls > button {
    width: 100%;
  }

  .lidforma-analytics-content {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

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

  .lidforma-analytics-step {
    border-bottom: 1px solid #e2eae6;
  }

  .lidforma-analytics-step:nth-child(2n) {
    border-right: 0;
  }

  .lidforma-analytics-step:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .lidforma-analytics-loading {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lidforma-analytics-loading strong {
    grid-column: 1 / -1;
  }

  .lidforma-projects {
    padding: 18px 0 0;
  }

  .lidforma-projects-head,
  .lidforma-project-card-head {
    flex-direction: column;
  }

  .lidforma-projects-head .primary-button {
    width: 100%;
  }

  .lidforma-form-grid,
  .lidforma-employee-grid,
  .lidforma-install-code {
    grid-template-columns: 1fr;
  }

  .lidforma-project-card {
    padding: 16px;
  }

  .lidforma-project-summary,
  .lidforma-state-summary,
  .lidforma-diagnostics {
    grid-template-columns: 1fr;
  }

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

  .lidforma-editor-tabs button:last-child {
    grid-column: 1 / -1;
  }

  .lidforma-editor-tabs button,
  .lidforma-preview-controls button,
  .lidforma-preview-state button {
    min-height: 44px;
  }

  .lidforma-editor-panel {
    padding-top: 20px;
  }

  .lidforma-field input:not([type="checkbox"]),
  .lidforma-field select,
  .lidforma-field textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .lidforma-work-days {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .lidforma-work-days label {
    min-height: 44px;
  }

  .lidforma-preview {
    width: 100%;
    padding: 12px;
  }

  .lidforma-preview-head {
    align-items: stretch;
    flex-direction: column;
  }

  .lidforma-preview-stage,
  .lidforma-preview-frame[data-device="mobile"] .lidforma-preview-stage {
    min-height: 430px;
  }

  .lidforma-install-code code {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .lidforma-field.is-wide {
    grid-column: auto;
  }

  .lidforma-install-code button,
  .lidforma-editor-actions button {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .lidforma-analytics-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .lidforma-analytics-controls > label,
  .lidforma-analytics-controls > button,
  .lidforma-analytics-periods {
    grid-column: 1;
  }

  .lidforma-analytics-periods button {
    padding: 0 7px;
  }

  .lidforma-analytics-step {
    padding: 13px 11px;
  }

  .lidforma-analytics-subhead {
    align-items: flex-start;
    flex-direction: column;
  }

  .lidforma-analytics-slices {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .lidforma-analytics-slices button:nth-child(2) {
    border-right: 0;
  }

  .lidforma-analytics-slices button:nth-child(-n + 2) {
    border-bottom: 1px solid #e1e9e5;
  }

  .lidforma-analytics-list > li {
    grid-template-columns: minmax(0, 1fr);
  }

  .lidforma-analytics-list-value {
    justify-self: start;
  }

  .lidforma-projects-head,
  .lidforma-project-card-head,
  .lidforma-workspace-title {
    gap: 12px;
  }

  .lidforma-project-card,
  .lidforma-employee {
    padding: 13px;
  }

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

  .lidforma-preview-window {
    right: 7px;
    bottom: 7px;
    width: calc(100% - 14px);
    max-height: calc(100% - 14px);
  }
}
