/* ── ASHTEK PRODUCTIONS — SHARED STYLES ─────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --void:     #07050F;
  --panel:    #0D0A1A;
  --rim:      #2A1A40;
  --pink:     #D946A8;
  --purple:   #9B5FE3;
  --lavender: #C9A8FF;
  --ice:      #F0EAF8;
  --muted:    #7A6892;
  --green:    #9DE8A0;
  --red:      #E8677D;
}

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--ice);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* scanline */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.055) 2px, rgba(0,0,0,0.055) 4px);
  pointer-events: none;
  z-index: 9999;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
  height: 60px;
  background: rgba(7,5,15,0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rim);
}

.nav-logo {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.18em;
  color: var(--ice);
  text-decoration: none;
}
.nav-logo span { color: var(--pink); }

nav ul { list-style: none; display: flex; gap: 2rem; align-items: center; }

nav ul a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
}
nav ul a:hover  { color: var(--lavender); }
nav ul a.active { color: var(--ice); border-bottom-color: var(--pink); }

.nav-store-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff !important;
  text-decoration: none;
  border-bottom: none !important;
  transition: opacity 0.2s, transform 0.2s !important;
}
.nav-store-btn:hover { opacity: 0.82; transform: translateY(-1px); color: #fff !important; }
.nav-store-btn.active { opacity: 0.7; }

/* inline logout form in the nav */
.nav-logout { display: inline; }
.nav-logout button {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0;
  transition: color 0.2s;
}
.nav-logout button:hover { color: var(--lavender); }

/* ── BUTTONS ── */
.btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.85rem 1.8rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
}
.btn-primary { background: linear-gradient(135deg, var(--purple), var(--pink)); color: #fff; }
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--lavender); border: 1px solid var(--rim); }
.btn-ghost:hover { border-color: var(--lavender); color: #fff; }
.btn-danger { background: transparent; color: var(--red); border: 1px solid var(--rim); }
.btn-danger:hover { border-color: var(--red); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.62rem; }

/* ── PAGE WRAPPER ── */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 7rem 3rem 5rem;
}
.page-narrow {
  max-width: 480px;
  margin: 0 auto;
  padding: 9rem 1.5rem 5rem;
}

/* ── SECTION HEADER ── */
.section-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  color: var(--pink);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.section-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--ice);
  line-height: 1.05;
  margin-bottom: 1rem;
}
.section-sub {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.75;
  margin-bottom: 3rem;
}

/* ── TAGS ── */
.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--rim);
  color: var(--muted);
}

/* ── FORMS ── */
.form-card {
  background: var(--panel);
  border: 1.5px solid var(--rim);
  padding: 2.5rem;
}

.field { margin-bottom: 1.4rem; }

.field label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="date"],
.field input[type="file"],
.field select,
.field textarea {
  width: 100%;
  background: var(--void);
  border: 1px solid var(--rim);
  color: var(--ice);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  padding: 0.75rem 0.9rem;
  transition: border-color 0.2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--purple);
}
.field textarea { resize: vertical; line-height: 1.7; }
.field select { cursor: pointer; }

.field-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.4rem;
  line-height: 1.5;
}

.field-error {
  font-size: 0.75rem;
  color: var(--red);
  margin-top: 0.4rem;
}
.field input.invalid,
.field textarea.invalid { border-color: var(--red); }

.field-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.field-check input { width: auto; cursor: pointer; }
.field-check label { margin: 0; cursor: pointer; }

/* ── ALERTS ── */
.alert {
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--rim);
  border-left-width: 3px;
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.alert-error   { border-left-color: var(--red);   color: var(--red); }
.alert-success { border-left-color: var(--green); color: var(--green); }
.alert-info    { border-left-color: var(--purple); color: var(--lavender); }

/* Utility spacing. Classes, not inline style= attributes — the CSP sets
   style-src 'self' with no 'unsafe-inline', which blocks style attributes
   as well as <style> blocks. */
.mt-lg { margin-top: 1.5rem; }

.store-help {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}
.store-help a { color: var(--lavender); text-decoration: none; border-bottom: 1px solid var(--rim); }
.store-help a:hover { color: var(--pink); border-color: var(--pink); }

/* ── EMPTY STATE ── */
.empty-state {
  border: 1.5px dashed var(--rim);
  padding: 4rem 2rem;
  text-align: center;
}
.empty-state p {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--rim);
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  max-width: 100%;
}
footer a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--lavender); }

/* ── STATUS DOT ── */
.status-dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--pink);
  border-radius: 50%;
  margin-right: 6px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 0 1.2rem; }
  nav ul { gap: 1rem; }
  .page { padding: 6rem 1.2rem 4rem; }
  .page-narrow { padding: 7rem 1.2rem 4rem; }
  footer { flex-direction: column; gap: 0.8rem; text-align: center; padding: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ══════════════════════════════════════════════════════════════
   REPORTS · TEAM · FRIENDS
   Added for the moderation and social features. These live in
   _shared.css rather than a page stylesheet because they are used
   by BOTH the admin panel and the public pages (a report thread
   renders on /admin/reports/:id and on /reports/mine/:id), and
   admin.css is not loaded on the public side.
   ══════════════════════════════════════════════════════════════ */

.dim { color: var(--muted); }

/* ── Notices ── */
.notice {
  background: rgba(155, 95, 227, 0.08);
  border-left: 2px solid var(--purple);
  padding: 0.9rem 1.2rem;
  margin-bottom: 1.75rem;
  font-size: 0.85rem;
  color: var(--lavender);
}
.notice-error {
  background: rgba(232, 103, 125, 0.08);
  border-left-color: var(--red);
  color: var(--red);
}
.mb-lg { margin-bottom: 2rem; }

/* ── Panels ── */
.panel {
  background: var(--panel);
  border: 1.5px solid var(--rim);
  padding: 1.75rem;
}
.panel-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

/* Long-form user text. pre-wrap preserves the reporter's line breaks without
   any markup being interpreted — the value is escaped by EJS first. */
.report-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--ice);
  margin: 1.25rem 0 0;
}

/* ── Report thread ── */
.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2.5rem;
  align-items: start;
}
.thread { display: flex; flex-direction: column; gap: 1rem; }
.msg {
  background: var(--panel);
  border: 1.5px solid var(--rim);
  border-left-width: 2px;
  padding: 1.1rem 1.35rem;
}
/* Staff replies are visually distinct from the reporter's own messages so a
   thread can be read at a glance without parsing every name. */
.msg-staff    { border-left-color: var(--pink); }
.msg-reporter { border-left-color: var(--rim); }
.msg-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: 0.7rem;
  margin-bottom: 0.6rem;
}
.msg-meta strong { color: var(--lavender); font-weight: 500; }
.msg-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ── Forms ── */
.field-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lavender);
  margin-bottom: 0.5rem;
}
.inline-form { display: inline-flex; gap: 0.4rem; align-items: center; }
.row-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.search-bar {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}
.search-bar input { flex: 1; }

/* ── Clickable rows ── */
.release-row-link {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}
.release-row-link:hover { border-color: var(--purple); }

.admin-subtabs { margin-bottom: 2rem; }

.sidebar-row-action {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
}

/* ── Status + role pills ── */
.pill-open         { border-color: var(--pink);     color: var(--pink); }
.pill-under_review { border-color: var(--purple);   color: var(--purple); }
.pill-closed       { border-color: var(--muted);    color: var(--muted); }
.pill-wip          { border-color: var(--purple);   color: var(--purple); }

.pill-user  { border-color: var(--rim);      color: var(--muted); }
.pill-mod   { border-color: var(--lavender); color: var(--lavender); }
.pill-admin { border-color: var(--pink);     color: var(--pink); }

@media (max-width: 900px) {
  .report-grid { grid-template-columns: 1fr; gap: 2rem; }
}
