/* ── Innovation Board · Avilus GmbH ─────────────────────────────────────── */

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

:root {
  --ink:        #183032;
  --forest:     #465046;
  --green:      #52b788;
  --mint:       #D8EFDF;
  --teal-soft:  #BAD4D8;
  --off-white:  #F7F7F7;
  --white:      #ffffff;
  --danger:     #c0392b;
  --warning:    #e67e22;
  --sidebar-w:  240px;
  --radius:     8px;
  --shadow:     0 1px 4px rgba(24,48,50,.10);
  --shadow-md:  0 4px 16px rgba(24,48,50,.13);
}

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

body {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--off-white);
  min-height: 100vh;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ──────────────────────────────────────────────────────────────── */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--ink);
  color: var(--off-white);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-logo .logo-mark {
  font-size: 18px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -.3px;
}

.sidebar-logo .logo-sub {
  font-size: 11px;
  color: rgba(255,255,255,.45);
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.nav-section {
  padding: 16px 20px 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,.72);
  font-size: 13.5px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}

.nav-item:hover {
  background: rgba(255,255,255,.06);
  color: var(--white);
  text-decoration: none;
}

.nav-item.active {
  background: rgba(82,183,136,.12);
  color: var(--green);
  border-left-color: var(--green);
}

.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .8; }

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12.5px;
}

.sidebar-user-name {
  font-weight: 600;
  color: var(--white);
}

.sidebar-user-role {
  font-size: 11px;
  color: rgba(255,255,255,.45);
  margin-top: 1px;
}

.sidebar-footer a {
  color: rgba(255,255,255,.5);
  font-size: 12px;
  display: inline-block;
  margin-top: 8px;
}

.sidebar-footer a:hover { color: var(--green); text-decoration: none; }

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  background: var(--white);
  border-bottom: 1px solid rgba(24,48,50,.08);
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-body {
  padding: 28px;
  flex: 1;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background .15s, border-color .15s, opacity .15s;
  white-space: nowrap;
  text-decoration: none;
}

.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.btn-primary:hover {
  background: #449d74;
  border-color: #449d74;
  text-decoration: none;
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: rgba(24,48,50,.2);
}

.btn-secondary:hover {
  background: var(--off-white);
  text-decoration: none;
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}

.btn-danger:hover { opacity: .88; text-decoration: none; color: var(--white); }

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--forest);
  padding: 6px 10px;
}

.btn-ghost:hover { background: var(--off-white); text-decoration: none; }

.btn-sm { padding: 5px 12px; font-size: 12.5px; }

.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Forms ───────────────────────────────────────────────────────────────── */

.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 5px;
}

.form-label .required { color: var(--danger); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid rgba(24,48,50,.18);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  color: var(--ink);
  background: var(--white);
  transition: border-color .15s;
  outline: none;
}

.form-control:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(82,183,136,.12);
}

.form-control::placeholder { color: rgba(24,48,50,.35); }

textarea.form-control { resize: vertical; min-height: 88px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-hint {
  font-size: 11.5px;
  color: rgba(24,48,50,.5);
  margin-top: 4px;
}

/* ── Alerts / Flash ──────────────────────────────────────────────────────── */

.flash-list { list-style: none; margin-bottom: 16px; }

.flash {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flash-success { background: var(--mint); color: var(--forest); border-left: 3px solid var(--green); }
.flash-error   { background: #fdecea; color: var(--danger); border-left: 3px solid var(--danger); }
.flash-info    { background: #e8f4f8; color: var(--ink); border-left: 3px solid var(--teal-soft); }

/* ── Tables ──────────────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(24,48,50,.55);
  border-bottom: 1.5px solid rgba(24,48,50,.1);
}

tbody tr { border-bottom: 1px solid rgba(24,48,50,.06); transition: background .1s; }
tbody tr:hover { background: var(--off-white); }
tbody tr:last-child { border-bottom: none; }

td { padding: 11px 14px; vertical-align: middle; }

/* ── Badges / Pills ──────────────────────────────────────────────────────── */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
}

.pill-admin   { background: rgba(24,48,50,.1); color: var(--ink); }
.pill-poster  { background: rgba(82,183,136,.15); color: #2e7d57; }
.pill-member  { background: rgba(186,212,216,.4); color: var(--forest); }

.pill-open        { background: #e3f5ec; color: #1f7a4a; }
.pill-under_review{ background: #fff3e0; color: #b05e08; }
.pill-implemented { background: #e8f4f8; color: #1a5e70; }
.pill-closed      { background: rgba(24,48,50,.08); color: rgba(24,48,50,.55); }

.pill-active   { background: #e3f5ec; color: #1f7a4a; }
.pill-inactive { background: #fdecea; color: var(--danger); }

/* ── Challenge Cards ─────────────────────────────────────────────────────── */

.challenge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.challenge-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  border-left: 4px solid var(--green);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow .15s, transform .15s;
}

.challenge-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.challenge-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.challenge-card-meta {
  font-size: 12px;
  color: rgba(24,48,50,.5);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.challenge-card-desc {
  font-size: 13px;
  color: var(--forest);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Dashboard stats ─────────────────────────────────────────────────────── */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: rgba(24,48,50,.5);
  font-weight: 500;
}

/* ── Empty states ─────────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: rgba(24,48,50,.45);
}

.empty-state svg {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  opacity: .4;
}

.empty-state p { font-size: 14px; }

/* ── Login page ──────────────────────────────────────────────────────────── */

.login-wrap {
  min-height: 100vh;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-box {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo .logo-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.login-logo .logo-sub {
  font-size: 13px;
  color: rgba(24,48,50,.5);
  margin-top: 3px;
}

.login-logo .logo-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 6px;
  vertical-align: middle;
}

/* ── Utility ─────────────────────────────────────────────────────────────── */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.text-muted { color: rgba(24,48,50,.5); }
.text-sm    { font-size: 12.5px; }
.mt-16      { margin-top: 16px; }
.mt-24      { margin-top: 24px; }
.mb-16      { margin-bottom: 16px; }
.gap-8      { gap: 8px; }
.flex       { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap  { flex-wrap: wrap; }
.grid-2     { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--forest);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  cursor: pointer;
}

.checkbox-row input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
  cursor: pointer;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .main-content { margin-left: 0; }
  .form-row, .grid-2 { grid-template-columns: 1fr; }
}

/* ── Suggestion cards ────────────────────────────────────────────────────── */

.suggestion-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 20px;
  margin-bottom: 12px;
  position: relative;
}

.sug-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.sug-author-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
}

.sug-meta-right {
  margin-left: auto;
  display: flex;
  gap: 6px;
  align-items: center;
}

.sug-content {
  font-size: 13.5px;
  color: var(--forest);
  line-height: 1.6;
  white-space: pre-wrap;
  margin-bottom: 12px;
}

.sug-edit-textarea { width: 100%; margin-bottom: 0; }

.sug-attachment {
  font-size: 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
}

.sug-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(24,48,50,.06);
}

.sug-buttons { display: flex; align-items: center; gap: 4px; }

/* ── Reactions ───────────────────────────────────────────────────────────── */

.reactions-group { display: flex; gap: 4px; flex-wrap: wrap; }

.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1.5px solid rgba(24,48,50,.14);
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  color: var(--forest);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}

.reaction-btn:hover { background: var(--off-white); border-color: var(--green); }

.reaction-btn.active {
  background: rgba(82,183,136,.12);
  border-color: var(--green);
  color: #2e7d57;
  font-weight: 600;
}

.rxn-label { font-size: 11.5px; }

/* ── Badges ──────────────────────────────────────────────────────────────── */

.badge-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.badge-top_suggestion { background: #fff8e1; color: #b45309; border: 1px solid #fcd34d; }
.badge-implemented { background: #e3f5ec; color: #1f7a4a; border: 1px solid var(--green); }

.badge-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 6px;
  border-radius: var(--radius);
  opacity: .35;
  transition: opacity .15s;
  line-height: 1;
}

.badge-btn:hover { opacity: .7; }
.badge-btn.active { opacity: 1; }

/* ── Replies ─────────────────────────────────────────────────────────────── */

.replies-section {
  margin-top: 12px;
  padding-left: 20px;
  border-left: 2px solid rgba(24,48,50,.07);
}

.reply-card {
  padding: 10px 12px;
  background: var(--off-white);
  border-radius: 6px;
  margin-bottom: 8px;
}

.reply-content {
  font-size: 13px;
  color: var(--forest);
  line-height: 1.5;
  white-space: pre-wrap;
  margin-left: 32px;
}

.reply-form-wrap { padding: 10px 0 4px; }
.reply-textarea { width: 100%; font-size: 13px; }

/* ── Translation ─────────────────────────────────────────────────────────── */

.translate-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.translate-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  color: rgba(24,48,50,.45);
  padding: 0;
  transition: color .15s;
  white-space: nowrap;
}

.translate-btn:hover { color: var(--green); }

.translate-result {
  font-size: 13.5px;
  color: var(--forest);
  line-height: 1.6;
  white-space: pre-wrap;
  font-style: italic;
}

/* ── Search results ──────────────────────────────────────────────────────── */

.search-result-card {
  display: block;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 18px;
  margin-bottom: 8px;
  transition: box-shadow .15s, transform .15s;
}

.search-result-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  text-decoration: none;
}

.search-snippet {
  font-size: 13px;
  color: var(--forest);
  line-height: 1.5;
}

.search-snippet mark {
  background: rgba(82,183,136,.25);
  color: var(--ink);
  border-radius: 2px;
  padding: 0 2px;
}

/* ── Language switcher ───────────────────────────────────────────────────── */

.lang-btn {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.5);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  letter-spacing: .04em;
}

.lang-btn:hover {
  border-color: rgba(255,255,255,.4);
  color: rgba(255,255,255,.8);
}

.lang-btn.active {
  background: rgba(82,183,136,.2);
  border-color: var(--green);
  color: var(--green);
}
