@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@300;400;500;600&display=swap");

:root {
  --bg: #0d0f12;
  --surface: #141720;
  --surface-2: #1a1e2a;
  --border: #232838;
  --border-light: #2e3547;
  --text: #e8ecf4;
  --text-2: #8892a4;
  --text-3: #4e5a6e;
  --accent: #4ade80;
  --accent-dim: rgba(74, 222, 128, 0.12);
  --accent-border: rgba(74, 222, 128, 0.3);
  --yellow: #fbbf24;
  --yellow-dim: rgba(251, 191, 36, 0.1);
  --red: #f87171;
  --red-dim: rgba(248, 113, 113, 0.1);
  --blue: #60a5fa;
  --blue-dim: rgba(96, 165, 250, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 14px;
  min-height: 100%;
}

a {
  color: var(--blue);
  text-decoration: none;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 24px 72px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

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

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

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: var(--surface-2);
  color: var(--text-2);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
}

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

.auth-card {
  max-width: 560px;
}

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

label {
  color: var(--text-2);
  font-size: 12px;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  font-family: "IBM Plex Sans", sans-serif;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-border);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

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

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

.row-inline input {
  flex: 1;
}

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

.button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: all 0.15s ease;
}

.button,
.btn-primary {
  padding: 10px 14px;
  background: var(--accent);
  color: #0d0f12;
}

.button:hover,
.btn-primary:hover {
  background: #6ee7a0;
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.25);
}

.button-google {
  background: #fff;
  border-color: #d8dee9;
  color: #111827;
}

.button-google:hover {
  background: #f8fafc;
  box-shadow: 0 0 0 1px #d8dee9;
}

.google-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button:disabled,
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  background: var(--surface-2);
  color: var(--text-3);
  border-color: var(--border);
}

.button-disabled-billing {
  background: var(--surface-2);
  color: var(--text-3);
  border-color: var(--border);
}

.btn-secondary {
  padding: 8px 12px;
  background: var(--surface-2);
  border-color: var(--border-light);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--text-3);
  background: #202535;
}

.btn-ghost {
  padding: 8px 12px;
  background: transparent;
  border-color: var(--border);
  color: var(--text-2);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-light);
  background: var(--surface-2);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}

.hint {
  color: var(--text-2);
  font-size: 13px;
}

.hidden {
  display: none;
}

.success {
  border: 1px solid var(--accent-border);
  background: var(--accent-dim);
}

.error {
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: var(--red-dim);
  color: var(--red);
}

.fade-in {
  animation: fade-in 0.35s ease both;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.setup {
  display: grid;
  gap: 20px;
}

.wizard {
  display: grid;
  gap: 16px;
}

.wizard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.progress {
  min-width: 200px;
  display: grid;
  gap: 8px;
}

.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.wizard-body {
  display: grid;
  gap: 12px;
}

.step-image {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.dashboard-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 40;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-link.active {
  color: var(--text);
  background: var(--surface-2);
}

.github-stars-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.github-stars-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.github-stars-count {
  color: var(--text-3);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
}

.github-stars-button:hover .github-stars-count {
  color: var(--text-2);
}

.dashboard-footer {
  padding: 16px 24px;
  display: flex;
  justify-content: center;
}

.github-stars-button {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  color: var(--text-2);
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
}

.github-stars-button:hover {
  color: var(--text);
  border-color: var(--text-3);
}

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

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: linear-gradient(135deg, #4ade80, #60a5fa);
  color: #0d0f12;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.avatar-menu {
  position: relative;
}

.avatar-menu summary {
  list-style: none;
  cursor: pointer;
}

.avatar-menu summary::-webkit-details-marker {
  display: none;
}

.avatar-menu[open] summary .avatar {
  box-shadow: 0 0 0 2px var(--accent-border);
}

.avatar-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 100;
  overflow: hidden;
}

.avatar-dropdown-email {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-3);
  font-family: "IBM Plex Mono", monospace;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.avatar-dropdown-item {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: "IBM Plex Sans", sans-serif;
  text-decoration: none;
}

.avatar-dropdown-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.dashboard-main {
  flex: 1;
  display: block;
  min-height: 0;
}

.dashboard-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-section-label {
  margin: 0;
  padding: 8px 10px 4px;
  color: var(--text-3);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar-section-label.is-spaced {
  margin-top: 10px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}

.sidebar-item:hover {
  color: var(--text);
  background: var(--surface-2);
}

.sidebar-item.active {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border-light);
}

.sidebar-icon {
  width: 18px;
  text-align: center;
}

.sidebar-spacer {
  flex: 1;
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 8px;
}

.dashboard-content {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 32px;
  overflow-y: visible;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-title {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
}

.page-subtitle {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
}

.sub-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 10px;
  background: var(--yellow-dim);
  padding: 14px 18px;
  margin-bottom: 24px;
}

.sub-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sub-banner-icon {
  font-size: 18px;
}

.sub-banner-text strong {
  display: block;
  color: var(--yellow);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.sub-banner-text span {
  color: var(--text-2);
  font-size: 12px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  margin: 0;
  color: var(--text-3);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.empty-state {
  border: 1px dashed var(--border-light);
  border-radius: 12px;
  background: var(--surface);
  padding: 48px 24px;
  text-align: center;
}

.empty-icon {
  font-size: 34px;
  opacity: 0.6;
  margin-bottom: 16px;
}

.empty-title {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.empty-desc {
  margin: 0 auto 20px;
  max-width: 420px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.6;
}

.empty-steps {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.empty-step {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  padding: 10px 12px;
}

.step-num {
  width: 20px;
  height: 20px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-3);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bot-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 16px 18px;
  margin-bottom: 8px;
}

.bot-card:hover {
  border-color: var(--border-light);
}

.bot-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bot-name {
  margin: 0 0 3px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.bot-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.status-dot.active {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.status-dot.provisioning {
  background: var(--yellow);
  animation: pulse 1.5s infinite;
}

.status-dot.suspended {
  background: var(--text-3);
}

.status-dot.error {
  background: var(--red);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.45;
  }
}

.status-text {
  color: var(--text-2);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.bot-plan {
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  padding: 2px 8px;
}

.bot-plan-remaining {
  color: var(--yellow);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.bot-ip {
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-2);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  padding: 2px 6px;
}

.bot-ip-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bot-ip-copy {
  appearance: none;
  cursor: pointer;
  line-height: 1.3;
}

.bot-ip-copy:hover {
  color: var(--text);
  border-color: var(--border-light);
}

.bot-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.checklist {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
  margin-bottom: 24px;
}

.checklist-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.checklist-title {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.checklist-header .progress-bar {
  width: 200px;
  margin-top: 6px;
}

.checklist-progress {
  color: var(--text-3);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  color: inherit;
  border-bottom: 1px solid var(--border);
}

.checklist-item:last-child {
  border-bottom: 0;
}

.checklist-item[href]:hover {
  background: var(--surface-2);
}

.check-icon {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-light);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 10px;
}

.check-icon.done {
  border-color: var(--accent-border);
  background: var(--accent-dim);
  color: var(--accent);
}

.check-text {
  color: var(--text-2);
  font-size: 13px;
  flex: 1;
}

.check-text.done {
  color: var(--text-3);
  text-decoration: line-through;
}

.check-action {
  color: var(--blue);
  font-size: 11px;
  font-weight: 500;
}

.check-action-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.check-action-button:hover {
  color: #8fb0ff;
}

.plan-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
  /* override global label styles */
  color: var(--text);
  font-size: 14px;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

.plan-card:hover {
  border-color: var(--border-light);
}

.plan-card-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.plan-card-disabled:hover {
  border-color: var(--border);
}

.plan-card-selected {
  border-color: var(--accent-border);
  background: var(--accent-dim);
}

.plan-card input[type="radio"] {
  width: auto;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

.plan-card-body {
  flex: 1;
}

.plan-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.plan-card-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.plan-card-price {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.plan-card-price-free {
  color: var(--text-3);
}

.plan-card-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
}

.plan-card-features li {
  font-size: 13px;
  color: var(--text-2);
  padding-left: 10px;
  position: relative;
}

.plan-card-features li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--text-3);
}

@media (max-width: 980px) {
  .dashboard-main {
    display: block;
  }

  .dashboard-sidebar {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .dashboard-content {
    max-width: none;
    padding: 20px;
  }

  .top-nav {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
    gap: 10px;
  }

  .nav-left {
    width: 100%;
    justify-content: space-between;
  }

  .nav-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .container {
    padding: 20px 14px 48px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .page-header,
  .section-header,
  .sub-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .bot-card {
    flex-direction: column;
    align-items: flex-start;
  }
}
