/* ===============================================
   Astravon Mercura — Admin Panel Styles
   Author: House Astravon
   =============================================== */

/* Main Admin Container */
.admin-panel {
  max-width: 1600px;
  margin: 2rem auto;
  padding: 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  font-family: 'Poppins', sans-serif;
  color: var(--text-primary);
  background-color: #f8f9fa;
}

.admin-nav {
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin-bottom: 20px;
}

.admin-nav .tab-btn {
  background: #e0e0e0;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}
.admin-nav .tab-btn.active,
.admin-nav .tab-btn:hover {
  background: #0077ff;
  color: white;
}

/* Header Section */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.admin-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #222;
}

.admin-header p {
  margin: 5px 0 0;
  color: #555;
}

.admin-header .stats {
  display: flex;
  gap: 1.5rem;
}

.stat-card {
  background-color: #ffffff;
  border-radius: var(--border-radius);
  padding: 1rem 1.5rem;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.stat-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-card p {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.vendor-create-section,
.chart-card {
  background: white;
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Admin Table Styles */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.95rem;
  background-color: #ffffff;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.data-table thead {
  background: #0077ff;
  color: white;
}

.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
}

.admin-table th {
  background-color: var(--primary-color);
  color: #ffffff;
  font-weight: 600;
}

.data-table tbody tr {
  border-bottom: 1px solid #e0e0e0;
}

.admin-table tr:nth-child(even) {
  background: #f6f8fa;
}


.admin-table tr:hover {
  background-color: #e3f2ff;
}

/* Action Buttons */
.admin-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.admin-btn.edit {
  background-color: #0d6efd;
  color: #ffffff;
}

.admin-btn.edit:hover {
  background-color: #0b5ed7;
}

.admin-btn.delete {
  background-color: #dc3545;
  color: #ffffff;
}

.admin-btn.delete:hover {
  background-color: #b02a37;
}

.admin-btn.add {
  background-color: var(--accent-color);
  color: #ffffff;
}

.admin-btn.add:hover {
  background-color: #ffb700;
}

/* Action buttons in tables */
.data-table button {
  background: #f0f0f0;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.data-table button:hover {
  background: #0077ff;
  color: white;
}

/* ============================= */
/* 📝 Forms inside tables and sections */
/* ============================= */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 8px 12px;
  margin-top: 4px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: all 0.2s;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #0077ff;
  box-shadow: 0 0 3px rgba(0, 119, 255, 0.5);
}

/* Buttons
button.btn {
  background: #0077ff;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
button.btn:hover {
  background: #005ecc;
} */

.tab-content {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tab-content.active {
  display: block;
  opacity: 1;
}

.tab-content.hidden {
  display: none;
}

.tab-btn.active {
  background-color: var(--accent-color, #4a90e2);
  color: #042c44;
  border: 1px solid var(--accent-color, #4a90e2);
}

.promotion-section {
  background: #ffffff;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.promotion-section h2 {
  color: #00b894;
}

.promotion-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.promotion-form input,
.promotion-form select {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #1e1e1e;
  color: #fff;
}

.promotion-result p.success {
  color: #00ff9d;
  font-weight: bold;
}

.promotion-result p.error {
  color: #ff4d4d;
  font-weight: bold;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.modal.hidden { display: none; }
.modal-content {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  width: 420px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.modal-content label {
  display: block;
  margin-top: 0.8rem;
  font-weight: 500;
}
.modal-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}


/* Sidebar Navigation */
.admin-sidebar {
  background-color: #ffffff;
  border-radius: var(--border-radius);
  padding: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  width: 280px;
}

.admin-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.admin-sidebar ul li {
  margin-bottom: 1rem;
}

.admin-sidebar ul li a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  transition: color 0.3s ease;
}

.admin-sidebar ul li a:hover {
  color: var(--accent-color);
}

/* Responsive Layout */
@media (max-width: 1200px) {
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .admin-header .stats {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.5rem 0.75rem;
  }
}

@media (max-width: 768px) {
  .admin-panel {
    padding: 1rem;
  }

  .admin-sidebar {
    width: 100%;
    margin-bottom: 1rem;
  }
}
