/* ─── App pages (auth + dashboard) ─── */
.app-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 253, 249, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.app-header__nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-header__nav a,
.app-header__nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  color: var(--text-muted);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-sans);
}

.app-header__nav a:hover,
.app-header__nav .nav-link:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav-link__icon svg {
  display: block;
}

.app-header__user {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0 0.25rem;
}

.app-main {
  flex: 1;
  padding: 2.5rem 0 4rem;
}

.app-body--auth .app-main {
  padding: 1.5rem 0 2rem;
  display: flex;
  align-items: center;
}

.app-body--auth .app-header {
  padding: 0.65rem 0;
}

.auth-wrap {
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.auth-card__lead {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.form-group {
  margin-bottom: 0.85rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 1rem;
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  min-height: 90px;
  resize: vertical;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.35rem;
}

.tg-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--sage-soft);
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.tg-step p {
  flex: 1;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.tg-step .btn {
  flex-shrink: 0;
  padding: 0.55rem 0.85rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

.tg-step a.bot-handle,
a.bot-handle {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.tg-step a.bot-handle:hover {
  text-decoration: underline;
}

.auth-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  background: var(--bg);
  padding: 0.25rem;
  border-radius: 10px;
}

.auth-tab {
  flex: 1;
  padding: 0.5rem;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.auth-tab.is-active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.auth-panel { display: none; }
.auth-panel.is-active { display: block; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--text-light);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--accent);
  font-weight: 600;
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.alert--error {
  background: rgba(194, 78, 46, 0.1);
  color: var(--accent);
  border: 1px solid rgba(194, 78, 46, 0.2);
}

.alert--success {
  background: var(--sage-soft);
  color: var(--sage);
  border: 1px solid rgba(61, 92, 78, 0.15);
}

.alert--info {
  background: rgba(28, 25, 22, 0.04);
  color: var(--text-muted);
}

.btn--block { width: 100%; }

.btn--danger {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(194, 78, 46, 0.3);
}

.btn--danger:hover {
  background: var(--accent-soft);
}

.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.dash-header h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.dash-header p {
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.trial-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  background: var(--sage-soft);
  color: var(--sage);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
}

.trial-badge--expired {
  background: var(--accent-soft);
  color: var(--accent);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  cursor: pointer;
  display: block;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.project-card h3 {
  margin-bottom: 0.35rem;
}

.project-card__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.project-card__stats {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.project-card__stat {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.project-card__stat strong {
  display: block;
  font-size: 1.1rem;
  color: var(--text);
  font-weight: 800;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-dot::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-light);
}

.status-dot--on::before { background: #3d5c4e; }
.status-dot--off::before { background: var(--accent); }

.project-card--new {
  border-style: dashed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  color: var(--text-muted);
  cursor: pointer;
  background: transparent;
}

.project-card--new:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.project-card--new span {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.panel--flat { margin-bottom: 1.25rem; }

.panel h2 {
  font-size: 1.15rem;
  font-family: var(--font-sans);
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel__head h2 { margin-bottom: 0; }

.panel-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--accent);
  background: transparent;
  border: none;
  padding: 0.35rem 0.5rem;
  margin: -0.35rem -0.5rem;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1.2;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.panel-link:hover {
  color: var(--accent-hover);
  background: var(--accent-soft);
}

.services-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.service-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.service-item__info strong {
  display: block;
  font-size: 0.95rem;
}

.service-item__info span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.service-item__actions {
  display: flex;
  gap: 0.5rem;
}

.btn--icon {
  padding: 0.45rem 0.65rem;
  font-size: 0.8rem;
  min-width: auto;
}

.bot-status {
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--bg);
  margin-bottom: 1rem;
}

.bot-status--connected { background: var(--sage-soft); }

.bot-status strong {
  display: block;
  margin-bottom: 0.25rem;
}

.bot-status p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.steps-list {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.steps-list li {
  counter-increment: step;
  padding-left: 2.5rem;
  position: relative;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 900px) {
  .settings-grid { grid-template-columns: 1fr; }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 22, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  width: min(440px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.modal h2 {
  font-size: 1.25rem;
  font-family: var(--font-sans);
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.modal__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.modal__actions .btn { flex: 1; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.back-link:hover { color: var(--accent); }

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

/* ─── Cabinet v2 ─── */
.app-body--cabinet {
  background: linear-gradient(180deg, #f6f2ec 0%, #efe9e0 100%);
}

.app-body--cabinet .app-main {
  padding: 1.5rem 0 3rem;
}

.cabinet-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.cabinet-top h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.2rem;
}

.cabinet-top__sub {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.cabinet-top__badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.badge--on { background: var(--sage-soft); color: var(--sage); border-color: transparent; }
.badge--off { background: rgba(194,78,46,0.08); color: var(--accent); border-color: transparent; }

.tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  padding: 0.3rem;
  background: rgba(255,253,249,0.7);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
}

.tab {
  flex: 1;
  min-width: max-content;
  padding: 0.6rem 1rem;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}

.tab:hover { color: var(--text); background: rgba(255,255,255,0.5); }

.tab.is-active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(28,25,22,0.06);
}

.tab-panel { display: none; animation: fadeIn 0.25s var(--ease); }
.tab-panel.is-active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 800px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.stat-card__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-bottom: 0.35rem;
}

.stat-card__value {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.stat-card__hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.chart-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.chart-panel h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 120px;
  padding-top: 0.5rem;
}

.chart-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  max-width: 36px;
  background: linear-gradient(180deg, var(--accent) 0%, rgba(194,78,46,0.5) 100%);
  border-radius: 6px 6px 2px 2px;
  min-height: 4px;
  transition: height 0.4s var(--ease);
}

.chart-bar-wrap span {
  font-size: 0.65rem;
  color: var(--text-light);
  font-weight: 600;
}

.chats-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1rem;
  min-height: 480px;
}

@media (max-width: 768px) {
  .chats-layout { grid-template-columns: 1fr; min-height: auto; }
  .chats-layout .chat-thread { min-height: 360px; }
}

.chat-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.chat-list__head {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.chat-list__items {
  overflow-y: auto;
  max-height: 520px;
  flex: 1;
}

.chat-list__items .chat-empty {
  min-height: 200px;
  padding: 2rem 1rem;
}

.chat-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.85rem 1rem;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.15s;
  color: inherit;
}

.chat-item:hover { background: var(--bg); }
.chat-item.is-active { background: var(--accent-soft); }

.chat-item__top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.chat-item__name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.chat-item__time {
  font-size: 0.72rem;
  color: var(--text-light);
  flex-shrink: 0;
}

.chat-item__preview {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item__count {
  font-size: 0.7rem;
  color: var(--text-light);
  margin-top: 0.2rem;
}

.chat-thread {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-height: 480px;
}

.chat-thread__head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.chat-thread__head strong { display: block; font-size: 0.95rem; }
.chat-thread__head span { font-size: 0.8rem; color: var(--text-muted); }

.chat-thread__messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.msg {
  max-width: 82%;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.msg--client {
  align-self: flex-start;
  background: var(--bg);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.msg--bot {
  align-self: flex-end;
  background: var(--accent-soft);
  border: 1px solid rgba(194,78,46,0.12);
  border-bottom-right-radius: 4px;
}

.msg__time {
  display: block;
  font-size: 0.68rem;
  color: var(--text-light);
  margin-top: 0.3rem;
}

.chat-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 2rem;
  text-align: center;
}

.recent-list { display: flex; flex-direction: column; gap: 0.5rem; }

.recent-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: left;
  width: 100%;
  font-family: var(--font-sans);
}

.recent-item:hover {
  border-color: rgba(194,78,46,0.25);
  background: var(--bg-card);
}

.recent-item__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.recent-item__body { flex: 1; min-width: 0; }
.recent-item__name { font-weight: 700; font-size: 0.88rem; }

.recent-item__text {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-item__meta {
  font-size: 0.72rem;
  color: var(--text-light);
  flex-shrink: 0;
}

/* Settings toggles */
.toggle-list { display: flex; flex-direction: column; gap: 0; }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.9rem;
}

.toggle-row:last-of-type { border-bottom: none; }

.toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 26px;
  background: var(--border);
  border-radius: 100px;
  flex-shrink: 0;
  transition: background 0.2s;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s var(--ease);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle-input:checked + .toggle-switch {
  background: var(--accent);
}

.toggle-input:checked + .toggle-switch::after {
  transform: translateX(18px);
}

.plan-box {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--border);
}

.plan-box__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 0.9rem;
}

.plan-box__row span { color: var(--text-muted); }

.plan-box__note {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.plan-box__note strong { color: var(--text); }

.project-card--disabled {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: var(--border);
}

.project-card--disabled:hover {
  transform: none;
  box-shadow: none;
}

.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 1rem;
  background: #fff;
  color: var(--text);
}

.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

/* ─── Onboarding tour ─── */
.onboard-prompt {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 500;
  width: min(300px, calc(100vw - 2rem));
  padding: 1rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(28, 25, 22, 0.12);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.onboard-prompt.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.onboard-prompt__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--text-light);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.onboard-prompt__text {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 1.5rem 0.25rem 0;
  line-height: 1.35;
}

.onboard-prompt__sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.onboard-prompt__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

html.onboard-tour-active,
body.onboard-tour-active {
  overflow: hidden !important;
  height: 100%;
  touch-action: none;
}

.onboard-tour {
  position: fixed;
  inset: 0;
  z-index: 600;
  pointer-events: none;
}

.onboard-tour__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 25, 22, 0.45);
  pointer-events: auto;
}

.onboard-tour__spotlight {
  position: fixed;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(28, 25, 22, 0.45);
  background: transparent;
  pointer-events: none;
  transition: top 0.35s var(--ease), left 0.35s var(--ease), width 0.35s var(--ease), height 0.35s var(--ease);
  z-index: 1;
}

.onboard-target {
  position: relative;
  z-index: 2;
}

.onboard-tour__card {
  position: fixed;
  z-index: 3;
  width: min(340px, calc(100vw - 2rem));
  padding: 1.1rem 1.25rem;
  background: var(--bg-card);
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(28, 25, 22, 0.18);
  pointer-events: auto;
  transition: top 0.35s var(--ease), left 0.35s var(--ease);
}

.onboard-tour__progress {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.onboard-tour__title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.onboard-tour__text {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.onboard-tour__actions {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

@media (max-width: 480px) {
  .onboard-prompt {
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    width: auto;
  }

  .onboard-tour__card {
    left: 1rem !important;
    right: 1rem;
    width: auto;
  }
}
