/* Admin Base Styles - plain CSS */

:root {
  --bg: #0b0f14;
  --card: #111827;
  --border: #1f2937;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #22d3ee;
  --accent2: #f59e0b;
  --ok: #10b981;
  --err: #ef4444;
}

body, html, .admin-container {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.admin-container {
  display: flex;
}

/* Sidebar */
.sidebar {
  width: 200px;
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.15s, color 0.15s;
  font-size: 0.95rem;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.sidebar-nav a.active {
  background: rgba(34, 211, 238, 0.15);
  color: var(--accent);
  font-weight: 600;
}

.sidebar-nav a[target="_blank"] {
  margin-top: auto;
}

.sidebar-nav a#logout-link {
  color: var(--err);
}

.sidebar-nav a#logout-link:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* Main content */
.main-content {
  flex: 1;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Headers */
page-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 8px;
}

.last-updated {
  color: var(--muted);
  font-size: 0.9rem;
}

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

/* Cards */
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.stat-card h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 8px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--accent);
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--card);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.stat-card table {
  border-collapse: separate;
  border-spacing: 0;
}

/* Login page */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 16px;
}

.login-container h1 {
  font-size: 1.75rem;
  color: var(--accent);
  margin-bottom: 8px;
}

.login-container p {
  color: var(--muted);
  margin-bottom: 24px;
}

.login-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  background: white;
  color: #0b0f14;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.15s, opacity 0.15s;
}

.login-btn:hover {
  opacity: 0.95;
}

/* Editor page styles (in editor.html) */
.editor-form {
  max-width: 800px;
  margin: 0 auto;
}

.editor-form .form-group {
  margin-bottom: 16px;
}

.editor-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.editor-form input[type="text"],
.editor-form textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.editor-form textarea {
  min-height: 300px;
  resize: vertical;
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
}

.editor-form button {
  display: inline-block;
  padding: 8px 20px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.editor-form button:hover {
  opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
  .admin-container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  .main-content {
    padding: 16px;
  }
  .stats-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

@media (max-width: 480px) {
  .sidebar {
    padding: 12px;
  }
  .sidebar-nav a {
    padding: 6px 10px;
    font-size: 0.85rem;
  }
  .stat-value {
    font-size: 1.5rem;
  }
}

/* Utility */
.text-center { text-align: center; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }

/* Admin Edit Button - visible on song pages */
.admin-edit-btn {
  display: none;
}

.admin-edit-btn a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #22d3ee;
  color: #0b0f14;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  transition: opacity 0.15s, transform 0.1s;
  box-shadow: 0 2px 8px rgba(34, 211, 238, 0.3);
}

.admin-edit-btn a:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}