:root {
  --bg: #151518;
  --sidebar: #29292d;
  --panel: #292a2e;
  --panel-2: #303036;
  --line: #3f4048;
  --text: #ffffff;
  --muted: #9fa0ad;
  --green: #24e584;
  --purple: #a64ee8;
  --purple-2: #7c3df0;
  --pink: #f45493;
  --rose: #ff9fba;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(244, 84, 147, 0);
  }
  50% {
    box-shadow: 0 0 28px rgba(244, 84, 147, 0.22);
  }
}

.auth-screen {
  align-items: center;
  background: radial-gradient(circle at top, #33213f, #151518 58%);
  bottom: 0;
  display: none;
  justify-content: center;
  left: 0;
  padding: 24px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 50;
}

.auth-screen.active {
  display: flex;
}

.auth-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 11px;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 22px;
  width: 100%;
  animation: panelIn 420ms ease both;
}

.auth-brand {
  margin: 0;
}

.auth-card h1 {
  font-size: 26px;
  margin: 0;
}

.auth-card p,
.auth-card small {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.auth-card label,
.assistant-builder label,
.integration-card label {
  color: var(--muted);
  display: grid;
  font-weight: 800;
  gap: 8px;
}

.auth-card input,
.assistant-builder input,
.assistant-builder textarea,
.integration-card input,
.integration-card textarea {
  background: #333338;
  border: 1px solid #51525a;
  border-radius: 8px;
  color: #ffffff;
  min-height: 40px;
  outline: 0;
  padding: 0 12px;
}

.assistant-builder textarea,
.integration-card textarea {
  min-height: 92px;
  padding: 12px;
  resize: vertical;
}

.auth-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.auth-switch {
  background: #202126;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
}

.auth-switch button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  font-weight: 900;
  min-height: 36px;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.auth-switch button.active {
  background: linear-gradient(135deg, rgba(244, 84, 147, 0.28), rgba(166, 78, 232, 0.32));
  color: #ffffff;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
a,
input,
textarea {
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

button:active {
  transform: translateY(1px) scale(0.99);
}

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

.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  height: 100vh;
  overflow-y: auto;
  padding: 18px 15px;
  position: sticky;
  top: 0;
  transition: transform 220ms ease;
}

.brand {
  align-items: center;
  display: flex;
  margin: 0 12px 26px;
}

.brand img {
  display: block;
  height: auto;
  max-width: 238px;
  width: 100%;
}

.auth-brand img {
  max-width: 240px;
}

.mobile-close {
  display: none;
}

.plan-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 26px;
  padding: 14px 16px 18px;
}

.plan-empty {
  background: #34343a;
  border: 1px solid #4a4b54;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
  padding: 5px;
  text-align: center;
}

.credit-row {
  align-items: center;
  display: flex;
  font-size: 14px;
  font-weight: 700;
  justify-content: space-between;
}

.credit-row strong {
  color: #b65cff;
}

.meter {
  background: #595a61;
  border-radius: 99px;
  height: 8px;
  margin: 7px 0;
  overflow: hidden;
}

.meter span {
  background: var(--purple);
  display: block;
  height: 100%;
  width: 0%;
}

.plan-actions {
  display: grid;
  gap: 7px;
  grid-template-columns: 1.05fr 1.45fr;
  margin-top: 12px;
}

.plan-actions .outline-button,
.plan-actions .purple-button {
  font-size: 13px;
  padding: 0 8px;
}

.outline-button,
.purple-button,
.top-button,
.update-button,
.next-button,
.icon-button {
  border-radius: 8px;
  min-height: 38px;
  padding: 0 13px;
}

.outline-button {
  background: #2d2d32;
  border: 1px solid #575862;
  color: #ffffff;
  font-weight: 800;
  white-space: nowrap;
}

.outline-button:hover,
.top-button:hover,
.icon-button:hover,
.next-button:hover {
  border-color: rgba(255, 159, 186, 0.72);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

.purple-button,
.update-button {
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  border: 1px solid #c689ff;
  color: #ffffff;
  font-weight: 900;
}

.purple-button:hover,
.update-button:hover {
  animation: softPulse 1300ms ease infinite;
  filter: brightness(1.08);
  transform: translateY(-1px);
}

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

.nav-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  display: flex;
  gap: 12px;
  min-height: 42px;
  padding: 0 10px;
  text-align: left;
  position: relative;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.nav-item span {
  align-items: center;
  border: 1px solid #62636d;
  border-radius: 6px;
  color: #9d9eaa;
  display: inline-flex;
  font-size: 10px;
  height: 22px;
  justify-content: center;
  min-width: 28px;
}

.nav-item b {
  background: #423152;
  border: 1px solid #8d59cc;
  border-radius: 6px;
  color: #cf9cff;
  font-size: 13px;
  margin-left: auto;
  min-width: 24px;
  padding: 2px 7px;
  text-align: center;
}

.nav-item:hover,
.nav-item.active {
  background: #35353b;
  color: #d89cff;
  transform: translateX(3px);
}

.nav-item.active::before {
  background: linear-gradient(180deg, var(--rose), var(--purple));
  border-radius: 999px;
  content: "";
  height: 24px;
  left: 0;
  position: absolute;
  width: 3px;
}

.dashboards-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  margin-top: 36px;
  width: 100%;
}

.main {
  min-width: 0;
  padding: 84px 30px 58px;
  position: relative;
}

.topbar {
  align-items: center;
  background: #29292d;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  height: 65px;
  left: 320px;
  padding: 0 30px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 5;
}

.icon-button,
.top-button {
  background: #303036;
  border: 1px solid #4b4c55;
  color: #ffffff;
}

.global-search,
.table-search {
  align-items: center;
  background: #333338;
  border: 1px solid #51525a;
  border-radius: 8px;
  color: #73747f;
  display: flex;
  gap: 8px;
  height: 39px;
  padding: 0 13px;
}

.global-search {
  margin-left: auto;
  max-width: 315px;
  width: 28vw;
}

.global-search input,
.table-search input {
  background: transparent;
  border: 0;
  color: white;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.global-search > span,
.table-search > span {
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

kbd {
  color: #b0a5b5;
  font-size: 13px;
  font-family: inherit;
}

.avatar {
  background: #101014;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 900;
  height: 34px;
  width: 34px;
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: panelIn 260ms ease both;
}

.welcome h1,
.section-head h1 {
  font-size: 31px;
  line-height: 1.1;
  margin: 10px 0 8px;
}

.welcome p,
.panel p,
.service-card p {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.stats-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 34px 0 22px;
}

.stat-card,
.panel {
  background: var(--panel);
  border: 1px solid #393a42;
  border-radius: 11px;
  box-shadow: var(--shadow);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.stat-card:hover,
.panel:hover {
  border-color: rgba(255, 159, 186, 0.36);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.32);
  transform: translateY(-2px);
}

.stat-card {
  padding: 24px;
}

.stat-card span {
  color: var(--muted);
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.stat-card strong {
  display: block;
  font-size: 31px;
  margin-bottom: 8px;
}

.stat-card small {
  color: var(--green);
  font-size: 15px;
}

.dashboard-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.8fr) minmax(310px, 0.85fr);
}

.panel {
  padding: 24px;
}

.panel-heading,
.section-head,
.table-row,
.next-panel .step {
  align-items: center;
  display: flex;
}

.panel-heading,
.section-head {
  justify-content: space-between;
  gap: 14px;
}

.panel h2,
.service-card h2 {
  font-size: 18px;
  margin: 0 0 4px;
}

.chart-panel {
  min-height: 434px;
}

.filter-button {
  background: transparent;
  border: 0;
  color: var(--muted);
}

.filter-button b {
  background: #422e59;
  border: 1px solid #8e5acc;
  border-radius: 6px;
  color: #d59dff;
  padding: 0 5px;
}

.calls-chart {
  display: grid;
  grid-template-columns: 28px repeat(7, minmax(48px, 1fr));
  grid-template-rows: repeat(6, 38px) 24px;
  margin-top: 28px;
  overflow-x: auto;
}

.axis-label {
  color: white;
  font-size: 12px;
  grid-column: 1;
}

.day-column {
  align-items: end;
  display: flex;
  grid-row: 1 / 7;
  justify-content: center;
  position: relative;
}

.day-column::before {
  background: #575862;
  bottom: 0;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  right: 0;
}

.call-dot {
  background: var(--purple);
  border: 1px solid #e2bcff;
  border-radius: 4px;
  color: white;
  font-size: 11px;
  min-width: 16px;
  padding: 1px 3px;
  text-align: center;
  transition: transform 180ms ease;
}

.call-dot:hover {
  transform: translateY(-4px) scale(1.08);
}

.day-label {
  color: white;
  font-size: 12px;
  grid-row: 7;
  text-align: center;
  white-space: nowrap;
}

.next-panel {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.next-panel h2,
.next-panel > p {
  padding: 0 24px;
}

.next-panel h2 {
  margin-top: 20px;
}

.step {
  border-top: 1px solid var(--line);
  gap: 18px;
  min-height: 129px;
  padding: 20px 26px;
}

.step > span {
  align-items: center;
  border: 2px solid #a55cff;
  border-radius: 50%;
  color: #c493ff;
  display: flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.step.complete > span {
  border-color: var(--green);
  color: var(--green);
}

.step.complete strong {
  text-decoration: line-through;
}

.next-button {
  align-self: flex-end;
  background: #3b3b41;
  border: 1px solid #5b5c65;
  color: white;
  font-weight: 800;
  margin: auto 24px 12px;
}

.objective-panel {
  min-height: 452px;
}

.gauge {
  align-items: center;
  background:
    radial-gradient(circle at center, var(--panel) 0 48%, transparent 50%),
    conic-gradient(var(--green) 0 88%, transparent 88% 92%, #1dbb69 92% 100%);
  border-radius: 50%;
  display: flex;
  height: 184px;
  justify-content: center;
  margin: 40px auto 28px;
  width: 184px;
}

.gauge div {
  text-align: center;
}

.gauge span {
  color: var(--green);
  display: block;
  font-weight: 900;
  margin-bottom: 12px;
}

.gauge strong {
  font-size: 27px;
}

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

.objective-summary span {
  font-weight: 800;
}

.objective-summary b {
  display: block;
  font-size: 26px;
  margin-top: 5px;
}

.calls-panel {
  min-height: 433px;
}

.table-search {
  margin: 8px 0 22px auto;
  max-width: 245px;
}

.table-search.wide {
  margin-left: 0;
  max-width: none;
}

.empty-state {
  align-items: center;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  min-height: 228px;
  text-align: center;
}

.empty-state > span {
  align-items: center;
  background: #3b3b41;
  border-radius: 50%;
  color: var(--muted);
  display: flex;
  font-size: 11px;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.empty-state p {
  max-width: 590px;
}

.pager {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: center;
  padding-top: 12px;
}

.pager span {
  color: var(--muted);
}

.pager button {
  background: #34343a;
  border: 1px solid #555660;
  border-radius: 8px;
  color: white;
  min-height: 34px;
  min-width: 70px;
}

.section-head {
  margin-bottom: 20px;
}

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

.assistant-builder,
.integration-layout {
  display: grid;
  gap: 14px;
}

.assistant-builder {
  border-bottom: 1px solid var(--line);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
  padding-bottom: 18px;
}

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

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

.integration-card {
  display: grid;
  gap: 14px;
}

.integration-card audio {
  width: 100%;
}

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

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

.usage-box strong {
  font-size: 20px;
}

.connection-state {
  border: 1px solid #8d59cc;
  border-radius: 999px;
  color: #cf9cff;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 10px;
  width: fit-content;
}

.integration-message {
  color: #ffb0c8;
  font-size: 13px;
  line-height: 1.4;
  min-height: 18px;
}

.service-card {
  min-height: 196px;
}

.service-card button {
  margin-top: 22px;
}

.settings-panel {
  display: grid;
  gap: 16px;
  max-width: 720px;
}

.settings-panel label {
  color: var(--muted);
  display: grid;
  font-weight: 800;
  gap: 8px;
}

.settings-panel input {
  background: #333338;
  border: 1px solid #51525a;
  border-radius: 8px;
  color: #ffffff;
  min-height: 42px;
  outline: 0;
  padding: 0 12px;
}

.table-panel {
  overflow-x: auto;
}

.table-row {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  min-width: 650px;
  padding: 15px 0;
}

.table-row.table-head {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-pill {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  padding: 4px 9px;
  width: fit-content;
}

.status-pill.active {
  background: rgba(36, 229, 132, 0.12);
  color: var(--green);
}

.status-pill.paused {
  background: rgba(166, 78, 232, 0.14);
  color: #cf9cff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  margin-top: 46px;
}

.footer-links a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

dialog {
  background: #292a2e;
  border: 1px solid #595a64;
  border-radius: 12px;
  color: white;
  max-width: 420px;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.62);
}

dialog menu {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin: 22px 0 0;
  padding: 0;
}

.toast {
  background: #101014;
  border: 1px solid #5e5f67;
  border-radius: 10px;
  bottom: 22px;
  box-shadow: var(--shadow);
  color: white;
  left: 50%;
  opacity: 0;
  padding: 12px 16px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 18px);
  transition: 180ms ease;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sidebar-backdrop {
  display: none;
}

.collapsed .sidebar {
  display: none;
}

.collapsed .app-shell {
  grid-template-columns: 1fr;
}

.collapsed .topbar {
  left: 0;
}

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

  .sidebar {
    bottom: 0;
    height: 100vh;
    left: 0;
    max-width: 330px;
    position: fixed;
    top: 0;
    transform: translateX(-105%);
    width: min(86vw, 330px);
    z-index: 30;
  }

  .mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  .mobile-nav-open::after {
    background: rgba(0, 0, 0, 0.62);
    bottom: 0;
    content: "";
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 20;
  }

  .mobile-close {
    background: #34343a;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: white;
    display: block;
    font-weight: 900;
    margin: 0 0 14px auto;
    min-height: 36px;
    padding: 0 12px;
  }

  .topbar {
    left: 0;
    position: sticky;
  }

  .main {
    padding-top: 24px;
  }

  .stats-grid,
  .dashboard-grid,
  .cards-three,
  .assistant-builder,
  .integration-layout {
    grid-template-columns: 1fr;
  }

  .global-search {
    width: min(440px, 55vw);
  }
}

@media (max-width: 700px) {
  .auth-screen {
    align-items: stretch;
    padding: 14px;
  }

  .auth-card {
    align-self: center;
    max-height: calc(100vh - 28px);
    overflow-y: auto;
    padding: 20px;
  }

  .auth-actions {
    grid-template-columns: 1fr;
  }

  .auth-brand img {
    max-width: 230px;
  }

  .main,
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .topbar {
    flex-wrap: wrap;
    height: auto;
    padding-bottom: 12px;
    padding-top: 12px;
  }

  .global-search {
    order: 10;
    width: 100%;
    max-width: none;
  }

  .top-button,
  .update-button {
    flex: 1;
  }

  .welcome h1,
  .section-head h1 {
    font-size: 26px;
  }

  .stat-card,
  .panel {
    padding: 18px;
  }

  .dashboard-grid {
    gap: 16px;
  }

  .calls-chart {
    grid-template-columns: 28px repeat(7, minmax(64px, 1fr));
  }

  .section-head,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .table-row {
    min-width: 560px;
  }

  .stats-grid {
    margin-top: 20px;
  }

  .plan-actions,
  .objective-summary {
    grid-template-columns: 1fr;
  }
}
