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

:root {
  --bg: #080006;
  --bg2: #120a10;
  --bg3: #1e1018;
  --border: #301828;
  --text: #f0e0ea;
  --text2: #9a7088;
  --accent: #ff69b4;
  --accent2: #d4558a;
  --accent-bright: #ff8acc;
  --accent-soft: #f5a0c8;
  --green: #f5a0c8;
  --red: #ff4466;
  --yellow: #ffb86c;
  --radius: 10px;
  --glow: 0 0 20px rgba(255,105,180,0.1);
  --pink-gradient: linear-gradient(135deg, #a33d6b, #ff69b4, #ff8acc, #ff69b4, #a33d6b);
  --pink-text: linear-gradient(135deg, #d4558a, #ff69b4, #ffaad4, #ff69b4, #d4558a);
  --pink-btn: linear-gradient(135deg, #8a2050, #d4558a, #ff69b4, #d4558a, #8a2050);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(255,105,180,0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(212,85,138,0.03) 0%, transparent 50%);
}
.hidden { display: none !important; }

/* ═══════════ SVG ICONS ═══════════ */
.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 16px; height: 16px; }
.icon-title { width: 22px; height: 22px; margin-right: 6px; position: relative; top: -1px; }
.icon-search-input { width: 16px; height: 16px; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text2); pointer-events: none; }

.search-wrapper { position: relative; flex: 1; min-width: 200px; }
.search-wrapper .search-input { padding-left: 36px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideLeft { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 5px rgba(255,105,180,0.15); } 50% { box-shadow: 0 0 20px rgba(255,105,180,0.3); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes pinkPulse {
  0%, 100% { text-shadow: 0 0 4px rgba(255,105,180,0.3); }
  50% { text-shadow: 0 0 16px rgba(255,105,180,0.5), 0 0 30px rgba(255,105,180,0.15); }
}

/* ═══════════ NAV ═══════════ */
nav {
  background: rgba(18,10,16,0.94);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  animation: slideDown 0.5s ease-out;
  backdrop-filter: blur(16px);
}

nav .logo {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--pink-text);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 5s linear infinite;
  padding: 4px 0;
}

nav .nav-links { display: flex; gap: 4px; align-items: center; }

nav .nav-links a {
  color: var(--text2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
}

nav .nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--pink-gradient);
  background-size: 200% auto;
  transition: all 0.3s;
  transform: translateX(-50%);
}

nav .nav-links a:hover::after, nav .nav-links a.active::after { width: 70%; }
nav .nav-links a:hover, nav .nav-links a.active { background: var(--bg3); color: var(--text); }

.btn-logout {
  background: transparent;
  color: var(--red) !important;
  border: 1px solid rgba(255,68,102,0.3);
  font-size: 12px !important;
  padding: 6px 12px !important;
  cursor: pointer;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.btn-logout:hover { background: var(--red); color: white !important; transform: scale(1.05); }

/* ═══════════ AUTH ═══════════ */
.auth-page {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.6s;
}

.auth-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow:
    0 25px 60px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,105,180,0.04) inset;
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transition: border-color 0.5s;
  position: relative;
}
.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,105,180,0.2), transparent);
}
.auth-card:hover { border-color: rgba(255,105,180,0.25); }

.auth-card h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
  background: var(--pink-text);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 5s linear infinite;
}

.auth-card .subtitle { color: var(--text2); font-size: 14px; margin-bottom: 28px; }

/* ═══════════ FORM ═══════════ */
.form-group { margin-bottom: 16px; animation: slideUp 0.5s ease-out backwards; }
.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.15s; }
.form-group:nth-child(3) { animation-delay: 0.2s; }
.form-group:nth-child(4) { animation-delay: 0.25s; }
.form-group:nth-child(5) { animation-delay: 0.3s; }
.form-group:nth-child(6) { animation-delay: 0.35s; }

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s;
  outline: none;
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,105,180,0.08), 0 0 16px rgba(255,105,180,0.06);
  transform: translateY(-1px);
}

.form-group textarea { resize: vertical; min-height: 100px; }

/* ═══════════ BUTTONS ═══════════ */
.btn-primary {
  width: 100%;
  padding: 12px;
  background: var(--pink-btn);
  background-size: 200% auto;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s;
  margin-top: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.5s;
}
.btn-primary:hover::after { left: 100%; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(255,105,180,0.25), 0 0 20px rgba(255,105,180,0.1); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; animation: pulse 1.5s infinite; }
.btn-success { background: linear-gradient(135deg, #f5a0c8, #d4558a); }

.auth-link { text-align: center; margin-top: 20px; color: var(--text2); font-size: 13px; }
.auth-link a { color: var(--accent); text-decoration: none; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.auth-link a:hover { text-shadow: 0 0 12px rgba(255,105,180,0.4); }

/* ═══════════ ALERTS ═══════════ */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; font-weight: 500; animation: shake 0.4s ease-out; display: flex; align-items: center; gap: 6px; }
.alert-error { background: rgba(255,68,102,0.08); border: 1px solid rgba(255,68,102,0.25); color: var(--red); }
.alert-success { background: rgba(245,160,200,0.08); border: 1px solid rgba(245,160,200,0.25); color: var(--accent-soft); animation: slideDown 0.4s ease-out; }

/* ═══════════ PAGES ═══════════ */
.page-content { max-width: 900px; margin: 0 auto; padding: 30px 20px; animation: fadeIn 0.5s; }
.page-content h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  animation: slideLeft 0.5s ease-out;
  background: var(--pink-text);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════ CONTROLS ═══════════ */
.controls { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; animation: slideUp 0.4s ease-out; }
.search-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: all 0.3s;
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 16px rgba(255,105,180,0.08); }

.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn {
  padding: 8px 14px;
  background: var(--bg2);
  color: var(--text2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.filter-btn:hover { transform: translateY(-2px); border-color: var(--accent2); }
.filter-btn.active {
  background: var(--pink-btn);
  background-size: 200% auto;
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255,105,180,0.2);
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* ═══════════ REPORT CARDS ═══════════ */
.report-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  animation: slideUp 0.5s ease-out backwards;
  position: relative;
}
.report-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--pink-gradient);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.3s;
}
.report-card:nth-child(1) { animation-delay: 0s; }
.report-card:nth-child(2) { animation-delay: 0.05s; }
.report-card:nth-child(3) { animation-delay: 0.1s; }
.report-card:nth-child(4) { animation-delay: 0.15s; }
.report-card:nth-child(5) { animation-delay: 0.2s; }
.report-card:hover {
  border-color: var(--accent2);
  background: var(--bg3);
  transform: translateX(6px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 0 12px rgba(255,105,180,0.05);
}
.report-card:hover::before { opacity: 1; }

.report-card .info { flex: 1; min-width: 200px; }
.report-card .info .id {
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
}
.report-card .info .email { font-size: 14px; margin: 4px 0; }
.report-card .info .phone { font-size: 12px; color: var(--accent2); display: flex; align-items: center; gap: 4px; }
.report-card .info .meta { color: var(--text2); font-size: 12px; }

/* ═══════════ STATUS ═══════════ */
.status-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; transition: all 0.3s; }
.status-pending { background: rgba(255,184,108,0.12); color: var(--yellow); }
.status-in_process { background: rgba(255,105,180,0.12); color: var(--accent); animation: pulse 2s infinite; }
.status-resolved { background: rgba(245,160,200,0.12); color: var(--accent-soft); }

.status-select {
  padding: 6px 10px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s;
}
.status-select:hover { border-color: var(--accent); }

.responses-badge {
  background: var(--pink-btn);
  background-size: 200% auto;
  color: #fff;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  animation: float 3s ease-in-out infinite;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.empty-state { text-align: center; padding: 60px 20px; color: var(--text2); animation: fadeIn 0.6s; }

/* ═══════════ MODAL ═══════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  animation: fadeIn 0.2s;
  backdrop-filter: blur(8px);
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 550px;
  max-height: 85vh;
  overflow-y: auto;
  animation: scaleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,105,180,0.05) inset;
  position: relative;
}
.modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,105,180,0.2), transparent);
}

.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-size: 17px; }
.modal-close {
  background: none;
  border: none;
  color: var(--text2);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  transition: all 0.3s;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--bg3); color: var(--red); transform: rotate(90deg); }
.modal-body { padding: 24px; }

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(48,24,40,0.6);
  font-size: 13px;
  animation: slideLeft 0.4s ease-out backwards;
}
.detail-row:nth-child(1) { animation-delay: 0.05s; }
.detail-row:nth-child(2) { animation-delay: 0.1s; }
.detail-row:nth-child(3) { animation-delay: 0.15s; }
.detail-row:nth-child(4) { animation-delay: 0.2s; }
.detail-row:nth-child(5) { animation-delay: 0.25s; }
.detail-row:nth-child(6) { animation-delay: 0.3s; }
.detail-row:nth-child(7) { animation-delay: 0.35s; }
.detail-row:nth-child(8) { animation-delay: 0.4s; }
.detail-row .label { color: var(--text2); }
.detail-row .value { color: var(--text); font-weight: 500; text-align: right; max-width: 60%; word-break: break-word; }
.detail-row .value.phone { color: var(--accent); font-family: 'JetBrains Mono', monospace; }

.section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 24px 0 12px;
  animation: slideLeft 0.5s ease-out;
}

.response-item {
  padding: 14px;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 8px;
  border-left: 2px solid var(--accent2);
  font-size: 13px;
  line-height: 1.6;
  animation: slideUp 0.4s ease-out backwards;
  transition: all 0.3s;
}
.response-item:hover { border-left-color: var(--accent); transform: translateX(4px); }
.response-item small { color: var(--text2); font-size: 11px; display: block; margin-top: 6px; }

.char-count { text-align: right; font-size: 11px; color: var(--text2); margin-top: 4px; }
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

/* ═══════════ SCROLLBAR ═══════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent2); }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 640px) {
  .auth-card { padding: 28px 20px; }
  nav { padding: 0 12px; }
  nav .nav-links a { padding: 6px 10px; font-size: 12px; }
  .report-card { flex-direction: column; align-items: flex-start; }
  .controls { flex-direction: column; }
}
