@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;600;700;800&display=swap');

:root {
  --bg: #1F2F3D;
  --bg-elevated: #26394A;
  --bg-input: #1a2733;
  --text: #F5F7F9;
  --text-muted: #F5F7F9;
  --accent: #FFBE0A;
  --accent-text: #1F2F3D;
  --border: #34495C;
  --danger: #E8846B;
  --success: #8FBF7F;
  --font: 'Nunito Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 8px;
  --sidebar-width: 240px;
}

* { box-sizing: border-box; }

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

h1, h2, h3, h4 { font-weight: 800; letter-spacing: 0.01em; margin-top: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Layout ---------- */

.app-shell { display: flex; min-height: calc(100vh - 108px); margin-top: 108px; }

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.sidebar nav { display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar nav a, .sidebar nav button.navlink {
  display: block;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.sidebar nav a:hover, .sidebar nav button.navlink:hover { background: var(--bg-input); text-decoration: none; }
.sidebar nav a.active { background: var(--accent); color: var(--accent-text); }
.sidebar .who { margin-top: auto; font-size: 0.85rem; color: var(--text-muted); display: flex; flex-direction: column; gap: 0.5rem; }

.main-area { flex: 1; padding: 2rem 2.5rem; max-width: 1100px; }

/* ---------- Top-Leiste mit Logo ---------- */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 108px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.topbar img { height: 54px; width: auto; display: block; }

/* Layout ohne Sidebar (Login etc.) */
.center-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }

/* ---------- Komponenten ---------- */

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.card.narrow { max-width: 420px; width: 100%; }
.login-card { text-align: center; padding-top: 1rem; }
.login-card h1 { margin-bottom: 1rem; }

form { display: flex; flex-direction: column; gap: 1rem; }
label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.88rem; color: var(--text-muted); font-weight: 600; }

input, select, textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }

.password-field { position: relative; display: flex; }
.password-field input { flex: 1; padding-right: 2.75rem; }
.password-field .toggle-password {
  position: absolute; right: 0.3rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text);
  padding: 0.25rem; font-weight: 400;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; line-height: 1;
}
.password-field .toggle-password svg { display: block; }
.password-field .toggle-password:hover { color: var(--accent); filter: none; }

button {
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
}
button:hover { filter: brightness(1.06); }
button.secondary { background: none; border: 1px solid var(--border); color: var(--text); font-weight: 600; }
button.danger { background: var(--danger); color: #241512; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.muted { color: var(--text-muted); font-size: 0.92rem; }
.error { color: var(--danger); font-size: 0.9rem; min-height: 1.2em; }
.success-text { color: var(--success); font-size: 0.9rem; }

.status-badge {
  display: inline-block;
  background: var(--bg-input);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.tile-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.tile { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.4rem; min-width: 150px; }
.tile .n { font-size: 1.8rem; font-weight: 800; }
.tile .label { color: var(--text-muted); font-size: 0.85rem; }

table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
th, td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
th { color: var(--text-muted); font-weight: 700; }
tr.clickable:hover td { background: rgba(255,255,255,0.03); cursor: pointer; }

.list-plain { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.list-plain li {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.list-plain .meta { color: var(--text-muted); font-size: 0.78rem; }
.file-actions { display: flex; gap: 0.9rem; }

.tabs { display: flex; gap: 0.5rem; border-bottom: 1px solid var(--border); margin: 1.5rem 0 1.25rem; flex-wrap: wrap; }
.tabs button {
  background: none; border: none; color: var(--text-muted); font-weight: 700;
  padding: 0.6rem 0.9rem; border-bottom: 2px solid transparent; border-radius: 0;
}
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

.notes-box { display: flex; flex-direction: column; gap: 0.4rem; }
.notes-box textarea { min-height: 120px; }

video { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); background: #000; }

.version-block { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; margin-bottom: 1.25rem; background: var(--bg-elevated); }
.version-block h4 { margin-bottom: 0.6rem; }

.feedback-item { background: var(--bg-input); border-radius: var(--radius); padding: 0.6rem 0.8rem; margin-bottom: 0.5rem; }
.feedback-item .meta { color: var(--text-muted); font-size: 0.78rem; margin-top: 0.2rem; }

.contact-chip { display: inline-flex; gap: 0.4rem; align-items: center; background: var(--bg-input); border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem 0.7rem; font-size: 0.85rem; margin: 0.15rem; }

.contact-card { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem 1rem; margin-bottom: 0.6rem; max-width: 420px; }
.contact-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; gap: 0.5rem; }
.contact-card-header strong { font-size: 1rem; }
.contact-details { display: flex; flex-direction: column; gap: 0.25rem; margin: 0; }
.contact-details > div { display: flex; gap: 0.5rem; font-size: 0.9rem; }
.contact-details dt { min-width: 70px; font-weight: 700; margin: 0; }
.contact-details dd { margin: 0; }

.section-title { margin-top: 2rem; margin-bottom: 0.75rem; }

.invite-box {
  background: var(--bg-input);
  border: 1px dashed var(--accent);
  color: var(--accent);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  font-family: monospace;
  font-size: 1.1rem;
  display: inline-block;
  margin-top: 0.5rem;
}

.warning-box {
  background: rgba(232, 132, 107, 0.12);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal-box { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; max-width: 400px; }
.modal-box .actions { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
