/* advtracks Admin Styles - matching public site dark theme */

/* =========================================
   Admin Layout & Structure 
   ========================================= */

body.site-admin {
  scrollbar-gutter: stable;
  overflow-y: scroll;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Main content wrapper */
.admin-main {
  flex: 1;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* =========================================
   Admin Container (inside main)
   ========================================= */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid #2a2f36;
}

/* =========================================
   Admin Tabs
   ========================================= */

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 0;
  border-bottom: 2px solid #2a2f36;
  padding: 0 0 0 0;
}

.admin-tabs .tab {
  padding: 12px 24px;
  background: #1a2028;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px 8px 0 0;
  border: 1px solid #2a2f36;
  border-bottom: none;
  font-weight: 500;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.admin-tabs .tab:hover {
  background: #252d38;
  color: var(--text);
}

.admin-tabs .tab.active {
  background: var(--panel);
  color: var(--accent);
  font-weight: 700;
  border-color: #2a2f36;
  border-bottom: 2px solid var(--panel);
}

/* =========================================
   Admin Tab Content
   ========================================= */

.admin-tab-content {
  background: var(--panel);
  padding: 24px;
  border: 1px solid #2a2f36;
  border-top: none;
  border-radius: 0 0 12px 12px;
  color: var(--text);
}

.admin-tab-content h1 {
  margin: 0 0 16px 0;
  color: var(--text);
  font-size: 1.5em;
}

.admin-tab-content h2 {
  margin: 24px 0 12px 0;
  color: var(--text);
  font-size: 1.25em;
  border-bottom: 1px solid #2a2f36;
  padding-bottom: 8px;
}

.admin-tab-content h3 {
  margin: 16px 0 12px 0;
  color: var(--text);
}

.admin-tab-content p {
  color: var(--text);
  line-height: 1.6;
}

/* =========================================
   Tables
   ========================================= */

.admin-tab-content table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.admin-tab-content table th,
.admin-tab-content table td {
  padding: 12px;
  border: 1px solid #2a2f36;
  text-align: left;
  color: var(--text);
}

.admin-tab-content table th {
  background: #1a2028;
  color: var(--text);
  font-weight: 700;
}

.admin-tab-content table tr:hover {
  background: rgba(249, 115, 22, 0.05);
}

/* =========================================
   Status Badges
   ========================================= */

.status-badge {
  padding: 4px 10px;
  border-radius: 6px;
  color: #fff;
  font-weight: 600;
  font-size: 0.85em;
  display: inline-block;
}

.status-approved {
  background: var(--green);
}

.status-pending {
  background: var(--yellow);
  color: #111;
}

.status-rejected {
  background: var(--red);
}

.status-badge.active {
  background: var(--green);
}

.status-badge.inactive {
  background: #6c757d;
}

/* =========================================
   Cards (for forms)
   ========================================= */

.card {
  background: #1a2028;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #2a2f36;
  margin-bottom: 16px;
}

.card h3 {
  margin: 0 0 12px 0;
  color: var(--text);
}

/* =========================================
   Alerts
   ========================================= */

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin: 12px 0;
  font-weight: 500;
}

.alert.success {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
  border: 1px solid #4caf50;
}

.alert.danger {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
  border: 1px solid #f44336;
}

/* =========================================
   Grid Layout
   ========================================= */

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

/* =========================================
   Hints & Helper Text
   ========================================= */

.hint {
  font-size: 0.85em;
  color: var(--muted);
  margin-top: 8px;
}

code {
  background: #1a2028;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  color: var(--accent);
}

/* =========================================
   Ads Management Styles
   ========================================= */

.ad-section {
  margin-bottom: 32px;
}

.ad-section h3 {
  margin: 0 0 8px 0;
}

.ad-info {
  font-size: 0.9em;
  color: var(--muted);
  margin-bottom: 16px;
}

.ads-table {
  width: 100%;
}

.ads-table img {
  border-radius: 4px;
}

.no-ads {
  color: var(--muted);
  font-style: italic;
}

.add-ad-form {
  margin-top: 20px;
  padding: 16px;
  background: #1a2028;
  border-radius: 8px;
  border: 1px solid #2a2f36;
}

.add-ad-form h4 {
  margin: 0 0 16px 0;
  color: var(--text);
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-weight: 500;
}

.btn-delete {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
}

.btn-delete:hover {
  opacity: 0.9;
}

/* =========================================
   Admin Users Tab Styles
   ========================================= */

.admin-users-tab .card {
  margin-bottom: 20px;
}

.admin-users-tab h3 {
  margin: 0 0 12px 0;
}

/* =========================================
   Photo Gallery in Track Edit
   ========================================= */

.photo-thumbnail {
  max-width: 120px;
  max-height: 80px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s;
}

.photo-thumbnail:hover {
  transform: scale(1.05);
}

/* =========================================
   Responsive
   ========================================= */

@media (max-width: 768px) {
  .admin-main {
    padding: 12px;
  }
  
  .container {
    padding: 12px;
  }
  
  .admin-tabs {
    flex-wrap: wrap;
  }
  
  .admin-tabs .tab {
    padding: 10px 16px;
    font-size: 0.9em;
  }
  
  .admin-tab-content {
    padding: 16px;
  }
}
