/* ============================================================================
   /edit — admin panel styles (oddělené od public site)
   ============================================================================ */

:root {
  --ed-bg: #0a0512;
  --ed-bg-elev: #160a24;
  --ed-bg-row: #1d0d2e;
  --ed-line: rgba(255, 255, 255, 0.08);
  --ed-line-strong: rgba(255, 255, 255, 0.16);
  --ed-text: #f5eef8;
  --ed-text-mute: rgba(245, 238, 248, 0.6);
  --ed-text-faint: rgba(245, 238, 248, 0.4);
  --ed-pink: #ff4d8f;
  --ed-pink-soft: rgba(255, 77, 143, 0.15);
  --ed-purple: #a78bfa;
  --ed-success: #4ade80;
  --ed-danger: #f87171;
  --ed-radius: 10px;
}

body.is-edit,
body.is-uprav {
  margin: 0;
  background: var(--ed-bg);
  color: var(--ed-text);
  font-family: 'Schibsted Grotesk', 'Helvetica Neue', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

body.is-edit *,
body.is-uprav * { box-sizing: border-box; }

.ed-loading,
.ed-fatal {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--ed-text-mute);
}
.ed-fatal { color: var(--ed-danger); }

/* ── LOGIN ────────────────────────────────────────────────────── */
.ed-login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #2d0028 0%, #100008 70%, #08000a 100%);
  padding: 20px;
}
.ed-login-card {
  background: rgba(22, 10, 36, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--ed-line-strong);
  border-radius: 16px;
  padding: 40px 32px;
  width: 100%;
  max-width: 380px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.ed-login-heart { color: var(--ed-pink); filter: drop-shadow(0 0 18px rgba(255, 77, 143, 0.6)); }
.ed-login-title {
  margin: 0;
  font-family: 'Anton', sans-serif;
  font-size: 28px; letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ed-login-sub { margin: 0 0 8px; color: var(--ed-text-mute); font-size: 13px; text-align: center; }
.ed-login-input { width: 100%; }
.ed-login-error {
  width: 100%;
  background: rgba(248, 113, 113, 0.12);
  color: var(--ed-danger);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
}
.ed-login-btn { width: 100%; }

/* ── TOPBAR ───────────────────────────────────────────────────── */
.ed-topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: rgba(10, 5, 18, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ed-line);
}
.ed-topbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Anton', sans-serif; font-size: 18px; letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ed-topbar-brand svg { color: var(--ed-pink); }
.ed-topbar-ep {
  margin-left: 8px;
  background: var(--ed-pink-soft); color: var(--ed-pink);
  padding: 2px 10px; border-radius: 999px; font-size: 11px; letter-spacing: 0.1em;
}
.ed-topbar-actions { display: flex; gap: 8px; }

/* ── MAIN ─────────────────────────────────────────────────────── */
.ed-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 80px;
  display: flex; flex-direction: column; gap: 22px;
}

/* ── SECTION ──────────────────────────────────────────────────── */
.ed-section {
  background: var(--ed-bg-elev);
  border: 1px solid var(--ed-line);
  border-radius: var(--ed-radius);
  overflow: hidden;
}
.ed-section-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 18px 22px;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.ed-section.is-open .ed-section-head { border-bottom-color: var(--ed-line); }
.ed-section-title { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: 0.01em; }
.ed-section-desc { margin: 4px 0 0; font-size: 12px; color: var(--ed-text-mute); }
.ed-section-toggle {
  font-size: 22px; color: var(--ed-text-faint); width: 28px; text-align: center;
  font-family: monospace; line-height: 1;
}
.ed-section-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 16px; }

/* ── FORMS ────────────────────────────────────────────────────── */
.ed-input {
  width: 100%;
  background: var(--ed-bg);
  color: var(--ed-text);
  border: 1px solid var(--ed-line-strong);
  border-radius: 8px;
  padding: 9px 12px;
  font-family: inherit; font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ed-input:focus {
  border-color: var(--ed-pink);
  box-shadow: 0 0 0 3px var(--ed-pink-soft);
}
.ed-input:disabled { opacity: 0.5; cursor: not-allowed; }
.ed-textarea { min-height: 70px; resize: vertical; line-height: 1.4; font-family: inherit; }

.ed-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ed-field-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ed-text-mute);
}
.ed-field-hint { font-size: 11px; color: var(--ed-text-faint); margin-top: 2px; }

.ed-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.ed-form-row { display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: flex-start; }
.ed-form-fields { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (max-width: 720px) { .ed-form-row { grid-template-columns: 1fr; } }

.ed-actions {
  display: flex; align-items: center; gap: 10px;
  padding-top: 4px;
  flex-wrap: wrap;
}
.ed-msg { font-size: 12px; color: var(--ed-text-mute); }

/* ── BUTTONS ──────────────────────────────────────────────────── */
.ed-btn {
  font-family: inherit; font-size: 13px; font-weight: 500;
  background: var(--ed-bg-row);
  color: var(--ed-text);
  border: 1px solid var(--ed-line-strong);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.ed-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.06); border-color: var(--ed-line-strong); }
.ed-btn:active:not(:disabled) { transform: translateY(1px); }
.ed-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ed-btn-primary {
  background: var(--ed-pink); border-color: var(--ed-pink); color: #fff;
}
.ed-btn-primary:hover:not(:disabled) { background: #ff5e9c; border-color: #ff5e9c; }
.ed-btn-ghost { background: transparent; }
.ed-btn-danger { color: var(--ed-danger); }
.ed-btn-danger:hover:not(:disabled) { background: rgba(248, 113, 113, 0.1); border-color: var(--ed-danger); }
.ed-btn-sm { padding: 5px 10px; font-size: 12px; }
.ed-btn-icon { padding: 4px 8px; font-size: 11px; min-width: 28px; }

/* ── PHOTO UPLOAD ─────────────────────────────────────────────── */
.ed-photo {
  display: flex; flex-direction: column; gap: 10px;
}
.ed-photo-img {
  width: 200px; height: 200px;
  object-fit: cover;
  border-radius: var(--ed-radius);
  background: var(--ed-bg);
  border: 1px solid var(--ed-line);
}
.ed-photo-placeholder {
  width: 200px; height: 200px;
  border-radius: var(--ed-radius);
  background: var(--ed-bg);
  border: 1px dashed var(--ed-line-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--ed-text-faint);
  font-size: 12px;
}
.ed-photo-actions { display: flex; gap: 6px; }
.ed-photo-url {
  font-size: 10px;
  color: var(--ed-text-faint);
  font-family: 'JetBrains Mono', monospace;
  word-break: break-all;
  max-width: 200px;
}
.ed-error { color: var(--ed-danger); font-size: 12px; }

/* === PHOTO POSITION PICKER — sliders + preview === */
.ed-pos-picker {
  margin-top: 12px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--ed-line);
  border-radius: 8px;
  display: flex; flex-direction: column; gap: 10px;
}
.ed-pos-preview {
  position: relative;
  width: 200px;
  aspect-ratio: 1 / 1.1;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--ed-line-strong);
}
.ed-pos-preview img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.ed-pos-crosshair {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ed-pink);
  font-size: 22px;
  font-weight: 700;
  text-shadow: 0 0 4px #000, 0 0 8px #000;
  pointer-events: none;
}
.ed-pos-sliders { display: flex; flex-direction: column; gap: 6px; }
.ed-pos-sliders label {
  display: flex; flex-direction: column; gap: 3px;
  font-size: 11px; color: var(--ed-text-mute);
}
.ed-pos-sliders label span {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
}
.ed-pos-sliders input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%;
  height: 4px;
  background: var(--ed-bg-row);
  border-radius: 999px;
  outline: none;
}
.ed-pos-sliders input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px;
  background: var(--ed-pink);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
}
.ed-pos-sliders input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  background: var(--ed-pink);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
}
.ed-pos-presets {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 4px;
}
.ed-pos-picker.is-new {
  border-color: var(--ed-pink);
  box-shadow: 0 0 0 1px rgba(255, 77, 143, 0.3);
}
/* === PHOTO CROPPER MODAL — Discord-style === */
.ed-cropper-backdrop {
  position: fixed; inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: ed-fade 0.2s ease-out;
}
.ed-cropper {
  width: 100%;
  max-width: 580px;
  background: #1a0024;
  border: 1px solid var(--ed-line-strong);
  border-radius: 14px;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.ed-cropper-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--ed-line);
}
.ed-cropper-head h3 { margin: 0; font-size: 17px; font-weight: 600; }
.ed-cropper-x {
  background: transparent; border: none; color: var(--ed-text-mute);
  font-size: 20px; cursor: pointer; padding: 4px 8px;
  transition: color 0.15s;
}
.ed-cropper-x:hover { color: var(--ed-text); }

.ed-cropper-area {
  position: relative;
  /* 0.62 width:height = stejný poměr jako karty (.pc-card aspect-ratio: 0.62) */
  width: 100%;
  aspect-ratio: 31 / 50;   /* = 0.62 */
  max-height: 70vh;
  margin: 0 auto;
  background: #0a0010;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.ed-cropper-area:active { cursor: grabbing; }
.ed-cropper-area img {
  position: absolute;
  top: 50%; left: 50%;
  max-width: none; max-height: none;
  min-width: 100%; min-height: 100%;
  pointer-events: none;
  transition: opacity 0.2s;
  /* JS dynamically sets transform: translate(-50%, -50%) scale(zoom) + offset */
}
.ed-cropper-loading {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--ed-text-mute);
}

.ed-cropper-controls {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 22px;
  border-top: 1px solid var(--ed-line);
}
.ed-cropper-icon-min, .ed-cropper-icon-max {
  font-size: 16px;
  opacity: 0.7;
}
.ed-cropper-icon-min { font-size: 13px; }
.ed-cropper-icon-max { font-size: 19px; }
.ed-cropper-controls input[type="range"] {
  flex: 1;
  -webkit-appearance: none; appearance: none;
  height: 4px;
  background: var(--ed-bg-row);
  border-radius: 999px;
  outline: none;
}
.ed-cropper-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--ed-pink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.ed-cropper-controls input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--ed-pink);
}

.ed-cropper-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  border-top: 1px solid var(--ed-line);
}
.ed-cropper-reset {
  background: transparent; border: none;
  color: var(--ed-purple);
  font-family: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; padding: 6px 8px;
  transition: color 0.15s;
}
.ed-cropper-reset:hover { color: var(--ed-pink); }
.ed-cropper-actions { display: flex; gap: 8px; }

@media (max-width: 600px) {
  .ed-cropper-head, .ed-cropper-controls, .ed-cropper-foot { padding: 12px 16px; }
}

.ed-pos-new-banner {
  font-size: 11px;
  font-weight: 600;
  color: var(--ed-pink);
  text-align: center;
  padding: 6px 8px;
  background: rgba(255, 77, 143, 0.08);
  border-radius: 6px;
  letter-spacing: 0.02em;
}

/* ── ROW (collapsible participant/episode) ────────────────────── */
.ed-list { display: flex; flex-direction: column; gap: 6px; }

/* Grid mode — Best Energy zobrazí karty 4-column gridem (kompaktnější přehled) */
.ed-list-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  align-items: stretch;
}
/* Když se karta otevře (.is-open), span přes celou šířku — full width edit form */
.ed-list-grid > .ed-row.is-open {
  grid-column: 1 / -1;
}
.ed-list-grid > .ed-row .ed-row-head {
  flex-wrap: wrap;
}
.ed-list-grid > .ed-row .ed-row-thumb { width: 36px; height: 36px; }
.ed-list-grid > .ed-row .ed-row-name { font-size: 13px; }
.ed-list-grid > .ed-row .ed-row-sub { font-size: 11px; }

@media (max-width: 1100px) { .ed-list-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .ed-list-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px)  { .ed-list-grid { grid-template-columns: 1fr; } }

/* ── /UPRAV — visual cards (větší fotky, badges, "co chybí" overlay) ─────── */
body.is-uprav .ed-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
body.is-uprav .ed-row.is-open { grid-column: 1 / -1; }

/* Mobil: 3×N grid + compact karty */
@media (max-width: 600px) {
  body.is-uprav .ed-list { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  body.is-uprav .up-card-meta { padding: 8px 8px 10px; gap: 2px; }
  body.is-uprav .up-card-name { font-size: 11px; gap: 3px; line-height: 1.2; }
  body.is-uprav .up-card-sub { font-size: 9px; }
  body.is-uprav .up-card-ig { font-size: 9px; margin-top: 1px; word-break: break-all; }
  body.is-uprav .up-card-edit-btn {
    margin-top: 6px; padding: 6px 4px;
    font-size: 9px; letter-spacing: 0.02em; border-radius: 6px;
  }
  body.is-uprav .up-card-missing-overlay { padding: 14px 4px 6px; gap: 2px; }
  body.is-uprav .up-card-missing-overlay strong { font-size: 9px; letter-spacing: 0.04em; }
  body.is-uprav .up-card-missing-overlay span { font-size: 8px; letter-spacing: 0; }
  /* Open karta zachovává plnou šířku */
  body.is-uprav .up-card.is-open .up-card-photo { width: 70px; height: 70px; }
}

.up-card { padding: 0; overflow: hidden; }
.up-card-head {
  display: flex !important; flex-direction: column !important; align-items: stretch !important;
  padding: 0 !important; gap: 0 !important;
}
.up-card-photo {
  position: relative;
  aspect-ratio: 1 / 1.1;
  background: var(--ed-bg);
  overflow: hidden;
}
.up-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-card-photo-empty {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  color: var(--ed-text-faint);
  font-size: 38px; line-height: 1;
  background: linear-gradient(160deg, var(--ed-bg-row) 0%, var(--ed-bg) 100%);
}
.up-card-photo-empty small { font-size: 11px; letter-spacing: 0.06em; opacity: 0.6; }

.up-card-missing-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 77, 143, 0.95) 60%, rgba(220, 38, 90, 0.98) 100%);
  color: #fff;
  padding: 22px 12px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-align: center;
}
.up-card-missing-overlay strong {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.up-card-missing-overlay span {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
  opacity: 0.95;
  text-transform: uppercase;
}

.up-card.up-needs-info {
  border-color: rgba(255, 77, 143, 0.5);
  box-shadow: 0 0 0 1px rgba(255, 77, 143, 0.15);
}

.up-card-meta {
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
  flex: 1;
}
.up-card-name {
  font-size: 15px; font-weight: 600; color: var(--ed-text);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.up-card-sub {
  font-size: 12px; color: var(--ed-text-mute);
}
.up-card-ig {
  font-size: 11px;
  color: var(--ed-pink);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}
.up-card-edit-btn {
  margin-top: 8px;
  background: var(--ed-pink);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
.up-card-edit-btn:hover { background: #ff5e9c; }
.up-card-edit-btn:active { transform: translateY(1px); }

/* Když je karta otevřená, zruš grid layout — má plnou šířku jako řádek */
.up-card.is-open .up-card-head {
  flex-direction: row !important;
  background: rgba(0, 0, 0, 0.2);
}
.up-card.is-open .up-card-photo {
  aspect-ratio: auto;
  width: 80px; height: 80px;
  flex-shrink: 0;
}
.up-card.is-open .up-card-missing-overlay { display: none; }
.up-card.is-open .up-card-edit-btn { display: none; }
.up-card.is-open .up-card-meta { padding: 12px; }
.ed-row {
  background: var(--ed-bg-row);
  border: 1px solid var(--ed-line);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.ed-row:hover { border-color: var(--ed-line-strong); }
.ed-row.is-open { border-color: var(--ed-pink); }
.ed-row-head {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px 8px 8px;
  cursor: pointer;
  user-select: none;
}
.ed-row-thumb {
  width: 44px; height: 44px;
  border-radius: 6px; overflow: hidden;
  flex-shrink: 0;
  background: var(--ed-bg);
}
.ed-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ed-row-thumb-empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ed-text-faint); font-size: 18px;
}
.ed-row-meta { flex: 1; min-width: 0; }
.ed-row-name {
  font-weight: 600; font-size: 14px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.ed-row-sub { font-size: 12px; color: var(--ed-text-mute); margin-top: 2px; }
.ed-row-toggle {
  width: 28px; text-align: center;
  font-size: 18px; font-family: monospace;
  color: var(--ed-text-faint); line-height: 1;
}
.ed-row-body {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--ed-line);
  display: flex; flex-direction: column; gap: 16px;
  background: rgba(0, 0, 0, 0.2);
}
.ed-ep-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; color: var(--ed-pink); font-weight: 600;
  min-width: 60px;
}

/* Tags */
.ed-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ed-tag-grey  { background: rgba(255,255,255,0.1); color: var(--ed-text-mute); }
.ed-tag-purple { background: rgba(167, 139, 250, 0.15); color: var(--ed-purple); }
.ed-tag-pink  { background: var(--ed-pink-soft); color: var(--ed-pink); }

/* Toggles + array */
.ed-toggles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
}
.ed-toggle {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; cursor: pointer;
  user-select: none;
}
.ed-toggle input { width: 16px; height: 16px; accent-color: var(--ed-pink); cursor: pointer; }

.ed-array { display: flex; flex-direction: column; gap: 6px; }
.ed-array-row, .ed-array-add {
  display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px;
  align-items: center;
}
.ed-array-add { grid-template-columns: 1fr auto; }

/* ── STAT row (votes section) ───────────────────────────────── */
.ed-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}
.ed-stat {
  background: var(--ed-bg);
  border: 1px solid var(--ed-line);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex; flex-direction: column; gap: 2px;
}
.ed-stat strong {
  font-size: 22px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--ed-pink);
}
.ed-stat span {
  font-size: 11px; color: var(--ed-text-mute);
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* Changes diff table v admin Contribution rowu */
.ed-changes-block {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 77, 143, 0.18);
  border-radius: 10px;
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.ed-changes-head {
  font-size: 12px; font-weight: 600;
  color: var(--ed-pink);
  letter-spacing: 0.02em;
}
.ed-changes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.ed-changes-table th {
  text-align: left;
  padding: 6px 10px;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ed-text-faint); font-weight: 600;
  border-bottom: 1px solid var(--ed-line);
}
.ed-changes-table td {
  padding: 8px 10px;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  word-break: break-word;
  max-width: 200px;
}
.ed-changes-table td:first-child { width: 90px; }
.ed-changes-table code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--ed-purple);
  background: rgba(167, 139, 250, 0.08);
  padding: 1px 6px; border-radius: 4px;
}
.ed-changes-current { color: var(--ed-text-mute); }
.ed-changes-new strong { color: var(--ed-pink); }

/* ── PICKER MODAL ─────────────────────────────────────────────── */
.ed-modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8, 0, 16, 0.78);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: ed-fade 0.2s ease-out;
}
@keyframes ed-fade { from { opacity: 0; } to { opacity: 1; } }

.ed-modal {
  background: var(--ed-bg-elev);
  border: 1px solid var(--ed-line-strong);
  border-radius: 14px;
  width: 100%;
  max-width: 920px;
  max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: ed-pop 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes ed-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ed-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--ed-line);
}
.ed-modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; }

.ed-modal-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--ed-line);
  align-items: center;
}
.ed-pick-tabs { display: flex; gap: 4px; }

.ed-modal-body {
  flex: 1; overflow-y: auto;
  padding: 16px 22px;
}

.ed-modal-foot {
  padding: 12px 22px;
  border-top: 1px solid var(--ed-line);
  display: flex; align-items: center; justify-content: space-between;
}

.ed-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.ed-pick-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px;
  background: var(--ed-bg-row);
  border: 1px solid var(--ed-line);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  font-family: inherit; color: inherit;
}
.ed-pick-card:hover {
  background: rgba(255, 77, 143, 0.08);
  border-color: var(--ed-pink);
  transform: translateY(-1px);
}
.ed-pick-thumb {
  width: 48px; height: 48px;
  border-radius: 8px; overflow: hidden;
  flex-shrink: 0;
  background: var(--ed-bg);
}
.ed-pick-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ed-pick-meta { flex: 1; min-width: 0; }
.ed-pick-name {
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ed-pick-gender { color: var(--ed-text-mute); font-weight: 400; }
.ed-pick-app {
  font-size: 10px; font-weight: 700;
  background: var(--ed-pink-soft); color: var(--ed-pink);
  padding: 1px 6px; border-radius: 999px;
  margin-left: auto;
}
.ed-pick-sub {
  font-size: 11px; color: var(--ed-text-mute);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ed-pick-empty {
  text-align: center; padding: 40px 20px;
  color: var(--ed-text-faint); font-size: 13px;
}

@media (max-width: 600px) {
  .ed-modal-toolbar { grid-template-columns: 1fr; }
  .ed-pick-grid { grid-template-columns: 1fr; }
}
