:root {
  color-scheme: light;
  --canvas: #f4f6f4;
  --surface: #fff;
  --soft: #f8faf8;
  --muted: #edf1ee;
  --ink: #18201e;
  --secondary: #4e5b57;
  --quiet: #63716c;
  --line: #dfe5e1;
  --strong-line: #cbd3ce;
  --accent: #0c8258;
  --accent-soft: #e3f6ee;
  --danger: #aa3339;
  --danger-soft: #fdebec;
  --warn: #855122;
  --warn-soft: #fff2df;
  --blue: #355bbb;
  --blue-soft: #eaf0ff;
  --radius: 10px;
  --shadow: 0 16px 54px rgba(21, 34, 29, 0.12);
  font-family: "Geist", "Noto Sans Arabic", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  font-size: 0.94rem;
  line-height: 1.65;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
textarea,
select,
summary {
  outline-offset: 3px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1 {
  font-size: clamp(1.55rem, 2.5vw, 2.1rem);
  line-height: 1.32;
  letter-spacing: -0.025em;
}
h2 {
  font-size: 1.12rem;
  line-height: 1.5;
}
h3 {
  font-size: 1rem;
  line-height: 1.45;
}
small,
.small {
  font-size: 0.79rem;
}
code {
  font-size: 0.81rem;
  overflow-wrap: anywhere;
}
input,
textarea,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--strong-line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface);
  line-height: 1.45;
}
textarea {
  min-height: 86px;
  resize: vertical;
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
label > span:first-child {
  display: block;
  font-size: 0.83rem;
  font-weight: 700;
  margin-block-end: 4px;
}
label.inline {
  display: flex;
  align-items: center;
  gap: 8px;
}
label.inline > span:first-child {
  margin: 0;
}
ul {
  padding-inline-start: 1.35rem;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}
summary {
  cursor: pointer;
}
[hidden] {
  display: none !important;
}
.skip-link {
  position: fixed;
  z-index: 100;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  transform: translateY(-150%);
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 8px;
}
.skip-link:focus {
  transform: none;
}
.quiet {
  color: var(--quiet);
}
.bold {
  font-weight: 700;
}
.stack {
  display: grid;
  gap: 12px;
}
.row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.row.spread {
  justify-content: space-between;
}
.ltr {
  direction: ltr;
  text-align: start;
}
.boot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 12px;
}
.spinner {
  display: inline-block;
  width: 21px;
  height: 21px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}
.icon {
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  font-size: 16px;
  line-height: 1;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 39px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
}
.btn:hover {
  background: var(--soft);
  border-color: var(--strong-line);
}
.btn.primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.btn.primary:hover {
  background: #096e4b;
}
.btn.ghost {
  background: transparent;
}
.btn.danger {
  color: var(--danger);
}
.btn.full {
  width: 100%;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--muted);
  color: var(--secondary);
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
}
.tag.green {
  background: var(--accent-soft);
  color: #086443;
}
.tag.amber {
  background: var(--warn-soft);
  color: var(--warn);
}
.tag.blue {
  background: var(--blue-soft);
  color: var(--blue);
}
.dot {
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
}
.error {
  padding: 9px 11px;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.86rem;
}
.empty {
  padding: 22px;
  color: var(--quiet);
  text-align: center;
}
.toast {
  position: fixed;
  z-index: 12;
  inset-inline-end: 20px;
  inset-block-end: 20px;
  max-width: min(440px, calc(100% - 40px));
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: 10px;
  padding: 12px 15px;
}
.toast.error {
  background: var(--danger-soft);
  border-color: #e9bdbe;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.mark {
  display: grid;
  grid-auto-flow: column;
  place-items: center;
  justify-content: center;
  gap: 3px;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 9px;
  background: #18201e;
}
.mark i {
  width: 3px;
  height: 11px;
  transform: rotate(15deg);
  border-radius: 3px;
  background: #38d99d;
}
.mark i:nth-child(2) {
  height: 19px;
}
.mark i:nth-child(3) {
  height: 8px;
}
.brand strong {
  display: block;
  line-height: 1.2;
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.brand small {
  line-height: 1.2;
  color: var(--quiet);
}
.login {
  display: grid;
  grid-template-columns: minmax(300px, 410px) minmax(330px, 515px);
  min-height: 100svh;
  justify-content: center;
  align-content: center;
  gap: 20px;
  padding: 30px;
  max-width: 1150px;
  margin: auto;
}
.login-card,
.login-side {
  padding: clamp(24px, 4vw, 43px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.login-card {
  display: grid;
  align-content: center;
  gap: 22px;
  min-height: 435px;
}
.login-side {
  display: grid;
  align-content: space-between;
  min-height: 435px;
  background:
    radial-gradient(circle at 10% 84%, #1c5140, transparent 44%), #172720;
  color: #f1f6f2;
  position: relative;
  overflow: hidden;
}
.login-side::after {
  content: "";
  pointer-events: none;
  position: absolute;
  width: 270px;
  height: 270px;
  inset-inline-end: -100px;
  inset-block-end: -135px;
  border: 1px solid #83cbb64a;
  border-radius: 50%;
  box-shadow:
    0 0 0 24px #83cbb624,
    0 0 0 48px #83cbb612;
}
.login-side h2 {
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  line-height: 1.35;
  max-width: 14ch;
}
.login-side p {
  margin-top: 12px;
  color: #c1d9cd;
  max-width: 32ch;
}
.login-feature {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border-block-start: 1px solid #83a89448;
  color: #dce9e3;
}
.login-feature .icon {
  color: #7bddb1;
}
.login-card form {
  display: grid;
  gap: 13px;
}
.login-card form .btn {
  margin-block-start: 4px;
}
.shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100svh;
}
.sidebar {
  position: sticky;
  inset-block-start: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 17px 11px 11px;
  background: var(--surface);
  border-inline-end: 1px solid var(--line);
  z-index: 4;
}
.sidebar .brand {
  padding: 3px 6px 11px;
}
.workspace {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px;
  min-width: 0;
}
.workspace .icon,
.avatar {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}
.workspace .icon {
  width: 33px;
  height: 33px;
  flex-basis: 33px;
}
.workspace strong,
.profile strong {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.workspace small,
.profile small {
  display: block;
  color: var(--quiet);
}
.workspace select {
  margin-top: 8px;
  font-size: 0.8rem;
  padding: 5px 8px;
}
.sidebar nav {
  display: grid;
  gap: 3px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  font-weight: 650;
  color: var(--secondary);
  font-size: 0.87rem;
}
.nav-link:hover {
  background: var(--soft);
  color: var(--ink);
}
.nav-link[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
}
.profile {
  margin-block-start: auto;
  border-block-start: 1px solid var(--line);
  padding: 12px 4px 0;
}
.profile .avatar {
  width: 33px;
  height: 33px;
}
.profile button {
  margin-block-start: 10px;
}
.page-frame {
  min-width: 0;
}
.topbar {
  min-height: 62px;
  padding: 10px clamp(15px, 3.5vw, 34px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-block-end: 1px solid var(--line);
  background: var(--surface);
}
.crumb {
  font-size: 0.81rem;
  color: var(--quiet);
}
.topbar p {
  font-weight: 750;
}
.page {
  max-width: 1500px;
  margin: auto;
  padding: clamp(17px, 3vw, 34px);
  display: grid;
  gap: 18px;
  min-width: 0;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.page-heading p {
  margin-top: 5px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 0;
}
.panel-pad {
  padding: 15px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-block-end: 1px solid var(--line);
  flex-wrap: wrap;
}
.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.metric {
  padding: 15px;
  display: grid;
  gap: 6px;
}
.metric strong {
  font-size: 1.85rem;
  line-height: 1.2;
}
.metric .icon {
  background: var(--accent-soft);
  border-radius: 7px;
  color: var(--accent);
  height: 29px;
  width: 29px;
}
.dashboard-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.quick-link {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 15px;
}
.quick-link:hover {
  border-color: var(--accent);
}
.quick-link .icon {
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  height: 30px;
  width: 30px;
}
.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.tab {
  border: 1px solid transparent;
  background: transparent;
  padding: 6px 9px;
  border-radius: 7px;
  color: var(--secondary);
  font-size: 0.84rem;
  font-weight: 700;
}
.tab[aria-selected="true"] {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}
.tab:hover {
  background: var(--soft);
}
.rule {
  border: 0;
  border-block-start: 1px solid var(--line);
  margin: 4px 0;
}
.workflow-grid {
  display: grid;
  grid-template-columns: 195px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}
.workflow-list {
  padding: 8px;
  display: grid;
  gap: 5px;
}
.workflow-option {
  display: block;
  text-align: start;
  padding: 8px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  width: 100%;
  overflow-wrap: anywhere;
}
.workflow-option:hover {
  background: var(--soft);
}
.workflow-option[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: #bce8d5;
  color: #11694e;
}
.graph-toolbar {
  padding: 8px 11px;
  display: flex;
  justify-content: space-between;
  gap: 5px;
  flex-wrap: wrap;
  border-block-start: 1px solid var(--line);
  background: var(--soft);
}
.canvas-viewport {
  overflow: auto;
  min-height: 310px;
  max-height: 560px;
  direction: ltr;
  background:
    radial-gradient(#d3dcd6 1px, transparent 1px) 0 0/17px 17px,
    var(--soft);
  position: relative;
}
.graph {
  position: relative;
  min-width: 100%;
  min-height: 310px;
}
.graph canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.flow-node {
  position: absolute;
  width: 158px;
  min-height: 65px;
  display: grid;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--strong-line);
  border-radius: 10px;
  padding: 6px 9px;
  box-shadow: 0 2px 5px #14251c0c;
  text-align: start;
  color: var(--ink);
  overflow-wrap: anywhere;
  touch-action: pan-x pan-y;
}
.flow-node[aria-pressed="true"] {
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  padding: 5px 8px;
  z-index: 1;
}
.flow-node .node-type {
  font-size: 0.66rem;
  font-weight: 800;
  color: var(--quiet);
}
.flow-node .node-type.ai {
  color: #6a45ad;
}
.flow-node .node-type.tool {
  color: var(--blue);
}
.flow-node .node-type.condition {
  color: var(--warn);
}
.flow-node .node-type.review {
  color: var(--danger);
}
.flow-node strong {
  font-size: 0.8rem;
  line-height: 1.3;
}
.graph-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-block-start: 1px solid var(--line);
}
.graph-footer > section {
  padding: 12px;
  min-width: 0;
}
.graph-footer > section + section {
  border-inline-start: 1px solid var(--line);
}
.edge-list {
  display: grid;
  gap: 5px;
  max-height: 230px;
  overflow: auto;
}
.edge-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  border-block-end: 1px solid var(--line);
}
.edge-row small {
  display: block;
}
.field-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.coordinates label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.coordinates input {
  max-width: 84px;
}
.preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.preview-grid .panel {
  background: var(--soft);
}
.trace {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.trace li {
  border-inline-start: 2px solid var(--accent);
  padding: 2px 9px;
  background: var(--soft);
  overflow-wrap: anywhere;
}
.inbox-grid {
  display: grid;
  grid-template-columns: minmax(230px, 0.75fr) minmax(0, 1.5fr);
  gap: 12px;
  align-items: start;
}
.case-list {
  max-height: 640px;
  overflow: auto;
}
.case-row {
  display: block;
  text-align: start;
  width: 100%;
  padding: 11px 13px;
  background: var(--surface);
  border: 0;
  border-block-end: 1px solid var(--line);
}
.case-row:hover {
  background: var(--soft);
}
.case-row[aria-pressed="true"] {
  background: var(--accent-soft);
}
.case-row p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dialogue {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  min-height: 145px;
  max-height: 540px;
  padding: 14px;
}
.message {
  align-self: start;
  max-width: min(75%, 570px);
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 12px 12px 4px 12px;
  background: var(--surface);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.message.outbound {
  align-self: end;
  border-radius: 12px 12px 12px 4px;
  border-color: #bde7d7;
  background: var(--accent-soft);
}
.message .message-meta {
  display: block;
  color: var(--quiet);
  font-size: 0.73rem;
  white-space: normal;
}
.source-row {
  padding: 10px 12px;
  border-block-end: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.source-row p {
  max-width: 70ch;
}
.review-note {
  background: var(--warn-soft);
  color: var(--warn);
  border-radius: 8px;
  padding: 9px 12px;
}
.phone-layout {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 410px);
  gap: 18px;
  align-items: start;
  justify-content: center;
}
.phone {
  padding: 6px;
  border-radius: 26px;
  border: 1px solid var(--strong-line);
  background: #283d36;
  box-shadow: var(--shadow);
  min-width: 0;
}
.screen {
  border-radius: 21px;
  overflow: hidden;
  background: var(--soft);
  min-height: 490px;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  padding: 11px 13px;
  border-block-end: 1px solid var(--line);
}
.chat-header small {
  display: block;
}
.chat-header .avatar {
  width: 36px;
  height: 36px;
}
.screen .dialogue {
  min-height: 310px;
  max-height: 433px;
}
.composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px;
  background: var(--surface);
  border-block-start: 1px solid var(--line);
}
.phone-entry {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 21px;
}
.phone-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}
.table-wrap {
  overflow: auto;
}
.tool-table {
  width: 100%;
  border-collapse: collapse;
}
.tool-table th,
.tool-table td {
  padding: 8px 11px;
  border-block-end: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
}
.tool-table thead {
  background: var(--soft);
}
.tool-table td:nth-child(2) {
  min-width: 170px;
}
.tool-table td:first-child {
  width: 82px;
}
.filters {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.mobile-nav {
  display: none;
}
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 184px minmax(0, 1fr);
  }
  .workflow-grid {
    grid-template-columns: 155px minmax(0, 1fr);
  }
  .graph-footer {
    grid-template-columns: 1fr;
  }
  .graph-footer > section + section {
    border-inline-start: 0;
    border-block-start: 1px solid var(--line);
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .topbar {
    min-height: 54px;
  }
  .mobile-nav {
    display: flex;
    gap: 2px;
    overflow: auto;
    border-block-end: 1px solid var(--line);
    background: var(--surface);
    padding: 4px 7px;
  }
  .mobile-nav .nav-link {
    flex: 0 0 auto;
    padding: 5px 6px;
    white-space: nowrap;
  }
  .mobile-nav .icon {
    width: 16px;
    height: 18px;
    flex-basis: 16px;
    font-size: 12px;
  }
  .workflow-grid,
  .inbox-grid {
    grid-template-columns: 1fr;
  }
  .workflow-list {
    display: flex;
    gap: 5px;
    overflow: auto;
    align-items: stretch;
  }
  .workflow-option {
    width: auto;
    min-width: 135px;
  }
  .phone-layout {
    grid-template-columns: minmax(0, 410px);
  }
  .login {
    grid-template-columns: minmax(0, 420px);
    padding: 16px;
    gap: 12px;
  }
  .login-card {
    min-height: 0;
  }
  .login-side {
    min-height: 0;
  }
  .login-side .stack {
    display: none;
  }
  .dashboard-metrics {
    gap: 5px;
  }
  .metric {
    padding: 9px;
  }
  .metric strong {
    font-size: 1.4rem;
  }
  .dashboard-actions,
  .preview-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.graph-scale {
  position: relative;
  overflow: hidden;
}
.graph {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: left top;
  min-width: 0;
}
.flow-node .node-type.trigger,
.flow-node .node-type.reply {
  color: #6a45ad;
}
.flow-node .node-type.read {
  color: var(--blue);
}
.flow-node .node-type.handoff {
  color: var(--danger);
}
dialog {
  width: min(460px, calc(100% - 28px));
  max-height: 90svh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: #17272066;
}
.graph-footer a {
  color: var(--accent);
  text-decoration: underline;
}
.canvas-viewport .graph-scale {
  min-height: 100%;
}
.topbar .mobile-nav {
  padding: 0;
  border: 0;
}
.login-side h2 {
  margin-top: 13px;
}
.case-row[aria-pressed="true"] {
  border-inline-start: 3px solid var(--accent);
  padding-inline-start: 10px;
}

.staff-reviews {
  display: grid;
  gap: 6px;
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
}
.staff-reviews li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-block-start: 1px solid #85512225;
  padding-block: 5px;
}
