/* State-OS – Halloween UI */
*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

.screen {
  min-height: 100vh;
  font-family: 'Nunito', system-ui, sans-serif;
  color: #fff;
  background-color: #1a0706;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Fallback, falls kein Hintergrundbild hinterlegt ist */
.screen--login   { background-image: radial-gradient(circle at 70% 0%, #e2541e 0 10%, #7a1a0c 22%, #2a0705 55%, #120604 100%); }
.screen--desktop { background-image: radial-gradient(circle at 80% 12%, #e04a1a 0 9%, #8a2210 20%, #3a0a0c 50%, #120406 100%); }

/* ---------- Login ---------- */
.screen--login {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 22vh 16px 40px;
}

.login-card {
  width: 100%;
  max-width: 300px;
  padding: 28px 24px 26px;
  border-radius: 20px;
  background: rgba(150, 62, 48, .55);
  border: 1px solid rgba(255, 210, 190, .28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-logo {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  display: flex; align-items: center; justify-content: center;
}
.login-title { margin: 12px 0 0; font-size: 22px; font-weight: 800; }
.login-claim { margin: 4px 0 18px; font-size: 11px; color: rgba(255, 255, 255, .75); }


.login-form { align-self: stretch; display: flex; flex-direction: column; }
.login-form label { font-size: 10px; color: rgba(255, 255, 255, .8); margin: 0 0 3px; }

.field { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; color: rgba(255, 255, 255, .8); }
.field input {
  flex: 1; height: 28px; padding: 0 9px;
  border-radius: 7px; border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(40, 16, 12, .35); color: #fff;
  font: 600 13px 'Nunito', sans-serif;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus {
  outline: none; border-color: #5aa8ff;
  box-shadow: 0 0 0 3px rgba(90, 168, 255, .35);
}

.login-btn {
  margin-top: 6px; height: 36px; border: 0; border-radius: 999px;
  background: #4f9df5; color: #fff; cursor: pointer;
  font: 700 12px 'Nunito', sans-serif;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: background .15s, transform .1s;
}
.login-btn:hover { background: #3d8ce8; }
.login-btn:active { transform: scale(.98); }

/* ---------- Topbar ---------- */
.topbar {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: min(580px, calc(100% - 32px)); height: 18px; padding: 0 12px;
  background: rgba(12, 10, 18, .88); border-radius: 0 0 7px 7px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10px; color: rgba(255, 255, 255, .85); z-index: 10;
}
.topbar__group { display: flex; align-items: center; gap: 10px; }
.topbar__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; padding: 0; border: 0; background: none;
  cursor: pointer; color: #fff; opacity: .85;
}
.topbar__btn:hover { opacity: 1; }
.topbar__clock { font-variant-numeric: tabular-nums; }
.topbar__sep { width: 1px; height: 9px; background: rgba(255, 255, 255, .25); }

/* ---------- Desktop ---------- */
.desk { padding: 66px 30px 40px; }

.desk__back {
  display: inline-block; margin-left: 50px; font-size: 10px;
  color: rgba(255, 255, 255, .6); text-decoration: none;
}
.desk__back:hover { color: #fff; }

.desk__name {
  margin: 4px 0 0; font-size: 29px; font-weight: 900; letter-spacing: -.2px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .55);
}

.desk__section { margin-top: 24px; }
.desk__label {
  margin: 0 0 10px 2px; font-size: 9px; font-weight: 800;
  letter-spacing: 1.2px; color: rgba(255, 255, 255, .6);
}
.desk__grid { display: flex; flex-wrap: wrap; gap: 12px; }

.app {
  width: 68px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-decoration: none; color: #fff;
}
.app__tile {
  position: relative; width: 56px; height: 56px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform .15s, box-shadow .15s;
}
.app:hover .app__tile { transform: translateY(-2px) scale(1.04); box-shadow: 0 10px 24px rgba(0, 0, 0, .45); }
.app__logo { width: 42px; height: 42px; object-fit: contain; border-radius: 50%; }
.app__label {
  font-size: 10px; font-weight: 600; text-align: center; line-height: 1.25;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .85);
}
.app__badge {
  position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: #3b82f6; font-size: 9px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(20, 8, 8, .6);
}

.seal {
  width: 42px; height: 42px; border-radius: 50%; border: 2px solid;
  display: flex; align-items: center; justify-content: center;
}
.seal--text { font-weight: 900; font-size: 11px; text-align: center; }

@media (max-width: 480px) {
  .desk { padding: 56px 16px 32px; }
  .desk__back { margin-left: 0; }
  .desk__name { font-size: 24px; }
}

/* ---------- Hinweise ---------- */
.notice {
  align-self: stretch; margin: 0 0 12px; padding: 8px 11px; border-radius: 9px;
  font-size: 11.5px; line-height: 1.4;
  background: rgba(12, 10, 18, .65); border: 1px solid rgba(255, 255, 255, .16);
}
.notice a { color: #bcd6ff; font-weight: 700; }
.notice--error   { background: rgba(120, 12, 12, .6);  border-color: rgba(255, 120, 120, .45); }
.notice--success { background: rgba(18, 90, 50, .6);   border-color: rgba(120, 230, 160, .45); }

.login-foot { margin: 16px 0 0; font-size: 11px; color: rgba(255, 255, 255, .75); }
.login-foot a, .login-claim a { color: #fff; font-weight: 700; }
a.login-btn { text-decoration: none; }

/* ---------- Bewerbungsportal ---------- */
.portal-card {
  width: 100%; max-width: 640px;
  padding: 26px 28px 28px; border-radius: 20px;
  background: rgba(110, 42, 34, .62);
  border: 1px solid rgba(255, 210, 190, .28);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
.screen--login:has(.portal-card) { padding-top: 8vh; }
.portal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.portal-head .login-logo { flex: none; }

.status {
  margin: 0 0 16px; padding: 16px 18px; border-radius: 14px;
  background: rgba(12, 10, 18, .45); border: 1px solid rgba(255, 255, 255, .14);
  display: flex; flex-direction: column; gap: 6px; font-size: 13px;
}
.status h2 { margin: 0 0 2px; font-size: 16px; }
.status p { margin: 0; color: rgba(255, 255, 255, .88); }
.status .login-btn { margin-top: 10px; align-self: flex-start; padding: 0 22px; }
.status--ok  { border-color: rgba(120, 230, 160, .45); }
.status--bad { border-color: rgba(255, 120, 120, .45); }

.wl-form { display: flex; flex-direction: column; gap: 14px; }
.wl-step { margin: 0; font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.wl-row { display: flex; flex-wrap: wrap; gap: 12px; }
.wl-row .wl-field { flex: 1 1 220px; }
.wl-field { display: flex; flex-direction: column; gap: 5px; }
.wl-field label, .perm-form > label { font-size: 11.5px; font-weight: 700; color: rgba(255, 255, 255, .9); }
.wl-field small { font-weight: 600; color: rgba(255, 255, 255, .6); }
.wl-field input, .wl-field textarea, .decide input, .search input, .perm-form select {
  width: 100%; padding: 8px 10px; border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(30, 12, 10, .45);
  color: #fff; font: 600 13px 'Nunito', sans-serif;
}
.wl-field textarea { resize: vertical; min-height: 96px; line-height: 1.45; }
.wl-field input:focus, .wl-field textarea:focus, .decide input:focus, .search input:focus, .perm-form select:focus {
  outline: none; border-color: #5aa8ff; box-shadow: 0 0 0 3px rgba(90, 168, 255, .3);
}
.wl-field input[type="date"] { color-scheme: dark; max-width: 220px; }
.wl-hint { margin: -6px 0 0; font-size: 11.5px; color: rgba(255, 255, 255, .75); }
.wl-hint strong { color: #fff; }
.wl-check { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; cursor: pointer; }
.wl-check input { width: 16px; height: 16px; margin-top: 1px; accent-color: #4f9df5; flex: none; }
.wl-check code { font-size: 10.5px; color: rgba(255, 255, 255, .55); }
.wl-form .login-btn { align-self: flex-start; padding: 0 26px; }

/* ---------- Desktop-Zusatz ---------- */
.desk__mail { margin: 2px 0 0; font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .7); text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }
.desk > .notice { display: inline-block; margin-top: 12px; }

/* ---------- Admin ---------- */
.admin { padding: 66px 30px 40px; max-width: 1200px; }
.admin > .notice { display: inline-block; margin: 12px 0 0; }
.muted { color: rgba(255, 255, 255, .6); font-size: 11.5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 14px; }
.tab {
  padding: 7px 14px; border-radius: 999px; font-size: 12px; font-weight: 700;
  color: #fff; text-decoration: none; background: rgba(12, 10, 18, .6);
  border: 1px solid rgba(255, 255, 255, .14);
}
.tab span { margin-left: 4px; opacity: .65; }
.tab--active { background: #4f9df5; border-color: #4f9df5; }

.panel {
  margin: 0 0 12px; padding: 14px 16px; border-radius: 14px;
  background: rgba(14, 8, 12, .72); border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 13px;
}
.panel--empty { color: rgba(255, 255, 255, .7); }
.panel summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.panel__title { margin: 0; font-size: 17px; }

.answers { margin: 14px 0 0; display: grid; gap: 4px 0; }
.answers dt { font-size: 11px; font-weight: 800; color: rgba(255, 255, 255, .6); margin-top: 8px; }
.answers dd { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }

.decide { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; flex-direction: column; gap: 8px; }
.decide label { font-size: 11px; font-weight: 700; color: rgba(255, 255, 255, .75); }
.decide__btns { display: flex; flex-wrap: wrap; gap: 8px; }

.btn {
  height: 34px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer;
  font: 700 12px 'Nunito', sans-serif;
}
.btn:hover { background: rgba(255, 255, 255, .18); }
.btn--ok  { background: #1f8a4c; border-color: #1f8a4c; }
.btn--ok:hover { background: #1a7641; }
.btn--bad { background: #b3261e; border-color: #b3261e; }
.btn--bad:hover { background: #981f19; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 800; background: rgba(255, 255, 255, .12); white-space: nowrap; }
.pill--ok, .pill--active { background: rgba(31, 138, 76, .55); }
.pill--pending { background: rgba(200, 140, 20, .5); }
.pill--locked  { background: rgba(179, 38, 30, .6); }

.admin-cols { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; margin-top: 18px; }
.admin-cols > .panel:first-child { flex: 999 1 560px; min-width: 0; }
.admin-cols > .panel:nth-child(2) { flex: 1 1 300px; }

.search { display: flex; gap: 8px; margin-bottom: 12px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th { text-align: left; font-size: 10.5px; letter-spacing: .8px; text-transform: uppercase; color: rgba(255, 255, 255, .55); padding: 6px 8px; }
.table td { padding: 8px; border-top: 1px solid rgba(255, 255, 255, .08); vertical-align: top; }
.table a { color: #fff; font-weight: 800; text-decoration: none; }
.table a:hover { text-decoration: underline; }
.table tr.is-sel td { background: rgba(79, 157, 245, .16); }

.perm-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.perm-form fieldset { border: 0; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 8px; }
.perm-form legend { font-size: 11.5px; font-weight: 700; margin-bottom: 6px; }
.perm-form select option { background: #2a1210; }
.perm-form .btn { align-self: flex-start; }

@media (max-width: 600px) {
  .admin { padding: 56px 16px 32px; }
  .portal-card { padding: 20px 18px; }
}
