/* ═══════════════════════════════════════════════════════════════
   TechFix Manager – Demo Mode Stylesheet
   Enthält: Base-App-Styles (aus base.html) + Demo-Banner-Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── BASE STYLES (aus base.html) ───────────────────────────── */
:root {
  --bg0: #0b1220;
  --bg1: #0b1730;
  --panel: rgba(255,255,255,0.06);
  --panel2: rgba(255,255,255,0.085);
  --border: rgba(255,255,255,0.12);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.66);
  --primary: #3b82f6;
  --primary2: #06b6d4;
  --good: #22c55e;
  --danger: #ef4444;
  --warn: #f59e0b;
  --shadow: 0 14px 46px rgba(0,0,0,0.40);
  --radius: 18px;
  --ring: 0 0 0 4px rgba(59,130,246,0.22);
  --glow1: rgba(59,130,246,0.26);
  --glow2: rgba(6,182,212,0.18);
  --line: rgba(255,255,255,0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 480px at 18% 8%, var(--glow1), transparent 60%),
    radial-gradient(760px 420px at 86% 12%, var(--glow2), transparent 58%),
    linear-gradient(180deg, var(--bg1) 0%, var(--bg0) 100%);
  background-attachment: scroll;
}

/* TOPBAR */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  height: 56px;
  background: rgba(8,13,24,0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03), 0 4px 24px rgba(0,0,0,0.32);
}
.topbar-inner {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 48px;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-right: 28px;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
  flex-shrink: 0; letter-spacing: -0.3px;
}
.brand-name { font-size: 13px; font-weight: 700; white-space: nowrap; line-height: 1.25; }
.brand-sub  { font-size: 10.5px; color: var(--muted); white-space: nowrap; line-height: 1.25; }

.topbar-nav {
  display: flex; align-items: center; gap: 1px; flex: 1; min-width: 0;
}
.nav-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px; font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.52); text-decoration: none;
  border-radius: 6px; transition: color .12s, background .12s;
  white-space: nowrap; cursor: pointer; border: none;
  background: transparent; line-height: 1; user-select: none;
}
.nav-link:hover { color: rgba(255,255,255,0.90); background: rgba(255,255,255,0.06); }
.nav-link.active { color: #fff; font-weight: 600; background: rgba(59,130,246,0.13); }

.topbar-meta {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: 16px;
}
.version-chip {
  font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 4px;
  border: 1px solid rgba(16,185,129,0.30); color: rgba(16,185,129,0.85);
  background: rgba(16,185,129,0.07); white-space: nowrap;
}
.demo-chip {
  font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 4px;
  border: 1px solid rgba(245,158,11,0.50); color: rgba(245,158,11,0.9);
  background: rgba(245,158,11,0.10); white-space: nowrap;
}

@media (max-width: 1040px) {
  .topbar-inner { padding: 0 20px; }
  .topbar-nav { overflow-x: auto; scrollbar-width: none; }
  .topbar-nav::-webkit-scrollbar { display: none; }
  .brand-sub { display: none; }
}

/* WRAP / CONTENT */
.wrap { max-width: 1180px; margin: 0 auto; padding: 80px 48px 100px; }
@media (max-width: 1040px) { .wrap { padding: 76px 20px 80px; } }
.content { margin-top: 18px; }

/* PAGE HEADER */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 24px; margin-bottom: 32px; padding-bottom: 24px;
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
@media (max-width: 768px) { .page-header { flex-direction: column; padding-bottom: 16px; margin-bottom: 24px; } }
.page-header-content h1 { margin: 0 0 8px; font-size: 32px; font-weight: 800; letter-spacing: -0.5px; }
.page-header-content h2 { margin: 0 0 8px; font-size: 32px; font-weight: 800; letter-spacing: -0.5px; }
.page-header-subtitle  { margin: 0; font-size: 13px; color: var(--muted); font-weight: 500; }
.page-header-actions   { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; white-space: nowrap; }

h2 { margin: 10px 0 14px; font-size: 26px; }
h3 { margin: 18px 0 10px; font-size: 18px; color: rgba(255,255,255,0.92); }

/* CARD */
.card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: rgba(255,255,255,0.05); box-shadow: var(--shadow); padding: 14px;
}

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

/* FORMS */
label { display: block; margin: 0 0 6px; font-size: 12px; color: var(--muted); }
input, textarea, select {
  width: 100%; padding: 10px 12px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10); background: rgba(0,0,0,0.22);
  color: var(--text); outline: none; transition: border-color .12s ease;
}
input:disabled, textarea:disabled, select:disabled {
  opacity: 0.55; cursor: not-allowed;
}
textarea { min-height: 100px; resize: vertical; }

/* BUTTONS */
.btn {
  padding: 10px 14px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.06);
  color: var(--text); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .12s ease, background .18s ease, border-color .18s ease;
  user-select: none;
}
.btn:hover { transform: translateY(-1px); background: rgba(255,255,255,0.095); border-color: rgba(255,255,255,0.24); }
.btn:disabled, .btn[disabled] {
  opacity: 0.45; cursor: not-allowed; transform: none !important;
  pointer-events: none;
}
.btn.primary {
  background: linear-gradient(180deg, rgba(59,130,246,0.95), rgba(37,99,235,0.78));
  border-color: rgba(59,130,246,0.65);
}
.btn.good {
  background: linear-gradient(180deg, rgba(34,197,94,0.92), rgba(21,128,61,0.72));
  border-color: rgba(34,197,94,0.62);
}
.btn.danger {
  background: linear-gradient(180deg, rgba(239,68,68,0.92), rgba(185,28,28,0.72));
  border-color: rgba(239,68,68,0.62);
}
.btn.small { padding: 7px 10px; border-radius: 4px; font-size: 12px; }

/* TABLES */
table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  overflow: hidden; border: 1px solid var(--border); border-radius: 16px;
  background: rgba(255,255,255,0.04);
}
th, td { padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.08); vertical-align: top; text-align: left; }
th { font-size: 12px; color: rgba(255,255,255,0.75); background: rgba(255,255,255,0.06); }
tr:last-child td { border-bottom: none; }

/* BADGE */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; font-size: 12px;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.06);
}
.badge.open     { border-color: rgba(245,158,11,0.45); background: rgba(245,158,11,0.12); }
.badge.paid     { border-color: rgba(34,197,94,0.45);  background: rgba(34,197,94,0.12); }
.badge.accepted { border-color: rgba(56,189,248,0.45); background: rgba(56,189,248,0.12); }

.maildot { display: inline-block; width: 10px; height: 10px; border-radius: 999px; vertical-align: middle; }
.maildot.sent    { background: #22c55e; box-shadow: 0 0 12px rgba(34,197,94,0.8); }
.maildot.notsent { background: rgba(255,255,255,0.22); }

.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.small   { font-size: 12px; color: var(--muted); }
.mono    { font-family: ui-monospace, monospace; }
.right   { text-align: right; }

/* ── DEMO MODE STYLES ──────────────────────────────────────── */

/* Gelber Hinweisbalken oben */
.demo-banner {
  position: fixed;
  top: 56px; left: 0; right: 0;
  z-index: 800;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  text-align: center;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.demo-banner a {
  color: #fff;
  text-decoration: underline;
  font-weight: 700;
}

/* Verschiebe den Seiteninhalt nach unten um Banner-Höhe */
.wrap { padding-top: 100px !important; }

/* Demo-Navigation (zurück / vor / zurück zur Vorschau) */
.demo-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 10px 14px;
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 12px;
}
.demo-nav-back-site {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  display: inline-flex; align-items: center; gap: 6px;
}
.demo-nav-back-site:hover { background: rgba(255,255,255,0.09); color: var(--text); }
.demo-nav-sep { color: var(--muted); font-size: 12px; flex: 1; text-align: center; }
.demo-nav-prev, .demo-nav-next {
  font-size: 12px;
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid rgba(59,130,246,0.35);
  border-radius: 6px;
  background: rgba(59,130,246,0.08);
  color: var(--primary);
  display: inline-flex; align-items: center; gap: 6px;
}
.demo-nav-prev:hover, .demo-nav-next:hover { background: rgba(59,130,246,0.15); }
.demo-nav-prev.disabled, .demo-nav-next.disabled {
  opacity: 0.35; pointer-events: none;
}

/* Demo-Toast-Hinweis */
#demo-toast {
  position: fixed;
  bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 9999;
  background: rgba(245,158,11,0.95);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}
#demo-toast.visible { opacity: 1; }
