/* Bug-Portal – eigenständiges Stylesheet, kein Build-Schritt nötig.
   Farben und Schriften übernommen aus riccardo-zigarette.de. */

/* Barlow (Fließtext) und Barlow Semi Condensed (Überschriften, Bedienelemente),
   wie im Shop. Auf den Latin-Zeichensatz reduziert und als WOFF2 lokal
   ausgeliefert – kein externer Font-Dienst. */
@font-face {
  font-family: "Barlow";
  src: url("/fonts/Barlow-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("/fonts/BarlowSemiCondensed-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("/fonts/BarlowSemiCondensed-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("/fonts/BarlowSemiCondensed-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f4f4f5;
  --surface: #ffffff;
  --surface-alt: #f4f4f5;
  --border: #e2e2e4;
  --border-strong: #c4c4c7;
  --text: #2c2c2c;
  /* Der Shop setzt Fließtext auf #949494; das reicht auf Weiß nicht für
     Formularbeschriftungen (2,8:1), deshalb hier der abgedunkelte Ton. */
  --text-muted: #6e6e6e;
  --accent: #eb0025;
  --accent-dark: #9c0f25;
  --accent-soft: #fdecef;
  --dark: #2c2c2c;
  --dark-gradient: linear-gradient(#181717, #2c2c2c);
  --ok: #157347;
  --ok-soft: #e8f5ee;
  --warn: #a86612;
  --warn-soft: #fdf3e3;
  --info: #1f5fa9;
  --info-soft: #eaf2fb;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(24, 23, 23, .05), 0 4px 16px rgba(24, 23, 23, .06);
  --font: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Barlow Semi Condensed", "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, legend, .brand, .btn, table.list th {
  font-family: var(--font-head);
}

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }
.wrap--wide { max-width: 1180px; }

/* ---------- Kopf ---------- */

.site-header {
  background: var(--dark-gradient);
  border-bottom: 3px solid var(--accent);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  text-decoration: none;
}
.brand img { display: block; height: 34px; width: auto; }
.brand__title {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: .01em;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, .25);
}
@media (max-width: 520px) {
  .brand__title { padding-left: 0; border-left: 0; }
}
.site-header nav {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 14px;
  color: rgba(255, 255, 255, .7);
}
.site-header nav a { color: #fff; text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }
.site-header nav .btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, .35);
  color: #fff;
}
.site-header nav .btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.site-header nav .muted { color: rgba(255, 255, 255, .7); }

/* ---------- Grundbausteine ---------- */

main { padding: 32px 0 64px; }

.page-title { font-size: 26px; margin: 0 0 6px; letter-spacing: -.01em; }
.page-intro { color: var(--text-muted); margin: 0 0 28px; max-width: 62ch; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}
.card__title { margin: 0 0 4px; font-size: 16px; }
.card__hint { margin: 0 0 20px; color: var(--text-muted); font-size: 14px; }

.grid-2 { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Formular ---------- */

.field { margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }
.field > label,
.fieldset > legend {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  padding: 0;
}
.field__hint { color: var(--text-muted); font-size: 13px; margin: 0 0 8px; }

input[type=text], input[type=email], input[type=url], input[type=password], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  font: inherit;
}
textarea { min-height: 130px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
input[type=file] { font: inherit; }

.fieldset { border: 0; padding: 0; margin: 0 0 20px; }

.choice-grid { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .choice-grid { grid-template-columns: 1fr; } }

.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  background: var(--surface);
}
.choice:hover { border-color: var(--accent); }
.choice input { margin-top: 3px; accent-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice strong { display: block; font-size: 14px; }
.choice span { color: var(--text-muted); font-size: 13px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 4px; accent-color: var(--accent); }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.error { color: var(--accent); font-size: 13px; margin: 6px 0 0; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); color: #fff; }
.btn--ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--text-muted); color: var(--text); }
.btn--small { padding: 7px 12px; font-size: 14px; }

.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-actions p { margin: 0; color: var(--text-muted); font-size: 13px; }

/* ---------- Hinweise ---------- */

.alert {
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 15px;
  border: 1px solid;
}
.alert--ok { background: var(--ok-soft); border-color: #b7dfc7; color: #0f5132; }
.alert--error { background: var(--accent-soft); border-color: #f1c2c4; color: var(--accent-dark); }
.alert--info { background: var(--info-soft); border-color: #c2d9f1; color: #163f6e; }
.alert ul { margin: 8px 0 0; padding-left: 20px; }

/* ---------- Badges ---------- */

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge--new       { background: var(--info-soft); color: #163f6e; border-color: #c2d9f1; }
.badge--accepted  { background: var(--info-soft); color: #163f6e; border-color: #c2d9f1; }
.badge--progress  { background: var(--warn-soft); color: var(--warn); border-color: #f0d7ac; }
.badge--waiting   { background: var(--warn-soft); color: var(--warn); border-color: #f0d7ac; }
.badge--done      { background: var(--ok-soft); color: #0f5132; border-color: #b7dfc7; }
.badge--declined  { background: var(--surface-alt); color: var(--text-muted); border-color: var(--border-strong); }
.badge--bug       { background: var(--accent-soft); color: var(--accent-dark); border-color: #f1c2c4; }
.badge--feature   { background: #f0ecfb; color: #4b3592; border-color: #d8cff3; }
.badge--urgent    { background: var(--accent); color: #fff; }
.badge--high      { background: var(--warn-soft); color: var(--warn); border-color: #f0d7ac; }
.badge--muted     { background: var(--surface-alt); color: var(--text-muted); border-color: var(--border); }

/* ---------- Tabellen ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
table.list th { background: var(--surface-alt); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
table.list tr:last-child td { border-bottom: 0; }
table.list tr:hover td { background: #fafbfc; }
table.list td.ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; white-space: nowrap; }
table.list a.subject { font-weight: 600; color: var(--text); text-decoration: none; }
table.list a.subject:hover { color: var(--accent); text-decoration: underline; }
.muted { color: var(--text-muted); font-size: 13px; }

/* ---------- Filterleiste ---------- */

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 18px;
}
.toolbar label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.toolbar select, .toolbar input { width: auto; min-width: 150px; padding: 8px 10px; }
.toolbar .grow { flex: 1 1 220px; }
.toolbar .grow input { width: 100%; }

/* ---------- Detailansicht ---------- */

.detail { display: grid; gap: 20px; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); align-items: start; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } }

.meta { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.meta li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.meta li:last-child { border-bottom: 0; }
.meta dt, .meta .k { color: var(--text-muted); }
.meta .v { text-align: right; word-break: break-word; }

.prose { white-space: pre-wrap; word-wrap: break-word; }
.prose--boxed {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 15px;
}

.attachments { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.attachments li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.attachments .icon {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: 6px; font-size: 15px;
}

/* ---------- Verlauf ---------- */

.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.thread li { border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; background: var(--surface); }
.thread li.is-internal { background: var(--warn-soft); border-color: #f0d7ac; }
.thread li.is-team { border-left: 3px solid var(--accent); }
.thread__head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; flex-wrap: wrap; }
.thread__head strong { color: var(--text); }

/* ---------- Statusverlauf beim Kunden ---------- */

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.steps li {
  flex: 1 1 110px;
  text-align: center;
  font-size: 12px;
  padding: 8px 6px;
  border-radius: 6px;
  background: var(--surface-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.steps li.is-done { background: var(--ok-soft); color: #0f5132; border-color: #b7dfc7; }
.steps li.is-current { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }

/* ---------- Fußzeile ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--surface);
}
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.pagination { margin-top: 18px; font-size: 14px; }
.pagination svg { width: 16px; height: 16px; }
