:root {
  --green: #0c2b25; --brown: #8d6e57; --ink: #172036; --muted: #758696; --line: #e8e0d8;
  --soft: #f5f0eb; --bg: #f7f4ef; --surface: #fff; --data: #1f7a52; --red: #b91c1c; --amber: #b45309;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Manrope', sans-serif; font-size: 15px; line-height: 1.5; }
a { color: var(--green); }
h1 { font-family: 'Jost', sans-serif; font-size: 1.5rem; color: var(--green); margin: .2rem 0 1rem; }
h2 { font-family: 'Jost', sans-serif; font-size: 1.05rem; color: var(--green); margin: 0 0 .75rem; text-transform: uppercase; letter-spacing: .03em; }
.muted { color: var(--muted); } .small { font-size: .82rem; } .nowrap { white-space: nowrap; } .center { text-align: center; }
.grow { flex: 1 1 auto; }

.top { background: var(--green); color: #fff; position: sticky; top: 0; z-index: 10; }
.top-inner { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; display: flex; align-items: center; gap: 1.5rem; min-height: 56px; }
.brand { display: flex; align-items: center; gap: .5rem; color: #fff; text-decoration: none; font-family: 'Jost', sans-serif; font-weight: 700; font-size: 1.15rem; letter-spacing: .04em; }
.brand img { width: 24px; height: 24px; border-radius: 5px; }
.nav { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav a { color: rgba(255,255,255,.72); text-decoration: none; padding: .45rem .75rem; border-radius: .5rem; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.nav a:hover { color: #fff; } .nav a.on { color: #fff; background: rgba(255,255,255,.12); }
.who { display: flex; align-items: center; gap: .6rem; margin: 0; font-size: .82rem; color: rgba(255,255,255,.75); }
.who button { background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: .4rem; padding: .25rem .6rem; cursor: pointer; font: inherit; }

.main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; padding: 1.2rem 1.3rem; margin-bottom: 1.1rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.flash { background: #ecf6f0; border: 1px solid #bcd8c9; color: var(--data); padding: .6rem .9rem; border-radius: .6rem; margin-bottom: 1rem; }
.err { background: #fef2f2; border: 1px solid #fecaca; color: var(--red); padding: .7rem .9rem; border-radius: .6rem; margin: 1rem 0; }
.note { padding: .6rem .9rem; border-radius: .6rem; margin-bottom: 1rem; background: var(--soft); }
.note.s-fehler { background: #fef2f2; color: var(--red); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: 700 .9rem 'Manrope', sans-serif; border-radius: .6rem;
  padding: .6rem 1.1rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; min-height: 42px; }
.btn:hover { border-color: #d6cabd; } .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-danger { color: var(--red); border-color: #fecaca; background: #fff; }
.btn-sm { min-height: 34px; padding: .35rem .75rem; font-size: .82rem; }
.btn-wide { width: 100%; }

.bigsearch { display: flex; gap: .6rem; margin-bottom: 1.2rem; }
.bigsearch input { flex: 1; font: 500 1.05rem 'Manrope', sans-serif; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: .75rem; background: #fff; }
input, select, textarea { font: inherit; color: var(--ink); }
input[type=text], input[type=url], input[type=search], input[type=date], input[type=number], select, textarea {
  border: 1px solid var(--line); border-radius: .55rem; padding: .55rem .7rem; background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); }
textarea { width: 100%; resize: vertical; margin: .5rem 0 1rem; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1.1rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: .85rem; padding: .85rem 1rem; }
.kpi-l { font-family: 'Jost', sans-serif; font-size: .72rem; font-weight: 700; color: var(--brown); text-transform: uppercase; letter-spacing: .04em; }
.kpi-v { font-family: 'Jost', sans-serif; font-size: 1.7rem; font-weight: 700; color: var(--green); }
.kpi-v.warn { color: var(--red); }

.kinds { list-style: none; margin: 0; padding: 0; }
.kinds li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--soft); }
.kinds li:last-child { border-bottom: none; } .kinds a { text-decoration: none; font-weight: 600; }

.list { display: flex; flex-direction: column; gap: .5rem; }
.row { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: .7rem; text-decoration: none; color: inherit; }
.row:hover { border-color: #d6cabd; }
.row-big { flex-direction: column; align-items: stretch; gap: .35rem; }
.row-head, .row-foot { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.row-t { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.snip { font-size: .88rem; color: #374151; }
.snip mark { background: #fdf0c4; color: inherit; padding: 0 .1rem; border-radius: .2rem; }
.metric { font-size: .78rem; color: var(--data); font-weight: 600; }
.tag { font-size: .72rem; font-weight: 700; color: var(--brown); background: var(--soft); border-radius: 1rem; padding: .12rem .55rem; white-space: nowrap; }
.tag-intern { color: var(--muted); }
.state { font-size: .74rem; font-weight: 700; border-radius: 1rem; padding: .12rem .55rem; white-space: nowrap; background: var(--soft); color: var(--muted); }
.state.s-fertig { background: #ecf6f0; color: var(--data); } .state.s-fehler { background: #fef2f2; color: var(--red); }
.state.s-neu, .state.s-analyse { background: #fdf6ec; color: var(--amber); }
.chip { display: inline-block; font-size: .8rem; background: var(--soft); border-radius: 1rem; padding: .1rem .6rem; margin: 0 .3rem .3rem 0; text-decoration: none; }

.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.filters .date { display: flex; align-items: center; gap: .35rem; font-size: .82rem; color: var(--muted); }
.pager { display: flex; justify-content: center; gap: .6rem; margin-top: 1rem; }

.back { display: inline-block; margin-bottom: .6rem; text-decoration: none; font-weight: 600; font-size: .9rem; }
.head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; flex-wrap: wrap; }
.head h1 { margin: .4rem 0 .2rem; }
.head-actions { display: flex; gap: .5rem; } .head-actions form { margin: 0; }
.facts { display: grid; grid-template-columns: 140px 1fr; gap: .5rem 1rem; margin: 1rem 0 0; }
.facts dt { font-weight: 700; color: var(--brown); font-size: .85rem; } .facts dd { margin: 0; }
.facts ul { margin: 0; padding-left: 1.1rem; }
.fulltext { white-space: pre-wrap; font-size: .92rem; line-height: 1.65; max-height: 70vh; overflow-y: auto; margin-top: .6rem; }

.tabs { display: flex; gap: .4rem; margin-bottom: 1rem; }
.tabs button { font: 600 .9rem 'Manrope', sans-serif; padding: .55rem 1rem; border: 1px solid var(--line); border-radius: 2rem; background: #fff; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--green); border-color: var(--green); color: #fff; }
.tabs.bereiche { flex-wrap: wrap; }
.tabs.bereiche a { font: 600 .9rem 'Manrope', sans-serif; padding: .55rem 1rem; border: 1px solid var(--line); border-radius: 2rem; background: #fff; color: var(--muted); text-decoration: none; white-space: nowrap; }
.tabs.bereiche a:hover { color: var(--green); border-color: var(--green); }
.tabs.bereiche a.on { background: var(--green); border-color: var(--green); color: #fff; }
.drop { border: 2px dashed #d6cfc6; border-radius: .8rem; padding: 2rem 1rem; text-align: center; cursor: pointer; display: flex; flex-direction: column; gap: .3rem; }
.drop.over, .drop:hover { border-color: var(--green); background: rgba(12,43,37,.03); }
.formrow { display: flex; gap: .8rem; flex-wrap: wrap; align-items: flex-end; margin: 1rem 0; }
.formrow label { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; font-weight: 600; }
.formrow label.check { flex-direction: row; align-items: center; gap: .4rem; padding-bottom: .6rem; }
.queue { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.qi { display: flex; justify-content: space-between; gap: 1rem; font-size: .85rem; padding: .4rem .6rem; background: var(--soft); border-radius: .5rem; }
.qi .ok { color: var(--data); font-weight: 700; } .qi .bad { color: var(--red); font-weight: 700; }

.copyline { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.copyline code { font-size: .95rem; background: var(--soft); padding: .55rem .8rem; border-radius: .5rem; word-break: break-all; }
.steps { margin: 1rem 0 0; padding-left: 1.2rem; } .steps li { margin: .35rem 0; }

.login { max-width: 380px; margin: 12vh auto 0; text-align: center; }
.login-logo { width: 72px; } .login h1 { margin: .6rem 0 1.4rem; }
.stack { display: flex; flex-direction: column; gap: .6rem; margin-top: 1.2rem; }

@media (max-width: 760px) {
  .top-inner { padding: 0 .8rem; gap: .6rem; flex-wrap: wrap; padding-bottom: .4rem; }
  .who span { display: none; }
  .nav { order: 3; flex-basis: 100%; }
  .main { padding: 1rem .9rem 2.5rem; }
  .grid2 { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: .2rem; } .facts dd { margin-bottom: .6rem; }
  .bigsearch .btn { display: none; }
}

/* ── Benutzerfreundlichkeit (13.11.2026) ─────────────────────────────── */
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brown); outline-offset: 2px; }
.qs { position: relative; margin: 0; }
.qs input { width: 170px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #fff; border-radius: .55rem;
  padding: .4rem 1.9rem .4rem .7rem; font-size: .86rem; transition: width .2s, background .2s; }
.qs input::placeholder { color: rgba(255,255,255,.55); }
.qs input:focus { width: 230px; background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.4); }
.qs kbd { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); font: 600 .7rem Manrope, sans-serif; color: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.25); border-radius: .3rem; padding: 0 .3rem; pointer-events: none; }
.qs input:focus + kbd { display: none; }
.toast { position: fixed; left: 50%; bottom: 1.4rem; transform: translate(-50%, 20px); background: var(--green); color: #fff; padding: .7rem 1.1rem;
  border-radius: .7rem; font-size: .9rem; box-shadow: 0 8px 24px rgba(0,0,0,.2); opacity: 0; pointer-events: none; transition: all .25s; z-index: 100; max-width: calc(100% - 2rem); }
.toast.show { opacity: 1; transform: translate(-50%, 0); } .toast.bad { background: var(--red); }
.empty { text-align: center; color: var(--muted); padding: 2.5rem 1rem; background: var(--surface); border: 1px dashed var(--line); border-radius: .9rem; }

/* Bibliothek */
.tabs.bereiche { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: 2px; }
.tabs.bereiche a small { font-size: .74rem; opacity: .7; margin-left: .15rem; font-weight: 600; }
.searchbox { position: relative; min-width: 220px; }
.searchbox input { width: 100%; padding-left: 2.1rem; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23758696' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E") no-repeat .7rem center; min-height: 42px; }
.filters select, .filters input[type=date] { min-height: 42px; }
.resbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .84rem; color: var(--muted); margin: -.3rem 0 .7rem; min-height: 1.3rem; }
.resbar a { font-weight: 600; text-decoration: none; }
.item { display: flex; gap: .9rem; align-items: flex-start; padding: .8rem .95rem; background: var(--surface); border: 1px solid var(--line); border-radius: .8rem;
  text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.item:hover { border-color: #d6cabd; box-shadow: 0 2px 10px rgba(12,43,37,.06); }
.item-th { width: 64px; height: 64px; border-radius: .55rem; object-fit: cover; flex-shrink: 0; background: var(--soft); }
.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.item-over { font-size: .76rem; color: var(--brown); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-t { font-weight: 700; color: var(--ink); line-height: 1.35; }
.item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; font-size: .78rem; color: var(--muted); }
.item-meta .tag { font-size: .7rem; }
.pager { align-items: center; } .pager-n { font-size: .85rem; color: var(--muted); font-weight: 600; }

/* Eintrag */
.head-txt { flex: 1; min-width: 0; }
.head-actions { flex-wrap: wrap; }
.text-head { flex-wrap: wrap; }
.text-tools { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.findbox { display: flex; align-items: center; gap: .35rem; }
.findbox input { width: 200px; min-height: 34px; padding: .3rem .6rem; font-size: .85rem; }
.find-n { font-size: .78rem; color: var(--muted); min-width: 3.5rem; white-space: nowrap; }
.fulltext mark { background: #fdf0c4; color: inherit; border-radius: .2rem; padding: 0 .05rem; }
.fulltext mark.cur { background: #f5c451; box-shadow: 0 0 0 2px #f5c451; }

/* Quellen */
.src { display: flex; align-items: center; gap: 1rem; padding: .85rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: .8rem; }
.src.aus { background: #faf8f5; }
.src.aus .src-t { color: var(--muted); }
.src-main { flex: 1; min-width: 0; }
.src-head { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.src-t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.src-meta { display: flex; flex-wrap: wrap; gap: .2rem .8rem; font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.src-n { font-weight: 700; color: var(--green); }
.src-acts { display: flex; gap: .4rem; flex-shrink: 0; }
.state.s-pause { background: #fdf6ec; color: var(--amber); }
.src-yt .card-head { align-items: center; }
.src-yt h2 { margin-bottom: .2rem; }

/* Hinzufügen */
.drop-ic { font-size: 1.6rem; color: var(--brown); line-height: 1; }
.qi { align-items: center; } .qi .qn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qx { border: none; background: none; color: var(--muted); cursor: pointer; font-size: .9rem; padding: .1rem .3rem; }
.qx:hover { color: var(--red); }
.up-acts { display: flex; gap: .6rem; flex-wrap: wrap; }

@media (max-width: 1320px) { .who span { display: none; } .top-inner { gap: 1rem; } }
@media (max-width: 1180px) { .qs { display: none; } }
@media (max-width: 760px) {
  .top-inner { padding-bottom: 0; }
  .nav { margin: 0 -.8rem; padding: 0 .8rem .45rem; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .nav a { padding: .4rem .65rem; }
  h1 { font-size: 1.3rem; }
  .filters { gap: .4rem; }
  .filters .searchbox { flex-basis: 100%; }
  .filters select { flex: 1 1 40%; }
  .filters .date { flex: 1 1 45%; } .filters .date input { flex: 1; min-width: 0; }
  .item { padding: .7rem .75rem; gap: .7rem; }
  .item-th { width: 52px; height: 52px; }
  .src { flex-direction: column; align-items: stretch; gap: .6rem; }
  .src-acts { justify-content: flex-end; }
  .head-actions { width: 100%; }
  .text-tools, .findbox { width: 100%; } .findbox input { flex: 1; width: auto; }
}

/* Bibliothek: Leiste „Hinzufügen“ */
.addbar { background: var(--surface); border: 1px dashed #d6cabd; border-radius: .7rem; margin-bottom: .5rem; }
.addbar > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .55rem; padding: .6rem .8rem; font-weight: 700; color: var(--green); }
.addbar > summary::-webkit-details-marker { display: none; }
.addbar-plus { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; line-height: 1; }
.addbar[open] > summary { border-bottom: 1px solid var(--line); }
.addbar-in { padding: .9rem .9rem .3rem; }
.addbar-in .card { border: 0; padding: 0; margin-bottom: .6rem; background: none; }
.anker { scroll-margin-top: 70px; }

/* Login, Konto, Admin (13.11.2026) */
.who .who-n { color: rgba(255,255,255,.75); text-decoration: none; } .who .who-n:hover { color: #fff; text-decoration: underline; }
@media (max-width: 1320px) { .who .who-n { display: none; } }
.login form { display: flex; flex-direction: column; gap: .7rem; text-align: left; margin-top: .4rem; }
.login label { font-size: .8rem; font-weight: 700; color: var(--muted); display: flex; flex-direction: column; gap: .3rem; }
.login input { min-height: 46px; font-size: 1rem; }
.login .btn { margin-top: .4rem; min-height: 48px; }
.pw-wrap { position: relative; } .pw-wrap input { width: 100%; padding-right: 4.5rem; }
.pw-wrap button { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); border: none; background: none; color: var(--muted); font: 600 .8rem Manrope, sans-serif; cursor: pointer; padding: .4rem; }
.nu-list { display: flex; flex-direction: column; gap: .55rem; }
.nu { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: .8rem; flex-wrap: wrap; }
.nu.aus { opacity: .6; background: #faf8f5; }
.nu-av { width: 38px; height: 38px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font: 700 1rem Jost, sans-serif; flex-shrink: 0; }
.nu-t { flex: 1; min-width: 180px; } .nu-t b { color: var(--ink); } .nu-t div { font-size: .8rem; color: var(--muted); }
.nu-acts { display: flex; gap: .4rem; flex-wrap: wrap; }
.nu-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: .6rem; align-items: end; }
.nu-form label { font-size: .76rem; font-weight: 700; color: var(--muted); display: flex; flex-direction: column; gap: .25rem; }
.nu-form input { min-height: 42px; }
@media (max-width: 760px) { .nu-form { grid-template-columns: 1fr; } }
