/* ============================================================
   admin.css – Obernauer Winterzauber Admin-Portal
   ============================================================ */

:root {
  --adm-bg:       #0F1923;
  --adm-sidebar:  #1A2D4A;
  --adm-card:     #1E3550;
  --adm-border:   rgba(200,220,240,0.1);
  --adm-text:     #E8F2FA;
  --adm-muted:    #8AAEC8;
  --adm-gold:     #E8B84B;
  --adm-success:  #2D7A4F;
  --adm-error:    #C0392B;
  --adm-warning:  #E67E22;
  --adm-radius:   10px;
  --adm-sidebar-w: 260px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--adm-bg);
  color: var(--adm-text);
  min-height: 100vh;
  display: flex;
}

/* ─── Sidebar ──────────────────────────────────────────────── */
.adm-sidebar {
  width: var(--adm-sidebar-w);
  background: var(--adm-sidebar);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 50;
  transition: transform 0.3s ease;
  overflow-y: auto;
}
@media (max-width: 768px) {
  .adm-sidebar { transform: translateX(-100%); }
  .adm-sidebar.open { transform: translateX(0); }
}

.adm-logo {
  padding: 1.5rem;
  border-bottom: 1px solid var(--adm-border);
}
.adm-logo h1 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--adm-gold);
  line-height: 1.2;
}
.adm-logo span {
  font-size: 0.75rem;
  color: var(--adm-muted);
  display: block;
  margin-top: 0.2rem;
}

.adm-nav { flex: 1; padding: 1rem 0; }
.adm-nav-section {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--adm-muted);
  padding: 1rem 1.5rem 0.4rem;
}
.adm-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.5rem;
  color: rgba(232,242,250,0.75);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}
.adm-nav a:hover { color: var(--adm-text); background: rgba(255,255,255,0.04); }
.adm-nav a.active { color: var(--adm-gold); border-left-color: var(--adm-gold); background: rgba(232,184,75,0.08); }
.adm-nav .icon { font-size: 1.1rem; width: 1.25rem; text-align: center; flex-shrink: 0; }

.adm-user {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--adm-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}
.adm-user .avatar {
  width: 36px; height: 36px;
  background: var(--adm-gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: var(--adm-sidebar);
  font-size: 1rem;
  flex-shrink: 0;
}
.adm-user .name { font-weight: 600; color: var(--adm-text); font-size: 0.875rem; }
.adm-user .logout { color: var(--adm-muted); font-size: 0.8rem; text-decoration: none; }
.adm-user .logout:hover { color: var(--adm-error); }

/* ─── Main Content ─────────────────────────────────────────── */
.adm-main {
  flex: 1;
  margin-left: var(--adm-sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
@media (max-width: 768px) { .adm-main { margin-left: 0; } }

.adm-topbar {
  background: var(--adm-sidebar);
  border-bottom: 1px solid var(--adm-border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky; top: 0; z-index: 40;
}
.adm-topbar h2 { font-size: 1.1rem; font-weight: 600; }
.adm-topbar .breadcrumb { font-size: 0.8rem; color: var(--adm-muted); }

.adm-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--adm-text);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
}
@media (max-width: 768px) { .adm-mobile-toggle { display: block; } }

.adm-content { padding: 2rem 1.5rem; flex: 1; }
@media (min-width: 1024px) { .adm-content { padding: 2rem 2.5rem; } }

/* ─── Cards ────────────────────────────────────────────────── */
.adm-card {
  background: var(--adm-card);
  border-radius: var(--adm-radius);
  border: 1px solid var(--adm-border);
  overflow: hidden;
}
.adm-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--adm-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.adm-card-header h3 { font-size: 0.95rem; font-weight: 600; }
.adm-card-body { padding: 1.5rem; }

/* Dashboard Stat Cards */
.adm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.adm-stat {
  background: var(--adm-card);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 1.5rem;
}
.adm-stat .value { font-size: 1.75rem; font-weight: 700; color: var(--adm-gold); }
.adm-stat .label { font-size: 0.8rem; color: var(--adm-muted); margin-top: 0.25rem; }
.adm-stat .icon  { font-size: 1.5rem; margin-bottom: 0.5rem; }

/* ─── Table ────────────────────────────────────────────────── */
.adm-table-wrap { overflow-x: auto; }
.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.adm-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--adm-muted);
  border-bottom: 1px solid var(--adm-border);
  white-space: nowrap;
}
.adm-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--adm-border);
  vertical-align: middle;
}
.adm-table tr:last-child td { border-bottom: none; }
.adm-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ─── Buttons ──────────────────────────────────────────────── */
.adm-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: none;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.adm-btn-primary { background: var(--adm-gold); color: #0D1B2E; }
.adm-btn-primary:hover { background: #F5D278; }
.adm-btn-success { background: var(--adm-success); color: white; }
.adm-btn-success:hover { background: #369160; }
.adm-btn-danger  { background: var(--adm-error); color: white; }
.adm-btn-danger:hover  { background: #e04030; }
.adm-btn-outline { background: transparent; border: 1.5px solid var(--adm-border); color: var(--adm-text); }
.adm-btn-outline:hover { border-color: var(--adm-gold); color: var(--adm-gold); }
.adm-btn-sm { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
.adm-btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }

/* ─── Forms ────────────────────────────────────────────────── */
.adm-form-group  { margin-bottom: 1.25rem; }
.adm-form-label  { display: block; font-size: 0.8rem; font-weight: 600; color: var(--adm-muted); margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.05em; }
.adm-form-control {
  width: 100%;
  padding: 0.6rem 0.875rem;
  background: rgba(200,220,240,0.06);
  border: 1.5px solid var(--adm-border);
  border-radius: 8px;
  color: var(--adm-text);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}
.adm-form-control:focus { border-color: var(--adm-gold); }
.adm-form-control option { background: var(--adm-card); }
textarea.adm-form-control { min-height: 120px; resize: vertical; }
.adm-form-hint { font-size: 0.78rem; color: var(--adm-muted); margin-top: 0.3rem; }
.adm-form-error { font-size: 0.8rem; color: var(--adm-error); margin-top: 0.3rem; }
.adm-form-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 1rem; }

/* ─── Badges ────────────────────────────────────────────────── */
.adm-badge {
  display: inline-flex;
  padding: 0.15rem 0.6rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.adm-badge-success { background: rgba(45,122,79,.25); color: #4CAF7D; }
.adm-badge-warning { background: rgba(230,126,34,.25); color: #F0A050; }
.adm-badge-muted   { background: rgba(138,174,200,.15); color: var(--adm-muted); }
.adm-badge-gold    { background: rgba(232,184,75,.2); color: var(--adm-gold); }

/* ─── Dropzone ──────────────────────────────────────────────── */
.adm-dropzone {
  border: 2px dashed var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--adm-muted);
}
.adm-dropzone:hover, .adm-dropzone.dragover {
  border-color: var(--adm-gold);
  background: rgba(232,184,75,.06);
  color: var(--adm-gold);
}
.adm-dropzone input[type=file] { display: none; }
.adm-dropzone .icon { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; }

/* ─── Upload-Vorschau ───────────────────────────────────────── */
.adm-img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.adm-img-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  background: rgba(255,255,255,.05);
}
.adm-img-item img { width: 100%; height: 100%; object-fit: cover; }
.adm-img-item .del {
  position: absolute;
  top: 4px; right: 4px;
  background: rgba(192,57,43,.9);
  border: none;
  color: white;
  width: 24px; height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Alerts ────────────────────────────────────────────────── */
.adm-alert {
  padding: 0.9rem 1.25rem;
  border-radius: var(--adm-radius);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.adm-alert-success { background: rgba(45,122,79,.2); border: 1px solid rgba(45,122,79,.4); }
.adm-alert-error   { background: rgba(192,57,43,.2); border: 1px solid rgba(192,57,43,.4); }
.adm-alert-warning { background: rgba(230,126,34,.2); border: 1px solid rgba(230,126,34,.4); }

/* ─── Responsive Grid ─────────────────────────────────────── */
.adm-grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .adm-grid-2 { grid-template-columns: 1fr 1fr; } }

/* ─── Dynamic List (Performers/Food) ─────────────────────── */
.adm-dynamic-list { display: flex; flex-direction: column; gap: 0.5rem; }
.adm-dynamic-item {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: rgba(255,255,255,.04);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
}
.adm-dynamic-item input { flex: 1; min-width: 0; }
.adm-dynamic-item select {
  flex: 0 0 min(220px, 42%);
  max-width: 220px;
  font-size: 0.85rem;
}

/* ─── Login Page ────────────────────────────────────────────── */
.adm-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0D1B2E, #1A2D4A);
  padding: 2rem;
}
.adm-login-card {
  background: #1E3550;
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  border: 1px solid rgba(200,220,240,0.1);
}
.adm-login-card h1 { font-size: 1.5rem; color: var(--adm-gold); margin-bottom: 0.25rem; }
.adm-login-card p  { font-size: 0.875rem; color: var(--adm-muted); margin-bottom: 2rem; }
