/* ADMIN CONTROL PANEL STYLES */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --admin-bg: #0d0a14;
  --admin-sidebar: #140f21;
  --admin-card: #1c152e;
  --admin-border: rgba(255, 255, 255, 0.08);
  --admin-primary: #ff5e97;
  --admin-success: #2ecc71;
  --admin-danger: #e74c3c;
  --admin-text: #f1eef8;
  --admin-text-dim: #9b94b0;
}

/* Helper status text colors */
.text-active { color: #2ecc71 !important; }
.text-inactive { color: #9ca3af !important; }
.text-pink { color: #ec4899 !important; }
.text-unlocked { color: #4ade80 !important; }
.text-dim { color: var(--admin-text-dim) !important; }

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

body {
  background-color: var(--admin-bg);
  color: var(--admin-text);
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  display: flex;
}

.admin-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: 260px;
  background: var(--admin-sidebar);
  border-right: 1px solid var(--admin-border);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
}

.admin-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--admin-primary);
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.admin-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--admin-text-dim);
  text-decoration: none;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.admin-nav a:hover, .admin-nav a.active {
  background: rgba(255, 94, 151, 0.15);
  color: #fff;
}

/* Content Area */
.admin-content {
  flex: 1;
  padding: 2.5rem;
  overflow-y: auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--admin-border);
  padding-bottom: 1.2rem;
}

.admin-title {
  font-size: 1.8rem;
  font-weight: 700;
}

.admin-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-box {
  background: var(--admin-sidebar);
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--admin-primary);
  margin-bottom: 0.3rem;
}

.stat-label {
  color: var(--admin-text-dim);
  font-size: 0.9rem;
}

/* Form controls */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--admin-text-dim);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: #110d1c;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 10px rgba(255, 94, 151, 0.2);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--admin-primary);
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--admin-text);
}

.btn-danger {
  background: var(--admin-danger);
  color: #fff;
}

.alert-success {
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid rgba(46, 204, 113, 0.4);
  color: #2ecc71;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.alert-error {
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid rgba(231, 76, 60, 0.4);
  color: #e74c3c;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

/* Data Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th, .data-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--admin-border);
}

.data-table th {
  color: var(--admin-text-dim);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@media (max-width: 900px) {
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    padding: 1.2rem;
  }
  .admin-content {
    padding: 1.5rem;
  }
}

/* ============================================================= */
/* REALTIME 2-PERSON CHAT STYLES FOR ADMIN PANEL */
/* ============================================================= */
.admin-chat-container {
  display: flex;
  flex-direction: column;
  height: 520px;
  background: #110d1c;
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  overflow: hidden;
}

.admin-chat-header {
  padding: 1rem 1.5rem;
  background: var(--admin-sidebar);
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-behavior: smooth;
}

.admin-chat-footer {
  padding: 1.2rem;
  background: var(--admin-sidebar);
  border-top: 1px solid var(--admin-border);
}

.chat-bubble {
  display: flex;
  gap: 0.75rem;
  max-width: 80%;
}

.chat-bubble.self {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-bubble.other {
  align-self: flex-start;
}

.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #1c152e;
  border: 1px solid var(--admin-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.chat-bubble-content {
  background: #1c152e;
  border-radius: 14px;
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--admin-border);
  position: relative;
}

.chat-bubble.self .chat-bubble-content {
  background: linear-gradient(135deg, #7c5cbf, #ff5e97);
  color: #fff;
  border-top-right-radius: 2px;
}

.chat-bubble.other .chat-bubble-content {
  background: #181226;
  color: #f1eef8;
  border-top-left-radius: 2px;
  border-left: 3px solid var(--admin-primary);
}

.chat-sender-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.3rem;
}

.chat-sender-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--admin-primary);
}

.chat-bubble.self .chat-sender-name { color: #ffe4ec; }

.chat-time {
  font-size: 0.72rem;
  color: var(--admin-text-dim);
}

.chat-message-text {
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.bubble-reaction-badge {
  position: absolute;
  bottom: -10px;
  right: 12px;
  background: #1c152e;
  border: 1px solid var(--admin-primary);
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 0.82rem;
}

.chat-sticker-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.6rem;
}

.chat-sticker-btn {
  background: rgba(255, 94, 151, 0.15);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
  color: var(--admin-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.chat-sticker-btn:hover {
  background: var(--admin-primary);
  color: #fff;
}

.typing-status-bar {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--admin-primary);
  font-weight: 600;
  padding: 0.4rem 1rem;
}

