/* ════════════════════════════════════════════════════════════
   NaukriPilot — App Dashboard CSS
   Design: dark glassmorphism, matches landing page palette
   ════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
.hidden { display: none !important; }

:root {
  --bg:          #0a0a12;
  --surface:     rgba(255,255,255,0.04);
  --surface-h:   rgba(255,255,255,0.07);
  --border:      rgba(255,255,255,0.08);
  --primary:     #6c63ff;
  --primary-h:   #7b73ff;
  --accent:      #00d4aa;
  --danger:      #ff5252;
  --success:     #00d4aa;
  --text:        #e8e8f0;
  --text-muted:  #8888aa;
  --sidebar-w:   240px;
  --sidebar-collapsed-w: 72px;
  --top-h:       60px;
  --radius:      14px;
  --radius-sm:   8px;
  --transition:  0.2s ease;
}

html { font-family: 'Inter', system-ui, sans-serif; font-size: 15px; }
body { background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; }

/* ─── Spinner ────────────────────────────────────── */
.spinner-border {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  vertical-align: text-bottom;
  border: 0.2em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border .75s linear infinite;
  margin-right: 8px;
}
@keyframes spinner-border {
  to { transform: rotate(360deg); }
}

/* ─── Shared ─────────────────────────────────────── */
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-16 { margin-top: 16px; }

/* ─── Grid overlay (matches landing) ─────────────── */
.grid-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(108,99,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,99,255,.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ════════════════════════════════════════════════════════════
   AUTH SCREEN
   ════════════════════════════════════════════════════════════ */
.auth-screen {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: var(--bg); z-index: 100;
}
.auth-screen.hidden { display: none !important; }

/* ─── Splash Screen ──────────────────────────────── */
.splash-screen {
  position: fixed; inset: 0; display: flex; flex-direction: column; 
  align-items: center; justify-content: center;
  background: var(--bg); z-index: 2000;
  transition: opacity 0.4s ease, visibility 0.4s;
}
.splash-logo {
  width: 80px; height: 80px; margin-bottom: 24px;
  animation: pulse 2s infinite ease-in-out;
}
.splash-text {
  font-size: 1.25rem; font-weight: 700; color: #fff;
  letter-spacing: -0.02em;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
}
.auth-bg { position: absolute; inset: 0; overflow: hidden; }
.auth-blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .35;
}
.auth-blob.b1 {
  width: 500px; height: 500px; top: -100px; left: -150px;
  background: radial-gradient(circle, #6c63ff 0%, transparent 70%);
}
.auth-blob.b2 {
  width: 400px; height: 400px; bottom: -80px; right: -100px;
  background: radial-gradient(circle, #00d4aa 0%, transparent 70%);
}

.auth-card {
  position: relative; z-index: 1; width: 100%; max-width: 420px;
  background: linear-gradient(180deg, rgba(18,18,30,0.92), rgba(14,14,25,0.9));
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 32px 80px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.04);
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a7a3c7;
  text-decoration: none;
  font-size: .78rem;
  font-weight: 600;
  transition: var(--transition);
}

.auth-back-link:hover {
  color: #d9d6f0;
}

.auth-secure-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,212,170,.25);
  color: #6ee8cf;
  background: rgba(0,212,170,.08);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.auth-logo {
  display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem;
  color: var(--text); text-decoration: none; margin-bottom: 14px; justify-content: center;
}

.auth-logo-mark {
  width: 22px;
  height: 22px;
  display: block;
}

.auth-headline-wrap {
  text-align: center;
  margin-bottom: 22px;
}

.auth-headline {
  font-size: 1.22rem;
  margin-bottom: 6px;
}

.auth-headline-sub {
  color: var(--text-muted);
  font-size: .82rem;
  line-height: 1.5;
}

.auth-tabs {
  display: flex; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05); padding: 4px; margin-bottom: 28px;
}
.auth-tab {
  flex: 1; padding: 8px 0; border: none; background: transparent;
  color: var(--text-muted); font-size: .875rem; font-weight: 500;
  cursor: pointer; border-radius: 6px; transition: var(--transition);
}
.auth-tab.active {
  background: var(--primary); color: #fff;
  box-shadow: 0 2px 12px rgba(108,99,255,.4);
}

.auth-form .field { margin-bottom: 18px; }
.auth-form label { display: block; font-size: .8rem; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.auth-form input {
  width: 100%; padding: 11px 14px; background: rgba(255,255,255,0.06);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-size: .9rem; outline: none; transition: var(--transition);
}
.auth-form input:focus { border-color: var(--primary); background: rgba(108,99,255,0.08); }

.auth-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
  margin-bottom: 8px;
}

.auth-link-btn {
  color: #b7b3ff;
  font-size: .8rem;
  text-decoration: none;
  cursor: pointer;
}

.auth-link-btn:hover {
  text-decoration: underline;
}

.auth-error { color: var(--danger); font-size: .8rem; min-height: 20px; margin-bottom: 6px; }
.auth-info { color: var(--accent); font-size: .8rem; min-height: 20px; margin-bottom: 6px; }

.auth-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(5, 6, 14, .78);
  backdrop-filter: blur(6px);
  z-index: 200;
}

.auth-modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(18,18,30,0.96), rgba(12,12,24,0.94));
  padding: 26px 22px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
}

.auth-modal-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.auth-modal-card p {
  color: var(--text-muted);
  font-size: .82rem;
  line-height: 1.5;
  margin-bottom: 18px;
}

.auth-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: #c6c3df;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.auth-modal-close:hover {
  color: #fff;
  border-color: rgba(255,255,255,.2);
}

.confirm-modal-card {
  max-width: 460px;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
}

.confirm-cancel {
  padding: 10px 14px;
}

.confirm-danger-btn {
  border: 1px solid rgba(255,107,138,.48);
  background: linear-gradient(135deg, rgba(255,107,138,.22), rgba(214,67,103,.24));
  color: #ffd4de;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .86rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.confirm-danger-btn:hover {
  border-color: rgba(255,107,138,.62);
  color: #ffe9ee;
  transform: translateY(-1px);
}

.btn-auth {
  width: 100%; padding: 13px; border: none; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), #4834d4);
  color: #fff; font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: var(--transition); box-shadow: 0 4px 20px rgba(108,99,255,.35);
}
.btn-auth:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-auth:disabled { opacity: .6; cursor: wait; transform: none; }

.auth-tos { font-size: .75rem; color: var(--text-muted); text-align: center; margin-top: 14px; }
.auth-tos a { color: var(--primary); text-decoration: none; }

/* ════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT
   ════════════════════════════════════════════════════════════ */
#dashboard {
  display: flex; min-height: 100vh;
}

/* ─── Sidebar ─────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
  background: rgba(12,12,24,0.96);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 50;
  transition: transform var(--transition), width var(--transition);
}

.sidebar-logo {
  display: flex; align-items: center; gap: 15px; font-weight: 700; font-size: 1.15rem;
  color: var(--text); height: var(--top-h); padding: 0 20px; border-bottom: 1px solid var(--border);
}

.sidebar-logo-mark {
  width: 30px;
  height: 30px;
  display: block;
}

.sidebar-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }

.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  color: var(--text-muted); text-decoration: none; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500; cursor: pointer; transition: var(--transition);
  border: none; background: none;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: rgba(108,99,255,.15); color: var(--primary); }

.sidebar-footer {
  padding: 16px 12px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.user-pill { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.user-email { font-size: .8rem; color: var(--text-muted); }

.logout-btn {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  padding: 6px; border-radius: 6px; display: flex; transition: var(--transition);
}
.logout-btn:hover { color: var(--danger); background: rgba(255,82,82,.1); }
.logout-btn svg { width: 18px; height: 18px; }

/* ─── Main ────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w); min-height: 100vh; flex: 1;
  padding: var(--top-h) 0 0;
}

.topbar {
  position: fixed; top: 0; left: var(--sidebar-w); right: 0; height: var(--top-h);
  display: flex; align-items: center; gap: 16px;
  background: rgba(10,10,18,0.8); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); padding: 0 28px; z-index: 30;
  transition: left var(--transition);
}
.sidebar-toggle {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  display: none; padding: 4px;
}
.page-title { font-size: 1.05rem; font-weight: 600; color: var(--text); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.btn-ghost-sm:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.top-stop-btn {
  border-color: rgba(255,82,82,.35);
  color: #ff9b9b;
}

.top-stop-btn:hover {
  border-color: rgba(255,82,82,.55);
  color: #ffc4c4;
}

.pay-state-badge {
  font-size: .72rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  letter-spacing: .02em;
  white-space: nowrap;
}

.pay-state-badge.active {
  color: #7cf5b0;
  border: 1px solid rgba(124,245,176,.4);
  background: rgba(124,245,176,.12);
}

.pay-state-badge.inactive {
  color: #ffb347;
  border: 1px solid rgba(255,179,71,.45);
  background: rgba(255,179,71,.12);
}

.pay-state-badge.paused {
  color: #d4b8ff;
  border: 1px solid rgba(168,156,255,.45);
  background: rgba(168,156,255,.12);
}

.pay-state-badge.hidden {
  display: none;
}

#manualTriggerBtn.service-active {
  border-color: rgba(108,99,255,.55);
  color: #d6d2ff;
  background: linear-gradient(135deg, rgba(108,99,255,.25), rgba(72,52,212,.15));
  box-shadow: 0 0 0 1px rgba(108,99,255,.25), 0 8px 20px rgba(108,99,255,.2);
}

#manualTriggerBtn.service-active:hover {
  color: #f2f0ff;
  border-color: rgba(123,115,255,.75);
  background: linear-gradient(135deg, rgba(123,115,255,.3), rgba(72,52,212,.2));
}

.panel { padding: 28px; max-width: 860px; }
#panelOverview { max-width: 1200px; }

/* ─── Cards ───────────────────────────────────────── */
.cards-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; position: relative; overflow: hidden;
  transition: var(--transition);
}
.card:hover { border-color: rgba(108,99,255,.3); }

.card-status { display: flex; align-items: center; gap: 16px; }

.card-icon {
  width: 44px; height: 44px; border-radius: 12px; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.card-icon svg { width: 20px; height: 20px; }
.icon-purple { background: rgba(108,99,255,.15); color: var(--primary); }
.icon-teal   { background: rgba(0,212,170,.15);  color: var(--accent); }
.icon-green  { background: rgba(0,212,170,.15);  color: var(--accent); }

.card-label { font-size: .75rem; color: var(--text-muted); font-weight: 500; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .05em; }
.card-value { font-size: 1rem; font-weight: 700; color: var(--text); }
.card-subvalue { margin-top: 4px; font-size: .76rem; color: var(--text-muted); }

/* ─── Dashboard Grid ──────────────────────────────── */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: flex-start;
}

.overview-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 1024px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
}

.overview-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-card { padding: 20px; }

.side-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.side-card-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(108,99,255,.15); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.side-card-icon svg { width: 16px; height: 16px; }
.side-card h4 { font-size: .88rem; font-weight: 700; color: var(--text); }

.plan-details { display: flex; flex-direction: column; gap: 4px; }
.plan-name { font-size: 1.1rem; font-weight: 800; color: #fff; }
.plan-expiry { font-size: .8rem; color: var(--text-muted); margin-bottom: 6px; }

.side-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.side-link {
  font-size: .75rem; color: var(--primary); font-weight: 600;
  cursor: pointer; opacity: .8;
}
.timeline-card {
  margin-top: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.timeline-title-group {
  display: flex;
  align-items: center;
}
.timeline-status-tag {
  background: rgba(108, 99, 255, 0.1);
  color: #8ab0a0;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.timeline-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.timeline-track::-webkit-scrollbar {
  height: 4px;
}
.timeline-block {
  min-width: 200px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.timeline-block:hover {
  border-color: rgba(108, 99, 255, 0.3);
}
.timeline-block.active {
  background: linear-gradient(135deg, rgba(108,99,255,0.1), rgba(0,212,170,0.05));
  border-color: rgba(108, 99, 255, 0.4);
}
.timeline-block.active::after {
  content: 'ACTIVE';
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.65rem;
  font-weight: 800;
  color: #00d4aa;
  background: rgba(0, 212, 170, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}
.timeline-block .plan-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  display: block;
}
.timeline-block .plan-dates {
  font-size: 0.8rem;
  color: #8888bb;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.timeline-block .plan-progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  margin-top: 12px;
  overflow: hidden;
}
.timeline-block .plan-progress-inner {
  height: 100%;
  background: #6c63ff;
  width: 100%;
}
.timeline-block.active .plan-progress-inner {
  background: linear-gradient(90deg, #6c63ff, #00d4aa);
}
.side-link:hover { opacity: 1; text-decoration: underline; }

.side-activity-list { display: flex; flex-direction: column; gap: 10px; }
.side-activity-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.05);
}
.side-activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.activity-dot.success { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.activity-dot.failed  { background: var(--danger); box-shadow: 0 0 8px var(--danger); }

.activity-info { flex: 1; min-width: 0; }
.activity-msg { font-size: .8rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-time { font-size: .7rem; color: var(--text-muted); }

.side-empty { font-size: .8rem; color: var(--text-muted); text-align: center; padding: 10px 0; }

.help-side-card { background: linear-gradient(135deg, rgba(108,99,255,.08), rgba(0,212,170,.04)); border-color: rgba(108,99,255,.2); }
.help-side-card p { font-size: .82rem; color: var(--text-muted); line-height: 1.5; }
.help-side-card p strong { color: var(--text); }

.help-side-card p strong { color: var(--text); }

.plan-queue-mini {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.78rem;
  color: #8ab0a0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.plan-queue-item {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.9;
}
.plan-queue-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  background: rgba(108,99,255,0.2);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

/* Premium Upgrade Card */
.upgrade-side-card {
  position: relative;
  background: linear-gradient(135deg, #6c63ff, #4834d4);
  border: none;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(108,99,255,.4);
  color: #fff;
}

.upgrade-content { position: relative; z-index: 2; }

.upgrade-tag {
  display: inline-block;
  font-size: .65rem;
  font-weight: 800;
  background: rgba(255,255,255,.2);
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
  letter-spacing: .05em;
}

.upgrade-side-card h4 { color: #fff; margin-bottom: 8px; font-size: 1rem; }
.upgrade-side-card p { font-size: .85rem; color: rgba(255,255,255,.8); line-height: 1.4; margin-bottom: 16px; }

.btn-upgrade-sm {
  background: #fff;
  color: #4834d4;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-upgrade-sm:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.upgrade-bg-icon {
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 100px;
  height: 100px;
  color: rgba(255,255,255,.1);
  transform: rotate(-15deg);
  z-index: 1;
}

/* ─── Trigger card ────────────────────────────────── */
.trigger-card {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.trigger-info h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.trigger-info p { font-size: .85rem; color: var(--text-muted); line-height: 1.5; }

.tip-card {
  background: linear-gradient(135deg, rgba(108,99,255,0.06), rgba(0,212,170,0.03));
  border-color: rgba(108,99,255,0.2);
}
.tip-card h3 { color: #fff; }
.tip-card p b { color: var(--accent); }

/* ─── Setup checklist ─────────────────────────────── */
.setup-checklist {
  border-color: rgba(108,99,255,.35);
  background: rgba(108,99,255,.06);
  margin-bottom: 20px;
}
.setup-title {
  font-size: 1rem; font-weight: 700; margin-bottom: 4px;
}
.setup-subtitle {
  font-size: .83rem; color: var(--text-muted); margin-bottom: 20px;
}
.setup-steps { display: flex; flex-direction: column; gap: 12px; }

.setup-step {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  transition: var(--transition);
}
.setup-step.step-done {
  border-color: rgba(0,212,170,.2);
  background: rgba(0,212,170,.04);
}
.step-icon { font-size: 1.1rem; flex-shrink: 0; line-height: 1; }
.step-body {
  flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.step-label { font-size: .875rem; font-weight: 600; color: var(--text); }
.step-done .step-label { color: var(--accent); }
.step-hint { font-size: .78rem; color: var(--text-muted); }
.step-btn {
  flex-shrink: 0; padding: 7px 14px;
  border: 1px solid var(--primary); border-radius: var(--radius-sm);
  background: rgba(108,99,255,.12); color: var(--primary);
  font-size: .8rem; font-weight: 600; cursor: pointer;
  transition: var(--transition); white-space: nowrap;
}
.step-btn:hover { background: rgba(108,99,255,.25); transform: translateX(2px); }

/* Trigger button when disabled (setup incomplete) — warm amber hint */
#triggerBtn:disabled {
  background: linear-gradient(135deg, #6b6b6b, #444);
  opacity: .5; cursor: not-allowed;
  box-shadow: none;
}


/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border: none; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), #4834d4);
  color: #fff; font-size: .875rem; font-weight: 600; cursor: pointer;
  transition: var(--transition); box-shadow: 0 4px 16px rgba(108,99,255,.3);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.1); }
.btn-primary:disabled { opacity: .6; cursor: wait; transform: none; }

.btn-ghost-sm {
  padding: 8px 14px; background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); font-size: .8rem; border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition);
}
.btn-ghost-sm:hover { color: var(--text); border-color: var(--primary); }

/* ─── Toast ───────────────────────────────────────── */
.toast {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 600; z-index: 1000;
  box-shadow: 0 12px 40px rgba(0,0,0,.5); animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex; align-items: center; gap: 10px;
}
.toast.success { background: rgba(0,212,170,.18); border: 1px solid var(--accent); color: #fff; backdrop-filter: blur(12px); }
.toast.error   { background: rgba(255,82,82,.18); border: 1px solid var(--danger);  color: #fff; backdrop-filter: blur(12px); }

@keyframes slideDown { from { transform: translate(-50%, -20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

.btn-loading {
  position: relative;
  pointer-events: none;
}

/* ─── Forms ───────────────────────────────────────── */
.form-card { max-width: 520px; }
.form-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.form-subtitle { font-size: .85rem; color: var(--text-muted); margin-bottom: 24px; }
.hint { font-size: .75rem; font-weight: 400; color: var(--text-muted); }

.profile-id-help {
  margin-top: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.profile-id-help summary {
  cursor: pointer;
  font-size: .8rem;
  color: #bdb9ff;
  font-weight: 600;
  list-style: none;
}

.profile-id-help summary::-webkit-details-marker {
  display: none;
}

.profile-id-help summary::before {
  content: '';
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid var(--primary);
  margin-right: 10px;
  display: inline-block;
  transition: transform var(--transition);
  vertical-align: middle;
}

.profile-id-help[open] summary::before {
  transform: rotate(90deg);
}

.profile-id-help p {
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.profile-id-help code {
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.25);
  border-radius: 6px;
  padding: 2px 5px;
  color: #cbc8ff;
}

.profile-id-help video {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #06060a;
  display: block;
}

.profile-id-video-link {
  display: inline-block;
  margin-top: 8px;
  font-size: .76rem;
  color: #a89cff;
  text-decoration: none;
}

.profile-id-video-link:hover {
  text-decoration: underline;
}

.field { margin-bottom: 18px; }
.field label { display: block; font-size: .8rem; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 14px; background: rgba(255,255,255,0.05);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-size: .9rem; outline: none; transition: var(--transition);
}
.field input:focus { border-color: var(--primary); background: rgba(108,99,255,0.08); }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }
.eye-btn {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  display: flex; padding: 4px;
}
.eye-btn:hover { color: var(--text); }

.form-error { color: var(--danger); font-size: .8rem; min-height: 20px; margin-bottom: 12px; }

/* ─── Drop zone ───────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 40px 20px; text-align: center; cursor: pointer;
  transition: var(--transition);
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--primary); background: rgba(108,99,255,.06);
}
.drop-icon { color: var(--text-muted); margin-bottom: 12px; }
.drop-label { font-size: .95rem; font-weight: 500; margin-bottom: 4px; }
.drop-hint { font-size: .8rem; color: var(--text-muted); }
.drop-filename {
  margin-top: 12px; font-size: .85rem; color: var(--accent); font-weight: 500;
}

.resume-status { font-size: .85rem; color: var(--text-muted); margin-top: 12px; }

.resume-current {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0,212,170,.06);
  padding: 12px 14px;
}

.resume-current-title {
  font-size: .76rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
}

.resume-current-name {
  font-size: .9rem;
  color: var(--accent);
  font-weight: 700;
}

.resume-current-meta {
  margin-top: 4px;
  font-size: .78rem;
  color: var(--text-muted);
}

/* ─── Logs ────────────────────────────────────────── */
.logs-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 16px;
}
.logs-header h3 { font-size: 1.05rem; font-weight: 700; }

.logs-list { display: flex; flex-direction: column; gap: 10px; }
.logs-empty { color: var(--text-muted); font-size: .9rem; padding: 24px 0; text-align: center; }

.log-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
}
.log-badge {
  font-size: .7rem; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; flex-shrink: 0; text-transform: uppercase; letter-spacing: .05em;
}
.log-badge.success { background: rgba(0,212,170,.12); color: var(--accent); border: 1px solid rgba(0,212,170,.3); }
.log-badge.failed  { background: rgba(255,82,82,.12);  color: var(--danger);  border: 1px solid rgba(255,82,82,.3); }
.log-msg { flex: 1; font-size: .85rem; color: var(--text-muted); }
.log-time { font-size: .78rem; color: var(--text-muted); white-space: nowrap; }

.pay-badge.created {
  background: rgba(255,179,71,.12);
  color: #ffb347;
  border: 1px solid rgba(255,179,71,.35);
}

.pay-badge.paid {
  background: rgba(0,212,170,.12);
  color: var(--accent);
  border: 1px solid rgba(0,212,170,.3);
}

.pay-badge.failed {
  background: rgba(255,82,82,.12);
  color: var(--danger);
  border: 1px solid rgba(255,82,82,.3);
}

/* ─── Auth switch link ────────────────────────────── */
.auth-switch {
  font-size: .8rem; color: var(--text-muted);
  text-align: center; margin-top: 14px;
}
.auth-switch a {
  color: var(--primary); cursor: pointer; text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }

/* ─── Help panel ──────────────────────────────────── */
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
}

.help-card {
  min-height: 220px;
}

.help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.help-actions a {
  text-decoration: none;
}

/* Auth Divider and Google Button */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px 0;
  color: rgba(255,255,255,0.3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.06);
}

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: 12px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 20px;
}
.btn-google:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
}
.help-list {
  margin-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-muted);
  font-size: .85rem;
  line-height: 1.45;
}

/* ─── Pricing Modal ───────────────────────────────── */
.pricing-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fadeIn 0.3s ease;
}

.pricing-modal-content {
  background: #12121e; border: 1px solid rgba(108,99,255,0.3);
  border-radius: 24px; padding: 48px 32px;
  width: 100%; max-width: 960px; position: relative;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}

.pricing-header { text-align: center; margin-bottom: 40px; }
.pricing-header h2 { font-size: 2rem; font-weight: 800; color: #fff; margin-bottom: 8px; }
.pricing-header p { color: var(--text-muted); font-size: .95rem; }

.pricing-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}

@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; max-height: 70vh; overflow-y: auto; padding-right: 10px; }
}

.pricing-card {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: 18px; padding: 32px 24px; display: flex; flex-direction: column;
  transition: var(--transition); position: relative;
}
.pricing-card:hover { transform: translateY(-5px); border-color: rgba(108,99,255,0.4); background: rgba(255,255,255,0.05); }

.pricing-card.popular {
  border-color: var(--primary); background: rgba(108,99,255,0.08);
  box-shadow: 0 12px 30px rgba(108,99,255,0.15);
}

.popular-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; font-size: .7rem; font-weight: 800;
  padding: 4px 12px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em;
}

.plan-title { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 4px; text-align: center; }
.plan-duration { font-size: .85rem; color: var(--text-muted); text-align: center; margin-bottom: 24px; }

.plan-price { text-align: center; margin-bottom: 32px; }
.plan-price .currency { font-size: 1.2rem; font-weight: 600; vertical-align: top; margin-right: 2px; }
.plan-price .amount { font-size: 2.5rem; font-weight: 800; color: #fff; }
.plan-price .period { color: var(--text-muted); font-size: .9rem; }

.plan-features { list-style: none; margin: 0 0 32px; padding: 0; flex: 1; }
.plan-features li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .88rem; color: #ccc; margin-bottom: 12px;
}
.plan-features li svg { color: var(--accent); flex-shrink: 0; margin-top: 2px; }

.btn-select-plan {
  width: 100%; padding: 12px; border: 1px solid var(--primary);
  border-radius: var(--radius-sm); background: transparent;
  color: var(--primary); font-size: .9rem; font-weight: 700;
  cursor: pointer; transition: var(--transition);
}
.pricing-card.popular .btn-select-plan {
  background: linear-gradient(135deg, var(--primary), #4834d4);
  color: #fff; border: none; box-shadow: 0 4px 14px rgba(108,99,255,0.3);
}
.btn-select-plan:hover { transform: scale(1.02); filter: brightness(1.2); }

@keyframes fadeIn { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } }

/* ─── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .topbar {
    left: 0;
    height: auto;
    min-height: var(--top-h);
    padding: 10px 14px;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
  }
  .page-title {
    font-size: .95rem;
  }
  .topbar-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }
  .btn-ghost-sm {
    padding: 7px 10px;
    font-size: .75rem;
  }
  .pay-state-badge {
    white-space: normal;
    font-size: .68rem;
    line-height: 1.25;
  }
  .sidebar-toggle { display: flex; }
  .cards-row { grid-template-columns: 1fr; }
  .trigger-card { flex-direction: column; align-items: flex-start; }
  .help-grid { grid-template-columns: 1fr; }
  .auth-card { margin: 16px; padding: 28px 22px; }
  .panel { padding: 18px 14px; }
  .log-item {
    flex-wrap: wrap;
    gap: 10px;
  }
  .log-time {
    white-space: normal;
  }
  .confirm-actions {
    flex-direction: column;
  }
  .confirm-cancel,
  .confirm-danger-btn {
    width: 100%;
  }
}

@media (min-width: 769px) {
  .sidebar {
    width: var(--sidebar-w);
  }

  .main-content {
    margin-left: var(--sidebar-w);
  }

  .topbar {
    left: var(--sidebar-w);
  }

  .user-email {
    opacity: 1;
    max-width: 200px;
  }
}

@media (max-width: 420px) {
  .topbar {
    padding: 8px 10px;
  }
  .btn-ghost-sm {
    font-size: .72rem;
    padding: 6px 9px;
  }
  .auth-card {
    margin: 10px;
    padding: 22px 16px;
    border-radius: 16px;
  }
}
