* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #0a0a0a;
  color: #e0e0e0;
  font-family: Georgia, serif;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: #4a9eff;
  text-decoration: none;
}

a:hover {
  color: #7ab8ff;
}

/* Admin Navigation */
.admin-nav {
  background: #111;
  border-bottom: 1px solid #222;
  padding: 0 20px;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: bold;
  color: #e0e0e0 !important;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: #999;
  font-size: 0.9rem;
}

.nav-links a:hover {
  color: #e0e0e0;
}

.admin-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* Dashboard */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.dashboard-header h1 {
  font-size: 1.6rem;
  font-weight: normal;
}

.station-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.station-card {
  background: #151515;
  border: 1px solid #222;
  border-radius: 8px;
  padding: 20px;
  transition: border-color 0.2s;
}

.station-card:hover {
  border-color: #333;
}

.station-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.station-card-header h2 {
  font-size: 1.2rem;
  font-weight: normal;
  color: #e0e0e0;
}

.show-count {
  font-size: 0.8rem;
  color: #888;
  background: #222;
  padding: 2px 10px;
  border-radius: 12px;
}

.station-slug {
  font-size: 0.85rem;
  color: #666;
  font-family: 'Courier New', monospace;
  margin-bottom: 10px;
}

.station-desc {
  font-size: 0.9rem;
  color: #999;
  margin-bottom: 15px;
}

.station-card-actions {
  margin-top: 10px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-family: Georgia, serif;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.btn-primary {
  background: #4a9eff;
  color: #fff;
}

.btn-primary:hover {
  background: #3a8eef;
  color: #fff;
}

.btn-secondary {
  background: #222;
  color: #e0e0e0;
  border: 1px solid #333;
}

.btn-secondary:hover {
  background: #2a2a2a;
  color: #e0e0e0;
}

.btn-danger {
  background: #cc3333;
  color: #fff;
}

.btn-danger:hover {
  background: #aa2222;
  color: #fff;
}

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

/* Forms */
.form-page {
  max-width: 700px;
}

.admin-form {
  margin-top: 20px;
}

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

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: #ccc;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  background: #111;
  border: 1px solid #333;
  border-radius: 4px;
  color: #e0e0e0;
  font-family: Georgia, serif;
  font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #4a9eff;
}

.form-group textarea {
  resize: vertical;
  min-height: 60px;
}

.form-group small {
  display: block;
  margin-top: 4px;
  color: #666;
  font-size: 0.8rem;
}

.form-row {
  display: flex;
  gap: 15px;
}

.form-row .form-group {
  flex: 1;
}

.form-actions {
  margin-top: 25px;
  display: flex;
  gap: 10px;
}

.field-error {
  color: #ff4444;
  font-size: 0.85rem;
  margin-top: 4px;
}

/* Tables */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.admin-table th {
  text-align: left;
  padding: 12px 15px;
  border-bottom: 2px solid #222;
  color: #888;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.admin-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #1a1a1a;
  font-size: 0.95rem;
}

.admin-table tr:hover td {
  background: #111;
}

.actions-cell {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Login */
.admin-body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.login-container {
  background: #151515;
  border: 1px solid #222;
  border-radius: 8px;
  padding: 40px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.login-container h1 {
  font-size: 1.3rem;
  margin-bottom: 5px;
  color: #e0e0e0;
}

.login-container h2 {
  font-size: 1rem;
  color: #888;
  font-weight: normal;
  margin-bottom: 25px;
}

.login-container .form-group {
  text-align: left;
}

.login-container .btn {
  width: 100%;
  margin-top: 10px;
}

/* Error Messages */
.error-message {
  background: #2a1111;
  border: 1px solid #cc3333;
  color: #ff6666;
  padding: 10px 15px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.back-link {
  margin-bottom: 15px;
}

.back-link a {
  color: #666;
  font-size: 0.9rem;
}

.back-link a:hover {
  color: #999;
}

/* Listener Page styles are in listener.ejs <style> block */

/* Responsive */
@media (max-width: 768px) {
  .station-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .admin-table {
    font-size: 0.85rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 8px 10px;
  }
}
