:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #fafafa;
  color: #18181b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

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

select {
  width: 100%;
  padding: 10px 12px;
  color: #172033;
  background: #fff;
  border: 1px solid #d7deea;
  border-radius: 10px;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(24, 24, 27, 0.08), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(82, 82, 91, 0.08), transparent 30%),
    #fafafa;
}

.auth-card {
  width: min(520px, 100%);
  padding: 28px;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(24, 24, 27, 0.08);
}

.auth-card h1 {
  margin-bottom: 10px;
}

.muted,
.form-note {
  color: #66728a;
  line-height: 1.6;
}

.account-summary {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.account-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #f8faff;
  border: 1px solid #e6ebf5;
  border-radius: 12px;
}

.account-summary span {
  color: #66728a;
  font-size: 13px;
}

.auth-switch {
  margin: 16px 0 0;
  color: #66728a;
  text-align: center;
}

.link-button,
.ghost-button {
  padding: 0;
  color: #18181b;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.link-button {
  margin-left: 6px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ghost-button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
}

.ghost-button:hover {
  background: #f4f4f5;
}

.shell {
  min-height: 100vh;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

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

.user-chip {
  display: grid;
  gap: 2px;
  padding: 9px 12px;
  background: #fff;
  border: 1px solid #e2e7f0;
  border-radius: 14px;
  text-align: right;
}

.user-chip span {
  color: #66728a;
  font-size: 12px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tabs button {
  color: #42506a;
  background: #fff;
  border: 1px solid #d7deea;
}

.tabs button.active {
  color: #fff;
  background: #2563eb;
  border-color: #2563eb;
}

.eyebrow {
  margin: 0 0 6px;
  color: #5a6785;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
}

h2 {
  margin-bottom: 0;
  font-size: 16px;
}

h3 {
  font-size: 15px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(420px, 1fr) 360px;
  gap: 16px;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(420px, 760px);
  gap: 16px;
}

.panel {
  min-height: 720px;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.05);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #edf1f7;
}

.panel-header span {
  display: block;
  margin-top: 4px;
  color: #6f7a94;
  font-size: 13px;
}

.empty {
  margin: 20px;
  color: #717d96;
  line-height: 1.6;
}

.empty.compact {
  margin: 12px 20px;
}

.empty.tall {
  display: grid;
  min-height: 360px;
  place-items: center;
  text-align: center;
}

.table-wrap {
  overflow: auto;
}

.customer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.customer-table th,
.customer-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf1f7;
  text-align: left;
  vertical-align: top;
}

.customer-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #5a6785;
  background: #f8faff;
  font-weight: 600;
}

.customer-table tr {
  cursor: pointer;
}

.customer-table tbody tr:hover,
.customer-table tbody tr.active {
  background: #eef5ff;
}

.customer-table small {
  display: block;
  max-width: 180px;
  margin-top: 4px;
  color: #7a859d;
  overflow: hidden;
  text-overflow: ellipsis;
}

.truncate {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  padding: 4px 8px;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  font-size: 12px;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 360px;
  max-height: 430px;
  padding: 20px;
  overflow: auto;
}

.message {
  max-width: 76%;
  padding: 12px 14px;
  background: #f3f6fb;
  border-radius: 16px;
}

.message.inbound {
  align-self: flex-start;
}

.message.outbound {
  align-self: flex-end;
  background: #e8f2ff;
}

.message-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
  color: #6d7890;
  font-size: 12px;
}

.message p {
  margin-bottom: 0;
  white-space: pre-wrap;
}

.inbound-form {
  margin: 20px;
  padding: 18px;
  background: #f8faff;
  border: 1px solid #e5ebf5;
  border-radius: 16px;
}

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

label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: #42506a;
  font-size: 13px;
}

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  color: #172033;
  background: #fff;
  border: 1px solid #d7deea;
  border-radius: 10px;
}

input[type="checkbox"] {
  width: auto;
}

button {
  padding: 10px 14px;
  color: #fff;
  background: #18181b;
  border: 1px solid #18181b;
  border-radius: 9px;
  cursor: pointer;
}

button.secondary {
  color: #18181b;
  background: #fff;
  border: 1px solid #d4d4d8;
}

button.small {
  padding: 7px 10px;
  font-size: 13px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.settings-form {
  padding: 20px;
}

.wide {
  grid-column: 1 / -1;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.rule-list,
.task-list {
  display: grid;
  gap: 10px;
  padding: 0 20px 20px;
}

.inline-task-form {
  display: grid;
  gap: 10px;
  margin: 12px 20px;
  padding: 12px;
  background: #fbfdff;
  border: 1px solid #e5ebf5;
  border-radius: 14px;
}

.rule-card,
.task-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  background: #f8faff;
  border: 1px solid #e5ebf5;
  border-radius: 14px;
}

.rule-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.rule-card span,
.rule-card small,
.task-card span {
  color: #66728a;
  font-size: 13px;
}

.rule-card p {
  margin-bottom: 0;
  color: #334155;
}

.detail-sections {
  display: grid;
  gap: 4px;
  padding-bottom: 14px;
}

.detail-sections h3 {
  margin: 18px 20px 0;
}

.detail-list {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 12px;
  padding: 20px;
  font-size: 14px;
}

.detail-list dt {
  color: #6d7890;
}

.detail-list dd {
  margin: 0;
  word-break: break-all;
}

.alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  color: #8f1d1d;
  background: #fff1f1;
  border: 1px solid #ffd3d3;
  border-radius: 12px;
}

.notice {
  margin-bottom: 16px;
  padding: 12px 14px;
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
}

.simulator-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 10% 12%, rgba(34, 197, 94, 0.18), transparent 30%),
    radial-gradient(circle at 90% 8%, rgba(37, 99, 235, 0.16), transparent 28%),
    #eef4f9;
}

.simulator-phone {
  width: min(760px, 100%);
  overflow: hidden;
  background: #fff;
  border: 1px solid #dbe5ef;
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(23, 32, 56, 0.16);
}

.simulator-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  color: #fff;
  background: linear-gradient(135deg, #16a34a, #2563eb);
}

.simulator-header .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.simulator-header h1 {
  font-size: 24px;
}

.link-button {
  flex: 0 0 auto;
  padding: 10px 13px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
}

.simulator-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 20px 0;
}

.simulator-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
  max-height: 440px;
  margin: 18px 20px;
  padding: 18px;
  overflow: auto;
  background: #f3f7fb;
  border: 1px solid #e0e8f2;
  border-radius: 20px;
}

.simulator-compose {
  padding: 0 20px 22px;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 0;
  padding: 0;
}

.main-area {
  min-width: 0;
  padding: 24px;
  background: #fafafa;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100vh;
  padding: 18px 14px;
  background: #fff;
  color: #18181b;
  border-right: 1px solid #e4e4e7;
  overflow: auto;
}

.brand-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #fafafa;
  border: 1px solid #e4e4e7;
  border-radius: 14px;
}

.brand-mark {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #fff;
  background: #18181b;
  border-radius: 11px;
  font-weight: 800;
}

.brand-card small,
.role-note span {
  display: block;
  margin-top: 4px;
  color: #71717a;
  font-size: 12px;
  line-height: 1.45;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  color: #52525b;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  text-align: left;
}

.side-nav-item:hover,
.side-nav-item.active {
  color: #18181b;
  background: #f4f4f5;
  border-color: #e4e4e7;
}

.side-nav-item small {
  display: block;
  margin-top: 2px;
  color: #71717a;
  font-size: 11px;
}

.side-nav-item.active small {
  color: #52525b;
}

.nav-icon {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  border-radius: 9px;
}

.role-note {
  margin-top: auto;
  padding: 14px;
  background: #fafafa;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
}

.role-note strong {
  color: #18181b;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 18px 0;
}

.stats-strip article {
  padding: 12px;
  background: #f8faff;
  border: 1px solid #e5ebf5;
  border-radius: 14px;
}

.stats-strip span,
.stats-strip small {
  display: block;
  color: #6f7a94;
  font-size: 12px;
}

.stats-strip strong {
  display: block;
  margin: 6px 0 3px;
  color: #172033;
  font-size: 22px;
}

.queue-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px 0;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  color: #52525b;
  background: #fafafa;
  border: 1px solid #e4e4e7;
  border-radius: 999px;
  font-size: 12px;
}

.filter-chip.active {
  color: #fff;
  background: #18181b;
  border-color: #18181b;
}

.customer-layout,
.handoff-layout,
.ticket-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 390px;
  gap: 16px;
}

.ticket-table small {
  max-width: 240px;
}

.kanban-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 20px 4px;
}

.kanban-strip article,
.metric-card {
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, #f8faff);
  border: 1px solid #e5ebf5;
  border-radius: 16px;
}

.kanban-strip span,
.kanban-strip small,
.metric-card span,
.metric-card small {
  display: block;
  color: #66728a;
  font-size: 12px;
}

.kanban-strip strong,
.metric-card strong {
  display: block;
  margin: 6px 0 2px;
  color: #172033;
  font-size: 26px;
}

.ticket-detail .messages {
  min-height: 220px;
  max-height: 320px;
  margin: 0 20px 20px;
  padding: 14px;
  border: 1px solid #e5ebf5;
  border-radius: 14px;
}

.action-stack {
  display: grid;
  gap: 10px;
  padding: 16px 20px 20px;
}

.organization-layout {
  display: grid;
  grid-template-columns: minmax(460px, 0.9fr) minmax(560px, 1.1fr);
  gap: 16px;
}

.organization-layout .wide-panel {
  grid-column: 1 / -1;
  min-height: auto;
}

.org-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 20px 20px;
}

.user-review-list {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.user-review-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f8faff;
  border: 1px solid #e5ebf5;
  border-radius: 16px;
}

.user-review-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.user-review-main span,
.user-review-card p,
.user-review-card small,
.org-table small {
  display: block;
  color: #66728a;
  line-height: 1.55;
}

.inline-select {
  min-width: 128px;
  padding: 8px 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #e4e4e7;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.active {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.status-pill.pending {
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}

.status-pill.rejected,
.status-pill.disabled {
  color: #9f1239;
  background: #fff1f2;
  border-color: #fecdd3;
}

.inactive-users {
  padding-top: 10px;
  border-top: 1px solid #edf1f7;
}

.inactive-users h3 {
  margin: 16px 20px 0;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(420px, 1fr));
  gap: 16px;
}

.config-grid .wide-panel {
  grid-column: 1 / -1;
}

.analytics-layout,
.notification-layout,
.workflow-test-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(420px, 1fr));
  gap: 16px;
}

.notification-layout,
.workflow-test-layout {
  grid-template-columns: minmax(560px, 1fr) 380px;
}

.analytics-layout .wide-panel,
.notification-layout .wide-panel {
  grid-column: 1 / -1;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 20px 20px;
}

.bar-list,
.health-list,
.notification-preview,
.workflow-trace,
.notification-list {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-row div,
.health-item,
.notification-card div,
.workflow-trace article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bar-row span {
  color: #66728a;
  font-size: 13px;
}

.bar-row i {
  display: block;
  height: 10px;
  overflow: hidden;
  background: #eef2f8;
  border-radius: 999px;
}

.bar-row b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #18181b, #2563eb);
  border-radius: 999px;
}

.health-item,
.notification-card,
.notification-preview article,
.workflow-trace article {
  padding: 14px;
  background: #f8faff;
  border: 1px solid #e5ebf5;
  border-radius: 16px;
}

.health-item.ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.health-item.warn,
.notification-card.warning {
  background: #fff7ed;
  border-color: #fed7aa;
}

.notification-card.urgent {
  background: #fff1f2;
  border-color: #fecdd3;
}

.health-item span,
.notification-card span,
.notification-card p,
.notification-preview span,
.workflow-trace small,
.workflow-trace em {
  color: #66728a;
  line-height: 1.55;
  font-size: 13px;
}

.notification-card p {
  margin: 8px 0 12px;
}

.workflow-trace h3 {
  margin-bottom: 2px;
}

.workflow-trace article > span {
  display: inline-grid;
  flex: 0 0 36px;
  height: 30px;
  place-items: center;
  color: #fff;
  background: #18181b;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
}

.workflow-trace article > div {
  flex: 1;
}

.workflow-trace small {
  display: block;
  margin-top: 3px;
}

.pill.success {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.pill.warning {
  color: #9a3412;
  background: #fff7ed;
  border-color: #fed7aa;
}

.pill.danger {
  color: #9f1239;
  background: #fff1f2;
  border-color: #fecdd3;
}

.policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 20px;
}

.policy-card {
  padding: 14px;
  background: #f8faff;
  border: 1px solid #e5ebf5;
  border-radius: 14px;
}

.policy-card p {
  margin: 8px 0 0;
  color: #66728a;
  line-height: 1.55;
}

.workflow-page {
  display: grid;
  grid-template-columns: 260px minmax(640px, 1fr) 340px;
  gap: 16px;
}

.workflow-library,
.workflow-canvas,
.workflow-inspector {
  min-height: 780px;
}

.workflow-library,
.workflow-inspector {
  background: #fff;
}

.flow-hint {
  margin: 14px 18px 0;
  color: #71717a;
  font-size: 12px;
  line-height: 1.5;
}

.node-library {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.node-template {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 13px 13px 13px 36px;
  color: #18181b;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  text-align: left;
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.04);
}

.node-template:hover {
  background: #fafafa;
  border-color: #d4d4d8;
  transform: translateY(-1px);
}

.node-template i,
.node-type-chip i {
  position: absolute;
  display: inline-block;
  width: 9px;
  height: 9px;
  background: #18181b;
  border-radius: 999px;
}

.node-template i {
  left: 16px;
  top: 18px;
}

.node-template.trigger i,
.workflow-node.trigger .node-type-chip i { background: #22c55e; }
.node-template.timer i,
.workflow-node.timer .node-type-chip i { background: #0ea5e9; }
.node-template.ai i,
.workflow-node.ai .node-type-chip i { background: #8b5cf6; }
.node-template.condition i,
.node-template.rule i,
.node-template.guard i,
.workflow-node.condition .node-type-chip i,
.workflow-node.rule .node-type-chip i,
.workflow-node.guard .node-type-chip i { background: #f97316; }
.node-template.integration i,
.workflow-node.integration .node-type-chip i { background: #6366f1; }
.node-template.action i,
.workflow-node.action .node-type-chip i { background: #18181b; }

.node-template span {
  color: #71717a;
  font-size: 12px;
  line-height: 1.45;
}

.workflow-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  color: #71717a;
  background: #fafafa;
  border-bottom: 1px solid #e4e4e7;
  font-size: 12px;
}

.canvas-meta {
  flex: 0 0 auto;
  padding: 5px 9px;
  color: #18181b;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 999px;
}

.workflow-board-scroll {
  height: 694px;
  overflow: auto;
  background:
    radial-gradient(circle, rgba(113, 113, 122, 0.35) 1.2px, transparent 1.2px),
    #ededed;
  background-size: 20px 20px;
}

.workflow-board {
  position: relative;
  isolation: isolate;
}

.workflow-edges {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: visible;
  pointer-events: none;
}

.workflow-edges marker path {
  fill: #71717a;
}

.workflow-edge {
  fill: none;
  stroke: #71717a;
  stroke-width: 1.8;
}

.workflow-edge.condition {
  stroke: #f97316;
  stroke-dasharray: 7 5;
}

.workflow-edge-label {
  fill: #52525b;
  font-size: 11px;
  paint-order: stroke;
  stroke: #ededed;
  stroke-width: 4px;
}

.workflow-node {
  position: absolute;
  z-index: 1;
  display: grid;
  gap: 9px;
  min-height: 132px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(24, 24, 27, 0.1);
  cursor: grab;
  user-select: none;
}

.workflow-node:hover {
  border-color: #d4d4d8;
  box-shadow: 0 14px 30px rgba(24, 24, 27, 0.13);
}

.workflow-node.dragging {
  z-index: 5;
  cursor: grabbing;
  opacity: 0.92;
}

.workflow-node.active {
  border-color: #18181b;
  box-shadow: 0 0 0 2px rgba(24, 24, 27, 0.08), 0 16px 34px rgba(24, 24, 27, 0.14);
}

.workflow-node header,
.workflow-node footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.workflow-node strong {
  color: #18181b;
  font-size: 14px;
}

.workflow-node p {
  margin: 0;
  color: #52525b;
  font-size: 12px;
  line-height: 1.45;
}

.workflow-node small {
  display: -webkit-box;
  color: #71717a;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.workflow-node footer span {
  display: inline-grid;
  min-width: 28px;
  height: 24px;
  place-items: center;
  color: #52525b;
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
}

.node-type-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px 4px 20px;
  color: #52525b;
  background: #fafafa;
  border: 1px solid #e4e4e7;
  border-radius: 999px;
  font-size: 11px;
}

.node-type-chip i {
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.drag-handle {
  color: #a1a1aa;
  font-size: 16px;
  letter-spacing: -3px;
}

.workflow-handle {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  background: #fff;
  border: 2px solid #71717a;
  border-radius: 999px;
  transform: translateY(-50%);
}

.workflow-handle.target {
  left: -7px;
}

.workflow-handle.source {
  right: -7px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(24, 24, 27, 0.28);
  backdrop-filter: blur(2px);
}

.modal-card {
  width: min(480px, 100%);
  overflow: hidden;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(24, 24, 27, 0.22);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #edf1f7;
}

.password-form {
  padding-top: 18px;
}

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

.button-row.compact {
  align-items: center;
  margin-top: 0;
}

.button-row.compact button {
  padding: 8px 10px;
  font-size: 12px;
}

.wakeup-steps {
  display: grid;
  gap: 10px;
  padding: 20px 20px 8px;
}

.wakeup-steps article {
  display: grid;
  grid-template-columns: 72px 120px 1fr;
  gap: 10px;
  align-items: center;
}

.handoff-list {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.handoff-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #f8faff;
  border: 1px solid #e5ebf5;
  border-radius: 16px;
}

.handoff-card div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.handoff-card span,
.handoff-card p {
  color: #66728a;
}

.compact-table {
  padding: 0 20px 20px;
}

@media (max-width: 1180px) {
  .app-shell,
  .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .customer-layout,
  .handoff-layout,
  .ticket-layout,
  .organization-layout,
  .config-grid,
  .workflow-page,
  .analytics-layout,
  .notification-layout,
  .workflow-test-layout {
    grid-template-columns: 1fr;
  }

  .panel {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .shell,
  .auth-shell,
  .simulator-shell {
    padding: 14px;
  }

  .app-shell {
    padding: 0;
  }

  .main-area {
    padding: 14px;
  }

  .topbar,
  .topbar-actions,
  .simulator-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .user-chip {
    text-align: left;
  }

  .form-grid,
  .simulator-meta,
  .policy-grid,
  .stats-strip,
  .kanban-strip,
  .metric-grid,
  .org-metrics,
  .side-nav,
  .wakeup-steps article {
    grid-template-columns: 1fr;
  }
}
