:root {
  --bg: #0a0a1a;
  --bg-card: #12122a;
  --bg-sidebar: #080814;
  --cyan: #00f0ff;
  --magenta: #ff00aa;
  --gold: #ffd700;
  --green: #39ff14;
  --text: #e0e0f0;
  --text-muted: #8888aa;
  --border: rgba(255,255,255,0.08);
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* Login */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #1a0a3e 0%, var(--bg) 70%);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo .logo-icon { font-size: 3rem; }
.login-logo h1 { font-family: var(--font-display); font-size: 1.2rem; color: var(--cyan); margin-top: 8px; }
.login-logo p { color: var(--text-muted); font-size: 0.9rem; }

.login-error { color: var(--magenta); font-size: 0.9rem; margin-bottom: 12px; }
.back-link { display: block; text-align: center; margin-top: 20px; color: var(--text-muted); font-size: 0.9rem; }
.back-link:hover { color: var(--cyan); }

/* Layout */
body:not(.login-page) {
  display: flex;
}

.sidebar {
  width: 240px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
}

.sidebar-brand span { font-size: 1.8rem; }
.sidebar-brand strong { display: block; font-size: 0.8rem; color: var(--cyan); }
.sidebar-brand small { font-size: 0.65rem; color: var(--text-muted); }

.sidebar-nav { flex: 1; padding: 16px 12px; }

.nav-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
  transition: 0.2s;
  margin-bottom: 4px;
}

.nav-item:hover { background: rgba(0,240,255,0.05); color: var(--text); }
.nav-item.active { background: rgba(0,240,255,0.1); color: var(--cyan); }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-footer a { color: var(--text-muted); font-size: 0.85rem; }
.sidebar-footer button { color: var(--magenta); font-size: 0.85rem; background: none; border: none; cursor: pointer; text-align: left; }

.admin-main {
  margin-left: 240px;
  flex: 1;
  padding: 24px 32px;
  min-height: 100vh;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.admin-header h2 { font-family: var(--font-display); font-size: 1.4rem; }
.admin-user { color: var(--text-muted); font-size: 0.9rem; }

.panel { display: none; }
.panel.active { display: block; }

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.stat-card.highlight { border-color: rgba(255,215,0,0.3); }
.stat-value { display: block; font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--cyan); }
.stat-card.highlight .stat-value { color: var(--gold); }
.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

.dashboard-recent {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.card h3 { font-family: var(--font-display); font-size: 0.85rem; margin-bottom: 16px; color: var(--cyan); }

.recent-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.recent-item:last-child { border-bottom: none; }
.recent-item strong { display: block; }
.recent-item span { color: var(--text-muted); font-size: 0.8rem; }

/* Table */
.panel-toolbar { margin-bottom: 16px; }

.table-wrap { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
}

.data-table th, .data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.data-table th {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: rgba(0,0,0,0.2);
}

.data-table tr:hover td { background: rgba(0,240,255,0.03); }

.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-neu { background: rgba(255,0,170,0.15); color: var(--magenta); }
.status-bearbeitet { background: rgba(255,215,0,0.15); color: var(--gold); }
.status-erledigt { background: rgba(57,255,20,0.15); color: var(--green); }
.status-bezahlt { background: rgba(57,255,20,0.15); color: var(--green); }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.8rem; color: var(--cyan); margin-bottom: 4px; font-family: var(--font-display); letter-spacing: 0.05em; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
}

.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--cyan); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.btn {
  display: inline-block;
  padding: 10px 20px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: 0.2s;
}

.btn-primary { background: rgba(0,240,255,0.15); border: 1px solid var(--cyan); color: var(--cyan); }
.btn-primary:hover { background: rgba(0,240,255,0.25); }
.btn-sm { padding: 4px 10px; font-size: 0.65rem; }
.btn-danger { color: var(--magenta); border: 1px solid rgba(255,0,170,0.3); background: none; }
.btn-danger:hover { background: rgba(255,0,170,0.1); }

.text-muted { color: var(--text-muted); font-size: 0.9rem; }
code { background: rgba(0,0,0,0.3); padding: 2px 6px; border-radius: 4px; font-size: 0.85rem; }

/* Upload */
.upload-form { display: flex; gap: 12px; align-items: center; margin: 16px 0; flex-wrap: wrap; }
.upload-form input[type="file"] { flex: 1; min-width: 200px; }

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.drop-zone {
  border: 2px dashed rgba(0, 240, 255, 0.3);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
  margin: 16px 0;
}

.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.05);
}

.drop-icon { font-size: 2.5rem; display: block; margin-bottom: 8px; }
.drop-zone p { font-weight: 600; margin-bottom: 4px; }
.drop-zone small { color: var(--text-muted); }

.selected-file {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.selected-file strong { color: var(--cyan); }

.assign-list { display: flex; flex-direction: column; gap: 12px; }

.assign-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.assign-row .song-name { font-weight: 600; font-size: 0.9rem; }
.assign-row select { padding: 8px; font-size: 0.85rem; }

.file-ok { color: var(--green); }
.file-missing { color: var(--magenta); }

.alert-warning {
  color: var(--gold);
  font-size: 0.9rem;
  padding: 12px 16px;
  background: rgba(255, 215, 0, 0.08);
  border-radius: 8px;
  margin-bottom: 16px;
}

.input-manual {
  margin-top: 6px;
  width: 100%;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.85rem;
}

.input-manual:focus { outline: none; border-color: var(--cyan); }

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.cover-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border);
}

.cover-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  font-size: 1.2rem;
  color: var(--text-muted);
}
.status-dot.missing { background: var(--magenta); box-shadow: 0 0 6px var(--magenta); }

.file-list { list-style: none; }
.file-list li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; display: flex; justify-content: space-between; }
.file-list code { color: var(--cyan); }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--bg-card);
  border: 1px solid rgba(0,240,255,0.2);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-family: var(--font-display); font-size: 0.95rem; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.1rem; cursor: pointer; }
.modal-body { padding: 24px; }

.inquiry-detail p { margin-bottom: 12px; }
.inquiry-detail .label { color: var(--cyan); font-size: 0.75rem; font-family: var(--font-display); }
.inquiry-detail .message-box { background: var(--bg); padding: 16px; border-radius: 8px; margin-top: 8px; white-space: pre-wrap; }
.inquiry-detail .delivery-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.inquiry-detail .delivery-link { word-break: break-all; font-size: 0.8rem; display: block; margin-top: 4px; }
.inquiry-modal { max-width: 680px; }
.inquiry-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.inquiry-images a {
  display: block;
  width: 120px;
}
.inquiry-images img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: block;
}
.inquiry-images span {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .sidebar { width: 100%; position: relative; min-height: auto; }
  body:not(.login-page) { flex-direction: column; }
  .admin-main { margin-left: 0; }
  .dashboard-recent { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .upload-grid { grid-template-columns: 1fr; }
  .assign-row { grid-template-columns: 1fr; }
}
