* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

html, body {
  width: 100%;
  min-height: 100%;
}

body {
  background: #0a0a0f;
  position: relative;
}

/* Nur die Login-Seite ist zentriert und ohne Scroll */
body.login-body {
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.background {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(58, 84, 140, 0.35), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(20, 25, 45, 0.6), transparent 55%),
    linear-gradient(135deg, #10131c 0%, #05050a 100%);
}

.login-card {
  position: relative;
  z-index: 1;
  width: 400px;
  max-width: 90vw;
  background: rgba(15, 16, 24, 0.85);
  border: 1px solid rgba(90, 110, 160, 0.15);
  border-radius: 16px;
  padding: 48px 40px;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(80, 110, 200, 0.05),
              0 20px 60px rgba(0, 0, 0, 0.5),
              0 0 40px rgba(59, 91, 219, 0.06);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.icon-circle {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(88, 120, 255, 0.18), rgba(88, 120, 255, 0.02));
  box-shadow: 0 0 25px rgba(88, 120, 255, 0.35);
}

.tool-icon {
  width: 32px;
  height: 32px;
  color: #6d8bff;
}

h1 {
  color: #f4f5fa;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
}

.subtitle {
  color: #8b8fa3;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 28px;
}

.error-msg {
  color: #ff6b6b;
  font-size: 13px;
  margin-bottom: 16px;
}

.discord-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  background: #5b7cfa;
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.discord-btn:hover {
  background: #4c6ce8;
  transform: translateY(-1px);
}

.discord-btn:active {
  transform: translateY(0);
}

.logout-btn {
  background: #3a3f52;
  margin-top: 10px;
}

.logout-btn:hover {
  background: #2c303e;
}

/* Dashboard */
.dashboard-card .avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto 20px;
  border: 3px solid #5b7cfa;
  box-shadow: 0 0 20px rgba(91, 124, 250, 0.4);
}

.user-info {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 24px;
  text-align: left;
}

.user-info p {
  color: #c4c6d4;
  font-size: 13px;
  margin: 4px 0;
}

.user-info strong {
  color: #f4f5fa;
}

/* ==============================
   DASHBOARD LAYOUT
============================== */
.dashboard-body .background {
  position: fixed;
}

/* NAVBAR */
.navbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: rgba(12, 13, 20, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9a9db0;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #f4f5fa;
}

.nav-right {
  position: relative;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  color: #d3d5e0;
  font-size: 14px;
  transition: background 0.2s ease;
  position: relative;
}

.user-menu:hover {
  background: rgba(255, 255, 255, 0.05);
}

.user-menu strong {
  color: #ffffff;
}

.nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: #14151f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.15s ease;
}

.user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown a {
  display: block;
  padding: 12px 16px;
  color: #c4c6d4;
  text-decoration: none;
  font-size: 14px;
}

.user-dropdown a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

/* MAIN */
.dashboard-main {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 40px 20px;
}

.welcome-title {
  font-size: 32px;
  font-weight: 700;
  color: #f4f5fa;
  margin-bottom: 8px;
}

.welcome-subtitle {
  color: #8b8fa3;
  font-size: 15px;
  margin-bottom: 36px;
}

/* STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.stat-card {
  background: rgba(18, 19, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 26px;
}

.stat-icon {
  color: #6d8bff;
  margin-bottom: 18px;
}

.stat-value {
  font-size: 30px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.stat-label {
  color: #8b8fa3;
  font-size: 14px;
}

/* SECTION TITLE */
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: #f4f5fa;
  margin-bottom: 20px;
}

/* QUICK ACTIONS */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.action-card {
  background: rgba(18, 19, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 26px;
  display: flex;
  flex-direction: column;
}

.action-icon {
  color: #6d8bff;
  margin-bottom: 16px;
}

.action-card h3 {
  color: #f4f5fa;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.action-card p {
  color: #8b8fa3;
  font-size: 13.5px;
  margin-bottom: 20px;
  flex-grow: 1;
}

.action-btn {
  display: block;
  text-align: center;
  padding: 11px;
  background: #5b7cfa;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.action-btn:hover {
  background: #4c6ce8;
}

/* FOOTER */
.dashboard-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 28px 20px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #6d7086;
  font-size: 13px;
  line-height: 1.6;
}

.footer-copy {
  margin-top: 8px;
  font-size: 12px;
  color: #4d4f5f;
}

@media (max-width: 800px) {
  .stats-grid,
  .actions-grid {
    grid-template-columns: 1fr;
  }
  .navbar {
    flex-direction: column;
    gap: 14px;
    padding: 16px 20px;
  }
  .nav-left {
    gap: 20px;
  }
}

/* ==============================
   LICENSES PAGE
============================== */
.licenses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.license-card {
  background: rgba(18, 19, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.license-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.license-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(109, 139, 255, 0.12);
  color: #8ca0ff;
}

.license-header h3 {
  color: #f4f5fa;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.license-key {
  display: inline-block;
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: #9db2ff;
  background: rgba(109, 139, 255, 0.1);
  border: 1px solid rgba(109, 139, 255, 0.2);
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.license-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.license-stat,
.license-ip-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.license-ip-box {
  margin-bottom: 20px;
}

.stat-label-small {
  color: #7c7f92;
  font-size: 12px;
}

.stat-value-small {
  color: #e4e5ee;
  font-size: 15px;
  font-weight: 600;
}

.license-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.btn-small {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  border: none;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}

.btn-small:hover {
  filter: brightness(1.1);
}

.btn-small:active {
  transform: translateY(1px);
}

.btn-copy {
  background: #5b7cfa;
}

.btn-copy-full {
  flex: 1;
  padding: 11px 10px;
  font-size: 13px;
}

.btn-regenerate {
  background: #4c6ce8;
}

.btn-reset {
  background: #e5484d;
}

.btn-delete {
  background: #e5484d;
}

.action-btn-disabled {
  display: block;
  text-align: center;
  padding: 11px;
  background: rgba(255, 255, 255, 0.06);
  color: #6d7086;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  cursor: not-allowed;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1c1e2b;
  border: 1px solid rgba(109, 139, 255, 0.3);
  color: #f4f5fa;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 50;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 900px) {
  .licenses-grid {
    grid-template-columns: 1fr;
  }
}

/* ==============================
   STAFF PANEL
============================== */
.staff-form-card {
  background: rgba(18, 19, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 40px;
}

.staff-form-card .section-title {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.form-group label {
  color: #c4c6d4;
  font-size: 13px;
  font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="number"] {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 11px 14px;
  color: #f4f5fa;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus {
  border-color: #5b7cfa;
}

.icon-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.icon-option {
  cursor: pointer;
}

.icon-option input[type="radio"] {
  display: none;
}

.icon-option-box {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #8b8fa3;
  transition: all 0.15s ease;
}

.icon-option input[type="radio"]:checked + .icon-option-box {
  background: rgba(91, 124, 250, 0.18);
  border-color: #5b7cfa;
  color: #8ca0ff;
}

.staff-submit-btn {
  width: auto;
  padding: 12px 28px;
  margin-top: 6px;
}

.btn-delete-full {
  width: 100%;
  margin-top: auto;
}
