/* ===== HELP PANEL ===== */
.help-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.45); pointer-events: all;
}
.help-panel {
  position: fixed; bottom: 80px; right: 20px;
  width: 300px; z-index: 1001;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg, 16px); padding: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  animation: tut-fade-in 0.2s ease;
}
.help-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.help-counter { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.help-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; padding: 0; }
.help-close:hover { color: var(--text); }
.help-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.help-body { font-size: 13px; color: var(--text-2); line-height: 1.6; margin-bottom: 16px; }
.help-dots { display: flex; gap: 5px; margin-bottom: 14px; }
.help-dot { width: 6px; height: 6px; border-radius: 99px; background: var(--border); border: none; cursor: pointer; padding: 0; transition: background 0.15s, width 0.15s; }
.help-dot--active { background: var(--accent); width: 16px; }
.help-actions { display: flex; justify-content: flex-end; gap: 8px; }
.help-prev { background: none; border: none; color: var(--muted); font-size: 13px; cursor: pointer; padding: 6px 8px; }
.help-prev:hover { color: var(--text); }
.help-next { background: var(--accent); color: #fff; border: none; border-radius: var(--r-sm, 8px); font-size: 13px; font-weight: 600; padding: 7px 14px; cursor: pointer; }
.help-next:hover { background: var(--accent-hover, #1a52e0); }
@media (max-width: 768px) {
  .help-panel { right: 12px; left: 12px; width: auto; bottom: 76px; }
}

/* Help button in topbar */
.help-btn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  padding: 6px; border-radius: 8px; display: flex; align-items: center;
  transition: color 0.15s, background 0.15s;
}
.help-btn:hover { color: var(--text); background: var(--surface-hover); }

/* ===== TUTORIAL OVERLAY ===== */

.tut-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 999;
  pointer-events: none;
}

.tut-card {
  position: fixed;
  background: var(--surface, #10111c);
  border: 1px solid var(--border, #232540);
  border-radius: var(--r-lg, 16px);
  padding: 24px;
  max-width: 340px;
  width: calc(100vw - 48px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
  pointer-events: all;
  z-index: 1001;
  animation: tut-fade-in 0.22s ease;
}

@keyframes tut-fade-in {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Centered card (step 1 & 5) */
.tut-card.tut-centered {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Sidebar-anchored card (steps 2-4) */
.tut-card.tut-sidebar {
  left: 256px;
  /* top is set dynamically via JS */
}

.tut-step {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #565778);
  margin-bottom: 10px;
}

.tut-title {
  font-family: var(--font-h, 'Poppins', sans-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #eeeef4);
  margin-bottom: 8px;
  line-height: 1.3;
}

.tut-body {
  font-size: 14px;
  color: var(--text-2, #9899b8);
  line-height: 1.6;
  margin-bottom: 20px;
}

.tut-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.tut-skip {
  background: transparent;
  border: none;
  color: var(--muted, #565778);
  font-size: 13px;
  font-family: var(--font, 'Figtree', sans-serif);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--r-sm, 8px);
  transition: color 0.15s;
}
.tut-skip:hover {
  color: var(--text-2, #9899b8);
}

.tut-next {
  background: var(--accent, #2762F2);
  color: #fff;
  border: none;
  border-radius: var(--r-sm, 8px);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font, 'Figtree', sans-serif);
  padding: 8px 18px;
  cursor: pointer;
  transition: background 0.15s;
}
.tut-next:hover {
  background: var(--accent-hover, #1a52e0);
}

/* Lift bottom nav above overlay when a tab is highlighted */
.bottom-nav.tut-active {
  z-index: 1002;
}

/* Buyers onboarding step */
.tut-buyers-card { max-width: 380px !important; }
.tut-buyers-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 8px; }
.tut-buyer-row { display: flex; gap: 6px; align-items: center; }
.tut-input {
  background: var(--surface-hover, #16172a);
  border: 1px solid var(--border, #232540);
  border-radius: var(--r-sm, 8px);
  color: var(--text, #eeeef4);
  font-size: 13px;
  padding: 7px 10px;
  outline: none;
  transition: border-color 0.15s;
}
.tut-input:focus { border-color: var(--accent, #2762F2); }
.tut-input-name { flex: 1; min-width: 0; }
.tut-phone-wrap { display: flex; align-items: center; border: 1px solid var(--border, #232540); border-radius: var(--r-sm, 8px); background: var(--surface-hover, #16172a); overflow: hidden; }
.tut-phone-wrap:focus-within { border-color: var(--accent, #2762F2); }
.tut-phone-prefix { font-size: 12px; color: var(--muted); padding: 0 6px 0 8px; white-space: nowrap; }
.tut-input-phone { border: none; background: transparent; width: 96px; padding: 7px 8px 7px 0; color: var(--text, #eeeef4); font-size: 13px; outline: none; }
.tut-buyer-remove { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 0 2px; flex-shrink: 0; }
.tut-buyer-remove:hover { color: var(--danger, #f87171); }
.tut-add-buyer { background: none; border: 1px dashed var(--border, #232540); border-radius: var(--r-sm, 8px); color: var(--muted); font-size: 12px; cursor: pointer; padding: 6px 12px; width: 100%; margin-bottom: 8px; transition: border-color 0.15s, color 0.15s; }
.tut-add-buyer:hover { border-color: var(--accent, #2762F2); color: var(--accent, #2762F2); }
.tut-buyers-error { font-size: 12px; color: var(--danger, #f87171); min-height: 16px; margin-bottom: 4px; }

/* Highlighted element */
.tut-highlight {
  outline: 2px solid var(--accent, #2762F2) !important;
  outline-offset: 4px;
  border-radius: 8px !important;
  box-shadow: 0 0 0 4px rgba(39, 98, 242, 0.2) !important;
  position: relative !important;
  z-index: 1000 !important;
}

/* Arrow indicator pointing left (toward sidebar) */
.tut-card.tut-sidebar::before {
  content: '';
  position: absolute;
  top: 18px;
  left: -7px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 7px solid var(--border, #232540);
}
.tut-card.tut-sidebar::after {
  content: '';
  position: absolute;
  top: 18px;
  left: -6px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 7px solid var(--surface, #10111c);
}

/* Mobile: center card above bottom nav */
@media (max-width: 768px) {
  .tut-card.tut-sidebar {
    left: 50%;
    top: auto !important;
    bottom: calc(var(--bnav-h, 60px) + 16px);
    transform: translateX(-50%);
    max-width: calc(100vw - 32px);
  }
  .tut-card.tut-sidebar::before,
  .tut-card.tut-sidebar::after {
    display: none;
  }
}
