/* Mietkoch24 Partner-App. Farben: Schwarz und Orange #FF9828. */
:root {
  --ink: #141414;
  --orange: #FF9828;
  --ground: #F4F2EE;
  --card: #FFFFFF;
  --muted: #5C5C5C;
  --line: #E2DFD8;
  --field-line: #8A8A8A;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}
body.dark { background: var(--ink); color: #FFFFFF; }
a { color: var(--ink); }
h1 { margin: 0; font-size: 26px; line-height: 1.2; }
h2 { margin: 8px 0 0; font-size: 17px; }
.muted { color: var(--muted); font-size: 14px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; padding-top: calc(14px + env(safe-area-inset-top));
  background: var(--ink); color: #FFFFFF;
}
.brand { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; color: #FFFFFF; text-decoration: none; }
.brand span { color: var(--orange); }
.brand.big { margin: 0; font-size: 40px; }
.role { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid #5C5C5C; color: #D6D6D6; }

.nav {
  order: 3; position: sticky; bottom: 0;
  display: flex; background: var(--ink);
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
}
.nav a {
  flex: 1 1 0; min-width: 0; min-height: 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: #C9C9C9; font-size: 12px; font-weight: 600; text-decoration: none;
}
.nav a[aria-current="page"] { color: var(--orange); }

.page {
  order: 2; flex: 1; width: 100%; max-width: 720px; margin: 0 auto;
  padding: 20px; display: flex; flex-direction: column; gap: 16px;
}
@media (min-width: 800px) {
  .nav { order: 1; position: static; justify-content: center; padding: 0 8px; border-top: 1px solid #2E2E2E; }
  .nav a { flex: 0 0 auto; flex-direction: row; gap: 8px; padding: 0 18px; font-size: 14px; }
}

.auth {
  flex: 1; width: 100%; max-width: 440px; margin: 0 auto; padding: 32px;
  display: flex; flex-direction: column; justify-content: center; gap: 16px;
}
.lead { margin: 0 0 8px; font-size: 17px; color: #D6D6D6; }
.hint { margin: 0; font-size: 13px; color: #BDBDBD; }
.auth .link { align-self: center; min-height: 44px; display: inline-flex; align-items: center; color: #FFFFFF; font-weight: 600; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; color: var(--ink); text-decoration: none; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.num { font-size: 30px; font-weight: 800; line-height: 1; }
.pill { flex-shrink: 0; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #E8E6E0; color: var(--ink); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, label { font-size: 13px; font-weight: 600; }
input, select {
  width: 100%; height: 48px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--field-line); background: #FFFFFF; color: var(--ink);
  font: inherit;
}
body.dark input { background: #1F1F1F; color: #FFFFFF; border-color: #5C5C5C; }
body.dark label { color: #D6D6D6; }
input:focus-visible, select:focus-visible, .btn:focus-visible, a:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.field-error { margin: 0; font-size: 13px; font-weight: 600; color: #A8200D; }
body.dark .field-error { color: #FFB4A8; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center;
}
.btn.primary { background: var(--orange); color: var(--ink); }
.btn.dark { background: var(--ink); color: #FFFFFF; }
.btn.outline { background: #FFFFFF; color: var(--ink); border-color: var(--ink); }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 14px; }
form > .btn, .page > .btn, .page > form > .btn, .auth .btn { width: 100%; }
.actions form > .btn, .row form > .btn { width: auto; }

.notice { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--ink); color: #FFFFFF; font-weight: 600; }
.notice.error { background: #FBE3DF; color: #7A1608; }

/* Modul Aufträge */
textarea {
  width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--field-line);
  background: #FFFFFF; color: var(--ink); font: inherit; resize: vertical;
}
textarea:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
input[type="checkbox"] { width: 22px; height: 22px; padding: 0; flex-shrink: 0; accent-color: var(--ink); }
.field div label { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; font-weight: 400; }
[hidden] { display: none !important; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid #BDBDBD; background: #FFFFFF; color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none;
}
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.job { gap: 6px; }
.job .row { flex-wrap: nowrap; align-items: flex-start; }
.job-title { font-size: 17px; }
.small { font-size: 13px; }
.pill.orange { background: #FFE9CF; color: #5A3200; }
.pill.dark { background: var(--ink); color: #FFFFFF; }
.pill.line { background: #FFFFFF; color: var(--muted); border: 1px solid #BDBDBD; }
.back { align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; text-decoration: none; }
.facts { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.text { margin: 0; }

/* Umschalter Verwaltung / Partner-Ansicht */
button.role {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  background: transparent; color: #FFFFFF; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
button.role.partner { border-color: var(--orange); color: var(--orange); }
button.role:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
