/* ==========================================================================
   Admin Backend Portal Layout & Component Styling (admin.css)
   ========================================================================== */

.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 850px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
}

/* Sidebar Navigation */
.admin-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition-fast);
  margin-bottom: 0.4rem;
}

.admin-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.admin-nav-item.active {
  background: rgba(0, 229, 255, 0.12);
  color: var(--primary);
  border: 1px solid rgba(0, 229, 255, 0.3);
  font-weight: 600;
}

.nav-icon {
  font-size: 1.1rem;
}

/* Admin Main Content Area */
.admin-content {
  min-height: 500px;
}

.admin-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-actions {
  display: flex;
  gap: 0.75rem;
}

/* Data Table */
.data-table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

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

.data-table th {
  background: rgba(18, 25, 41, 0.9);
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.data-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Dropzone & Import Modal */
.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: rgba(18, 25, 41, 0.5);
  cursor: pointer;
  transition: var(--transition-fast);
  margin-bottom: 1.25rem;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: rgba(0, 229, 255, 0.05);
}

.dropzone-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.dropzone-text {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.dropzone-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.json-textarea {
  width: 100%;
  height: 200px;
  background: #090d16;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #00e5ff;
  font-family: monospace;
  font-size: 0.85rem;
  padding: 0.8rem;
  outline: none;
  resize: vertical;
}

.json-textarea:focus {
  border-color: var(--primary);
}

/* Stats Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Responsive Media Queries for Admin Module
   ========================================================================== */

@media (max-width: 850px) {
  .admin-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .admin-sidebar {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem;
    gap: 0.5rem;
    border-radius: var(--radius-md);
  }

  .admin-nav-item {
    margin-bottom: 0;
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .admin-header-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .admin-actions {
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
  }

  .admin-actions button {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-card {
    padding: 0.9rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .data-table th, .data-table td {
    padding: 0.65rem 0.6rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

