:root {
  --paper: #eef4e8;
  --paper-deep: #e4edda;
  --mint: #d8ebc4;
  --peach: #ffd9c4;
  --blush: #f7c8d8;
  --ink: #121712;
  --ink-soft: #2a322a;
  --muted: #5d675c;
  --lime: #c6ef5a;
  --brand: #e53d7a;
  --white: #ffffff;
  --line: rgba(18, 23, 18, 0.1);
  --line-strong: rgba(18, 23, 18, 0.16);
  --shadow: 0 14px 36px rgba(18, 23, 18, 0.07);
  --radius: 22px;
  --font-display: "Syne", "Avenir Next", sans-serif;
  --font-body: "Figtree", "Avenir Next", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
[hidden] { display: none !important; }
body {
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 0% 0%, rgba(198, 239, 90, 0.28), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(255, 217, 196, 0.45), transparent 32%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3, .brand strong, .stat .value {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

/* —— Login —— */
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(ellipse at 18% 20%, rgba(198, 239, 90, 0.5), transparent 42%),
    radial-gradient(ellipse at 86% 12%, rgba(229, 61, 122, 0.18), transparent 40%),
    radial-gradient(ellipse at 70% 88%, rgba(255, 217, 196, 0.55), transparent 45%),
    #0f140f;
  color: #f5f8f1;
}

.login-stage {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: stretch;
}

.login-brand {
  padding: 28px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-mark {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  margin-bottom: 22px;
  object-fit: cover;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
}

.login-kicker {
  margin: 0 0 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  color: var(--lime);
}

.login-brand h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 0.98;
  color: #fff;
}

.login-sub {
  color: rgba(245, 248, 241, 0.72);
  margin: 0;
  line-height: 1.55;
  max-width: 34ch;
  font-size: 15px;
}

.login-card {
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-card label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin: 14px 0 8px;
}
.login-card label:first-of-type { margin-top: 0; }

.login-card input,
.toolbar input,
.toolbar select,
.pack input[type="text"],
.settings-grid input[type="number"],
.settings-grid input[type="text"],
.settings-grid textarea,
.card input[type="text"],
.card input[type="number"],
.card select,
.card textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #f7faf4;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-card input:focus,
.toolbar input:focus,
.toolbar select:focus,
.pack input[type="text"]:focus,
.settings-grid input:focus,
.settings-grid textarea:focus,
.card input:focus,
.card select:focus,
.card textarea:focus {
  outline: none;
  border-color: rgba(18, 23, 18, 0.35);
  box-shadow: 0 0 0 3px rgba(198, 239, 90, 0.35);
}

.login-card .pill { width: 100%; margin-top: 18px; padding: 12px 16px; }

/* —— App shell —— */
.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background:
    linear-gradient(180deg, #151b15 0%, #1c241c 100%);
  color: #eef3e8;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  object-fit: cover;
  background: transparent;
  flex-shrink: 0;
  display: block;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
img.brand-mark {
  padding: 0;
}
.brand strong, .brand span { display: block; }
.brand strong { font-size: 15px; color: #fff; }
.brand span { font-size: 12px; color: rgba(238, 243, 232, 0.55); margin-top: 1px; }

.admin-who {
  margin: 0;
  font-size: 12px;
  color: rgba(238, 243, 232, 0.5);
  word-break: break-all;
  padding: 0 4px;
}

nav {
  display: grid;
  gap: 4px;
  overflow-y: auto;
  padding-right: 2px;
  flex: 1;
}

.nav-group {
  margin: 14px 10px 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(238, 243, 232, 0.38);
}
.nav-group:first-child { margin-top: 0; }

.nav-btn {
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 14px;
  color: rgba(238, 243, 232, 0.78);
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-btn:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-btn.is-active {
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
}

.logout {
  margin-top: auto;
  width: 100%;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: #eef3e8 !important;
}
.logout:hover { background: rgba(255, 255, 255, 0.08); }

.content {
  padding: 28px 36px 56px;
  min-width: 0;
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  align-items: flex-start;
}
.page-head h1 {
  margin: 0 0 6px;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1;
}
.sub { margin: 0; color: var(--muted); font-size: 14px; max-width: 52ch; line-height: 1.45; }

.lang-switch { display: flex; gap: 8px; align-items: flex-start; flex-shrink: 0; }
.lang-switch .pill.is-active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

/* —— Stats / cards —— */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(18, 23, 18, 0.04);
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(198, 239, 90, 0.18);
  pointer-events: none;
}
.stat.mint { background: linear-gradient(160deg, #e8f5d6, #f7fbf2); }
.stat.peach { background: linear-gradient(160deg, #ffe6d5, #fff8f3); }
.stat.lavender { background: linear-gradient(160deg, #f7d6e3, #fff6fa); }
.stat.lavender::after { background: rgba(229, 61, 122, 0.12); }
.stat .label { font-size: 12px; color: var(--muted); font-weight: 700; }
.stat .value { font-size: 34px; font-weight: 800; margin-top: 8px; line-height: 1; }

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  border: 1px solid rgba(18, 23, 18, 0.04);
}
.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.card > .muted:first-child,
.card > p.muted:first-of-type {
  margin-top: 0;
}

.pill {
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 700;
  font-size: 13px;
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.12s ease;
}
.pill:hover { transform: translateY(-1px); }
.pill.outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
}
.pill.outline:hover { border-color: var(--ink); background: rgba(18, 23, 18, 0.03); }
.pill.danger { background: var(--brand); color: var(--white); border: 0; }
.pill.lime { background: var(--lime); color: var(--ink); }
.pill[disabled] { opacity: 0.55; cursor: default; transform: none; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
}
.toolbar input, .toolbar select {
  width: auto;
  min-width: 180px;
  background: var(--white);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

/* —— Verify / photo queues —— */
.queue { display: grid; gap: 16px; }
.verify-card {
  display: grid;
  grid-template-columns: 220px 160px 1fr;
  gap: 18px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(18, 23, 18, 0.04);
}
.verify-card .selfie,
.verify-card .profile {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--mint), var(--peach));
}
.verify-meta h3 { margin: 0 0 4px; font-size: 20px; }
.verify-meta p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.verify-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 10px;
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.photo-cell {
  background: linear-gradient(160deg, #e8f2dc, #f7faf4);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  gap: 8px;
  padding-bottom: 10px;
  border: 1px solid rgba(18, 23, 18, 0.05);
}
.photo-cell img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: #d9e2d1;
}
.photo-cell .pill {
  margin: 0 10px;
  justify-self: start;
}
.photo-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.photo-card {
  margin: 0;
  background: linear-gradient(160deg, #e8f2dc, #f7faf4);
  border-radius: 18px;
  overflow: hidden;
}
.photo-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  cursor: zoom-in;
  background: #d9e2d1;
}
.photo-card figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

/* —— Tables —— */
.table-wrap {
  overflow-x: auto;
  margin: 0 -4px;
  padding: 0 4px;
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
th, td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 800;
  background: #f7faf4;
  position: sticky;
  top: 0;
}
.user-row { cursor: pointer; transition: background 0.12s ease; }
.user-row:hover { background: rgba(198, 239, 90, 0.14); }
.user-cell { display: flex; gap: 10px; align-items: center; }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(145deg, var(--mint), var(--peach));
  flex-shrink: 0;
}

.badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: var(--mint);
  color: var(--ink-soft);
}
.badge.off { background: #e6e9e3; color: #6a7268; }
.badge.warn { background: var(--peach); }
.badge.pink { background: var(--blush); }

.pack {
  background: linear-gradient(160deg, #e8f2dc, #f4f8ef);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(18, 23, 18, 0.05);
}
.stickers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sticker-chip {
  background: var(--white);
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
}
.sticker-chip img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; }
.ghost {
  border: 0;
  background: none;
  color: var(--brand);
  font-weight: 700;
  cursor: pointer;
}

.empty, .error { margin: 0; }
.error {
  color: var(--brand);
  background: rgba(229, 61, 122, 0.08);
  border: 1px solid rgba(229, 61, 122, 0.18);
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 600;
}
.empty {
  color: var(--muted);
  padding: 28px 12px;
  text-align: center;
  font-weight: 600;
}
.muted { color: var(--muted); line-height: 1.45; }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.settings-grid label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin: 8px 0;
}

.user-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.user-hero h2 { margin: 0 0 6px; font-size: 28px; }
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 18px;
  margin: 0 0 16px;
}
.meta-grid dt {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.meta-grid dd { margin: 4px 0 0; font-weight: 600; }
.bio { white-space: pre-wrap; line-height: 1.45; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 15, 0.82);
  display: grid;
  place-items: center;
  gap: 16px;
  z-index: 80;
  padding: 24px;
  backdrop-filter: blur(6px);
}
.lightbox img {
  max-width: min(92vw, 920px);
  max-height: 82vh;
  border-radius: 18px;
  object-fit: contain;
  background: #111;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}
.note {
  background: linear-gradient(160deg, #e8f2dc, #f7faf4);
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid rgba(18, 23, 18, 0.05);
}

.loading {
  display: grid;
  gap: 10px;
  padding: 8px 0 24px;
}
.loading-bar {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(18, 23, 18, 0.06), rgba(198, 239, 90, 0.28), rgba(18, 23, 18, 0.06));
  background-size: 200% 100%;
  animation: shimmer 1.1s ease-in-out infinite;
}
.loading-bar.lg { height: 72px; border-radius: 18px; }
.loading-bar.sm { width: 42%; }

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.empty-state {
  text-align: center;
  padding: 36px 18px;
}
.empty-state strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 6px;
}

@media (max-width: 1100px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .verify-card { grid-template-columns: 1fr 1fr; }
  .login-stage { grid-template-columns: 1fr; gap: 18px; }
  .login-brand { padding: 8px 4px 0; }
}

@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 14px;
  }
  .admin-who { display: none; }
  nav {
    display: flex;
    flex: 1 1 100%;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .nav-group { display: none; }
  .nav-btn { white-space: nowrap; flex-shrink: 0; }
  .logout {
    margin-top: 0;
    width: auto;
  }
  .content { padding: 20px 16px 40px; }
  .verify-card { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; }
}
