/* USER PORTAL mirror of admin/_shared.css (Phase 2 redesign, 2026-07-11). Design tokens are shared byte-for-byte across admin/ and user/. Do not edit one without the other. */
/* EventPhoto AI v3 — Admin shared design tokens (Phase 1 redesign)
 * Loaded by every admin HTML. Page-specific styles live inline in each
 * HTML file (matches the Uproved v4 pattern).
 *
 * Tokens copied verbatim from Uproved/event-detail_3.html :root. Any
 * design-system change MUST land here first so all four pages stay in
 * sync. Per-event brand color is set inline on event-detail cards —
 * NEVER override --accent here.
 */

:root {
  --bg: #FCFCFB;
  --surface: #FFFFFF;
  --ink: #14171A;
  --ink-soft: #4B5054;
  --muted: #8A8F94;
  --line: #E7E7E2;
  --line-strong: #D8D8D2;
  --accent: #2D5BFF;
  --accent-soft: #EAF0FF;
  --success: #1F9D55;
  --success-soft: #E7F7ED;
  --warning: #B9860A;
  --warning-soft: #FBF2DC;
  --error: #DC2626;
  --error-soft: #FDEAEA;
  --neutral-soft: #F1F1EF;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-md: 0 8px 24px rgba(20, 23, 26, 0.08);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { display: block; max-width: 100%; }

/* --- shared topbar (used by dashboard / dlq / event-detail) --- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.brand-mark svg { width: 16px; height: 16px; color: #fff; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600; font-size: 16px;
  letter-spacing: -0.01em;
}
.brand-name span { color: var(--muted); font-weight: 500; }
nav.top-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--neutral-soft); color: var(--ink); }
.nav-link.active { background: var(--ink); color: #fff; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.logout-link {
  font-size: 13px; color: var(--muted); font-weight: 500;
  background: none; border: none;
}
.logout-link:hover { color: var(--ink); }

.back-link {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--ink-soft);
  padding: 7px 12px; border-radius: 999px;
  transition: background 0.15s;
}
.back-link:hover { background: var(--neutral-soft); color: var(--ink); }
.back-link svg { width: 14px; height: 14px; }

.page { max-width: 1180px; margin: 0 auto; padding: 32px 32px 100px; }

/* --- shared buttons / pills (page-specific styles extend these) --- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.1s, background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-danger-ghost {
  background: var(--surface); color: var(--error);
  border-color: #F3CACA;
}
.btn-danger-ghost:hover { background: var(--error-soft); border-color: var(--error); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn svg { width: 14px; height: 14px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- shared table look --- */
.table-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; min-width: 640px; }
thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: #FBFBFA;
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--line); transition: background 0.12s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #FAFAF9; }
tbody td { padding: 14px 20px; vertical-align: middle; font-size: 13px; }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  text-transform: capitalize;
}
.status-pill .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
}
/* Status pill variants — see renderEvents in dashboard.html. */
.status-pill.created     { background: var(--neutral-soft); color: var(--ink-soft); }
.status-pill.uploaded    { background: var(--accent-soft);   color: var(--accent); }
.status-pill.indexing    { background: var(--warning-soft);  color: var(--warning); }
.status-pill.indexed     { background: var(--success-soft);  color: var(--success); }
.status-pill.failed      { background: var(--error-soft);    color: var(--error); }
.status-pill.index_failed{ background: var(--error-soft);    color: var(--error); }

.mono-cell { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); }
.muted-cell { color: var(--muted); font-size: 12.5px; }
.ev-name { font-weight: 600; font-size: 13.5px; }

/* --- shared toast --- */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 60;
  display: flex; align-items: center; gap: 8px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 14px; height: 14px; color: var(--success); }

/* --- shared copy button (event-detail) --- */
.copy-btn {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
  transition: all 0.15s;
}
.copy-btn:hover { border-color: var(--ink); color: var(--ink); }
.copy-btn svg { width: 13px; height: 13px; }
.copy-btn.copied { background: var(--success); border-color: var(--success); color: #fff; }

/* --- shared empty state --- */
.empty-state { padding: 56px 20px; text-align: center; }
.empty-state svg { width: 34px; height: 34px; color: var(--success); margin-bottom: 12px; }
.empty-state h3 { font-family: var(--font-display); font-size: 15px; margin-bottom: 4px; }
.empty-state p { color: var(--muted); font-size: 12.5px; }

/* --- shared skeleton shimmer --- */
.skeleton-row td { padding: 16px 20px; }
.skeleton-bar {
  height: 12px; border-radius: 4px;
  background: linear-gradient(90deg, var(--neutral-soft) 25%, #E9E9E6 37%, var(--neutral-soft) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* --- mobile shared --- */
@media (max-width: 720px) {
  .topbar { padding: 14px 18px; }
  nav.top-nav { display: none; }
  .page { padding: 24px 16px 80px; }
}
