/* Check My Aura — app pages.
   Look and feel inspired by Instagram's dark mode: near-black bg, periwinkle
   action blue, warm spectrum gradient accents, system font, compact density.
   All values are our own; no Instagram brand assets, marks, or exact
   gradients are used. */

:root {
  --bg: #0c1014;
  --bg-input: #101317;
  --card: #14171b;
  --card-hover: #191d22;
  --edge: #23262b;
  --edge-hover: #34383e;
  --ink: #f5f5f5;
  --ink-soft: #a8a8a8;
  --ink-faint: #737373;
  --blue: #708dff;
  --blue-hover: #8ba2ff;
  --grad: linear-gradient(92deg, #8b41f7 0%, #ff2e88 34%, #ff6a3d 66%, #ffcf3f 100%);
  --radius-card: 16px;
  --radius-btn: 10px;
  --radius-input: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "system-ui", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* flat design: no glow blobs (kept in HTML, hidden here) */
.aura-bg { display: none; }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px 60px; }

nav {
  display: flex; justify-content: space-between; align-items: center;
  height: 60px; margin-bottom: 28px;
}
.logo {
  font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; letter-spacing: 0.2px;
}
.logo-mark {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.95rem; color: #fff; font-weight: 800;
}
.nav-link { color: var(--ink-soft); text-decoration: none; font-size: 0.93rem; font-weight: 600; }
.nav-link:hover { color: var(--ink); }

h1 { font-size: clamp(1.5rem, 4.5vw, 2rem); font-weight: 700; letter-spacing: -0.3px; margin-bottom: 8px; }
h1 .grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { color: var(--ink-soft); margin-bottom: 24px; font-size: 0.98rem; }

.card {
  background: var(--card); border: 1px solid var(--edge);
  border-radius: var(--radius-card); padding: 20px; margin-bottom: 14px;
}
.card h2 { font-size: 1rem; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 0.93rem; }

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

label { display: block; color: var(--ink-soft); font-size: 0.8rem; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=email], select, textarea {
  width: 100%; background: var(--bg-input); border: 1px solid var(--edge);
  border-radius: var(--radius-input); padding: 11px 12px; color: var(--ink);
  font-size: 0.93rem; outline: none; font-family: inherit;
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input:focus, select:focus, textarea:focus { border-color: var(--blue); }
select { appearance: none; }
textarea { min-height: 96px; resize: vertical; }

.btn {
  background: var(--blue); color: #fff; font-weight: 700; border: none;
  border-radius: var(--radius-btn); padding: 11px 20px; font-size: 0.93rem;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
  justify-content: center; text-align: center; min-height: 40px;
}
.btn:hover { background: var(--blue-hover); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--edge);
  border-radius: var(--radius-btn); padding: 10px 18px; font-size: 0.93rem;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
  justify-content: center; font-weight: 600; min-height: 40px;
}
.btn-ghost:hover { border-color: var(--edge-hover); background: var(--card-hover); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn-row .btn, .btn-row .btn-ghost { flex: 1; min-width: 140px; }

.contact-row { display: grid; grid-template-columns: 1fr 1.5fr auto; gap: 8px; margin-bottom: 8px; }
.contact-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }
.contact-actions .btn-ghost { flex: 1; min-width: 180px; }
.remove-btn {
  background: none; border: 1px solid var(--edge); color: var(--ink-faint);
  border-radius: var(--radius-input); width: 42px; cursor: pointer; font-size: 1rem;
}
.remove-btn:hover { color: var(--ink); border-color: var(--edge-hover); }

.note { color: var(--ink-faint); font-size: 0.8rem; margin-top: 8px; line-height: 1.45; }
.error-box {
  display: none; background: rgba(255, 46, 136, 0.1); border: 1px solid rgba(255, 46, 136, 0.35);
  color: #ff7ab0; padding: 10px 14px; border-radius: var(--radius-input); margin-top: 12px; font-size: 0.88rem;
}
.success-box {
  display: none; background: rgba(112, 141, 255, 0.1); border: 1px solid rgba(112, 141, 255, 0.4);
  color: var(--blue); padding: 12px 14px; border-radius: var(--radius-input); font-weight: 600;
  margin-top: 12px; font-size: 0.88rem; word-break: break-all;
}

.toggle-row { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0; }
.toggle-row input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--blue); flex-shrink: 0; }
.toggle-row span { color: var(--ink-soft); font-size: 0.9rem; }

.status-pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem;
  font-weight: 700; letter-spacing: 0.2px;
}
.pill-invited { background: rgba(112, 141, 255, 0.12); color: var(--blue); }
.pill-opened { background: rgba(255, 207, 63, 0.12); color: #ffcf3f; }
.pill-completed { background: rgba(63, 220, 160, 0.12); color: #3fdca0; }

table.list { width: 100%; border-collapse: collapse; }
table.list td, table.list th {
  padding: 10px 8px; border-bottom: 1px solid var(--edge); text-align: left; font-size: 0.9rem;
}
table.list tr:last-child td { border-bottom: none; }
table.list th { color: var(--ink-faint); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.8px; }

/* category tick list */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cat-tick {
  display: flex; align-items: center; gap: 9px; background: var(--bg-input);
  border: 1px solid var(--edge); border-radius: var(--radius-input); padding: 11px 12px;
  cursor: pointer; color: var(--ink-soft); font-size: 0.9rem; user-select: none;
}
.cat-tick input { width: 17px; height: 17px; accent-color: var(--blue); flex-shrink: 0; }
.cat-tick.on { border-color: var(--blue); color: var(--ink); background: rgba(112, 141, 255, 0.08); }

/* chat — own messages periwinkle, AI messages gray card (DM style) */
.chat-window {
  background: var(--card); border: 1px solid var(--edge);
  border-radius: var(--radius-card); padding: 14px; min-height: 280px;
  max-height: 52vh; overflow-y: auto; margin-bottom: 12px;
}
.bubble {
  max-width: 82%; padding: 10px 14px; margin-bottom: 8px; font-size: 0.93rem;
  white-space: pre-wrap; line-height: 1.45;
}
.bubble.ai { background: var(--bg-input); border: 1px solid var(--edge); border-radius: 18px 18px 18px 4px; color: var(--ink); }
.bubble.me { background: var(--blue); color: #fff; margin-left: auto; border-radius: 18px 18px 4px 18px; }
.chat-input-row { display: flex; gap: 8px; }
.chat-input-row input { flex: 1; }
.chat-input-row .btn { min-height: 42px; }
.stage-pill {
  color: #ffcf3f; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase; margin-bottom: 6px; display: block;
}

/* report */
.report-body { white-space: pre-wrap; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.7; }
.cat-bars { margin: 16px 0 6px; }
.cat-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.cat-bar .lbl { width: 150px; color: var(--ink-soft); font-size: 0.88rem; flex-shrink: 0; }
.cat-bar .bar-track { flex: 1; height: 8px; background: var(--bg-input); border-radius: 99px; overflow: hidden; }
.cat-bar .bar-fill { height: 100%; background: var(--grad); border-radius: 99px; }
.cat-bar .cnt { color: var(--ink-faint); font-size: 0.75rem; width: 34px; text-align: right; }
.word-strip { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.word-chip {
  background: var(--bg-input); border: 1px solid var(--edge);
  color: var(--ink-soft); padding: 4px 11px; border-radius: 999px; font-size: 0.82rem;
}

.progress-note { color: var(--ink-faint); font-size: 0.88rem; }
.count-big {
  font-size: 1.9rem; font-weight: 800; background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

@media (max-width: 560px) {
  .contact-row { grid-template-columns: 1fr; gap: 6px; }
  .contact-actions .btn-ghost { min-width: 100%; }
  .remove-btn { width: 100%; padding: 7px; }
  .cat-grid { grid-template-columns: 1fr; }
  .cat-bar .lbl { width: 108px; font-size: 0.82rem; }
  table.list th:nth-child(2), table.list td:nth-child(2) { display: none; }
  .btn-row .btn, .btn-row .btn-ghost { min-width: 100%; }
}

/* per-category example inputs (quick mode) */
.example-box { margin-top: 10px; }
.example-label {
  color: var(--blue); font-size: 0.8rem; font-weight: 700;
  margin: 6px 0 4px; text-transform: none; letter-spacing: 0.2px;
}
.example-input {
  width: 100%; background: var(--bg-input); border: 1px solid var(--edge);
  border-radius: var(--radius-input); padding: 10px 12px; color: var(--ink);
  font-size: 0.9rem; outline: none; font-family: inherit;
}
.example-input:focus { border-color: var(--blue); }

/* ---- auth screen (Instagram-style centered card) ---- */
.auth-card {
  background: var(--card); border: 1px solid var(--edge);
  border-radius: var(--radius-card); padding: 32px 26px 26px;
  max-width: 380px; margin: 24px auto 14px; text-align: center;
}
.auth-card h1 { font-size: 1.45rem; line-height: 1.25; margin-bottom: 10px; }
.auth-card .lede { margin-bottom: 22px; font-size: 0.93rem; }
.social-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px 16px; margin-bottom: 10px;
  border-radius: var(--radius-btn); border: 1px solid var(--edge);
  background: #fff; color: #0c1014; font-weight: 700; font-size: 0.93rem;
  text-decoration: none; min-height: 44px;
}
.social-btn svg { flex-shrink: 0; }
.social-btn:hover { filter: brightness(0.96); }
.divider {
  display: flex; align-items: center; gap: 12px; margin: 16px 0;
  color: var(--ink-faint); font-size: 0.8rem; font-weight: 600;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--edge); }
.auth-card label { text-align: left; }
.auth-card .btn-ghost.full { width: 100%; margin-top: 4px; }
.note.center { text-align: center; margin-top: 10px; }
.foot-note { text-align: center; color: var(--ink-faint); font-size: 0.78rem; max-width: 380px; margin: 0 auto; }
.foot-note a { color: var(--ink-soft); }

/* --- admin audit UI (Nov 26/26) --- */
.admin-wide { max-width: 860px; }
.admin-row { cursor: pointer; transition: border-color 0.15s ease; }
.admin-row:hover { border-color: var(--edge-hover); }
.admin-h2 { font-size: 1.05rem; margin: 34px 0 14px; color: var(--ink); }
.admin-summary { background: rgba(112, 141, 255, 0.06); }
.admin-list { list-style: none; padding: 0; margin: 6px 0 10px; }
.admin-list li { color: var(--ink-soft); font-size: 0.9rem; line-height: 1.5; margin: 7px 0; padding-left: 0; }
.admin-list .status-pill { margin-right: 6px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; word-break: break-all; }
.tl-strong { color: var(--ink); font-size: 0.82rem; font-weight: 600; margin: 14px 0 2px; text-transform: uppercase; letter-spacing: 0.04em; }
.tl-body { white-space: pre-wrap; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.6; background: var(--bg-input); border: 1px solid var(--edge); border-radius: 10px; padding: 10px 12px; margin: 6px 0 10px; }
.timeline { display: flex; flex-direction: column; gap: 14px; }
.tl-item { display: flex; gap: 12px; }
.tl-rail { display: flex; justify-content: center; width: 14px; position: relative; flex-shrink: 0; }
.tl-rail::before { content: ""; position: absolute; top: 18px; bottom: -16px; left: 50%; transform: translateX(-50%); width: 2px; background: var(--edge); }
.tl-item:last-child .tl-rail::before { display: none; }
.tl-dot { position: relative; z-index: 1; width: 14px; height: 14px; margin-top: 18px; border-radius: 99px; background: var(--blue); border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--edge); }
.tl-request .tl-dot { background: #b18cff; }
.tl-invite .tl-dot { background: var(--blue); }
.tl-response .tl-dot { background: #ffcf3f; }
.tl-report .tl-dot { background: #3fdca0; }
.tl-email .tl-dot, .tl-event .tl-dot { background: var(--ink-faint); }
.tl-card { flex: 1; }
.tl-card h3 { font-size: 0.95rem; margin: 2px 0 8px; }
.tl-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tl-kind { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-faint); background: var(--bg-input); border: 1px solid var(--edge); border-radius: 99px; padding: 2px 8px; }
.tl-ts { color: var(--ink-faint); font-size: 0.72rem; }
.admin-chat { max-height: 360px; overflow-y: auto; margin: 8px 0; }
.admin-sec { margin-bottom: 40px; }
/* admin login: password input styled like every other field */
input[type=password] {
  width: 100%; background: var(--bg-input); border: 1px solid var(--edge);
  border-radius: var(--radius-input); padding: 11px 12px; color: var(--ink);
  font-size: 0.93rem; outline: none; font-family: inherit;
}
