/* Pictually admin — shared design system for index.php / guests.php / curated.php */

:root {
  --ink: #1c1e27;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f4f5f9;
  --surface: #ffffff;
  --accent: #7c4dff;
  --accent-dark: #5b2fd6;
  --accent-soft: #f1ecff;
  --amber: #d98c15;
  --amber-soft: #fef3e0;
  --green: #1f9d63;
  --green-soft: #e4f6ec;
  --red: #dc4545;
  --red-soft: #fdecec;
  --sidebar-bg: #14151c;
  --sidebar-line: #24252f;
  --radius: 14px;
  --radius-sm: 9px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
svg.icon { width: 17px; height: 17px; flex: 0 0 auto; }

/* ---- Shell: sidebar + main content ---- */

.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
  flex: 0 0 220px;
  background: var(--sidebar-bg);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.admin-sidebar-topbar { display: block; }
.admin-sidebar-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0 10px;
  margin-bottom: 22px;
  color: #fff;
}
/* Collapses the link list on mobile — see .mobile-nav-toggle. On desktop
   it just needs to grow to fill the column so .admin-sidebar-foot's
   margin-top:auto still pushes Log out to the bottom of the sidebar. */
.admin-sidebar-menu { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.mobile-nav-toggle {
  display: none; align-items: center; justify-content: center; margin-left: auto;
  background: #1c1d27; color: #fff; border: 1px solid var(--sidebar-line);
  width: 38px; height: 38px; border-radius: 999px;
  cursor: pointer; font-family: inherit;
}
.mobile-nav-toggle.open { background: var(--accent); border-color: var(--accent); }
.admin-sidebar-title .brand-mark {
  width: 22px; height: 22px; flex: 0 0 auto; display: block;
}
/* legacy alias kept in case any page still uses the old CSS-dot logo */
.admin-sidebar-title .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); flex: 0 0 auto;
  box-shadow: 0 0 0 4px rgba(124,77,255,0.25);
}
.admin-sidebar-links { display: flex; flex-direction: column; gap: 2px; }
.admin-sidebar-links a {
  display: flex; align-items: center; gap: 11px;
  color: #a9abba; text-decoration: none;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.admin-sidebar-links a svg { opacity: 0.8; }
.admin-sidebar-links a.active { background: var(--accent); color: #fff; }
.admin-sidebar-links a.active svg { opacity: 1; }
.admin-sidebar-links a:hover:not(.active) { background: #1f2029; color: #fff; }
.admin-sidebar-quick { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--sidebar-line); }
.admin-sidebar-quick-title {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700;
  color: #63657a; padding: 0 12px; margin-bottom: 6px;
}
.admin-sidebar-quick a {
  display: flex; align-items: center; gap: 11px;
  color: #a9abba; text-decoration: none;
  padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.admin-sidebar-quick a:hover { background: #1f2029; color: #fff; }

.admin-sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--sidebar-line); }
.admin-sidebar-foot a {
  display: flex; align-items: center; gap: 11px;
  color: #f4a3a3; text-decoration: none;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 500;
  transition: background 0.15s;
}
.admin-sidebar-foot a:hover { background: #2a1a1a; }

.admin-main { flex: 1 1 auto; min-width: 0; }
.admin-body { padding: 34px 36px 70px; max-width: 1180px; margin: 0 auto; }

.admin-header { margin-bottom: 26px; }
.admin-header h1 { font-size: 1.5rem; margin: 0 0 4px; font-weight: 700; letter-spacing: -0.01px; }
.admin-header p { margin: 0; color: var(--muted); font-size: 0.92rem; }

@keyframes admin-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.admin-body { animation: admin-fade-in 0.35s ease both; }

/* Mobile: sidebar collapses to a compact top bar with a "Menu" toggle —
   the full link list (with text labels, not just icons) only appears once
   tapped open, instead of permanently taking up a big wrapped block. */
@media (max-width: 780px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar {
    position: static; height: auto; width: 100%; flex: 0 0 auto;
    flex-direction: column; align-items: stretch;
    padding: 10px 14px; gap: 8px;
  }
  .admin-sidebar-topbar { display: flex; align-items: center; width: 100%; }
  .admin-sidebar-title { margin-bottom: 0; }
  .admin-sidebar .admin-sidebar-plan { display: none; }
  /* The "Your events" link inside the collapsible menu already covers
     this — no need for a second, always-visible switcher pill too. */
  .admin-sidebar .admin-sidebar-event { display: none; }
  .mobile-nav-toggle { display: inline-flex; }

  .admin-sidebar-menu { display: none; }
  .admin-sidebar-menu.open { display: flex; flex-direction: column; gap: 8px; }

  /* Labels stay visible once open (icons alone weren't clear enough) —
     each link wraps to its own compact pill with icon + text. */
  .admin-sidebar-links { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .admin-sidebar-links a { white-space: nowrap; padding: 8px 12px; gap: 7px; font-size: 0.82rem; background: #1c1d27; }
  .admin-sidebar-links a.active { background: var(--accent); }
  .admin-sidebar-quick {
    display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 8px 0 0; border-top: 1px solid var(--sidebar-line); width: 100%;
  }
  .admin-sidebar-quick-title { display: none; }
  .admin-sidebar-quick a { padding: 8px 12px; gap: 7px; font-size: 0.8rem; white-space: nowrap; background: #1c1d27; }
  .admin-sidebar-foot { margin: 0; padding: 8px 0 0; border-top: 1px solid var(--sidebar-line); width: 100%; }
  .admin-sidebar-foot a { padding: 8px 12px; gap: 7px; white-space: nowrap; }
  .admin-body { padding: 22px 18px 50px; }
}

/* ---- Stat pills ---- */

.stat-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.stat-pill {
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px; font-size: 0.82rem; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 7px;
}
.stat-pill .n { color: var(--accent); }
.stat-pill.hidden-stat .n { color: var(--red); }

/* ---- Toolbar (search etc) ---- */

.toolbar { margin-bottom: 18px; }
.toolbar input[type=search] {
  width: 100%; max-width: 340px; padding: 10px 14px 10px 38px;
  font-family: inherit; font-size: 0.88rem; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" stroke="%239aa0ac" stroke-width="2" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>') no-repeat 12px center;
}
.toolbar input[type=search]:focus { outline: none; border-color: var(--accent); }

/* ---- Cards (settings forms) ---- */

.admin-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 22px;
  max-width: 480px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}
.admin-card h2 { margin: 0 0 4px; font-size: 1.02rem; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.admin-card .card-sub { color: var(--muted); font-size: 0.82rem; margin-bottom: 4px; }
.admin-card label { display: block; margin: 14px 0 6px; font-size: 0.85rem; font-weight: 500; color: #374151; }
.admin-card input[type=number],
.admin-card input[type=password],
.admin-card input[type=text],
.admin-card input[type=email],
.admin-card select {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  font-size: 0.92rem;
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fafafa;
  transition: border-color 0.15s, background 0.15s;
}
.admin-card input:focus,
.admin-card select:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}
.field-icon { position: relative; }
.field-icon svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.field-icon input { padding-left: 36px !important; }
.pw-strength { display: flex; gap: 4px; margin-top: 6px; }
.pw-strength .bar { height: 4px; flex: 1; border-radius: 2px; background: var(--line); transition: background 0.15s; }
.pw-strength.weak .bar:nth-child(1) { background: var(--red); }
.pw-strength.medium .bar:nth-child(1), .pw-strength.medium .bar:nth-child(2) { background: var(--amber); }
.pw-strength.strong .bar { background: var(--green); }
.pw-strength-label { font-size: 0.76rem; color: var(--muted); margin-top: 4px; }
.field-match-hint { font-size: 0.76rem; margin-top: 4px; }
.field-match-hint.ok { color: var(--green); }
.field-match-hint.bad { color: var(--red); }

.settings-divider {
  margin: 26px 0 4px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 0.82rem; font-weight: 700; color: var(--ink);
}
.settings-divider .sub { display: block; font-weight: 400; font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

/* ---- Setting rows: icon-led label+hint on the left, a control on the right ---- */
.setting-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.setting-row:last-child { border-bottom: none; }
.setting-row-text { flex: 1 1 200px; display: flex; gap: 10px; align-items: flex-start; }
.setting-row-text .icon-dot {
  width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.setting-row-text .label { font-weight: 600; font-size: 0.88rem; margin-bottom: 2px; }
.setting-row-text .hint { font-size: 0.78rem; color: var(--muted); line-height: 1.4; margin: 0; }
.setting-row-control { flex: 0 0 auto; display: flex; align-items: center; }

/* ---- Segmented pill control (replaces <select>/radio lists for short enums) ---- */
.segmented { display: inline-flex; background: #f0f1f5; border-radius: 9px; padding: 3px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  padding: 7px 13px; font-size: 0.8rem; font-weight: 600; border-radius: 6px; cursor: pointer;
  color: var(--muted); margin: 0; transition: background 0.15s, color 0.15s; white-space: nowrap;
}
.segmented input:checked + label { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(16,24,40,0.12); }

/* ---- Toggle switch (replaces plain checkboxes for on/off settings) ---- */
.toggle-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: 0 0 auto; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider { position: absolute; inset: 0; background: #d1d5db; border-radius: 999px; cursor: pointer; transition: background 0.15s; }
.toggle-slider::before {
  content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ---- PIN display/edit ---- */
.pin-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.pin-row input {
  font-family: 'Inter', monospace; font-size: 1.15rem; letter-spacing: 3px; text-align: center;
  width: 110px !important; font-weight: 700;
}
.pin-row button { margin: 0 !important; width: auto; white-space: nowrap; }

.admin-card .checkbox-row { display: flex; align-items: center; gap: 9px; margin: 16px 0 4px; }
.admin-card .checkbox-row input { width: auto; }
.admin-card .checkbox-row label { margin: 0; font-weight: 500; }
.admin-card button {
  margin-top: 16px;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.admin-card button:hover { background: var(--accent-dark); }
.admin-card .hint { font-size: 0.78rem; color: var(--muted); margin-top: 5px; }
.admin-card .saved { color: var(--green); font-size: 0.85rem; margin-top: 12px; font-weight: 500; }
.admin-card .saved.err { color: var(--red); }
/* align-items left at the default (stretch) on purpose — the right-hand
   column needs to be as tall as the left one for position:sticky on
   .preview-col to have room to actually stick while scrolling; align-items:
   start was collapsing it to its own short content height, so the sticky
   preview scrolled out of view almost immediately. */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; }
@media (max-width: 900px) { .settings-grid { grid-template-columns: 1fr; } }
.admin-card.wide { max-width: none; }

/* ---- Mode tabs (Dark/Light filter for backgrounds) ---- */

.mode-tabs { display: inline-flex; background: #f0f1f5; border-radius: 999px; padding: 3px; margin: 6px 0 2px; }
.mode-tabs .mode-tab {
  border: none; background: transparent; padding: 6px 16px; border-radius: 999px;
  font-family: inherit; font-size: 0.8rem; font-weight: 600; color: var(--muted); cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.mode-tabs .mode-tab.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16,24,40,0.12); }

.label-hint { font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0; font-size: 0.82rem; }

/* ---- Swatch pickers (background / font) ---- */

.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 6px 0 4px; }
.swatch-grid.font-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch label {
  display: block; margin: 0; cursor: pointer;
  border: 2px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--surface);
  transition: border-color 0.15s, transform 0.15s;
}
.swatch label:hover { transform: translateY(-1px); }
.swatch input:checked + label { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.swatch-preview {
  height: 52px; display: flex; align-items: flex-end; justify-content: flex-end; padding: 6px;
}
.swatch-check {
  width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(0.6);
  transition: opacity 0.15s, transform 0.15s;
}
.swatch input:checked + label .swatch-check { opacity: 1; transform: scale(1); }
.swatch-check svg { width: 11px; height: 11px; }
.swatch-info { padding: 7px 9px 9px; }
.swatch-info .name { font-size: 0.78rem; font-weight: 600; display: block; }
.swatch-info .note { font-size: 0.68rem; color: var(--muted); }
.swatch-font-preview {
  height: 52px; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #333; background: #fffdf8;
}

.font-group-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); font-weight: 700; margin: 12px 0 4px; }

.font-live-preview {
  margin: 8px 0 4px; padding: 18px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: #fffdf8; text-align: center; font-size: 1.7rem; color: #333; line-height: 1.3;
  transition: font-family 0.15s;
}

/* ---- Sliders ---- */

.slider-row { display: flex; align-items: center; gap: 12px; }
.slider-row input[type=range] {
  flex: 1 1 auto; -webkit-appearance: none; appearance: none; height: 4px;
  border-radius: 999px; background: var(--line); outline: none;
}
.slider-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.slider-row input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: var(--accent); cursor: pointer;
  border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.slider-row .slider-value {
  flex: 0 0 auto; min-width: 46px; text-align: center; font-weight: 700; font-size: 0.85rem;
  color: var(--accent); background: var(--accent-soft); border-radius: 7px; padding: 4px 6px;
}

/* ---- Live wall preview ---- */

.wall-preview {
  border-radius: var(--radius); overflow: hidden; position: sticky; top: 24px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04); border: 1px solid var(--line);
}
.wall-preview-screen {
  height: 220px; position: relative;
  padding: 16px; transition: background 0.3s;
}
.wall-preview-heading {
  position: absolute; top: 16px; left: 16px;
  font-size: 1.15rem; transition: font-family 0.2s, color 0.2s;
}
.wall-preview-card {
  position: absolute; bottom: 16px; right: 16px;
  background: #fffdf8; border-radius: 8px; padding: 8px 8px 10px; width: 92px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}
.wall-preview-card .ph { height: 64px; border-radius: 4px; background: linear-gradient(135deg, #d8cfc2, #b9ab99); margin-bottom: 6px; }
.wall-preview-card .cap { font-size: 1.1rem; line-height: 1.1; color: #333; transition: font-family 0.2s; }
.wall-preview-card .sig { font-size: 0.85rem; color: #777; text-align: right; transition: font-family 0.2s; }
.wall-preview-label {
  padding: 10px 16px; font-size: 0.78rem; color: var(--muted); background: var(--surface);
  border-top: 1px solid var(--line);
}

/* ---- Photo grid ---- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin-top: 18px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04);
  transition: box-shadow 0.15s, transform 0.15s;
}
.card:hover { box-shadow: 0 8px 22px rgba(16,24,40,0.1); transform: translateY(-2px); }
.card.hidden-row { opacity: 0.55; }
.card .thumb { position: relative; }
.card img { width: 100%; height: 165px; object-fit: cover; display: block; background: #111; }
.card-body { padding: 12px 14px 14px; }
.card-body textarea {
  width: 100%; box-sizing: border-box; font-family: inherit; font-size: 0.88rem;
  resize: vertical; margin: 5px 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fafafa;
}
.card-body input[type=text] {
  width: 100%; box-sizing: border-box; font-family: inherit; font-size: 0.88rem;
  margin: 5px 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fafafa;
}
.card-body textarea:focus, .card-body input:focus { outline: none; border-color: var(--accent); background: #fff; }
.card-body label.field-label { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); font-weight: 600; margin: 8px 0 2px; }
.meta { font-size: 0.72rem; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; min-height: 18px; }
.badge-hidden {
  background: var(--red-soft); color: var(--red); font-size: 0.68rem; font-weight: 600;
  padding: 2px 8px; border-radius: 20px; letter-spacing: 0.2px; display: inline-flex; align-items: center; gap: 4px;
}
.actions { display: flex; gap: 7px; margin-top: 9px; flex-wrap: wrap; }
.actions button, .actions .btn {
  flex: 1 1 auto; font-size: 0.78rem; font-weight: 600; padding: 8px 8px;
  border: none; border-radius: 8px; cursor: pointer; text-align: center; font-family: inherit;
  transition: filter 0.15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.actions button:hover, .actions .btn:hover { filter: brightness(0.94); }
.btn-save { background: var(--accent); color: #fff; }
.btn-hide { background: var(--amber-soft); color: var(--amber); }
.btn-unhide { background: var(--green-soft); color: var(--green); }
.btn-delete { background: var(--red-soft); color: var(--red); }
.empty {
  color: var(--muted); margin-top: 14px; font-size: 0.9rem; text-align: center;
  padding: 46px 20px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
}

.upload-card { max-width: none; }
.link-row {
  display: flex; align-items: center; gap: 8px; background: #fafafa; border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; margin-top: 10px;
}
.link-row .label { font-size: 0.72rem; text-transform: uppercase; color: var(--muted); font-weight: 700; letter-spacing: 0.4px; display: block; margin-bottom: 2px; }
.link-row .url { font-size: 0.85rem; word-break: break-all; }
.link-row button { flex: 0 0 auto; margin: 0; padding: 7px 12px; font-size: 0.78rem; width: auto; }
.link-row a { text-decoration: none; }

.display-go-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.btn-go-display {
  display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff;
  font-weight: 700; font-size: 0.92rem; padding: 12px 20px; border-radius: 10px; text-decoration: none;
  transition: background 0.15s;
}
.btn-go-display:hover { background: var(--accent-dark); }
.display-pin-chip {
  display: inline-flex; align-items: center; gap: 8px; background: #fafafa; border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 14px;
}
.display-pin-chip .chip-label { font-size: 0.68rem; text-transform: uppercase; font-weight: 700; color: var(--muted); letter-spacing: 0.4px; }
.display-pin-chip .chip-code { font-size: 1.15rem; font-weight: 700; letter-spacing: 3px; color: var(--ink); }
.display-go-row form { display: inline-block; }
.btn-quiet,
.admin-card button.btn-quiet {
  background: var(--surface); color: var(--muted); border: 1px solid var(--line); font-weight: 600;
  font-size: 0.82rem; padding: 9px 14px; border-radius: 10px; cursor: pointer; margin: 0; width: auto;
}
.btn-quiet:hover,
.admin-card button.btn-quiet:hover { background: #f4f5f9; color: var(--ink); }

.qr-explainer {
  display: flex; align-items: center; gap: 9px; margin-top: 16px; padding: 11px 14px;
  background: var(--accent-soft); color: #3d3aa8; border-radius: 8px; font-size: 0.85rem; line-height: 1.4;
}
.qr-explainer svg { flex: 0 0 auto; }

.links-disclosure { margin-top: 16px; }
.links-disclosure summary {
  cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--accent); list-style: none;
  display: inline-flex; align-items: center; gap: 5px;
}
.links-disclosure summary::-webkit-details-marker { display: none; }
.links-disclosure summary::before { content: '▸'; font-size: 0.7rem; transition: transform 0.15s; }
.links-disclosure[open] summary::before { transform: rotate(90deg); }
.links-disclosure-body { margin-top: 12px; }

.upload-card input[type=file] {
  margin-top: 8px; display: block; font-size: 0.85rem;
  padding: 14px; border: 1.5px dashed #c7c9f5; border-radius: var(--radius-sm); width: 100%; background: var(--accent-soft);
}
.upload-card input[type=file][hidden] { display: none; }

/* ---- Toast ---- */

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(12px);
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 10px;
  font-size: 0.85rem; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
  display: flex; align-items: center; gap: 8px; z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--red); }

/* ---- Sticky save bar (settings form) ---- */
.save-bar {
  position: sticky; bottom: 14px; z-index: 5;
  display: flex; align-items: center; gap: 12px; margin-top: 24px;
  background: rgba(255,255,255,0.94); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px;
  box-shadow: 0 6px 22px rgba(16,24,40,0.1);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.save-bar .save-bar-hint {
  display: none; align-items: center; gap: 7px;
  color: var(--amber); font-weight: 600; font-size: 0.85rem; margin-right: auto;
}
.save-bar .save-bar-hint .dot-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--amber); flex: 0 0 auto;
}
.save-bar.dirty { border-color: #eec97e; box-shadow: 0 6px 26px rgba(217,140,21,0.18); }
.save-bar.dirty .save-bar-hint { display: inline-flex; }
.save-bar button {
  margin: 0;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.save-bar button:hover { background: var(--accent-dark); }
.save-bar .saved { color: var(--green); font-size: 0.85rem; font-weight: 500; }
.save-bar .saved { margin: 0; }

/* ---- Sidebar pending badge ---- */
.nav-badge {
  margin-left: auto; background: var(--amber); color: #fff;
  font-size: 0.7rem; font-weight: 700; min-width: 19px; height: 19px;
  border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 6px; flex: 0 0 auto;
}

/* ---- Settings section chips ---- */
.settings-chips {
  position: sticky; top: 0; z-index: 6;
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 12px 0 10px; margin: -6px 0 14px;
  background: linear-gradient(var(--bg) 80%, transparent);
}
.settings-chips a {
  font-size: 0.8rem; font-weight: 600; padding: 6px 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none;
  color: var(--muted); transition: color 0.15s, border-color 0.15s;
}
.settings-chips a:hover { color: var(--accent); border-color: #c3c6f0; }
.settings-anchor { scroll-margin-top: 64px; }

/* ---- Event picker quick actions ---- */
.event-card .event-main { display: block; text-decoration: none; color: inherit; }
.event-card .event-actions {
  display: flex; gap: 6px; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line); flex-wrap: wrap;
}
.event-card .event-actions a {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.78rem; font-weight: 600; color: var(--muted); text-decoration: none;
  padding: 5px 10px; border-radius: 7px; border: 1px solid var(--line);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.event-card .event-actions a:hover { color: var(--accent); border-color: #c3c6f0; background: var(--accent-soft); }
.event-card .event-actions a svg { width: 12px; height: 12px; }

/* ---- Settings page: card column + sticky preview ---- */
.settings-col { min-width: 0; }
/* .preview-col is a plain (non-sticky) grid cell that stretches to match
   settings-col's full height — that's what gives .wall-preview's own
   position:sticky (below) room to actually float within it as you scroll.
   Making preview-col itself sticky too was the bug: a sticky element that's
   already stretched to the full row height never needs to detach, so it
   just scrolled away with the page instead of pinning in place. */

/* ---- Guest Uploads: pending queue strip, edit-to-save, lightbox ---- */
.pending-strip {
  background: var(--amber-soft); border: 1px solid #f0d9ac; border-radius: var(--radius);
  padding: 16px 18px 18px; margin-bottom: 26px;
}
.pending-strip-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.pending-strip-title {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 0.95rem; color: #8a5a0b;
}
.pending-strip-title .count {
  background: var(--amber); color: #fff; font-size: 0.74rem; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 6px;
}
.btn-approve { background: var(--green); color: #fff; }
.btn-approve:hover { background: #187f4f; }

.edit-form .save-row { display: none; }
.edit-form .save-row.visible { display: flex; }

.card .thumb img { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(10,10,14,0.88);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 30px; cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); cursor: default; }
.lightbox-caption { color: rgba(255,255,255,0.85); font-size: 0.95rem; text-align: center; max-width: 80vw; }
.lightbox-close {
  position: absolute; top: 14px; right: 20px; background: none; border: none;
  color: rgba(255,255,255,0.8); font-size: 2.2rem; cursor: pointer; line-height: 1; padding: 4px 10px;
}
.lightbox-close:hover { color: #fff; background: none; }

/* ---- Sidebar event-context chip ---- */
.admin-sidebar-event {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: -10px 0 16px; padding: 8px 12px;
  background: #1d1e28; border: 1px solid var(--sidebar-line); border-radius: var(--radius-sm);
  text-decoration: none; color: #d5d7e4; transition: background 0.15s, border-color 0.15s;
}
.admin-sidebar-event:hover { background: #23242f; border-color: #34364a; }
.admin-sidebar-event .ev-text { min-width: 0; display: flex; flex-direction: column; }
.admin-sidebar-event .ev-label {
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.5px;
  font-weight: 700; color: #63657a;
}
.admin-sidebar-event .ev-name {
  font-size: 0.86rem; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-sidebar-event svg { flex: 0 0 auto; color: #63657a; }

/* ---- Drag & drop upload zone (Our favorites) ---- */
.dropzone {
  border: 1.5px dashed #c7c9f5; border-radius: var(--radius-sm); background: var(--accent-soft);
  padding: 26px 18px; text-align: center; cursor: pointer; margin-top: 14px;
  transition: background 0.15s, border-color 0.15s;
  color: var(--accent);
}
.dropzone:hover, .dropzone.dragover { background: #e4e6fd; border-color: var(--accent); }
.dropzone.has-files { border-style: solid; border-color: var(--green); background: var(--green-soft); color: var(--green); }
.dropzone .dz-title { font-weight: 700; font-size: 0.92rem; margin-top: 8px; color: inherit; }
.dropzone .dz-sub { font-size: 0.8rem; color: var(--muted); margin-top: 3px; }
.dropzone .dz-files { font-size: 0.85rem; font-weight: 600; margin-top: 8px; color: inherit; }
.dropzone.dz-error { border-color: var(--red); background: var(--red-soft); color: var(--red); }

/* ---- Admin-viewing-someone-else's-event banner ---- */
.admin-view-banner {
  display: flex; align-items: center; gap: 9px;
  background: #fdf0d8; border: 1px solid #f0d093; color: #8a5a0b;
  border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 20px;
  font-size: 0.85rem; font-weight: 600;
}
.admin-view-banner svg { flex: 0 0 auto; }
.admin-view-banner .owner { font-weight: 700; }

/* ---- Admin danger zone (shared: settings.php, admin-account-edit.php) ---- */
.danger-card { border-color: #f3c6c6; background: #fffafa; }
.danger-card h2 { color: var(--red); }

/* ---- Bulk select & act (Guest Uploads) ---- */
.card-select {
  position: absolute; top: 8px; left: 8px; z-index: 2; cursor: pointer;
}
.card-select input { position: absolute; opacity: 0; width: 26px; height: 26px; margin: 0; cursor: pointer; }
.card-select-box {
  display: block; width: 22px; height: 22px; border-radius: 6px;
  background: rgba(255,255,255,0.85); border: 1.5px solid rgba(0,0,0,0.15);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15); transition: background 0.15s, border-color 0.15s;
}
.card-select input:checked + .card-select-box {
  background: var(--accent); border-color: var(--accent);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>');
  background-repeat: no-repeat; background-position: center; background-size: 14px;
}

.bulk-bar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 16px;
  background: #1c1e27; color: #fff; border-radius: 12px; padding: 10px 12px 10px 18px;
  box-shadow: 0 12px 34px rgba(0,0,0,0.28);
}
.bulk-bar[hidden] { display: none; }
.bulk-count { font-size: 0.85rem; font-weight: 600; color: #d5d7e4; white-space: nowrap; }
.bulk-actions { display: flex; gap: 6px; }
.bulk-actions button { margin: 0; padding: 8px 14px; font-size: 0.82rem; width: auto; }
.bulk-clear {
  background: none; border: none; color: #a9abba; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; padding: 8px 6px; margin: 0; width: auto;
}
.bulk-clear:hover { color: #fff; background: none; }
@media (max-width: 700px) {
  .bulk-bar { left: 12px; right: 12px; transform: none; flex-wrap: wrap; }
}

/* ---- Plan usage banner (Guest Uploads / Curated) ---- */
.usage-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 18px; font-size: 0.85rem; font-weight: 600;
}
.usage-banner.ok { background: var(--accent-soft); color: var(--accent); }
.usage-banner.full { background: var(--red-soft); color: var(--red); }
.usage-banner .bar {
  flex: 1 1 140px; max-width: 220px; height: 6px; border-radius: 999px; background: rgba(0,0,0,0.08); overflow: hidden;
}
.usage-banner .bar-fill { height: 100%; background: currentColor; }

/* ---- Confirm modal (replaces native confirm()/alert() everywhere) ---- */
.confirm-modal {
  position: fixed; inset: 0; z-index: 200; background: rgba(20,15,10,0.45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.confirm-modal[hidden] { display: none; }
.confirm-modal-card {
  background: #fff; border-radius: 14px; padding: 24px 26px; max-width: 380px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.confirm-modal-message { margin: 0 0 20px; font-size: 0.95rem; color: var(--ink); line-height: 1.5; }
.confirm-modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.confirm-modal-actions button { margin: 0; width: auto; }
.confirm-modal-ok.danger { background: var(--red); }
.confirm-modal-ok.danger:hover { background: #b83a3a; }

/* ---- Brand logo (full wordmark, for light backgrounds: login, wizard) ---- */
.brand-logo { height: 28px; width: auto; display: block; }

/* ---- Plan badge (account page + sidebar) ---- */
.plan-badge {
  display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.3px;
  padding: 3px 9px; border-radius: 999px; margin-left: 4px;
  background: var(--bg); color: var(--muted); border: 1px solid var(--line);
}
.plan-badge.premium { background: #f1ecff; color: #7c4dff; border-color: #ddd0ff; }
.admin-sidebar-plan {
  display: inline-flex; align-items: center; gap: 5px; margin: -12px 0 16px; padding: 0 10px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.3px; color: #7c6a4a;
  text-decoration: none; width: fit-content;
}
.admin-sidebar-plan.premium { color: #c9b3ff; }
.admin-sidebar-plan .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
