/* ═══════════════════════════════════════════════════════════════════════
   Leudar Image — Sidebar Layout · Brutalist Modern
   ═══════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg: #0a0a0a;
  --bg2: #0f0f0f;
  --surface: #141414;
  --surface2: #1a1a1a;
  --surface3: #222222;
  --border: #2a2a2a;
  --border2: #3a3a3a;
  --text: #f0f0f0;
  --text2: #999999;
  --text3: #555555;
  --lime: #00ff88;
  --pink: #ff3366;
  --yellow: #ffcc00;
  --cyan: #00e5ff;
  --discord: #5865f2;
  --sidebar: 240px;
  --sidebar-collapsed: 60px;
  --font: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  display: flex;
  overflow-x: hidden;
  letter-spacing: 0.01em;
}
::selection { background: var(--lime); color: #000; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 10px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ═══════════════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════════════ */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 200;
  width: var(--sidebar);
  background: var(--surface);
  border-right: 2px solid var(--border);
  display: flex; flex-direction: column;
  transition: width 0.2s ease;
  overflow: hidden;
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px; margin-bottom: 4px;
  text-decoration: none; color: var(--lime);
  font-weight: 700; font-size: 18px;
  white-space: nowrap; overflow: hidden;
  border-bottom: 2px solid var(--border);
}
.sidebar-logo .icon { font-size: 22px; flex-shrink: 0; }
.sidebar-logo .text { transition: opacity 0.15s; }
.sidebar.collapsed .sidebar-logo .text { opacity: 0; }

.sidebar-nav {
  flex: 1; display: flex; flex-direction: column; gap: 2px;
  padding: 8px; overflow-y: auto; overflow-x: hidden;
}

.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 6px; border: 2px solid transparent;
  text-decoration: none; font-size: 13px; font-weight: 600;
  color: var(--text2); white-space: nowrap;
  transition: all 0.12s; position: relative;
  overflow: hidden;
}
.sidebar-link:hover { background: var(--surface2); color: var(--text); border-color: var(--border); }
.sidebar-link.active { background: var(--lime); color: #000; border-color: var(--lime); font-weight: 700; }
.sidebar-link .icon { font-size: 18px; flex-shrink: 0; width: 20px; text-align: center; }
.sidebar-link .label { transition: opacity 0.15s; }
.sidebar.collapsed .sidebar-link .label { opacity: 0; position: absolute; }

.sidebar-spacer { flex: 1; }

.sidebar-footer {
  padding: 12px 8px;
  border-top: 2px solid var(--border);
  display: flex; flex-direction: column; gap: 4px;
}

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; white-space: nowrap; overflow: hidden;
}
.sidebar-user img { width: 28px; height: 28px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.sidebar-user .name { font-size: 12px; font-weight: 600; color: var(--text); max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .credits { font-size: 11px; color: var(--lime); font-weight: 700; }
.sidebar-user .info { transition: opacity 0.15s; overflow: hidden; }
.sidebar.collapsed .sidebar-user .info { opacity: 0; }

.sidebar-collapse-btn {
  width: 32px; height: 32px; margin: 4px auto 0;
  border: 2px solid var(--border); background: transparent;
  color: var(--text2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all 0.12s;
}
.sidebar-collapse-btn:hover { border-color: var(--lime); color: var(--lime); }

.sidebar.collapsed .sidebar-collapse-btn { transform: rotate(180deg); }

/* ═══════════════════════════════════════════════════════════════════════
   MAIN CONTENT AREA
   ═══════════════════════════════════════════════════════════════════════ */
.main { flex: 1; margin-left: var(--sidebar); transition: margin-left 0.2s ease; min-width: 0; }
.sidebar.collapsed ~ .main { margin-left: var(--sidebar-collapsed); }

/* ═══════════════════════════════════════════════════════════════════════
   MOBILE OVERLAY
   ═══════════════════════════════════════════════════════════════════════ */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 199; }
.sidebar-overlay.open { display: block; }

.mobile-menu-btn {
  display: none; position: fixed; top: 12px; left: 12px; z-index: 201;
  width: 40px; height: 40px; border: 2px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 20px; cursor: pointer; align-items: center; justify-content: center;
}
.mobile-menu-btn:hover { border-color: var(--lime); color: var(--lime); }

/* ═══════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border: 2px solid var(--border); background: var(--surface);
  font-family: var(--font); font-size: 12px; font-weight: 600; cursor: pointer;
  text-decoration: none; white-space: nowrap; border-radius: 4px;
  transition: all 0.12s; user-select: none;
}
.btn:hover { border-color: var(--text2); transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--surface3); }
.btn:active { transform: none; box-shadow: none; }
.btn:disabled { opacity: 0.3; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.btn-primary { background: var(--lime); color: #000; border-color: var(--lime); font-weight: 700; }
.btn-primary:hover { box-shadow: 4px 4px 0 #00cc66; border-color: #00dd66; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text2); }
.btn-ghost:hover { color: var(--text); border-color: var(--text2); }
.btn-discord { background: var(--discord); color: #fff; border-color: var(--discord); }
.btn-discord:hover { box-shadow: 4px 4px 0 #4752c4; }
.btn-danger { background: var(--pink); color: #fff; border-color: var(--pink); }
.btn-danger:hover { box-shadow: 4px 4px 0 #cc0033; }
.btn-sm { padding: 5px 12px; font-size: 11px; }
.btn-lg { padding: 14px 28px; font-size: 15px; font-weight: 700; }
.btn-block { width: 100%; }

/* ═══════════════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════════════ */
.input, .textarea, .select {
  width: 100%; padding: 10px 12px;
  background: var(--bg); border: 2px solid var(--border); color: var(--text);
  font-family: var(--font); font-size: 13px; outline: none; border-radius: 4px;
  transition: border-color 0.15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--lime); }
.input::placeholder, .textarea::placeholder { color: var(--text3); }
.textarea { resize: vertical; min-height: 80px; line-height: 1.6; }

.select {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px;
}

.form-label { display: block; font-size: 10px; font-weight: 700; color: var(--text2); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1.2px; }
.form-group { margin-bottom: 12px; }

.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text2); cursor: pointer; }
.checkbox-label:hover { color: var(--text); }
.checkbox-label input { accent-color: var(--lime); width: 16px; height: 16px; }

/* ═══════════════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════════════ */
.modal-overlay { position: fixed; inset: 0; z-index: 500; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,0.85); padding: 16px; }
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface2); border: 3px solid var(--border2);
  padding: 28px; width: 100%; max-width: 440px;
  box-shadow: 12px 12px 0 rgba(0,0,0,0.5);
  max-height: 90vh; overflow-y: auto; border-radius: 4px;
}
.modal h3 { font-size: 18px; font-weight: 700; margin-bottom: 18px; text-transform: uppercase; letter-spacing: 1px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ═══════════════════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════════════════ */
.toast-container { position: fixed; top: 16px; right: 16px; z-index: 2000; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.toast {
  padding: 12px 18px; border: 2px solid; font-size: 12px; font-weight: 700;
  pointer-events: auto; animation: toastIn 0.25s ease; letter-spacing: 0.5px;
}
.toast-success { background: var(--lime); color: #000; border-color: #00cc66; }
.toast-error { background: var(--pink); color: #fff; border-color: #cc0033; }
.toast-warning { background: var(--yellow); color: #000; border-color: #cca300; }
.toast-info { background: var(--cyan); color: #000; border-color: #00b8cc; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

/* ═══════════════════════════════════════════════════════════════════════
   SPINNER / LOADING / SKELETON
   ═══════════════════════════════════════════════════════════════════════ */
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--lime); animation: spin 0.6s linear infinite; border-radius: 50%; }
.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; gap: 14px; color: var(--text2); }
.skeleton { background: var(--surface2); animation: pulse 2s infinite; border-radius: 4px; }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:0.4} }

/* ═══════════════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════════════ */
.empty { text-align: center; padding: 60px 20px; color: var(--text2); }
.empty-icon { font-size: 56px; margin-bottom: 12px; }
.empty h3 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 6px; text-transform: uppercase; }
.empty p { font-size: 13px; }

/* ═══════════════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════════════ */
.badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; border: 2px solid; border-radius: 2px; }
.badge-fal { background: rgba(0,255,136,0.08); color: var(--lime); border-color: var(--lime); }
.badge-runpod { background: rgba(255,51,102,0.08); color: var(--pink); border-color: var(--pink); }
.badge-web { background: rgba(255,204,0,0.08); color: var(--yellow); border-color: var(--yellow); }
.badge-discord { background: rgba(88,101,242,0.08); color: var(--discord); border-color: var(--discord); }
.badge-nsfw { background: rgba(255,51,102,0.12); color: var(--pink); border-color: var(--pink); }
.badge-admin { background: rgba(0,255,136,0.08); color: var(--lime); border-color: var(--lime); padding: 3px 10px; font-size: 11px; }
.badge-banned { background: rgba(255,51,102,0.12); color: var(--pink); border-color: var(--pink); padding: 3px 10px; font-size: 11px; }

/* ═══════════════════════════════════════════════════════════════════════
   STAT CARDS
   ═══════════════════════════════════════════════════════════════════════ */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 20px; }
.stat-card {
  background: var(--surface); border: 2px solid var(--border); padding: 16px; border-radius: 4px;
  transition: border-color 0.12s;
}
.stat-card:hover { border-color: var(--lime); }
.stat-card .label { font-size: 10px; color: var(--text2); text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; margin-bottom: 6px; }
.stat-card .value { font-size: 28px; font-weight: 700; color: var(--lime); letter-spacing: -1px; }

/* ═══════════════════════════════════════════════════════════════════════
   DIVIDER
   ═══════════════════════════════════════════════════════════════════════ */
.divider { display: flex; align-items: center; gap: 14px; margin: 16px 0; font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.divider::before, .divider::after { content: ''; flex: 1; height: 2px; background: var(--border); }

/* ═══════════════════════════════════════════════════════════════════════
   ═══════════  PAGE: GENERATE  (Bento Grid Layout)  ════════════════════
   ═══════════════════════════════════════════════════════════════════════ */
.gen-page { padding: 24px; max-width: 1200px; margin: 0 auto; }
.gen-page h1 { font-size: 28px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 24px; color: var(--lime); }

.bento { display: grid; grid-template-columns: 1fr 280px; gap: 14px; margin-bottom: 20px; }

.bento-prompt {
  grid-row: span 2;
  background: var(--surface); border: 2px solid var(--border); border-radius: 4px;
  padding: 24px; display: flex; flex-direction: column;
}
.bento-prompt textarea {
  flex: 1; background: var(--bg); border: 2px solid var(--border); color: var(--text);
  font-family: var(--font); font-size: 15px; padding: 16px; resize: none;
  outline: none; border-radius: 4px; line-height: 1.7;
}
.bento-prompt textarea:focus { border-color: var(--lime); }
.bento-prompt textarea::placeholder { color: var(--text3); }
.bento-prompt .prompt-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; flex-wrap: wrap; gap: 8px;
}

.bento-card {
  background: var(--surface); border: 2px solid var(--border); border-radius: 4px;
  padding: 18px;
}
.bento-card .label { font-size: 10px; color: var(--text2); text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; margin-bottom: 10px; }

.bento-actions {
  grid-column: 1 / -1;
  display: flex; gap: 8px;
}

/* Provider toggle */
.provider-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 2px solid var(--border); border-radius: 4px; overflow: hidden; }
.provider-opt {
  padding: 10px 8px; border: none; background: transparent;
  color: var(--text2); cursor: pointer; font-family: var(--font);
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; transition: all 0.12s;
}
.provider-opt + .provider-opt { border-left: 2px solid var(--border); }
.provider-opt:hover { background: var(--surface2); color: var(--text); }
.provider-opt.active { background: var(--lime); color: #000; }

/* Model pills */
.model-row { display: flex; gap: 6px; flex-wrap: wrap; }
.model-chip {
  padding: 5px 12px; border: 2px solid var(--border); background: var(--bg);
  color: var(--text2); cursor: pointer; font-family: var(--font);
  font-size: 11px; font-weight: 600; transition: all 0.12s; border-radius: 4px;
}
.model-chip:hover { border-color: var(--lime); color: var(--lime); }
.model-chip.active { background: var(--lime); color: #000; border-color: var(--lime); }

/* Dimension label */
.dim-row { display: flex; gap: 8px; align-items: center; }
.dim-row span { color: var(--text2); font-size: 12px; font-weight: 700; }

/* ─── Results ──────────────────────────────────────────────────────── */
.results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.results-header h2 { font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }

.result-card {
  background: var(--surface); border: 2px solid var(--border); border-radius: 4px;
  overflow: hidden; transition: all 0.12s;
}
.result-card:hover { border-color: var(--lime); transform: translateY(-2px); box-shadow: 4px 4px 0 var(--lime); }
.result-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.result-card .meta { padding: 10px 12px; border-top: 2px solid var(--border); }
.result-card .meta .model { font-size: 10px; font-weight: 700; color: var(--lime); text-transform: uppercase; }
.result-card .meta .prompt { font-size: 11px; color: var(--text3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ═══════════════════════════════════════════════════════════════════════
   ═══════════  PAGE: GALLERY  (Masonry + Floating Bar)  ════════════════
   ═══════════════════════════════════════════════════════════════════════ */
.gallery-page { padding: 24px; }
.gallery-page h1 { font-size: 24px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 20px; color: var(--lime); }

.float-bar {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface); border: 2px solid var(--border); border-radius: 6px;
  padding: 8px 12px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.float-bar .search { flex: 1; min-width: 180px; max-width: 300px; }
.float-bar .sep { width: 2px; height: 20px; background: var(--border); }

.masonry { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.masonry > * { margin: 0; }
.masonry .empty { grid-column: 1 / -1; }
.masonry .loading { grid-column: 1 / -1; }

.gallery-card {
  background: var(--surface); border: 2px solid var(--border); border-radius: 4px;
  overflow: hidden; cursor: pointer; transition: all 0.12s; position: relative;
}
.gallery-card:hover { border-color: var(--lime); transform: translateY(-2px); box-shadow: 4px 4px 0 var(--lime); }
.gallery-card img { width: 100%; display: block; }
.gallery-card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 50%);
  opacity: 0; transition: opacity 0.15s;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 12px;
}
.gallery-card:hover .overlay { opacity: 1; }
.gallery-card .overlay .name { font-size: 12px; font-weight: 700; color: #fff; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-card .overlay .meta { font-size: 10px; color: rgba(255,255,255,0.5); margin-top: 2px; }

.gallery-card .badges { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; z-index: 2; }
.gallery-card .fav-btn {
  position: absolute; top: 8px; left: 8px; font-size: 18px; cursor: pointer;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); z-index: 2;
  background: none; border: none; transition: transform 0.12s;
}
.gallery-card .fav-btn:hover { transform: scale(1.3); }

/* ─── Lightbox ──────────────────────────────────────────────────── */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,0.95); }
.lightbox.open { display: flex; }
.lightbox-img { max-width: 90vw; max-height: 85vh; object-fit: contain; border: 3px solid var(--border2); }
.lightbox-close {
  position: absolute; top: 16px; right: 16px;
  width: 42px; height: 42px; border: 2px solid var(--border2); background: var(--bg);
  color: #fff; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.12s;
}
.lightbox-close:hover { border-color: var(--pink); color: var(--pink); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: 2px solid var(--border2); background: var(--bg);
  color: #fff; font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.12s;
}
.lightbox-nav:hover { border-color: var(--lime); color: var(--lime); }
.lightbox-prev { left: 16px; } .lightbox-next { right: 16px; }

.lightbox-info {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 2px solid var(--border2);
  padding: 14px 20px; color: var(--text2); max-width: 85vw; text-align: center; border-radius: 6px;
}
.lightbox-prompt { font-size: 12px; margin-top: 6px; max-height: 50px; overflow-y: auto; color: var(--text3); }
.lightbox-actions { display: flex; gap: 4px; margin-top: 8px; justify-content: center; flex-wrap: wrap; }
.lightbox-actions button {
  background: var(--surface2); border: 2px solid var(--border); color: #fff;
  padding: 4px 10px; font-size: 10px; font-weight: 600; font-family: var(--font); cursor: pointer; transition: all 0.12s; text-transform: uppercase; border-radius: 4px;
}
.lightbox-actions button:hover { border-color: var(--lime); }
.lightbox-actions button.danger:hover { border-color: var(--pink); color: var(--pink); }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 4px; margin: 24px 0 0; }
.page-btn {
  padding: 7px 12px; border: 2px solid var(--border); background: var(--surface);
  color: var(--text2); cursor: pointer; font-family: var(--font); font-size: 12px; font-weight: 700;
  min-width: 36px; text-align: center; transition: all 0.12s; border-radius: 4px;
}
.page-btn:hover { border-color: var(--lime); color: var(--lime); }
.page-btn.active { background: var(--lime); color: #000; border-color: var(--lime); }
.page-btn:disabled { opacity: 0.2; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════════════════════
   ═══════════  PAGE: PROFILE  (Split Panel)  ════════════════════════════
   ═══════════════════════════════════════════════════════════════════════ */
.profile-page { padding: 24px; max-width: 1000px; margin: 0 auto; }
.profile-page h1 { font-size: 24px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 24px; color: var(--lime); }

.profile-grid { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }

.profile-left { position: sticky; top: 20px; }
.profile-card {
  background: var(--surface); border: 2px solid var(--border); border-radius: 4px;
  padding: 24px; text-align: center; margin-bottom: 12px;
}
.profile-avatar { width: 80px; height: 80px; border-radius: 4px; object-fit: cover; border: 3px solid var(--lime); margin-bottom: 12px; }
.profile-name { font-size: 20px; font-weight: 700; }
.profile-username { color: var(--text2); font-size: 13px; margin-top: 2px; }
.profile-badge { display: inline-block; margin-top: 8px; padding: 3px 12px; border: 2px solid var(--lime); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--lime); border-radius: 2px; }
.profile-stats { background: var(--surface); border: 2px solid var(--border); border-radius: 4px; padding: 16px; }
.profile-stats .val { font-size: 28px; font-weight: 700; color: var(--lime); }

.profile-right { display: flex; flex-direction: column; gap: 14px; }
.section-card { background: var(--surface); border: 2px solid var(--border); border-radius: 4px; padding: 20px; }
.section-card h3 { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }

.info-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: none; }
.info-row .key { font-size: 12px; color: var(--text2); display: flex; align-items: center; gap: 8px; }
.info-row .val { font-size: 12px; font-weight: 600; }
.mono { font-family: var(--mono); font-size: 11px; }

.key-display { background: var(--bg); border: 2px solid var(--lime); padding: 14px; font-family: var(--mono); word-break: break-all; color: var(--lime); font-size: 11px; margin-bottom: 12px; border-radius: 4px; }

/* ═══════════════════════════════════════════════════════════════════════
   ═══════════  PAGE: ADMIN  (Data Tables)  ═════════════════════════════
   ═══════════════════════════════════════════════════════════════════════ */
.admin-page { padding: 24px; max-width: 1100px; margin: 0 auto; }
.admin-page h1 { font-size: 24px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 20px; color: var(--lime); }

.tab-bar { display: flex; gap: 0; margin-bottom: 16px; border: 2px solid var(--border); border-radius: 4px; overflow: hidden; }
.tab-btn {
  flex: 1; padding: 10px 16px; border: none; background: transparent;
  color: var(--text2); cursor: pointer; font-family: var(--font); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; transition: all 0.12s;
}
.tab-btn + .tab-btn { border-left: 2px solid var(--border); }
.tab-btn:hover { background: var(--surface2); color: var(--text); }
.tab-btn.active { background: var(--lime); color: #000; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th {
  text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--border);
  color: var(--text2); font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
  background: var(--surface); position: sticky; top: 0;
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text); }
.data-table tr:hover td { background: var(--surface2); }
.data-table .cell-user { display: flex; align-items: center; gap: 10px; }
.data-table .cell-user img { width: 28px; height: 28px; border-radius: 4px; object-fit: cover; border: 1px solid var(--border); }
.data-table .cell-user .info .n { font-weight: 700; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.data-table .cell-user .info .s { font-size: 10px; color: var(--text3); margin-top: 1px; }

.group-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.group-card {
  background: var(--surface); border: 2px solid var(--border); border-radius: 4px;
  padding: 18px; display: flex; align-items: center; gap: 14px; transition: border-color 0.12s;
}
.group-card:hover { border-color: var(--lime); }
.group-card .icon {
  width: 44px; height: 44px; background: var(--surface2); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
  border-radius: 4px;
}
.group-card .info { flex: 1; min-width: 0; }
.group-card .info h4 { font-size: 14px; font-weight: 700; text-transform: uppercase; }
.group-card .info .sub { font-size: 10px; color: var(--text3); margin-top: 2px; }
.group-card .stats { text-align: right; }
.group-card .stats .n { font-size: 18px; font-weight: 700; color: var(--lime); }
.group-card .stats .l { font-size: 10px; color: var(--text3); }

/* ═══════════════════════════════════════════════════════════════════════
   ═══════════  PAGE: PRIVACY  ═══════════════════════════════════════════
   ═══════════════════════════════════════════════════════════════════════ */
.privacy-page { padding: 24px; max-width: 800px; margin: 0 auto; }
.privacy-page h1 { font-size: 24px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 24px; color: var(--lime); }
.privacy-card { background: var(--surface); border: 2px solid var(--border); border-radius: 4px; padding: 20px; margin-bottom: 10px; }
.privacy-card h3 { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.privacy-card p, .privacy-card li { font-size: 13px; color: var(--text2); line-height: 1.7; }
.privacy-card ul { margin: 6px 0 6px 18px; }
.privacy-card li { margin-bottom: 2px; }

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); width: 240px; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .mobile-menu-btn { display: flex; }
  .main { margin-left: 0 !important; }
  .sidebar.collapsed ~ .main { margin-left: 0 !important; }
  .bento { grid-template-columns: 1fr; }
  .masonry { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-left { position: static; }
}
@media (max-width: 600px) {
  .masonry { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .bento { grid-template-columns: 1fr; }
  .gen-page, .gallery-page, .admin-page, .profile-page, .privacy-page { padding: 12px; }
  .float-bar { flex-direction: column; }
  .float-bar .sep { display: none; }
  .float-bar .search { max-width: none; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .results-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .tab-bar { flex-direction: column; }
  .tab-btn { border-left: none !important; border-top: 2px solid var(--border); }
  .data-table { font-size: 10px; }
  .modal { padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
