/* ═══════════════════════════════════════════════════════════════════
   Malinkly — Admin Panel · Light Minimal Theme
═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Reset & Root ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #f5f6fa;
  --surface:     #ffffff;
  --border:      #e8eaf0;
  --border-light:#f0f1f5;
  --text:        #1a1d27;
  --text-muted:  #6b7280;
  --text-light:  #9ca3af;
  --accent:      #6366f1;
  --accent-soft: #eef2ff;
  --accent-dark: #4f46e5;
  --green:       #10b981;
  --green-soft:  #ecfdf5;
  --rose:        #f43f5e;
  --rose-soft:   #fff1f2;
  --amber:       #f59e0b;
  --amber-soft:  #fffbeb;
  --blue:        #3b82f6;
  --blue-soft:   #eff6ff;
  --purple:      #8b5cf6;
  --purple-soft: #f5f3ff;
  --radius:      12px;
  --radius-sm:   8px;
  --radius-xs:   6px;
  --shadow:      0 1px 3px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.04);
  --shadow-hover:0 4px 12px rgba(99,102,241,.15), 0 1px 3px rgba(0,0,0,.07);
  --nav-width:   240px;
  --transition:  .18s cubic-bezier(.4,0,.2,1);
}

html { font-size: 15px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Layout ───────────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

/* ── Sidebar ──────────────────────────────────────────────────── */
.sidebar {
  width: var(--nav-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border-light);
}
.sidebar-logo .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 10px;
}
.sidebar-logo .logo-name {
  font-weight: 700; font-size: .95rem; color: var(--text);
  letter-spacing: -.01em;
}
.sidebar-logo .logo-sub {
  font-size: .72rem; color: var(--text-muted); margin-top: 1px;
}

.sidebar-nav { padding: 12px 10px; flex: 1; }

.nav-section-title {
  font-size: .65rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 8px 10px 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
}
.nav-link .nav-icon { font-size: 1rem; width: 20px; text-align: center; }
.nav-link:hover { background: var(--bg); color: var(--text); }
.nav-link.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.nav-link.active .nav-icon { color: var(--accent); }

/* ── Main Content ─────────────────────────────────────────────── */
.main {
  margin-left: var(--nav-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title { font-size: 1rem; font-weight: 600; color: var(--text); }
.topbar-badge {
  font-size: .7rem; font-weight: 600;
  background: var(--accent-soft); color: var(--accent);
  padding: 3px 10px; border-radius: 20px;
}

.content { padding: 32px; flex: 1; max-width: 1200px; }

/* ── Stat Cards ───────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.stat-icon.purple { background: var(--purple-soft); }
.stat-icon.green  { background: var(--green-soft); }
.stat-icon.rose   { background: var(--rose-soft); }
.stat-icon.amber  { background: var(--amber-soft); }
.stat-icon.blue   { background: var(--blue-soft); }
.stat-icon.accent { background: var(--accent-soft); }

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -.03em;
}
.stat-label {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 500;
}
.stat-sub {
  font-size: .72rem;
  color: var(--text-light);
}

/* ── Cards ────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.card-body { padding: 22px; }
.card + .card { margin-top: 20px; }

/* ── Chart ────────────────────────────────────────────────────── */
.chart-wrap { position: relative; height: 220px; }

/* ── Tables ───────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .845rem;
}
thead th {
  text-align: left;
  padding: 11px 14px;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg); }
tbody td {
  padding: 11px 14px;
  color: var(--text);
  vertical-align: middle;
}

/* ── Badges ───────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  font-size: .7rem; font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-green  { background: var(--green-soft);  color: #059669; }
.badge-rose   { background: var(--rose-soft);   color: #e11d48; }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-amber  { background: var(--amber-soft);  color: #d97706; }
.badge-blue   { background: var(--blue-soft);   color: #2563eb; }
.badge-purple { background: var(--purple-soft); color: #7c3aed; }
.badge-gray   { background: var(--bg);          color: var(--text-muted); }
.badge-orange { background: #fff7ed;            color: #c2410c; }

/* ── Avatar ───────────────────────────────────────────────────── */
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 600; color: var(--accent);
  flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.user-cell { display: flex; align-items: center; gap: 10px; }
.user-name  { font-weight: 500; color: var(--text); }
.user-sub   { font-size: .72rem; color: var(--text-muted); }

/* ── Filters / Search ─────────────────────────────────────────── */
.filters {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding: 16px 22px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.search-input, .select-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  font-family: inherit;
  font-size: .84rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}
.search-input { min-width: 220px; }
.search-input:focus, .select-input:focus { border-color: var(--accent); }
.btn-filter {
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border: none; border-radius: var(--radius-xs);
  font-size: .84rem; font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
  font-family: inherit;
}
.btn-filter:hover { background: var(--accent-dark); }
.btn-reset {
  padding: 8px 14px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  font-size: .84rem; cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.btn-reset:hover { border-color: var(--text-muted); color: var(--text); }

/* ── Progress Bars ────────────────────────────────────────────── */
.progress-list { display: flex; flex-direction: column; gap: 10px; }
.progress-item { display: flex; align-items: center; gap: 10px; }
.progress-key {
  font-weight: 700; font-size: .8rem;
  width: 22px; flex-shrink: 0;
  color: var(--accent);
}
.progress-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  border-radius: 4px;
  transition: width .5s ease;
}
.progress-text {
  font-size: .75rem; color: var(--text-muted);
  width: 50px; text-align: right; flex-shrink: 0;
}
.progress-option-text {
  font-size: .78rem; color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

/* ── Poll Card ────────────────────────────────────────────────── */
.poll-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow var(--transition);
}
.poll-card:hover { box-shadow: var(--shadow); }
.poll-question {
  font-size: .9rem; font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.4;
}
.poll-meta { display: flex; gap: 8px; margin-bottom: 14px; align-items: center; }
.poll-total { font-size: .75rem; color: var(--text-muted); }

.polls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

/* ── Profile Detail ───────────────────────────────────────────── */
.profile-hero {
  display: flex; gap: 28px; align-items: flex-start;
  margin-bottom: 24px;
}
.profile-photo {
  width: 120px; height: 120px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.profile-photo-placeholder {
  width: 120px; height: 120px;
  border-radius: 16px;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  flex-shrink: 0;
}
.profile-info { flex: 1; }
.profile-name { font-size: 1.4rem; font-weight: 700; letter-spacing: -.02em; }
.profile-meta { color: var(--text-muted); font-size: .85rem; margin-top: 4px; }
.profile-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.info-item { }
.info-label { font-size: .7rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.info-value { font-size: .9rem; color: var(--text); margin-top: 2px; }

.bio-box {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: .87rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 20px;
}

.answer-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.answer-item:last-child { border-bottom: none; }
.answer-q { font-size: .83rem; color: var(--text-muted); margin-bottom: 4px; }
.answer-a { font-size: .87rem; font-weight: 500; color: var(--text); }

/* ── Geo bars ─────────────────────────────────────────────────── */
.geo-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0;
}
.geo-country { font-size: .88rem; font-weight: 500; min-width: 120px; }
.geo-bar-wrap {
  flex: 1; height: 10px;
  background: var(--bg); border-radius: 5px; overflow: hidden;
}
.geo-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--accent));
  border-radius: 5px; transition: width .5s ease;
}
.geo-count { font-size: .82rem; color: var(--text-muted); min-width: 50px; text-align: right; }

/* ── Pagination ───────────────────────────────────────────────── */
.pagination {
  display: flex; gap: 4px; align-items: center;
  padding: 16px 22px;
  border-top: 1px solid var(--border-light);
  justify-content: center;
}
.page-btn {
  min-width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: .82rem; font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn.disabled { opacity: .4; pointer-events: none; }

/* ── Utilities ────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: .82rem; }
.font-600 { font-weight: 600; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .84rem; color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 20px;
  transition: all var(--transition);
}
.back-btn:hover { border-color: var(--accent); color: var(--accent); }

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state p { font-size: .88rem; }

/* ═══════════════════════════════════════════════════════════════════
   Landing Page
═══════════════════════════════════════════════════════════════════ */

/* ── Two-column layout ─────────────────────────────────────────── */
.landing-layout {
  display: grid;
  grid-template-columns: minmax(460px, 1.15fr) minmax(420px, 1fr);
  gap: 28px;
  align-items: start;
}
@media (max-width: 1080px) {
  .landing-layout { grid-template-columns: 1fr; }
}

/* ── Form card ─────────────────────────────────────────────────── */
.landing-hint {
  font-size: .84rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.field-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.field-input {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .9rem;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
.field-input--error { border-color: var(--rose); }
.field-input--error:focus { box-shadow: 0 0 0 3px rgba(244,63,94,.1); }
.field-error {
  font-size: .78rem;
  color: var(--rose);
  font-weight: 500;
}

.btn-post {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: center;
  padding: 12px 20px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(99,102,241,.3);
  letter-spacing: .01em;
}
.btn-post:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 6px 20px rgba(99,102,241,.4);
  transform: translateY(-1px);
}
.btn-post:active { transform: translateY(0); }
.btn-post:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none;
}
.btn-post-icon { font-size: 1.1rem; }

.landing-action-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}
.landing-btn-row-flex {
  display: flex;
  gap: 10px;
}
.btn-save-config {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
  padding: 12px 16px;
  background: var(--surface-light, rgba(255,255,255,0.06));
  color: var(--text, #e2e8f0);
  border: 1.5px solid var(--border, rgba(255,255,255,0.12));
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition, 0.2s ease);
}
.btn-save-config:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}
.btn-save-config:active { transform: translateY(0); }

.btn-reset-default {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition, 0.2s ease);
}
.btn-reset-default:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
}

.embed-editor-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.08));
}
.embed-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.embed-editor-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text, #f1f5f9);
  display: flex;
  align-items: center;
  gap: 8px;
}
.embed-field-box {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 14px;
}
.embed-field-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.embed-field-badge {
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent, #818cf8);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.color-picker-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.color-swatch-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 42px;
  height: 40px;
  padding: 0;
  border: 1.5px solid var(--border, rgba(255,255,255,0.15));
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  overflow: hidden;
}
.color-swatch-input::-webkit-color-swatch-wrapper {
  padding: 0;
}
.color-swatch-input::-webkit-color-swatch {
  border: none;
}
.field-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.char-count {
  font-size: .72rem;
  color: var(--text-muted, #94a3b8);
}
.char-count.char-count--warn {
  color: #f87171;
  font-weight: 600;
}
.field-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  user-select: none;
}

/* ── Success / Error banners ───────────────────────────────────── */
.success-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--green-soft);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-sm);
}
.success-icon { font-size: 1.4rem; flex-shrink: 0; }
.success-title { font-size: .88rem; font-weight: 600; color: #065f46; }
.success-sub { font-size: .78rem; color: #047857; margin-top: 2px; }
.success-sub code {
  background: rgba(0,0,0,.06);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: monospace;
}

/* ── Tips card ─────────────────────────────────────────────────── */
.tips-card {
  background: var(--amber-soft);
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 16px;
}
.tips-title {
  font-size: .83rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 10px;
}
.tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tips-list li {
  font-size: .8rem;
  color: #78350f;
  line-height: 1.5;
  padding-left: 14px;
  position: relative;
}
.tips-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: #d97706;
  font-weight: 700;
}

/* ── Preview label ─────────────────────────────────────────────── */
.preview-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
}

/* ── Discord mock ──────────────────────────────────────────────── */
.discord-mock {
  background: #313338;
  border-radius: 12px;
  padding: 20px 20px 16px;
  color: #dbdee1;
  font-family: 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.375;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.discord-msg-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}
.discord-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b9d, #ff4757);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.discord-botname {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}
.discord-bot-tag {
  font-size: 9px;
  font-weight: 700;
  background: #5865f2;
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.discord-timestamp {
  font-size: 12px;
  color: #80848e;
  margin-left: 8px;
}

/* ── Embed ─────────────────────────────────────────────────────── */
.discord-embed {
  display: flex;
  background: #2b2d31;
  border-radius: 4px;
  overflow: hidden;
  margin: 6px 0 8px 52px;
  border: 1px solid rgba(255,255,255,.06);
}
.discord-embed-pill {
  width: 4px;
  background: #ff6b9d;
  flex-shrink: 0;
}
.discord-embed-body {
  padding: 12px 14px 12px 12px;
  flex: 1;
  min-width: 0;
}
.discord-embed-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.discord-embed-desc {
  font-size: 13.5px;
  color: #dbdee1;
  line-height: 1.5;
  margin-bottom: 14px;
}

.discord-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.discord-field { min-width: 0; }
.discord-field--full { grid-column: 1 / -1; }
.discord-field-name {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
}
.discord-field-value {
  font-size: 12.5px;
  color: #dbdee1;
  line-height: 1.4;
}

.discord-footer {
  font-size: 11px;
  color: #80848e;
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: 8px;
  margin-top: 4px;
}

/* ── Discord-style CTA button ──────────────────────────────────── */
.discord-btn-row {
  margin-left: 52px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.discord-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #5865f2;
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 4px;
  cursor: default;
  user-select: none;
  transition: opacity 0.2s;
}
.discord-cta-btn--app {
  background: #23a55a;
}
.discord-cta-btn--dm {
  background: #4e5058;
}

/* ── Custom Alert Banners ───────────────────────────────────────── */
.error-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--rose-soft);
  border: 1px solid #fecdd3;
  border-radius: var(--radius-sm);
}
.error-icon { font-size: 1.4rem; flex-shrink: 0; }
.error-title { font-size: .88rem; font-weight: 600; color: #9f1239; }
.error-sub { font-size: .78rem; color: #be123c; margin-top: 2px; }

.warning-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--amber-soft);
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
}
.warning-icon { font-size: 1.4rem; flex-shrink: 0; }
.warning-title { font-size: .88rem; font-weight: 600; color: #92400e; }
.warning-sub { font-size: .78rem; color: #b45309; margin-top: 2px; }

/* ── Photo Upload Widget ────────────────────────────────────────── */
.upload-widget {
  background: var(--surface);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  transition: border-color var(--transition);
}
.upload-widget:hover {
  border-color: var(--accent);
}
.upload-widget-title {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.upload-widget-desc {
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.upload-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.upload-file-label {
  padding: 8px 16px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-xs);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}
.upload-file-label:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.upload-file-input {
  display: none;
}
.upload-submit-btn {
  padding: 8.5px 18px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius-xs);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition);
}
.upload-submit-btn:hover {
  background: #059669;
}
.file-chosen-text {
  font-size: .8rem;
  color: var(--text-muted);
  font-style: italic;
}

