/* =====================================================================
   Sandroid Feedback — style.css
   تم شیشه‌ای تیره هماهنگ با اکسنت‌های اپلیکیشن: آبی‌فیروزه‌ای / نعنایی / بنفش
   ===================================================================== */

:root {
  --bg: #0a0e14;
  --bg-glow-1: #123a3a;
  --bg-glow-2: #1a1438;
  --glass: rgba(255, 255, 255, 0.045);
  --glass-strong: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.09);
  --text-primary: #eef2f6;
  --text-muted: #93a1b0;
  --text-faint: #5c6a79;

  --aqua: #5eead4;
  --mint: #7ee8b8;
  --lavender: #b9a6f7;
  --amber: #f5c56b;
  --rose: #f28b96;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --radius-pill: 999px;

  --shadow-soft: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --font-ui: "Segoe UI", "Vazirmatn", "Tahoma", "Iranian Sans", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-ui);
  direction: rtl;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* پس‌زمینه‌ی محیطی — دو نور محو که هویت اپ موزیک را تداعی می‌کند */
body::before, body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}
body::before {
  width: 520px; height: 520px;
  background: var(--bg-glow-1);
  top: -180px; right: -160px;
}
body::after {
  width: 480px; height: 480px;
  background: var(--bg-glow-2);
  bottom: -200px; left: -160px;
}

a { color: var(--aqua); }

.wrap {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

/* ---------------- Header ---------------- */
.site-header {
  text-align: center;
  padding: 18px 0 30px;
}
.site-header .logo-mark {
  width: 46px; height: 46px;
  margin: 0 auto 14px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--aqua), var(--lavender));
  box-shadow: 0 8px 30px -8px rgba(94, 234, 212, 0.5);
}
.site-header .logo-mark svg { width: 24px; height: 24px; }
.site-header h1 {
  font-size: 22px;
  margin: 0 0 6px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.site-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.8;
}

/* ---------------- Glass Card ---------------- */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-l);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
  padding: 26px;
}

@media (max-width: 480px) {
  .card { padding: 18px; border-radius: var(--radius-m); }
}

/* ---------------- Form ---------------- */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.field .hint { font-size: 12px; color: var(--text-faint); margin-top: 6px; }

.input, .textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-s);
  color: var(--text-primary);
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--aqua);
  background: rgba(94, 234, 212, 0.06);
}
.textarea { resize: vertical; min-height: 110px; line-height: 1.7; }

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 520px) {
  .row-2 { grid-template-columns: 1fr; }
}

/* ---------------- Radio pills (نوع بازخورد) ---------------- */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill-group input { position: absolute; opacity: 0; pointer-events: none; }
.pill-group label {
  margin: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.02);
  transition: all .15s ease;
}
.pill-group input:checked + label {
  color: #06120f;
  border-color: transparent;
  background: linear-gradient(120deg, var(--aqua), var(--mint));
  font-weight: 700;
}

/* ---------------- Equalizer rating (به‌جای ستاره‌های معمول) ----------------
   امتیاز کاربر به شکل معادل‌ساز صوتی — هماهنگ با هویت یک اپ موزیک.
   با جاوااسکریپت کنترل می‌شود (کلاس on) و مقدار در یک input مخفی ذخیره می‌شود. */
.eq-rating {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 46px;
}
.eq-rating .bar {
  cursor: pointer;
  width: 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.09);
  transition: background .15s ease, transform .1s ease;
  border: none;
  padding: 0;
}
.eq-rating .bar:nth-child(1) { height: 40%; }
.eq-rating .bar:nth-child(2) { height: 55%; }
.eq-rating .bar:nth-child(3) { height: 70%; }
.eq-rating .bar:nth-child(4) { height: 85%; }
.eq-rating .bar:nth-child(5) { height: 100%; }

.eq-rating .bar.on,
.eq-rating .bar.hover-preview {
  background: linear-gradient(180deg, var(--mint), var(--aqua));
}

.eq-rating-wrap { display: flex; align-items: center; gap: 14px; }
.eq-rating-value { font-size: 13px; color: var(--text-muted); min-width: 70px; }

/* small equalizer bars used inline in list items (read-only, JS-rendered) */
.eq-mini { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; vertical-align: middle; }
.eq-mini i {
  display: block; width: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.12);
}
.eq-mini i:nth-child(1){ height: 35%; }
.eq-mini i:nth-child(2){ height: 55%; }
.eq-mini i:nth-child(3){ height: 70%; }
.eq-mini i:nth-child(4){ height: 85%; }
.eq-mini i:nth-child(5){ height: 100%; }
.eq-mini i.on { background: linear-gradient(180deg, var(--mint), var(--aqua)); }

/* ---------------- File upload ---------------- */
.upload-box {
  border: 1.5px dashed var(--glass-border);
  border-radius: var(--radius-s);
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
  position: relative;
}
.upload-box:hover { border-color: var(--lavender); background: rgba(185, 166, 247, 0.05); }
.upload-box input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.upload-box .up-text { font-size: 13px; color: var(--text-muted); }
.upload-box .up-icon { font-size: 20px; margin-bottom: 6px; opacity: .8; }
.upload-preview {
  margin-top: 12px;
  display: none;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-s);
  padding: 8px 10px;
}
.upload-preview img {
  width: 44px; height: 44px; object-fit: cover; border-radius: 8px;
}
.upload-preview .up-name { font-size: 12px; color: var(--text-muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-preview button {
  background: none; border: none; color: var(--rose); cursor: pointer; font-size: 12px;
}

/* honeypot field — مخفی از کاربر واقعی */
.hp-field { position: absolute; left: -9999px; opacity: 0; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  border: none;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  width: 100%;
  color: #06120f;
  background: linear-gradient(120deg, var(--aqua), var(--mint));
  box-shadow: 0 12px 30px -10px rgba(94, 234, 212, 0.45);
}
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.btn-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}
.btn-danger { color: var(--rose); background: rgba(242, 139, 150, 0.08); }
.btn-sm { padding: 8px 16px; font-size: 13px; }

.form-msg {
  margin-top: 14px;
  font-size: 13px;
  text-align: center;
  border-radius: var(--radius-s);
  padding: 10px 12px;
  display: none;
}
.form-msg.success { display: block; color: var(--mint); background: rgba(126, 232, 184, 0.08); }
.form-msg.error { display: block; color: var(--rose); background: rgba(242, 139, 150, 0.08); }

/* ---------------- List section ---------------- */
.list-header {
  display: flex; align-items: center; justify-content: space-between;
  margin: 44px 0 16px;
  padding: 0 4px;
}
.list-header h2 { font-size: 16px; margin: 0; font-weight: 700; }
.list-header .count { font-size: 12px; color: var(--text-faint); }

.filter-chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 0 4px 18px;
  scrollbar-width: none;
}
.filter-chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  font-size: 12.5px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.02);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}
.chip.active {
  color: #1a1438;
  background: linear-gradient(120deg, var(--lavender), var(--aqua));
  border-color: transparent;
  font-weight: 700;
}

.feedback-list { display: flex; flex-direction: column; gap: 14px; }

.fb-item {
  border-radius: var(--radius-m);
  padding: 18px;
}
.fb-top { display: flex; align-items: flex-start; gap: 12px; }
.fb-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #06120f;
  background: linear-gradient(135deg, var(--lavender), var(--aqua));
}
.fb-meta { flex: 1; min-width: 0; }
.fb-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fb-name { font-size: 14px; font-weight: 700; }
.fb-type-badge {
  font-size: 11px; padding: 3px 10px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.06); color: var(--text-muted);
}
.fb-time { font-size: 11.5px; color: var(--text-faint); margin-top: 3px; }
.fb-desc { font-size: 13.5px; line-height: 1.9; color: #dbe3ea; margin: 12px 0 0; white-space: pre-wrap; }

.fb-shot {
  margin-top: 12px;
  border-radius: var(--radius-s);
  max-width: 100%;
  max-height: 220px;
  border: 1px solid var(--glass-border);
  cursor: zoom-in;
  display: block;
}

.fb-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; margin-inline-start: 6px;
}
.fb-status-dot.replied { background: var(--mint); }
.fb-status-dot.pending { background: var(--text-faint); }

.fb-reply {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-s);
  background: rgba(94, 234, 212, 0.06);
  border-inline-start: 3px solid var(--aqua);
}
.fb-reply .fb-reply-label {
  font-size: 11.5px; font-weight: 700; color: var(--aqua); margin-bottom: 4px;
  display: flex; align-items: center; gap: 6px;
}
.fb-reply .fb-reply-text { font-size: 13px; color: #dbe3ea; line-height: 1.8; white-space: pre-wrap; }

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-faint);
  font-size: 13.5px;
}

.load-more-wrap { text-align: center; margin-top: 20px; }

/* ---------------- Drawer (کشو آمار / فیلتر) ---------------- */
.drawer-fab {
  position: fixed;
  bottom: 24px;
  inset-inline-end: 24px;
  z-index: 40;
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: linear-gradient(135deg, var(--lavender), var(--aqua));
  color: #06120f;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 14px 34px -10px rgba(185, 166, 247, 0.55);
}

.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(5, 8, 12, 0.6);
  backdrop-filter: blur(2px);
  z-index: 49;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; bottom: 0;
  inset-inline-end: 0; /* در RTL یعنی چسبیده به لبه‌ی چپ صفحه */
  width: min(340px, 86vw);
  background: #0d1119;
  border-inline-start: 1px solid var(--glass-border);
  z-index: 50;
  transform: translateX(-100%); /* چون از لبه‌ی چپ خارج می‌شود */
  transition: transform .28s cubic-bezier(.2,.8,.25,1);
  overflow-y: auto;
  padding: 22px 20px 40px;
}
.drawer.open { transform: translateX(0); }

.drawer-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.drawer-header h3 { font-size: 15px; margin: 0; }
.drawer-close { background: none; border: none; color: var(--text-muted); font-size: 20px; cursor: pointer; line-height: 1; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.stat-box {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-s);
  padding: 14px;
  text-align: center;
}
.stat-box .num { font-size: 20px; font-weight: 800; background: linear-gradient(120deg, var(--aqua), var(--mint)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-box .lbl { font-size: 11.5px; color: var(--text-faint); margin-top: 4px; }

.drawer-section-title { font-size: 12px; color: var(--text-faint); font-weight: 700; margin: 18px 0 10px; }
.drawer-filter-list { display: flex; flex-direction: column; gap: 8px; }
.drawer-filter-list button {
  text-align: start;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-s);
  color: var(--text-muted);
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-family: inherit;
}
.drawer-filter-list button.active {
  border-color: var(--aqua);
  color: var(--text-primary);
  background: rgba(94, 234, 212, 0.06);
}
.drawer-filter-list button span.n { color: var(--text-faint); font-size: 11.5px; }

/* ---------------- Lightbox ---------------- */
.lightbox {
  position: fixed; inset: 0; background: rgba(5,8,12,0.9);
  z-index: 60; display: none; align-items: center; justify-content: center; padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; }
.lightbox-close { position: absolute; top: 20px; inset-inline-end: 24px; color: #fff; font-size: 26px; background: none; border: none; cursor: pointer; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #12161f; border: 1px solid var(--glass-border);
  padding: 12px 20px; border-radius: var(--radius-pill);
  font-size: 13px; color: var(--text-primary);
  z-index: 70; opacity: 0; pointer-events: none; transition: all .25s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- Admin-specific ---------------- */
.admin-login-wrap {
  max-width: 380px; margin: 12vh auto 0; padding: 0 20px;
}
.admin-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--glass-border);
  position: sticky; top: 0; background: rgba(10,14,20,0.85); backdrop-filter: blur(10px); z-index: 5;
}
.admin-topbar h1 { font-size: 15px; margin: 0; }
.admin-wrap { max-width: 860px; margin: 0 auto; padding: 20px 20px 80px; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.admin-item { margin-bottom: 14px; }
.admin-item .fb-desc { margin-top: 10px; }
.admin-reply-form { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.admin-reply-form textarea {
  min-height: 70px;
}
.admin-item-actions { display: flex; gap: 8px; margin-top: 10px; }
.admin-email { font-size: 12px; color: var(--text-faint); direction: ltr; text-align: right; }

.skeleton {
  border-radius: var(--radius-m);
  height: 120px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 37%, rgba(255,255,255,0.03) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

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

:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 2px;
}
