/* PATR.IS /a/ – Dritte Ebene (△ Gewächshaus): Projekte (Pflanzen), Fristen & Symbiosen */
:root {
  --gh-emerald: #34d399;
  --gh-emerald-soft: rgba(52, 211, 153, 0.16);
  --gh-emerald-border: rgba(52, 211, 153, 0.5);
  --gh-bg: #050a0c;
  --gh-panel: #0a1519;
  --gh-card: #0e1c22;
}

.topbar > .pill-gh {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--gh-emerald-border);
  background: var(--gh-emerald-soft);
  color: #a7f3d0;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.gh-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  background: var(--gh-emerald);
  color: #052e16;
}
.gh-badge.has-red { background: #ef4444; color: #fff; }

.app-shell > #ghToggleBtn {
  position: absolute;
  right: 0;
  bottom: calc(116px + env(safe-area-inset-bottom, 0px));
  z-index: 12;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 24px;
  display: grid;
  place-items: center;
  border: 2px solid var(--gh-emerald);
  background: rgba(6, 26, 20, 0.94);
  color: var(--gh-emerald);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  filter: drop-shadow(0 2px 4px rgb(0 0 0 / 50%));
}
.app-shell > #ghToggleBtn .gh-badge {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  font-size: 0.7rem;
  box-shadow: 0 0 0 2px #050810;
}
.app-shell.status-open > #ghToggleBtn,
.app-shell.is-recording > #ghToggleBtn,
.app-shell.at-open > #ghToggleBtn,
.app-shell:has(#promptDock:not(.hidden)) > #ghToggleBtn {
  visibility: hidden;
  pointer-events: none;
}

.gh-layer {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: flex;
  flex-direction: column;
  background: var(--gh-bg);
  color: #e6f7f1;
  font-family: inherit;
  overflow: hidden;
}
.gh-layer.hidden { display: none !important; }

.gh-topbar {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) calc(10px + env(safe-area-inset-right, 0px)) 8px calc(10px + env(safe-area-inset-left, 0px));
  background: rgba(10, 21, 25, 0.97);
  border-bottom: 1.5px solid var(--gh-emerald-border);
  flex: none;
}
.gh-domains {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  max-height: 22dvh;
  overflow-y: auto;
}
.gh-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #0b181d;
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.gh-pill.active {
  border-color: var(--gh-emerald);
  background: rgba(52, 211, 153, 0.2);
  color: #d1fae5;
}
.gh-pill .gh-cnt {
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.1);
}
.gh-pill.active .gh-cnt { background: var(--gh-emerald); color: #052e16; font-weight: 800; }

.gh-nav-actions { display: flex; gap: 6px; flex: none; }
.gh-btn {
  min-height: 36px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--gh-emerald-border);
  background: #0d1f26;
  color: #a7f3d0;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.gh-btn.back-a { border-color: #0a84ff; background: rgba(10, 132, 255, 0.18); color: #93c5fd; }
.gh-btn.open-at { border-color: #ff9f0a; background: rgba(255, 159, 10, 0.16); color: #ffd080; }

.gh-subbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(8, 16, 20, 0.94);
  border-bottom: 1px solid rgba(52, 211, 153, 0.2);
  font-size: 0.8rem;
  color: #94a3b8;
}
.gh-stats { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gh-chip { padding: 2px 8px; border-radius: 999px; font-weight: 700; font-size: 0.74rem; }
.gh-chip.red { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.45); }
.gh-chip.amber { background: rgba(255, 159, 10, 0.18); color: #ffd080; border: 1px solid rgba(255, 159, 10, 0.42); }
.gh-chip.green { background: rgba(34, 197, 94, 0.18); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.42); }
.gh-chip.blue { background: rgba(59, 130, 246, 0.2); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.45); }

.gh-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px calc(12px + env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) calc(12px + env(safe-area-inset-left, 0px));
}

.gh-deadlines-banner {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(127, 29, 29, 0.24);
  border: 1px solid rgba(239, 68, 68, 0.48);
}
.gh-deadlines-banner h3 { margin: 0 0 6px; font-size: 0.86rem; color: #fca5a5; }
.gh-dl-list { display: flex; flex-wrap: wrap; gap: 6px; }
.gh-dl-item {
  border: 1px solid rgba(255, 159, 10, 0.4);
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 0.78rem;
  cursor: pointer;
  text-align: left;
}
.gh-dl-item.critical { border-color: rgba(239, 68, 68, 0.7); background: rgba(69, 10, 10, 0.55); }

.gh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 10px;
}
.gh-card {
  background: var(--gh-card);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-left: 4px solid var(--gh-emerald);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.gh-card:hover { border-color: var(--gh-emerald); transform: translateY(-1px); }
.gh-card.health-red { border-left-color: #ef4444; background: #1c1014; }
.gh-card.health-amber { border-left-color: #ff9f0a; background: #19150c; }
.gh-card.health-green { border-left-color: #22c55e; background: #0c1b16; }

.gh-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gh-card-title { font-size: 0.96rem; font-weight: 750; color: #f8fafc; }
.gh-card-domain { font-size: 0.72rem; color: #94a3b8; }
.gh-card-summary { font-size: 0.83rem; line-height: 1.42; color: #cbd5e1; margin: 0; }
.gh-card-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.74rem; }
.gh-card-next { font-size: 0.78rem; color: #a7f3d0; background: rgba(52, 211, 153, 0.08); padding: 6px 8px; border-radius: 8px; }

/* TheBrain Fokus-Plex */
.gh-plex { max-width: 960px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.gh-plex-row-label { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8; margin-bottom: 6px; font-weight: 700; }
.gh-plex-nodes { display: flex; flex-wrap: wrap; gap: 8px; }
.gh-plex-node {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #0d1820;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 0.82rem;
  cursor: pointer;
  text-align: left;
  max-width: 300px;
}
.gh-plex-node:hover { border-color: var(--gh-emerald); }
.gh-plex-node small { display: block; color: #94a3b8; font-size: 0.72rem; margin-top: 2px; }
.gh-plex-center {
  border: 2px solid var(--gh-emerald);
  background: #0b1c1f;
  border-radius: 16px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gh-plex-center.health-red { border-color: #ef4444; }
.gh-plex-center.health-amber { border-color: #ff9f0a; }
.gh-plex-links { display: flex; flex-wrap: wrap; gap: 8px; }
.gh-plex-links a { color: #60a5fa; text-decoration: underline; font-size: 0.82rem; }
.gh-plex-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gh-plex-title { margin: 0; font-size: 1.08rem; line-height: 1.35; overflow-wrap: anywhere; }

.gh-dl-ul { margin: 6px 0 0; padding-left: 0; list-style: none; display: grid; gap: 6px; font-size: 0.83rem; }
.gh-dl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 8px; background: rgba(15, 23, 42, 0.55); }
.gh-dl-row.is-done { opacity: 0.72; text-decoration: line-through; }
.gh-mini-btn { flex: none; padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(52, 211, 153, 0.45); background: #0d1f26; color: #a7f3d0; font-size: 0.75rem; font-weight: 700; cursor: pointer; }

.gh-note-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(7, 17, 22, 0.88);
  border: 1.5px solid rgba(52, 211, 153, 0.45);
}
.gh-note-box-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.84rem; color: #d1fae5; }
.gh-health-switch { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.gh-h-btn {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #0d1820;
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.gh-h-btn.active.red { border-color: #ef4444; background: rgba(239, 68, 68, 0.28); color: #fecaca; }
.gh-h-btn.active.amber { border-color: #ff9f0a; background: rgba(255, 159, 10, 0.25); color: #fde68a; }
.gh-h-btn.active.green { border-color: #22c55e; background: rgba(34, 197, 94, 0.25); color: #bbf7d0; }

.gh-note-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 76px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: #04090c;
  color: #f8fafc;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.45;
  resize: vertical;
}
.gh-note-input:focus { outline: none; border-color: var(--gh-emerald); }
.gh-note-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.gh-btn.gh-btn-primary { border-color: var(--gh-emerald); background: rgba(52, 211, 153, 0.22); color: #ecfdf5; }
.gh-btn.gh-btn-green { border-color: #22c55e; background: rgba(34, 197, 94, 0.24); color: #dcfce7; }
.gh-btn.recording { border-color: #ef4444; background: rgba(239, 68, 68, 0.35); color: #fff; }
.gh-note-fb { font-size: 0.82rem; font-weight: 600; color: #cbd5e1; }
.gh-note-fb.ok { color: #86efac; }
.gh-note-fb.err { color: #fca5a5; }

.gh-notes-log {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(10, 20, 28, 0.78);
  border: 1px solid rgba(59, 130, 246, 0.35);
}
.gh-notes-head { font-size: 0.82rem; font-weight: 700; color: #93c5fd; }
.gh-note-entry { padding: 7px 9px; border-radius: 8px; background: rgba(15, 23, 42, 0.75); display: grid; gap: 4px; }
.gh-note-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.74rem; color: #94a3b8; }
.gh-note-tag { padding: 1px 7px; border-radius: 999px; background: rgba(52, 211, 153, 0.16); color: #a7f3d0; font-weight: 700; }
.gh-note-text { font-size: 0.88rem; line-height: 1.45; color: #f1f5f9; white-space: pre-wrap; overflow-wrap: anywhere; }
