/* ============================================================
   Recruiting-Tablet — Styles
   Zwei Modi: .mode-tablet (große Touch-Ziele) / .mode-pc (kompakt)
   ============================================================ */
:root {
  --bg: #f1f4f9;
  --card: #ffffff;
  --ink: #1f2733;
  --muted: #6b7686;
  --line: #e2e7ef;
  --primary: #2f6fed;
  --primary-d: #1f57c8;
  --green: #1e9e5a;
  --green-bg: #e4f6ec;
  --red: #d23b3b;
  --red-bg: #fbe7e7;
  --amber: #b8791b;
  --amber-bg: #fbf0d8;
  --blue-bg: #e5eefc;
  --gray-bg: #eceff4;
  --shadow: 0 1px 3px rgba(20,30,50,.08), 0 1px 2px rgba(20,30,50,.04);
  --shadow-h: 0 6px 18px rgba(20,30,50,.12);
  --radius: 12px;
  --fs: 15px;
  --tap: 40px;
  --maxw: 1140px;
  --gap: 18px;
}
.mode-tablet {
  --fs: 18px;
  --tap: 56px;
  --maxw: 980px;
  --gap: 22px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--fs);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}
h1 { font-size: 1.6em; margin: 0; }
h2 { font-size: 1.15em; margin: 0 0 14px; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px;
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: 10px 18px; box-shadow: var(--shadow);
}
.brand { font-weight: 800; font-size: 1.2em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.mainnav { display: flex; gap: 6px; flex-wrap: wrap; }
.mainnav a {
  color: var(--ink); padding: 9px 14px; border-radius: 9px; font-weight: 600;
  display: inline-flex; align-items: center; min-height: var(--tap);
}
.mainnav a:hover { background: var(--gray-bg); text-decoration: none; }
.mainnav a.active { background: var(--primary); color: #fff; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.viewtoggle { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.viewtoggle a { padding: 8px 12px; color: var(--muted); font-weight: 600; font-size: .9em; }
.viewtoggle a:hover { background: var(--gray-bg); text-decoration: none; }
.viewtoggle a.on { background: var(--primary); color: #fff; }
.usermenu { display: flex; align-items: center; gap: 12px; }
.uname { font-weight: 600; }
.role-tag { background: var(--amber-bg); color: var(--amber); border-radius: 6px; padding: 1px 7px; font-size: .72em; font-weight: 700; vertical-align: middle; }
.link-muted { color: var(--muted); font-size: .9em; }
.btn-logout { color: var(--muted); font-weight: 600; padding: 8px 12px; border-radius: 9px; }
.btn-logout:hover { background: var(--gray-bg); text-decoration: none; }

/* ---------- Layout ---------- */
.content { max-width: var(--maxw); margin: 0 auto; padding: 22px 18px 60px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-sub { color: var(--muted); }
.back { display: inline-block; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.count { background: var(--gray-bg); color: var(--muted); border-radius: 20px; padding: 1px 10px; font-size: .7em; font-weight: 700; vertical-align: middle; }
.empty { color: var(--muted); padding: 14px 2px; }
.hint { color: var(--muted); font-size: .85em; }
.muted { color: var(--muted); font-size: .9em; }

/* ---------- Flash ---------- */
.flashes { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.flash { padding: 12px 16px; border-radius: 10px; font-weight: 600; }
.flash-success { background: var(--green-bg); color: var(--green); }
.flash-error { background: var(--red-bg); color: var(--red); }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: var(--gap); }
.card.narrow { max-width: 460px; }
.highlight-card { border-color: #f0d8a0; background: #fffdf6; }
.card-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gray-bg); color: var(--ink); border: 1px solid var(--line);
  padding: 0 18px; min-height: var(--tap); border-radius: 10px;
  font-size: 1em; font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn:hover { filter: brightness(.97); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-ghost { background: transparent; }
.btn-danger-text { color: var(--red); }
.btn-block { width: 100%; }
.btn-lg { min-height: calc(var(--tap) + 8px); font-size: 1.1em; padding: 0 26px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .85em; font-weight: 600; }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ---------- Badges / Status ---------- */
.badge { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 20px; font-size: .8em; font-weight: 700; white-space: nowrap; }
.badge.big { font-size: .95em; padding: 7px 16px; }
.st-open { background: var(--gray-bg); color: var(--muted); }
.st-appeared { background: var(--blue-bg); color: var(--primary-d); }
.st-accepted { background: var(--green-bg); color: var(--green); }
.st-rejected { background: var(--red-bg); color: var(--red); }
.st-noshow { background: var(--amber-bg); color: var(--amber); }

/* ---------- Admin-Flag (Kommentar) ---------- */
.adminflag { background: var(--amber-bg); color: #7a5310; border-left: 4px solid var(--amber); padding: 8px 12px; border-radius: 8px; font-weight: 600; margin-top: 8px; }
.adminflag.big { font-size: 1.05em; padding: 14px 18px; margin: 18px 0; }
.adminflag.inline { margin: 0; padding: 4px 10px; font-size: .85em; font-weight: 600; }

/* ---------- Dashboard ---------- */
.dash-section { margin-bottom: 30px; }
.dash-section h2 { display: flex; align-items: center; gap: 10px; font-size: 1.25em; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot-today { background: var(--green); }
.dot-week { background: var(--primary); }
.dot-later { background: var(--amber); }
.dash-today { background: linear-gradient(180deg, #ffffff, #f7faff); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }
.mode-tablet .cardgrid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.cardgrid.past { opacity: .75; }

.appcard { display: flex; align-items: stretch; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); color: var(--ink); transition: transform .08s, box-shadow .12s; }
.appcard:hover { text-decoration: none; box-shadow: var(--shadow-h); transform: translateY(-2px); }
.appcard-time { display: flex; align-items: center; justify-content: center; min-width: 74px; padding: 0 6px; border-right: 1px solid var(--line); }
.t-clock { font-size: 1.5em; font-weight: 800; color: var(--primary-d); }
.mode-tablet .t-clock { font-size: 1.8em; }
.appcard-main { flex: 1; min-width: 0; }
.appcard-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.appcard-name { font-weight: 800; font-size: 1.1em; }
.appcard-pos { color: var(--muted); margin-top: 2px; }
.appcard-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .85em; margin-top: 8px; }
.appcard-go { display: flex; align-items: center; font-size: 1.8em; color: var(--line); }
.past-summary { cursor: pointer; font-weight: 700; color: var(--muted); padding: 8px 0; }

/* ---------- Liste (Tabelle / Karten) ---------- */
.filterbar { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.filterbar input[type=search] { flex: 1; min-width: 200px; }
.filterbar input, .filterbar select { min-height: var(--tap); }
.table-wrap { overflow-x: auto; }
.ltable { width: 100%; }
.lt-head, .lt-row { display: grid; grid-template-columns: 130px 1.5fr 1.2fr 180px 1.4fr; gap: 14px; align-items: center; }
.lt-head { padding: 8px 14px; color: var(--muted); font-size: .8em; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.lt-row { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; color: var(--ink); box-shadow: var(--shadow); }
.lt-row:hover { text-decoration: none; box-shadow: var(--shadow-h); }
.lt-d { font-weight: 700; display: block; }
.lt-t { color: var(--muted); font-size: .85em; }
.c-name { font-weight: 700; }
.mode-tablet .lt-head { display: none; }
.mode-tablet .lt-row { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; }
.mode-tablet .c-name { font-size: 1.2em; }

/* ---------- Detail ---------- */
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 8px; flex-wrap: wrap; }
.detail-pos { color: var(--muted); margin-top: 4px; font-size: 1.05em; }
.termin-line { font-size: 1.15em; margin: 6px 0 18px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.mode-tablet .detail-grid { grid-template-columns: 1fr; }
@media (max-width: 760px) { .detail-grid { grid-template-columns: 1fr; } }

.datalist { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; margin: 0; }
.datalist dt { color: var(--muted); font-weight: 600; }
.datalist dd { margin: 0; }

/* Workflow */
.workflow .wf-step { padding: 14px 0; border-top: 1px dashed var(--line); }
.workflow .wf-step:first-of-type { border-top: none; padding-top: 0; }
.wf-q { font-weight: 700; margin-bottom: 12px; font-size: 1.05em; }
.wf-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.wf-result { font-weight: 800; font-size: 1.1em; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wf-result.ok { color: var(--green); }
.wf-result.bad { color: var(--red); }
.wf-meta { font-weight: 500; font-size: .72em; color: var(--muted); }
.reason-box { margin-top: 10px; background: var(--red-bg); border-radius: 8px; padding: 10px 14px; }
.wf-reset { margin-top: 16px; }
details.reject summary { list-style: none; }
details.reject summary::-webkit-details-marker { display: none; }
details.reject .reject-form { margin-top: 12px; background: var(--red-bg); padding: 14px; border-radius: 10px; display: flex; flex-direction: column; gap: 10px; max-width: 460px; }
.req::after { content: " *"; color: var(--red); }

/* Dateien */
.filelist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.filelist.mini li { padding: 6px 0; }
.filelist li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; }
.filelink { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--ink); font-weight: 600; }
.fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ficon { font-size: 1.2em; }
.fdel .x { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.1em; padding: 4px 8px; }
.fdel .x:hover { color: var(--red); }

/* Dropzone */
.addfiles { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.dropzone { border: 2px dashed #c3cede; border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); cursor: pointer; background: #fafcff; transition: .12s; }
.dropzone:hover, .dropzone.dragover { border-color: var(--primary); background: var(--blue-bg); color: var(--primary-d); }
.dz-text u { color: var(--primary); }
.dz-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.dz-list li { background: var(--blue-bg); color: var(--primary-d); border-radius: 20px; padding: 4px 12px; font-size: .85em; font-weight: 600; }

/* ---------- Formulare ---------- */
label { display: block; font-weight: 600; margin-bottom: 14px; }
input, select, textarea { font: inherit; width: 100%; padding: 11px 13px; border: 1px solid #c8d1de; border-radius: 9px; background: #fff; color: var(--ink); margin-top: 6px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,237,.15); }
textarea { resize: vertical; }
.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.formgrid .span2 { grid-column: 1 / -1; }
@media (max-width: 680px) { .formgrid { grid-template-columns: 1fr; } }
.mode-tablet .formgrid { grid-template-columns: 1fr; }
.bigform .card { margin-bottom: var(--gap); }

/* Users-Tabelle */
.utable { width: 100%; border-collapse: collapse; }
.utable th, .utable td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.utable th { color: var(--muted); font-size: .8em; text-transform: uppercase; }
tr.inactive { opacity: .5; }
.uactions { display: flex; flex-direction: column; gap: 8px; }
.inline-form { display: flex; gap: 6px; align-items: center; }
.inline-form input { margin: 0; min-height: 36px; max-width: 180px; }

/* ---------- Login ---------- */
.loginbody { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.loginbox { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 36px 32px; box-shadow: var(--shadow-h); width: 100%; max-width: 380px; text-align: center; }
.login-logo { font-size: 3em; }
.loginbox h1 { margin: 6px 0 2px; }
.login-sub { color: var(--muted); margin: 0 0 22px; }
.loginbox label { text-align: left; }
.loginbox .btn { margin-top: 8px; }

/* ---------- Error ---------- */
.errorpage { text-align: center; padding: 60px 20px; }
.errcode { font-size: 4em; font-weight: 800; color: var(--line); }
