/*
 * Anexia-Design, dunkel.
 *
 * Farben und Formensprache stammen aus dem Stylesheet von anexia.com:
 * Primärgrün #77bc1f, Corporate-Blau (#003ca6 hell aufgezogen zu #428bca, damit es
 * auf dunklem Grund lesbar bleibt), Grautöne #e3e3e3/#9e9e9e/#686868, Rot #d50000
 * und durchgehend scharfe Kanten (border-radius: 0 ist dort die häufigste Angabe).
 *
 * Schrift ist der Anexia-Stack: MetaWebPro ist lizenzpflichtig und wird deshalb nicht
 * mitgeliefert — ohne die Firmenschrift greift derselbe Fallback wie auf anexia.com.
 */
:root {
  --bg: #17191a;
  --panel: #212325;
  --bezel: #0f1011;
  --line: #383b3d;
  --text: #e3e3e3;
  --muted: #9e9e9e;
  /* Anexias #686868 käme auf dunklem Panel nur auf 2.8:1 – auf AA aufgehellt. */
  --dim: #8a8a8a;

  --green: #77bc1f;       /* Anexia-Primärfarbe */
  --green-hi: #8ad42a;
  /* Anexia-Blau #003ca6 liegt auf dunklem Grund bei 1.9:1; aufgehellt auf AA. */
  --blue: #5a9bd8;

  --led-green: #77bc1f;   /* verfügbar */
  --led-amber: #ffb000;   /* reserviert */
  --led-red: #d50000;     /* verkauft */

  --font-sans: MetaWebPro, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
}

.mono { font-family: var(--font-mono); }

a { color: var(--green); }

/* ---------- Header ---------- */
header {
  border-bottom: 1px solid var(--line);
  padding: 48px 24px 32px;
  max-width: 1100px;
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.eyebrow a { text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }

h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

header p {
  color: var(--muted);
  max-width: 640px;
  margin-top: 12px;
  font-size: 15px;
}

.legend {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.legend span { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- LEDs ---------- */
.led {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.led--green { background: var(--led-green); box-shadow: 0 0 6px var(--led-green); }
.led--amber { background: var(--led-amber); box-shadow: 0 0 6px var(--led-amber); animation: blink 1.4s steps(1) infinite; }
.led--red   { background: var(--led-red); box-shadow: 0 0 5px var(--led-red); }

@keyframes blink { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .led--amber { animation: none; } }

/* ---------- Filter ---------- */
.filters {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
}

.filters a {
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 5px 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.filters a:hover { color: var(--text); border-color: var(--muted); }
.filters a[aria-current="true"] {
  color: #14171c;
  background: var(--green);
  border-color: var(--green);
}

/* ---------- Grid ---------- */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

main.single { display: block; max-width: 720px; }

/* ---------- Server-Karte ---------- */
.server {
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Frontblende: Asset-Tag + Status-LED */
.bezel {
  background: var(--bezel);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  gap: 12px;
}

.bezel .status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.body { padding: 18px 16px; flex: 1; display: flex; flex-direction: column; }

.model { font-size: 18px; font-weight: 700; }

.form-factor {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
  margin-left: 8px;
}

/* Spec-Tabelle wie dmidecode-Output */
.specs {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  margin: 14px 0 18px;
  width: 100%;
  border-collapse: collapse;
}
.specs td { padding: 3px 0; vertical-align: top; }
.specs td:first-child { color: var(--dim); width: 72px; }
.specs td:last-child { color: var(--text); }

.footer-row {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.price {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 500;
}
.price small { font-size: 11px; color: var(--muted); display: block; font-weight: 400; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-sans);
  font-size: 13px;
  text-decoration: none;
  color: #14171c;
  background: var(--green);
  padding: 9px 16px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid var(--green);
  cursor: pointer;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.btn:hover { background: var(--green-hi); border-color: var(--green-hi); }
.btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.btn--disabled {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  pointer-events: none;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn--ghost:hover { background: transparent; border-color: var(--green); color: var(--green); }

.btn--danger { background: transparent; color: var(--led-red); border: 1px solid var(--line); }
.btn--danger:hover { background: transparent; border-color: var(--led-red); }

.empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ---------- Formulare / Admin ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 24px;
}

.field { margin-bottom: 16px; }

label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

input, select {
  width: 100%;
  background: var(--bezel);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  padding: 9px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
}

input:focus, select:focus { outline: none; border-color: var(--green); }

.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }

.hint { color: var(--muted); font-size: 12px; margin-top: 6px; }

.spec-row { display: flex; gap: 10px; margin-bottom: 8px; }
.spec-row input:first-child { max-width: 140px; }

.alert {
  border: 1px solid var(--led-red);
  color: #ff6a63;
  padding: 10px 12px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

/* ---------- Admin-Tabelle ---------- */
.admin-list { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-list th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 400;
  padding: 0 12px 10px 0;
  border-bottom: 1px solid var(--line);
}
.admin-list td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-list tr:last-child td { border-bottom: none; }
.admin-list .tag { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.admin-list .tag a { color: var(--blue); }
.admin-list form { display: inline; }
.admin-list select { width: auto; padding: 5px 8px; font-size: 12px; }
.table-wrap { overflow-x: auto; }

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.link-btn:hover { color: var(--led-red); }

/* ---------- Karten-Meta: Bestand + NetBox ---------- */
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: -6px 0 16px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.stock { color: var(--muted); }

.netbox {
  color: var(--blue);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 2px 8px;
  white-space: nowrap;
}
.netbox:hover { border-color: var(--blue); }

.add-form { display: flex; gap: 8px; align-items: center; }
.add-form select { width: auto; padding: 8px 6px; font-size: 12px; }

/* ---------- Hinweis-Banner ---------- */
.notice-wrap { max-width: 1100px; margin: 0 auto; padding: 20px 24px 0; }
.notice {
  border: 1px solid var(--led-amber);
  color: var(--led-amber);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

/* ---------- Ticket-Verlauf ---------- */
.note {
  border-left: 2px solid var(--line);
  padding: 8px 0 8px 12px;
  margin-bottom: 10px;
  font-size: 14px;
}
.note--public { border-left-color: var(--green); }
.note-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 3px;
}

/* ---------- Footer ---------- */
.page-footer {
  border-top: 1px solid var(--line);
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
