:root {
  --bg: #f7f8fa;
  --panel: #ffffff;
  --ink: #182026;
  --muted: #66717c;
  --line: #d9dee5;
  --accent: #0f766e;
  --accent-2: #2563eb;
  --danger: #b42318;
  --ok: #12805c;
  --warn: #b7791f;
  --shadow: 0 10px 26px rgba(24, 32, 38, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

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

button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 6px;
  padding: 9px 12px;
  cursor: pointer;
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

button.blue {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

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

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.danger-text { color: var(--danger); }

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-box {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.auth-box.checkout-mode {
  width: min(940px, 100%);
}

.auth-box .brand {
  justify-content: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  min-width: 0;
}

.brand-logo {
  width: 150px;
  height: auto;
  display: block;
  object-fit: contain;
}

.auth-logo {
  width: 142px;
  margin-bottom: 8px;
}

.auth-link {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.viewer-logo {
  width: 112px;
  background: #fff;
  border-radius: 4px;
  padding: 5px 7px;
}

.auth-tabs, .tabs, .auth-actions {
  display: flex;
  gap: 6px;
  margin: 18px 0;
}

.auth-tabs button, .tabs button, .auth-actions button {
  flex: 1;
}

.auth-tabs button.active, .tabs button.active {
  background: #e7f3f1;
  border-color: #a8d7d2;
  color: #075e56;
}

.auth-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.checkout-mode .auth-plan-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.auth-plan-grid .card {
  padding: 14px;
}

.auth-plan-grid .metric {
  font-size: 24px;
}

.field { margin: 10px 0; }
.field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 5px;
}

.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  min-width: 0;
}

.nav-backdrop {
  display: none;
}

.side {
  background: #111820;
  color: #eef3f7;
  padding: 22px 18px;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.side-head {
  margin-bottom: 24px;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f8fbfc;
  min-width: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #5bd8a5, #20a88d);
  position: relative;
  box-shadow: 0 8px 20px rgba(32, 168, 141, 0.22);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 8px 7px 8px 8px;
  background: #fff;
  clip-path: polygon(0 42%, 100% 0, 64% 100%, 44% 60%, 23% 77%);
}

.brand-copy {
  display: grid;
  gap: 1px;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 20px;
  letter-spacing: 0;
}

.brand-copy small {
  color: #9fb3bf;
  font-size: 11px;
  font-weight: 700;
}

.side .close-menu,
.menu-btn {
  display: none;
}

.side button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #cbd5df;
  padding: 10px 12px;
  border-radius: 6px;
}

.side nav {
  display: grid;
  gap: 4px;
}

.side .drawer-logout {
  display: block;
  margin-top: auto;
  border: 1px solid rgba(203, 213, 223, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: #eef3f7;
  text-align: center;
  font-weight: 700;
}

.side button.active {
  background: #20303d;
  color: #fff;
}

.main {
  min-width: 0;
}

.icon-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.menu-btn {
  border-color: var(--line);
  background: #fff;
  gap: 4px;
}

.floating-menu {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 30;
  display: none;
}

.menu-btn span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
  display: block;
}

.content {
  padding: 28px 32px;
  min-width: 0;
  overflow-x: hidden;
}

.section {
  display: none;
}

.section.active {
  display: block;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

#metrics.grid.cols-4 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.home-actions {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.home-action,
.settings-link-panel {
  display: grid;
  gap: 6px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  min-height: 92px;
}

.home-action strong,
.settings-link-panel strong {
  font-size: 18px;
}

.home-action span,
.settings-link-panel span {
  color: var(--muted);
  font-size: 13px;
}

.home-action.primary-action {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.home-action.primary-action span {
  color: rgba(255, 255, 255, 0.82);
}

.settings-link-panel {
  width: 100%;
}

.panel, .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  min-width: 0;
}

.plan-card {
  display: flex;
  flex-direction: column;
  min-height: 238px;
}

.plan-card .metric {
  line-height: 1.22;
}

.plan-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 18px;
}

.plan-facts span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
}

.plan-card button {
  align-self: flex-start;
  margin-top: auto;
}

.panel h2, .panel h3, .card h3 {
  margin: 0 0 12px;
}

.metric {
  font-size: 28px;
  font-weight: 700;
}

.metric-card {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  display: grid;
  align-content: center;
  gap: 6px;
}

.metric-card div {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-card strong {
  font-size: 30px;
  line-height: 1;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.row > * { flex: 1; }
.row .fit { flex: 0 0 auto; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

#contactsTable,
#documentsTable,
#templatesTable,
#deliveriesTable,
#sendContacts {
  overflow-x: auto;
  max-width: 100%;
}

th, td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 10px;
  font-size: 13px;
  vertical-align: top;
}

.file-input {
  padding: 8px;
}

.file-input::file-selector-button {
  margin-right: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fb;
  color: var(--ink);
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 14px;
}

.quick-action {
  min-width: 92px;
  background: #f7f9fb;
  border-color: var(--line);
  font-weight: 700;
}

.quick-action.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.contact-mode {
  display: none;
}

.contact-mode.active {
  display: block;
}

.manual-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.details-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 0;
  margin: 12px 0;
}

.details-box summary,
.details-panel > summary {
  cursor: pointer;
  list-style: none;
  font-weight: 800;
  color: var(--ink);
  padding: 12px 14px;
}

.details-box summary::-webkit-details-marker,
.details-panel > summary::-webkit-details-marker {
  display: none;
}

.details-box summary::after,
.details-panel > summary::after {
  content: "+";
  float: right;
  color: var(--muted);
}

.details-box[open] summary::after,
.details-panel[open] > summary::after {
  content: "-";
}

.details-box > .grid,
.details-box > .field {
  padding: 0 14px 14px;
}

.details-panel {
  padding: 0;
}

.details-panel > form,
.details-panel > div {
  padding: 0 16px 16px;
}

.settings-form {
  display: grid;
  gap: 10px;
}

.check-field {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

.check-field input {
  width: auto;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.ops-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
  display: grid;
  gap: 4px;
}

.ops-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ops-item strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.viewer-legal a {
  color: var(--accent);
  font-weight: 700;
}

.token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.token-list button {
  border: 1px solid #cfe4df;
  border-radius: 999px;
  background: #f2fbf8;
  color: #0b5f58;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.token-list button:hover {
  border-color: var(--accent);
  background: #e4f5f0;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
}

.send-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) 320px;
  gap: 14px;
  align-items: start;
}

.send-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  min-width: 0;
}

.send-step > span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #e7f3f1;
  color: #075e56;
  font-weight: 800;
  margin-right: 8px;
}

.send-step > strong {
  font-size: 18px;
}

.choice-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: 420px;
  overflow: auto;
}

.choice-card {
  width: 100%;
  display: grid;
  gap: 4px;
  text-align: left;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.choice-card strong,
.choice-card span,
.choice-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.choice-card span,
.choice-card small {
  color: var(--muted);
  font-size: 12px;
}

.choice-card.active {
  border-color: var(--accent);
  background: #f2fbf8;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.09);
}

.send-summary {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.send-summary div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.send-summary div:last-child {
  border-bottom: 0;
}

.send-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 3px;
}

.send-summary strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.send-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.send-status {
  margin-top: 10px;
}

.list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.list-row:last-child {
  border-bottom: 0;
}

.list-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.list-main strong,
.list-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-main span,
.list-row time,
.list-meta {
  color: var(--muted);
  font-size: 13px;
}

.list-meta,
.list-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

.empty-state {
  color: var(--muted);
  padding: 18px 0;
}

.review-list {
  margin-top: 14px;
}

.review-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 10px;
}

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

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.review-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

th {
  color: var(--muted);
  font-weight: 600;
  background: #fbfcfd;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a9b2bc;
}

.dot.on { background: var(--ok); }

.dashboard-lead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 18px;
}

.dashboard-lead span {
  color: var(--muted);
  font-size: 13px;
}

.realtime-summary {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.live-ring {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, #fff 0 52%, transparent 53%),
    conic-gradient(var(--accent) 0 35%, #dfe5eb 35% 100%);
  border: 1px solid var(--line);
}

.live-ring span {
  display: block;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.live-ring small {
  display: block;
  color: var(--muted);
  font-weight: 600;
}

.summary-bars {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: 120px 70px 1fr;
  gap: 10px;
  align-items: center;
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: #e6ebf0;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

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

.live-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.live-card.is-online {
  border-color: #8fd6c9;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.live-head, .page-meter, .live-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.live-head, .live-foot {
  font-size: 12px;
}

.live-card p {
  margin: 6px 0 12px;
}

.live-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.doc-chip {
  display: inline-flex;
  max-width: 100%;
  margin: 10px 0 12px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #eef5ff;
  color: #174ea6;
  font-size: 12px;
  font-weight: 700;
}

.mini-bars {
  height: 52px;
  display: flex;
  align-items: end;
  gap: 5px;
  margin: 12px 0;
}

.mini-bars i {
  width: 100%;
  min-height: 8px;
  border-radius: 4px 4px 0 0;
  background: #a8d7d2;
}

.empty-live {
  grid-column: 1 / -1;
  color: var(--muted);
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 6px;
}

.empty-live strong {
  color: var(--ink);
}

.viewer-body {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 58px 1fr;
}

.viewer-bar {
  background: #111820;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  gap: 16px;
  min-width: 0;
}

.viewer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.viewer-brand .brand-copy strong {
  color: #f8fbfc;
  font-size: 16px;
}

.viewer-brand .brand-copy small {
  font-size: 10px;
}

.viewer-brand #docTitle {
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid rgba(255,255,255,0.18);
  color: #d7e1e7;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer {
  display: grid;
  grid-template-columns: 1fr 260px;
  min-height: 0;
}

.document-frame {
  min-height: calc(100vh - 58px);
  background: #e8ecf0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.document-frame img,
.pdf-page-canvas {
  width: min(100%, 980px);
  max-height: calc(100vh - 96px);
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.pdf-page-canvas {
  width: auto;
  max-width: 100%;
  height: auto;
}

.viewer-side {
  border-left: 1px solid var(--line);
  background: #fff;
  padding: 16px;
}

.page-controls {
  display: flex;
  gap: 8px;
}

.call-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 14px;
}

.screen-note {
  border-left: 4px solid var(--accent);
  background: #f2fbf8;
  padding: 14px;
  margin: 10px 0;
  border-radius: 8px;
}

.call-status-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.call-status-head > div {
  display: grid;
  gap: 6px;
}

.identity-label {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  color: var(--muted);
  white-space: nowrap;
}

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

.call-focus-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  min-height: 104px;
}

.call-focus-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.call-focus-card strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  line-height: 1.15;
}

.call-focus-card.is-match {
  border-color: rgba(18, 128, 112, 0.35);
  background: #f5fffc;
}

.call-focus-card.is-mismatch {
  border-color: rgba(188, 82, 46, 0.35);
  background: #fff8f5;
}

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

.call-metrics div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.call-metrics span,
.next-action span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.call-metrics strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.call-guide {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
}

.next-action {
  display: grid;
  gap: 8px;
}

.import-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 300px;
}

.import-card h3 {
  margin: 0 0 10px;
}

.import-card button {
  align-self: flex-start;
  margin-top: auto;
}

.import-card .field:last-of-type {
  margin-bottom: 14px;
}

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

.integration-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.integration-row button {
  min-width: 112px;
}

.integration-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  body.menu-open {
    overflow: hidden;
  }
  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 18;
    display: block;
    background: rgba(17, 24, 32, 0.34);
    backdrop-filter: blur(6px);
  }
  .side {
    position: fixed;
    top: 76px;
    right: 12px;
    bottom: auto;
    left: 12px;
    z-index: 20;
    width: auto;
    max-height: calc(100vh - 94px);
    min-height: 0;
    padding: 14px;
    background: rgba(255, 255, 255, 0.98);
    color: var(--ink);
    border: 1px solid rgba(217, 222, 229, 0.92);
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(24, 32, 38, 0.18);
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 160ms ease, opacity 160ms ease;
  }
  .side[aria-hidden="true"] {
    visibility: hidden;
  }
  body.menu-open .side {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }
  .side-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    min-width: 0;
  }
  .side-head .side-brand {
    flex: 1;
  }
  .side nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    width: 100%;
    max-width: 100%;
  }
  .side button {
    width: 100%;
    min-height: 44px;
    padding: 11px 12px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    color: var(--ink);
    background: #f7f9fb;
    border-radius: 10px;
  }
  .side button.active {
    background: #e7f3f1;
    color: #075e56;
  }
  .side .close-menu {
    display: inline-grid;
    width: 38px;
    height: 38px;
    min-height: 38px;
    flex: 0 0 38px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-size: 22px;
    line-height: 1;
    text-align: center;
  }
  .side .drawer-logout {
    display: block;
    margin-top: 12px;
    min-height: 46px;
    border: 1px solid var(--line) !important;
    background: #fff !important;
    color: var(--danger) !important;
    text-align: center !important;
    font-size: 15px !important;
  }
  .floating-menu {
    display: inline-grid;
  }
  .grid.cols-2, .grid.cols-3, .viewer, .call-layout, .realtime-summary, .live-grid, .send-steps, .home-actions {
    grid-template-columns: 1fr;
  }
  .grid.cols-4 {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
  .call-focus,
  .call-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .call-status-head {
    display: grid;
  }
  .identity-label {
    justify-self: flex-start;
  }
  #metrics.grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bar-row {
    grid-template-columns: 92px 48px 1fr;
  }
  .content {
    padding: 64px 12px 12px;
  }
  .card {
    padding: 14px;
  }
  .integration-row {
    align-items: stretch;
    flex-direction: column;
  }
  .metric {
    font-size: 24px;
  }
  .dashboard-lead {
    display: grid;
    gap: 4px;
  }
  table {
    min-width: 620px;
  }
  .list-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 620px) {
  .auth-actions,
  .auth-plan-grid {
    grid-template-columns: 1fr;
  }

  .auth-actions {
    flex-direction: column;
  }

  .realtime-summary {
    gap: 12px;
  }

  .live-ring {
    width: 132px;
    height: 132px;
  }
}

.lp-body {
  background: #f6f8f7;
  overflow-x: hidden;
}

.lp-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 68px;
  padding: 0 28px;
  background: rgba(246, 248, 247, 0.92);
  border-bottom: 1px solid rgba(217, 222, 229, 0.8);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lp-brand,
.lp-nav,
.lp-actions,
.lp-footer {
  display: flex;
  align-items: center;
}

.lp-brand {
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.lp-nav {
  gap: 18px;
}

.lp-nav a,
.lp-footer a {
  color: #34424c;
  text-decoration: none;
  font-weight: 700;
}

.lp-login {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  background: #fff;
}

.lp-hero {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.82fr);
  gap: 38px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 28px 80px;
}

.lp-hero-copy h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.lp-hero-copy p {
  max-width: 690px;
  color: #4d5d68;
  font-size: 18px;
  line-height: 1.8;
}

.lp-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 900;
  letter-spacing: 0;
}

.lp-actions {
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.lp-primary,
.lp-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 8px;
  padding: 0 18px;
  text-decoration: none;
  font-weight: 900;
}

.lp-primary {
  background: var(--accent);
  color: #fff;
}

.lp-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.lp-device-stage {
  position: relative;
  min-height: 430px;
  display: grid;
  place-items: center;
  perspective: 1100px;
}

.lp-device-stage::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.12), rgba(15, 118, 110, 0));
  transform: translate(34px, 54px);
}

.lp-laptop {
  position: relative;
  width: min(620px, 100%);
  transform: rotateY(-18deg) rotateX(8deg) rotateZ(-1deg);
  transform-style: preserve-3d;
}

.lp-laptop-screen {
  border: 10px solid #1b252d;
  border-radius: 22px;
  background: #111820;
  box-shadow: 0 34px 70px rgba(24, 32, 38, 0.22);
  overflow: hidden;
}

.lp-laptop-base {
  width: 108%;
  height: 28px;
  margin-left: -4%;
  border-radius: 0 0 24px 24px;
  background: linear-gradient(180deg, #dfe5ea, #aeb9c2);
  transform: rotateX(62deg) translateY(-3px);
  box-shadow: 0 28px 34px rgba(24, 32, 38, 0.16);
}

.lp-app-shot {
  height: 330px;
  display: grid;
  grid-template-columns: 132px 1fr;
  background: #f7f8fa;
}

.lp-app-shot aside {
  background: #111820;
  color: #dbe5ea;
  padding: 16px 12px;
  display: grid;
  align-content: start;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
}

.lp-shot-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  color: #fff;
}

.lp-shot-brand .brand-mark {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
  border-radius: 7px;
}

.lp-app-shot aside span {
  padding: 8px;
  border-radius: 7px;
}

.lp-app-shot aside span.active {
  background: #20303d;
  color: #fff;
}

.lp-app-shot main {
  padding: 18px;
}

.lp-shot-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.lp-shot-top strong {
  font-size: 22px;
}

.lp-shot-top button {
  background: var(--accent);
  color: #fff;
  border: 0;
  font-size: 12px;
  font-weight: 900;
}

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

.lp-shot-metrics div,
.lp-shot-live {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
}

.lp-shot-metrics span,
.lp-shot-live span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.lp-shot-metrics strong {
  display: block;
  margin-top: 6px;
  font-size: 34px;
}

.lp-shot-live {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 14px 0;
}

.lp-live-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 7px rgba(15, 118, 110, 0.12);
}

.lp-progress {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #e6ebef;
}

.lp-progress i {
  display: block;
  height: 100%;
  background: var(--accent);
}

.lp-phone {
  position: absolute;
  right: -20px;
  bottom: 44px;
  width: 138px;
  min-height: 190px;
  border: 8px solid #182026;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 22px 46px rgba(24, 32, 38, 0.22);
  padding: 26px 14px 16px;
  transform: rotateY(-8deg) rotateZ(7deg);
}

.lp-phone-bar {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 48px;
  height: 5px;
  border-radius: 999px;
  background: #cfd8df;
  transform: translateX(-50%);
}

.lp-phone strong {
  display: block;
  color: var(--accent);
  font-size: 18px;
}

.lp-phone span {
  color: var(--muted);
  font-weight: 800;
}

.lp-phone-line {
  height: 10px;
  border-radius: 999px;
  background: #dfe7ec;
  margin-top: 22px;
}

.lp-phone-line.short {
  width: 66%;
  margin-top: 10px;
}

.lp-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 78px 28px;
}

.lp-band {
  max-width: none;
  padding-left: max(28px, calc((100vw - 1180px) / 2 + 28px));
  padding-right: max(28px, calc((100vw - 1180px) / 2 + 28px));
  background: #fff;
  border-block: 1px solid var(--line);
}

.lp-section-head {
  margin-bottom: 26px;
}

.lp-section-head h2,
.lp-cta h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
}

.lp-feature-list,
.lp-price-list,
.lp-flow,
.lp-usecase-grid {
  display: grid;
  gap: 14px;
}

.lp-feature-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.lp-feature-list article,
.lp-price-list article,
.lp-usecase-grid article,
.lp-flow div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}

.lp-feature-list article {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  align-items: stretch;
  overflow: hidden;
  padding: 0;
  border-radius: 18px;
  min-height: 220px;
}

.lp-feature-photo {
  min-height: 220px;
  background-image:
    linear-gradient(180deg, rgba(17, 24, 32, 0.02), rgba(17, 24, 32, 0.18)),
    var(--photo);
  background-size: cover;
  background-position: center;
}

.lp-feature-copy {
  padding: 24px;
}

.lp-feature-copy > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e7f3f1;
  color: #075e56;
  font-weight: 900;
  font-size: 13px;
  margin-bottom: 18px;
}

.lp-feature-list h3,
.lp-price-list h3,
.lp-usecase-grid h3,
.lp-flow strong {
  margin: 0 0 9px;
  font-size: 20px;
}

.lp-feature-list p,
.lp-price-list p,
.lp-usecase-grid p,
.lp-flow p,
.lp-cta p {
  color: var(--muted);
  line-height: 1.7;
}

.lp-usecase-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.lp-usecase-grid article {
  display: grid;
  gap: 0;
  overflow: hidden;
  padding: 0;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(24, 32, 38, 0.06);
}

.lp-usecase-scene {
  min-height: 220px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 22%, rgba(70, 199, 154, 0.26), transparent 25%),
    linear-gradient(135deg, #f6fbf9 0%, #edf5fa 100%);
}

.lp-usecase-scene.photo-card {
  min-height: 250px;
  background-image:
    linear-gradient(180deg, rgba(17, 24, 32, 0.06), rgba(17, 24, 32, 0.42)),
    var(--photo);
  background-size: cover;
  background-position: center;
}

.lp-usecase-scene::before {
  content: "";
  position: absolute;
  right: 24px;
  top: 34px;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: rgba(15, 118, 110, 0.16);
}

.lp-usecase-scene.photo-card::before {
  display: none;
}

.lp-usecase-scene::after {
  content: "";
  position: absolute;
  right: 42px;
  top: 52px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
}

.lp-usecase-scene.photo-card::after {
  display: none;
}

.scene-device {
  position: absolute;
  left: 26px;
  bottom: 28px;
  width: min(70%, 260px);
  border: 1px solid rgba(175, 191, 204, 0.72);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 42px rgba(24, 32, 38, 0.12);
  padding: 18px;
}

.photo-card .scene-device {
  backdrop-filter: blur(14px);
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.86);
}

.scene-device span,
.scene-device em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}

.scene-device strong {
  display: block;
  margin: 8px 0;
  font-size: 18px;
}

.scene-status {
  position: absolute;
  right: 26px;
  bottom: 32px;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  padding: 9px 13px;
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.22);
}

.lp-usecase-copy {
  padding: 22px;
}

.lp-usecase-grid article strong {
  color: #075e56;
  font-size: 15px;
  line-height: 1.5;
}

.lp-flow {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.lp-flow div {
  min-height: 280px;
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: end;
  background-image:
    linear-gradient(180deg, rgba(17, 24, 32, 0.08), rgba(17, 24, 32, 0.76)),
    var(--photo);
  background-size: cover;
  background-position: center;
  color: #fff;
  border: 0;
}

.lp-flow span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e7f3f1;
  color: #075e56;
  font-weight: 900;
  margin-bottom: 12px;
}

.lp-flow p {
  color: rgba(255, 255, 255, 0.82);
}

.lp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lp-tags span {
  border: 1px solid #cfe4df;
  background: #f2fbf8;
  color: #075e56;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 900;
}

.lp-price-list {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  max-width: 1124px;
}

.lp-price-list article {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-content: start;
  min-height: 220px;
  grid-column: span 2;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.lp-price-list article::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid transparent;
  background: transparent;
  pointer-events: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.lp-price-list article:hover,
.lp-price-list article:focus-within {
  transform: translateY(-8px) scale(1.018);
  border-color: rgba(15, 118, 110, 0.58);
  background: linear-gradient(180deg, #ffffff 0%, #f7fcfb 100%);
  box-shadow: 0 24px 54px rgba(15, 118, 110, 0.18);
}

.lp-price-list article:hover::before,
.lp-price-list article:focus-within::before {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.16);
}

.lp-price-list strong {
  display: block;
  font-size: 28px;
  line-height: 1.2;
}

.lp-price-list article:nth-child(4) {
  grid-column: 2 / span 2;
}

.lp-price-list article:nth-child(5) {
  grid-column: 4 / span 2;
}

.lp-price-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.lp-cta {
  margin: 0 auto 78px;
  max-width: 1124px;
  border-radius: 16px;
  padding: 48px 28px;
  background: #111820;
  color: #fff;
  text-align: center;
}

.lp-cta p {
  color: #cbd5df;
}

.lp-footer {
  min-height: 76px;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .lp-header {
    padding: 0 18px;
    max-width: 100vw;
    overflow: hidden;
  }

  .lp-nav a:not(.lp-login) {
    display: none;
  }

  .lp-hero {
    grid-template-columns: 1fr;
    padding: 42px 20px 62px;
    max-width: 100vw;
    overflow: hidden;
  }

  .lp-hero-copy {
    min-width: 0;
    width: 100%;
    max-width: 350px;
  }

  .lp-hero-copy h1 {
    font-size: 40px;
    line-height: 1.08;
    max-width: 330px;
    word-break: break-all;
  }

  .lp-hero-copy p {
    font-size: 16px;
    line-height: 1.75;
    max-width: 330px;
  }

  .lp-actions {
    gap: 8px;
  }

  .lp-login {
    display: none;
  }

  .lp-device-stage {
    min-height: 330px;
    overflow: hidden;
    max-width: 100%;
  }

  .lp-laptop {
    width: 96%;
    transform: rotateY(-10deg) rotateX(6deg) rotateZ(-1deg);
  }

  .lp-app-shot {
    height: 250px;
    grid-template-columns: 82px 1fr;
  }

  .lp-app-shot aside {
    padding: 12px 8px;
    font-size: 10px;
  }

  .lp-shot-brand strong {
    display: none;
  }

  .lp-app-shot main {
    padding: 12px;
  }

  .lp-shot-metrics {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .lp-shot-metrics div {
    padding: 10px;
  }

  .lp-shot-metrics strong {
    font-size: 22px;
  }

  .lp-shot-live {
    padding: 10px;
    margin: 8px 0;
  }

  .lp-phone {
    right: 6px;
    bottom: 18px;
    width: 104px;
    min-height: 142px;
    border-width: 6px;
  }

  .lp-feature-list,
  .lp-usecase-grid,
  .lp-price-list,
  .lp-flow {
    grid-template-columns: 1fr;
  }

  .lp-price-list article,
  .lp-price-list article:nth-child(4),
  .lp-price-list article:nth-child(5) {
    grid-column: auto;
  }
}
