/* ============================================================
   ADMIN PANEL STYLES – Jakob Firus Bewerbungsseite
   ============================================================ */

/* ── Layout ── */
.admin-body { background: #F0F4F8; overflow-x: hidden; }

.admin-layout {
  margin-left: 260px;
  min-height: 100vh;
  transition: margin-left 0.3s;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 260px;
  background: linear-gradient(180deg, #1A3C4E 0%, #153141 100%);
  color: white;
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform 0.3s;
}
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800; flex-shrink: 0;
}
.sidebar-name { display: block; font-weight: 700; font-size: 0.95rem; }
.sidebar-role { display: block; font-size: 0.75rem; color: rgba(255,255,255,0.5); }
.sidebar-close { display: none; background: none; border: none; color: rgba(255,255,255,0.5); cursor: pointer; margin-left: auto; font-size: 1.1rem; }

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}
.sidebar-section {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  padding: 16px 10px 8px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 2px;
}
.sidebar-link:hover { background: rgba(255,255,255,0.08); color: white; }
.sidebar-link.active { background: rgba(72, 155, 201, 0.25); color: var(--primary-light); }
.nav-icon { font-size: 1rem; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logout {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: color 0.2s;
}
.sidebar-logout:hover { color: #FF6B6B; }

/* ── Topbar ── */
.admin-topbar {
  height: 64px;
  background: white;
  border-bottom: 1px solid #E2EAF0;
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text);
}
.topbar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  flex: 1;
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-light);
  font-weight: 500;
}
.user-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #22C55E;
}

/* ── Main content ── */
.admin-main { padding: 28px; }

/* ── Alerts ── */
.alert {
  padding: 12px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}
.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-error, .alert-danger { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.alert-info { background: #DBEAFE; color: #1E40AF; border: 1px solid #BFDBFE; }

/* ── Stats row ── */
.stats-row-admin {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.stat-card {
  background: white;
  border: 1px solid #E2EAF0;
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-card-icon { font-size: 1.6rem; margin-bottom: 10px; }
.stat-card-num { font-size: 2.4rem; font-weight: 800; color: var(--primary-dark); line-height: 1; }
.stat-card-label { font-size: 0.82rem; color: var(--text-light); margin-top: 6px; }
.qr-stat-card { grid-column: span 1; }
.dash-qr { max-width: 100px; margin: 0 auto 8px; display: block; }

/* ── Section card ── */
.section-card {
  background: white;
  border: 1px solid #E2EAF0;
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.section-card-header { margin-bottom: 20px; }
.section-card-header h2 { font-size: 1.1rem; margin: 0; }
.section-card-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-card-header-flex h2 { font-size: 1.1rem; margin: 0; }

/* ── Access URL ── */
.dash-access-box {
  background: white;
  border: 1px solid #E2EAF0;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
}
.dash-access-box label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 10px;
}
.url-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.url-row input {
  flex: 1;
  min-width: 200px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-family: monospace;
  background: var(--bg);
  color: var(--text);
}

/* ── Table ── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.admin-table th {
  text-align: left;
  padding: 10px 14px;
  background: #F8FAFB;
  border-bottom: 2px solid #E2EAF0;
  font-weight: 600;
  color: var(--text-light);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #F0F4F8;
  color: var(--text);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #F8FAFB; }
.ua-cell { font-size: 0.78rem; color: var(--text-light); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-row { text-align: center; color: var(--text-light); padding: 32px !important; }
.actions-cell { white-space: nowrap; }

/* ── Badges ── */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
}
.badge-green { background: #D1FAE5; color: #065F46; }
.badge-blue  { background: #DBEAFE; color: #1E40AF; }
.badge-grey  { background: #F3F4F6; color: #6B7280; }
.badge-purple{ background: #EDE9FE; color: #5B21B6; }

/* ── Buttons ── */
.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1.5px solid var(--primary);
  color: var(--primary-dark);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-sm:hover { background: var(--primary); color: white; }
.btn-danger-sm {
  border-color: #FECACA;
  color: #DC2626;
  background: transparent;
}
.btn-danger-sm:hover { background: #DC2626; color: white; border-color: #DC2626; }
.btn-block { width: 100%; justify-content: center; }
.btn-ghost-dark {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  border-radius: 8px;
  border: 1.5px solid #D1D5DB;
  color: var(--text);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-ghost-dark:hover { background: #F3F4F6; }
.btn-danger {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  border-radius: 8px;
  background: #DC2626;
  color: white;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-danger:hover { background: #B91C1C; }

/* ── Forms ── */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group textarea {
  width: 100%;
  border: 1.5px solid #D1D5DB;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  color: var(--dark);
  background: white;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(72,155,201,0.12);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-hint { display: block; font-size: 0.78rem; color: var(--text-light); margin-top: 5px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0 24px;
}
.form-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--primary);
}
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #F0F4F8;
}

/* ── QR ── */
.qr-preview-box {
  text-align: center;
  background: #F8FAFB;
  border: 2px solid #E2EAF0;
  border-radius: var(--radius);
  padding: 24px;
}
.qr-preview-img { max-width: 200px; display: block; margin: 0 auto; }
.two-col-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: start;
}
.color-input-wrap { display: flex; align-items: center; gap: 12px; }
.color-picker { width: 44px; height: 38px; border: 1.5px solid #D1D5DB; border-radius: 6px; padding: 2px; cursor: pointer; }
.color-text { flex: 1; font-family: monospace; }
.danger-zone { border: 1.5px solid #FECACA; background: #FFF5F5; }
.danger-zone p { font-size: 0.88rem; color: var(--text-light); margin-bottom: 16px; }

/* ── Quick links ── */
.quick-links { margin-top: 24px; }
.quick-links h3 { font-size: 0.95rem; margin-bottom: 14px; color: var(--text-light); font-weight: 600; }
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  background: white;
  border: 1.5px solid #E2EAF0;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  font-size: 1.6rem;
}
.quick-card span { font-size: 0.83rem; }
.quick-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ── Level range ── */
.level-input-row { display: flex; align-items: center; gap: 12px; }
.level-input-row input[type="range"] { flex: 1; accent-color: var(--primary); }

/* ── Mini bar ── */
.mini-bar {
  display: inline-block;
  width: 60px;
  height: 5px;
  background: var(--border);
  border-radius: 50px;
  overflow: hidden;
  vertical-align: middle;
  margin-right: 4px;
}
.mini-bar div { height: 100%; background: var(--primary); border-radius: 50px; }

/* ── Login page ── */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #EEF7FC 0%, #C8E8F5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.login-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 52px 44px;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.login-logo { margin-bottom: 20px; }
.login-title { font-size: 1.6rem; margin-bottom: 6px; }
.login-subtitle { color: var(--text-light); font-size: 0.9rem; margin-bottom: 28px; }
.login-form { text-align: left; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.5;
}
.pw-toggle:hover { opacity: 1; }

/* ── Google Login button ── */
.login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--text-light); font-size: 0.82rem;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 16px;
  background: white; border: 1.5px solid var(--border);
  border-radius: 10px; font-size: 0.92rem; font-weight: 600;
  color: var(--dark); text-decoration: none; cursor: pointer;
  transition: all 0.2s; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.btn-google:hover { border-color: #4285F4; box-shadow: 0 2px 10px rgba(66,133,244,0.15); }

/* ── Payment cards ── */
.payment-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px;
}
.payment-card {
  background: white; border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow 0.2s;
}
.payment-card:hover { box-shadow: var(--shadow-md); }
.payment-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #f8fafb, #eef7fc);
}
.payment-provider-logo {
  display: flex; align-items: center; gap: 12px;
}
.payment-provider-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 800;
}
.payment-provider-icon.paypal   { background: #003087; color: #009cde; }
.payment-provider-icon.stripe   { background: #635bff; color: white; }
.payment-provider-icon.googlepay{ background: white; border: 1px solid #e0e0e0; color: #4285f4; }
.payment-provider-icon.amazonpay{ background: #FF9900; color: white; }
.payment-provider-icon.klarna   { background: #FFB3C7; color: #17120E; }
.payment-provider-icon.sepa     { background: #003399; color: white; }
.payment-provider-name { font-size: 1rem; font-weight: 700; color: var(--dark); }
.payment-toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.payment-toggle input { opacity: 0; width: 0; height: 0; }
.payment-toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #cdd5df; border-radius: 12px; transition: 0.25s;
}
.payment-toggle-slider::before {
  content: ''; position: absolute; width: 18px; height: 18px;
  left: 3px; top: 3px; border-radius: 50%;
  background: white; transition: 0.25s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.payment-toggle input:checked + .payment-toggle-slider { background: var(--primary); }
.payment-toggle input:checked + .payment-toggle-slider::before { transform: translateX(20px); }
.payment-card-body { padding: 20px 22px; }
.payment-badge-enabled {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 3px 10px; border-radius: 50px;
}
.payment-badge-enabled.on  { background: #ECFDF5; color: #059669; }
.payment-badge-enabled.off { background: #F3F4F6; color: #9CA3AF; }
.payment-save-btn {
  margin-top: 16px; width: 100%;
  padding: 10px; border-radius: 10px;
  border: none; background: var(--primary); color: white;
  font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: background 0.2s;
}
.payment-save-btn:hover { background: var(--primary-dark); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .two-col-layout { grid-template-columns: 1fr; }
  .admin-layout { margin-left: 0; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: block; }
  .sidebar-close { display: block; }
}
@media (max-width: 640px) {
  .admin-main { padding: 16px; }
  .stats-row-admin { grid-template-columns: 1fr 1fr; }
  .form-actions { flex-direction: column; }
}
