:root {
  --bg: #f5f7fc;
  --surface: #ffffff;
  --surface-alt: #f8faff;
  --surface-ghost: rgba(255, 255, 255, 0.72);
  --sidebar: #09112b;
  --sidebar-2: #0e1638;
  --text: #15203b;
  --muted: #6f7893;
  --line: #e6eaf5;
  --violet: #5648ff;
  --violet-2: #7c5cff;
  --green: #17b26a;
  --green-soft: rgba(23, 178, 106, 0.12);
  --blue-soft: rgba(77, 125, 255, 0.12);
  --orange-soft: rgba(255, 133, 51, 0.14);
  --shadow-xl: 0 34px 80px rgba(25, 38, 74, 0.12);
  --shadow-md: 0 18px 48px rgba(25, 38, 74, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(86, 72, 255, 0.06), transparent 28%),
    radial-gradient(circle at bottom right, rgba(61, 215, 155, 0.06), transparent 24%),
    var(--bg);
}

svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 28px 18px 22px;
  color: #f2f4ff;
  background:
    radial-gradient(circle at 15% 88%, rgba(91, 77, 255, 0.34), transparent 24%),
    radial-gradient(circle at 50% 118%, rgba(65, 101, 255, 0.22), transparent 30%),
    linear-gradient(180deg, #09102a 0%, #0b1230 54%, #0a1028 100%);
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 10px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, #7568ff, #4d37ff);
  color: #fff;
  font-family: "Sora", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 18px 34px rgba(88, 71, 255, 0.35);
}

.brand-kicker,
.status-label,
.section-kicker,
.coming-soon__label {
  margin: 0 0 4px;
  font-size: 0.67rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sidebar h1,
.topbar h2,
.surface h3,
.channel-panel h4,
.ops-card h4 {
  margin: 0;
  font-family: "Sora", sans-serif;
  letter-spacing: -0.03em;
}

.sidebar__nav {
  display: grid;
  gap: 8px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  color: rgba(241, 244, 255, 0.92);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  background: linear-gradient(135deg, rgba(101, 79, 255, 0.52), rgba(89, 73, 245, 0.68));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 34px rgba(60, 55, 150, 0.32);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 6px;
  width: 54px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #d4cfff 56%, rgba(255, 255, 255, 0));
}

.nav-link__icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: inherit;
}

.nav-link__icon svg,
.icon-button svg,
.tenant-chip__icon svg,
.copy-button svg,
.ops-card__icon svg,
.section-icon svg {
  width: 20px;
  height: 20px;
}

.sidebar__status,
.workspace-switcher {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 19, 46, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar__status {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  border-radius: 18px;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(23, 178, 106, 0.16);
}

.sidebar__status strong {
  display: block;
  margin-top: 2px;
  font-size: 0.9rem;
}

.status-arrow,
.workspace-switcher__caret,
.tenant-chip__caret {
  margin-left: auto;
  font-size: 1.2rem;
  opacity: 0.7;
}

.workspace-switcher {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  color: #eff3ff;
  font-size: 0.92rem;
}

.workspace-switcher__badge {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(87, 73, 255, 0.24);
  font-weight: 800;
}

.workspace {
  padding: 14px 24px 24px;
  display: grid;
  gap: 18px;
}

.topbar,
.surface,
.workspace-footer__pill {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 245, 0.92);
  box-shadow: var(--shadow-md);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 16px 8px 12px;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
}

.topbar__summary h2 {
  max-width: 18ch;
  font-size: clamp(1.6rem, 2vw, 2.15rem);
  line-height: 1.08;
}

.topbar__summary p:last-child,
.surface__header p,
.ops-card p,
.coming-soon__item span,
.inline-feedback {
  color: var(--muted);
}

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

.icon-button,
.tenant-chip,
.primary-button,
.copy-button,
.ops-link {
  border: none;
}

.icon-button,
.tenant-chip {
  background: var(--surface);
  border: 1px solid var(--line);
}

.icon-button {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #1f2d50;
}

.tenant-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 15px;
  color: #1f2d50;
  font-weight: 700;
}

.tenant-chip__icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--violet);
  background: rgba(86, 72, 255, 0.12);
}

.surface {
  padding: 26px;
  border-radius: var(--radius-xl);
}

.surface--primary {
  padding-bottom: 12px;
}

.surface__header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.surface__header--compact {
  align-items: center;
}

.step-badge,
.section-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

.section-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: var(--violet);
  background: rgba(86, 72, 255, 0.08);
}

.step-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--violet-2), var(--violet));
  color: #fff;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  box-shadow: 0 16px 28px rgba(86, 72, 255, 0.25);
}

.surface__header h3 {
  font-size: 1.45rem;
}

.business-form,
.agent-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  padding: 22px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.business-form label,
.agent-form label {
  display: grid;
  gap: 8px;
}

.business-form label span,
.agent-form label span,
.definition-grid span {
  font-size: 0.84rem;
  font-weight: 700;
}

input,
select,
.tag-field {
  min-height: 58px;
  width: 100%;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid #dfe5f2;
  background: var(--surface-alt);
  color: var(--text);
}

input:focus,
select:focus {
  outline: 2px solid rgba(86, 72, 255, 0.14);
  border-color: rgba(86, 72, 255, 0.34);
}

.tag-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  color: #34415d;
  background: #eff3ff;
  font-size: 0.84rem;
  font-weight: 600;
}

.tag button {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: #637091;
  font-size: 0.9rem;
}

.form-action {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding-top: 12px;
}

.primary-button {
  padding: 0 24px;
  min-height: 48px;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--violet-2), var(--violet));
  box-shadow: 0 18px 30px rgba(86, 72, 255, 0.24);
}

.inline-feedback {
  min-height: 1.25rem;
  margin: 0;
  font-size: 0.82rem;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.95fr);
  gap: 18px;
}

.channel-panel {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.channel-panel--primary {
  border-color: rgba(23, 178, 106, 0.36);
  box-shadow: inset 0 0 0 1px rgba(23, 178, 106, 0.18);
}

.channel-panel__top,
.channel-panel__title,
.title-line {
  display: flex;
  align-items: center;
}

.channel-panel__top {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.channel-panel__title {
  gap: 14px;
}

.channel-logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 800;
  color: #fff;
}

.channel-logo--whatsapp {
  background: linear-gradient(180deg, #1ccf71, #15a755);
}

.title-line {
  gap: 10px;
}

.channel-tag,
.health-pill,
.coming-soon__item em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.channel-tag {
  color: var(--violet);
  background: rgba(86, 72, 255, 0.12);
}

.health-pill {
  color: var(--green);
  background: var(--green-soft);
}

.definition-grid {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.definition-grid > div {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.definition-grid > div:last-child {
  border-bottom: none;
}

.definition-grid strong {
  font-size: 0.88rem;
}

.definition-grid__copy {
  padding-right: 52px;
}

.copy-button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #7b86a8;
  background: #f5f7fe;
}

.status-text--ok {
  color: var(--green);
}

.coming-soon {
  margin-top: 14px;
}

.coming-soon__list {
  display: grid;
  gap: 10px;
}

.coming-soon__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fbfcff;
}

.coming-soon__item strong {
  display: block;
  margin-bottom: 4px;
}

.coming-soon__item em {
  color: #7c84a1;
  background: #f1f3fb;
  font-style: normal;
}

.agent-form {
  grid-template-columns: 1fr;
}

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

.ops-card {
  padding: 22px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.ops-card__icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  margin-bottom: 16px;
}

.ops-card__icon--violet {
  color: var(--violet);
  background: rgba(86, 72, 255, 0.1);
}

.ops-card__icon--green {
  color: var(--green);
  background: var(--green-soft);
}

.ops-card__icon--blue {
  color: #1f6bff;
  background: var(--blue-soft);
}

.ops-card__icon--orange {
  color: #ff7f32;
  background: var(--orange-soft);
}

.ops-card h4 {
  margin-bottom: 8px;
  font-size: 1.06rem;
}

.ops-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 0;
  color: var(--violet);
  font-size: 0.88rem;
  font-weight: 700;
  background: transparent;
}

.workspace-footer {
  margin-top: 2px;
}

.workspace-footer__pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 999px;
}

.workspace-footer__indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
}

@media (max-width: 1320px) {
  .ops-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

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

  .workspace {
    padding-top: 24px;
  }
}

@media (max-width: 840px) {
  .topbar,
  .surface__header,
  .channel-panel__top,
  .form-action {
    flex-direction: column;
    align-items: flex-start;
  }

  .business-form,
  .agent-form,
  .ops-grid {
    grid-template-columns: 1fr;
  }

  .form-action {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .workspace {
    padding: 12px;
  }

  .surface {
    padding: 18px;
    border-radius: 24px;
  }

  .business-form {
    padding: 16px;
  }

  .tenant-chip {
    width: 100%;
  }

  .coming-soon__item,
  .definition-grid > div {
    min-height: auto;
    padding-top: 14px;
    padding-bottom: 14px;
  }
}
