/* ==========================================================================
   GAMEBOOST x FFIN ORDER HUB - DESIGN SYSTEM & STYLES
   ========================================================================== */

:root {
  --bg-dark: #07090e;
  --bg-card: rgba(15, 21, 35, 0.75);
  --bg-card-hover: rgba(23, 32, 54, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-glow: rgba(139, 92, 246, 0.4);

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.25);
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-emerald-bg: rgba(16, 185, 129, 0.15);
  --accent-amber: #f59e0b;
  --accent-amber-bg: rgba(245, 158, 11, 0.15);
  --accent-rose: #ef4444;
  --accent-rose-bg: rgba(239, 68, 68, 0.15);
  --accent-blue: #3b82f6;

  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
}

/* Utilities */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.hidden {
  display: none !important;
}

.mono {
  font-family: var(--font-mono);
}

/* Header */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-purple-glow);
}

.brand-titles h1 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
}

.brand-titles h1 span {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 20px;
  font-size: 0.82rem;
  color: var(--accent-emerald);
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
}

.status-dot.pulse {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-emerald 2s infinite;
}

@keyframes pulse-emerald {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), #7c3aed);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-purple-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-fn-friendship {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
}

.btn-fn-friendship:hover {
  background: rgba(6, 182, 212, 0.25);
  border-color: var(--accent-cyan);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-sync.spinning svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Dropdown */
.dropdown-container {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 110%;
  background: #111625;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  min-width: 200px;
  z-index: 100;
  overflow: hidden;
}

.dropdown-container:hover .dropdown-menu,
.dropdown-menu.show {
  display: flex;
}

.dropdown-menu a {
  padding: 12px 16px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.88rem;
  transition: var(--transition-fast);
}

.dropdown-menu a:hover {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
}

/* KPI Dashboard Cards */
.kpi-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.kpi-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition-normal);
}

.kpi-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-color-glow);
}

.kpi-icon {
  font-size: 2rem;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
  margin-bottom: 2px;
}

.kpi-value {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}

.kpi-subtext {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: block;
  margin-top: 4px;
}

.text-amber {
  color: var(--accent-amber);
}

.text-emerald {
  color: var(--accent-emerald);
}

.text-rose {
  color: var(--accent-rose);
}

/* Controls & Filters Section */
.controls-section {
  padding: 20px 24px;
  margin-bottom: 24px;
}

.search-box {
  position: relative;
  margin-bottom: 16px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  padding: 14px 44px 14px 48px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.95rem;
  font-family: var(--font-main);
  transition: var(--transition-fast);
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px var(--accent-purple-glow);
  background: rgba(0, 0, 0, 0.5);
}

.clear-search {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  display: none;
}

.search-box input:not(:placeholder-shown)+.clear-search {
  display: block;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.select-input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 8px 14px;
  font-size: 0.88rem;
  font-family: var(--font-main);
  outline: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.select-sm {
  padding: 6px 10px;
  font-size: 0.8rem;
}

.select-input:focus,
.select-input:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.view-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.toggle-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.toggle-btn.active {
  background: var(--accent-purple);
  color: #fff;
}

/* Results Header */
.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 4px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.last-sync-time {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Table View */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: 24px;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.orders-table th {
  background: rgba(0, 0, 0, 0.25);
  padding: 14px 18px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

.orders-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.orders-table tbody tr {
  transition: var(--transition-fast);
  cursor: pointer;
}

.orders-table tbody tr:hover {
  background: rgba(139, 92, 246, 0.06);
}

/* Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-delivered {
  background: var(--accent-emerald-bg);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-in_delivery,
.status-pending {
  background: var(--accent-amber-bg);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-refunded {
  background: var(--accent-rose-bg);
  color: var(--accent-rose);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-disputed {
  background: rgba(249, 115, 22, 0.2);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.type-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.type-badge.item {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
}

.type-badge.account {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
}

/* Table Specific Cell Styles */
.order-id-cell {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fff;
}

.title-cell {
  font-weight: 600;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.buyer-cell {
  color: var(--accent-cyan);
  font-weight: 500;
}

.price-cell {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fff;
}

.price-cell .usd-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 400;
}

/* Cards Grid View */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.order-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: var(--transition-normal);
  cursor: pointer;
}

.order-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-color-glow);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 6px 0;
  color: #fff;
}

.card-buyer {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.page-info {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Modal Overlay & Content */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 10, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
  width: 100%;
  max-width: 840px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 30px;
  background: #0f1525;
  border: 1px solid var(--border-color-glow);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--accent-rose);
}

.modal-header {
  margin-bottom: 18px;
  padding-right: 40px;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.modal-title-group h2 {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.modal-game-tag {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Modal Tabs */
.modal-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
  padding-bottom: 2px;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--accent-purple);
  border-bottom-color: var(--accent-purple);
}

.modal-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.detail-box {
  background: rgba(0, 0, 0, 0.3);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.detail-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.detail-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.detail-val.highlight {
  color: var(--accent-cyan);
}

.detail-val.price-val {
  font-family: var(--font-mono);
  color: var(--accent-emerald);
}

.detail-section {
  margin-bottom: 24px;
}

.detail-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.product-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.product-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  background: rgba(0, 0, 0, 0.2);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.credentials-section {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid var(--border-color-glow);
  padding: 18px;
  border-radius: var(--radius-md);
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.credentials-box {
  background: #080a12;
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: #a7f3d0;
  white-space: pre-wrap;
  word-break: break-all;
}

.cred-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.cred-row:last-child {
  border-bottom: none;
}

.cred-key {
  color: var(--text-muted);
  font-weight: 500;
}

.cred-val {
  color: #fff;
  font-weight: 700;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-main);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.gallery-grid img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-fast);
}

.gallery-grid img:hover {
  transform: scale(1.05);
  border-color: var(--accent-purple);
}

/* ==========================================================================
   CHAT SYSTEM STYLES
   ========================================================================== */
.chat-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.chat-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 38px;
  height: 38px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid var(--border-color-glow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.chat-user-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.chat-status-text {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.chat-messages-container {
  max-height: 380px;
  min-height: 250px;
  overflow-y: auto;
  padding: 16px;
  background: #090c16;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
  font-size: 0.9rem;
}

/* =============================================
   CHAT BUBBLES — WhatsApp-style left/right
   seller = nuestros mensajes (DERECHA)
   buyer  = mensaje del otro (IZQUIERDA)
   ============================================= */
.chat-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  overflow-y: auto;
  background: rgba(5, 8, 20, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.chat-bubble {
  max-width: 72%;
  padding: 10px 14px 8px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  position: relative;
  animation: slideUp 0.18s ease-out;
  display: flex;
  flex-direction: column;
  word-break: break-word;
}

/* Other person — LEFT */
.chat-bubble.buyer {
  align-self: flex-start;
  background: #1a2540;
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-bottom-left-radius: 2px;
  color: var(--text-main);
}

/* Us — RIGHT */
.chat-bubble.seller {
  align-self: flex-end;
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  border: none;
  border-bottom-right-radius: 2px;
  color: #fff;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
}

/* System messages — centered */
.chat-bubble.system {
  align-self: center;
  max-width: 90%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.bubble-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.bubble-sender {
  font-weight: 700;
  font-size: 0.76rem;
  opacity: 0.85;
}

.bubble-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 5px;
}

.bubble-time {
  font-size: 0.67rem;
  opacity: 0.65;
}

/* Read receipt icons */
.bubble-read {
  font-size: 0.7rem;
  letter-spacing: -2px;
  opacity: 0.5;
  line-height: 1;
  transition: opacity 0.3s;
}

.bubble-read.seen {
  opacity: 1;
  filter: drop-shadow(0 0 3px #06b6d4);
}

.bubble-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.88rem;
}

.bubble-attachment img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 10px;
  margin-top: 8px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── Attach / Camera Button Fix ── */
.btn-attach-img {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
  transition: all 0.2s;
}

.btn-attach-img:hover {
  background: rgba(124, 58, 237, 0.25);
  border-color: var(--accent-purple);
  color: #fff;
}

/* Chat Reply & Templates Box */
.chat-reply-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius-md);
}

.template-selector-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.chat-input-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.chat-input-row textarea {
  flex: 1;
  min-height: 60px;
  max-height: 120px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.9rem;
  resize: vertical;
}

.chat-input-row textarea:focus {
  outline: none;
  border-color: var(--accent-purple);
}

/* ==========================================================================
   FORTNITE FRIENDSHIP & 48H TRACKER STYLES
   ========================================================================== */
.fn-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 4px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-amber), var(--accent-emerald));
  border-radius: 10px;
  transition: width 0.4s ease-out;
}

.fn-badge-eligible {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;

}

.fn-badge-pending {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
}

.fn-friendship-banner {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Notes Section */
.notes-section textarea {
  width: 100%;
  min-height: 100px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.9rem;
  margin-bottom: 10px;
  resize: vertical;
}

.notes-section textarea:focus {
  outline: none;
  border-color: var(--accent-purple);
}

.notes-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notes-saved-msg {
  font-size: 0.82rem;
  color: var(--accent-emerald);
  opacity: 0;
  transition: opacity 0.3s;
}

.notes-saved-msg.show {
  opacity: 1;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--accent-purple);
  color: #fff;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 2000;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .filters-row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .select-input {
    width: 100%;
  }

  .modal-content {
    padding: 20px;
  }
}

/* ==========================================================================
   MULTI-PLATFORM SELECTOR & BADGES STYLES
   ========================================================================== */
.platform-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px 18px;
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
  gap: 12px;
}

.platform-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.plat-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.plat-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.plat-tab.active {
  background: var(--accent-purple-glow);
  color: #fff;
  border-color: var(--accent-purple);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.plat-icon {
  font-size: 1.05rem;
}

.plat-count {
  background: rgba(0, 0, 0, 0.4);
  color: var(--accent-cyan);
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
}

.u7-appid-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
}

.u7-label {
  color: var(--accent-cyan);
  font-weight: 700;
}

.u7-appid-badge code {
  font-family: var(--font-mono);
  color: #a5f3fc;
  font-size: 0.82rem;
}

.btn-copy-code {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px 4px;
}

.btn-copy-code:hover {
  color: #fff;
}

/* Platform Badges */
.plat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.plat-badge-gameboost {
  background: rgba(139, 92, 246, 0.15);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.plat-badge-u7 {
  background: rgba(6, 182, 212, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.plat-badge-revendedores {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.plat-badge-ffin46 {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   SCREENSHOT PASTE & ATTACHMENT PREVIEW STYLES
   ========================================================================== */
.chat-attachment-preview {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--accent-purple);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  animation: slideUp 0.2s ease-out;
}

.chat-attachment-preview img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.btn-remove-attachment {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.attachment-label {
  font-size: 0.8rem;
  color: var(--text-main);
  font-weight: 600;
}

.btn-icon {
  padding: 10px 14px;
  font-size: 1.1rem;
}

/* ==========================================================================
   RESELLER PORTAL & LIVE CHAT STYLES
   ========================================================================== */
.reseller-layout-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  margin-top: 14px;
}

.reseller-sidebar {
  padding: 14px;
  border-radius: var(--radius-md);
  max-height: 420px;
  overflow-y: auto;
}

.reseller-user-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reseller-user-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.reseller-user-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
}

.reseller-user-item.active {
  background: var(--accent-purple-glow);
  border-color: var(--accent-purple);
}

.reseller-item-name {
  font-weight: 700;
  font-size: 0.86rem;
  color: #fff;
}

.reseller-item-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.reseller-chat-room {
  padding: 14px;
  border-radius: var(--radius-md);
}

.status-available {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-sleeping {
  background: rgba(139, 92, 246, 0.2);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.status-busy {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* ==========================================================================
   ADMIN LOGIN STYLES
   ========================================================================== */
.admin-login-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(8px);
  z-index: 2000;
}

.admin-login-card {
  width: min(480px, calc(100vw - 32px));
  padding: 28px 26px 24px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.admin-login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 22px;
}

.admin-login-header h2 {
  margin-top: 12px;
  font-size: clamp(1.7rem, 2vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
}

.admin-login-header p {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.admin-logo {
  width: 58px;
  height: 58px;
  margin: 0 auto;
}

.admin-login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-login-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #e5e7eb;
  font-weight: 600;
  font-size: 0.88rem;
}

.admin-login-form input {
  width: 100%;
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  color: #fff !important;
  font-size: 0.94rem !important;
}

.admin-login-form input:focus {
  border-color: rgba(139, 92, 246, 0.8) !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18) !important;
  outline: none !important;
}

.admin-login-btn {
  margin-top: 6px;
  width: 100%;
  justify-content: center;
}