/* Helles Design in den Farben des Ottemeier-Logos. */
:root {
  --bg: #f3f6fa;
  --card: #ffffff;
  --ink: #1d2a3a;
  --muted: #607089;
  --line: #dfe5ee;
  --brand: #0b3d8c;       /* Dunkelblau (Logo) */
  --brand-light: #1aa3e0; /* Hellblau (Logo) */
  --gold: #c9a063;        /* Akzent (Logo) */
  --ok: #1f8a4c;
  --warn: #b7791f;
  --err: #c53030;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16,40,80,.06), 0 6px 20px rgba(16,40,80,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
a { color: var(--brand); }
a:hover { color: var(--brand-light); }

/* ---- Kopfbereich ---------------------------------------------------- */
.topbar {
  background: var(--card);
  border-bottom: 3px solid var(--brand);
  box-shadow: var(--shadow);
}
.topbar-inner, .adminnav-inner, .foot-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand img { display: block; height: 58px; width: auto; max-width: 100%; }
.partner-logo { display: block; height: 44px; width: auto; max-width: 45%; object-fit: contain; }
.brand-sub {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.adminnav { background: var(--brand); }
.adminnav-inner { display: flex; flex-wrap: wrap; gap: 2px; }
.adminnav a {
  color: #e6eefb;
  text-decoration: none;
  padding: 11px 16px;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 3px solid transparent;
}
.adminnav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.adminnav a.active { color: #fff; border-bottom-color: var(--brand-light); background: rgba(255,255,255,.1); }
.adminnav a.logout { margin-left: auto; }

/* ---- Inhalt --------------------------------------------------------- */
.page {
  flex: 0 0 auto;
  width: 100%;
  max-width: 680px;
  margin: 32px auto;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.page.wide { max-width: 1180px; background: transparent; border: 0; box-shadow: none; padding: 0 16px; }
h1 { margin: 0 0 20px; font-size: 24px; color: var(--brand); }
h2 { font-size: 17px; margin: 26px 0 10px; color: var(--brand); }
.panel h2:first-child, .panel h2.panel-title { margin-top: 0; }
p { color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 22px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.panel-head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; }
.grid-2 > * { min-width: 0; }

/* Kennzahlen-Kacheln */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--ink);
}
.stat:hover { border-color: var(--brand-light); color: var(--ink); }
.stat .num { font-size: 28px; font-weight: 700; line-height: 1.1; color: var(--brand); }
.stat .lbl { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat.ok { border-left-color: var(--ok); }
.stat.warn { border-left-color: var(--warn); }
.stat.err { border-left-color: var(--err); }
.stat.info { border-left-color: var(--brand-light); }
.stat.gold { border-left-color: var(--gold); }

/* ---- Formulare ------------------------------------------------------ */
label { display: block; margin: 14px 0 6px; font-weight: 600; font-size: 14px; }
label.check { font-weight: 500; display: flex; gap: 8px; align-items: center; }
input[type=text], input[type=email], input[type=password], input[type=file],
input[type=date], input[type=search], select {
  width: 100%;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #c9d3e1;
  border-radius: 8px;
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
}
input:focus, select:focus { outline: 2px solid rgba(26,163,224,.35); border-color: var(--brand-light); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select { width: auto; flex: 1 1 180px; }
.toolbar button { margin-top: 0; }
.inline-form { display: inline; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.actions button, .actions .btn { margin-top: 0; }

button, .btn {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 18px;
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
button:hover, .btn:hover { background: #0a3478; color: #fff; }
button.secondary, .btn.secondary { background: #fff; color: var(--brand); border-color: #c9d3e1; }
button.secondary:hover, .btn.secondary:hover { background: #eef4fb; color: var(--brand); }
button.danger { background: #fff; color: var(--err); border-color: #e9b8b8; }
button.danger:hover { background: #fdf0f0; color: var(--err); }
button.disabled, .btn.disabled, button:disabled { background: #e9edf3; color: #98a4b5; border-color: #e9edf3; pointer-events: none; }
.btn.small, button.small { padding: 5px 11px; font-size: 13px; margin-top: 0; }

/* ---- Meldungen, Tabellen, Badges ----------------------------------- */
.msg { padding: 11px 14px; border-radius: 8px; margin: 6px 0 16px; background: #eef4fb; border: 1px solid #c7daf0; color: var(--ink); }
.msg.ok { background: #ebf7f0; border-color: #a8dcbd; }
.msg.error { background: #fdeeee; border-color: #f0b4b4; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; background: #f7f9fc; }
tbody tr:hover td { background: #f7fafd; }
table.kv th { width: 200px; text-transform: none; font-size: 14px; background: transparent; }
td.wrap { max-width: 280px; }
.empty { color: var(--muted); padding: 14px 0; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #e9edf3; color: #475569; white-space: nowrap; }
.badge.ok { background: #dcf3e5; color: var(--ok); }
.badge.warn { background: #fdf1dc; color: var(--warn); }
.badge.err { background: #fbe1e1; color: var(--err); }
.badge.done { background: #dbeefb; color: #0d6aa3; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---- Fußbereich ----------------------------------------------------- */
.foot { background: var(--card); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; margin-top: auto; }
.foot-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 18px; padding-bottom: 18px; }
.foot-company { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.foot-company strong { color: var(--brand); }
.foot-links { display: flex; gap: 18px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--brand); }

.once-list { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; background: #f7f9fc; }
.once-head { font-size: 13px; font-weight: 700; color: var(--muted); margin: 4px 0; }
.once-item { margin: 6px 0; word-break: break-all; }
[hidden] { display: none !important; }

/* ---- Auswertung M365-Migrationscheck ------------------------------ */
.verdict {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--muted);
  background: var(--card);
}
.verdict.yes { border-left-color: var(--err); background: #fff7f7; }
.verdict.no { border-left-color: var(--ok); background: #f4fbf7; }
.verdict-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.verdict-value { font-size: 26px; font-weight: 700; margin: 2px 0 6px; }
.verdict.yes .verdict-value { color: var(--err); }
.verdict.no .verdict-value { color: var(--ok); }
.verdict-meta { color: var(--muted); font-size: 14px; }
.verdict-points { margin: 16px 0 0; padding-left: 22px; }
.verdict-points li { margin-bottom: 10px; }
.verdict-points span { color: var(--muted); font-size: 14px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 22px; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.fact .lbl { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.fact .val { font-weight: 600; margin-top: 2px; word-break: break-word; }
details.section > summary { cursor: pointer; font-weight: 700; color: var(--brand); font-size: 16px; margin-bottom: 10px; }
details.section:not([open]) > summary { margin-bottom: 0; }
tr.subhead th { background: #eef4fb; color: var(--brand); text-transform: none; font-size: 14px; }
td.result { background: #ebf7f0; font-weight: 600; }
td.note { color: var(--ink); }
td.indent { padding-left: 28px; }

@media (max-width: 860px) {
  .grid-2, .form-row { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
}
@media (max-width: 560px) {
  .page { margin: 16px; width: auto; padding: 20px 16px; }
  .page.wide { margin: 16px auto; }
  .brand img { height: 44px; }
  .partner-logo { height: 30px; }
  .adminnav a { padding: 9px 11px; }
  .adminnav a.logout { margin-left: 0; }
}

/* Aufklappbarer Hinweis (z. B. Download-Warnungen) */
details.hint { margin-top: 14px; border: 1px solid #c7daf0; background: #eef4fb; border-radius: 8px; padding: 10px 14px; }
details.hint > summary { cursor: pointer; font-weight: 600; color: var(--brand); }
details.hint p, details.hint li { color: var(--ink); font-size: 14px; }
details.hint ul { padding-left: 20px; margin: 8px 0; }
details.hint li { margin-bottom: 6px; }

/* Schrittanzeige auf der Anmeldeseite */
.step { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--brand-light); }
.step + h2 { margin-top: 0; }
.secondary-actions { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
