:root{
  --bg: #0b1220;
  --card: rgba(255,255,255,.08);
  --text: #e9eefc;
  --muted: rgba(233,238,252,.72);
  --line: rgba(233,238,252,.18);
  --focus: rgba(99, 102, 241, .55);
  --primary: #6366f1;
  --primary2: #7c3aed;
  --radius: 18px;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 15% 10%, rgba(124,58,237,.35), transparent 60%),
    radial-gradient(900px 500px at 90% 20%, rgba(99,102,241,.35), transparent 55%),
    radial-gradient(900px 700px at 50% 100%, rgba(34,197,94,.12), transparent 55%),
    var(--bg);
}

.page{
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.card{
  width: min(520px, 100%);
  background: linear-gradient(180deg, var(--card), rgba(255,255,255,.05));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 55px rgba(0,0,0,.45);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.card__header{
  padding: 26px 26px 10px;
}

.title{
  margin: 0;
  font-size: 28px;
  letter-spacing: .2px;
}

.subtitle{
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.card__footer{
  padding: 14px 26px 22px;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,.12);
}

.tiny{
  margin: 0;
  color: rgba(233,238,252,.55);
  font-size: 12px;
}

.tabs{
  padding: 12px 18px 0;
}

.tabs__radio{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tabs__label{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  margin: 0 6px 10px 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: rgba(233,238,252,.85);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

#tab-login:checked + .tabs__label{
  border-color: rgba(99,102,241,.55);
  background: rgba(99,102,241,.18);
}

#tab-register:checked + .tabs__label{
  border-color: rgba(124,58,237,.55);
  background: rgba(124,58,237,.18);
}

.tabs__panels{
  margin-top: 10px;
  padding: 0 8px 18px;
}

.panel{ display: none; }
#tab-login:checked ~ .tabs__panels .panel--login{ display: block; }
#tab-register:checked ~ .tabs__panels .panel--register{ display: block; }

.form{
  padding: 18px;
  border-radius: calc(var(--radius) - 6px);
  background: rgba(0,0,0,.12);
  border: 1px solid rgba(255,255,255,.08);
}

.field{ margin-bottom: 14px; }

.field__label{
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  color: rgba(233,238,252,.85);
}

.field__input{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(233,238,252,.18);
  background: rgba(255,255,255,.06);
  color: var(--text);
  outline: none;
}

.field__input::placeholder{ color: rgba(233,238,252,.45); }

.field__input:focus{
  border-color: rgba(99,102,241,.65);
  box-shadow: 0 0 0 4px var(--focus);
}

.field__help{
  margin: 8px 0 0;
  font-size: 12px;
  color: rgba(233,238,252,.6);
}

.grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px){
  .grid{ grid-template-columns: 1fr; }
}

.row{
  display: flex;
  gap: 12px;
  align-items: center;
}

.row--between{
  justify-content: space-between;
  margin: 6px 0 14px;
}

.checkbox{
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: rgba(233,238,252,.8);
  font-size: 13px;
}

.checkbox--stack{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 6px 0 14px;
}

.checkbox input{
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.link{
  color: rgba(233,238,252,.85);
  text-decoration: underline;
  text-decoration-color: rgba(233,238,252,.35);
  text-underline-offset: 3px;
}

.link:hover{
  text-decoration-color: rgba(233,238,252,.75);
}

.link--as-label{ cursor: pointer; }

.btn{
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 650;
  letter-spacing: .2px;
  cursor: pointer;
}

.btn--primary{
  color: white;
  background: linear-gradient(90deg, var(--primary), var(--primary2));
  box-shadow: 0 12px 26px rgba(99,102,241,.25);
}

.btn--primary:hover{ filter: brightness(1.05); }


.msg{
  margin: 0 26px 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(233,238,252,.18);
  background: rgba(0,0,0,.12);
  color: rgba(233,238,252,.9);
  font-size: 13px;
  display: none;
}
.msg--ok{
  border-color: rgba(34,197,94,.35);
}
.msg--err{
  border-color: rgba(239,68,68,.35);
}


/* ===== Dashboard Layout ===== */

.page--dashboard{
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
}

.topbar__inner{
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand{
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand__title{
  margin: 0;
  font-size: 18px;
  letter-spacing: .2px;
}

.brand__sub{
  margin: 0;
  font-size: 12px;
  color: rgba(233,238,252,.7);
}

.container{
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 16px 30px;
}

.grid-2{
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 14px;
}

@media (max-width: 900px){
  .grid-2{ grid-template-columns: 1fr; }
}

.panel-card{
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  padding: 16px;
}

.panel-title{
  margin: 0 0 10px;
  font-size: 16px;
}

.mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}

.btn-row{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn--ghost{
  background: rgba(255,255,255,.06);
  color: rgba(233,238,252,.92);
  border: 1px solid rgba(233,238,252,.18);
  box-shadow: none;
}

.btn--ghost:hover{
  filter: brightness(1.08);
}

.table-wrap{
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
}

.table{
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px; /* damit nicht alles auf Handy zerquetscht */
  font-size: 13px;
}

.table th, .table td{
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(233,238,252,.10);
  vertical-align: top;
  white-space: nowrap;
}

.table thead th{
  position: sticky;
  top: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(233,238,252,.18);
  font-size: 12px;
  color: rgba(233,238,252,.85);
}

.table tbody tr:hover{
  background: rgba(255,255,255,.04);
}

.badge{
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(233,238,252,.18);
  background: rgba(255,255,255,.06);
  font-size: 12px;
  color: rgba(233,238,252,.85);
}


/* ===== Rewards (Prämien) ===== */
.rewards-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 1000px){
  .rewards-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px){
  .rewards-grid{ grid-template-columns: 1fr; }
}

.reward-add{
  border: 1px dashed rgba(233,238,252,.25);
  background: rgba(255,255,255,.04);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  color: rgba(233,238,252,.9);
  display: grid;
  place-items: center;
  min-height: 220px;
}

.reward-add:hover{ filter: brightness(1.08); }

.reward-add__plus{
  font-size: 54px;
  line-height: 1;
  opacity: .9;
}
.reward-add__text{
  margin-top: 6px;
  font-size: 13px;
  color: rgba(233,238,252,.75);
}

.reward-card{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  border-radius: var(--radius);
  overflow: hidden;
}

.reward-thumb{
  height: 160px;
  background: rgba(0,0,0,.25);
  display: grid;
  place-items: center;
}

.reward-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reward-thumb__placeholder{
  color: rgba(233,238,252,.6);
  font-size: 12px;
}

.reward-meta{
  padding: 12px 12px 14px;
}

.reward-title{
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 6px;
}

/* ===== Modal ===== */
.modal{ display:none; }
.modal--open{ display:block; }

.modal__backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
}

.modal__panel{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 24px));
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(10,14,25,.95);
  backdrop-filter: blur(10px);
  padding: 16px;
  box-shadow: 0 18px 55px rgba(0,0,0,.55);
}



/* ===== Rewards picker on refer.php (FIX: Bilder zu groß) ===== */

.rewards-pick{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

@media (max-width: 900px){
  .rewards-pick{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px){
  .rewards-pick{ grid-template-columns: 1fr; }
}

.reward-pick{
  text-align: left;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  color: rgba(233,238,252,.92);

  /* wichtig: Karte hat definierte Optik */
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.reward-pick:hover{ filter: brightness(1.06); }

.reward-pick__img{
  /* FIX: feste Höhe */
  height: 140px;
  background: rgba(0,0,0,.25);
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* FIX: Bild darf nie größer werden als die Box */
.reward-pick__img img{
  width: 100%;
  height: 100%;
  object-fit: cover;   /* schneidet sauber zu */
  display: block;
}

/* Platzhalter */
.reward-thumb__placeholder{
  color: rgba(233,238,252,.6);
  font-size: 12px;
}

/* Titel: immer gleich hoch, bricht sauber um */
.reward-pick__title{
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;

  /* optional: nicht zu hoch werden lassen */
  min-height: 44px; /* ca. 2 Zeilen */
  white-space: normal;
  overflow: hidden;
}

/* aktiver Zustand */
.reward-pick--active{
  border-color: rgba(99,102,241,.55);
  box-shadow: 0 0 0 4px rgba(99,102,241,.18);
}

/* ===== FIX: Prämien-Verwaltung – Text NICHT im Bild ===== */

.reward-card{
  display: flex;
  flex-direction: column;
}

.reward-thumb{
  position: relative;
  height: 160px;
  overflow: hidden;
  background: rgba(0,0,0,.25);
}

.reward-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Text-Bereich klar unter dem Bild */
.reward-meta{
  padding: 12px 12px 14px;
  background: transparent;
}

.reward-title{
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  color: rgba(233,238,252,.95);
}

/* Sicherheit: kein Overlay-Text im Bild */
.reward-thumb .reward-title{
  display: none;
}


/* 1) Browser sagen: Dark UI verwenden (hilft v.a. bei Form Controls) */
:root{
  color-scheme: dark;
}

/* 2) Select selbst (geschlossen) garantiert dunkel */
select.field__input{
  background-color: rgba(255,255,255,.06) !important;
  color: rgba(233,238,252,.95) !important;
  border: 1px solid rgba(233,238,252,.18) !important;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  padding-right: 36px; /* Platz für Pfeil */
}

/* 3) Optionen im Dropdown (klappt in vielen Browsern, nicht in allen) */
select.field__input option{
  background-color: rgba(10,14,25,.95); /* gleiche Basis wie Cards */
  color: rgba(233,238,252,.95);
}


/* 4) Dein Pfeil (wie vorher, aber sauber) */
select.field__input{
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(233,238,252,.6) 50%),
    linear-gradient(135deg, rgba(233,238,252,.6) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

select.field__input:focus{
  outline: none;
  border-color: rgba(99,102,241,.65) !important;
  box-shadow: 0 0 0 4px rgba(99,102,241,.18);
}

/* Pflicht-Prämie Feedback */
.reward-pick--error{
  animation: shake .35s;
  border-color: rgba(239,68,68,.6);
}

@keyframes shake{
  0%{ transform: translateX(0); }
  25%{ transform: translateX(-3px); }
  50%{ transform: translateX(3px); }
  75%{ transform: translateX(-3px); }
  100%{ transform: translateX(0); }
}
/* Dashboard: Checkboxen NICHT wie Inputs behandeln */
input[type="checkbox"]{
  width: auto !important;
  min-width: 0 !important;
  display: inline-block !important;
}



    .wizard__bar{
      height: 8px;
      border-radius: 999px;
      background: rgba(255,255,255,.06);
      border: 1px solid rgba(233,238,252,.12);
      overflow: hidden;
    }
    .wizard__fill{
      height: 100%;
      background: rgba(99,102,241,.65);
      transition: width .25s ease;
    }
    .wizard__steps{
      margin-top: 10px;
      display: flex;
      gap: 8px;
      justify-content: center;
    }
    .wizard__step{
      width: 28px;
      height: 28px;
      border-radius: 999px;
      display: grid;
      place-items: center;
      font-size: 12px;
      border: 1px solid rgba(233,238,252,.18);
      background: rgba(255,255,255,.06);
      color: rgba(233,238,252,.8);
    }
    .wizard__step--active{
      border-color: rgba(99,102,241,.65);
      box-shadow: 0 0 0 4px rgba(99,102,241,.18);
      color: rgba(233,238,252,.95);
    }
    .wizard__step--done{
      border-color: rgba(34,197,94,.55);
      color: rgba(233,238,252,.9);
    }


