/* ── Reset & Base ──────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:     #25d366;
  --teal:      #00c6a7;
  --bg:        #080b12;
  --surface:   rgba(255,255,255,0.035);
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.12);
  --text:      #e8eaf0;
  --muted:     rgba(255,255,255,0.38);
  --muted2:    rgba(255,255,255,0.25);
  --red:       #ef4444;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ── Background blobs ──────────────────────────────────────────────────────── */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.blob-1 { width: 450px; height: 450px; background: rgba(37,211,102,0.07); top: -120px; right: -120px; }
.blob-2 { width: 350px; height: 350px; background: rgba(0,198,167,0.05);  bottom: 80px; left: -100px; }

/* ── Utilities ─────────────────────────────────────────────────────────────── */
.gt {
  background: linear-gradient(135deg, var(--green), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fi { animation: fi .35s ease-out; }
@keyframes fi { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.lbl {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 8px;
}

.badge {
  display: inline-block;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
}

.badge-green {
  display: inline-block;
  background: rgba(37,211,102,0.15);
  color: var(--green);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  margin-bottom: 12px;
}

/* ── Inputs ────────────────────────────────────────────────────────────────── */
.inp {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.09);
  border-radius: 11px;
  padding: 13px 15px;
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
  resize: none;
}
.inp:focus { border-color: var(--green); }
.inp::placeholder { color: var(--muted2); }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, var(--green), var(--teal));
  border: none;
  border-radius: 12px;
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 15px 24px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity .2s, transform .1s;
  letter-spacing: .2px;
  line-height: 1;
}
.btn:hover   { opacity: .88; transform: translateY(-1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.btn-danger {
  background: linear-gradient(135deg, var(--red), #dc2626) !important;
}

.btn-o {
  display: block;
  width: 100%;
  background: transparent;
  border: 1.5px solid var(--border2);
  border-radius: 12px;
  color: rgba(255,255,255,0.55);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 13px 24px;
  cursor: pointer;
  text-align: center;
  transition: all .2s;
}
.btn-o:hover { border-color: rgba(255,255,255,0.28); color: #fff; }

.btn-stack { display: grid; gap: 10px; margin-top: 16px; }

/* ── Nav ───────────────────────────────────────────────────────────────────── */
.main-nav {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 20px;
}
.nav-logo { display: flex; align-items: center; gap: 8px; }
.logo-text { font-weight: 800; font-size: 17px; }
.nav-actions { display: flex; gap: 10px; align-items: center; }

.btn-nav {
  background: rgba(255,255,255,0.06);
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  color: rgba(255,255,255,0.65);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s;
}
.btn-nav:hover { background: rgba(255,255,255,0.1); }

.btn-nav-ghost {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.3);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: color .2s;
}
.btn-nav-ghost:hover { color: rgba(255,255,255,0.65); }

/* ── Page wrap ─────────────────────────────────────────────────────────────── */
.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 20px 100px;
}

/* ── Auth page ─────────────────────────────────────────────────────────────── */
body.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-wrap { width: 100%; max-width: 420px; position: relative; z-index: 1; }
.auth-logo { text-align: center; margin-bottom: 36px; }
.auth-emoji { font-size: 38px; margin-bottom: 10px; display: block; }
.brand { font-size: 26px; font-weight: 800; }
.auth-subtitle { color: var(--muted); font-size: 13px; margin-top: 6px; }
.auth-card { padding: 28px; }

.tab-toggle {
  display: flex;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}
.ttab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  color: rgba(255,255,255,0.4);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 13px;
  transition: all .2s;
}
.ttab.active { background: rgba(37,211,102,0.2); color: var(--green); }

.field { display: flex; flex-direction: column; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }

.form-error { color: var(--red); font-size: 13px; margin-bottom: 10px; }

/* ── Onboarding ────────────────────────────────────────────────────────────── */
.center-wrap { max-width: 480px; margin: 0 auto; }
.onboard-head { text-align: center; margin-bottom: 28px; }
.onboard-head h2 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.sub { color: var(--muted); font-size: 13px; }

/* ── Niche grid ────────────────────────────────────────────────────────────── */
.niche-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.niche-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 13px 12px;
  cursor: pointer;
  text-align: left;
  transition: all .15s;
}
.niche-btn:hover { background: rgba(255,255,255,0.07); }
.niche-btn.selected {
  background: rgba(37,211,102,0.15);
  border-color: var(--green);
}
.niche-icon { font-size: 18px; flex-shrink: 0; }
.niche-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  line-height: 1.3;
}
.niche-btn.selected .niche-label { color: var(--green); }

/* ── Dashboard ─────────────────────────────────────────────────────────────── */
.dash-header { margin-bottom: 28px; }
.dash-header h2 { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.dash-niche { color: var(--muted); font-size: 13px; margin-bottom: 20px; }

.stats-row { display: flex; gap: 12px; }
.stat-card {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 12px;
  text-align: center;
}
.stat-icon { font-size: 20px; margin-bottom: 4px; }
.stat-val  { font-size: 22px; font-weight: 800; }
.stat-lbl  { font-size: 11px; color: rgba(255,255,255,0.35); margin-top: 2px; }

/* ── Tabs bar ──────────────────────────────────────────────────────────────── */
.tabs-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  gap: 4px;
}
.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  color: rgba(255,255,255,0.35);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  margin-bottom: -1px;
}
.tab-btn.active { color: var(--green); border-bottom-color: var(--green); }

/* ── Proposal row ──────────────────────────────────────────────────────────── */
.prow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s;
  margin-bottom: 10px;
}
.prow:hover { background: rgba(255,255,255,0.06); }
.prow-info  { flex: 1; min-width: 0; }
.prow-top   { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.prow-client { font-weight: 700; font-size: 14px; }
.prow-service { font-size: 12px; color: rgba(255,255,255,0.4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow-right { text-align: right; flex-shrink: 0; }
.prow-price { display: block; font-weight: 700; font-size: 14px; color: var(--green); }
.prow-date  { display: block; font-size: 11px; color: rgba(255,255,255,0.3); }
.prow-arrow { color: rgba(255,255,255,0.2); font-size: 18px; }

.empty-state { text-align: center; padding: 40px 20px; color: rgba(255,255,255,0.25); }
.empty-icon  { font-size: 36px; margin-bottom: 12px; }
.empty-state p     { font-size: 14px; }
.empty-state small { font-size: 12px; margin-top: 4px; display: block; }

/* ── Modals ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal-box {
  background: #0f1320;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 560px;
  padding: 28px;
  max-height: 92vh;
  overflow-y: auto;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.modal-head h3 { font-size: 17px; font-weight: 700; }
.modal-close {
  background: rgba(255,255,255,0.07);
  border: none;
  border-radius: 8px;
  color: rgba(255,255,255,0.5);
  width: 32px; height: 32px;
  cursor: pointer;
  font-size: 16px;
  transition: background .2s;
}
.modal-close:hover { background: rgba(255,255,255,0.13); }
.modal-desc { color: rgba(255,255,255,0.45); font-size: 14px; line-height: 1.6; margin-bottom: 24px; }

/* ── Result box ────────────────────────────────────────────────────────────── */
.rbox {
  background: rgba(37,211,102,0.05);
  border: 1px solid rgba(37,211,102,0.18);
  border-radius: 14px;
  padding: 20px 20px 44px;
  white-space: pre-wrap;
  line-height: 1.75;
  font-size: 14px;
  color: rgba(255,255,255,0.88);
  position: relative;
  margin-bottom: 8px;
}
.copy-btn {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(37,211,102,0.2);
  border: none;
  border-radius: 8px;
  color: var(--green);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  cursor: pointer;
  transition: background .2s;
}
.copy-btn:hover { background: rgba(37,211,102,0.35); }

/* ── Status row (detail modal) ─────────────────────────────────────────────── */
.status-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}
.status-btn {
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 4px 12px;
  cursor: pointer;
  color: rgba(255,255,255,0.4);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  transition: all .15s;
}
.status-btn.active {
  background: var(--sbg);
  border-color: var(--sc);
  color: var(--sc);
}

/* ── Niche tag (new proposal) ──────────────────────────────────────────────── */
.niche-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(37,211,102,0.08);
  border: 1px solid rgba(37,211,102,0.15);
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--green);
  font-weight: 600;
}

.tool-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  margin: 20px 0 10px;
}

.loading-msg {
  text-align: center;
  padding: 18px 0;
  color: rgba(255,255,255,0.4);
  font-size: 14px;
  animation: pulse 1.6s ease-in-out infinite;
}