/* SSB Aufsichtsrat — Stil angelehnt an das bisherige SoftR-Portal:
   weiße Kopfzeile mit Tab-Navigation, grüne Fläche, weiße abgerundete Karten. */

:root {
  --green: #2f9268;
  --green-dark: #257352;
  --ink: #111827;
  --gray: #6b7280;
  --gray-light: #d1d5db;
  --bg-card: #ffffff;
  --radius: 12px;
  --amber: #b45309;
  --red: #b91c1c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--ink);
  background: var(--green);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

/* ---------- Kopfzeile ---------- */
header.topbar {
  background: #fff;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { height: 42px; width: auto; }

nav.tabs { display: flex; gap: 28px; align-items: center; }
nav.tabs a {
  color: var(--gray);
  font-size: 15px;
  padding: 20px 2px;
  border-bottom: 3px solid transparent;
}
nav.tabs a.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--green); }
nav.tabs a:hover { color: var(--ink); }
nav.tabs a.logout { color: var(--gray); font-size: 13px; }

/* ---------- Hero ---------- */
.hero { background: #fff; text-align: center; padding: 48px 20px 56px; }
.hero h1 { font-size: 34px; font-weight: 800; }
.hero p { color: var(--gray); margin-top: 10px; font-size: 16px; }

/* ---------- Grüne Fläche ---------- */
main { flex: 1; padding: 48px 20px 80px; }
.container { max-width: 1100px; margin: 0 auto; }
.section-title { color: #fff; text-align: center; font-size: 28px; font-weight: 700; margin-bottom: 28px; }

/* Suchfeld */
.search { margin-bottom: 28px; }
.search input {
  width: 100%;
  padding: 14px 18px 14px 44px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%236b7280' stroke-width='2' viewBox='0 0 24 24'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.3-4.3'/></svg>") 14px center no-repeat;
}
.search input:focus { outline: 3px solid rgba(255,255,255,.4); }

/* ---------- Karten ---------- */
.card {
  position: relative;   /* Anker für a.stretched (ganze Karte klickbar) */
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 26px 30px;
  margin-bottom: 22px;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }

/* Ganze Karte klickbar (Sitzungsliste): der Titel-Link spannt sich über die Karte */
a.stretched::after { content: ""; position: absolute; inset: 0; }
.card:has(a.stretched):hover { box-shadow: 0 4px 14px rgba(0,0,0,.16); cursor: pointer; }
.card .chip { position: relative; z-index: 2; }
.card-hint { margin-left: auto; color: var(--gray); font-size: 13px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #7cc7a5, var(--green-dark));
  background-size: cover; background-position: center;
  flex-shrink: 0;
}
.avatar.sitzung   { background-image: url("/static/card_sitzung.jpg"); }
.avatar.ressource { background-image: url("/static/card_ressource.webp"); }
.avatar.protokoll { background-image: url("/static/card_protokoll.jpg"); }
.card-head h3 { font-size: 18px; font-weight: 700; }
.card-head h3 a:hover { color: var(--green-dark); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px 28px; }
.field label { display: block; color: var(--gray); font-size: 13px; margin-bottom: 5px; }
.field .value { font-size: 15px; }

.chip {
  display: inline-block;
  border: 1px solid var(--gray-light);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  margin: 0 6px 6px 0;
  background: #fff;
}
a.chip:hover { border-color: var(--green); color: var(--green-dark); }

.badge { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.badge.green { background: #d1fae5; color: #065f46; }
.badge.amber { background: #fef3c7; color: #92400e; }
.badge.red   { background: #fee2e2; color: #991b1b; }
.badge.gray  { background: #e5e7eb; color: #374151; }

/* ---------- Sitzungs-Detail ---------- */
.top-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid #eef1f4; align-items: baseline; }
.top-row:last-child { border-bottom: none; }
.top-nr { font-weight: 700; min-width: 44px; color: var(--green-dark); }
.top-body { flex: 1; }
.top-body .titel { font-size: 15px; }
.doc-line { margin-top: 8px; }
.doc-line .summary { color: var(--gray); font-size: 13.5px; margin-top: 4px; white-space: pre-line; }
.pending { color: var(--amber); font-size: 13px; }

/* ---------- Formulare / Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 20px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--green-dark); }
.btn:disabled { background: #9ca3af; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--green-dark); border: 1px solid var(--green); }
.btn.small { padding: 7px 12px; font-size: 13px; }

select, input[type=text], input[type=email], input[type=password] {
  padding: 9px 12px;
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
}

/* ---------- Login ---------- */
.login-box { max-width: 400px; margin: 60px auto; }
.login-box .card { padding: 36px; }
.login-box h2 { margin-bottom: 20px; text-align: center; }
.login-box form { display: flex; flex-direction: column; gap: 14px; }
.fehler { color: var(--red); font-size: 14px; text-align: center; }
.hinweis { color: var(--green, #27ae60); font-size: 14px; text-align: center; }

/* ---------- Admin: Workflow ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.step-card h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 17px; }
.step-nr {
  background: var(--green); color: #fff; border-radius: 50%;
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; flex-shrink: 0;
}
.step-card p { color: var(--gray); font-size: 13.5px; margin-bottom: 14px; min-height: 40px; }
.step-meta { font-size: 12.5px; color: var(--gray); margin-top: 10px; }

.logbox {
  background: #0f172a; color: #d1fae5;
  border-radius: var(--radius);
  padding: 18px 22px;
  font-family: Consolas, monospace;
  font-size: 12.5px;
  max-height: 380px;
  overflow-y: auto;
  white-space: pre-wrap;
}

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; color: var(--gray); font-size: 12.5px; padding: 8px 10px; border-bottom: 2px solid #eef1f4; }
table.data td { padding: 9px 10px; border-bottom: 1px solid #eef1f4; vertical-align: top; }
table.data tr:last-child td { border-bottom: none; }

.inline-form { display: inline-flex; gap: 8px; align-items: center; }

footer { text-align: center; color: rgba(255,255,255,.75); font-size: 12.5px; padding: 18px; }
