/* Hausschrift Generis (selbst gehostet über das Resource Bundle) */
@font-face { font-family: "Generis Sans W01"; src: url('../../GenerisSansComLight.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Generis Sans W01"; src: url('../../GenerisSansComRegular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Generis Sans W01"; src: url('../../GenerisSansComItalic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Generis Sans W01"; src: url('../../GenerisSansComMedium.woff2') format('woff2');
  font-weight: 500 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Generis Sans W01"; src: url('../../GenerisSansComBold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Generis Serif W01"; src: url('../../GenerisSerifComRegular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Generis Serif W01"; src: url('../../GenerisSerifComBold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap; }
/* DHBW Heilbronn – PWM, angelehnt an heilbronn.dhbw.de */
:root {
  --hn-red: #e2001a;
  --hn-red-dark: #b80015;
  --hn-slate: #4b5b63;
  --hn-grey: #5c6971;
  --hn-bg: #f2f2f2;
  --hn-line: #d6d6d6;
  --hn-footer: #2b2b2b;
  --hn-text: #1a1a1a;
  --hn-sans: "Generis Sans W01", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --hn-serif: "Generis Serif W01", Georgia, "Times New Roman", serif;
}

html, body {
  background: var(--hn-bg) !important;
  background-image: none !important;
}
body {
  font-family: var(--hn-sans);
  color: var(--hn-text);
  font-size: 16px;
  line-height: 1.5;
}
a { color: var(--hn-red); }

/* ---------- Kopfzeile ---------- */
#header {
  background: #fff !important;
  border-bottom: 6px solid var(--hn-line) !important;
  box-shadow: none !important;
}
#header-company-logo { display: none !important; }
#hn_logo {
  display: block;
  max-width: 1000px;
  margin: 0 auto;
  padding: 18px 20px 4px;
  box-sizing: border-box;
  text-decoration: none;
}
#hn_logo img { display: block; height: 44px; width: auto; }
#hn_logo.hn-logo-text { font-size: 24px; font-weight: 600; color: var(--hn-grey); }
#header-page {
  font-family: var(--hn-serif);
  color: var(--hn-text) !important;
  font-size: 26px;
}
#header-title { color: var(--hn-grey) !important; font-weight: 400; }

/* ---------- Inhaltsbereich ---------- */
body #centerbody {
  background: #fff !important;
  color: var(--hn-text);
  border: 0 !important;
  border-radius: 5px;
  box-shadow: none !important;
  max-width: 640px;
  margin: 40px auto !important;
  padding: 30px 36px !important;
  box-sizing: border-box;
  text-align: left;
}
#page-content-title {
  font-family: var(--hn-serif);
  font-weight: 500;
  color: var(--hn-text);
}

/* ---------- Kacheln im Hauptmenü ---------- */
.tile {
  background: var(--hn-bg) !important;
  border: 0 !important;
  border-radius: 5px;
  box-shadow: none !important;
  transition: background .15s ease;
}
a:hover .tile, .tile:hover { background: #e6e6e6 !important; }
.tile-image { color: var(--hn-red) !important; }
.tile-title { color: var(--hn-text) !important; font-weight: 600; }
.tile-title::before { content: "\203A\00a0"; }
.tile-subtitle { color: var(--hn-grey) !important; }

/* ---------- Formulare ---------- */
.formFieldLabel, .loginFieldLabel {
  display: block;
  color: var(--hn-slate);
  font-weight: 600;
  margin: 14px 0 6px;
}
input[type=text], input[type=password], input[type=email], input[type=number], .inputfield {
  font-family: inherit;
  font-size: 16px;
  background: #fff;
  border: 1px solid #bfc6ca;
  border-radius: 2px;
  padding: 10px 12px;
  box-sizing: border-box;
  max-width: 100%;
}
input[type=text]:focus, input[type=password]:focus, input[type=email]:focus, input[type=number]:focus, .inputfield:focus {
  outline: none;
  border-color: var(--hn-red);
  box-shadow: 0 0 0 3px rgba(226,0,26,.15);
}
.tokenInput { margin: auto; }

/* ---------- Buttons ---------- */
.buttonbar { text-align: left; margin-top: 24px; }
.btn {
  font-family: inherit;
  background: var(--hn-red) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 2px;
  padding: 10px 20px;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s ease;
}
.btn:hover, .btn:focus { background: var(--hn-red-dark) !important; }
.btn .btn-icon { display: none; }
.btn::after { content: "\00a0\203A"; }
.btn[id*="cancel"], .btn[name*="cancel"], .btn[id*="Cancel"] {
  background: #fff !important;
  color: var(--hn-slate) !important;
  border: 1px solid var(--hn-line) !important;
}
.btn[id*="cancel"]:hover, .btn[name*="cancel"]:hover, .btn[id*="Cancel"]:hover {
  background: var(--hn-bg) !important;
}

/* ---------- Meldungen ---------- */
.message { width: auto; border-radius: 2px; }
.message-error   { background: #fdecee; color: #8a0010; border-left: 4px solid var(--hn-red); }
.message-success { background: #edf6ed; color: #1f5a1f; border-left: 4px solid #3a8a3a; }
.message-info    { background: #eef1f3; color: var(--hn-slate); border-left: 4px solid var(--hn-slate); }

/* ---------- Fußzeile ---------- */
#footer {
  background: var(--hn-footer) !important;
  color: #cfcfcf !important;
  padding: 18px 16px;
  font-size: 13px;
  text-shadow: none !important;
}
#footer a { color: #fff !important; }
#hn_links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 24px;
  margin: 0 auto 10px;
  font-size: 15px;
}
#hn_links a { color: #fff !important; text-decoration: none; }
#hn_links a:hover { text-decoration: underline; }
/* angemeldeter Benutzer oben rechts lesbar */
#header-username, .header-username { color: var(--hn-slate) !important; font-size: 14px; }

/* Meldungen in normaler Schrift statt Schreibmaschinenschrift */
#message, .message, #centerbody pre {
  font-family: var(--hn-sans) !important;
  white-space: normal;
}
/* Hauptmenü: Kacheln zentriert */
#centerbody.tile-centerbody {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
#centerbody.tile-centerbody > a { text-decoration: none; }
#centerbody.tile-centerbody .tile { float: none; margin: 0; }
/* Datenschutz-/Zustimmungstext */
#agreementText, .agreementText {
  font-family: var(--hn-sans) !important;
  white-space: normal !important;
  background: #fff !important;
  color: var(--hn-text);
  border: 1px solid var(--hn-line);
  border-left: 4px solid var(--hn-slate);
  border-radius: 2px;
  padding: 16px 20px;
  font-size: 15px;
  line-height: 1.6;
}
#agreementText p { margin: 0 0 10px; }
#agreementText p:last-child { margin-bottom: 0; }
.checkboxWrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  font-weight: 600;
  cursor: pointer;
}
.checkboxWrapper input { width: 18px; height: 18px; accent-color: var(--hn-red); }

/* Abbrechen-Buttons weiß statt rot */
#button_cancel, #button-cancel, #button_reset, #button-sendReset {
  background: #fff !important;
  color: var(--hn-slate) !important;
  border: 1px solid var(--hn-line) !important;
}
#button_cancel:hover, #button-cancel:hover, #button_reset:hover, #button-sendReset:hover {
  background: var(--hn-bg) !important;
}
#button_cancel::after, #button-cancel::after, #button_reset::after, #button-sendReset::after { content: none; }
/* technische Fehlercodes für Studierende ausblenden */
#errorCode, #errorName { display: none !important; }
/* Passwort ändern: einheitliche Schrift, weißer Abbrechen-Button */
#centerbody > p, #PasswordRequirements { font-size: 15px; }
#PasswordRequirements ul { margin: 6px 0 12px 20px; padding: 0; }
#button-reset {
  background: #fff !important;
  color: var(--hn-slate) !important;
  border: 1px solid var(--hn-line) !important;
}
#button-reset:hover { background: var(--hn-bg) !important; }
#button-reset::after { content: none; }
/* Code-Eingabe: einzeiliges, kompaktes Feld */
textarea.tokenInput {
  display: block;
  width: 100%;
  max-width: 220px;
  height: 52px;
  min-height: 0;
  margin: 0;
  padding: 8px 12px;
  resize: none;
  overflow: hidden;
  font-family: Consolas, "Courier New", monospace;
  font-size: 24px;
  letter-spacing: 6px;
  text-align: center;
  border: 1px solid #bfc6ca;
  border-radius: 2px;
  box-sizing: border-box;
}
textarea.tokenInput:focus {
  outline: none;
  border-color: var(--hn-red);
  box-shadow: 0 0 0 3px rgba(226,0,26,.15);
}

/* "Zurück" als Nebenbutton wie "Abbrechen" */
#button-goBack {
  background: #fff !important;
  color: var(--hn-slate) !important;
  border: 1px solid var(--hn-line) !important;
}
#button-goBack:hover { background: var(--hn-bg) !important; }
#button-goBack::after { content: none; }
/* einzeilige Eingabefelder, die PWM als Textarea anlegt */
textarea.hn-singleline:not(.tokenInput) {
  height: 44px;
  min-height: 0;
  resize: none;
  overflow: hidden;
  font-family: var(--hn-sans);
  font-size: 16px;
  line-height: 1.4;
  padding: 10px 12px;
  border: 1px solid #bfc6ca;
  border-radius: 2px;
  box-sizing: border-box;
  max-width: 100%;
}