/* ============================================================================
   TrackX — Ergänzungen zum UI-Kit (gleicher Stil, gleiche Tokens).
   ========================================================================== */

/* ============================================================================
   THEME „Ember" — Akzent von Indigo auf Amber→Orange umgestellt.
   Sekundärakzent bleibt Teal (kühler Kontrast). Verläufe laufen Amber → Orange.
   ========================================================================== */
:root {
  --accent:      #f59e0b;                       /* Primär: Amber */
  --accent-grad: #f97316;                       /* Verlauf-Partner: Orange */
  --accent-ink:  #1a1206;                       /* Text auf Akzentflächen */
  --accent-soft: rgba(245, 158, 11, 0.14);
  --accent-glow: rgba(245, 158, 11, 0.42);
  /* --accent-2 (Teal #28e0c8) bleibt aus dem Kit als Kontrast erhalten. */
}

/* App-Hintergrund: oberes Glow Amber, unteres Teal */
body {
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(245, 158, 11, 0.11), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(40, 224, 200, 0.06), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

/* Verläufe, die im Kit hartcodiertes Indigo nutzten → Amber → Orange */
.brand__mark { background: linear-gradient(135deg, var(--accent), var(--accent-grad)); color: var(--accent-ink); }
.btn--primary { background: linear-gradient(135deg, var(--accent), var(--accent-grad)); color: var(--accent-ink); border-color: transparent; }
/* Kit-Hover blendet hier ein hartcodiertes Blau (#6a7bff) ein -> mit Amber-Verlauf überschreiben. */
.btn--primary:hover { background: linear-gradient(135deg, var(--accent), var(--accent-grad)); filter: brightness(0.9); }
.btn--accent2, .btn--accent2:hover { background: linear-gradient(135deg, var(--accent), var(--accent-grad)); color: var(--accent-ink); }
.switch input:checked + .switch__track { background: linear-gradient(135deg, var(--accent), var(--accent-grad)); }
.check input:checked + .check__box { background: linear-gradient(135deg, var(--accent), var(--accent-grad)); border-color: transparent; }
.badge--accent { color: #ffd9a3; }

/* --- Login-Gate: zentrierte Karte über Vollbild --------------------------- */
.gate {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(245, 158, 11, 0.13), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(40, 224, 200, 0.07), transparent 55%),
    var(--bg);
}
.gate__card { width: min(420px, 100%); }
.gate__brand { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 22px; }
.gate__brand .brand__name { font-size: 24px; }
.gate__head { text-align: center; margin-bottom: 22px; }
.gate__title { font-family: var(--font-cond); text-transform: uppercase; letter-spacing: 1px; font-size: 18px; font-weight: 700; }
.gate__sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

/* --- Kleine Helfer -------------------------------------------------------- */
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--font-mono); }
.row-end { display: flex; justify-content: flex-end; gap: 10px; }
.nowrap { white-space: nowrap; }
.cell-actions { display: flex; gap: 6px; justify-content: flex-end; }
.cell-strong { font-weight: 500; color: var(--text); }
.cell-sub { font-size: 12px; color: var(--faint); }
.spacer { flex: 1; }
.stack-lg { display: flex; flex-direction: column; gap: 18px; }

/* Read-only Link-Box mit Copy (nutzt .input-group) */
.copy-addon { cursor: pointer; transition: color .15s var(--ease), background .15s var(--ease); }
.copy-addon:hover { background: var(--surface); color: var(--accent); }

/* --- Issue-Meta-Pills: Typ / Status / Priorität --------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 99px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .3px;
  border: 1px solid var(--border-2); background: var(--surface-3); color: var(--muted);
  white-space: nowrap;
}
.pill i { font-size: 11px; }

/* Typ */
.pill--bug      { color: #fda4b4; border-color: color-mix(in srgb, var(--danger) 40%, transparent);  background: color-mix(in srgb, var(--danger) 14%, transparent); }
.pill--feature  { color: #8ff0e2; border-color: color-mix(in srgb, var(--accent-2) 40%, transparent); background: color-mix(in srgb, var(--accent-2) 13%, transparent); }
.pill--question { color: #c4b5fd; border-color: color-mix(in srgb, #8b7cf6 45%, transparent);         background: color-mix(in srgb, #8b7cf6 15%, transparent); }

/* Status */
.pill--open        { color: #ffd9a3; border-color: color-mix(in srgb, var(--accent) 40%, transparent);  background: var(--accent-soft); }
.pill--in_progress { color: #a9cbff; border-color: color-mix(in srgb, var(--info) 40%, transparent);    background: color-mix(in srgb, var(--info) 14%, transparent); }
.pill--done        { color: #86efac; border-color: color-mix(in srgb, var(--success) 40%, transparent); background: color-mix(in srgb, var(--success) 13%, transparent); }

/* Priorität (nur high/low sichtbar hervorgehoben) */
.pill--prio-high { color: #fda4b4; border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.pill--prio-low  { color: var(--faint); }

/* --- Projekt-Karten (Übersicht) ------------------------------------------ */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.proj-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px 20px; border-radius: var(--r);
  background: linear-gradient(180deg, var(--surface), #11131a);
  border: 1px solid var(--border); cursor: pointer;
  transition: border-color .16s var(--ease), transform .16s var(--ease);
}
.proj-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-2px); }
.proj-card--archived { opacity: .6; }
.proj-card__head { display: flex; align-items: center; gap: 12px; }
.proj-card__key {
  display: grid; place-items: center; flex: none;
  min-width: 42px; height: 42px; padding: 0 8px; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-grad)); color: var(--accent-ink);
  font-family: var(--font-cond); font-weight: 700; font-size: 14px; letter-spacing: .5px;
}
.proj-card__name { font-family: var(--font-cond); text-transform: uppercase; letter-spacing: .6px; font-size: 16px; font-weight: 600; line-height: 1.2; }
.proj-card__desc { color: var(--muted); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.proj-card__meta { display: flex; gap: 16px; margin-top: auto; padding-top: 6px; color: var(--faint); font-size: 12.5px; }
.proj-card__meta b { color: var(--text); font-weight: 600; }

/* --- Issue-Liste (gruppiert nach Section) --------------------------------- */
/* Filter-Segmente werden per Klick/Klasse aktiv (ohne radio-Input). */
.segmented__opt.is-active { background: var(--accent-soft); color: #fff; }
.issue-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.issue-group { margin-bottom: 22px; }
.issue-group__head {
  display: flex; align-items: center; gap: 10px; margin: 0 2px 10px;
  font-family: var(--font-cond); text-transform: uppercase; letter-spacing: 1px;
  font-size: 12.5px; color: var(--muted);
}
.issue-group__count { color: var(--faint); font-weight: 400; }
.issue-group__desc { color: var(--muted); font-size: 12.5px; margin: -4px 2px 10px; line-height: 1.5; max-width: 80ch; white-space: pre-wrap; overflow-wrap: anywhere; }
.input--sm { padding: 8px 11px; font-size: 13px; }
.issue-list { display: flex; flex-direction: column; gap: 8px; }

.issue-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  cursor: pointer; transition: border-color .14s var(--ease), background .14s var(--ease);
}
.issue-row:hover { border-color: var(--border-2); background: var(--surface-3); }
.issue-row--done { opacity: .62; }
.issue-row--done:hover { opacity: 1; }
.issue-row__key { font-family: var(--font-mono); font-size: 12px; color: var(--faint); min-width: 62px; flex: none; }
.issue-row__type { flex: none; width: 22px; text-align: center; font-size: 15px; }
.issue-row__type--bug { color: var(--danger); }
.issue-row__type--feature { color: var(--accent-2); }
.issue-row__type--question { color: #a78bfa; }
.issue-row__main { flex: 1; min-width: 0; }
.issue-row__title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issue-row__sub { display: flex; align-items: center; gap: 12px; margin-top: 3px; font-size: 12px; color: var(--faint); }
.issue-row__sub .fa-light { margin-right: 3px; }
.issue-row__pills { display: flex; align-items: center; gap: 7px; flex: none; }
@media (max-width: 720px) {
  .issue-row__key { display: none; }
  .issue-row__pills .pill span { display: none; }
  .issue-row__pills .pill { padding: 4px 7px; }
}

/* --- Issue-Detail (Sub-View) --------------------------------------------- */
.page-head__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.page-head__left .page-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issue-detail { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .issue-detail { grid-template-columns: 1fr; } }

.issue-desc { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; color: var(--text); }
.issue-desc--empty { color: var(--faint); font-style: italic; }

.issue-side { display: flex; flex-direction: column; gap: 14px; }
.issue-side .card { padding: 16px 18px; }
.issue-side__label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--faint); font-family: var(--font-cond); margin-bottom: 7px; }

/* Anhänge-Galerie */
.att-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.att-thumb {
  position: relative; width: 92px; height: 92px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-3); cursor: zoom-in; line-height: 0;
}
.att-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.att-thumb:hover img { transform: scale(1.06); }
.att-file {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px;
  border-radius: var(--r-xs); background: var(--surface-2); border: 1px solid var(--border);
  font-size: 13px; color: var(--muted); max-width: 220px;
}
.att-file:hover { color: var(--accent); border-color: var(--border-2); }
.att-file i { color: var(--accent); flex: none; }
.att-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Kommentar-Thread ----------------------------------------------------- */
.thread { display: flex; flex-direction: column; gap: 14px; }
.comment {
  border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px 14px;
  background: var(--surface-2);
}
.comment--admin { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); background: var(--accent-soft); }
.comment__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.comment__who { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.comment__badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 2px 7px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); }
.comment__meta { font-size: 11px; color: var(--faint); white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.comment__del { border: none; background: none; color: var(--faint); cursor: pointer; padding: 2px; border-radius: 4px; line-height: 1; }
.comment__del:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 15%, transparent); }
.comment__body { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.comment__atts { margin-top: 10px; }
.comment-empty { color: var(--faint); font-size: 13.5px; padding: 6px 2px; }

/* Kommentar-Formular */
.comment-box { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

/* --- Dropzone-Zustand ----------------------------------------------------- */
.dropzone--sm { padding: 18px; gap: 4px; }
.dropzone--sm i { font-size: 22px; }
.dropzone.is-drag { border-color: var(--accent); background: var(--accent-soft); }

/* --- Nutzer-/Mitgliedschafts-Zeilen --------------------------------------- */
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.status-pill .dot { width: 8px; height: 8px; border-radius: 99px; display: inline-block; }
.dot--on { background: var(--success); box-shadow: 0 0 8px var(--success); }
.dot--off { background: var(--faint); }
.member-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2);
}
.member-row__main { flex: 1; min-width: 0; }
.avatar {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface-3); color: var(--accent); font-weight: 700; font-family: var(--font-cond); font-size: 15px;
  border: 1px solid var(--border-2);
}

/* --- Empty-States --------------------------------------------------------- */
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 54px 24px; text-align: center; color: var(--muted);
}
.empty i { font-size: 34px; color: var(--faint); }
.empty__title { font-family: var(--font-cond); text-transform: uppercase; letter-spacing: 1px; font-size: 15px; color: var(--text); }
.empty__sub { font-size: 13.5px; max-width: 42ch; }

/* --- Standalone-Seiten (Join / Portal-Login) ------------------------------ */
.standalone { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; min-height: 100vh; }
.standalone-head { display: flex; align-items: center; gap: 12px; justify-content: center; padding: 34px 0 26px; }
.standalone-head .brand__name { font-size: 26px; }
.public-footer { margin-top: auto; padding: 30px 16px 16px; text-align: center; font-size: 12px; line-height: 1.7; color: var(--faint); }
.public-footer a { color: var(--muted); }
.public-footer a:hover { color: var(--accent); }

/* --- Lightbox ------------------------------------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 40px;
  background: rgba(4, 5, 8, .74); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden; transition: opacity .2s var(--ease), visibility .2s var(--ease);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img { max-width: 92vw; max-height: 86vh; border-radius: 12px; box-shadow: var(--shadow-lg); transform: scale(.96); transition: transform .2s var(--ease); }
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__close, .lightbox__nav {
  position: absolute; display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .15); border-radius: 50%; transition: background .15s;
}
.lightbox__close { top: 18px; right: 22px; width: 40px; height: 40px; font-size: 20px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 22px; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, .2); }
.lightbox__nav--prev { left: 22px; }
.lightbox__nav--next { right: 22px; }
.lightbox__nav[hidden] { display: none; }
.lightbox__counter { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 13px; background: rgba(4, 5, 8, .5); padding: 4px 12px; border-radius: 999px; }
