﻿@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #f3f6fa;
  --panel: #ffffff;
  --panel-soft: #f6f8fb;
  --line: #c7ccd5;
  --line-soft: #e4e8ef;
  --text: #101418;
  --muted: #596171;
  --blue: #075bc5;
  --blue-2: #2874e3;
  --blue-soft: #e7f0ff;
  --green: #009f68;
  --green-soft: #c9f8df;
  --red: #c91414;
  --red-soft: #ffd8d8;
  --dark: #111b2d;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --warning: #f59e0b;
  --danger: #dc2626;
  --success: #16a34a;
  --shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 18px 42px rgba(15, 23, 42, 0.09);
  --radius: 12px;
  --radius-sm: 9px;
  --tap-size: 44px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(243, 246, 250, 0.48);
  backdrop-filter: blur(9px) saturate(1.08);
  -webkit-backdrop-filter: blur(9px) saturate(1.08);
}

.loading-card {
  display: grid;
  min-width: min(330px, 86vw);
  gap: 10px;
  justify-items: center;
  padding: 28px 30px;
  border: 1px solid rgba(199, 204, 213, 0.84);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
  color: var(--text);
  text-align: center;
}

.loading-card strong {
  font-size: 22px;
  line-height: 1.2;
}

.loading-card span:last-child {
  color: var(--muted);
  font-size: 15px;
}

.loading-coreflow-logo {
  display: block;
  width: 58px;
  height: 58px;
  margin-bottom: 4px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(7, 91, 197, 0.22));
  transform-origin: 50% 50%;
  animation: coreflow-loader-spin 1.15s linear infinite;
}

@keyframes coreflow-loader-spin {
  from {
    transform: rotate(0deg) scale(0.98);
  }
  50% {
    transform: rotate(180deg) scale(1.04);
  }
  to {
    transform: rotate(360deg) scale(0.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-coreflow-logo {
    animation: none;
  }
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
a,
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  min-height: var(--tap-size);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(40, 116, 227, 0.28);
  outline-offset: 2px;
}

.login-screen {
  display: grid;
  grid-template-columns: minmax(480px, 1.15fr) minmax(520px, 1fr);
  min-height: 100vh;
  background: #f4f7fb;
}

.login-visual {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 100vh;
  padding: 54px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(8, 15, 28, 0.88), rgba(8, 15, 28, 0.78)),
    linear-gradient(135deg, #0d1a2b, #213247);
}

.login-visual::before {
  content: "";
  position: absolute;
  inset: 25% 0 0;
  background:
    linear-gradient(90deg, transparent 0 15%, rgba(190, 207, 222, 0.12) 15% 16%, transparent 16% 28%, rgba(190, 207, 222, 0.16) 28% 29%, transparent 29% 48%, rgba(190, 207, 222, 0.14) 48% 49%, transparent 49% 76%, rgba(190, 207, 222, 0.12) 76% 77%, transparent 77%),
    linear-gradient(180deg, rgba(214, 225, 235, 0.10), rgba(11, 20, 34, 0.84)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 128px);
  border-top: 8px solid rgba(5, 12, 22, 0.55);
}

.login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  width: fit-content;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.brand-logo {
  display: block;
  width: auto;
  object-fit: contain;
}

.brand-logo-login {
  height: 68px;
  max-width: 340px;
  filter: none;
}

.brand-logo-sidebar {
  height: 58px;
  max-width: 210px;
}

.office-visual {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 22%;
  height: 210px;
  opacity: 0.45;
}

.office-visual span {
  position: absolute;
  bottom: 0;
  border: 2px solid rgba(189, 208, 226, 0.3);
  background: rgba(10, 21, 36, 0.18);
}

.office-visual span:nth-child(1) { left: 18%; width: 18%; height: 120px; }
.office-visual span:nth-child(2) { left: 42%; width: 16%; height: 160px; }
.office-visual span:nth-child(3) { right: 18%; width: 15%; height: 132px; }
.office-visual span:nth-child(4) { left: 31%; width: 22%; height: 18px; }
.office-visual span:nth-child(5) { right: 31%; width: 18%; height: 18px; }

.login-copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin-bottom: 120px;
}

.login-copy h1 {
  max-width: 620px;
  margin: 0 0 28px;
  font-size: 30px;
  line-height: 1.32;
}

.login-copy p {
  max-width: 540px;
  margin: 0;
  color: #8f9aad;
  font-size: 20px;
  line-height: 1.45;
}

.login-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  color: #8f9aad;
  font-size: 14px;
  font-weight: 700;
}

.login-footer a {
  color: inherit;
  text-decoration: none;
}

.login-panel-wrap {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 48px;
}

.login-card {
  display: grid;
  gap: 28px;
  width: min(500px, 100%);
  padding: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.login-card h2 {
  margin: 0 0 14px;
  font-size: 30px;
}

.login-card p {
  margin: 0;
  color: #303744;
  font-size: 16px;
  line-height: 1.5;
}

.login-card label {
  display: grid;
  gap: 12px;
  font-weight: 600;
}

.label-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.label-row a,
.login-help a {
  color: var(--blue);
  text-decoration: none;
}

.login-input {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 66px;
  padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  color: #7a828f;
}

.login-input input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 18px;
}

.login-submit,
.sso-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 64px;
  border-radius: 5px;
  font-size: 20px;
}

.login-submit {
  border: 1px solid #0149ad;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

.sso-button {
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--text);
}

.login-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  color: #111;
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.login-status {
  min-height: 24px;
  color: var(--red) !important;
}

.login-status[data-state="success"] {
  color: var(--green) !important;
}

.login-help {
  text-align: center;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  width: 300px;
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #eef2f7;
  overflow: hidden;
}

.brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 24px 26px 18px;
}

.brand small {
  display: block;
  margin-top: 0;
  color: #2f3540;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar-nav {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  gap: 10px;
  align-content: start;
  padding: 18px 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #b8c2d1 transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 8px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: #b8c2d1;
  border-radius: 999px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.nav-item,
.plain-action {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  border: 0;
  background: transparent;
  color: #202631;
  text-align: left;
  text-decoration: none;
}

.nav-item {
  min-height: 56px;
  padding: 10px 22px;
  border-radius: 5px;
  font-size: 18px;
  line-height: 1.25;
}

.nav-item.is-active {
  background: var(--blue-2);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.nav-parent-item {
  position: relative;
  margin-bottom: 2px;
}

.nav-parent-item::after {
  content: "";
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .18s ease;
  opacity: .72;
}

.nav-parent-item.is-expanded::after {
  transform: rotate(45deg);
}

.nav-subitem {
  display: none;
  min-height: 42px;
  margin-top: -6px;
  margin-left: 42px;
  padding: 8px 14px;
  font-size: 15px;
}

.nav-subitem.is-expanded {
  display: flex;
}

.nav-subitem::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  opacity: .42;
}

.nav-subitem.is-active::before {
  opacity: 1;
}

.plain-action {
  padding: 12px 22px;
  font-size: 17px;
}

.sidebar-footer {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: #eef2f7;
}

.main-area {
  position: relative;
  z-index: 1;
  min-width: 0;
  margin-left: 300px;
  overflow-x: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 80px;
  padding: 14px 40px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 246, 250, 0.96);
  backdrop-filter: blur(10px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(720px, 52vw);
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 17px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: #151922;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.logout-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
}

.user-menu strong,
.user-menu small {
  display: block;
  text-align: right;
}

.user-menu strong {
  font-size: 20px;
  font-weight: 500;
}

.user-menu small {
  color: #424956;
  font-size: 13px;
}

.avatar,
.mini-avatar,
.letter-avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
}

.avatar {
  width: 48px;
  height: 48px;
  color: #fff;
  background: linear-gradient(135deg, #0b2740, #348d9d);
  font-weight: 700;
}

.screen {
  display: none;
  padding: 44px 40px 64px;
}

.connection-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 24px 40px 0;
  padding: 16px 18px;
  border: 1px solid #f1c96b;
  border-radius: 8px;
  background: #fff7df;
}

.connection-panel[data-state="success"] {
  border-color: #91dfbd;
  background: #e9fff3;
}

.connection-panel strong,
.connection-panel p {
  margin: 0;
}

.connection-panel p {
  margin-top: 4px;
  color: #4b5563;
}

.admin-login-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-login-form input {
  width: 180px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
}

.admin-login-form .primary-button,
.connection-panel > .secondary-button {
  min-height: 42px;
  padding: 0 18px;
  font-size: 15px;
}

.screen.is-visible {
  display: block;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.page-heading h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1.1;
}

.page-heading p {
  margin: 8px 0 0;
  color: #2f3540;
  font-size: 20px;
}

.compact-heading {
  align-items: center;
  margin-bottom: 26px;
}

.heading-actions,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 28px;
  border-radius: var(--radius-sm);
  font-size: 19px;
}

.primary-button {
  border: 1px solid #0149ad;
  background: var(--blue);
  color: #fff;
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.metrics-grid {
  display: grid;
  grid-template-columns: minmax(280px, 2.3fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(280px, 2.3fr);
  gap: 30px;
  margin-bottom: 40px;
}

.status-card,
.compact-metric,
.latency-card {
  min-height: 264px;
  padding: 32px;
}

.status-card {
  position: relative;
  display: grid;
  align-content: space-between;
}

.eyebrow {
  display: block;
  color: #252b35;
  font-size: 20px;
  line-height: 1.4;
  text-transform: uppercase;
}

.status-card strong {
  display: block;
  margin-top: 12px;
  font-size: 30px;
}

.success-ring {
  position: absolute;
  right: 30px;
  top: 30px;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: var(--green-soft);
}

.success-ring::after {
  content: "\2713";
  position: absolute;
  inset: 9px;
  display: grid;
  place-items: center;
  border: 3px solid var(--green);
  border-radius: 50%;
  color: var(--green);
  font-weight: 700;
}

.uptime-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
}

.uptime-row small {
  color: #39404b;
  text-transform: uppercase;
}

.uptime-row span {
  color: var(--blue);
  font-family: Consolas, monospace;
  font-size: 22px;
}

.progress-line {
  height: 7px;
  overflow: hidden;
  border-radius: 10px;
  background: #dce6f5;
}

.progress-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.compact-metric {
  display: grid;
  align-content: center;
  gap: 20px;
}

.compact-metric strong,
.latency-card strong {
  display: block;
  font-size: 42px;
  line-height: 1;
}

.compact-metric small,
.latency-card small {
  color: #404754;
  line-height: 1.5;
}

.positive {
  color: var(--green) !important;
}

.mini-lines {
  display: flex;
  gap: 6px;
}

.mini-lines span {
  width: 36px;
  height: 5px;
  border-radius: 20px;
  background: var(--blue);
}

.mini-lines span:last-child {
  background: #b7d3f7;
}

.latency-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.bars {
  display: flex;
  align-items: end;
  gap: 8px;
  height: 72px;
}

.bars span {
  width: 10px;
  border-radius: 3px 3px 0 0;
  background: #b9d7f4;
}

.bars span:nth-child(1) { height: 34px; }
.bars span:nth-child(2) { height: 48px; }
.bars span:nth-child(3) { height: 42px; }
.bars span:nth-child(4) { height: 64px; background: #357bd8; }
.bars span:nth-child(5) { height: 39px; }
.bars span:nth-child(6) { height: 44px; background: var(--blue); }

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 386px;
  gap: 30px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 30px;
}

.card-header h2,
.right-stack h2,
.permissions-card h2,
.smtp-card h2,
.webhook-card h2,
.integrations-card h2,
.general-card h2,
.placeholder-card h2 {
  margin: 0;
  font-size: 23px;
}

.card-header a,
.ghost-link {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 18px;
  text-decoration: none;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th {
  padding: 20px 30px;
  background: var(--panel-soft);
  color: #2c3340;
  text-align: left;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}

td {
  padding: 28px 30px;
  border-top: 1px solid var(--line-soft);
  font-size: 18px;
  vertical-align: middle;
}

.activity-card td:first-child,
.activity-card td:nth-child(2),
.users-table td:first-child {
  display: flex;
  align-items: center;
  gap: 18px;
}

.row-icon {
  color: var(--blue);
}

.mini-avatar {
  width: 24px;
  height: 24px;
  margin-right: 8px;
  color: #fff;
  background: #153b48;
  font-size: 9px;
}

.mini-avatar.muted {
  color: #111;
  background: #d9dee7;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pill.success {
  background: var(--green-soft);
  color: #00784e;
}

.pill.danger {
  background: var(--red-soft);
  color: var(--red);
}

.pill.neutral {
  background: #e5e8eb;
  color: #252b35;
}

.pill.admin {
  background: #d8e8ff;
  color: var(--blue);
}

.right-stack {
  display: grid;
  gap: 30px;
}

.insights-card,
.nodes-card {
  padding: 30px;
}

.timeline {
  display: grid;
  gap: 28px;
  margin: 28px 0 0;
  padding-left: 24px;
  border-left: 3px solid #d7dce5;
}

.timeline li {
  position: relative;
  padding-left: 4px;
  font-size: 18px;
}

.timeline li::marker {
  color: var(--blue);
}

.timeline small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.timeline .danger strong {
  color: var(--red);
}

.node-row {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 82px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel-soft);
}

.node-row div {
  flex: 1;
}

.node-row strong,
.node-row small {
  display: block;
}

.node-row small {
  margin-top: 4px;
  color: #2f3540;
}

.node-row i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #76d4b0;
}

.dashboard-calendar-card {
  margin-bottom: 28px;
  overflow: hidden;
}

.dashboard-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(230px, 1fr)) minmax(260px, 0.85fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 28px;
}

.dashboard-summary-card,
.dashboard-calendar-compact-card {
  min-height: 272px;
  overflow: hidden;
}

.dashboard-summary-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 0;
  background: #ffffff;
}

.dashboard-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 10px;
}

.dashboard-summary-header h2 {
  margin: 0;
  color: #12213a;
  font-size: 17px;
}

.dashboard-summary-list {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 0 20px 14px;
}

.dashboard-summary-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px solid #edf1f7;
}

.dashboard-summary-item:last-child {
  border-bottom: 0;
}

.dashboard-summary-dot {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--blue);
  font-size: 10px;
}

.dashboard-summary-dot.contract {
  color: #f08d2f;
}

.dashboard-summary-dot.implementation {
  color: #08775a;
}

.dashboard-summary-dot.request {
  color: #0b66d8;
}

.dashboard-summary-copy {
  min-width: 0;
}

.dashboard-summary-copy strong,
.dashboard-summary-copy span,
.dashboard-summary-copy small {
  display: block;
}

.dashboard-summary-copy strong {
  overflow: hidden;
  color: #182233;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-summary-copy span,
.dashboard-summary-copy small,
.dashboard-summary-meta {
  color: #5f6b7d;
  font-size: 12px;
}

.dashboard-summary-meta {
  text-align: right;
  white-space: nowrap;
}

.dashboard-summary-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-summary-progress span {
  width: 88px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebf2;
}

.dashboard-summary-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.dashboard-summary-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-top: 1px solid #edf1f7;
  color: var(--blue);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.dashboard-summary-footer::after {
  content: '?';
  margin-left: 8px;
  font-size: 18px;
}

.dashboard-summary-list .empty-state {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-calendar-compact-card {
  margin: 0;
  cursor: pointer;
}

.dashboard-charts-grid .dashboard-calendar-compact-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  height: 100%;
}

.dashboard-calendar-compact-card .dashboard-calendar-header {
  padding: 16px 16px 10px;
}

.dashboard-calendar-compact-card .dashboard-calendar-header h2 {
  font-size: 16px;
}

.dashboard-calendar-compact-card .dashboard-calendar-actions {
  gap: 5px;
}

.dashboard-calendar-compact-card .dashboard-calendar-actions .primary-button,
.dashboard-calendar-compact-card .dashboard-calendar-actions .secondary-button,
.dashboard-calendar-compact-card .dashboard-calendar-actions .icon-button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.dashboard-calendar-compact-card .dashboard-calendar-weekdays span {
  padding: 7px 3px;
  font-size: 10px;
}

.dashboard-calendar-compact-card .calendar-day {
  min-height: 30px;
  padding: 4px;
}

.dashboard-calendar-compact-card .calendar-day strong {
  font-size: 11px;
}

.dashboard-calendar-compact-card .calendar-day.is-today > strong {
  width: 18px;
  height: 18px;
}

.dashboard-calendar-compact-card .calendar-day ul,
.dashboard-calendar-compact-card .calendar-day small {
  display: none;
}

.dashboard-calendar-compact-card .calendar-day.has-events::after {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  margin: 2px auto 0;
  border-radius: 50%;
  background: var(--blue);
}

.dashboard-calendar-compact-card .dashboard-calendar-legend {
  justify-content: center;
  padding: 9px 12px;
  font-size: 11px;
}

.dashboard-calendar-full-card {
  display: none;
}

.dashboard-calendar-modal {
  place-items: center;
  padding: 12px;
  backdrop-filter: blur(8px);
}

.dashboard-calendar-modal-card {
  display: flex;
  flex-direction: column;
  width: min(1120px, calc(100vw - 24px));
  height: min(820px, calc(100dvh - 24px));
  max-height: none;
  overflow: hidden;
  padding: 0;
}

.dashboard-calendar-modal-header {
  padding: 14px 20px 8px;
}

.dashboard-calendar-modal-header .eyebrow {
  font-size: 13px;
}

.dashboard-calendar-modal-header h2 {
  margin-top: 2px;
  font-size: clamp(22px, 2.1vw, 30px);
  line-height: 1.05;
}

.dashboard-calendar-modal-header p {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.25;
}

.dashboard-calendar-modal-actions {
  justify-content: flex-end;
  padding: 0 20px 8px;
}

.dashboard-calendar-modal .dashboard-calendar-weekdays,
.dashboard-calendar-modal .dashboard-calendar-grid {
  flex-shrink: 0;
}

.dashboard-calendar-modal .dashboard-calendar-grid {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  grid-template-rows: repeat(6, minmax(0, 1fr));
}

.dashboard-calendar-modal .calendar-day {
  min-height: 0;
  padding: 6px 7px;
  overflow: hidden;
}

.dashboard-calendar-modal .calendar-day ul {
  gap: 3px;
  margin-top: 5px;
}

.dashboard-calendar-modal .calendar-event {
  min-height: 25px;
  padding: 4px 5px;
  font-size: 10px;
}

.dashboard-calendar-modal .calendar-day small {
  margin-top: 3px;
  font-size: 10px;
}

.dashboard-presentation-card {
  margin-bottom: 28px;
  overflow: hidden;
}

.dashboard-presentation-card .card-header {
  padding-bottom: 18px;
}

.dashboard-presentation-card h2 {
  margin: 5px 0 0;
}

.dashboard-presentation-table {
  min-width: 780px;
}

.dashboard-presentation-table td {
  padding-top: 18px;
  padding-bottom: 18px;
}

.dashboard-presentation-table td:first-child strong,
.dashboard-presentation-table td:first-child small {
  display: block;
}

.dashboard-presentation-table td:first-child small {
  margin-top: 4px;
  color: var(--muted);
}

#screen-dashboard > .metrics-grid,
#screen-dashboard > .dashboard-layout {
  display: none;
}

.dashboard-calendar-header,
.dashboard-calendar-actions,
.dashboard-calendar-filters,
.dashboard-calendar-legend {
  display: flex;
  align-items: center;
}

.dashboard-calendar-header {
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 14px;
}

.dashboard-calendar-header h2 {
  margin: 5px 0 0;
  text-transform: capitalize;
}

.dashboard-calendar-actions {
  gap: 8px;
}

.dashboard-calendar-actions .primary-button,
.dashboard-calendar-actions .secondary-button {
  min-height: 40px;
  padding: 0 15px;
  font-size: 15px;
}

.dashboard-calendar-filters {
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 16px;
}

.calendar-filter {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
  background: #fff;
  cursor: pointer;
}

.calendar-filter.is-active {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.calendar-filter-field {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.calendar-filter-field select,
.calendar-filter-field input {
  min-height: 35px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
  background: #fff;
}

.calendar-search-field {
  margin-left: auto;
}

.calendar-search-field input {
  width: min(240px, 100%);
}

.dashboard-calendar-weekdays,
.dashboard-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.dashboard-calendar-weekdays {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.dashboard-calendar-weekdays span {
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  min-height: 126px;
  padding: 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-day.is-outside {
  background: #f8fafc;
  color: #a3adba;
}

.calendar-day.is-today > strong {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
}

.calendar-day ul {
  display: grid;
  gap: 5px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.calendar-event {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  width: 100%;
  padding: 5px 6px;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-left: 3px solid currentColor;
  border-radius: 3px;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.calendar-event.technical {
  color: #075eb5;
  background: #e8f2ff;
}

.calendar-event.commercial {
  color: #08775a;
  background: #e8f8f1;
}

.calendar-event.overdue {
  color: #b91c1c;
  background: #fee2e2;
}

.calendar-event.cancelled {
  opacity: 0.58;
  text-decoration: line-through;
}

.calendar-event time {
  font-weight: 700;
}

.calendar-event span {
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-day small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.dashboard-calendar-legend {
  justify-content: flex-end;
  gap: 18px;
  padding: 13px 24px;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-calendar-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dashboard-calendar-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.dashboard-calendar-legend .technical {
  background: #075eb5;
}

.dashboard-calendar-legend .commercial {
  background: #08775a;
}

.breadcrumb {
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.breadcrumb span {
  color: #111;
  margin: 0 6px;
}

.user-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 2.1fr;
  gap: 24px;
  margin-bottom: 30px;
}

.small-stat {
  min-height: 118px;
  padding: 24px;
}

.small-stat strong {
  display: block;
  margin: 10px 0;
  font-size: 26px;
}

.small-stat small {
  color: var(--muted);
}

.integrity-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 28px;
  border-radius: 5px;
  background: var(--blue-2);
  color: #fff;
}

.integrity-banner h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.integrity-banner p {
  max-width: 560px;
  margin: 0;
  color: #eef5ff;
}

.integrity-banner span {
  flex: none;
  display: grid;
  place-items: center;
  width: 104px;
  height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
  text-align: center;
  text-transform: uppercase;
}

.users-table-card {
  margin-bottom: 30px;
}

.tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 24px;
}

.tabs,
.table-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.tabs button,
.table-actions button {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #111;
}

.tabs button.is-selected {
  color: var(--blue);
  border-bottom: 2px solid var(--blue);
}

.letter-avatar {
  width: 34px;
  height: 34px;
  margin-right: 16px;
  border-radius: 12px;
}

.letter-avatar.blue {
  background: #dce5ff;
}

.letter-avatar.red {
  color: var(--red);
  background: #ffdcdc;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
}

.status-dot.active { background: #13b879; }
.status-dot.inactive { background: #aaaeb7; }
.status-dot.flagged { background: var(--red); }

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  border-top: 1px solid var(--line-soft);
  color: #313844;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pagination button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--panel);
}

.pagination button.current {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.permissions-card {
  margin-bottom: 30px;
}

.permissions-card h2 {
  padding: 22px 24px 0;
}

.permission-table-wrap {
  overflow-x: auto;
  padding-top: 18px;
}

.permission-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(4, minmax(150px, 1fr));
  min-width: 860px;
}

.permission-grid > * {
  min-height: 46px;
  padding: 13px 18px;
  border-top: 1px solid var(--line-soft);
}

.permission-check-cell {
  display: grid;
  place-items: center;
}

.permission-grid input {
  justify-self: center;
  align-self: center;
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.permission-head,
.permission-section {
  background: var(--panel-soft);
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.permission-section {
  grid-column: 1 / -1;
  min-height: 36px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.permissions-card .form-actions {
  padding: 18px 24px;
  border-top: 1px solid var(--line-soft);
}

.utility-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.dashed-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  min-height: 230px;
  padding: 42px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-align: center;
}

.dashed-card h2,
.dashed-card p {
  margin: 0;
}

.dashed-card p {
  max-width: 440px;
  color: #404754;
}

.sales-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.sales-metric {
  position: relative;
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 230px;
  padding: 28px;
}

.sales-metric > .icon {
  position: absolute;
  right: 26px;
  top: 28px;
  color: var(--blue);
}

.sales-metric .eyebrow {
  max-width: 170px;
  font-size: 14px;
  font-weight: 700;
}

.sales-metric strong {
  font-size: 34px;
  line-height: 1.28;
}

.sales-metric small {
  color: var(--blue);
  font-size: 15px;
  line-height: 1.35;
}

.pipeline-card {
  margin-bottom: 32px;
  padding: 34px;
}

.pipeline-card h2 {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 34px;
  font-size: 22px;
}

.pipeline-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  min-height: 134px;
}

.pipeline-step {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 22px 18px;
  color: #0c1625;
  text-align: center;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%);
}

.pipeline-step:first-child {
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
}

.pipeline-step:last-child {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 14px 50%);
}

.pipeline-step.muted { background: #e5e7ea; }
.pipeline-step.soft { background: #dce6ff; }
.pipeline-step.mid { background: #d0e0f4; }
.pipeline-step.active {
  background: var(--blue-2);
  color: #fff;
}

.pipeline-step small {
  color: inherit;
  font-size: 11px;
  text-transform: uppercase;
}

.pipeline-step strong {
  font-size: 28px;
  line-height: 1;
}

.pipeline-step span {
  font-size: 13px;
}

.proposal-clients-card {
  margin-bottom: 32px;
}

.proposal-clients-table {
  width: 100%;
  border-collapse: collapse;
}

.proposal-clients-table th,
.proposal-clients-table td {
  padding: 18px 22px;
  border-top: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}

.proposal-clients-table th {
  background: var(--panel-soft);
  color: #273244;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.proposal-clients-table td strong,
.proposal-clients-table td small {
  display: block;
}

.proposal-clients-table td small {
  margin-top: 5px;
  color: var(--muted);
}

.proposal-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  max-width: 220px;
}

.proposal-row-actions .ghost-link {
  flex: 0 0 auto;
  white-space: nowrap;
}

.proposal-row-actions .danger-action {
  color: #dc2626;
}

.service-requests-panel,
.service-request-form-panel,
.service-request-detail-panel,
.conversations-panel {
  margin-bottom: 28px;
}

.screen.requests-chat-screen {
  height: calc(100dvh - 78px);
  min-height: 0;
  overflow: hidden;
  padding-block: 14px;
}

.screen.requests-chat-screen .conversations-panel {
  height: 100%;
  margin-bottom: 0;
}

.conversations-panel {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  padding: 0;
}

.conversation-sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  padding: 10px;
  border-right: 1px solid var(--line-soft);
  background: #f8fafc;
}

.conversation-search {
  position: relative;
}

.conversation-search input {
  width: 100%;
  min-height: 46px;
  padding: 0 42px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
}

.conversation-search .icon {
  position: absolute;
  top: 50%;
  right: 15px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
}

.conversation-channel-tabs,
.conversation-filter-row {
  display: grid;
  gap: 5px;
  width: 100%;
}

.conversation-channel-tabs {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.conversation-filter-row {
  grid-template-columns: minmax(56px, .85fr) minmax(92px, 1.25fr) minmax(62px, .9fr) 34px 34px;
}

.conversation-channel-tabs button,
.conversation-filter,
.conversation-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 27px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: #273244;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.conversation-channel-tabs button {
  width: 100%;
}

.conversation-channel-tabs button span {
  display: inline-grid;
  place-items: center;
  min-width: 12px;
  font-size: 12px;
  line-height: 1;
}

.conversation-channel-tabs button b,
.conversation-filter b {
  font-size: 10px;
  line-height: 1;
}

.conversation-tool {
  width: 34px;
  height: 27px;
  padding: 0;
  font-size: 13px;
}

.conversation-channel-tabs button.is-active,
.conversation-filter.is-active,
.conversation-tool.is-active {
  border-color: #8b5cf6;
  color: #6d28d9;
  background: #f3e8ff;
}

.conversation-channel-tabs .channel-facebook span { color: #1877f2; }
.conversation-channel-tabs .channel-instagram span { color: #c026d3; }
.conversation-channel-tabs .channel-telegram span { color: #229ed9; }
.conversation-channel-tabs .channel-web span { color: #0ea5e9; }
.conversation-channel-tabs .channel-dashboard span { color: #ef476f; }

.conversation-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding: 0 2px 84px 0;
}

.conversation-new-button {
  position: absolute;
  left: 24px;
  bottom: 20px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: #b586ce;
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(111, 70, 155, .28);
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.conversation-new-button:hover {
  background: #9a6fbe;
  box-shadow: 0 18px 38px rgba(111, 70, 155, .36);
  transform: translateY(-2px);
}

.conversation-new-button span {
  display: block;
  width: 28px;
  height: 28px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5.5C4 4.12 5.12 3 6.5 3h11C18.88 3 20 4.12 20 5.5v8c0 1.38-1.12 2.5-2.5 2.5H9.2L4 21V5.5zM6.5 5C6.22 5 6 5.22 6 5.5v10.86L8.42 14H17.5c.28 0 .5-.22.5-.5v-8c0-.28-.22-.5-.5-.5h-11z'/%3E%3C/svg%3E") center / 28px 28px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5.5C4 4.12 5.12 3 6.5 3h11C18.88 3 20 4.12 20 5.5v8c0 1.38-1.12 2.5-2.5 2.5H9.2L4 21V5.5zM6.5 5C6.22 5 6 5.22 6 5.5v10.86L8.42 14H17.5c.28 0 .5-.22.5-.5v-8c0-.28-.22-.5-.5-.5h-11z'/%3E%3C/svg%3E") center / 28px 28px no-repeat;
}

.conversation-item {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.conversation-item.is-active,
.conversation-item:hover {
  border-color: #8b5cf6;
  box-shadow: 0 10px 24px rgba(109, 40, 217, .12);
}

.conversation-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e0edff;
  color: #155bc7;
  font-weight: 900;
}

.conversation-avatar img,
.client-contact-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.conversation-item-body,
.conversation-item-body span {
  display: grid;
  min-width: 0;
}

.conversation-item-body > span:first-child {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.conversation-item-body strong,
.conversation-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-item-body em,
.conversation-item-body small {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.conversation-unread {
  position: absolute;
  right: 42px;
  bottom: 10px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  color: #fff;
  background: #7c3aed;
  font-size: 11px;
}

.conversation-archive-button {
  position: absolute;
  right: 9px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  opacity: .78;
  transition: background .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease;
}

.conversation-archive-button::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='5' rx='1'/%3E%3Cpath d='M5 9v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V9'/%3E%3Cpath d='M10 13h4'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='5' rx='1'/%3E%3Cpath d='M5 9v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V9'/%3E%3Cpath d='M10 13h4'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}

.conversation-item:hover .conversation-archive-button,
.conversation-archive-button:focus-visible {
  opacity: 1;
}

.conversation-archive-button:hover,
.conversation-archive-button:focus-visible {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #2563eb;
}

.conversation-status-badge {
  width: fit-content;
  margin-top: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #155bc7;
  background: #dbeafe;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.conversation-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-top: 5px;
}

.conversation-badge-row .conversation-status-badge,
.conversation-badge-row .conversation-department-badge {
  margin-top: 0;
}

.conversation-department-badge {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.conversation-status-badge.active {
  color: #5b21b6;
  background: #ede9fe;
}

.conversation-status-badge.waiting {
  color: #b45309;
  background: #fef3c7;
}

.conversation-status-badge.resolved {
  color: #047857;
  background: #dcfce7;
}

.conversation-list-empty,
.conversation-empty-state {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 14px;
  min-height: 420px;
  color: var(--muted);
  text-align: center;
}

.conversation-list-empty strong,
.conversation-empty-state h2 {
  margin: 0;
  color: var(--ink);
}

.conversation-empty-bubble,
.conversation-empty-icon {
  position: relative;
  width: 74px;
  height: 54px;
  border-radius: 50%;
  background: #8b5cf6;
  opacity: .86;
}

.conversation-empty-bubble::after,
.conversation-empty-icon::after {
  content: "";
  position: absolute;
  left: 10px;
  bottom: -9px;
  width: 22px;
  height: 18px;
  border-radius: 0 0 0 18px;
  background: inherit;
  transform: rotate(-18deg);
}

.conversation-main {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  min-width: 0;
  background: #eef2f7;
}

.conversation-chat {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
}

.conversation-chat-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: #fff;
}

.conversation-chat-contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.conversation-chat-header strong,
.conversation-chat-header span {
  display: block;
}

.conversation-header-avatar {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  overflow: hidden;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e0edff;
  color: #155bc7;
  font-weight: 900;
}

.conversation-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.conversation-chat-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.conversation-chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.conversation-action-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-color: #cfe0f6;
  color: #155bc7;
  background: #ffffff;
}

.conversation-action-icon:hover {
  border-color: #155bc7;
  background: #edf5ff;
}

.conversation-action-primary {
  border-color: #155bc7;
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 12px 26px rgba(37, 99, 235, .24);
}

.conversation-action-primary:hover {
  color: #ffffff;
  background: #1d4ed8;
}

.conversation-action-icon .icon {
  width: 24px;
  height: 24px;
  background: currentColor;
}

.conversation-action-icon .satisfaction-mark-icon {
  color: #f59e0b;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 2a9 9 0 1 0 9 9h-2a7 7 0 1 1-7-7V2zm7 1h2v3h3v2h-3v3h-2V8h-3V6h3V3zM7.8 9.2a1.2 1.2 0 1 0 0-2.4 1.2 1.2 0 0 0 0 2.4zm6.4 0a1.2 1.2 0 1 0 0-2.4 1.2 1.2 0 0 0 0 2.4zM6.8 12.8h8.4a4.5 4.5 0 0 1-8.4 0z'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 2a9 9 0 1 0 9 9h-2a7 7 0 1 1-7-7V2zm7 1h2v3h3v2h-3v3h-2V8h-3V6h3V3zM7.8 9.2a1.2 1.2 0 1 0 0-2.4 1.2 1.2 0 0 0 0 2.4zm6.4 0a1.2 1.2 0 1 0 0-2.4 1.2 1.2 0 0 0 0 2.4zM6.8 12.8h8.4a4.5 4.5 0 0 1-8.4 0z'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
}

.conversation-action-icon .create-request-icon {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 4h2v7h7v2h-7v7h-2v-7H4v-2h7V4zm6.5 1.5h4v2h-4v-2zm0 4h4v2h-4v-2z'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 4h2v7h7v2h-7v7h-2v-7H4v-2h7V4zm6.5 1.5h4v2h-4v-2zm0 4h4v2h-4v-2z'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
}

.conversation-action-icon .link-client-icon {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.5 14a4.5 4.5 0 1 1 3.18-7.68l1.06 1.06-1.42 1.42-1.06-1.06A2.5 2.5 0 1 0 7.5 12h3v2h-3zm6-4h3a4.5 4.5 0 1 1-3.18 7.68l-1.06-1.06 1.42-1.42 1.06 1.06A2.5 2.5 0 1 0 16.5 12h-3v-2zM8 11h8v2H8v-2z'/%3E%3C/svg%3E") center / 21px 21px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.5 14a4.5 4.5 0 1 1 3.18-7.68l1.06 1.06-1.42 1.42-1.06-1.06A2.5 2.5 0 1 0 7.5 12h3v2h-3zm6-4h3a4.5 4.5 0 1 1-3.18 7.68l-1.06-1.06 1.42-1.42 1.06 1.06A2.5 2.5 0 1 0 16.5 12h-3v-2zM8 11h8v2H8v-2z'/%3E%3C/svg%3E") center / 21px 21px no-repeat;
}

.conversation-action-icon .transfer-attendance-icon {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 7h9.2l-2.6-2.6L15 3l5 5-5 5-1.4-1.4L16.2 9H7V7zm10 10H7.8l2.6 2.6L9 21l-5-5 5-5 1.4 1.4L7.8 15H17v2z'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 7h9.2l-2.6-2.6L15 3l5 5-5 5-1.4-1.4L16.2 9H7V7zm10 10H7.8l2.6 2.6L9 21l-5-5 5-5 1.4 1.4L7.8 15H17v2z'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
}

.conversation-action-icon .start-attendance-icon {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7L8 5z'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7L8 5z'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
}

.conversation-action-icon .finish-attendance-icon {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9.2 16.6-4.1-4.1L3.7 14l5.5 5.5L20.7 8 19.3 6.6 9.2 16.6z'/%3E%3C/svg%3E") center / 21px 21px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9.2 16.6-4.1-4.1L3.7 14l5.5 5.5L20.7 8 19.3 6.6 9.2 16.6z'/%3E%3C/svg%3E") center / 21px 21px no-repeat;
}

.conversation-satisfaction-panel {
  position: absolute;
  top: 62px;
  right: 18px;
  z-index: 5;
  width: min(390px, calc(100% - 36px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 54px rgba(15, 23, 42, .18);
}

.conversation-satisfaction-panel[hidden] {
  display: none;
}

.conversation-transfer-panel {
  position: absolute;
  top: 62px;
  right: 18px;
  z-index: 6;
  display: grid;
  gap: 12px;
  width: min(360px, calc(100% - 36px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 54px rgba(15, 23, 42, .18);
}

.conversation-transfer-panel[hidden] {
  display: none;
}

.conversation-transfer-header,
.conversation-transfer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.conversation-transfer-header strong {
  font-size: 14px;
}

.conversation-transfer-header .icon-button {
  width: 30px;
  height: 30px;
}

.conversation-transfer-panel label {
  display: grid;
  gap: 7px;
  color: #172033;
  font-size: 12px;
  font-weight: 900;
}

.conversation-transfer-panel select {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
}

.conversation-transfer-status {
  min-height: 16px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.conversation-transfer-status.is-error {
  color: #b91c1c;
}

.conversation-transfer-status.is-success {
  color: #15803d;
}

.conversation-transfer-actions {
  justify-content: flex-end;
}

.conversation-transfer-actions button {
  min-height: 34px;
  padding: 0 14px;
  font-size: 12px;
}

.conversation-link-modal {
  z-index: 260;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(8px);
}

.conversation-link-card {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(520px, calc(100vw - 32px));
  max-height: none;
  overflow: visible;
  padding: 28px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

.conversation-link-card h2,
.conversation-link-card p {
  margin: 0;
}

.conversation-link-card h2 {
  color: #142039;
  font-size: 28px;
  line-height: 1.1;
}

.conversation-link-card p {
  color: var(--muted);
}

.conversation-link-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.conversation-link-card label {
  position: relative;
  display: grid;
  gap: 8px;
  color: #142039;
  font-weight: 900;
}

.conversation-link-card input {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
}

.conversation-linked-client {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
}

.conversation-linked-client small {
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.conversation-linked-client strong {
  color: #142039;
  font-size: 16px;
  line-height: 1.25;
}

.conversation-link-card .client-search-results {
  position: static;
  z-index: auto;
  max-height: none;
  overflow: visible;
  margin-top: -4px;
  box-shadow: none;
}

.conversation-link-card .client-search-results button {
  border-radius: 10px;
}

.conversation-link-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.conversation-link-status.is-error {
  color: #b91c1c;
}

.conversation-link-status.is-success {
  color: #15803d;
}

.conversation-link-submit {
  justify-self: stretch;
  min-height: 50px;
  border-color: #16a34a;
  background: #16a34a;
  color: #ffffff;
}

.conversation-link-submit:hover {
  border-color: #15803d;
  background: #15803d;
}

.service-request-link-client-backdrop {
  z-index: 270;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(9px);
}

.service-request-link-client-card {
  width: min(640px, calc(100vw - 32px));
  max-height: min(88vh, 620px);
  overflow: visible;
  padding: 0;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

.service-request-link-client-card .modal-header {
  align-items: flex-start;
  gap: 18px;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.service-request-link-client-card .modal-header > div {
  display: grid;
  gap: 6px;
}

.service-request-link-client-card .eyebrow {
  color: #64748b;
  font-size: 13px;
  letter-spacing: .08em;
}

.service-request-link-client-card h2,
.service-request-link-client-card p {
  margin: 0;
}

.service-request-link-client-card h2 {
  color: #142039;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.08;
}

.service-request-link-client-card .modal-header p {
  max-width: 52ch;
  color: #64748b;
  font-size: 15px;
  line-height: 1.35;
}

.service-request-link-client-card .icon-button {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #0f172a;
  font-size: 28px;
}

#serviceRequestLinkClientForm {
  display: grid;
  gap: 14px;
  padding: 22px 28px 28px;
}

.service-request-link-field {
  position: relative;
  display: grid;
  gap: 8px;
  color: #142039;
  font-size: 14px;
  font-weight: 900;
}

.service-request-link-field input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid #cbd5e1;
  border-radius: 13px;
  background: #ffffff;
  color: #142039;
  font: inherit;
  font-weight: 700;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.service-request-link-field input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.service-request-link-client-results {
  position: static;
  max-height: 190px;
  overflow: auto;
  border-radius: 12px;
  box-shadow: none;
}

.service-request-link-client-results button {
  padding: 12px 14px;
  border-radius: 0;
}

#serviceRequestLinkClientStatus {
  min-height: 20px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff8e6;
  color: #b45309;
  font-size: 14px;
  font-weight: 800;
}

#serviceRequestLinkClientStatus:empty {
  display: none;
}

#serviceRequestLinkClientStatus.is-success,
#serviceRequestLinkClientStatus.success,
#serviceRequestLinkClientStatus[data-state="success"] {
  background: #ecfdf5;
  color: #047857;
}

#serviceRequestLinkClientStatus.is-error,
#serviceRequestLinkClientStatus.error,
#serviceRequestLinkClientStatus[data-state="error"] {
  background: #fef2f2;
  color: #b91c1c;
}

#confirmServiceRequestLinkClientButton {
  width: 100%;
  min-height: 52px;
  margin-top: 2px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 900;
}

.conversation-satisfaction-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.conversation-satisfaction-header strong {
  font-size: 14px;
}

.conversation-satisfaction-header .icon-button {
  width: 30px;
  height: 30px;
}

.conversation-satisfaction-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.conversation-satisfaction-options button {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 64px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.conversation-satisfaction-options button:hover,
.conversation-satisfaction-options button.is-selected {
  border-color: #8b5cf6;
  background: #f8f5ff;
}

.conversation-satisfaction-options button:nth-child(1) { color: #16a34a; }
.conversation-satisfaction-options button:nth-child(2) { color: #65a30d; }
.conversation-satisfaction-options button:nth-child(3) { color: #ca8a04; }
.conversation-satisfaction-options button:nth-child(4) { color: #ea580c; }
.conversation-satisfaction-options button:nth-child(5) { color: #dc2626; }

.satisfaction-face {
  position: relative;
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fbbf24;
}

.satisfaction-face::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #1f2937;
  box-shadow: 8px 0 0 #1f2937;
}

.satisfaction-face::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 15px;
  width: 12px;
  height: 5px;
  border: 2px solid #1f2937;
  border-top: 0;
  border-radius: 0 0 14px 14px;
}

.satisfaction-face.neutral::after {
  top: 17px;
  height: 2px;
  border: 0;
  border-radius: 2px;
  background: #1f2937;
}

.satisfaction-face.sad::after,
.satisfaction-face.very-sad::after {
  top: 17px;
  border: 2px solid #1f2937;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
}

.satisfaction-face.very-sad {
  background: #f87171;
}

.conversation-satisfaction-panel textarea {
  width: 100%;
  resize: vertical;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.conversation-satisfaction-panel p {
  margin: 8px 0 0;
  color: #94a3b8;
  font-size: 11px;
}

.conversation-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding: 22px;
}

.conversation-message {
  width: fit-content;
  max-width: min(640px, 78%);
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
}

.conversation-message.outgoing {
  align-self: flex-end;
  border-color: #bfdbfe;
  background: #e8f1ff;
}

.conversation-message p {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.45;
  white-space: pre-line;
}

.conversation-message small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.conversation-composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line-soft);
  background: #fff;
}

.conversation-composer input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
}

.conversation-send-status {
  grid-column: 2 / 4;
  min-height: 16px;
  margin: -4px 8px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.conversation-send-status:empty {
  display: none;
}

.conversation-send-status.is-loading {
  color: #2563eb;
}

.conversation-send-status.is-success {
  color: #15803d;
}

.conversation-send-status.is-error {
  color: #b91c1c;
}

.whatsapp-history-card {
  width: min(920px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.whatsapp-history-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: #f8fafc;
}

.whatsapp-history-summary span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.whatsapp-history-summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.whatsapp-history-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.whatsapp-history-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding: 18px 20px;
  background: #edf2f8;
}

.whatsapp-history-message {
  width: fit-content;
  max-width: min(620px, 78%);
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
}

.whatsapp-history-message.is-outgoing {
  align-self: flex-end;
  border-color: #bfdbfe;
  background: #e8f1ff;
}

.whatsapp-history-message p {
  margin: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.whatsapp-history-message small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.service-request-modal-open {
  overflow: hidden;
}

.service-request-form-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1790;
  background: rgba(15, 23, 42, .38);
  backdrop-filter: blur(10px);
}

.service-request-form-panel:not([hidden]) {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1800;
  width: min(980px, calc(100vw - 44px));
  max-height: calc(100vh - 44px);
  margin: 0;
  overflow: auto;
  transform: translate(-50%, -50%);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
}

.service-request-form-panel .card-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
}

.service-request-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.service-request-metric-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
  cursor: pointer;
  text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.service-request-metric-card:hover,
.service-request-metric-card.is-active {
  border-color: var(--blue);
  box-shadow: 0 12px 28px rgba(13, 99, 212, .13);
  transform: translateY(-1px);
}

.service-request-metric-card.is-active::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: inset 0 0 0 4px #fff;
}

.service-request-metric-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  line-height: 1.2;
}

.service-request-metric-card b {
  display: block;
  font-size: 25px;
  line-height: 1;
}

.service-request-metric-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
}

.metric-icon {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #eaf2ff;
}

.metric-icon::before,
.metric-icon::after {
  content: "";
  position: absolute;
  border-color: currentColor;
}

.support-icon {
  color: #7c3aed;
  background: #f2e9ff;
}

.support-icon::before {
  width: 9px;
  height: 9px;
  left: 13px;
  top: 12px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 11px 3px 0 -1px currentColor;
}

.support-icon::after {
  width: 24px;
  height: 12px;
  left: 10px;
  top: 25px;
  border-radius: 12px 12px 5px 5px;
  background: currentColor;
}

.document-icon {
  color: var(--blue);
  background: #eaf2ff;
}

.document-icon::before {
  width: 18px;
  height: 23px;
  left: 13px;
  top: 10px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.document-icon::after {
  width: 10px;
  height: 2px;
  left: 17px;
  top: 18px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor;
}

.headset-icon {
  color: var(--blue);
  background: #eaf2ff;
}

.headset-icon::before {
  width: 22px;
  height: 18px;
  left: 10px;
  top: 12px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 15px 15px 0 0;
}

.headset-icon::after {
  width: 7px;
  height: 12px;
  left: 11px;
  top: 23px;
  border-radius: 5px;
  background: currentColor;
  box-shadow: 16px 0 0 currentColor;
}

.search-icon {
  color: #d97706;
  background: #fff7e6;
}

.search-icon::before {
  width: 17px;
  height: 17px;
  left: 11px;
  top: 10px;
  border: 3px solid currentColor;
  border-radius: 50%;
}

.search-icon::after {
  width: 12px;
  height: 3px;
  left: 25px;
  top: 27px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
}

.clock-icon {
  color: #f97316;
  background: #fff0e8;
}

.clock-icon::before {
  width: 22px;
  height: 22px;
  left: 10px;
  top: 10px;
  border: 3px solid currentColor;
  border-radius: 50%;
}

.clock-icon::after {
  width: 10px;
  height: 8px;
  left: 22px;
  top: 17px;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
}

.check-icon {
  color: #16a34a;
  background: #e8fbef;
}

.check-icon::before {
  width: 22px;
  height: 22px;
  left: 10px;
  top: 10px;
  border: 3px solid currentColor;
  border-radius: 50%;
}

.check-icon::after {
  width: 14px;
  height: 8px;
  left: 16px;
  top: 18px;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(-45deg);
}

.service-request-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.service-request-advanced-filters {
  border-top: 1px solid var(--line-soft);
  background: #fbfdff;
}

.service-request-advanced-filters summary {
  padding: 14px 24px;
  color: var(--blue);
  cursor: pointer;
  font-weight: 800;
}

.service-request-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 14px;
  padding: 0 24px 22px;
}

.service-request-filters label,
.service-request-form label {
  display: grid;
  gap: 7px;
  color: #172033;
  font-size: 13px;
  font-weight: 700;
}

.service-request-filters input,
.service-request-filters select,
.service-request-form input,
.service-request-form select,
.service-request-form textarea {
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-weight: 400;
}

.service-request-table-wrap {
  overflow-x: auto;
}

.service-request-table-footer {
  display: flex;
  justify-content: center;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--line-soft);
}

.service-requests-table {
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.service-requests-table th,
.service-requests-table td {
  padding: 12px 10px;
  border-top: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
  box-sizing: border-box;
  overflow: hidden;
  overflow-wrap: normal;
  word-break: normal;
}

.service-requests-table th {
  background: var(--panel-soft);
  color: #273244;
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  user-select: none;
}

.service-requests-table td {
  font-size: 13px;
  line-height: 1.35;
}

.service-requests-table th:nth-child(1),
.service-requests-table td:nth-child(1) {
  width: 11%;
}

.service-requests-table th:nth-child(2),
.service-requests-table td:nth-child(2) {
  width: 18%;
}

.service-requests-table th:nth-child(3),
.service-requests-table td:nth-child(3) {
  width: 24%;
}

.service-requests-table th:nth-child(4),
.service-requests-table td:nth-child(4) {
  width: 11%;
}

.service-requests-table th:nth-child(5),
.service-requests-table td:nth-child(5) {
  width: 17%;
}

.service-requests-table th:nth-child(6),
.service-requests-table td:nth-child(6) {
  width: 9%;
}

.service-requests-table th:nth-child(7),
.service-requests-table td:nth-child(7) {
  width: 10%;
}

.service-requests-table th:nth-child(8),
.service-requests-table td:nth-child(8) {
  width: 10%;
}

.service-requests-table th:nth-child(9),
.service-requests-table td:nth-child(9),
.service-requests-table th:nth-child(10),
.service-requests-table td:nth-child(10) {
  width: 7%;
}

.service-requests-table th:nth-child(11),
.service-requests-table td:nth-child(11) {
  width: 8%;
}

.service-requests-table .compact-date {
  white-space: nowrap;
}

.resizable-th-content {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  height: 100%;
}

.column-resizer {
  position: absolute;
  top: -12px;
  right: -10px;
  z-index: 20;
  width: 10px;
  height: calc(100% + 24px);
  cursor: col-resize;
}

.column-resizer:hover {
  background: rgba(0, 91, 215, 0.16);
}

.service-requests-table .compact-date small {
  color: var(--muted);
  font-size: 11px;
}

.service-request-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 5px;
}

.service-request-code {
  color: inherit;
  font-size: inherit;
  font-weight: 700;
  padding: 0;
  line-height: 1.25;
  text-align: left;
}

.service-request-responsible {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  min-width: 0;
}

.service-request-responsible-name {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

.service-request-start-button {
  min-height: 30px;
  padding: 6px 8px;
  min-width: 124px;
  border: 1.5px solid var(--green);
  border-radius: 8px;
  background: #ecfff6;
  color: var(--green);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  text-align: center;
}

.service-request-start-button:hover {
  background: var(--green);
  color: #fff;
}

.service-request-actions .ghost-link {
  font-size: 12px;
}

.service-request-actions .danger-action {
  color: #dc2626;
}

.service-request-actions .danger-action:hover {
  color: #991b1b;
}

.request-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e7f0ff;
  color: var(--blue);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  line-height: 1.15;
  white-space: normal;
}

.request-badge.priority-critical,
.request-badge.status-cancelled,
.request-badge.status-not_applicable {
  background: #ffe1df;
  color: #b42318;
}

.request-badge.priority-high,
.request-badge.status-waiting_customer {
  background: #fff2c7;
  color: #945f00;
}

.request-badge.status-completed {
  background: #d8f8e8;
  color: #027a48;
}

.request-badge.status-in_service,
.request-badge.status-analysis,
.request-badge.status-development,
.request-badge.status-testing {
  background: #e4efff;
  color: #0759c7;
}

.service-request-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px 18px;
  padding: 24px;
}

.service-request-form .full-field,
.module-checkboxes.full-field {
  grid-column: 1 / -1;
}

.service-client-search {
  position: relative;
}

.module-checkboxes {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.module-checkboxes legend {
  padding: 0 6px;
  color: #172033;
  font-size: 13px;
  font-weight: 700;
}

.module-checkboxes label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.module-checkboxes input {
  width: 16px;
  min-height: auto;
  accent-color: var(--blue);
}

.service-request-detail-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
  padding: 0 24px 24px;
}

.service-request-sidebar {
  display: grid;
  align-content: start;
  gap: 12px;
}

.service-request-sidebar > div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-soft);
}

.service-request-sidebar small {
  color: var(--muted);
  text-transform: uppercase;
}

.service-request-treatment-form {
  padding: 0;
}

.service-request-history-card {
  margin: 0 24px 24px;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.service-request-history-card h3 {
  margin: 0 0 16px;
}

.service-request-history {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
}

.service-request-history li {
  padding-left: 6px;
  line-height: 1.45;
}

.service-request-history small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .service-request-filters {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .service-request-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .service-request-filters,
  .service-request-form,
  .module-checkboxes {
    grid-template-columns: 1fr;
  }

  .service-request-filters,
  .service-request-form,
  .service-request-detail-grid,
  .service-request-history-card {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.proposal-builder-form {
  display: grid;
  gap: 18px;
}

.proposal-template-panel {
  display: grid;
  gap: 22px;
  padding: 28px;
}

.proposal-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
}

.proposal-template-card {
  display: grid;
  justify-items: start;
  gap: 12px;
  min-height: 156px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.proposal-template-card:hover,
.proposal-template-card:focus-visible {
  border-color: var(--blue);
  background: #eef5ff;
  outline: none;
  box-shadow: 0 14px 26px rgba(8, 91, 197, 0.1);
}

.proposal-template-card span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 22px;
  font-weight: 800;
}

.proposal-template-card strong,
.proposal-template-card small {
  display: block;
}

.proposal-template-card strong {
  font-size: 20px;
}

.proposal-template-card small {
  color: var(--muted);
  line-height: 1.35;
}

@media (max-width: 980px) {
  .proposal-template-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 640px) {
  .proposal-template-grid {
    grid-template-columns: 1fr;
  }
}

.proposal-builder-actions {
  flex-wrap: wrap;
}

.proposal-builder-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.proposal-send-status {
  min-height: 20px;
  margin: -13px 0 16px;
  color: var(--red);
}

.proposal-send-status[data-state="success"] {
  color: var(--green);
}

.proposal-builder-section {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.proposal-builder-section h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.proposal-manual-help {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.contract-client-picker-card p {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.contract-address-fields {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 140px;
  gap: 14px 18px;
}

.proposal-builder-grid,
.proposal-modules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px 18px;
}

.proposal-builder-form label {
  display: grid;
  gap: 7px;
  color: #172033;
  font-size: 13px;
  font-weight: 700;
}

.proposal-builder-form input,
.proposal-builder-form select,
.proposal-builder-form textarea {
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-weight: 400;
}

.proposal-builder-form textarea {
  min-height: 80px;
  resize: vertical;
}

.proposal-module-option {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px !important;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.proposal-module-option:has(input:checked) {
  border-color: var(--blue);
  background: #eef6ff;
}

.proposal-module-option input {
  min-height: auto;
}

.proposal-module-option span,
.proposal-module-option small {
  display: block;
}

.proposal-module-option small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 400;
}

.proposal-values-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.proposal-values-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  border-radius: 7px;
  background: #f4f2ea;
}

.proposal-values-summary small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.proposal-values-summary strong {
  font-size: 20px;
  text-align: right;
}

.proposal-values-summary strong small {
  color: #b42318;
  font-size: 12px;
  font-weight: 600;
}

.proposal-modal[hidden] {
  display: none;
}

.proposal-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  overflow: auto;
  padding: 28px;
  background: rgba(7, 20, 42, .72);
}

.proposal-modal-card {
  display: grid;
  gap: 22px;
  max-width: 980px;
  margin: 0 auto;
}

.proposal-modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(7, 20, 42, .18);
}

.proposal-modal-header h2,
.proposal-modal-header p {
  margin: 0;
}

.proposal-modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.proposal-pages {
  display: grid;
  justify-content: center;
  gap: 24px;
}

.proposal-pages.is-generating-pdf .proposal-a4-page {
  width: 794px;
  height: 1123px;
}

.proposal-pdf-capture {
  position: fixed;
  top: 0;
  left: -10000px;
  z-index: -1;
  display: grid;
  width: 794px;
  pointer-events: none;
}

.proposal-a4-page {
  position: relative;
  width: min(100%, 794px);
  aspect-ratio: 210 / 297;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .35);
}

.contract-a4-page {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 16mm 20mm 12mm;
  color: #000;
  background: #fff;
  font-family: "Times New Roman", Times, serif;
}

.word-contract-page main {
  flex: 1;
}

.contract-title-block {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  text-align: center;
}

.contract-title-block h2,
.contract-title-block h3 {
  margin: 0;
  color: #000;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.contract-title-block h2 {
  font-size: 17px;
}

.contract-title-block h3 {
  font-size: 15px;
}

.contract-a4-page h2 {
  color: #000;
}

.contract-clause {
  margin-top: 9px;
}

.contract-clause h3 {
  margin: 0 0 4px;
  color: #000;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  text-transform: uppercase;
}

.contract-a4-page p {
  margin: 0 0 4px;
  font-size: 13.6px;
  line-height: 1.32;
  text-align: justify;
}

.contract-a4-page footer {
  color: #000;
  font-size: 10px;
  text-align: center;
}

.contract-signatures {
  margin-top: 28px;
}

.contract-signatures > p {
  margin-bottom: 52px;
  text-align: center;
}

.contract-signatures > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 38px;
}

.contract-signatures span {
  display: grid;
  gap: 5px;
  text-align: center;
}

.contract-signatures i {
  display: block;
  border-top: 1px solid #000;
}

.contract-signatures small {
  color: #000;
  font-size: 9.5px;
  line-height: 1.35;
}

.proposal-html-page {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 58px 56px 42px;
  color: #fff;
  background: linear-gradient(150deg, #05204f, #0063b7);
}

.proposal-cover-page {
  color: #fff;
  background: linear-gradient(150deg, #05204f, #0063b7);
}

.proposal-company-page {
  color: #fff;
  background: linear-gradient(150deg, #05204f, #0063b7);
}

.proposal-company-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.proposal-company-top h2,
.proposal-company-top p {
  margin: 0;
}

.proposal-company-top h2 {
  font-size: 42px;
  line-height: 1.05;
}

.proposal-company-top p {
  margin-top: 8px;
  color: #80d9ff;
  font-size: 23px;
  font-weight: 700;
}

.proposal-company-top img {
  width: 112px;
  max-height: 96px;
  object-fit: contain;
  object-position: right center;
}

.proposal-company-layout {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 30px;
  margin-top: 42px;
}

.proposal-company-about {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.proposal-company-rule {
  width: 86px;
  height: 3px;
  margin-bottom: 18px;
  background: #69d5ff;
}

.proposal-company-about p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, .92);
  font-size: 15px;
  line-height: 1.52;
}

.proposal-company-about strong {
  max-width: 250px;
  color: #80d9ff;
  font-size: 18px;
  line-height: 1.35;
}

.proposal-company-devices {
  width: calc(100% + 32px);
  height: 230px;
  margin: 38px 0 0 -32px;
  border-radius: 6px;
  object-fit: cover;
  object-position: center;
}

.proposal-company-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.proposal-company-benefits {
  display: grid;
  gap: 12px;
}

.proposal-company-benefit {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 78px;
  padding: 14px;
  border: 1px solid rgba(105, 213, 255, .62);
  border-radius: 7px;
  background: rgba(2, 35, 88, .48);
}

.proposal-company-benefit-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 2px solid #69d5ff;
  border-radius: 50%;
  color: #fff;
  background: #0878d1;
  font-family: Arial, sans-serif;
  font-size: 27px;
  font-weight: 700;
}

.proposal-company-benefit h3,
.proposal-company-benefit p {
  margin: 0;
}

.proposal-company-benefit h3 {
  color: #80d9ff;
  font-size: 14px;
  text-transform: uppercase;
}

.proposal-company-benefit p {
  margin-top: 4px;
  color: rgba(255, 255, 255, .92);
  font-size: 13px;
  line-height: 1.36;
}

.proposal-company-contact {
  margin-top: 26px;
}

.proposal-company-contact h3 {
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #69d5ff;
  font-size: 22px;
  text-transform: uppercase;
}

.proposal-company-contact dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.proposal-company-contact dl div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(105, 213, 255, .45);
  font-size: 13px;
  line-height: 1.35;
}

.proposal-company-contact dt {
  color: #80d9ff;
  font-weight: 700;
}

.proposal-company-contact dd {
  margin: 0;
  color: rgba(255, 255, 255, .96);
}

.proposal-html-brand {
  display: grid;
  gap: 2px;
  align-content: start;
}

.proposal-html-brand img {
  width: 158px;
  max-height: 132px;
  object-fit: contain;
  object-position: left center;
}

.proposal-cover-copy {
  display: grid;
  gap: 14px;
  margin-top: 58px;
}

.proposal-cover-copy p,
.proposal-cover-copy h2 {
  margin: 0;
}

.proposal-cover-copy p {
  color: #80d9ff;
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
}

.proposal-cover-copy h2 {
  max-width: 620px;
  font-size: 47px;
  line-height: 1.05;
}

.proposal-cover-copy span {
  max-width: 590px;
  font-size: 18px;
  line-height: 1.45;
}

.proposal-cover-devices {
  display: block;
  width: 100%;
  max-height: 340px;
  margin: 22px 0 16px;
  border-radius: 7px;
  object-fit: cover;
  object-position: center;
}

.proposal-cover-data {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: auto 0 18px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 8px;
  background: rgba(2, 28, 78, .5);
}

.proposal-cover-data div:last-child {
  grid-column: 1 / -1;
}

.proposal-cover-data dt {
  margin-bottom: 5px;
  color: #80d9ff;
  font-size: 12px;
  text-transform: uppercase;
}

.proposal-cover-data dd {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.proposal-html-page footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid currentColor;
  font-size: 13px;
  opacity: .8;
}

.proposal-html-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid #69d5ff;
  color: #80d9ff;
}

.proposal-html-header img {
  width: 84px;
  max-height: 72px;
  object-fit: contain;
  object-position: left center;
}

.proposal-html-header strong {
  font-size: 16px;
  text-transform: uppercase;
}

.proposal-document-section {
  margin-top: 34px;
}

.proposal-document-section h2 {
  margin: 8px 0 18px;
  color: #fff;
  font-size: 28px;
}

.proposal-document-eyebrow {
  margin: 0;
  color: #80d9ff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.proposal-modules-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.proposal-modules-list li {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 6px;
}

.proposal-module-card.is-included {
  border: 1px solid #75b6ed;
  background: #eef7ff;
  color: #10203c;
}

.proposal-module-card.is-not-included {
  border: 1px solid #dedede;
  background: #fafafa;
  color: #919191;
}

.proposal-module-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: transparent;
}

.proposal-module-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.proposal-module-card.is-not-included .proposal-module-icon {
  filter: grayscale(1);
  opacity: .62;
}

.proposal-module-card strong,
.proposal-module-card small,
.proposal-module-card em {
  display: block;
}

.proposal-module-card small {
  margin-top: 3px;
  color: inherit;
  font-size: 12px;
}

.proposal-module-card em {
  margin-top: 6px;
  color: #008357;
  font-size: 12px;
}

.proposal-module-card.is-not-included em {
  color: #8b8b8b;
}

.proposal-price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.proposal-price-grid div {
  display: grid;
  gap: 6px;
  padding: 15px;
  border: 1px solid rgba(105, 213, 255, .62);
  border-radius: 6px;
  background: rgba(2, 35, 88, .48);
}

.proposal-implementation-intro {
  max-width: 680px;
  margin: -5px 0 26px;
  color: rgba(255, 255, 255, .9);
  font-size: 16px;
  line-height: 1.45;
}

.proposal-implementation-timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}

.proposal-implementation-step {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  padding: 0 8px;
  text-align: center;
}

.proposal-implementation-step::before {
  position: absolute;
  top: 17px;
  left: 0;
  width: 100%;
  height: 3px;
  background: #75b6ed;
  content: "";
}

.proposal-implementation-step:first-child::before {
  left: 50%;
  width: 50%;
}

.proposal-implementation-step:last-child::before {
  width: 50%;
}

.proposal-implementation-step strong {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 3px solid #75b6ed;
  border-radius: 50%;
  color: #fff;
  background: #075eb5;
  font-size: 18px;
}

.proposal-implementation-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 15px 0 11px;
  border: 2px solid #75b6ed;
  border-radius: 50%;
  color: #fff;
  background: rgba(2, 35, 88, .48);
  font-family: Arial, sans-serif;
  font-size: 31px;
  line-height: 1;
}

.proposal-implementation-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: #8be7ff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(91, 209, 255, .35));
}

.proposal-implementation-step h3 {
  min-height: 38px;
  margin: 0 0 7px;
  color: #fff;
  font-size: 14px;
  line-height: 1.28;
}

.proposal-implementation-step p {
  margin: 0;
  color: rgba(255, 255, 255, .84);
  font-size: 12px;
  line-height: 1.4;
}

.proposal-price-grid span {
  color: #80d9ff;
  font-size: 13px;
}

.proposal-price-grid strong {
  font-size: 18px;
}

.proposal-document-note {
  margin-top: auto;
  padding: 18px;
  border-left: 4px solid #69d5ff;
  background: rgba(2, 35, 88, .48);
  line-height: 1.55;
}

.proposal-acceptance {
  margin-top: auto;
}

.proposal-acceptance div {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 10px;
  align-items: end;
  margin-top: 20px;
}

.proposal-acceptance i {
  display: block;
  min-height: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .72);
}

.client-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 28px;
  margin-bottom: 32px;
}

.inline-client-form-card {
  width: min(100%, 1240px);
  max-width: 1240px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

.inline-client-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 30px;
  padding: 34px;
}

.inline-client-form label {
  gap: 10px;
}

.inline-client-form input,
.inline-client-form select,
.inline-client-form textarea {
  min-height: 56px;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .08);
}

.inline-client-form .form-status {
  margin: 0;
}

.inline-client-form .modal-actions {
  margin: 8px -34px -34px;
  padding: 24px 34px;
  border-top: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .96);
}

#screen-clients:has(#inlineClientFormCard:not([hidden])) .page-heading {
  width: min(100%, 1240px);
  max-width: 1240px;
  margin-inline: auto;
}

.screen.is-visible#screen-clients:has(#inlineClientFormCard:not([hidden])) {
  display: grid;
  justify-items: center;
}

#screen-clients:has(#inlineClientFormCard:not([hidden])) > .page-heading,
#screen-clients:has(#inlineClientFormCard:not([hidden])) > .inline-client-form-card {
  justify-self: center;
}

#screen-clients:has(#inlineClientFormCard:not([hidden])) > .clients-table-card {
  width: 100%;
  justify-self: stretch;
}

.client-stat {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 132px;
  padding: 28px;
}

.client-stat strong {
  display: block;
  margin: 6px 0;
  font-size: 36px;
}

@media (max-width: 1180px) {
  .inline-client-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clients-agenda-view {
    grid-template-columns: 1fr;
  }

  .clients-agenda-sidebar {
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  }
}

.clients-table-card {
  overflow: hidden;
}

.clients-table-card .table-wrap {
  overflow-x: hidden;
}

.clients-agenda-view {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.clients-agenda-view[hidden] {
  display: none;
}

.clients-agenda-sidebar {
  display: grid;
  gap: 14px;
}

.clients-agenda-create {
  justify-content: center;
  width: 100%;
  min-height: 56px;
  box-shadow: var(--shadow-sm);
}

.clients-mini-calendar-card,
.clients-agenda-filters-card {
  padding: 18px;
}

.clients-mini-calendar-header,
.clients-agenda-toolbar,
.clients-agenda-titlebar,
.clients-agenda-tools {
  display: flex;
  align-items: center;
}

.clients-mini-calendar-header {
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.clients-mini-calendar-header strong {
  font-size: 16px;
}

.clients-mini-calendar-weekdays,
.clients-mini-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  text-align: center;
}

.clients-mini-calendar-weekdays {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.clients-mini-calendar-day {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.clients-mini-calendar-day.is-outside {
  color: #a3adba;
}

.clients-mini-calendar-day.is-today {
  background: #dbeafe;
  color: var(--blue);
  font-weight: 800;
}

.clients-mini-calendar-day.is-selected {
  background: var(--blue);
  color: #fff;
}

.clients-agenda-filters-card {
  display: grid;
  gap: 12px;
}

.clients-agenda-filters-card h2 {
  margin: 0;
  font-size: 18px;
}

.clients-agenda-filters-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.clients-agenda-filters-card input,
.clients-agenda-filters-card select,
.clients-agenda-search input,
#clientsAgendaViewMode {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.clients-agenda-main {
  overflow: hidden;
}

.clients-agenda-toolbar {
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.clients-agenda-titlebar {
  min-width: 0;
  gap: 8px;
}

.clients-agenda-titlebar h2 {
  margin: 0 0 0 8px;
  font-size: 26px;
  text-transform: capitalize;
}

.clients-agenda-tools {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.clients-agenda-search {
  display: flex;
  align-items: center;
  min-width: min(280px, 42vw);
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.clients-agenda-search input {
  min-height: 40px;
  padding-inline: 8px;
  border: 0;
  background: transparent;
}

.clients-agenda-search input:focus,
.clients-agenda-filters-card input:focus,
.clients-agenda-filters-card select:focus,
#clientsAgendaViewMode:focus {
  outline: 2px solid rgba(0, 88, 190, .18);
}

#clientsAgendaViewMode {
  width: auto;
  min-width: 118px;
}

.clients-agenda-weekdays,
.clients-agenda-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.clients-agenda-weekdays {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.clients-agenda-weekdays span {
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.clients-agenda-day {
  min-height: 132px;
  padding: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.clients-agenda-day:nth-child(7n) {
  border-right: 0;
}

.clients-agenda-day.is-outside {
  background: #f8fafc;
}

.clients-agenda-day.is-selected {
  box-shadow: inset 0 0 0 2px rgba(0, 88, 190, .25);
}

.clients-agenda-day-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.clients-agenda-day.is-today .clients-agenda-day-number {
  background: var(--blue);
  color: #fff;
}

.clients-agenda-day ul {
  display: grid;
  gap: 5px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.clients-agenda-event {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  width: 100%;
  min-height: 26px;
  padding: 5px 6px;
  border: 0;
  border-left: 3px solid currentColor;
  border-radius: 6px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.clients-agenda-event.technical {
  color: #075eb5;
  background: #e8f2ff;
}

.clients-agenda-event.commercial {
  color: #08775a;
  background: #e8f8f1;
}

.clients-agenda-event.overdue {
  color: #b91c1c;
  background: #fee2e2;
}

.clients-agenda-event.cancelled {
  opacity: .6;
  text-decoration: line-through;
}

.clients-agenda-event time {
  font-weight: 800;
}

.clients-agenda-event span {
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clients-agenda-day small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.client-management-search {
  display: grid;
  min-width: min(360px, 48vw);
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.client-management-search input {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.client-management-search input:focus {
  outline: 2px solid rgba(0, 88, 190, .18);
  border-color: var(--secondary);
}

.clients-table {
  min-width: 0;
  table-layout: fixed;
}

.clients-table th,
.clients-table td {
  height: auto;
  padding: 18px 14px;
  font-size: 15px;
  line-height: 1.32;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.clients-table th {
  font-size: 11px;
}

.clients-table th:nth-child(1),
.clients-table td:nth-child(1) {
  width: 20%;
}

.clients-table th:nth-child(2),
.clients-table td:nth-child(2) {
  width: 10%;
}

.clients-table th:nth-child(3),
.clients-table td:nth-child(3) {
  width: 13%;
}

.clients-table th:nth-child(4),
.clients-table td:nth-child(4) {
  width: 10%;
}

.clients-table th:nth-child(5),
.clients-table td:nth-child(5) {
  width: 10%;
}

.clients-table th:nth-child(6),
.clients-table td:nth-child(6) {
  width: 10%;
}

.clients-table th:nth-child(7),
.clients-table td:nth-child(7) {
  width: 17%;
}

.clients-table th:nth-child(8),
.clients-table td:nth-child(8) {
  width: 10%;
}

.clients-table td strong,
.clients-table td small {
  display: block;
}

.clients-table td strong {
  font-size: 16px;
  line-height: 1.25;
}

.clients-table td small {
  max-width: none;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.32;
}

.clients-table td:nth-child(8) {
  padding-right: 10px;
}

.clients-table td:nth-child(8) .ghost-link {
  display: block;
  width: fit-content;
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.2;
}

.clients-table tbody tr,
.commercial-client-card,
.process-table tbody tr {
  cursor: pointer;
}

.client-detail-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.client-profile-panel {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 18px;
  padding: 26px;
}

.client-profile-panel h1 {
  margin: 0;
  font-size: 24px;
  text-align: center;
}

.client-profile-panel > strong {
  color: var(--muted);
  text-align: center;
}

.client-photo-placeholder {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.client-photo-placeholder .icon,
.client-default-avatar {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border: 2px solid var(--line);
  border-radius: 999px;
  color: #9aa6b7;
}

.client-default-avatar {
  border: 0;
  background: linear-gradient(135deg, #0f5fc7, #23a6f2);
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 16px 34px rgba(15, 95, 199, 0.24);
}

.client-data-section {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.client-data-section h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.client-data-section dl {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px 12px;
  margin: 0;
}

.client-data-section dt {
  color: var(--muted);
  font-size: 13px;
}

.client-data-section dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 600;
}

.client-activity-panel {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.client-detail-tabs {
  order: 0;
  display: flex;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line);
}

.client-detail-tabs button {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #4c5565;
  white-space: nowrap;
  font-weight: 700;
}

.client-detail-tabs button.is-active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.interaction-card {
  order: 2;
  display: grid;
  gap: 14px;
  padding: 20px;
}

.interaction-card[hidden],
.client-detail-metrics[hidden] {
  display: none;
}

.interaction-tabs,
.interaction-actions,
.interaction-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.interaction-tabs button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: #4b5564;
}

.interaction-tabs button.is-active {
  color: var(--blue);
  font-weight: 700;
}

.interaction-actions {
  color: #667386;
}

.interaction-card > textarea:not(#clientInteractionNote) {
  display: none;
}

.interaction-card textarea {
  min-height: 86px;
  resize: vertical;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.interaction-footer {
  justify-content: space-between;
}

.client-detail-metrics {
  order: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 18px;
}

.client-detail-metrics.client-process-context {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.client-process-context-heading,
.client-process-context-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.client-process-context h2,
.client-process-context p {
  margin: 0;
}

.client-process-context h2 {
  margin-top: 6px;
  font-size: 26px;
}

.client-process-context p {
  max-width: 760px;
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.45;
}

.client-process-progress {
  display: grid;
  grid-template-columns: repeat(6, minmax(94px, 1fr));
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.client-process-progress span {
  min-width: 94px;
  padding: 11px 8px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  background: #f6f8fb;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.client-process-progress span:last-child {
  border-right: 0;
}

.client-process-progress .is-complete {
  color: #08775a;
  background: #e8f8f1;
}

.client-process-progress .is-current {
  color: #fff;
  background: var(--blue);
}

.client-process-context-footer strong,
.client-process-context-footer small {
  display: block;
}

.client-process-context-footer small {
  max-width: 680px;
  margin-top: 6px;
  color: var(--muted);
}

.client-process-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.process-stage-action-button {
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.process-stage-primary-action {
  border-color: #b8c7dc;
  background: #fff;
  color: var(--ink);
}

.process-stage-primary-action:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.process-stage-advance-action {
  border-color: #cad5e4;
  background: #fff;
  color: #334155;
}

.process-stage-advance-action:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: #f7fbff;
}

@media (max-width: 860px) {
  .client-process-context-heading,
  .client-process-context-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-process-actions {
    justify-content: flex-start;
  }

  .process-stage-action-button {
    width: 100%;
  }
}

.client-timeline-card {
  order: 3;
  padding: 24px;
}

.client-rdv-card,
.client-proposals-card,
.client-contracts-card,
.client-contacts-card,
.client-demands-card,
.client-attachments-card {
  order: 3;
  overflow: hidden;
}

.client-rdv-card .card-header,
.client-proposals-card .card-header,
.client-contracts-card .card-header,
.client-contacts-card .card-header,
.client-demands-card .card-header,
.client-attachments-card .card-header {
  padding: 22px 24px;
}

.client-rdv-card h2,
.client-proposals-card h2,
.client-contracts-card h2,
.client-contacts-card h2,
.client-demands-card h2,
.client-attachments-card h2 {
  margin: 5px 0 0;
}

.client-rdv-table,
.client-proposals-table,
.client-contracts-table,
.client-contacts-table,
.client-demands-table,
.client-attachments-table {
  min-width: 760px;
}

.client-rdv-table td,
.client-proposals-table td,
.client-contracts-table td,
.client-contacts-table td,
.client-demands-table td,
.client-attachments-table td {
  height: 72px;
}

.client-rdv-table td strong,
.client-rdv-table td small,
.client-proposals-table td strong,
.client-proposals-table td small,
.client-contracts-table td strong,
.client-contracts-table td small,
.client-contacts-table td strong,
.client-contacts-table td small,
.client-demands-table td strong,
.client-demands-table td small,
.client-attachments-table td strong,
.client-attachments-table td small {
  display: block;
}

.client-rdv-table td small,
.client-proposals-table td small,
.client-contracts-table td small,
.client-contacts-table td small,
.client-demands-table td small,
.client-attachments-table td small {
  margin-top: 4px;
  color: var(--muted);
}

.client-contacts-card .card-header {
  padding: 16px 20px;
}

.client-new-contact-button {
  min-height: 34px;
  padding: 0 14px;
  font-size: 12px;
  white-space: nowrap;
}

.client-contacts-card .eyebrow {
  font-size: 12px;
}

.client-contacts-card h2 {
  font-size: 22px;
}

.client-contacts-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.client-contacts-table th,
.client-contacts-table td {
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.2;
  vertical-align: middle;
}

.client-contacts-table th {
  font-size: 11px;
}

.client-contacts-table td {
  height: 54px;
}

.client-contacts-table td strong {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.client-contacts-table th:nth-child(1),
.client-contacts-table td:nth-child(1) {
  width: 21%;
}

.client-contacts-table th:nth-child(2),
.client-contacts-table td:nth-child(2) {
  width: 15%;
}

.client-contacts-table th:nth-child(3),
.client-contacts-table td:nth-child(3) {
  width: 24%;
}

.client-contacts-table th:nth-child(4),
.client-contacts-table td:nth-child(4) {
  width: 16%;
}

.client-contacts-table th:nth-child(5),
.client-contacts-table td:nth-child(5) {
  width: 10%;
}

.client-contacts-table th:nth-child(6),
.client-contacts-table td:nth-child(6) {
  width: 14%;
  text-align: right;
}

.client-contacts-table td:nth-child(3),
.client-contacts-table td:nth-child(4) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-contacts-table .pill {
  padding: 4px 8px;
  font-size: 9px;
  white-space: nowrap;
}

.client-contacts-table .ghost-link {
  min-height: 28px;
  padding: 0;
  font-size: 12px;
  white-space: nowrap;
}

.client-row-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.client-row-actions .ghost-link {
  min-height: 28px;
  padding: 0;
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
}

.client-row-actions .danger-action,
.commercial-demand-actions .ghost-link.danger-action {
  color: var(--red);
}

.client-rdv-table th:last-child,
.client-rdv-table td:last-child,
.client-demands-table th:last-child,
.client-demands-table td:last-child {
  text-align: right;
}

.client-rdv-table td:last-child .client-row-actions {
  justify-content: flex-end;
}

.client-contact-name-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.client-contact-avatar {
  display: inline-grid;
  flex: 0 0 30px;
  place-items: center;
  overflow: hidden;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e0edff;
  color: #155bc7;
  font-size: 11px;
  font-weight: 900;
}

.empty-table-message {
  margin: 0;
  padding: 16px 0;
  color: var(--muted);
  text-align: center;
}

.client-timeline {
  display: grid;
  gap: 18px;
  margin: 0;
  padding-left: 28px;
  border-left: 2px solid var(--line);
}

.client-timeline li {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.client-timeline li::before {
  content: "";
  position: absolute;
  left: -38px;
  top: 18px;
  width: 18px;
  height: 18px;
  border: 4px solid #dce6f4;
  border-radius: 999px;
  background: var(--blue);
}

.client-timeline span {
  color: #303848;
}

.client-timeline small {
  color: var(--muted);
}

.sales-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 316px;
  gap: 32px;
  margin-bottom: 32px;
}

.opportunities-card .card-header {
  padding: 24px 28px;
}

.opportunities-table {
  min-width: 720px;
}

.opportunities-table td {
  height: 84px;
}

.pill.solid {
  background: var(--blue);
  color: #fff;
}

.probability {
  display: inline-block;
  width: 52px;
  height: 6px;
  margin-right: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe3ea;
  vertical-align: middle;
}

.probability i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.goals-card {
  padding: 28px;
}

.goals-card h2 {
  margin: 0 0 32px;
  font-size: 22px;
}

.goal-row {
  display: grid;
  gap: 12px;
  margin-bottom: 30px;
}

.goal-row div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.goal-row small {
  color: #2f3540;
}

.goal-row strong {
  color: var(--blue);
  font-size: 12px;
  text-transform: uppercase;
}

.goal-bar {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe0e7;
}

.goal-bar span {
  display: block;
  height: 100%;
  background: var(--blue);
}

.forecast-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.opportunities-table td:last-child {
  white-space: nowrap;
}

.opportunities-table td:last-child .ghost-link + .ghost-link {
  margin-left: 10px;
  color: var(--red);
}

.commercial-demands-card {
  overflow: hidden;
}

.commercial-demands-card .card-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.commercial-demands-table {
  min-width: 980px;
}

.commercial-demands-table td strong,
.commercial-demands-table td small {
  display: block;
}

.commercial-demands-table td small {
  margin-top: 4px;
  color: var(--muted);
}

.demand-report-modal-card {
  width: min(880px, 100%);
}

.demand-report {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
}

.demand-report-document {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 18px;
  padding: 24px;
}

.demand-report-document header {
  border-bottom: 2px solid var(--primary);
  padding-bottom: 14px;
}

.demand-report-document header span {
  color: var(--primary);
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.demand-report-document header strong {
  display: block;
  font-size: 26px;
  margin-top: 8px;
}

.demand-report-document header small {
  color: var(--muted);
  display: block;
  margin-top: 6px;
}

.demand-report-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.demand-report-summary div,
.demand-report-document dl div {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}

.demand-report-summary small,
.demand-report-document dt {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.demand-report-summary strong,
.demand-report-document dd {
  display: block;
  font-size: 15px;
  line-height: 1.45;
  margin: 6px 0 0;
  white-space: pre-wrap;
}

.demand-report-document dl {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.demand-report-document dl div:nth-child(7) {
  grid-column: 1 / -1;
}

.implementation-report-document {
  gap: 22px;
}

.implementation-report-section {
  display: grid;
  gap: 12px;
  padding-top: 6px;
}

.implementation-report-section h3 {
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
}

.implementation-report-section p {
  margin: 0;
  color: var(--muted);
}

.implementation-report-section dl {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.implementation-report-section dl div {
  break-inside: avoid;
}

.commercial-demand-client-search {
  position: relative;
}

.client-search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
}

.client-search-results[hidden] {
  display: none;
}

.client-search-results button {
  justify-content: flex-start;
  min-height: auto;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.client-search-results button:last-child {
  border-bottom: 0;
}

.client-search-results button:not(:disabled):hover {
  background: #eef5ff;
}

.client-search-results strong,
.client-search-results small {
  display: block;
}

.client-search-results small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.client-search-empty-action {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.client-search-empty-action p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.client-search-empty-action .secondary-button {
  justify-content: center;
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.client-hours-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 24px;
}

.client-hours-grid article {
  display: grid;
  gap: 7px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #f8fafc;
}

.client-hours-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.client-hours-grid label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.client-hours-grid input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.client-hours-grid strong {
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}

.client-hours-grid strong.is-negative {
  color: var(--red);
}

.client-hours-grid small {
  color: var(--muted);
  font-size: 13px;
}

.client-hours-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 0 24px 24px;
}

.client-hours-actions .form-status {
  margin: 0;
}

.contract-stage-notice {
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid #f2b8b5;
  border-left: 5px solid var(--red);
  border-radius: 8px;
  background: #fff7f7;
  color: var(--text);
}

.contract-stage-notice:not([hidden]) {
  display: flex;
}

.contract-stage-notice strong {
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

.contract-stage-notice p,
.contract-stage-notice small {
  display: block;
  margin: 0;
}

.contract-stage-notice p {
  color: #7f1d1d;
  line-height: 1.45;
}

.contract-stage-notice small {
  margin-top: 8px;
  color: var(--muted);
}

.contract-stage-notice > span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 8px 12px;
  text-transform: uppercase;
}

.commercial-demand-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  justify-content: flex-end;
  align-items: center;
}

.commercial-demand-actions .ghost-link {
  font-size: 0.78rem;
  line-height: 1.1;
  white-space: nowrap;
}

.commercial-demand-actions .ghost-link.danger-action {
  color: var(--red);
}

.demand-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e8f0ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.demand-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

.demand-status.closed {
  background: #d7f8e7;
  color: #047857;
}

.demand-status.in-progress {
  background: #fff4d8;
  color: #a16207;
}

.demand-status.cancelled {
  background: #ffe1df;
  color: #b91c1c;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(15, 23, 42, 0.48);
}

.modal-card {
  width: min(760px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

#clientModal .modal-card {
  width: min(940px, calc(100vw - 28px));
}

.client-contact-modal-card {
  width: min(720px, calc(100vw - 28px));
  overflow: hidden;
}

.client-contact-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
  padding: 24px 28px 12px;
}

.client-contact-modal-header {
  align-items: flex-start;
  padding: 26px 30px 22px;
}

.client-contact-modal-header .eyebrow {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.client-contact-modal-header h2 {
  color: #0f172a;
  font-size: 30px;
  line-height: 1.08;
}

.client-contact-modal-header p {
  max-width: 440px;
  margin-top: 8px;
  color: #64748b;
  font-size: 15px;
  line-height: 1.4;
}

.client-contact-form-grid label {
  gap: 8px;
  color: #1e293b;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.client-contact-form-grid label:nth-child(3) {
  grid-column: 1 / -1;
}

.client-contact-form-grid input {
  height: 52px;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-family: inherit;
  font-size: 16px;
}

.client-contact-form-grid input:focus {
  border-color: #2563eb;
  outline: 3px solid rgba(37, 99, 235, 0.14);
}

#clientContactFormStatus {
  min-height: 0;
  margin: 8px 28px 0;
  padding: 0;
  color: #b45309;
  font-size: 14px;
}

#clientContactFormStatus:empty {
  display: none;
}

#clientContactForm .modal-actions {
  margin-top: 20px;
  padding: 18px 28px 0;
  border-top: 1px solid var(--line-soft);
  background: #f8fafc;
}

#clientContactForm .modal-actions button {
  min-width: 180px;
  min-height: 54px;
  border-radius: 10px;
  font-size: 16px;
}

.client-contact-form-grid input:disabled {
  color: #64748b;
  background: #f1f5f9;
  cursor: not-allowed;
}

@media (max-width: 680px) {
  .client-contact-form-grid {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .client-contact-form-grid label:nth-child(3) {
    grid-column: auto;
  }

  .client-contact-modal-header {
    padding: 22px 20px 18px;
  }

  #clientContactForm .modal-actions {
    padding-inline: 20px;
  }

  #clientContactForm .modal-actions button {
    width: 100%;
  }
}

.success-modal-backdrop {
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(8px);
}

.service-request-link-client-card {
  max-width: 760px;
  width: min(760px, calc(100vw - 40px));
}

.service-request-link-client-card label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.service-request-link-client-card input {
  min-height: 52px;
}

.service-request-link-client-results {
  position: static;
  margin-top: 10px;
  max-height: 230px;
  overflow: auto;
}

.service-request-link-client-results button {
  text-align: left;
}

.service-request-link-client-card .conversation-link-submit {
  width: 100%;
  margin-top: 14px;
}

.success-modal-card {
  width: min(440px, calc(100vw - 32px));
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 34px 32px;
  text-align: center;
}

.success-modal-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #dcfce7;
  color: #047857;
  font-size: 28px;
  font-weight: 800;
}

.success-modal-card h2,
.success-modal-card p {
  margin: 0;
}

.success-modal-card p {
  color: var(--muted);
  line-height: 1.5;
}

.delete-confirm-backdrop {
  z-index: 1200;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.delete-confirm-card {
  width: min(430px, calc(100vw - 32px));
  display: grid;
  justify-items: center;
  gap: 20px;
  padding: 34px 32px 30px;
  text-align: center;
}

.delete-confirm-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  font-size: 28px;
  font-weight: 900;
}

.delete-confirm-card h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.delete-confirm-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.delete-confirm-actions button {
  min-width: 112px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.delete-confirm-yes {
  background: #dc2626;
  color: #fff;
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.22);
}

.delete-confirm-no {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 28px;
  border-bottom: 1px solid var(--line-soft);
}

.modal-header h2,
.modal-header p {
  margin: 0;
}

.modal-header p {
  margin-top: 6px;
  color: var(--muted);
}

.modal-header .icon-button {
  font-size: 30px;
}

.opportunity-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 28px;
}

.opportunity-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.opportunity-form input,
.opportunity-form select,
.opportunity-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  color: var(--text);
}

.opportunity-form textarea {
  resize: vertical;
}

.appointment-online-section {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.appointment-online-section legend {
  padding: 0 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.appointment-online-toggle {
  display: inline-flex !important;
  align-items: center;
  gap: 10px !important;
  min-height: 30px;
  font-size: 14px;
  font-weight: 700;
}

.appointment-online-toggle input {
  width: 16px;
  min-height: auto;
  padding: 0;
  accent-color: var(--blue);
}

.appointment-online-grid {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(320px, 1.2fr);
  gap: 12px;
}

.appointment-meeting-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.appointment-meeting-link-row input {
  min-width: 0;
  color: var(--muted);
}

.appointment-meeting-link-row .compact-button {
  min-height: 44px;
  padding: 0 12px;
  white-space: nowrap;
}

.presentation-appointment-card {
  width: min(920px, 100%);
}

.presentation-appointment-card .modal-header {
  padding: 18px 22px;
}

.presentation-appointment-card .modal-header h2 {
  font-size: 26px;
}

.presentation-appointment-card .modal-header p {
  font-size: 16px;
}

.presentation-appointment-form {
  gap: 12px 18px;
  padding: 18px 22px;
}

.presentation-appointment-form label {
  gap: 5px;
  font-size: 15px;
}

.presentation-appointment-form input,
.presentation-appointment-form textarea {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 15px;
}

.presentation-appointment-form textarea {
  min-height: 76px;
}

.presentation-modules-field {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  grid-column: 1 / -1;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.presentation-modules-field legend {
  padding: 0 6px;
  font-size: 15px;
  font-weight: 700;
}

.presentation-modules-field label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.presentation-modules-field input {
  width: 14px;
  min-height: auto;
  padding: 0;
  accent-color: var(--blue);
}

.presentation-appointment-form .modal-actions {
  align-items: center;
}

.full-field,
.form-status,
.modal-actions {
  grid-column: 1 / -1;
}

.form-status {
  min-height: 20px;
  margin: 0;
  color: var(--red);
}

.form-status[data-state="success"] {
  color: var(--green);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
}

.appointment-modal-actions span {
  flex: 1;
}

.danger-button {
  min-height: 54px;
  padding: 0 20px;
  border: 1px solid #ef4444;
  border-radius: 5px;
  color: #b91c1c;
  background: #fff;
}

.process-fields-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.crm-flow-summary {
  display: grid;
  grid-template-columns: 1.35fr .75fr .75fr .9fr 1.15fr;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
}

.crm-flow-summary > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.crm-flow-summary small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.crm-flow-summary strong {
  overflow: hidden;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-summary-badge,
.crm-field-badge {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.crm-summary-badge.current {
  color: #155bc7;
  background: #dbeafe;
}

.crm-summary-badge.next,
.crm-field-badge.is-filled {
  color: #047857;
  background: #dcfce7;
}

.crm-summary-pending,
.crm-field-badge {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  color: #b45309;
  background: #fef3c7;
  font-size: 11px;
  font-weight: 900;
}

.crm-summary-progress {
  display: grid;
  gap: 5px;
}

.crm-summary-progress span {
  color: #0f172a;
  font-size: 12px;
}

.crm-summary-progress div {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: #e2e8f0;
}

.crm-summary-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width .2s ease;
}

.crm-summary-progress em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.process-fields-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.process-fields-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #155bc7;
  background: #dbeafe;
  font-weight: 900;
}

.process-fields-panel h3,
.process-fields-panel h4,
.process-fields-panel p {
  margin: 0;
}

.process-fields-panel p {
  color: var(--muted);
}

.process-fields-panel section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.process-fields-panel h4 {
  grid-column: 1 / -1;
  font-size: 16px;
}

.process-checkbox-group {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fafc;
}

.process-checkbox-group strong {
  color: #172033;
}

.process-checkbox-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.process-checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.process-checkbox-group input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--blue);
}

.crm-flow-field {
  position: relative;
  gap: 7px !important;
  min-height: auto;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.crm-flow-field.is-pending,
.crm-flow-field.field-missing {
  border-color: #f97316;
  background: #fff7ed;
}

.crm-flow-field.is-filled {
  border-color: #bbf7d0;
  background: #fff;
}

.crm-flow-field.is-filled input {
  border-color: #cbd5e1;
}

.crm-flow-field input {
  min-height: 42px;
  padding: 9px 11px;
}

.crm-flow-field:has([data-process-field="financial_responsible_cpf"]) {
  align-self: start;
  min-height: 0;
  padding: 10px 12px;
}

.crm-flow-field:has([data-process-field="financial_responsible_cpf"]) input {
  min-height: 42px;
}

.crm-flow-field .crm-field-badge {
  position: absolute;
  top: 10px;
  right: 12px;
}

.crm-flow-field small,
.crm-plan-field small {
  color: #b45309;
  font-size: 11px;
  font-weight: 700;
}

.crm-flow-field small[hidden],
.crm-plan-field small[hidden] {
  display: none;
}

.crm-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.crm-plan-field > div:last-of-type {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.crm-plan-field label {
  justify-content: flex-start;
  width: 100%;
  min-height: 32px;
  border-radius: 7px;
}

.crm-flow-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #92400e;
  background: #fff7ed;
}

.crm-flow-alert span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: #fff;
  background: #f59e0b;
  font-size: 13px;
  font-weight: 900;
}

.crm-flow-alert p {
  margin: 0;
  line-height: 1.4;
}

.process-other-input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
}

.implementation-checklist-group {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fbff;
}

.implementation-checklist-group h5 {
  margin: 0;
  color: #172033;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.implementation-checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px 16px;
}

.implementation-checklist-grid label {
  margin: 0;
}

.field-missing {
  padding: 8px;
  border: 1px solid var(--red);
  border-radius: 8px;
  background: #fff5f3;
}

.crm-flow-field.field-missing,
.crm-flow-field.is-pending {
  padding: 12px;
  border-color: #f97316;
  background: #fff7ed;
}

#clientForm.is-focused-requirements .process-fields-panel {
  border-color: var(--blue);
  background: #f2f7ff;
}

#clientForm.is-focused-requirements .process-fields-panel section {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.team-activity-card,
.team-timeline {
  display: none !important;
}

.contract-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 28px;
  margin-bottom: 38px;
}

.contract-stat {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 148px;
  padding: 30px;
}

.contract-stat .eyebrow {
  font-size: 15px;
  font-weight: 700;
  text-transform: none;
}

.contract-stat strong {
  display: block;
  margin: 6px 0 8px;
  font-size: 40px;
  line-height: 1;
}

.contract-stat small {
  color: #07142a;
  font-weight: 600;
}

.danger-text {
  color: var(--red) !important;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.stat-icon.blue {
  color: var(--blue);
  background: #dce5ff;
}

.stat-icon.red {
  color: var(--red);
  background: #ffd7d1;
}

.stat-icon.soft {
  color: #12324d;
  background: #d5e7fb;
}

.contracts-table-card {
  margin-bottom: 38px;
}

.contract-filters {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(260px, 420px) 1fr;
  gap: 18px;
  align-items: center;
  padding: 30px;
  border-bottom: 1px solid var(--line);
}

.contracts-filter-note {
  margin: 0;
  color: var(--muted);
}

.contract-filters label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  font-weight: 600;
}

.contract-filters select,
.contract-filters input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.contract-filters input::placeholder {
  color: var(--muted);
}

.filter-button {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #222936;
  font-size: 17px;
}

.contracts-table {
  min-width: 1020px;
}

.contracts-table td {
  height: 112px;
  font-size: 18px;
}

.contracts-table td:first-child strong {
  display: block;
  max-width: 230px;
  font-size: 20px;
  line-height: 1.35;
}

.contracts-table td:first-child small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.contracts-table td:nth-child(2) {
  color: #272d37;
  font-size: 20px;
  line-height: 1.35;
}

.contracts-table .pill {
  min-width: 118px;
  justify-content: flex-start;
}

.pill.waiting {
  max-width: 150px;
  background: #dceaff;
  color: var(--blue);
  white-space: normal;
}

.pill.process-pill {
  background: #e7f0ff;
  color: var(--blue);
}

.process-summary-grid {
  display: none;
}

.process-stat {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 138px;
  padding: 24px;
}

.process-stat strong {
  display: block;
  margin: 6px 0;
  font-size: 34px;
  line-height: 1;
}

.process-stat small {
  display: block;
  color: var(--muted);
}

.process-flow-card {
  padding: 28px;
  margin-bottom: 32px;
}

.process-flow-card .card-header {
  margin-bottom: 24px;
}

.process-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 14px;
}

.process-flow article {
  position: relative;
  min-height: 132px;
  padding: 22px;
  background: #eef3fb;
  border: 1px solid #d5ddea;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%);
}

.process-flow article:first-child {
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
}

.process-flow article.is-complete {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.process-flow small {
  display: block;
  color: inherit;
  font-size: 12px;
  text-transform: uppercase;
}

.process-flow strong {
  display: block;
  margin: 8px 0;
  font-size: 30px;
}

.process-flow span {
  color: inherit;
  font-size: 14px;
}

.process-content-grid {
  display: block;
}

.process-kanban-card {
  grid-column: 1 / -1;
  overflow: hidden;
}

.process-kanban-card .card-header {
  padding: 28px 30px 18px;
}

.process-kanban-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(180px, 1fr));
  gap: 14px;
  padding: 0 30px 30px;
  overflow-x: auto;
}

.kanban-column {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 260px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fb;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.kanban-column.is-drop-target {
  border-color: var(--blue);
  background: #eef5ff;
}

.kanban-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.kanban-column header strong {
  font-size: 13px;
  text-transform: uppercase;
}

.kanban-column header span {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e7f0ff;
  color: var(--blue);
  font-weight: 800;
}

.kanban-column > div {
  display: grid;
  gap: 10px;
}

.kanban-client-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(29, 41, 57, 0.06);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.kanban-client-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(29, 41, 57, 0.1);
}

.kanban-client-card.is-dragging {
  opacity: 0.55;
  transform: scale(0.98);
  cursor: grabbing;
}

.kanban-client-card strong {
  font-size: 15px;
  line-height: 1.25;
}

.kanban-client-card span {
  width: fit-content;
  padding: 3px 9px;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.kanban-client-card small,
.kanban-empty {
  color: var(--muted);
  font-size: 13px;
}

.kanban-card-actions {
  display: flex;
  gap: 10px;
  padding-top: 6px;
}

.kanban-card-actions .ghost-link {
  font-size: 13px;
}

.process-table-card {
  display: none;
}

.process-table {
  min-width: 880px;
}

.process-table td {
  height: 92px;
}

.process-table td strong,
.process-table td small {
  display: block;
}

.process-table td small {
  margin-top: 6px;
  color: var(--muted);
}

.process-checklist-card {
  display: none;
  align-content: start;
  gap: 18px;
  padding: 28px;
}

.process-checklist-card h2 {
  margin: 0 0 6px;
}

.process-checklist-card label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.process-checklist-card input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.process-sla-box {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 18px;
  background: var(--panel);
  border-radius: 6px;
}

.process-sla-box strong {
  font-size: 30px;
}

.process-subflow-card {
  padding: 28px;
}

.process-subflow-card .card-header {
  margin-bottom: 24px;
}

.process-subflow-card .card-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.implementation-clients-list {
  display: grid;
  gap: 22px;
}

.implementation-table-wrap {
  margin-top: 6px;
}

.implementation-clients-table td {
  vertical-align: middle;
}

.implementation-clients-table .primary-button {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
  white-space: nowrap;
}

.table-progress {
  display: grid;
  gap: 6px;
  min-width: 150px;
}

.table-progress strong {
  font-size: 18px;
}

.table-progress .goal-bar {
  height: 7px;
  margin: 0;
}

.table-progress small {
  color: var(--muted);
}

.implementation-editor {
  display: grid;
  gap: 20px;
  margin-top: 28px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.implementation-editor[hidden] {
  display: none;
}

.implementation-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.implementation-editor-header h2,
.implementation-editor-header p {
  margin: 0;
}

.implementation-editor-header h2 {
  margin-top: 12px;
}

.implementation-editor-header p {
  margin-top: 6px;
  color: var(--muted);
}

.implementation-client-heading {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.implementation-client-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.implementation-client-heading strong {
  font-size: 26px;
}

.implementation-editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.implementation-editor-summary {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.implementation-editor-summary .implementation-progress {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.implementation-client-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.implementation-client-card > header,
.implementation-client-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.implementation-client-card h3,
.implementation-client-card p {
  margin: 0;
}

.implementation-client-card p {
  color: var(--muted);
}

.implementation-progress {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: var(--muted);
}

.implementation-progress strong {
  color: var(--text);
  font-size: 30px;
  line-height: 1;
}

.implementation-accordion {
  display: grid;
  gap: 12px;
}

.implementation-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}

.implementation-step[data-blocked="true"] {
  opacity: .58;
}

.implementation-step summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 800;
}

.implementation-step summary small {
  color: var(--blue);
  font-weight: 800;
}

.implementation-step-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
  padding: 0 18px 18px;
}

.implementation-step-fields label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.implementation-step-fields input,
.implementation-step-fields select,
.implementation-step-fields textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  color: var(--text);
}

.implementation-step-fields textarea {
  resize: vertical;
  min-height: 96px;
}

.implementation-field-wide,
.implementation-choice-group {
  grid-column: 1 / -1;
}

.implementation-choice-group {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.implementation-choice-group legend {
  padding: 0 8px;
  font-weight: 800;
}

.implementation-choice-group > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}

.implementation-choice {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--soft);
  font-weight: 700;
}

.implementation-choice input {
  width: auto;
  min-height: auto;
  padding: 0;
}

.contracts-bottom-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 0.9fr);
  gap: 36px;
}

.recent-contracts-card {
  padding: 30px;
}

.recent-contracts-card h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 26px;
  font-size: 24px;
}

.contract-timeline {
  display: grid;
  gap: 28px;
  margin: 0;
  padding-left: 42px;
  border-left: 3px solid #d0d6df;
}

.contract-timeline li {
  position: relative;
  font-size: 16px;
  line-height: 1.45;
}

.contract-timeline li::before {
  content: "\2022";
  position: absolute;
  left: -52px;
  top: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 38px;
  border-radius: 14px;
  background: #8a8f99;
  color: #fff;
}

.contract-timeline li.done::before {
  content: "\2713";
  background: var(--blue);
}

.contract-timeline li.warning::before {
  content: "!";
  background: var(--red);
}

.contract-timeline strong,
.contract-timeline small {
  display: block;
}

.contract-timeline small {
  color: #111827;
}

.efficiency-card {
  min-height: 260px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.45)),
    radial-gradient(circle at 20% 20%, rgba(8, 91, 197, 0.18), transparent 42%);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.14);
  color: #fff;
}

.efficiency-card h2 {
  margin: 0 0 18px;
  color: #fff;
  font-size: 28px;
}

.efficiency-card p {
  max-width: 560px;
  margin: 0 0 96px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.45;
}

.efficiency-card strong {
  color: #dbe8ff;
}

.efficiency-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.efficiency-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #c8d8ff;
}

.efficiency-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.9);
}

.settings-top-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 24px;
  margin-bottom: 24px;
}

.smtp-card,
.pop-card,
.webhook-card,
.integrations-card,
.general-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
}

.smtp-card h2,
.pop-card h2,
.webhook-card h2,
.integrations-card h2,
.general-card h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.settings-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.smtp-test-recipient {
  grid-column: 1 / -1;
}

.smtp-card .toggle-panel,
.pop-card .toggle-panel {
  margin-top: auto;
}

.smtp-card .form-actions,
.pop-card .form-actions {
  margin-top: 20px;
}

.smtp-provider-hint {
  margin: 14px 0 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.smtp-provider-hint strong {
  color: #0f4fb8;
}

.settings-form label,
.general-grid label {
  display: grid;
  gap: 10px;
  color: #101418;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.settings-form input,
.general-grid select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #f0f2f5;
  color: #111;
  font-family: Consolas, monospace;
  font-size: 14px;
}

.toggle-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 40px 0 26px;
  padding: 20px;
  border-radius: 4px;
  background: var(--panel-soft);
}

.toggle-panel strong,
.toggle-panel small {
  display: block;
}

.toggle-panel strong {
  font-size: 18px;
}

.toggle-panel small {
  margin-top: 4px;
  color: #343b47;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 46px;
  height: 24px;
}

.switch input {
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #c7ccd5;
}

.switch span::after {
  content: "";
  position: absolute;
  right: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
}

.switch input:checked + span {
  background: var(--blue);
}

.settings-aside {
  display: grid;
  gap: 24px;
}

.health-panel {
  min-height: 230px;
  padding: 28px;
  border-radius: 6px;
  background: var(--dark);
  color: #fff;
}

.health-panel h2 {
  margin: 14px 0 12px;
}

.health-panel p {
  color: #aeb9cb;
}

.health-panel div {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.health-panel span:not(.icon) {
  padding: 8px 12px;
  border: 1px solid #254d8d;
  border-radius: 3px;
  background: #17346a;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
}

.update-card {
  padding: 26px;
}

.update-card div {
  display: flex;
  gap: 18px;
  margin-top: 24px;
  padding: 20px;
  border-left: 4px solid var(--blue);
  background: var(--panel-soft);
}

.update-card p {
  margin: 0;
}

.update-card p strong {
  display: block;
  margin-bottom: 6px;
}

.webhook-card {
  margin-bottom: 24px;
}

.settings-bottom-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.6fr);
  gap: 24px;
}

.integration-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 16px;
}

.whatsapp-integration-card {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
  padding: 24px;
}

.whatsapp-connection-card {
  margin-bottom: 18px;
}

.whatsapp-flow-card {
  margin-bottom: 24px;
  padding: 24px;
}

.integration-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.integration-card-header h2 {
  margin-bottom: 8px;
}

.integration-card-header p,
.integration-helper-text {
  margin: 0;
  color: #64748b;
}

.whatsapp-connection-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  color: #166534;
  background: #f0fdf4;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.whatsapp-connection-status i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
}

.whatsapp-connection-status.is-disconnected {
  border-color: #fed7aa;
  color: #b45309;
  background: #fff7ed;
}

.whatsapp-connection-status.is-disconnected i {
  background: #f59e0b;
}

.whatsapp-integration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.danger-outline-button {
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
  background: #fff;
  font-weight: 800;
}

.danger-outline-button:hover {
  border-color: #ef4444;
  background: #fef2f2;
}

.danger-outline-button:disabled {
  cursor: progress;
  opacity: .65;
}

.whatsapp-qr-placeholder {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
}

.whatsapp-qr-placeholder[hidden] {
  display: none;
}

.whatsapp-qr-frame {
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  border-radius: 12px;
  color: #0f4fb8;
  background: #eaf2ff;
  font-weight: 900;
  overflow: hidden;
}

.whatsapp-qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.whatsapp-qr-placeholder p {
  margin: 0;
  color: #475569;
}

.whatsapp-flow-form {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
}

.integration-card-header.compact {
  margin-bottom: 0;
}

.integration-card-header.compact h2,
.integration-card-header.compact h3 {
  margin: 0 0 6px;
}

.whatsapp-flow-form textarea {
  width: 100%;
  min-height: 116px;
  resize: vertical;
}

.whatsapp-flow-options-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.whatsapp-flow-options-header strong,
.whatsapp-flow-options-header small {
  display: block;
}

.whatsapp-flow-options-header small {
  margin-top: 4px;
  color: #64748b;
}

.whatsapp-flow-options {
  display: grid;
  gap: 14px;
}

.whatsapp-flow-option-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

.whatsapp-flow-option-grid {
  display: grid;
  grid-template-columns: minmax(120px, .3fr) minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.whatsapp-flow-option-grid label {
  display: grid;
  gap: 8px;
  color: #101418;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.whatsapp-flow-option-grid input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  text-transform: none;
}

.whatsapp-flow-option-grid textarea {
  background: #fff;
}

.whatsapp-flow-remove-option {
  min-height: 44px;
}

.integration-row strong,
.integration-row small {
  display: block;
}

.integration-row small {
  margin-top: 4px;
  color: #353c48;
}

.integration-logo {
  width: 42px;
  height: 42px;
  border-radius: 2px;
}

.integration-logo.google {
  background: linear-gradient(135deg, #e9eef6, #ffffff);
  box-shadow: inset 16px 16px 0 #e5e7eb, inset 26px 18px 0 #4a90e2;
}

.integration-logo.stripe {
  background: linear-gradient(135deg, #082033, #0a5166);
}

.integration-logo.aws {
  background: radial-gradient(circle at 60% 40%, #315b6d, #0d2632 60%);
}

.checkmark {
  margin-left: auto;
  color: var(--green);
  font-size: 28px;
}

.broken-link {
  margin-left: auto;
  color: #1b2029;
  font-size: 28px;
}

.general-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 44px;
}

.retention-box,
.debug-row {
  padding: 18px;
  border-radius: 4px;
  background: var(--panel-soft);
}

.retention-box strong {
  display: block;
  margin-bottom: 16px;
}

.retention-box input {
  width: 70%;
  accent-color: var(--blue);
}

.retention-box span {
  margin-left: 16px;
  font-family: Consolas, monospace;
}

.debug-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.debug-row strong,
.debug-row small {
  display: block;
}

.debug-row small {
  color: var(--muted);
}

.map-panel {
  display: grid;
  place-items: center;
  min-height: 164px;
  margin-top: 32px;
  border-radius: 4px;
  background:
    linear-gradient(rgba(214, 232, 241, 0.5), rgba(214, 232, 241, 0.5)),
    repeating-linear-gradient(165deg, #b9d2dc 0 8px, #d7e7ee 8px 18px);
  color: var(--blue);
  text-transform: uppercase;
}

.map-panel small {
  color: #1f2937;
  letter-spacing: 0;
}

.placeholder-card {
  padding: 32px;
}

.icon {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 24px;
  flex: none;
  color: currentColor;
}

.grid-icon {
  background:
    linear-gradient(currentColor 0 0) 2px 2px / 7px 7px,
    linear-gradient(currentColor 0 0) 15px 2px / 7px 7px,
    linear-gradient(currentColor 0 0) 2px 15px / 7px 7px,
    linear-gradient(currentColor 0 0) 15px 15px / 7px 7px;
  background-repeat: no-repeat;
}

.users-icon::before,
.users-icon::after,
.add-user-icon::before,
.add-user-icon::after {
  content: "";
  position: absolute;
  border: 2px solid currentColor;
}

.users-icon::before {
  left: 3px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 10px 2px 0 -2px currentColor;
}

.users-icon::after {
  left: 1px;
  bottom: 4px;
  width: 17px;
  height: 7px;
  border-radius: 9px 9px 0 0;
}

.gear-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow:
    0 -5px 0 -2px currentColor,
    0 5px 0 -2px currentColor,
    5px 0 0 -2px currentColor,
    -5px 0 0 -2px currentColor;
}

.diamond-icon {
  background:
    linear-gradient(45deg, currentColor 45%, transparent 46%) 2px 8px / 9px 9px,
    linear-gradient(45deg, currentColor 45%, transparent 46%) 13px 8px / 9px 9px,
    linear-gradient(45deg, currentColor 45%, transparent 46%) 8px 2px / 9px 9px,
    linear-gradient(45deg, currentColor 45%, transparent 46%) 8px 14px / 9px 9px;
  background-repeat: no-repeat;
}

.help-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.help-icon::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 17px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor;
}

.exit-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  width: 10px;
  height: 16px;
  border: 2px solid currentColor;
  border-right: 0;
  border-radius: 2px 0 0 2px;
}

.exit-icon::after {
  content: "";
  position: absolute;
  right: 3px;
  top: 10px;
  width: 11px;
  height: 2px;
  background: currentColor;
  box-shadow: 4px -4px 0 -1px currentColor, 4px 4px 0 -1px currentColor;
}

.search-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.search-icon::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 10px;
  height: 2px;
  background: currentColor;
  transform: rotate(45deg);
}

.bell-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  width: 12px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 8px 8px 5px 5px;
}

.bell-icon::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 18px;
  width: 5px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.refresh-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-left-color: transparent;
  border-radius: 50%;
}

.refresh-icon::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 3px;
  border: 5px solid transparent;
  border-left-color: currentColor;
  transform: rotate(-35deg);
}

.download-icon::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 4px;
  width: 2px;
  height: 12px;
  background: currentColor;
}

.download-icon::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 12px;
  width: 12px;
  height: 8px;
  border: 2px solid currentColor;
  border-top: 0;
}
.plus-icon::before { content: "+"; position: absolute; inset: -1px 0 0; display: grid; place-items: center; font-size: 30px; }
.filter-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 5px;
  width: 16px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor;
}

.mail-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  width: 16px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.mail-icon::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.webhook-icon::before,
.webhook-icon::after,
.puzzle-icon::before,
.puzzle-icon::after,
.map-icon::before,
.map-icon::after {
  content: "";
  position: absolute;
}

.webhook-icon::before {
  left: 4px;
  top: 5px;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 50%;
  border-right-color: transparent;
}

.webhook-icon::after {
  right: 3px;
  top: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.puzzle-icon::before {
  left: 5px;
  top: 5px;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.puzzle-icon::after {
  left: 10px;
  top: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 15px 0 currentColor;
}

.map-icon::before {
  left: 4px;
  top: 4px;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.map-icon::after {
  left: 11px;
  top: 6px;
  width: 2px;
  height: 14px;
  background: currentColor;
  box-shadow: -5px 2px 0 -1px currentColor, 5px -2px 0 -1px currentColor;
}
.sliders-icon::before,
.sliders-icon::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 8px 0 currentColor, 0 16px 0 currentColor;
}
.sliders-icon::before { top: 3px; }
.sliders-icon::after {
  top: 1px;
  left: 8px;
  right: auto;
  width: 4px;
  height: 4px;
  border: 2px solid currentColor;
  background: var(--navy);
  border-radius: 50%;
  box-shadow: 8px 8px 0 -2px var(--navy), 8px 8px 0 0 currentColor, -2px 16px 0 -2px var(--navy), -2px 16px 0 0 currentColor;
}
.alert-icon::before {
  content: "!";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--red);
  font-weight: 800;
}

.shield-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 14px;
  height: 17px;
  border: 2px solid currentColor;
  border-radius: 8px 8px 5px 5px;
  clip-path: polygon(50% 0, 100% 18%, 88% 78%, 50% 100%, 12% 78%, 0 18%);
}

.server-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 3px;
  box-shadow: inset 0 6px 0 rgba(8, 91, 197, 0.12), inset 0 -6px 0 rgba(8, 91, 197, 0.12);
}
.server-icon.dark { color: #1b2029; }
.add-user-icon::before { content: "+"; right: 0; top: -2px; border: 0; font-size: 18px; font-weight: 700; }
.add-user-icon::after { left: 3px; bottom: 3px; width: 16px; height: 8px; border-radius: 9px 9px 0 0; }
.document-icon::before,
.inbox-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 13px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 2px;
  box-shadow: inset 0 -5px 0 rgba(8, 91, 197, 0.12);
}

.document-icon::after,
.inbox-icon::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 9px;
  width: 8px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor;
}

.calendar-alert-icon::before {
  content: "";
  position: absolute;
  inset: 2px 0 0;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-top-width: 5px;
  border-radius: 2px;
  font-size: 16px;
}

.money-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  width: 18px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.money-icon::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 9px;
  width: 6px;
  height: 6px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.lock-icon::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 10px;
  width: 12px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.lock-icon::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 3px;
  width: 8px;
  height: 10px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.building-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  width: 14px;
  height: 17px;
  border: 2px solid currentColor;
}

.building-icon::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  width: 2px;
  height: 2px;
  background: currentColor;
  box-shadow: 5px 0 0 currentColor, 0 5px 0 currentColor, 5px 5px 0 currentColor, 0 10px 0 currentColor, 5px 10px 0 currentColor;
}

.trend-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 5px;
  width: 19px;
  height: 13px;
  border-left: 3px solid currentColor;
  border-top: 3px solid currentColor;
  transform: skewY(-35deg) rotate(135deg);
}

.trend-icon::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
}

.wallet-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  width: 18px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.wallet-icon::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 10px;
  width: 8px;
  height: 6px;
  border: 2px solid currentColor;
  border-radius: 2px;
  background: var(--panel);
}

.chart-icon::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.chart-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: 7px;
  width: 3px;
  height: 5px;
  background: currentColor;
  box-shadow: 5px -4px 0 currentColor, 10px -1px 0 currentColor;
}

.funnel-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 16px;
  height: 16px;
  border: 3px solid currentColor;
  border-bottom: 0;
  clip-path: polygon(0 0, 100% 0, 60% 62%, 60% 100%, 40% 100%, 40% 62%);
}

@media (max-width: 1500px) {
  .dashboard-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-calendar-compact-card {
    grid-column: span 2;
  }
}

@media (max-width: 760px) {
  .dashboard-calendar-modal {
    padding: 10px;
  }

  .dashboard-overview-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-calendar-compact-card {
    grid-column: auto;
  }

  .dashboard-summary-card,
  .dashboard-calendar-compact-card {
    min-height: auto;
  }

  .dashboard-summary-item {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .dashboard-summary-meta {
    grid-column: 2;
    text-align: left;
  }

  .dashboard-calendar-modal-card {
    width: 100%;
    height: 100%;
    max-height: none;
  }
}

@media (max-width: 1180px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 420px;
  }

  .login-copy {
    margin-bottom: 60px;
  }

  .sidebar { width: 230px; }
  .main-area { margin-left: 230px; }

  .brand-logo-sidebar {
    height: 50px;
    max-width: 180px;
  }

  .brand {
    padding: 18px 18px 12px;
  }

  .sidebar-nav {
    gap: 8px;
    padding: 12px;
  }

  .nav-item {
    min-height: 50px;
    padding: 9px 16px;
    font-size: 15px;
    gap: 12px;
  }

  .plain-action {
    padding: 10px 16px;
    font-size: 15px;
    gap: 12px;
  }

  .sidebar-footer {
    padding: 12px;
  }

  .metrics-grid,
  .dashboard-layout,
  .settings-top-grid,
  .settings-bottom-grid,
  .sales-metrics-grid,
  .sales-content-grid,
  .client-summary-grid,
  .client-detail-layout,
  .client-detail-metrics,
  .process-summary-grid,
  .process-content-grid,
  .contract-summary-grid,
  .contracts-bottom-grid {
    grid-template-columns: 1fr;
  }

  .pipeline-steps {
    grid-template-columns: 1fr;
  }

  .pipeline-step,
  .pipeline-step:first-child,
  .pipeline-step:last-child,
  .process-flow article,
  .process-flow article:first-child {
    clip-path: none;
  }

  .process-flow {
    grid-template-columns: 1fr;
  }

  .process-kanban-board {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .right-stack {
    grid-template-columns: 1fr 1fr;
  }

  .user-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .login-visual,
  .login-panel-wrap {
    min-height: auto;
    padding: 28px 20px;
  }

  .login-card {
    padding: 28px 20px;
  }

  .brand-logo-login {
    height: 58px;
    max-width: 260px;
  }

  .login-copy h1 {
    font-size: 25px;
  }

  .login-copy p {
    font-size: 17px;
  }

  .sidebar {
    position: static;
    width: auto;
    height: auto;
  }

  .main-area {
    margin-left: 0;
  }

  .sidebar-nav {
    padding: 12px;
  }

  .sidebar-footer {
    padding: 16px;
  }

  .topbar,
  .connection-panel,
  .page-heading,
  .heading-actions,
  .tabs-row,
  .pagination-row,
  .utility-grid,
  .right-stack,
  .settings-form,
  .general-grid {
    flex-direction: column;
    display: flex;
    align-items: stretch;
  }

  .dashboard-calendar-card {
    overflow-x: auto;
  }

  .clients-agenda-sidebar {
    display: none;
  }

  .clients-agenda-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .clients-agenda-tools,
  .clients-agenda-search {
    width: 100%;
  }

  .clients-agenda-titlebar h2 {
    font-size: 22px;
  }

  .clients-agenda-day {
    min-height: 108px;
  }

  .dashboard-calendar-header {
    min-width: 760px;
  }

  .dashboard-calendar-filters,
  .dashboard-calendar-weekdays,
  .dashboard-calendar-grid,
  .dashboard-calendar-legend {
    min-width: 760px;
  }

  .screen {
    padding: 28px 16px 80px;
  }

  .search-box {
    width: 100%;
  }

  .connection-panel {
    margin: 16px;
  }

  .admin-login-form {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-login-form input {
    width: 100%;
  }

  .page-heading h1 {
    font-size: 32px;
  }

  .metrics-grid,
  .dashboard-layout,
  .settings-top-grid,
  .settings-bottom-grid,
  .sales-metrics-grid,
  .sales-content-grid,
  .client-summary-grid,
  .client-detail-layout,
  .client-detail-metrics,
  .process-summary-grid,
  .process-content-grid,
  .contract-summary-grid,
  .contracts-bottom-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .contract-filters {
    grid-template-columns: 1fr;
  }

  .filter-button {
    justify-self: stretch;
  }

  .process-kanban-board {
    grid-template-columns: 1fr;
    padding: 0 18px 18px;
  }

  .client-profile-panel {
    position: static;
  }

  .permission-grid {
    grid-template-columns: minmax(190px, 1.3fr) repeat(4, 120px);
  }

}

/* UX polish: mobile-first behavior and touch-friendly web app layout */
html {
  scroll-behavior: smooth;
}

input,
select,
textarea {
  border-radius: var(--radius-sm);
}

.topbar,
.sidebar,
.card,
.modal-card,
.login-card {
  transition: box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}

.primary-button,
.secondary-button,
.logout-button,
.ghost-link,
.nav-item {
  transition: transform .12s ease, background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.primary-button:hover,
.secondary-button:hover,
.logout-button:hover,
.ghost-link:hover,
.nav-item:hover {
  transform: translateY(-1px);
}

.table-wrap {
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.table-wrap::after {
  content: "";
  position: sticky;
  right: 0;
  display: block;
  width: 34px;
  height: 1px;
  margin-left: auto;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(243, 246, 250, 0), rgba(243, 246, 250, .9));
}

@media (max-width: 900px) {
  .screen.requests-chat-screen {
    height: calc(100dvh - 70px);
    padding: 10px;
  }

  .conversations-panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
  }

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

  .conversation-list {
    max-height: 148px;
  }

  .conversation-chat-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .conversation-chat-meta {
    justify-items: start;
  }

  .conversation-message {
    max-width: 92%;
  }

  .crm-flow-summary {
    grid-template-columns: 1fr 1fr;
  }

  .crm-flow-summary > div:first-child,
  .crm-flow-summary > div:last-child {
    grid-column: 1 / -1;
  }

  .crm-plan-field > div:last-of-type {
    grid-template-columns: 1fr;
  }

  .app-shell {
    min-height: 100dvh;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    width: 100%;
    height: auto;
    max-height: 48dvh;
    border-right: 0;
    border-bottom: 1px solid rgba(199, 204, 213, .86);
    background: rgba(238, 242, 247, .94);
    backdrop-filter: blur(18px);
  }

  .brand {
    min-height: 64px;
    padding: 10px 16px 6px;
  }

  .brand-logo-sidebar {
    height: 42px;
    max-width: 170px;
  }

  .brand small {
    font-size: 10px;
  }

  .sidebar-nav {
    display: flex;
    gap: 8px;
    padding: 8px 12px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
  }

  .sidebar-nav::-webkit-scrollbar {
    height: 0;
    width: 0;
  }

  .nav-item {
    flex: 0 0 auto;
    min-height: 46px;
    min-width: max-content;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 15px;
    scroll-snap-align: start;
  }

  .nav-parent-item {
    margin-bottom: 0;
  }

  .nav-parent-item::after {
    width: 6px;
    height: 6px;
  }

  .nav-subitem {
    margin: 0;
    padding: 8px 13px;
    font-size: 14px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, .76);
  }

  .nav-subitem::before {
    display: none;
  }

  .sidebar-footer {
    display: none;
  }

  .main-area {
    margin-left: 0;
  }

  .topbar {
    top: auto;
    min-height: auto;
    padding: 12px 16px;
    gap: 12px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .user-menu {
    gap: 10px;
    margin-left: auto;
    padding-left: 12px;
  }

  .user-menu > div {
    display: none;
  }

  .logout-button {
    min-width: 44px;
    padding: 0 12px;
  }

  .logout-button span:not(.icon) {
    display: none;
  }

  .screen {
    padding: 24px 14px 88px;
  }

  .page-heading {
    gap: 16px;
    margin-bottom: 22px;
  }

  .page-heading h1 {
    font-size: clamp(30px, 9vw, 40px);
    line-height: 1.05;
  }

  .page-heading p {
    font-size: 17px;
    line-height: 1.42;
  }

  .heading-actions,
  .form-actions,
  .proposal-builder-actions {
    gap: 10px;
  }

  .heading-actions > *,
  .form-actions > *,
  .proposal-builder-actions > * {
    width: 100%;
  }

  .primary-button,
  .secondary-button {
    min-height: 50px;
    padding: 0 18px;
    font-size: 17px;
  }

  .card {
    border-radius: 14px;
  }

  .card-header {
    gap: 12px;
  }

  .proposal-builder-grid,
  .proposal-modules-grid,
  .opportunity-form,
  .settings-form,
  .general-grid,
  .contract-address-fields {
    grid-template-columns: 1fr !important;
  }

  .appointment-online-grid,
  .appointment-meeting-link-row {
    grid-template-columns: 1fr;
  }

  .modal-card {
    width: min(100% - 20px, 720px);
    max-height: calc(100dvh - 20px);
    border-radius: 16px;
  }

  .modal-actions {
    position: sticky;
    bottom: 0;
    margin: 18px -24px -24px;
    padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(14px);
  }

  .client-detail-tabs {
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .client-detail-tabs button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    background: var(--panel);
  }

  .client-detail-tabs button.is-active {
    border-color: var(--blue);
    background: var(--blue-soft);
  }

  .client-profile-panel {
    top: 0;
  }

  .interaction-footer,
  .client-process-context-footer,
  .calendar-event-actions,
  .commercial-demand-actions {
    gap: 10px;
  }

  .interaction-footer button,
  .client-process-actions button,
  .calendar-event-actions button {
    flex: 1 1 160px;
  }
}

@media (max-width: 520px) {
  .login-screen {
    background: var(--panel);
  }

  .login-visual {
    min-height: auto;
    padding: 22px 18px;
  }

  .login-copy,
  .login-footer,
  .office-visual {
    display: none;
  }

  .login-brand {
    padding: 8px 12px;
    border-radius: 12px;
  }

  .brand-logo-login {
    height: 48px;
    max-width: 220px;
  }

  .login-panel-wrap {
    place-items: start stretch;
    padding: 22px 16px 34px;
    background: var(--panel);
  }

  .login-card {
    gap: 20px;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .login-card h2 {
    font-size: 28px;
  }

  .login-input,
  .login-submit,
  .sso-button {
    min-height: 56px;
    border-radius: 12px;
    font-size: 17px;
  }

  .topbar {
    align-items: stretch;
  }

  .topbar .search-box {
    height: 46px;
    border-radius: 999px;
  }

  .icon-button {
    width: 42px;
    height: 42px;
  }

  .avatar {
    width: 42px;
    height: 42px;
  }

  .screen {
    padding-inline: 10px;
  }

  .page-heading h1 {
    font-size: 32px;
  }

  .page-heading p {
    font-size: 16px;
  }

  .card,
  .modal-card {
    border-radius: 12px;
  }

  .small-stat,
  .contract-stat,
  .sales-metric {
    min-height: auto;
    padding: 20px;
  }

  .table-wrap {
    margin-inline: -1px;
    border-radius: 0 0 12px 12px;
  }

  .client-detail-layout {
    gap: 14px;
  }

  .client-profile-panel,
  .interaction-card,
  .client-process-context,
  .client-timeline-card,
  .client-rdv-card,
  .client-proposals-card,
  .client-contracts-card,
  .client-demands-card,
  .client-attachments-card {
    padding-inline: 18px;
  }
}

/* CoreFlow UI polish: visual-only overrides. Keep business logic in JS untouched. */
body {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.06), transparent 32vw),
    var(--bg);
  color: #1e293b;
  font-weight: 500;
}

.app-shell {
  background: transparent;
}

.sidebar {
  background: linear-gradient(180deg, #f8fafc 0%, #eef4fb 100%);
  border-right-color: rgba(148, 163, 184, 0.38);
  box-shadow: 12px 0 28px rgba(15, 23, 42, 0.04);
}

.brand {
  border-bottom-color: rgba(148, 163, 184, 0.24);
}

.brand small,
.page-heading p,
.card-header p,
small,
.eyebrow {
  color: #64748b;
}

.sidebar-nav {
  padding-inline: 10px;
}

.nav-item,
.plain-action {
  min-height: 48px;
  margin: 4px 0;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #334155;
  font-weight: 650;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.nav-item:hover,
.plain-action:hover {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(148, 163, 184, 0.28);
  color: #0f172a;
  transform: translateX(2px);
}

.nav-item.is-active {
  background: linear-gradient(135deg, var(--primary), #1d4ed8);
  border-color: rgba(37, 99, 235, 0.35);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.26);
}

.nav-subitem {
  min-height: 42px;
  padding-left: 58px;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
}

.topbar {
  border-bottom-color: rgba(148, 163, 184, 0.28);
  background: rgba(248, 250, 252, 0.82);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

.search-box,
.login-input,
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  border-color: #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  color: #1e293b;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background-color 150ms ease;
}

.search-box:focus-within,
.login-input:focus-within,
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: rgba(37, 99, 235, 0.62);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.11);
}

.page-heading h1,
.screen > h1,
.card-header h2,
.card h2,
.modal-header h2,
.login-card h2 {
  color: #111827;
  font-weight: 800;
  letter-spacing: 0;
}

.page-heading h1,
.screen > h1 {
  line-height: 1.05;
}

.card,
.status-card,
.latency-card,
.small-stat,
.contract-stat,
.sales-metric,
.smtp-card,
.pop-card,
.webhook-card,
.integrations-card,
.general-card,
.process-flow-card,
.process-kanban-card,
.process-table-card,
.process-subflow-card,
.commercial-demands-card,
.proposal-clients-card,
.clients-table-card,
.users-table-card,
.contracts-table-card,
.modal-card,
.login-card {
  border-color: rgba(148, 163, 184, 0.36);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-sm);
}

.card:hover,
.status-card:hover,
.latency-card:hover,
.small-stat:hover,
.contract-stat:hover,
.sales-metric:hover {
  box-shadow: var(--shadow-md);
}

.primary-button,
.secondary-button,
.login-submit,
.sso-button,
.table-actions button,
.ghost-link,
.service-request-start-button {
  border-radius: 12px;
  font-weight: 750;
  letter-spacing: 0;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.primary-button,
.login-submit {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

.primary-button:hover,
.login-submit:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.30);
  transform: translateY(-1px);
}

.secondary-button,
.sso-button,
.table-actions button {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #1e293b;
}

.secondary-button:hover,
.sso-button:hover,
.table-actions button:hover {
  border-color: rgba(37, 99, 235, 0.36);
  background: #f8fafc;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled,
.login-submit:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  box-shadow: none;
  transform: none;
}

table {
  color: #1f2937;
}

thead,
table th {
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.045em;
}

table td,
table th {
  border-color: rgba(226, 232, 240, 0.92);
}

tbody tr {
  transition: background-color 140ms ease;
}

tbody tr:hover {
  background: rgba(37, 99, 235, 0.035);
}

.pill,
.request-badge {
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.pill.success,
.request-badge.status-completed,
.request-badge.priority-low {
  background: #dcfce7;
  color: #15803d;
}

.pill.admin,
.pill.process-pill,
.request-badge.status-new,
.request-badge.status-triage {
  background: #dbeafe;
  color: #1d4ed8;
}

.request-badge.status-in_service,
.request-badge.status-development,
.request-badge.status-testing {
  background: #ede9fe;
  color: #6d28d9;
}

.request-badge.status-analysis,
.request-badge.priority-medium {
  background: #fef3c7;
  color: #b45309;
}

.request-badge.status-waiting_customer,
.request-badge.priority-high {
  background: #ffedd5;
  color: #c2410c;
}

.pill.danger,
.request-badge.status-cancelled,
.request-badge.priority-critical {
  background: #fee2e2;
  color: #b91c1c;
}

.pill.neutral,
.request-badge.status-not_applicable {
  background: #f1f5f9;
  color: #475569;
}

/* Central de Atendimento: dashboard-style queue */
.service-request-metric-grid {
  grid-template-columns: repeat(6, minmax(132px, 1fr));
}

.service-requests-panel {
  overflow: hidden;
}

.service-requests-panel > .card-header {
  padding-bottom: 14px;
}

.service-requests-table {
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
}

.service-requests-table th,
.service-requests-table td {
  padding: 13px 12px;
  box-sizing: border-box;
  overflow: hidden;
  overflow-wrap: normal;
  word-break: normal;
}

.service-requests-table td {
  color: #172033;
  font-size: 13.5px;
  vertical-align: middle;
}

.service-requests-table th {
  color: #475569;
  font-size: 10px;
  font-weight: 850;
  user-select: none;
}

.service-requests-table tr:hover td {
  background: #f8fbff;
}

.service-requests-table .mini-avatar {
  flex: 0 0 auto;
  margin-right: 0;
  background: linear-gradient(135deg, #0f5fc7, #23c7d6);
  color: #fff;
  font-size: 10px;
}

.service-requests-table .request-badge {
  gap: 5px;
  min-height: 22px;
  padding: 4px 9px;
  border: 0;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
}

.service-requests-table .request-badge.status-new::before,
.service-requests-table .request-badge.status-in_service::before,
.service-requests-table .request-badge.status-analysis::before,
.service-requests-table .request-badge.status-waiting_customer::before,
.service-requests-table .request-badge.status-completed::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

.request-badge.priority-critical {
  background: #fee2e2;
  color: #b91c1c;
}

.request-badge.priority-high {
  background: #ffedd5;
  color: #c2410c;
}

.request-badge.priority-medium {
  background: #fef3c7;
  color: #b45309;
}

.request-badge.priority-low {
  background: #dcfce7;
  color: #15803d;
}

.request-badge.status-new,
.request-badge.status-triage {
  background: #e0f2fe;
  color: #0369a1;
}

.request-badge.status-in_service {
  background: #dbeafe;
  color: #1d4ed8;
}

.request-badge.status-analysis {
  background: #fef3c7;
  color: #b45309;
}

.request-badge.status-waiting_customer {
  background: #ffedd5;
  color: #c2410c;
}

.request-badge.status-completed {
  background: #dcfce7;
  color: #15803d;
}

.request-badge.status-not_applicable,
.request-badge.status-cancelled {
  background: #f1f5f9;
  color: #475569;
}

@media (max-width: 1320px) {
  .service-request-metric-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }
}

@media (max-width: 900px) {
  .service-request-metric-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .service-requests-table th,
  .service-requests-table td {
    padding: 11px 8px;
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  .service-request-metric-grid {
    grid-template-columns: 1fr;
  }

  .service-requests-table {
    min-width: 720px;
  }

  .service-request-table-wrap {
    overflow-x: auto;
  }
}

.form-status:not(:empty) {
  border-radius: 12px;
  padding: 12px 14px;
  background: #fffbeb;
  color: #92400e;
}

.modal-backdrop {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(10px) saturate(1.06);
  -webkit-backdrop-filter: blur(10px) saturate(1.06);
}

#appointmentModal {
  z-index: 260;
}

#appointmentSuccessModal {
  z-index: 320;
}

.appointment-modal-backdrop {
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.appointment-modal-card {
  width: min(1240px, calc(100vw - 36px));
  max-height: calc(100dvh - 36px);
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 26px 78px rgba(15, 23, 42, 0.28);
}

.appointment-modal-header {
  padding: 22px 32px 18px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.appointment-modal-header h2 {
  margin: 0;
  color: #101827;
  font-size: clamp(23px, 2vw, 28px);
  line-height: 1.1;
}

.appointment-modal-header p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.25;
}

.appointment-modal-header .icon-button {
  width: 38px;
  min-height: 38px;
  color: #0f172a;
  font-size: 34px;
  line-height: 1;
  background: transparent;
}

.appointment-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 16px 28px;
  max-height: calc(100dvh - 126px);
  overflow: auto;
  padding: 28px 32px 26px;
}

.appointment-form label {
  gap: 8px;
  color: #172033;
  font-size: 14px;
  font-weight: 800;
}

.appointment-title-field span,
.appointment-description-field span {
  color: #ef4444;
}

.appointment-description-field > span {
  color: #526176;
  font-weight: 700;
}

.appointment-form input,
.appointment-form select,
.appointment-form textarea {
  min-height: 48px;
  border-color: #cbd5e1;
  border-radius: 9px;
  color: #172033;
  background: #ffffff;
  font-size: 16px;
}

.appointment-form textarea {
  min-height: 84px;
  resize: vertical;
}

.appointment-field-shell {
  position: relative;
  display: block;
}

.appointment-field-shell select,
.appointment-client-field .appointment-field-shell input[type="search"] {
  padding-left: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-client-field .client-search-results {
  z-index: 420;
}

.appointment-field-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  z-index: 1;
  display: inline-block;
  width: 18px;
  height: 18px;
  color: #64748b;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.appointment-field-icon::before,
.appointment-field-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.appointment-icon-user::before {
  left: 6px;
  top: 2px;
  width: 6px;
  height: 6px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.appointment-icon-user::after {
  left: 3px;
  bottom: 1px;
  width: 12px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 10px 10px 3px 3px;
}

.appointment-icon-briefcase::before {
  inset: 5px 1px 2px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.appointment-icon-briefcase::after {
  left: 6px;
  top: 2px;
  width: 6px;
  height: 5px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}

.appointment-icon-flag::before {
  left: 3px;
  top: 2px;
  width: 2px;
  height: 15px;
  background: currentColor;
}

.appointment-icon-flag::after {
  left: 5px;
  top: 2px;
  width: 11px;
  height: 8px;
  border: 2px solid currentColor;
  border-left: 0;
  border-radius: 0 3px 3px 0;
}

.appointment-icon-calendar::before {
  inset: 2px 1px 1px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.appointment-icon-calendar::after {
  left: 4px;
  right: 4px;
  top: 7px;
  height: 2px;
  background: currentColor;
  box-shadow:
    0 4px 0 -0.5px currentColor,
    4px 4px 0 -0.5px currentColor;
}

.appointment-icon-clock::before {
  inset: 1px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.appointment-icon-clock::after {
  left: 8px;
  top: 4px;
  width: 5px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.appointment-date-section {
  display: grid;
  gap: 12px;
}

.appointment-date-section > strong {
  color: #334155;
  font-size: 14px;
  font-weight: 900;
}

.appointment-date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 20px;
}

.appointment-date-card {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 0 8px !important;
  min-height: 64px;
  padding: 10px 14px 9px 42px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #ffffff;
}

.appointment-date-card .appointment-field-icon {
  left: 18px;
}

.appointment-date-card > span:not(.appointment-field-icon) {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.appointment-date-card input {
  grid-column: 1 / -1;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
}

.appointment-online-section {
  gap: 16px;
  padding: 18px 22px 20px;
  border-color: #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
}

.appointment-online-section legend {
  padding: 0 3px;
  color: #172033;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
}

.appointment-online-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  color: #172033;
  font-size: 15px;
}

.appointment-online-toggle input {
  width: 18px;
  height: 18px;
}

.appointment-online-grid {
  grid-template-columns: minmax(230px, .95fr) minmax(360px, 1.45fr);
  gap: 20px 28px;
  align-items: start;
}

.appointment-online-grid > label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.appointment-online-grid > label > input,
.appointment-meeting-link-row input {
  width: 100%;
  min-height: 54px;
  box-sizing: border-box;
}

.appointment-meeting-link-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr);
  gap: 10px;
}

.appointment-meeting-link-row input {
  min-width: 0;
  overflow: hidden;
  padding-left: 14px;
  color: #64748b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-meeting-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.appointment-meeting-actions .compact-button {
  min-height: 38px;
  padding: 0 15px;
  border-radius: 8px;
  color: #0b66d8;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.appointment-modal-actions {
  align-items: center;
  grid-column: 1 / -1;
  gap: 14px;
  padding-top: 6px;
}

.appointment-modal-actions span {
  flex: 1 1 auto;
}

.appointment-modal-actions .primary-button,
.appointment-modal-actions .secondary-button,
.appointment-modal-actions .danger-button {
  min-height: 52px;
  border-radius: 9px;
  font-size: 16px;
  font-weight: 900;
}

.appointment-modal-actions .primary-button {
  min-width: 230px;
}

.appointment-modal-actions .secondary-button {
  min-width: 140px;
}

.appointment-modal-actions .danger-button {
  min-width: 130px;
  border: 1px solid #ef4444;
  color: #ef4444;
  background: #ffffff;
}

#appointmentFormStatus {
  grid-column: 1 / -1;
  margin: 0;
}

@media (max-width: 1180px) {
  .appointment-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .appointment-date-grid,
  .appointment-online-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .appointment-modal-backdrop {
    align-items: stretch;
    padding: 10px;
  }

  .appointment-modal-card {
    width: 100%;
    max-height: calc(100dvh - 20px);
  }

  .appointment-modal-header {
    padding: 18px 18px 14px;
  }

  .appointment-form {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }

  .appointment-date-grid,
  .appointment-online-grid {
    grid-template-columns: 1fr;
  }

  .appointment-meeting-actions,
  .appointment-modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .appointment-modal-actions span {
    display: none;
  }

  .appointment-modal-actions .primary-button,
  .appointment-modal-actions .secondary-button,
  .appointment-modal-actions .danger-button {
    width: 100%;
  }
}

.modal-card {
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.22);
}

.modal-header {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.service-request-sidebar > div {
  border-radius: 14px;
  background: #f8fafc;
}

.module-checkboxes {
  border-color: #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
}

.module-checkboxes label {
  color: #334155;
  font-weight: 650;
}

.module-checkboxes input[type="checkbox"],
input[type="checkbox"] {
  accent-color: var(--primary);
}

.service-request-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.columns-config-modal-card {
  width: min(620px, calc(100vw - 32px));
}

.columns-config-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 22px 24px;
}

.column-config-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.column-config-option strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.column-config-option small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.column-config-option.is-locked {
  background: #f8fafc;
}

.a4-print-frame {
  position: fixed;
  top: 0;
  left: -10000px;
  width: 210mm;
  height: 297mm;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 720px) {
  .columns-config-list {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  html,
  body {
    width: 210mm !important;
    min-width: 210mm !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }

  body * {
    visibility: hidden !important;
  }

  .app-shell,
  .main-area,
  .screen,
  .modal-backdrop,
  .proposal-modal {
    display: block !important;
    position: static !important;
    width: 210mm !important;
    min-width: 210mm !important;
    max-width: 210mm !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    transform: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  #proposalPages,
  #proposalPages * {
    visibility: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  #proposalPages {
    position: static !important;
    display: block;
    width: 210mm !important;
    max-width: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }

  .proposal-modal-header {
    display: none;
  }

  .proposal-a4-page {
    display: flex !important;
    width: 210mm !important;
    min-width: 210mm !important;
    max-width: 210mm !important;
    height: 297mm !important;
    min-height: 297mm !important;
    max-height: 297mm !important;
    margin: 0 !important;
    overflow: hidden !important;
    box-shadow: none !important;
    break-after: page;
    page-break-after: always;
    transform: none !important;
  }

  .contract-a4-page {
    display: flex !important;
    flex-direction: column !important;
    padding: 16mm 20mm 12mm !important;
  }

  .proposal-html-page {
    display: flex !important;
    flex-direction: column !important;
    padding: 58px 56px 42px !important;
    background-color: #05204f !important;
    background-image: linear-gradient(150deg, #05204f, #0063b7) !important;
  }

  .proposal-a4-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }
}

@media (max-width: 1180px) {
  .dashboard-calendar-compact-card {
    overflow-x: hidden;
  }

  .dashboard-calendar-compact-card .dashboard-calendar-header,
  .dashboard-calendar-compact-card .dashboard-calendar-weekdays,
  .dashboard-calendar-compact-card .dashboard-calendar-grid,
  .dashboard-calendar-compact-card .dashboard-calendar-legend {
    min-width: 0;
  }

  .dashboard-calendar-modal-card .dashboard-calendar-header,
  .dashboard-calendar-modal-card .dashboard-calendar-filters,
  .dashboard-calendar-modal-card .dashboard-calendar-weekdays,
  .dashboard-calendar-modal-card .dashboard-calendar-grid,
.dashboard-calendar-modal-card .dashboard-calendar-legend {
    min-width: 760px;
  }
}

/* Dashboard principal redesenhado */
.sidebar {
  background: linear-gradient(180deg, #061827 0%, #0b2035 100%);
  border-right-color: rgba(148, 163, 184, 0.18);
  box-shadow: 12px 0 32px rgba(15, 23, 42, 0.16);
}

.sidebar .brand small,
.sidebar-footer .plain-action,
.sidebar .plain-action,
.sidebar .nav-item {
  color: #c7d3e4;
}

.sidebar .brand strong,
.sidebar .brand-text,
.sidebar .plain-action:hover,
.sidebar .nav-item:hover {
  color: #ffffff;
}

.sidebar .nav-item:hover,
.sidebar .plain-action:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.24);
}

.sidebar .nav-item.is-active {
  background: linear-gradient(135deg, #1672f3, #155fd0);
  color: #ffffff;
  border-color: rgba(96, 165, 250, 0.42);
  box-shadow: 0 12px 26px rgba(22, 114, 243, 0.34);
}

.sidebar .nav-submenu {
  color: #9fb2c8;
}

.sidebar .nav-subitem {
  color: #b7c5d8;
}

.sidebar .nav-subitem.is-active,
.sidebar .nav-subitem:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-screen {
  max-width: 100%;
}

.dashboard-heading {
  margin-bottom: 16px;
}

.dashboard-heading h1 {
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1;
}

.dashboard-heading p {
  margin-top: 8px;
  color: #526176;
}

.dashboard-metric-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.dashboard-metric-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 90px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  cursor: grab;
}

.dashboard-metric-card.is-dragging,
.dashboard-chart-card.is-dragging,
.dashboard-summary-card.is-dragging {
  opacity: 0.58;
  cursor: grabbing;
}

.dashboard-metric-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 900;
}

.dashboard-metric-card.blue .dashboard-metric-icon { color: #155fd0; background: #e8f1ff; }
.dashboard-metric-card.green .dashboard-metric-icon { color: #058346; background: #e8faef; }
.dashboard-metric-card.purple .dashboard-metric-icon { color: #6d3be8; background: #f0eaff; }
.dashboard-metric-card.orange .dashboard-metric-icon { color: #db6b07; background: #fff2df; }
.dashboard-metric-card.cyan .dashboard-metric-icon { color: #0891b2; background: #e5f8fb; }
.dashboard-metric-card.red .dashboard-metric-icon { color: #dc2626; background: #ffeaea; }

.dashboard-metric-card span:not(.dashboard-metric-icon),
.dashboard-metric-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-metric-card span:not(.dashboard-metric-icon) {
  color: #526176;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-metric-card strong {
  display: block;
  margin: 5px 0 3px;
  color: #101826;
  font-size: 24px;
  line-height: 1;
}

.dashboard-metric-card small {
  font-size: 11px;
  font-weight: 700;
}

.dashboard-metric-card small.positive { color: #0b9f5b; }
.dashboard-metric-card small.negative { color: #dc2626; }
.dashboard-metric-card small.neutral { color: #64748b; }

.dashboard-charts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 16px;
  margin-bottom: 16px;
  align-items: stretch;
}

.dashboard-chart-card,
.dashboard-charts-grid .dashboard-calendar-compact-card {
  min-height: 280px;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  cursor: grab;
}

.dashboard-widget-period {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f7fc;
  color: #526176;
  font-size: 11px;
  font-weight: 800;
}

.dashboard-funnel-list {
  display: grid;
  gap: 11px;
  padding: 8px 20px 22px;
}

.dashboard-funnel-row {
  display: grid;
  grid-template-columns: 110px minmax(80px, 1fr) 92px;
  gap: 12px;
  align-items: center;
  color: #12213a;
  font-size: 12px;
}

.dashboard-funnel-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-funnel-row strong {
  color: #526176;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.dashboard-funnel-track {
  height: 20px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef3f9;
}

.dashboard-funnel-track i {
  display: block;
  height: 100%;
  min-width: 18px;
  border-radius: inherit;
}

.dashboard-funnel-track .funnel-1 { background: #1769e8; }
.dashboard-funnel-track .funnel-2 { background: #1e82f0; }
.dashboard-funnel-track .funnel-3 { background: #20a8df; }
.dashboard-funnel-track .funnel-4 { background: #2ec4b6; }
.dashboard-funnel-track .funnel-5 { background: #65c878; }
.dashboard-funnel-track .funnel-6 { background: #f8bf3a; }
.dashboard-funnel-track .funnel-7 { background: #f97316; }

.dashboard-donut-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 8px 22px 24px;
}

.dashboard-donut-chart {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  width: 154px;
  height: 154px;
  border-radius: 50%;
  background: conic-gradient(#e8eef7 0% 100%);
}

.dashboard-donut-chart::after {
  content: '';
  position: absolute;
  inset: 34px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px #eef2f7;
}

.dashboard-donut-chart strong,
.dashboard-donut-chart span {
  position: relative;
  z-index: 1;
}

.dashboard-donut-chart strong {
  color: #111827;
  font-size: 26px;
  line-height: 1;
}

.dashboard-donut-chart span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-donut-legend {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.dashboard-donut-legend-item {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: #526176;
  font-size: 12px;
}

.dashboard-donut-legend-item i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.dashboard-donut-legend-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-donut-legend-item strong {
  color: #12213a;
  font-size: 11px;
  white-space: nowrap;
}

#dashboardBottomWidgets.dashboard-overview-grid {
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  margin-bottom: 16px;
}

#dashboardBottomWidgets .dashboard-summary-card {
  min-height: 250px;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  cursor: grab;
}

.dashboard-calendar-shell {
  display: grid;
  grid-template-columns: minmax(280px, 420px);
  justify-content: end;
  margin-bottom: 24px;
}

.dashboard-calendar-shell .dashboard-calendar-compact-card {
  min-height: auto;
}

@media (max-width: 1500px) {
  .dashboard-metric-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #dashboardBottomWidgets.dashboard-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .dashboard-metric-strip,
  .dashboard-charts-grid,
  #dashboardBottomWidgets.dashboard-overview-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-donut-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-calendar-shell {
    grid-template-columns: 1fr;
  }
}

/* Dashboard: cards inferiores compactos */
#dashboardBottomWidgets.dashboard-overview-grid {
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

#dashboardBottomWidgets .dashboard-summary-card {
  min-height: 216px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  cursor: grab;
}

#dashboardBottomWidgets .dashboard-summary-header {
  min-width: 0;
  padding: 13px 16px 8px;
}

#dashboardBottomWidgets .dashboard-summary-header h2 {
  overflow: hidden;
  color: #12213a;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboardBottomWidgets .dashboard-summary-header .ghost-link {
  flex: 0 0 auto;
  min-height: auto;
  padding: 0;
  border: 0;
  color: #0b66d8;
  background: transparent;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

#dashboardBottomWidgets .dashboard-summary-list {
  gap: 0;
  padding: 0 16px 6px;
}

#dashboardBottomWidgets .dashboard-summary-item {
  grid-template-columns: 18px minmax(0, 1fr) minmax(44px, auto);
  gap: 8px;
  min-height: 37px;
  padding: 7px 0;
  align-items: center;
  border-bottom-color: #edf1f7;
}

#dashboardBottomWidgets .dashboard-summary-dot {
  width: 15px;
  height: 15px;
  margin-top: 0;
  font-size: 8px;
  line-height: 1;
}

#dashboardBottomWidgets .dashboard-summary-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

#dashboardBottomWidgets .dashboard-summary-copy strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboardBottomWidgets .dashboard-summary-copy span,
#dashboardBottomWidgets .dashboard-summary-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: #66758a;
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

#dashboardBottomWidgets .dashboard-summary-meta {
  max-width: 82px;
  overflow: hidden;
  color: #526176;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboardBottomWidgets .dashboard-summary-meta.danger,
#dashboardBottomWidgets .dashboard-summary-meta.warning,
#dashboardBottomWidgets .dashboard-summary-meta.success {
  justify-self: end;
  padding: 3px 7px;
  border-radius: 999px;
}

#dashboardBottomWidgets .dashboard-summary-meta.danger {
  color: #d52020;
  background: #ffe8e8;
}

#dashboardBottomWidgets .dashboard-summary-meta.warning {
  color: #d97706;
  background: #fff2d8;
}

#dashboardBottomWidgets .dashboard-summary-meta.success {
  color: #08775a;
  background: #dcf7e7;
}

#dashboardBottomWidgets .dashboard-summary-progress {
  gap: 7px;
}

#dashboardBottomWidgets .dashboard-summary-progress span {
  width: 74px;
  height: 5px;
}

#dashboardBottomWidgets .dashboard-summary-progress strong {
  min-width: 28px;
  color: #12213a;
  font-size: 10px;
  line-height: 1;
}

#dashboardBottomWidgets .dashboard-summary-footer {
  min-height: 36px;
  padding: 0 12px;
  color: #0b66d8;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

#dashboardBottomWidgets .dashboard-summary-footer::after {
  content: '?';
  margin-left: 6px;
  font-size: 13px;
}

#dashboardBottomWidgets .dashboard-summary-list .empty-state {
  margin: 14px 0;
  font-size: 11px;
}

/* Sidebar: marca legível sobre o menu escuro */
.sidebar .brand {
  padding: 18px 18px 14px;
}

.sidebar .brand > div {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 228px);
  padding: 10px 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(2, 8, 23, 0.16);
}

.sidebar .brand-logo-sidebar {
  height: 48px;
  max-width: 188px;
  filter: none;
}

.sidebar .brand small {
  margin-top: 4px;
  color: #1f2937;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

@media (max-width: 1500px) {
  #dashboardBottomWidgets.dashboard-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  #dashboardBottomWidgets.dashboard-overview-grid {
    grid-template-columns: 1fr;
  }
}

/* Sidebar recolhida por padrao no desktop */
@media (min-width: 901px) {
  .sidebar:not(:hover) .nav-item {
    font-size: 0;
    text-indent: 0;
  }

  .sidebar:not(:hover) .nav-item > span:not(.icon),
  .sidebar:not(:hover) .plain-action > span:not(.icon),
  .sidebar:not(:hover) .nav-parent-item::after {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    max-width: 0 !important;
  }

  .sidebar:not(:hover) .nav-subitem {
    display: none !important;
  }

  .sidebar:not(:hover) .nav-item .icon {
    display: inline-flex;
    font-size: 0;
    line-height: 1;
    margin: 0 auto;
  }

  .sidebar:not(:hover) .nav-item .icon::before,
  .sidebar:not(:hover) .nav-item .icon::after {
    text-indent: 0;
  }

  :root {
    --sidebar-collapsed-width: 84px;
    --sidebar-expanded-width: 300px;
  }

  .sidebar {
    width: var(--sidebar-collapsed-width);
    z-index: 120;
    overflow: hidden;
    transition:
      width 220ms ease,
      box-shadow 220ms ease,
      border-color 220ms ease;
  }

  .sidebar:hover {
    width: var(--sidebar-expanded-width);
    box-shadow: 24px 0 46px rgba(2, 8, 23, 0.28);
  }

  .main-area {
    margin-left: var(--sidebar-collapsed-width);
    transition: margin-left 220ms ease;
  }

  .sidebar .brand {
    justify-content: center;
    padding: 18px 12px 14px;
  }

  .sidebar:hover .brand {
    justify-content: flex-start;
    padding: 18px 18px 14px;
  }

  .sidebar .brand > div {
    width: 56px;
    min-width: 56px;
    height: 56px;
    padding: 6px;
    border-radius: 16px;
    transition:
      width 220ms ease,
      min-width 220ms ease,
      height 220ms ease,
      padding 220ms ease,
      border-radius 220ms ease;
  }

  .sidebar:hover .brand > div {
    width: min(100%, 228px);
    min-width: 0;
    height: 74px;
    padding: 12px 14px;
    border-radius: 12px;
  }

  .sidebar .brand-logo-sidebar {
    width: 44px;
    max-width: 44px;
    height: 44px;
    object-fit: cover;
    object-position: left center;
    transition:
      width 220ms ease,
      max-width 220ms ease,
      height 220ms ease;
  }

  .sidebar:hover .brand-logo-sidebar {
    width: 100%;
    max-width: 188px;
    height: 48px;
    object-fit: contain;
  }

  .sidebar-nav {
    padding-inline: 10px;
    overflow-x: hidden;
  }

  .nav-item,
  .plain-action {
    justify-content: center;
    gap: 0;
    padding-inline: 0;
    white-space: nowrap;
  }

  .sidebar:hover .nav-item,
  .sidebar:hover .plain-action {
    justify-content: flex-start;
    gap: 18px;
    padding-inline: 22px;
  }

  .nav-item > span:not(.icon),
  .plain-action > span:not(.icon),
  .nav-parent-item::after {
    width: 0;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 140ms ease,
      max-width 180ms ease;
  }

  .sidebar:hover .nav-item > span:not(.icon),
  .sidebar:hover .plain-action > span:not(.icon),
  .sidebar:hover .nav-parent-item::after {
    width: auto;
    max-width: 210px;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-parent-item::after {
    display: block;
  }

  .nav-subitem {
    justify-content: center;
    margin-left: 0;
    padding-inline: 0;
  }

  .sidebar:not(:hover) .nav-subitem {
    display: none;
  }

  .sidebar:hover .nav-subitem {
    justify-content: flex-start;
    margin-left: 42px;
    padding-inline: 14px;
  }

  .sidebar .icon {
    flex: 0 0 auto;
  }

  .sidebar:not(:hover) .brand {
    align-items: center;
    padding-inline: 0;
  }

  .sidebar:not(:hover) .brand > div {
    margin-inline: auto;
  }

  .sidebar:not(:hover) .sidebar-nav {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    padding-inline: 0;
    width: 100%;
  }

  .sidebar:not(:hover) .nav-item,
  .sidebar:not(:hover) .plain-action {
    align-items: center;
    border-radius: 14px;
    display: flex;
    height: 56px;
    justify-content: center;
    margin-inline: auto;
    min-height: 56px;
    padding: 0;
    width: 56px;
  }

  .sidebar:not(:hover) .nav-subitem,
  .sidebar:not(:hover) .nav-subitem.is-expanded,
  .sidebar:not(:hover) .nav-subitem.is-active {
    display: none !important;
  }

  .sidebar:not(:hover) .nav-parent-item::after,
  .sidebar:not(:hover) .nav-subitem::before {
    display: none !important;
  }

  .sidebar:not(:hover) .nav-parent,
  .sidebar:not(:hover) .nav-group {
    align-items: center;
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .sidebar:not(:hover) .nav-item .icon,
  .sidebar:not(:hover) .plain-action .icon {
    flex: 0 0 24px;
    height: 24px;
    margin: 0;
    width: 24px;
  }

  .sidebar:not(:hover) .nav-item > span:not(.icon),
  .sidebar:not(:hover) .plain-action > span:not(.icon) {
    display: none !important;
  }
}


