:root {
  --bg: #0b0d17;
  --bg-2: #11131f;
  --panel: #161827;
  --panel-2: #1c1f30;
  --border: #232638;
  --text: #e6e8ee;
  --text-dim: #9aa0b4;
  --text-muted: #6b7185;
  --primary: #7c5cff;
  --primary-2: #6244e0;
  --accent: #22d3ee;
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #eab308;
  --pink: #ec4899;
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------------- Layout ---------------- */
.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.app--full { grid-template-columns: 1fr; }
.sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
.sidebar::-webkit-scrollbar { width: 0; height: 0; display: none; } /* Chrome/Safari */
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 14px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.brand-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid; place-items: center; color: #fff; font-weight: 700;
}
.brand-name { font-weight: 700; letter-spacing: 0.2px; }

.org-switcher {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 6px;
}
.org-switcher .avatar { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #ec4899, #7c5cff); }
.org-switcher .name { font-weight: 600; font-size: 13px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  color: var(--text-dim);
  border-radius: 8px;
  font-size: 13.5px;
  transition: background 0.15s, color 0.15s;
}
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(124,92,255,0.25);
}
.nav .icon { width: 18px; display: inline-flex; }

.plan-card {
  margin-top: auto;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.plan-title { font-weight: 700; font-size: 13px; }
.plan-meta { color: var(--text-muted); font-size: 11.5px; }

.btn {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
  white-space: nowrap;        /* keep labels on one line ("Open event", not "Open / event") */
}
.btn svg { flex: 0 0 auto; }
.btn:hover { background: var(--panel-2); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); border-color: var(--primary-2); }
.btn-block { width: 100%; justify-content: center; }
.btn-danger { background: transparent; color: var(--red); border-color: rgba(239,68,68,0.4); }
.btn-icon { padding: 8px 10px; }

/* ---------------- Topbar ---------------- */
.main { padding: 22px 28px; max-width: 100%; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.welcome { flex: 1; min-width: 0; }
.welcome h1 { font-size: 22px; margin: 0 0 4px 0; font-weight: 700; }
.welcome p { margin: 0; color: var(--text-dim); font-size: 13px; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.topbar-action { width: 100%; }
/* Brand logo in the header — shown on mobile where the sidebar (and its logo)
   is hidden; the sidebar already carries the logo on desktop. */
.topbar-brand { display: none; align-items: center; flex: 0 0 auto; }
.topbar-brand .brand-logo-img,
.topbar-brand .brand-icon { max-height: 30px !important; width: auto; }
.search {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  display: flex; align-items: center; gap: 10px;
  width: 280px;
}
.search input { background: transparent; border: 0; outline: none; color: var(--text); flex: 1; font-size: 13px; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--panel); border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer;
  position: relative;
}
.icon-btn .badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--red); color: #fff;
  border-radius: 999px; font-size: 10px;
  padding: 2px 5px; font-weight: 700;
}
.user-chip {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 13px;
  border: 0; cursor: pointer;
}
.user-chip.has-avatar { background-size: cover; background-position: center; }

/* Mobile nav hamburger + drawer backdrop (shown only on small screens) */
.nav-toggle {
  display: none;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--panel); border: 1px solid var(--border);
  color: var(--text); cursor: pointer;
  place-items: center; flex: 0 0 auto;
}
.nav-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(5, 7, 14, 0.55);
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s;
}
body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }

/* Attendee bottom tab bar (mobile only — shown via media query below) */
.bottom-nav {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
}
.bottom-nav-item {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 4px 2px;
  color: var(--text-muted);
  font-size: 10.5px; font-weight: 500;
  border-radius: 10px;
}
.bottom-nav-ico { display: grid; place-items: center; opacity: 0.9; }
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- Cards & grids ---------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.grid { display: grid; gap: 14px; }
.grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.layout-2 { display: grid; grid-template-columns: 1fr 360px; gap: 18px; }

.stat {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 110px;
}
.stat > * { position: relative; z-index: 1; }
.stat-spark {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 64px;
  width: 100%;
  z-index: 0;
  pointer-events: none;
}
.stat-spark svg { width: 100%; height: 100%; display: block; }
.stat-head {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-dim); font-size: 12.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-head .ico {
  width: 32px; height: 32px; border-radius: 9px;
  background: rgba(124,92,255,0.15);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.stat-value { font-size: 26px; font-weight: 700; line-height: 1; }
.stat-foot { font-size: 11.5px; color: var(--green); margin-top: auto; }
.stat-foot.negative { color: var(--red); }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 26px 0 12px 0;
}
.section-head h2 { font-size: 16px; margin: 0; }
.link-btn {
  background: none; border: 0; color: var(--primary);
  font-size: 13px; cursor: pointer;
  display: inline-flex; gap: 6px; align-items: center;
}

/* Event card */
.event-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  color: inherit;
  position: relative;
}
.event-card:hover { transform: translateY(-2px); border-color: var(--primary); }
.event-cover {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #2a2740, #1c1f30);
  background-size: cover;
  background-position: center;
  position: relative;
}
.event-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.event-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-meta {
  font-size: 11.5px; color: var(--text-muted);
  display: flex; gap: 12px; align-items: center;
  min-width: 0;
}
.event-meta span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; min-width: 0; }
.event-meta span:last-child { overflow: hidden; text-overflow: ellipsis; }

.badge {
  position: absolute; top: 10px; left: 10px;
  font-size: 10.5px; font-weight: 700;
  padding: 4px 8px; border-radius: 999px;
  background: rgba(0,0,0,0.6); color: #fff;
  text-transform: capitalize;
}
.badge.live { background: var(--red); }
.badge.uploading { background: var(--yellow); color: #111; }
.badge.completed { background: var(--green); }
.badge.draft { background: var(--text-muted); }

/* Live event side panel */
.live-panel { display: flex; flex-direction: column; gap: 14px; }
.live-cover {
  aspect-ratio: 16/10;
  border-radius: 12px;
  background-size: cover; background-position: center;
  position: relative;
  border: 1px solid var(--border);
}
.live-pill {
  position: absolute; top: 10px; left: 10px;
  background: var(--red); color: #fff;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.live-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 14px;
}
.live-overlay h3 { margin: 0 0 4px 0; font-size: 16px; }
.live-overlay p { margin: 0; font-size: 12px; color: #cbd0e0; }
.live-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; padding: 12px; background: var(--panel); border-radius: 12px; border: 1px solid var(--border); }
.live-stat { text-align: center; }
.live-stat .v { font-size: 18px; font-weight: 700; }
.live-stat .l { font-size: 11px; color: var(--text-muted); }

.qa {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  text-align: left;
  color: inherit;
}
.qa:hover { border-color: var(--primary); transform: translateY(-1px); }
.qa .ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(124,92,255,0.15);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.qa .t { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa .s { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Photo grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.photo-grid--small { grid-template-columns: repeat(6, 1fr); }
.photo-grid--3 { grid-template-columns: repeat(3, 1fr); }
.photo-tile {
  aspect-ratio: 1/1;
  border-radius: 10px;
  background: var(--panel-2);
  background-size: cover; background-position: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: block;
}
.photo-tile:hover::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
}

/* Forms */
.form { display: flex; flex-direction: column; gap: 12px; max-width: 480px; }
.form label { font-size: 12px; color: var(--text-dim); }
.input, .select, .textarea {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  outline: none;
  font-size: 13px;
  width: 100%;
  font-family: inherit;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); }
.field { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.table th { color: var(--text-muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; }
.table tr:hover td { background: var(--panel-2); }

.tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tab {
  background: none; border: 0;
  color: var(--text-dim);
  font-size: 13.5px;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.tab.active { color: var(--primary); border-color: var(--primary); }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.search-input {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--text);
  outline: none;
  font-size: 13px;
  flex: 1; min-width: 200px;
}
.empty { padding: 40px; text-align: center; color: var(--text-muted); border: 1px dashed var(--border); border-radius: 12px; }

/* Attendee featured hero */
.featured-event { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: var(--panel); }
.featured-cover { position: relative; min-height: 260px; background-size: cover; background-position: center; background-color: var(--panel-2); }
.featured-cover::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, rgba(11,13,23,0.92) 0%, rgba(11,13,23,0.55) 50%, rgba(11,13,23,0.05) 100%);
}
.featured-overlay { position: relative; z-index: 1; padding: 28px 32px; max-width: 640px; }
.featured-overlay h2 { color: #fff; }

/* Chips */
.chip {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip:hover { color: var(--text); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* CTA card */
.cta-card {
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(135deg, rgba(124,92,255,0.6), rgba(236,72,153,0.6)) border-box;
  border: 1px solid transparent;
}
.ico-lg { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }

/* Event-detail header strip */
.event-header-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 16px; }
.event-stat-strip {
  display: flex; align-items: stretch; gap: 0;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.event-stat {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; position: relative;
  background: transparent; border: 0; color: inherit; font: inherit; text-align: left;
}
.event-stat + .event-stat::before {
  content: ''; position: absolute; left: 0; top: 18%; bottom: 18%; width: 1px; background: var(--border);
}
.event-stat .ico { width: 30px; height: 30px; border-radius: 8px; background: rgba(124,92,255,0.15); display: grid; place-items: center; flex-shrink: 0; }
.event-stat .meta { display: flex; flex-direction: column; gap: 1px; }
.event-stat .l { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; line-height: 1.2; }
.event-stat .v { font-size: 16px; font-weight: 700; line-height: 1.2; }
.event-stat.as-button { cursor: pointer; transition: background 0.15s; }
.event-stat.as-button:hover { background: rgba(124,92,255,0.08); }
.event-header-actions { flex-shrink: 0; }
@media (max-width: 900px) {
  .event-stat-strip { width: 100%; }
  .event-stat { flex: 1; padding: 10px 12px; }
  .event-stat .v { font-size: 14px; }
}

/* Create-event two-column layout */
.event-new-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.event-new-grid aside { position: sticky; top: 22px; }
.drop-zone {
  position: relative; border: 2px dashed var(--border); border-radius: 14px;
  background: var(--panel-2); background-size: cover; background-position: center;
  min-height: 220px; display: grid; place-items: center; cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s; overflow: hidden;
}
.drop-zone:hover { border-color: var(--primary); }
.drop-zone.has-image { cursor: default; border-style: solid; }
.drop-zone.has-image::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.45)); pointer-events: none;
}
.drop-inner { text-align: center; padding: 20px; }
.drop-actions { position: absolute; inset: auto 0 0 0; padding: 12px; display: flex; gap: 10px; justify-content: flex-end; z-index: 1; }
@media (max-width: 1100px) {
  .event-new-grid { grid-template-columns: 1fr; }
  .event-new-grid aside { position: static; }
}

/* =========================================================================
   Auth pages
   ========================================================================= */
.auth-page {
  height: 100vh; height: 100svh;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  background: var(--bg); color: var(--text); overflow: hidden;
}
.auth-hero {
  position: relative; overflow: hidden;
  padding: 28px 44px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  min-height: 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(124,92,255,0.22), transparent 50%),
    radial-gradient(circle at 85% 80%, rgba(236,72,153,0.18), transparent 55%),
    radial-gradient(circle at 75% 18%, rgba(34,211,238,0.14), transparent 45%),
    linear-gradient(160deg, #11131f 0%, #0a0c16 100%);
  border-right: 1px solid var(--border);
}
.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 3; animation: auth-fade-down 600ms ease-out both; }
.brand-icon-lg {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #7c5cff, #ec4899);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(124,92,255,0.4);
}
.brand-tag { font-size: 11.5px; color: var(--text-muted); letter-spacing: 0.4px; text-transform: uppercase; }

.auth-stage { position: relative; flex: 1; min-height: 360px; z-index: 2; }
.auth-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  animation: auth-grid-shift 24s linear infinite;
}
.auth-tile {
  position: absolute; width: 150px; padding: 12px 14px;
  border: 1px solid; border-radius: 14px;
  display: flex; align-items: center; gap: 10px;
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  transform: rotate(var(--rot, 0deg));
  animation: auth-tile-float 8s ease-in-out infinite, auth-tile-in 700ms cubic-bezier(0.16,1,0.3,1) both;
  will-change: transform;
}
.auth-tile-ico { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.auth-tile-label { font-size: 11.5px; font-weight: 600; color: #fff; letter-spacing: 0.2px; white-space: nowrap; }

.auth-orb { position: absolute; border-radius: 999px; filter: blur(60px); opacity: 0.55; animation: auth-orb-drift 14s ease-in-out infinite; }
.auth-orb-1 { width: 280px; height: 280px; top: 0;    left: 30%;  background: #7c5cff; animation-delay: 0s; }
.auth-orb-2 { width: 240px; height: 240px; bottom: 0; left: 0;    background: #ec4899; animation-delay: -4s; }
.auth-orb-3 { width: 220px; height: 220px; top: 30%;  right: -40px; background: #22d3ee; animation-delay: -8s; }

/* Phone scanner */
.phone-scanner { position: relative; margin: 8px auto 0; width: 132px; height: 132px; display: grid; place-items: center; }
.face-bracket {
  position: absolute; width: 18px; height: 18px;
  border: 2px solid #22d3ee; border-radius: 4px;
  box-shadow: 0 0 10px rgba(34,211,238,0.55);
  animation: face-bracket-pulse 3s ease-in-out infinite;
}
.face-bracket-tl { top: 0; left: 0;    border-right: 0; border-bottom: 0; border-top-left-radius: 6px; }
.face-bracket-tr { top: 0; right: 0;   border-left: 0;  border-bottom: 0; border-top-right-radius: 6px; }
.face-bracket-bl { bottom: 0; left: 0; border-right: 0; border-top: 0;    border-bottom-left-radius: 6px; }
.face-bracket-br { bottom: 0; right: 0; border-left: 0; border-top: 0;    border-bottom-right-radius: 6px; }
.face-avatar {
  position: relative; width: 96px; height: 96px; border-radius: 18px; overflow: hidden; background: #1c1f30;
  box-shadow: 0 12px 30px rgba(124,92,255,0.35), 0 0 0 1px rgba(255,255,255,0.08) inset;
}
.face-photos { position: absolute; inset: 0; background: #1c1f30; }
.face-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; filter: saturate(1.05); animation: face-photo-cycle 7.2s ease-in-out infinite;
}
.face-dot {
  position: absolute; width: 6px; height: 6px; margin-left: -3px; margin-top: -3px;
  border-radius: 999px; background: #22d3ee;
  box-shadow: 0 0 0 3px rgba(34,211,238,0.25), 0 0 10px rgba(34,211,238,0.9);
  opacity: 0; transform: scale(0.4);
  animation: face-dot 1.2s ease-out infinite;
  animation-delay: var(--d, 0s);
  z-index: 2;
}
.face-scan {
  position: absolute; left: 0; right: 0; top: 0; height: 14px;
  background: linear-gradient(180deg, rgba(34,211,238,0) 0%, rgba(34,211,238,0.65) 50%, rgba(34,211,238,0) 100%);
  box-shadow: 0 0 14px rgba(34,211,238,0.6);
  pointer-events: none;
  animation: face-scan 1.2s linear infinite;
  z-index: 3;
}
.face-status {
  display: inline-flex; align-items: center; gap: 6px; align-self: center;
  margin: 10px auto 8px; padding: 4px 9px;
  background: rgba(10,12,22,0.7); border: 1px solid rgba(34,211,238,0.3);
  border-radius: 999px; font-size: 9.5px; color: rgba(255,255,255,0.92); white-space: nowrap;
}
.face-status-pulse {
  width: 8px; height: 8px; border-radius: 999px; background: #22d3ee;
  box-shadow: 0 0 0 0 rgba(34,211,238,0.6);
  animation: face-status-pulse 1.4s ease-out infinite; flex-shrink: 0;
}
.face-status-text { position: relative; display: inline-block; height: 14px; min-width: 130px; }
.face-status-line { position: absolute; inset: 0; display: inline-block; opacity: 0; animation: face-status-cycle 4.8s ease-in-out infinite; }
.face-status-line:nth-child(2) { color: #22d3ee; font-weight: 600; animation-delay: 2.4s; }

.auth-phone-center {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%); width: 200px; z-index: 5;
  animation: auth-center-in 900ms cubic-bezier(0.16,1,0.3,1) both,
             auth-phone-float 6s ease-in-out infinite;
  animation-delay: 0.8s, 1.8s; will-change: transform;
}
.phone-ring {
  position: absolute; inset: 0;
  border: 1.5px solid rgba(124,92,255,0.4); border-radius: 28px;
  animation: face-ring 3.4s ease-out infinite; pointer-events: none;
}
.phone-ring-1 { animation-delay: 1.2s; }
.phone-ring-2 { animation-delay: 2.8s; }
.auth-phone-frame {
  position: relative; border-radius: 30px; padding: 6px;
  background: linear-gradient(160deg, #2a2e44 0%, #14172a 50%, #0a0c16 100%);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow:
    0 25px 50px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 1px 1px rgba(255,255,255,0.18) inset,
    0 -1px 1px rgba(0,0,0,0.5) inset;
}
.phone-button { position: absolute; background: linear-gradient(90deg, #1a1c2c 0%, #2a2e44 50%, #1a1c2c 100%); border-radius: 1.5px; }
.btn-silent      { left: -2px; top: 36px;  width: 2px; height: 18px; }
.btn-volume-up   { left: -2px; top: 64px;  width: 2px; height: 28px; }
.btn-volume-down { left: -2px; top: 100px; width: 2px; height: 28px; }
.btn-power       { right: -2px; top: 72px; width: 2px; height: 44px; }
.auth-phone-island {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 64px; height: 18px; background: #050610; border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05) inset, 0 1px 1.5px rgba(0,0,0,0.5);
  z-index: 3;
}
.auth-phone-gloss { position: absolute; top: 0; left: 0; right: 0; height: 60%; background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 100%); pointer-events: none; z-index: 1; }
.auth-phone-screen { position: relative; border-radius: 22px; background: linear-gradient(180deg, #161827 0%, #0e1020 100%); overflow: hidden; padding: 26px 10px 12px; display: flex; flex-direction: column; }
.auth-phone-statusbar { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 10px; font-size: 9px; color: rgba(255,255,255,0.7); font-weight: 600; }
.auth-phone-statusbar-right { display: inline-flex; align-items: center; gap: 3px; }
.auth-phone-bars {
  display: inline-block; width: 11px; height: 7px;
  background:
    linear-gradient(to top, #fff 30%, transparent 30%),
    linear-gradient(to top, #fff 55%, transparent 55%) 4px 0 / 2px 7px no-repeat,
    linear-gradient(to top, #fff 80%, transparent 80%) 8px 0 / 2px 7px no-repeat;
  background-size: 2px 7px; background-repeat: no-repeat; background-position: 0 0;
}
.auth-phone-battery { display: inline-block; width: 14px; height: 7px; border: 1px solid rgba(255,255,255,0.7); border-radius: 2px; position: relative; }
.auth-phone-battery::before { content: ''; position: absolute; left: 1px; top: 1px; bottom: 1px; width: 8px; background: #22c55e; border-radius: 1px; }

.auth-notification {
  display: grid; grid-template-columns: 22px 1fr 18px; gap: 8px;
  padding: 8px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; backdrop-filter: blur(8px);
  animation: auth-notif-slide 700ms cubic-bezier(0.16,1,0.3,1) both, auth-notif-pulse 4.8s ease-in-out infinite;
  animation-delay: 2.2s, 3.2s;
}
.auth-notification-app { width: 22px; height: 22px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #7c5cff, #ec4899); box-shadow: 0 4px 10px rgba(124,92,255,0.4); }
.auth-notification-body { min-width: 0; }
.auth-notification-head { display: flex; align-items: center; justify-content: space-between; font-size: 8.5px; color: rgba(255,255,255,0.65); font-weight: 600; letter-spacing: 0.2px; margin-bottom: 2px; }
.auth-notification-app-name { text-transform: none; }
.auth-notification-time { color: rgba(255,255,255,0.4); }
.auth-notif-stack { position: relative; min-height: 32px; }
.auth-notif-state { position: absolute; inset: 0; font-size: 10px; color: #fff; line-height: 1.3; opacity: 0; }
.auth-notif-state strong { font-weight: 700; }
.state-ready       { animation: notif-state-ready 8s ease-in-out infinite; animation-delay: 2.9s; }
.state-downloading { animation: notif-state-downloading 8s ease-in-out infinite; animation-delay: 2.9s; }
.state-saved       { animation: notif-state-saved 8s ease-in-out infinite; animation-delay: 2.9s; color: #4ade80; font-weight: 600; }
.state-downloading strong { display: block; margin-bottom: 5px; }
.auth-notif-progress { position: relative; height: 3px; background: rgba(255,255,255,0.12); border-radius: 999px; overflow: hidden; }
.auth-notif-progress-fill { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; background: linear-gradient(90deg, #22d3ee, #22c55e); box-shadow: 0 0 8px rgba(34,211,238,0.5); transform: scaleX(0); transform-origin: left center; animation: notif-progress 8s ease-in-out infinite; animation-delay: 2.9s; border-radius: 999px; }
.auth-notif-icons { position: relative; align-self: center; width: 18px; height: 18px; }
.auth-notif-icon { position: absolute; inset: 0; width: 18px; height: 18px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 4px 8px rgba(0,0,0,0.25); }
.icon-download { background: linear-gradient(135deg, #22d3ee, #6366f1); box-shadow: 0 4px 8px rgba(99,102,241,0.4); animation: notif-icon-download 8s ease-in-out infinite, auth-download-bob 2s ease-in-out infinite; animation-delay: 2.9s, 2.9s; }
.icon-check    { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 4px 10px rgba(34,197,94,0.5); opacity: 0; animation: notif-icon-check 8s ease-in-out infinite; animation-delay: 2.9s; }

.auth-rotator { position: relative; z-index: 3; min-height: 96px; }
.auth-rotator-text { animation: auth-text-in 600ms cubic-bezier(0.16,1,0.3,1) both; }
.auth-rotator-text h2 { font-size: 26px; margin: 0 0 8px; letter-spacing: -0.4px; color: #fff; font-weight: 600; }
.auth-rotator-text p { font-size: 14px; color: var(--text-muted); margin: 0; max-width: 460px; line-height: 1.55; }
.auth-rotator-dots { display: flex; gap: 8px; margin-top: 16px; }
.auth-dot { width: 22px; height: 5px; border-radius: 999px; background: rgba(255,255,255,0.12); border: 0; cursor: pointer; padding: 0; transition: background 0.25s, width 0.25s; }
.auth-dot:hover { background: rgba(255,255,255,0.2); }
.auth-dot.active { background: linear-gradient(90deg, #7c5cff, #ec4899); width: 34px; }

.auth-trust {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: 18px;
  padding: 16px 18px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px; backdrop-filter: blur(8px);
  animation: auth-fade-up 700ms ease-out both; animation-delay: 0.4s;
}
.auth-trust-item { display: flex; flex-direction: column; gap: 2px; }
.auth-trust-num   { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: -0.3px; }
.auth-trust-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.auth-trust-sep   { width: 1px; align-self: stretch; background: rgba(255,255,255,0.08); }

.auth-form-side {
  display: grid; place-items: center; padding: 32px 36px;
  background:
    radial-gradient(130% 90% at 100% 0%, rgba(124,92,255,0.55), transparent 60%),
    radial-gradient(120% 90% at 0% 100%, rgba(34,211,238,0.42), transparent 58%),
    radial-gradient(95% 75% at 50% 120%, rgba(236,72,153,0.35), transparent 62%),
    linear-gradient(160deg, #161335 0%, #0b0d17 55%, #0a1620 100%);
  position: relative; min-height: 0; overflow: hidden;
}
.auth-form-shell { width: 100%; max-width: 420px; animation: auth-fade-up 600ms cubic-bezier(0.16,1,0.3,1) both; }
.auth-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 18px; }
.auth-mobile-scanner { display: none; }
.auth-form-shell h1 { margin: 0 0 6px; font-size: 26px; font-weight: 600; letter-spacing: -0.4px; }
.auth-form-shell .sub { color: var(--text-dim); font-size: 13.5px; margin-bottom: 22px; }
.auth-form-shell .form .field { animation: auth-field-in 500ms cubic-bezier(0.16,1,0.3,1) both; }
.auth-form-shell .form .field:nth-of-type(1) { animation-delay: 0.10s; }
.auth-form-shell .form .field:nth-of-type(2) { animation-delay: 0.18s; }
.auth-form-shell .form .field:nth-of-type(3) { animation-delay: 0.26s; }
.auth-form-shell .form .field:nth-of-type(4) { animation-delay: 0.34s; }
.auth-form-shell .form .field label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; letter-spacing: 0.2px; }
.auth-form-shell .form .field .input { padding: 12px 14px; font-size: 14px; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; }
.auth-form-shell .form .field .input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(124,92,255,0.16); background: var(--panel); }
.auth-form-shell .btn-block { margin-top: 8px; padding: 12px; font-size: 14px; font-weight: 600; background: linear-gradient(135deg, #7c5cff, #ec4899); border: 0; box-shadow: 0 12px 26px rgba(124,92,255,0.35); transition: transform 0.15s, box-shadow 0.15s; color: #fff; }
.auth-form-shell .btn-block:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 16px 32px rgba(124,92,255,0.45); }

.role-toggle {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  padding: 4px; background: var(--panel-2); border-radius: 12px; border: 1px solid var(--border);
  margin-bottom: 18px;
  animation: auth-field-in 500ms cubic-bezier(0.16,1,0.3,1) both; animation-delay: 0.04s;
}
.role-toggle::before {
  content: ''; position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px); border-radius: 9px;
  background: linear-gradient(135deg, #7c5cff, #8b5cf6);
  box-shadow: 0 6px 18px rgba(124,92,255,0.4);
  transition: transform 0.28s cubic-bezier(0.16,1,0.3,1); z-index: 0;
}
.role-toggle[data-role="organizer"]::before { transform: translateX(100%); }
.role-toggle button { position: relative; z-index: 1; padding: 10px 8px; border: 0; background: transparent; color: var(--text-dim); font-size: 13px; font-weight: 500; cursor: pointer; transition: color 0.2s; }
.role-toggle button.active { color: #fff; }

.auth-foot { margin-top: 18px; text-align: center; color: var(--text-dim); font-size: 12.5px; }
.auth-foot a { color: var(--primary); text-decoration: none; font-weight: 500; }
.auth-foot a:hover { text-decoration: underline; }

@keyframes auth-fade-down { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes auth-fade-up   { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes auth-field-in  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes auth-tile-in   { from { opacity: 0; transform: rotate(var(--rot, 0deg)) translateY(20px) scale(0.9); } to { opacity: 1; transform: rotate(var(--rot, 0deg)) translateY(0) scale(1); } }
@keyframes auth-tile-float { 0%,100% { transform: rotate(var(--rot, 0deg)) translateY(0); } 50% { transform: rotate(calc(var(--rot, 0deg) + 1deg)) translateY(-10px); } }
@keyframes auth-orb-drift  { 0%,100% { transform: translate(0,0) scale(1); opacity: 0.55; } 50% { transform: translate(20px,-25px) scale(1.08); opacity: 0.7; } }
@keyframes auth-center-in  { from { opacity: 0; transform: translate(-50%, -50%) scale(0.6); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes face-ring       { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(1.85); opacity: 0; } }
@keyframes face-bracket-pulse { 0%,100% { box-shadow: 0 0 8px rgba(34,211,238,0.45); opacity: 0.9; } 50% { box-shadow: 0 0 20px rgba(34,211,238,0.85); opacity: 1; } }
@keyframes face-dot        { 0% { opacity: 0; transform: scale(0.4); } 30%,70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(0.4); } }
@keyframes face-photo-cycle { 0% { opacity: 0; transform: scale(1.06); } 3% { opacity: 1; transform: scale(1); } 14% { opacity: 1; transform: scale(1); } 17% { opacity: 0; transform: scale(0.97); } 100% { opacity: 0; transform: scale(0.97); } }
@keyframes face-scan       { 0% { top: -4px; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
@keyframes face-status-pulse { 0% { box-shadow: 0 0 0 0 rgba(34,211,238,0.6); } 70% { box-shadow: 0 0 0 10px rgba(34,211,238,0); } 100% { box-shadow: 0 0 0 0 rgba(34,211,238,0); } }
@keyframes face-status-cycle { 0%,45% { opacity: 1; transform: translateY(0); } 50%,100% { opacity: 0; transform: translateY(-4px); } }
@keyframes auth-phone-float { 0%,100% { transform: translate(-50%,-50%) rotate(0); } 50% { transform: translate(-50%, calc(-50% - 6px)) rotate(-0.6deg); } }
@keyframes auth-notif-slide { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes auth-notif-pulse { 0%,92% { background: rgba(255,255,255,0.08); box-shadow: none; } 4% { background: rgba(34,211,238,0.18); box-shadow: 0 0 0 2px rgba(34,211,238,0.35), 0 8px 24px rgba(34,211,238,0.2); } }
@keyframes auth-download-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(2px); } }
@keyframes notif-state-ready       { 0%,32% { opacity: 1; } 37%,92% { opacity: 0; } 97%,100% { opacity: 1; } }
@keyframes notif-state-downloading { 0%,32% { opacity: 0; } 37%,70% { opacity: 1; } 75%,100% { opacity: 0; } }
@keyframes notif-state-saved       { 0%,70% { opacity: 0; } 75%,92% { opacity: 1; } 97%,100% { opacity: 0; } }
@keyframes notif-progress          { 0%,35% { transform: scaleX(0); } 70% { transform: scaleX(1); } 75%,100% { transform: scaleX(1); } }
@keyframes notif-icon-download     { 0%,70% { opacity: 1; } 75%,100% { opacity: 0; } }
@keyframes notif-icon-check        { 0%,70% { opacity: 0; transform: scale(0.7); } 75% { opacity: 1; transform: scale(1.15); } 82%,92% { opacity: 1; transform: scale(1); } 97%,100% { opacity: 0; transform: scale(0.9); } }
@keyframes auth-text-in   { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
@keyframes auth-grid-shift { from { background-position: 0 0; } to { background-position: 32px 32px; } }

@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-mobile-brand { display: flex; justify-content: center; margin-bottom: 14px; }
  .auth-mobile-scanner { display: flex; flex-direction: column; align-items: center; margin: 2px auto 20px; }
  .auth-form-side { padding: 24px 20px; }
}

/* Misc */
.spacer-sm { height: 8px; } .spacer-md { height: 16px; } .spacer-lg { height: 26px; }
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.h2 { font-size: 16px; margin: 0; }
.h3 { font-size: 14px; margin: 0; }
.error { color: var(--red); font-size: 12px; }
.ok { color: var(--green); font-size: 12px; }
.legend-list { display: flex; flex-direction: column; gap: 8px; }
.legend-item { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; }
.legend-dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; margin-right: 8px; }

/* ---------------- Bar chart ---------------- */
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.chart-total { font-size: 22px; font-weight: 700; line-height: 1.1; }
.chart-total span { font-size: 12px; font-weight: 500; color: var(--text-muted); margin-left: 6px; }

.chart {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: 18px;
}
.chart-yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: right;
  font-size: 10px;
  color: var(--text-muted);
  padding-bottom: 20px; /* leave room for x-axis labels */
  min-width: 22px;
  flex: 0 0 auto;
}
.chart-plot { position: relative; flex: 1; min-width: 0; }
.chart-grid {
  position: absolute;
  inset: 0 0 20px 0; /* exclude x-axis label row */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.chart-grid span { display: block; height: 1px; background: var(--border); opacity: 0.55; }
.chart-bars {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 200px;
  padding-bottom: 20px;
}
.bar {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.bar-fill {
  width: 100%;
  max-width: 34px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, var(--primary), rgba(124, 92, 255, 0.18));
  transition: filter 0.15s ease, transform 0.15s ease;
  animation: bar-rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transform-origin: bottom;
}
.bar.accent .bar-fill { background: linear-gradient(180deg, var(--accent), rgba(34, 211, 238, 0.18)); }
.bar.green .bar-fill  { background: linear-gradient(180deg, var(--green), rgba(34, 197, 94, 0.18)); }
@keyframes bar-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.bar:hover .bar-fill { filter: brightness(1.18); }
.bar-x {
  position: absolute;
  bottom: 0;
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}
.bar-tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  z-index: 2;
}
.bar-tip .muted { font-weight: 500; }
.bar:hover .bar-tip { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- Dashboard upload empty-state ---------------- */
.dash-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  margin-top: 16px;
  padding: 30px 20px;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  background: var(--bg-2);
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dash-drop:hover { border-color: var(--primary); background: rgba(124, 92, 255, 0.06); }
.dash-drop-ico {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  display: grid; place-items: center;
  margin-bottom: 4px;
}
.dash-drop-title { font-weight: 600; font-size: 14px; }
.dash-drop-sub { font-size: 12px; color: var(--text-muted); }
.dash-drop-cta { color: var(--primary); font-weight: 600; font-size: 13px; margin-top: 4px; }

.dash-drive {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--text);
  font-size: 13px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dash-drive:hover { border-color: var(--primary); background: rgba(124, 92, 255, 0.06); }
.dash-drive-ico { display: grid; place-items: center; }
.dash-drive-chev { margin-left: auto; color: var(--text-muted); display: grid; place-items: center; }

/* ---------------- Shared helpers ---------------- */
.btn.is-disabled { opacity: 0.45; pointer-events: none; }
.btn.btn-ghost-danger { border-color: transparent; background: transparent; color: var(--text-muted); padding: 7px 8px; }
.btn.btn-ghost-danger:hover { color: var(--red); background: rgba(239, 68, 68, 0.12); }
.toggle-panel { display: none; }
.toggle-panel.is-open { display: flex; }

.field-icon { display: flex; flex-direction: column; gap: 6px; }
.field-icon .lbl { font-size: 12px; color: var(--text-muted); }
.field-icon .wrap { position: relative; display: flex; align-items: center; }
.field-icon .wrap svg { position: absolute; left: 11px; pointer-events: none; }
.field-icon .wrap .input { padding-left: 34px; }

.info-banner {
  display: flex; align-items: center; gap: 10px;
  margin-top: 18px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-2);
  color: var(--text-dim);
  font-size: 13px;
}
.info-banner svg { flex: 0 0 auto; }

/* Plan-limit warning strip (dashboard) — yellow at 75%, red at 90%. */
.plan-strip {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px;
  padding: 13px 16px;
  border: 1px solid;
  border-radius: 12px;
}
.plan-strip-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: 0 0 auto;
  border-radius: 9px;
}
.plan-strip-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.plan-strip-body strong { font-size: 13.5px; font-weight: 600; color: var(--text); }
.plan-strip-body span { font-size: 12.5px; color: var(--text-dim); }
.plan-strip-cta {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 13px; font-weight: 600;
  color: #fff;
}
.plan-strip.is-warn {
  border-color: rgba(234, 179, 8, 0.45);
  background: rgba(234, 179, 8, 0.10);
}
.plan-strip.is-warn .plan-strip-ico { background: var(--yellow); }
.plan-strip.is-warn .plan-strip-cta { background: var(--yellow); color: #111; }
.plan-strip.is-danger {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.10);
}
.plan-strip.is-danger .plan-strip-ico { background: var(--red); }
.plan-strip.is-danger .plan-strip-cta { background: var(--red); }

/* Face-search: Rekognition sync bar */
.sync-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-2);
}
.sync-bar-info { display: flex; align-items: center; gap: 12px; }
.sync-bar-info svg { flex: 0 0 auto; }
.sync-bar code, .info-banner code {
  background: var(--panel-2); padding: 1px 5px; border-radius: 5px;
  font-size: 12px; font-family: ui-monospace, monospace;
}

/* ---------------- Modal ---------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(5, 7, 14, 0.66);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  padding: 20px;
  animation: modal-fade 0.18s ease both;
}
.modal {
  position: relative;
  width: 100%; max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px 22px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  animation: modal-pop 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.modal-x {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: transparent; border: 0; border-radius: 8px; cursor: pointer;
}
.modal-x:hover { background: var(--panel-2); }
.modal-ico {
  width: 56px; height: 56px; margin: 0 auto 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(124, 92, 255, 0.4);
}
.modal-title { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.modal-text { font-size: 13px; color: var(--text-dim); margin: 0 0 20px; line-height: 1.55; }
.modal-actions { display: flex; flex-direction: column; gap: 8px; }
.modal-actions .btn { justify-content: center; }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }

/* ---------------- Pricing ---------------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  align-items: stretch;
}
.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 18px;
}
.price-card.featured { border-color: var(--green); box-shadow: 0 14px 36px rgba(34, 197, 94, 0.14); }
.price-card.current { border-color: var(--primary); }
.price-badge {
  position: absolute; top: -10px; left: 18px;
  background: var(--green); color: #06210f;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.3px;
  padding: 3px 10px; border-radius: 999px;
}
.price-name { font-size: 16px; font-weight: 700; }
.price-tagline { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; min-height: 30px; }
.price-amount { display: flex; align-items: baseline; gap: 2px; margin: 6px 0 16px; }
.price-cur { font-size: 16px; font-weight: 600; color: var(--text-dim); }
.price-num { font-size: 28px; font-weight: 800; line-height: 1; }
.price-per { font-size: 12px; color: var(--text-muted); }
.price-custom { font-size: 24px; font-weight: 800; }
.price-features { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.price-features li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-dim); }
.price-features li svg { flex: 0 0 auto; }
.price-card .btn { justify-content: center; }
.price-count { display: flex; align-items: baseline; gap: 6px; margin-bottom: 12px; font-size: 12px; }
.price-count-num { font-size: 18px; font-weight: 700; }

@media (max-width: 1100px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .pricing-grid { grid-template-columns: 1fr; } }

/* ---------------- Guests screen ---------------- */
.guests-top { display: flex; gap: 12px; align-items: stretch; margin-bottom: 16px; }
.guests-event-bar {
  flex: 1;
  display: flex; align-items: center; gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 6px 4px 14px;
}
.guests-event-ico { display: grid; place-items: center; flex: 0 0 auto; }
.guests-event-select {
  border: 0; background: transparent; font-size: 14px; font-weight: 600;
  padding: 12px 8px; border-radius: 8px;
}
.guests-event-select:focus { border: 0; }
.guests-top .btn { white-space: nowrap; }

.guests-add { display: flex; gap: 24px; align-items: stretch; overflow: hidden; }
.guests-add-main { flex: 1; min-width: 0; }
.guests-add-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.guests-bulk { flex-direction: column; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

/* Invite illustration */
.guests-add-art {
  position: relative;
  flex: 0 0 230px;
  display: grid; place-items: center;
}
.invite-card {
  position: absolute;
  width: 132px; height: 84px;
  border-radius: 12px;
}
.invite-back {
  background: linear-gradient(135deg, #6244e0, #7c5cff);
  transform: rotate(-9deg) translate(-10px, 6px);
  box-shadow: 0 18px 40px rgba(124, 92, 255, 0.35);
}
.invite-front {
  background: linear-gradient(135deg, #8b6dff, #a78bfa);
  transform: rotate(6deg) translate(12px, -4px);
  box-shadow: 0 14px 30px rgba(124, 92, 255, 0.3);
  display: flex; flex-direction: column; justify-content: center; gap: 9px;
  padding: 0 18px;
}
.invite-line { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.85); width: 78%; }
.invite-line.short { width: 48%; background: rgba(255, 255, 255, 0.55); }
.invite-badge {
  position: absolute;
  right: 30px; bottom: 18px;
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee, #7c5cff);
  display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(34, 211, 238, 0.4);
  z-index: 2;
}
.invite-spark { position: absolute; color: var(--primary); font-size: 11px; opacity: 0.7; }
.invite-spark.s1 { top: 10px; left: 30px; font-size: 9px; }
.invite-spark.s2 { top: 18px; right: 24px; }
.invite-spark.s3 { bottom: 8px; left: 40px; font-size: 13px; }
.invite-spark.s4 { top: 40px; right: 10px; font-size: 9px; color: var(--accent); }
.invite-spark.s5 { bottom: 30px; right: 50px; font-size: 8px; }

/* Stat strip */
.guest-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.guest-stat { display: flex; align-items: flex-start; gap: 13px; padding: 4px 22px; }
.guest-stat + .guest-stat { border-left: 1px solid var(--border); }
.gs-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto; }
.gs-label { font-size: 12.5px; color: var(--text-dim); }
.gs-value { font-size: 26px; font-weight: 700; line-height: 1.2; }
.gs-sub { font-size: 11.5px; color: var(--text-muted); }

/* Table card */
.guests-table-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.guests-search { position: relative; flex: 1; min-width: 220px; display: flex; align-items: center; }
.guests-search svg { position: absolute; left: 12px; pointer-events: none; }
.guests-search .input { padding-left: 36px; }
.guests-statusfilter { flex: 0 0 auto; }
.guests-statusfilter .select { min-width: 150px; }
.guests-adv {
  display: none; gap: 10px; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg-2); flex-wrap: wrap;
}
.guests-adv.is-open { display: flex; }
.table-scroll { overflow-x: auto; }
.guests-table th, .guests-table td { padding: 13px 16px; }
.guests-table tbody tr:last-child td { border-bottom: 0; }

.guest-name { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.guest-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--panel-2) center/cover no-repeat;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: var(--text-dim);
  flex: 0 0 auto;
}

/* Status pill (select styled as badge) */
.status-pill {
  width: auto; min-width: 104px;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11.5px; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.status-pill.joined   { background: rgba(34, 197, 94, 0.15);  color: #4ade80; border-color: rgba(34, 197, 94, 0.3); }
.status-pill.pending  { background: rgba(34, 211, 238, 0.15); color: #38d9f0; border-color: rgba(34, 211, 238, 0.3); }
.status-pill.declined { background: rgba(234, 179, 8, 0.15);  color: #facc15; border-color: rgba(234, 179, 8, 0.3); }

/* Empty state */
.guests-empty-row td { padding: 0 !important; }
.guests-empty-row:hover td { background: transparent; }
.guests-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 56px 20px; }
.guests-empty-ico {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(124, 92, 255, 0.12);
  display: grid; place-items: center; margin-bottom: 16px;
}
.guests-empty-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }

/* Footer + pagination */
.guests-foot { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; flex-wrap: wrap; gap: 12px; }
.pagination { display: flex; align-items: center; gap: 6px; margin: 0 auto; }
.page-btn {
  min-width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--panel); color: var(--text); font-size: 13px;
  padding: 0 8px;
}
.page-btn:hover { background: var(--panel-2); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn.is-disabled { opacity: 0.4; pointer-events: none; }
.guests-perpage .select { min-width: 130px; }

@media (max-width: 900px) {
  .guests-add { flex-direction: column; }
  .guests-add-art { flex-basis: 120px; }
  .guests-add-fields { grid-template-columns: 1fr; }
  .guest-stats { grid-template-columns: repeat(2, 1fr); gap: 16px 0; }
  .guest-stat:nth-child(odd) { border-left: 0; }
}

.tag {
  display: inline-block;
  background: rgba(124,92,255,0.15); color: var(--primary);
  font-size: 11px; padding: 3px 8px; border-radius: 999px;
}
.tag.green { background: rgba(34,197,94,0.15); color: var(--green); }
.tag.red   { background: rgba(239,68,68,0.15); color: var(--red); }
.tag.yellow{ background: rgba(234,179,8,0.15); color: var(--yellow); }
.tag-active    { background: rgba(34,197,94,0.15); color: var(--green); }
.tag-suspended { background: rgba(239,68,68,0.15); color: var(--red); }
.tag-premium   { background: rgba(124,92,255,0.18); color: var(--primary); }
.tag-live      { background: rgba(239,68,68,0.15); color: var(--red); }
.tag-draft     { background: rgba(107,113,133,0.18); color: var(--text-muted); }
.tag-completed { background: rgba(34,197,94,0.15); color: var(--green); }
.tag-uploading { background: rgba(234,179,8,0.15); color: var(--yellow); }

.modal-backdrop { position: fixed; inset: 0; background: rgba(8,9,18,0.6); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; width: 100%; max-width: 520px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.45); }
.form-grid { display: grid; gap: 12px; margin-top: 12px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-muted); }
.form-error { color: var(--red); font-size: 12px; background: rgba(239,68,68,0.08); padding: 8px 10px; border-radius: 8px; }

/* Filter bar */
.filter-bar { display: flex; flex-direction: column; gap: 14px; padding: 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 16px; }
.filter-search { display: flex; align-items: center; gap: 12px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; transition: border-color 0.15s, box-shadow 0.15s; }
.filter-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,92,255,0.18); }
.filter-search input { flex: 1; background: transparent; border: 0; outline: 0; color: var(--text); font-size: 13.5px; }
.filter-search input::placeholder { color: var(--text-dim); }
.filter-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.filter-group { display: inline-flex; align-items: center; gap: 8px; }
.filter-label { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; }
.filter-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-muted); }
.filter-clear { background: transparent; border: 1px solid var(--border); cursor: pointer; color: var(--primary); font-size: 12px; padding: 6px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.filter-clear:hover { background: rgba(124,92,255,0.1); border-color: var(--primary); }

.segmented { display: inline-flex; padding: 3px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; gap: 2px; }
.segmented-sm { padding: 2px; }
.segmented-item { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; font-size: 12px; font-weight: 500; color: var(--text-muted); background: transparent; border: 0; cursor: pointer; border-radius: 7px; transition: background 0.15s, color 0.15s, box-shadow 0.15s; white-space: nowrap; text-decoration: none; }
.segmented-sm .segmented-item { padding: 5px 10px; font-size: 11.5px; }
.segmented-item:hover { color: var(--text); }
.segmented-item.active { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(124,92,255,0.28); }
.segmented-dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; box-shadow: 0 0 0 2px rgba(255,255,255,0.06); }
.segmented-count { font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: var(--panel); color: var(--text-muted); font-weight: 600; border: 1px solid var(--border); }
.segmented-item.active .segmented-count { background: rgba(255,255,255,0.18); color: #fff; border-color: transparent; }

.filter-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.filter-meta strong { color: var(--text); font-weight: 600; }

/* Toast notifications */
.toast-stack { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 200; pointer-events: none; }
.toast {
  pointer-events: auto; min-width: 280px; max-width: 380px;
  display: grid; grid-template-columns: 28px 1fr 22px; gap: 10px; align-items: start;
  padding: 12px 14px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.02) inset;
  animation: toast-in 220ms cubic-bezier(0.16,1,0.3,1) both;
}
.toast-ico { width: 26px; height: 26px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.toast-success .toast-ico { background: rgba(34,197,94,0.85); }
.toast-error   .toast-ico { background: rgba(239,68,68,0.85); }
.toast-info    .toast-ico { background: rgba(124,92,255,0.85); }
.toast-success { border-color: rgba(34,197,94,0.35); }
.toast-error   { border-color: rgba(239,68,68,0.35); }
.toast-info    { border-color: rgba(124,92,255,0.35); }
.toast-body { min-width: 0; }
.toast-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.toast-message { font-size: 12.5px; color: var(--text); word-wrap: break-word; }
.toast-close { background: transparent; border: 0; cursor: pointer; padding: 0; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; color: var(--text-dim); }
.toast-close:hover { background: var(--panel-2); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 999px; animation: spin 0.7s linear infinite;
  vertical-align: -2px; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn[disabled], .btn:disabled { opacity: 0.7; cursor: progress; }

/* Event-card overlay buttons (leave / delete) */
.event-card-leave {
  position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(8,9,18,0.6); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px; cursor: pointer; padding: 0;
  opacity: 0; transition: opacity 0.15s, background 0.15s, border-color 0.15s, transform 0.15s;
  backdrop-filter: blur(4px); z-index: 2;
}
.event-card:hover .event-card-leave,
.event-card-leave:focus-visible { opacity: 1; }
.event-card-leave:hover { background: rgba(239,68,68,0.85); border-color: rgba(239,68,68,0.6); transform: scale(1.08); }
@media (hover: none) { .event-card-leave { opacity: 1; } }

/* =========================================================================
   Organizer / AI Face Search (premium)
   ========================================================================= */
.face-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 28px 32px;
  margin-bottom: 22px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(124,92,255,0.28), transparent 55%),
    radial-gradient(circle at 88% 100%, rgba(34,211,238,0.22), transparent 55%),
    linear-gradient(160deg, #15172a 0%, #0c0e1a 100%);
  border: 1px solid var(--border);
}
.face-hero-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(236,72,153,0.20), transparent 50%);
  pointer-events: none;
}
.face-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  pointer-events: none;
  animation: auth-grid-shift 24s linear infinite;
}
.face-hero-body { position: relative; z-index: 1; }
.face-hero-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #7c5cff, #ec4899);
  border-radius: 999px;
  font-size: 10.5px; font-weight: 700; color: #fff;
  text-transform: uppercase; letter-spacing: 0.6px;
  box-shadow: 0 8px 20px rgba(124,92,255,0.4);
}
.face-hero-title {
  font-size: 32px; font-weight: 700; letter-spacing: -0.6px; margin: 12px 0 8px;
  background: linear-gradient(135deg, #fff 0%, #c7c4ff 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.face-hero-sub { color: var(--text-dim); font-size: 13.5px; margin: 0 0 14px; max-width: 560px; line-height: 1.55; }
.face-hero-bullets { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-dim); }
.face-hero-bullets span { display: inline-flex; align-items: center; gap: 6px; }

.face-hero-visual {
  position: relative; z-index: 1;
  width: 180px; height: 180px;
  display: grid; place-items: center;
}
.face-hero-rings { position: absolute; inset: 0; }
.face-hero-rings .phone-ring { border-radius: 999px; }

/* Search panel — two columns */
.face-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
.face-search-card { padding: 22px; }
.face-search-go {
  margin-top: 18px;
  align-self: flex-start;
  padding: 11px 18px;
  background: linear-gradient(135deg, #7c5cff, #ec4899);
  border: 0;
  box-shadow: 0 10px 24px rgba(124,92,255,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.face-search-go:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(124,92,255,0.45);
}

.face-drop {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  background: var(--panel-2);
  border: 2px dashed var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.face-drop:hover { border-color: var(--primary); background: rgba(124,92,255,0.05); }
.face-drop.drag  { border-color: var(--primary); background: rgba(124,92,255,0.10); }
.face-drop-preview {
  width: 56px; height: 56px;
  border-radius: 12px;
  background: rgba(124,92,255,0.12);
  display: grid; place-items: center;
  background-size: cover; background-position: center;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.06);
}
.face-drop-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.face-drop-title { font-weight: 600; font-size: 13.5px; }
.face-drop-sub   { font-size: 12px; color: var(--text-muted); }

.face-tips { padding: 22px; }
.face-tip-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 12px; }
.face-tip-list li { display: flex; gap: 12px; align-items: flex-start; }
.face-tip-list li strong { color: var(--text); font-weight: 600; }
.face-tip-list li > div { font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }
.face-tip-num {
  width: 22px; height: 22px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(34,211,238,0.15); color: #22d3ee;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
}

/* Results banner */
.face-result-banner {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px 20px;
  margin-bottom: 16px;
  background:
    linear-gradient(135deg, rgba(124,92,255,0.10), rgba(34,211,238,0.06));
  border: 1px solid rgba(124,92,255,0.25);
  border-radius: 14px;
}
.face-result-thumb {
  width: 64px; height: 64px;
  border-radius: 14px;
  background: var(--panel-2);
  background-size: cover; background-position: center;
  border: 2px solid rgba(124,92,255,0.5);
  box-shadow: 0 6px 18px rgba(124,92,255,0.3);
  flex-shrink: 0;
}
/* Saved-selfie picker (attendee face search) */
.selfie-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.selfie-opt { cursor: pointer; display: inline-flex; position: relative; }
.selfie-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.selfie-thumb {
  display: block; width: 58px; height: 58px; border-radius: 12px;
  background: var(--panel-2) center/cover no-repeat;
  border: 2px solid var(--border);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.selfie-opt:hover .selfie-thumb { border-color: var(--text-dim); }
.selfie-opt input:checked + .selfie-thumb {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,92,255,.25);
}
.selfie-opt input:focus-visible + .selfie-thumb { border-color: var(--primary); }

.face-result-title { font-size: 16px; font-weight: 600; }
.face-result-title strong { color: var(--primary); }
.face-result-stats { display: flex; gap: 14px; margin-top: 4px; font-size: 12px; color: var(--text-dim); }
.face-result-stats span { display: inline-flex; align-items: center; gap: 5px; }
.face-result-stats strong { color: var(--text); font-weight: 600; }
.face-result-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.face-result-filters .chip { display: inline-flex; align-items: center; gap: 6px; }
.face-result-filters .chip-count {
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--text-muted);
  font-weight: 600;
  border: 1px solid var(--border);
}
.face-result-filters .chip.active .chip-count { background: rgba(255,255,255,0.18); color: #fff; border-color: transparent; }
.dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.dot-green  { background: #22c55e; }
.dot-yellow { background: #eab308; }

/* Result tiles with confidence color band */
.face-match { position: relative; }
.face-match .photo-tile { display: block; }
.face-match-conf {
  position: absolute; top: 8px; left: 8px;
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  background: rgba(8,9,18,0.75);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  backdrop-filter: blur(6px);
}
.face-match-high .face-match-conf { background: rgba(34,197,94,0.85); border-color: rgba(34,197,94,0.4); }
.face-match-mid  .face-match-conf { background: rgba(234,179,8,0.85); border-color: rgba(234,179,8,0.4); color: #111; }
.face-match-low  .face-match-conf { background: rgba(239,68,68,0.85); border-color: rgba(239,68,68,0.4); }
.face-match-glow {
  position: absolute; inset: 0;
  border-radius: 10px;
  pointer-events: none;
  box-shadow: 0 0 0 0 transparent;
  transition: box-shadow 0.25s;
}
.face-match-high:hover .face-match-glow { box-shadow: 0 0 0 2px rgba(34,197,94,0.45), 0 0 28px rgba(34,197,94,0.25); }
.face-match-mid:hover  .face-match-glow { box-shadow: 0 0 0 2px rgba(234,179,8,0.45), 0 0 28px rgba(234,179,8,0.25); }
.face-match-low:hover  .face-match-glow { box-shadow: 0 0 0 2px rgba(239,68,68,0.40), 0 0 28px rgba(239,68,68,0.20); }
.face-match:hover .photo-actions { opacity: 1; }

/* Empty / ready state */
.face-empty { padding: 48px 24px; text-align: center; border-style: solid; }
.face-empty-ico {
  display: inline-flex; width: 64px; height: 64px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(124,92,255,0.20), rgba(34,211,238,0.15));
  border: 1px solid rgba(124,92,255,0.30);
  align-items: center; justify-content: center;
}
.face-empty-title { font-weight: 600; font-size: 15px; margin-top: 12px; }
.face-empty-sub   { color: var(--text-muted); font-size: 13px; margin-top: 6px; max-width: 380px; margin-left: auto; margin-right: auto; }

@media (max-width: 900px) {
  .face-hero { grid-template-columns: 1fr; padding: 22px 20px; }
  .face-hero-visual { display: none; }
  .face-hero-title { font-size: 24px; }
  .face-grid { grid-template-columns: 1fr; }
  .face-result-banner { grid-template-columns: 1fr; gap: 12px; text-align: left; }
}

/* =========================================================================
   Organizer / Photos page redesign
   ========================================================================= */
.photos-header { display: flex; flex-direction: column; gap: 16px; margin-bottom: 18px; }
.photos-event-switch { display: flex; align-items: center; gap: 12px; }
.photos-event-switch .select { max-width: 320px; }

.photos-hero {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.photos-hero-cover {
  aspect-ratio: 4/3;
  border-radius: 10px;
  background: linear-gradient(135deg, #2a2740, #1c1f30);
  background-size: cover;
  background-position: center;
  position: relative;
  display: grid; place-items: center;
}
.photos-hero-cover-fallback { opacity: 0.6; }
.photos-hero-meta { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.photos-hero-name { font-size: 18px; font-weight: 700; letter-spacing: -0.2px; }
.photos-hero-stats {
  display: flex; align-items: center; gap: 18px;
  padding: 10px 16px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px;
}
.photos-hero-stat { display: flex; flex-direction: column; gap: 2px; min-width: 64px; }
.photos-hero-stat .v { font-size: 18px; font-weight: 700; line-height: 1; }
.photos-hero-stat .l { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Big drop-zone for bulk upload */
.photos-upload-zone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(124,92,255,0.10), transparent 60%),
    var(--panel-2);
  padding: 28px 24px;
  margin: 0 0 20px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.photos-upload-zone:hover { border-color: var(--primary); }
.photos-upload-zone.drag {
  border-color: var(--primary);
  background:
    radial-gradient(circle at 50% 0%, rgba(124,92,255,0.18), transparent 60%),
    rgba(124,92,255,0.08);
  transform: scale(1.005);
}
.photos-upload-inner {
  display: flex; align-items: center; gap: 18px;
}
.photos-upload-inner[hidden] { display: none; }
.photos-upload-ico {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, #7c5cff, #ec4899);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(124,92,255,0.35);
  flex-shrink: 0;
}
.photos-upload-title { font-weight: 700; font-size: 15px; }
.photos-upload-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.photos-upload-zone .btn { margin-left: auto; }

/* Toolbar */
.photos-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.photos-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 12px;
  flex: 1; min-width: 240px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.photos-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,92,255,0.18); }
.photos-search input { flex: 1; background: transparent; border: 0; outline: 0; color: var(--text); font-size: 13.5px; }
.photos-search-clear {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--border); border-radius: 999px;
  color: var(--text-muted); text-decoration: none;
}
.photos-search-clear:hover { color: var(--text); }
.photos-result-meta { font-size: 12px; color: var(--text-muted); margin-left: auto; }
.photos-result-meta strong { color: var(--text); }

/* Photo tile hover overlay + actions */
.photo-tile-wrap { position: relative; }
.photo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.78) 100%);
  opacity: 0; transition: opacity 0.18s;
  pointer-events: none;
  display: flex; align-items: flex-end; padding: 10px;
  border-radius: 10px;
}
.photo-tile-wrap:hover .photo-overlay { opacity: 1; }
.photo-overlay-meta { min-width: 0; }
.photo-overlay-name {
  color: #fff; font-size: 12px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.photo-overlay-sub { color: rgba(255,255,255,0.7); font-size: 10.5px; margin-top: 2px; }

.photo-actions {
  position: absolute; top: 6px; right: 6px;
  display: flex; gap: 4px;
  opacity: 0; transition: opacity 0.15s;
}
.photo-tile-wrap:hover .photo-actions,
.photo-actions:focus-within { opacity: 1; }
.photo-action {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(8,9,18,0.7); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; cursor: pointer; padding: 0;
  backdrop-filter: blur(4px); color: #fff;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  text-decoration: none;
}
.photo-action:hover { background: rgba(124,92,255,0.85); border-color: var(--primary); transform: scale(1.06); }
.photo-action-danger:hover { background: rgba(239,68,68,0.85); border-color: var(--red); }

/* Bulk select bar */
.bulk-bar {
  display: flex; align-items: center; gap: 14px;
  margin: 4px 0 14px;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-wrap: wrap;
}
.bulk-selectall { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.bulk-selectall input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.bulk-count { font-size: 12.5px; }
.bulk-bar .btn-danger { margin-left: auto; }
.bulk-bar .btn-danger:disabled { opacity: 0.45; cursor: default; }

/* Per-tile selection checkbox */
.photo-check {
  position: absolute; top: 6px; left: 6px; z-index: 3;
  width: 24px; height: 24px;
  opacity: 0; transition: opacity 0.15s;
  cursor: pointer;
}
.photo-tile-wrap:hover .photo-check,
.photo-tile-wrap.selected .photo-check { opacity: 1; }
.photo-check input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.photo-check-box {
  width: 24px; height: 24px; border-radius: 7px;
  display: grid; place-items: center;
  background: rgba(8,9,18,0.7); border: 1.5px solid rgba(255,255,255,0.5);
  backdrop-filter: blur(4px);
}
.photo-check-box svg { opacity: 0; }
.photo-check input:checked + .photo-check-box {
  background: var(--primary); border-color: var(--primary);
}
.photo-check input:checked + .photo-check-box svg { opacity: 1; }
.photo-tile-wrap.selected .photo-tile { outline: 2px solid var(--primary); outline-offset: 1px; }
.photo-tile-wrap.selected .photo-tile::after { content: ''; position: absolute; inset: 0; background: rgba(124,92,255,0.18); border-radius: 10px; }

/* =========================================================================
   Branded photo overlay — applied on event-detail photo tiles
   Layout per tile:
     ┌───────────────────────────┐
     │                  [brand]  │  top-right pill
     │                           │
     │          [PHOTO]          │
     │                           │
     │ date·loc   [logo]  #tag   │  bottom strip
     └───────────────────────────┘
   ========================================================================= */
.photo-branded { position: relative; }
.photo-branded-img {
  position: relative;
  overflow: hidden;
  /* Slightly taller so the bottom strip doesn't crowd the subject */
  aspect-ratio: 4 / 5;
}

/* Top-right company badge */
.photo-brand-top {
  position: absolute;
  top: 8px; right: 8px;
  display: inline-flex; align-items: center;
  padding: 4px 9px;
  background: rgba(8, 9, 18, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  z-index: 2;
  max-width: calc(100% - 16px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Bottom strip: 3 columns — date+loc | logo | #tag */
.photo-brand-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
  color: #fff;
  z-index: 2;
}
.photo-brand-bar-left,
.photo-brand-bar-right {
  display: flex; flex-direction: column; gap: 1px;
  min-width: 0;
}
.photo-brand-bar-right {
  align-items: flex-end;
  text-align: right;
}
.photo-brand-line {
  font-size: 10.5px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 100%;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.photo-brand-line:first-child { font-weight: 600; }

.photo-brand-bar-center {
  display: grid; place-items: center;
}
.photo-brand-logo {
  width: 32px; height: 32px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.1);
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  display: inline-block;
}
.photo-brand-logo-fallback {
  background: linear-gradient(135deg, #7c5cff, #ec4899);
  display: grid; place-items: center;
}

.photo-brand-tag {
  display: inline-block;
  padding: 3px 9px;
  background: rgba(124, 92, 255, 0.32);
  border: 1px solid rgba(124, 92, 255, 0.55);
  border-radius: 999px;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  backdrop-filter: blur(4px);
}

/* Top-right brand dot — small pulse */
.photo-brand-top-dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c5cff, #ec4899);
  display: inline-block;
  margin-right: 5px;
  box-shadow: 0 0 0 0 rgba(124, 92, 255, 0.5);
  animation: brand-pulse 2.6s ease-out infinite;
}
@keyframes brand-pulse {
  0%   { box-shadow: 0 0 0 0    rgba(124, 92, 255, 0.6); }
  60%  { box-shadow: 0 0 0 5px  rgba(124, 92, 255, 0);   }
  100% { box-shadow: 0 0 0 0    rgba(124, 92, 255, 0);   }
}

/* =========================================================================
   Lightbox modal — click any [data-lightbox] tile to open
   ========================================================================= */
.lightbox {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(5, 7, 14, 0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 56px 72px;
  animation: lightbox-fade 180ms ease-out both;
}
@keyframes lightbox-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.lightbox[hidden] { display: none; }
.lightbox-stage {
  position: relative;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-img {
  display: block;
  width: auto; height: auto;
  max-width: 100%; max-height: calc(100vh - 112px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  background: #11131f;
  animation: lightbox-pop 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Wraps the image so the branded chrome can lay over it. The frame is sized to
   the image; capping both by viewport height (the wrapper breaks a % chain)
   guarantees the whole photo is shown — contained, never cropped/zoomed. */
.lightbox-frame {
  position: relative;
  max-width: 100%; max-height: calc(100vh - 112px);
  border-radius: 10px;
  overflow: hidden;
  display: inline-block;
}
.photo-brand-top-logo { height: 15px; width: auto; max-width: 110px; object-fit: contain; display: block; }
.lightbox-frame .photo-brand-top {
  top: 14px; right: 14px;
  font-size: 12px;
  padding: 5px 12px;
}
.lightbox-frame .photo-brand-top-logo { height: 20px; max-width: 150px; }
.lightbox-frame .photo-brand-top-dot {
  width: 7px; height: 7px;
}
.lightbox-frame .photo-brand-bar {
  padding: 14px 18px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0));
}
.lightbox-frame .photo-brand-line { font-size: 13px; }
.lightbox-frame .photo-brand-logo { width: 42px; height: 42px; }
.lightbox-frame .photo-brand-tag  { font-size: 12px; padding: 4px 11px; }
@keyframes lightbox-pop {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-btn {
  position: absolute;
  width: 44px; height: 44px;
  border-radius: 999px;
  background: rgba(22, 24, 39, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  padding: 0;
}
.lightbox-btn:hover {
  background: rgba(124, 92, 255, 0.85);
  border-color: var(--primary);
  transform: scale(1.06);
}
.lightbox-btn:disabled {
  opacity: 0.35; cursor: not-allowed; transform: none;
  background: rgba(22, 24, 39, 0.6);
}
.lightbox-close { top: 18px; right: 18px; }
.lightbox-prev  { top: 50%; left: 18px;  transform: translateY(-50%); }
.lightbox-next  { top: 50%; right: 18px; transform: translateY(-50%); }
.lightbox-prev:hover:not(:disabled),
.lightbox-next:hover:not(:disabled) { transform: translateY(-50%) scale(1.06); }

.lightbox-foot {
  position: absolute;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px;
  padding: 8px 16px;
  background: rgba(22, 24, 39, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  backdrop-filter: blur(8px);
  max-width: calc(100% - 36px);
}
.lightbox-counter { font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.7); }
.lightbox-counter strong { color: #fff; font-weight: 700; }
.lightbox-caption {
  color: rgba(255, 255, 255, 0.85);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 360px;
}
.lightbox-download {
  margin-left: 4px;
  color: #fff; text-decoration: none;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.3);
  transition: background 0.15s;
}
.lightbox-download:hover { background: rgba(124, 92, 255, 0.85); }

/* Two-button download chip group (Branded / Original) */
.lightbox-dl {
  color: #fff; text-decoration: none;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  white-space: nowrap;
}
.lightbox-dl[hidden] { display: none; }
.lightbox-dl:hover { transform: translateY(-1px); }
.lightbox-dl-branded {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.85), rgba(236, 72, 153, 0.85));
  border-color: rgba(124, 92, 255, 0.6);
}
.lightbox-dl-branded:hover {
  background: linear-gradient(135deg, rgb(124, 92, 255), rgb(236, 72, 153));
}
.lightbox-dl-original {
  background: rgba(255, 255, 255, 0.08);
}
.lightbox-dl-original:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
}

@media (max-width: 720px) {
  .lightbox { padding: 24px 12px; }
  .lightbox-img, .lightbox-frame { max-height: calc(100vh - 48px); }
  .lightbox-btn { width: 38px; height: 38px; }
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
  .lightbox-foot { font-size: 11px; gap: 8px; padding: 6px 10px; flex-wrap: wrap; justify-content: center; }
  .lightbox-caption { display: none; }
  .lightbox-dl span { display: none; }
  .lightbox-dl { padding: 6px; }
  .lightbox-frame .photo-brand-bar { padding: 10px 12px 12px; }
  .lightbox-frame .photo-brand-line { font-size: 11px; }
  .lightbox-frame .photo-brand-logo { width: 32px; height: 32px; }
}

/* Wrap the photo tile + delete button on organizer's view */
.branded-photo-cell { position: relative; }
.branded-photo-delete {
  position: absolute;
  top: 8px; left: 8px;
  margin: 0;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.15s;
}
.branded-photo-cell:hover .branded-photo-delete,
.branded-photo-delete:focus-within { opacity: 1; }

@media (max-width: 720px) {
  .photo-brand-bar { padding: 8px 10px 10px; }
  .photo-brand-line { font-size: 9.5px; }
  .photo-brand-logo { width: 26px; height: 26px; }
  .photo-brand-tag { font-size: 9.5px; padding: 2px 7px; }
  .photo-brand-top { font-size: 9.5px; padding: 3px 7px; }
}

/* Google Drive import panel */
.drive-import {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 0 0 18px;
  overflow: hidden;
}
.drive-import > summary {
  list-style: none;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 13px; font-weight: 600;
  user-select: none;
}
.drive-import > summary::-webkit-details-marker { display: none; }
.drive-import > summary:hover { background: var(--panel-2); }
.drive-import-ico {
  width: 26px; height: 26px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.drive-import-chev {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 12px;
  transition: transform 0.15s;
}
.drive-import[open] .drive-import-chev { transform: rotate(180deg); }
.drive-import-form {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.drive-import-form .textarea {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
  resize: vertical;
}
.drive-import-form code {
  background: var(--panel-2);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
}

/* Empty state for photos page */
.photos-empty { padding: 48px 24px; }
.photos-empty-ico {
  display: inline-flex; width: 64px; height: 64px;
  border-radius: 999px; background: rgba(124,92,255,0.15);
  align-items: center; justify-content: center;
}

@media (max-width: 720px) {
  .photos-hero { grid-template-columns: 1fr; }
  .photos-upload-zone { padding: 20px 16px; }
  .photos-upload-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .photos-upload-zone .btn { margin-left: 0; align-self: stretch; justify-content: center; }
}

/* Page fade-in */
.page-fade { animation: page-fade-in 180ms ease-out both; }
@keyframes page-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .auth-tile, .auth-orb, .auth-grid, .auth-brand, .auth-rotator-text, .auth-trust, .auth-form-shell,
  .auth-form-shell .form .field, .face-bracket, .face-dot, .face-scan, .face-photo,
  .face-status-pulse, .face-status-line, .auth-phone-center, .phone-ring,
  .auth-notification, .state-ready, .state-downloading, .state-saved,
  .auth-notif-progress-fill, .icon-download, .icon-check { animation: none !important; }
  .face-status-line:nth-child(2) { display: none; }
  .face-photo:first-child { opacity: 1; }
  .state-ready { opacity: 1; }
  .state-downloading, .state-saved, .icon-check { opacity: 0; }
  .icon-download { opacity: 1; }
  .auth-notif-progress-fill { transform: scaleX(0); }
  .page-fade { animation: none; }
}

@media (max-width: 1100px) {
  .layout-2 { grid-template-columns: 1fr; }
  .grid-cols-5 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ====================================================================
   Mobile / tablet — off-canvas sidebar drawer + dense layouts
   ==================================================================== */
@media (max-width: 900px) {
  /* App becomes single-column; the sidebar slides in as a drawer. */
  .app { grid-template-columns: 1fr; min-width: 0; }
  .nav-toggle { display: grid; }
  .topbar-brand { display: flex; }

  /* Attendee panel uses a bottom tab bar instead of the drawer. */
  .panel-attendee .bottom-nav { display: flex; }
  .panel-attendee .nav-toggle { display: none; }
  .panel-attendee .sidebar { display: none; }
  .panel-attendee .main { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }

  /* Overflow safety net: never let a stray wide child push the page sideways. */
  html, body { overflow-x: hidden; max-width: 100%; }
  .main { min-width: 0; max-width: 100%; }
  .topbar, .welcome { min-width: 0; }

  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 264px; max-width: 82vw;
    height: 100%;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  /* Lock background scroll while the drawer is open. */
  body.nav-open { overflow: hidden; }

  .main { padding: 16px 16px 28px; }
  .topbar { margin-bottom: 18px; gap: 10px; }
  .welcome h1 { font-size: 18px; }
  .welcome p { font-size: 12px; }

  /* Wide multi-column grids collapse. */
  .grid-cols-5,
  .grid-cols-4,
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }

  /* Tables scroll horizontally instead of overflowing the viewport. */
  .table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 640px) {
  .main { padding: 14px 12px 26px; }

  /* Compact single-row topbar: [≡]  title ……  [avatar] [action]. */
  .topbar { flex-wrap: nowrap; align-items: center; gap: 8px; margin-bottom: 16px; }
  .welcome { flex: 1 1 0; min-width: 0; }
  .welcome h1 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .welcome p { display: none; }              /* subtitle is noise on a phone */
  .topbar-right { gap: 6px; flex: 0 0 auto; margin-left: auto; } /* push avatar group to the right */
  .search { display: none; }                 /* no room for the search box */
  .topbar .icon-btn { display: none; }        /* drop help/bell; keep the avatar menu */
  /* Page action (e.g. "Leave") sits inline at the far right, not full-width. */
  .topbar-action { order: 4; width: auto; flex: 0 0 auto; }

  /* Single / double column everywhere it matters. */
  .grid-cols-5,
  .grid-cols-4,
  .grid-cols-3,
  .grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }

  .card { padding: 14px; }

  /* Featured event: tighter padding + buttons stack instead of squeezing. */
  .featured-overlay { padding: 20px 18px; }
  .featured-overlay h2 { font-size: 19px; }
  .featured-overlay .flex { flex-wrap: wrap; }
  .featured-overlay .btn { flex: 1 1 auto; justify-content: center; }

  /* Toolbars / button rows wrap instead of overflowing. */
  .toolbar, .section-head, .bulk-bar, .chart-head { flex-wrap: wrap; }
}

@media (max-width: 420px) {
  .grid-cols-5,
  .grid-cols-4,
  .grid-cols-3,
  .grid-cols-2 { grid-template-columns: 1fr; }
}

/* ====================================================================
   Settings screen
   ==================================================================== */
.set-card { display: flex; flex-direction: column; gap: 16px; padding: 22px; }
.grid.grid-cols-2 { gap: 18px; }
.set-billing, .set-prefs { margin-top: 18px; }

.set-head { display: flex; align-items: flex-start; gap: 14px; }
.set-head--row { justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.set-head-ico {
  width: 42px; height: 42px; flex: 0 0 auto;
  border-radius: 11px;
  background: rgba(124, 92, 255, 0.14);
  display: grid; place-items: center;
}
.set-title { font-size: 16px; font-weight: 700; margin: 0; }
.set-sub { font-size: 12.5px; color: var(--text-muted); margin: 3px 0 0; }

.set-card .row { gap: 14px; }
.set-card .field-icon .wrap .input { padding-left: 36px; }
.set-card .field-icon .lbl { font-size: 12px; color: var(--text-dim); }
.set-card .input:focus { box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.14); }
.set-card .input:disabled { color: var(--text-muted); cursor: not-allowed; }

/* Password eye toggle */
.field-icon .wrap .input.has-eye { padding-right: 40px; }
.pwd-eye {
  position: absolute; right: 6px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: transparent; border: 0; border-radius: 8px;
  color: var(--text-muted); cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.pwd-eye:hover { background: var(--panel); color: var(--text); }
.pwd-eye.is-on { color: var(--primary); }

/* Avatar row */
.set-avatar-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.set-avatar {
  width: 36px; height: 36px; flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  background-size: cover; background-position: center;
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 13px;
}
.set-avatar-meta { flex: 1; min-width: 0; }
.set-avatar-name { font-weight: 600; font-size: 13px; }
.set-avatar-hint { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.set-submit { align-self: flex-start; margin-top: 2px; }

/* ---- Settings: tabbed sub-pages ---- */
.settings-page { max-width: 640px; }
.settings-tabs {
  display: flex; gap: 4px; padding: 5px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 13px; margin-bottom: 22px; overflow-x: auto;
}
.settings-tabs::-webkit-scrollbar { height: 0; }
.settings-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 9px; font-size: 13px; font-weight: 500;
  color: var(--text-dim); white-space: nowrap;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.settings-tab:hover { color: var(--text); background: var(--panel); }
.settings-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 4px 14px rgba(124, 92, 255, .35);
}
.settings-tab svg { flex: 0 0 auto; opacity: .92; }
.settings-page .set-card { border-radius: 14px; }
.set-upgrade {
  background: linear-gradient(135deg, var(--primary), var(--pink));
  border: 0; color: #fff; font-weight: 600;
  box-shadow: 0 8px 20px rgba(124, 92, 255, 0.3);
}
.set-upgrade:hover { filter: brightness(1.06); }

/* Plan & billing body */
.set-billing-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.1fr 1.1fr;
  gap: 0;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.set-billing-grid > div { padding: 18px 20px; }
.set-billing-grid > div + div { border-left: 1px solid var(--border); }
.set-col-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.set-plan-name { font-size: 22px; font-weight: 700; color: var(--primary); line-height: 1; }
.set-plan-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--text-muted); }
.set-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(34, 197, 94, 0.15); color: #4ade80;
  font-size: 11px; font-weight: 600;
}
.set-included-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.set-feat { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }

.set-usage-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; margin-bottom: 7px; }
.set-usage-row:not(:first-of-type) { margin-top: 14px; }
.set-usage-name { display: inline-flex; align-items: center; gap: 7px; color: var(--text-dim); }
.set-usage-val { color: var(--text-muted); font-size: 11.5px; }
.set-bar { height: 7px; border-radius: 999px; background: var(--border); overflow: hidden; }
.set-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--pink)); min-width: 4px; }

/* Account & preferences */
.set-prefs-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.set-pref {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 14px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer; text-align: left; color: inherit;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.set-pref:hover { border-color: var(--primary); transform: translateY(-1px); }
.set-pref-ico {
  width: 34px; height: 34px; flex: 0 0 auto;
  border-radius: 9px;
  background: rgba(124, 92, 255, 0.14);
  display: grid; place-items: center;
}
.set-pref-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.set-pref-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-pref-sub { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-pref.is-danger { border-color: rgba(239, 68, 68, 0.3); }
.set-pref.is-danger:hover { border-color: var(--red); background: rgba(239, 68, 68, 0.08); }
.set-pref.is-danger .set-pref-ico { background: rgba(239, 68, 68, 0.14); }
.set-pref.is-danger .set-pref-title { color: #f87171; }

@media (max-width: 1100px) {
  .set-billing-grid { grid-template-columns: 1fr; }
  .set-billing-grid > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .set-prefs-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .set-card .row { flex-direction: column; }
  .set-prefs-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   Analytics — premium redesign
   ========================================================================= */
.analytics-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin-top: 18px;
}
@media (max-width: 980px) { .analytics-row { grid-template-columns: 1fr; } }

.analytics-card { padding: 20px 22px; }
.analytics-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}

/* Segmented tabs (7d/30d/90d, All time) */
.seg-tabs {
  display: inline-flex;
  padding: 3px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.seg-tab {
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 12px; font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.2px;
  transition: background 0.15s, color 0.15s;
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap;
}
.seg-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.04); }
.seg-tab.active {
  background: linear-gradient(135deg, rgba(124,92,255,0.85), rgba(236,72,153,0.7));
  color: #fff;
}
.seg-tab--static {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.seg-tab--static:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

/* Views over time chart */
.views-chart {
  height: 220px;
  margin: 6px -8px 4px;
  position: relative;
}
.views-chart-svg { width: 100%; height: 100%; display: block; }
.views-chart-axis {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-dim);
  padding: 0 4px;
}
.views-chart-axis strong { font-weight: 700; }

/* Empty state — big circular icon, dashed border */
.analytics-empty {
  margin-top: 14px;
  padding: 36px 24px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.analytics-empty-icon {
  width: 64px; height: 64px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(124, 92, 255, 0.10);
  border: 1px solid rgba(124, 92, 255, 0.22);
}
.analytics-empty-title {
  color: #fff; font-weight: 600; font-size: 14px;
}
.analytics-empty-sub {
  color: var(--text-muted);
  font-size: 12.5px; line-height: 1.55;
}

/* Country horizontal bars */
.country-bars {
  display: flex; flex-direction: column; gap: 14px;
  margin-top: 12px;
}
.country-bar { display: flex; flex-direction: column; gap: 6px; }
.country-bar-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px;
  color: #fff;
}
.country-bar-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.country-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: #7c5cff;
  transition: width 0.4s ease;
}

/* Top events leaderboard */
.analytics-events {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--border);
}
.analytics-event-row {
  display: grid;
  grid-template-columns: 28px 56px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.analytics-event-row:hover { background: rgba(255, 255, 255, 0.02); }
.analytics-event-row:last-child { border-bottom: none; }
.analytics-event-rank {
  width: 28px; height: 28px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.15);
  border: 1px solid rgba(124, 92, 255, 0.35);
  color: #b39cff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.analytics-event-cover {
  width: 56px; height: 56px;
  border-radius: 10px;
  background: rgba(124, 92, 255, 0.08);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.analytics-event-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.analytics-event-name {
  color: #fff; font-weight: 600; font-size: 13.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.analytics-event-sub {
  color: var(--text-dim); font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.analytics-event-stats {
  display: flex; gap: 20px;
  font-size: 12px;
}
.analytics-event-stat {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 2px;
  font-variant-numeric: tabular-nums;
}
.analytics-event-stat strong { color: #fff; font-weight: 700; font-size: 14px; }
.analytics-event-stat .muted { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; }

@media (max-width: 720px) {
  .analytics-event-row { grid-template-columns: 24px 44px 1fr; }
  .analytics-event-stats { grid-column: 1 / -1; padding-left: 82px; gap: 16px; }
  .analytics-event-cover { width: 44px; height: 44px; }
}

/* Storage card with gradient progress bar */
.storage-card { margin-top: 18px; padding: 20px 22px; }
.storage-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px;
}
.storage-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(124, 92, 255, 0.15);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.storage-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  border: 1px solid var(--border);
}
.storage-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c5cff 0%, #ec4899 100%);
  border-radius: 999px;
  box-shadow: 0 0 16px rgba(124, 92, 255, 0.5);
  transition: width 0.5s ease;
  min-width: 4px;
}
.storage-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
}
.storage-foot-used {
  color: #7c5cff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ===== Account / profile ===== */
.profile-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(124, 92, 255, 0.18), transparent 55%),
    radial-gradient(120% 140% at 100% 0%, rgba(34, 211, 238, 0.12), transparent 55%),
    var(--bg-2);
  overflow: hidden;
}
.profile-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.06));
}
.profile-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  background-size: cover;
  background-position: center;
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35);
  border: 3px solid rgba(255, 255, 255, 0.08);
}
.profile-avatar.has-avatar { color: transparent; }
.profile-hero__meta { min-width: 0; flex: 1; }
.profile-hero__name {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.2px;
}
.profile-hero__email {
  margin: 3px 0 0;
  color: var(--text-dim);
  font-size: 13px;
  word-break: break-all;
}
.profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--panel);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.profile-chip svg { opacity: 0.8; }
.profile-chip--accent {
  color: #c9bcff;
  background: rgba(124, 92, 255, 0.12);
  border-color: rgba(124, 92, 255, 0.35);
}
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}
.profile-grid .form { max-width: none; }
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.card-head .h3 { margin: 0; }
.card-head__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(124, 92, 255, 0.12);
  color: var(--primary);
  flex: 0 0 auto;
}
.field-hint { font-size: 11px; color: var(--text-muted); }
.avatar-edit { display: flex; align-items: center; gap: 14px; }
.avatar-edit__preview {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  background-size: cover;
  background-position: center;
  border: 2px solid var(--border);
}
.avatar-edit__preview.has-avatar { color: transparent; }
.avatar-edit .field { flex: 1; min-width: 0; }
.avatar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-sm {
  padding: 7px 12px;
  font-size: 12.5px;
  border-radius: 9px;
  cursor: pointer;
  gap: 6px;
}
.avatar-clear { color: #ef4444; }
.avatar-clear:hover { border-color: rgba(239, 68, 68, 0.5); }
.avatar-url-toggle { margin-top: -2px; }
.avatar-url-toggle > summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--text-dim);
  list-style: none;
  user-select: none;
  width: fit-content;
}
.avatar-url-toggle > summary::-webkit-details-marker { display: none; }
.avatar-url-toggle > summary::before { content: "+ "; color: var(--primary); }
.avatar-url-toggle[open] > summary::before { content: "− "; }
.avatar-url-toggle > summary:hover { color: var(--text); }
.selfie-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.selfie-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: block;
}
.selfie-cell { position: relative; }
.selfie-del {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: rgba(17, 19, 31, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
}
.selfie-cell:hover .selfie-del,
.selfie-del:focus-visible { opacity: 1; }
.selfie-del:hover { background: #ef4444; }
@media (hover: none) { .selfie-del { opacity: 1; } }
@media (max-width: 760px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-hero { flex-direction: column; text-align: center; padding: 22px 18px; }
  .profile-chips { justify-content: center; }
  .profile-hero__email { word-break: break-word; }
}
