/* RUESS Hub 2.48.2 - Ideenpool (Board, Roadmap, Nutzen/Aufwand-Matrix, Liste, Editor).
   Eigene Datei, ausschliesslich Praefix .ip-* bzw. #ideasView/#ideaDrawer - keine globalen Regeln. Die globale
   Button-Regel des Hubs (volle Breite, Abstand oben) wird ueber den ID-Scope zurueckgesetzt. Farben: RUESS-Hub-Stil
   (Lindgruen #A2BF13, Graphit #23292A). */

#ideasView,
#ideaDrawer {
  --ip-ink: #23292a;
  --ip-text: #323a3b;
  --ip-muted: #667174;
  --ip-line: #e4e9e2;
  --ip-line-strong: #d7ddd0;
  --ip-soft: #f5f7f2;
  --ip-lime: #a2bf13;
  --ip-lime-hover: #95b011;
  --ip-lime-deep: #5e7a08;
  --ip-lime-pale: #eef4d6;
  --ip-on-lime: #1f2a06;
}

:is(#ideasView, #ideaDrawer) .hidden { display: none !important; }
.ip-icon { width: 16px; height: 16px; flex: 0 0 auto; }
.ip-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ip-muted { color: var(--ip-muted); }

/* ---------- Knoepfe (globale button-Regel zuruecksetzen) ---------- */
:is(#ideasView, #ideaDrawer) .ip-btn,
:is(#ideasView, #ideaDrawer) .ip-view,
:is(#ideasView, #ideaDrawer) .ip-col-add,
:is(#ideasView, #ideaDrawer) .ip-quad-item,
:is(#ideasView, #ideaDrawer) .ip-menu-list button {
  width: auto; margin: 0; box-shadow: none; font-family: inherit; line-height: 1.2; cursor: pointer;
}
:is(#ideasView, #ideaDrawer) .ip-btn:hover,
:is(#ideasView, #ideaDrawer) .ip-view:hover,
:is(#ideasView, #ideaDrawer) .ip-col-add:hover,
:is(#ideasView, #ideaDrawer) .ip-quad-item:hover,
:is(#ideasView, #ideaDrawer) .ip-menu-list button:hover { transform: none; }
:is(#ideasView, #ideaDrawer) .ip-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px;
  border: 1px solid var(--ip-line-strong); border-radius: 11px; background: #fff; color: var(--ip-text);
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
:is(#ideasView, #ideaDrawer) .ip-btn:hover { background: var(--ip-soft); }
:is(#ideasView, #ideaDrawer) .ip-btn-primary { border-color: #93ae11; background: var(--ip-lime); color: var(--ip-on-lime); }
:is(#ideasView, #ideaDrawer) .ip-btn-primary:hover { background: var(--ip-lime-hover); }
:is(#ideasView, #ideaDrawer) .ip-btn-small { padding: 4px 9px; border-radius: 8px; font-size: 12px; }

/* ---------- Seite ---------- */
/* minmax(0, 1fr): das Board scrollt in sich, statt die Seite zu verbreitern. */
.ip-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; color: var(--ip-text); }
.ip-message:empty { display: none; }
.ip-message { margin: 0; padding: 10px 14px; border-radius: 10px; background: #f1f6e7; color: var(--ip-text); font-size: 13px; }

.ip-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ip-kpi { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--ip-line); border-radius: 14px; background: #fff; }
.ip-kpi strong { color: var(--ip-ink); font-size: 24px; line-height: 1.1; }
.ip-kpi span { color: var(--ip-ink); font-size: 13px; font-weight: 700; }
.ip-kpi small { color: var(--ip-muted); font-size: 12px; }
.ip-kpi.is-accent { border-color: #cfe08c; background: linear-gradient(135deg, #f4f8e6, #fff 70%); }
.ip-kpi.is-accent strong { color: var(--ip-lime-deep); }

.ip-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--ip-line); border-radius: 14px; background: #fff; }
.ip-search { display: flex; flex: 1 1 240px; align-items: center; gap: 8px; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--ip-line-strong); border-radius: 11px; background: #fff; color: var(--ip-muted); }
.ip-search:focus-within { border-color: var(--ip-lime); box-shadow: 0 0 0 3px rgba(162, 191, 19, .18); }
#ideasView .ip-search input { flex: 1 1 auto; width: auto; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--ip-ink); font-size: 14px; }
#ideasView .ip-search input:focus { outline: none; box-shadow: none; }
#ideasView .ip-toolbar select { flex: 0 0 auto; width: auto; height: 40px; margin: 0; padding: 0 10px; border-radius: 11px; font-size: 13px; }
.ip-toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--ip-muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
#ideasView .ip-toggle input { width: auto; margin: 0; }
.ip-views { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--ip-soft); }
:is(#ideasView, #ideaDrawer) .ip-view { padding: 7px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--ip-muted); font-size: 13px; font-weight: 700; }
:is(#ideasView, #ideaDrawer) .ip-view:hover { background: #fff; color: var(--ip-ink); }
:is(#ideasView, #ideaDrawer) .ip-view.active { background: var(--ip-ink); color: #fff; }
.ip-hint { padding: 10px 14px; border: 1px solid #f2d69a; border-radius: 12px; background: #fffbf0; color: #5f4300; font-size: 13px; line-height: 1.5; }
.ip-hint code { font-size: 12px; }
.ip-content { min-width: 0; }
.ip-empty { display: grid; justify-items: center; gap: 6px; padding: 40px 20px; border: 1px dashed var(--ip-line-strong); border-radius: 14px; background: #fff; color: var(--ip-muted); text-align: center; }
.ip-empty strong { color: var(--ip-ink); font-size: 15px; }
.ip-empty .ip-btn { margin-top: 6px; }

/* ---------- Status-, Prioritaets- und Bewertungsfarben ---------- */
.ip-tone-idea { --ip-tone: #7b878b; }
.ip-tone-planned { --ip-tone: #2b6195; }
.ip-tone-progress { --ip-tone: #b77b00; }
.ip-tone-test { --ip-tone: #6b4fa0; }
.ip-tone-done { --ip-tone: #5e7a08; }
.ip-tone-dropped { --ip-tone: #9aa3a0; }
.ip-dot { display: inline-block; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--ip-tone, #7b878b); }
.ip-status { display: inline-flex; align-items: center; gap: 6px; color: var(--ip-ink); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.ip-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.ip-badge { display: inline-flex; align-items: center; padding: 2px 8px; border: 1px solid var(--ip-line); border-radius: 99px; background: var(--ip-soft); color: var(--ip-text); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.ip-prio-niedrig { color: #56615f; }
.ip-prio-mittel { border-color: #bcd4ec; background: #eef5fc; color: #2b6195; }
.ip-prio-hoch { border-color: #f2d69a; background: #fff6e5; color: #8a5a00; }
.ip-prio-kritisch { border-color: #f0c4b8; background: #fcede8; color: #b4472f; }
.ip-q-quickwin { border-color: #cfe08c; background: var(--ip-lime-pale); color: var(--ip-lime-deep); }
.ip-q-major { border-color: #bcd4ec; background: #eef5fc; color: #2b6195; }
.ip-q-minor { border-color: #d3d9d5; background: #f2f4f3; color: #56615f; }
.ip-q-timesink { border-color: #f0c4b8; background: #fcede8; color: #b4472f; }
.ip-badge-next { border-color: #d6c9ec; background: #f1ecf8; color: #6b4fa0; }
.ip-badge-hours { border-color: #cfe08c; background: #fff; color: var(--ip-lime-deep); }

/* ---------- Board ---------- */
.ip-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.ip-col { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--ip-line); border-top: 3px solid var(--ip-tone); border-radius: 14px; background: var(--ip-soft); scroll-snap-align: start; }
.ip-col.is-over { border-color: var(--ip-lime); background: #f4f8e6; box-shadow: 0 0 0 3px rgba(162, 191, 19, .2); }
.ip-col > header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.ip-col > header strong { color: var(--ip-ink); font-size: 13.5px; }
.ip-col > header small { padding: 1px 8px; border-radius: 99px; background: #fff; color: var(--ip-muted); font-size: 12px; font-weight: 700; }
:is(#ideasView, #ideaDrawer) .ip-col-add { margin-left: auto; width: 26px; height: 26px; padding: 0; border: 1px solid var(--ip-line-strong); border-radius: 8px; background: #fff; color: var(--ip-muted); font-size: 16px; font-weight: 700; }
:is(#ideasView, #ideaDrawer) .ip-col-add:hover { background: var(--ip-lime-pale); color: var(--ip-lime-deep); }
.ip-col-body { display: grid; align-content: start; gap: 8px; min-height: 120px; padding: 0 10px 12px; }
.ip-col-empty { margin: 0; padding: 18px 8px; border: 1px dashed var(--ip-line-strong); border-radius: 10px; color: var(--ip-muted); font-size: 12.5px; text-align: center; }
.ip-card { position: relative; display: grid; gap: 6px; padding: 11px 12px; border: 1px solid var(--ip-line); border-radius: 12px; background: #fff; cursor: grab; transition: box-shadow .15s, border-color .15s; }
.ip-card:hover, .ip-card:focus-visible { border-color: var(--ip-line-strong); box-shadow: 0 6px 18px rgba(35, 41, 42, .08); outline: none; }
.ip-card.is-dragging { opacity: .5; }
.ip-card h4 { margin: 0; color: var(--ip-ink); font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.ip-card p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--ip-muted); font-size: 12.5px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ip-card-top { display: flex; align-items: center; gap: 6px; min-height: 22px; color: var(--ip-muted); font-size: 11.5px; font-weight: 700; }
.ip-module { padding: 1px 7px; border-radius: 6px; background: var(--ip-soft); color: var(--ip-ink); }
.ip-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* "..."-Menue */
.ip-menu { position: relative; margin-left: auto; }
.ip-menu summary { display: grid; place-items: center; width: 26px; height: 22px; border-radius: 7px; color: var(--ip-muted); font-size: 16px; line-height: 1; list-style: none; cursor: pointer; }
.ip-menu summary::-webkit-details-marker { display: none; }
.ip-menu summary:hover, .ip-menu[open] summary { background: var(--ip-soft); color: var(--ip-ink); }
.ip-menu-list { position: absolute; top: calc(100% + 4px); right: 0; z-index: 20; display: grid; min-width: 190px; padding: 6px; border: 1px solid var(--ip-line); border-radius: 12px; background: #fff; box-shadow: 0 14px 34px rgba(35, 41, 42, .16); }
:is(#ideasView, #ideaDrawer) .ip-menu-list button { padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ip-text); font-size: 13px; font-weight: 600; text-align: left; }
:is(#ideasView, #ideaDrawer) .ip-menu-list button:hover { background: var(--ip-soft); }
:is(#ideasView, #ideaDrawer) .ip-menu-list .ip-danger { color: #b4472f; }

/* ---------- Roadmap ---------- */
.ip-roadmap { display: grid; gap: 12px; }
.ip-release { border: 1px solid var(--ip-line); border-radius: 14px; background: #fff; overflow: hidden; }
.ip-release.is-next { border-color: #d6c9ec; }
.ip-release > header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 220px) auto; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--ip-line); background: var(--ip-soft); }
.ip-release.is-next > header { background: #f6f2fb; }
.ip-release > header strong { display: block; color: var(--ip-ink); font-size: 15px; }
.ip-release > header small { color: var(--ip-muted); font-size: 12.5px; }
.ip-release > header b { color: var(--ip-ink); font-size: 13px; }
.ip-progress { display: block; height: 8px; overflow: hidden; border-radius: 99px; background: #e3e8df; }
.ip-progress span { display: block; height: 100%; border-radius: inherit; background: var(--ip-lime); }
.ip-release ul { display: grid; margin: 0; padding: 0; list-style: none; }
.ip-release li { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid #f0f3ee; cursor: pointer; }
.ip-release li:last-child { border-bottom: 0; }
.ip-release li:hover, .ip-release li:focus-visible { background: #fafcf7; outline: none; }
.ip-release-title { min-width: 0; color: var(--ip-ink); font-size: 13.5px; font-weight: 700; overflow-wrap: anywhere; }
.ip-release-title small { display: block; color: var(--ip-muted); font-size: 12px; font-weight: 600; }

/* ---------- Nutzen/Aufwand-Matrix ---------- */
.ip-matrix-wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 6px 10px; }
.ip-axis-y { display: flex; align-items: center; justify-content: center; color: var(--ip-muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; writing-mode: vertical-rl; transform: rotate(180deg); }
.ip-axis-x { grid-column: 2; color: var(--ip-muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.ip-matrix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ip-quad { display: grid; align-content: start; gap: 8px; min-height: 180px; padding: 12px; border: 1px solid var(--ip-line); border-radius: 14px; background: #fff; }
.ip-quad.ip-q-quickwin { border-color: #cfe08c; background: linear-gradient(135deg, #f4f8e6, #fff 75%); color: inherit; }
.ip-quad.ip-q-major { border-color: #bcd4ec; background: linear-gradient(135deg, #eef5fc, #fff 75%); color: inherit; }
.ip-quad.ip-q-minor { border-color: #d3d9d5; background: #fff; color: inherit; }
.ip-quad.ip-q-timesink { border-color: #f0c4b8; background: linear-gradient(135deg, #fcf1ed, #fff 75%); color: inherit; }
.ip-quad > header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; }
.ip-quad > header strong { color: var(--ip-ink); font-size: 14px; }
.ip-quad > header small { grid-column: 1; color: var(--ip-muted); font-size: 12px; }
.ip-quad > header b { grid-column: 2; grid-row: 1 / span 2; align-self: center; padding: 2px 9px; border-radius: 99px; background: #fff; color: var(--ip-ink); font-size: 12.5px; }
.ip-quad > div, .ip-unrated > div { display: grid; gap: 6px; }
:is(#ideasView, #ideaDrawer) .ip-quad-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--ip-line); border-radius: 10px; background: #fff; color: var(--ip-ink); font-size: 13px; font-weight: 600; text-align: left; }
:is(#ideasView, #ideaDrawer) .ip-quad-item:hover { border-color: var(--ip-line-strong); background: var(--ip-soft); }
:is(#ideasView, #ideaDrawer) .ip-quad-item span { min-width: 0; overflow-wrap: anywhere; }
:is(#ideasView, #ideaDrawer) .ip-quad-item b { flex: 0 0 auto; color: var(--ip-muted); font-size: 12px; }
.ip-unrated { display: grid; gap: 8px; margin-top: 12px; padding: 12px; border: 1px dashed var(--ip-line-strong); border-radius: 14px; background: #fff; }
.ip-unrated header strong { display: block; color: var(--ip-ink); font-size: 14px; }
.ip-unrated header small { color: var(--ip-muted); font-size: 12.5px; }

/* ---------- Liste ---------- */
.ip-list-head { display: flex; justify-content: flex-end; margin-bottom: 8px; color: var(--ip-muted); font-size: 13px; }
#ideasView .ip-list-head select { width: auto; height: 36px; margin: 0 0 0 6px; padding: 0 10px; border-radius: 10px; font-size: 13px; }
.ip-table-wrap { overflow-x: auto; border: 1px solid var(--ip-line); border-radius: 14px; background: #fff; }
.ip-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ip-table th { padding: 10px 12px; border-bottom: 1px solid var(--ip-line); background: var(--ip-soft); color: var(--ip-muted); font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.ip-table td { padding: 10px 12px; border-bottom: 1px solid #f0f3ee; vertical-align: middle; }
.ip-table tbody tr { cursor: pointer; }
.ip-table tbody tr:hover { background: #fafcf7; }
.ip-table tbody tr:last-child td { border-bottom: 0; }
.ip-table td strong { display: block; color: var(--ip-ink); }
.ip-table td small { color: var(--ip-muted); font-size: 12px; }

/* ---------- Editor (Drawer) ---------- */
.ip-assess { display: grid; gap: 12px; margin: 0; padding: 12px; border: 1px solid var(--ip-line); border-radius: 12px; background: #fafcf7; }
.ip-assess legend { padding: 0 4px; color: var(--ip-muted); font-size: .8em; letter-spacing: .04em; text-transform: uppercase; }
.ip-assess[disabled] { opacity: .6; }
.ip-assess-off { margin: 0; color: #8a5a00; font-size: 12.5px; }
.ip-assess label small { display: block; color: var(--ip-muted); font-size: 12px; font-weight: 500; }
.ip-rating-row { display: grid; gap: 6px; }
.ip-rating-label { color: var(--ip-ink); font-size: 13px; font-weight: 700; }
.ip-rating { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.ip-rate { position: relative; display: grid; justify-items: center; gap: 1px; padding: 6px 2px; border: 1px solid var(--ip-line-strong); border-radius: 9px; background: #fff; cursor: pointer; }
#ideaDrawer .ip-rate input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.ip-rate span { color: var(--ip-ink); font-size: 14px; font-weight: 800; }
.ip-rate small { color: var(--ip-muted); font-size: 10.5px; font-weight: 600; line-height: 1.15; text-align: center; }
.ip-rate:hover { background: var(--ip-soft); }
.ip-rate:has(input:checked) { border-color: #93ae11; background: var(--ip-lime-pale); }
.ip-rate:has(input:checked) span { color: var(--ip-lime-deep); }
.ip-rate:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(162, 191, 19, .3); }
.ip-rate-none span { color: var(--ip-muted); }
.ip-assess-result { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: #fff; color: var(--ip-text); font-size: 12.5px; line-height: 1.45; }
.ip-assess-result .ip-badge { justify-self: start; }
.ip-assess-result strong { color: var(--ip-lime-deep); }
#ideaDrawer .ip-drawer-delete { margin-right: auto; color: #b4472f; }

/* ---------- Responsiv ---------- */
@media (max-width: 1100px) {
  .ip-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .ip-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ip-kpi strong { font-size: 20px; }
  .ip-toolbar { align-items: stretch; }
  .ip-search { flex-basis: 100%; }
  #ideasView .ip-toolbar select { flex: 1 1 140px; }
  .ip-views { order: 5; width: 100%; overflow-x: auto; }
  :is(#ideasView, #ideaDrawer) .ip-view { flex: 1 0 auto; }
  .ip-board { grid-auto-columns: 84%; scroll-snap-type: x mandatory; }
  .ip-release > header { grid-template-columns: minmax(0, 1fr) auto; }
  .ip-release > header .ip-progress { grid-column: 1 / -1; grid-row: 2; }
  .ip-release li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .ip-matrix { grid-template-columns: minmax(0, 1fr); }
  .ip-rating { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 2.70.3: zwei Kennzahlen und ein Board mit zwei bis vier Abschnitten */
.ip-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ip-board.ip-board-2 { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-columns: auto; }
.ip-board.ip-board-3, .ip-board.ip-board-4 { grid-auto-columns: minmax(250px, 1fr); }
@media (max-width: 700px) { .ip-board.ip-board-2 { grid-template-columns: 1fr; } .ip-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
