
:root { --bg:#0b1020; --card:#151a2c; --text:#e9eefb; --muted:#aab3cf; --accent:#4f7cff; --ok:#2ecc71; --danger:#ef5350; }
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); }
header { padding: 16px 20px; display:flex; align-items:center; gap:20px; border-bottom:1px solid #222a44; }
h1 { font-size: 20px; margin:0; }
nav { display:flex; gap:8px; }
.tab { background:transparent; color:var(--text); border:1px solid #303858; padding:8px 12px; border-radius:8px; cursor:pointer; }
.tab.active { background: var(--accent); border-color: var(--accent); color:white; }
.tab.danger { border-color: var(--danger); color: var(--danger); }
.hidden { display:none; }
main { max-width: 1100px; margin: 0 auto; padding: 20px; }
.card { background: var(--card); padding: 16px; border-radius: 12px; border:1px solid #222a44; margin-bottom: 16px; }
.card-sub { background:#0f1324; border:1px dashed #2a3150; padding: 12px; border-radius:10px; margin-top: 12px; }
.cards { display:grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap:16px; }
.cards-3 { display:grid; grid-template-columns: repeat(3, minmax(280px, 1fr)); gap:16px; }
.split { display:grid; grid-template-columns: 1fr 1fr; gap:16px; }
.row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.col { display:flex; flex-direction:column; gap:8px; }
input, textarea, select { background:#0f1324; border:1px solid #2a3150; color:var(--text); padding:10px; border-radius:8px; outline:none; }
button { background: var(--accent); color:white; border:none; padding:10px 12px; border-radius:8px; cursor:pointer; }
button.outline { background:transparent; border:1px solid #2a3150; color:var(--text); }
button:disabled { opacity:.6; cursor:not-allowed; }
.muted { color: var(--muted); }
.list { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px; }
.list li { padding:10px; background:#0f1324; border:1px solid #2a3150; border-radius:8px; display:flex; justify-content:space-between; align-items:center; gap:12px; }
.list .actions { display:flex; gap:8px; }
.list .editline { width:100%; display:grid; grid-template-columns: 1fr 1fr 200px auto; gap:8px; align-items:center; }
.list .editline .grow { grid-column: 1 / -1; }
.progress { background:#0f1324; border:1px solid #2a3150; border-radius:999px; height:16px; position:relative; overflow:hidden; }
#progress-bar { position:absolute; left:0; top:0; bottom:0; width:0%; background:linear-gradient(90deg, var(--accent), #6a9bff); }
.view { display:none; }
.view.show { display:block; }
.quick-row { display:flex; gap:24px; margin-top:12px; flex-wrap:wrap; }
.quick-group { display:flex; flex-direction:column; gap:6px; }
.quick-label { color: var(--muted); font-size: 12px; }
.chips { display:flex; gap:8px; flex-wrap:wrap; }
.chip { background:#0f1324; border:1px solid #2a3150; color:var(--text); padding:8px 10px; border-radius:999px; cursor:pointer; }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.tag { display:flex; align-items:center; gap:6px; }
.chip.tag .x { background:#2a3150; border-radius:50%; width:16px; height:16px; display:inline-flex; align-items:center; justify-content:center; font-size:12px; color:#e9eefb; }
.tag-editor { display:grid; grid-template-columns: 1fr; gap:8px; }
.chips-tags { min-height: 36px; padding:4px; border:1px dashed #2a3150; border-radius:10px; }
.suggest { position:relative; }
.suggest .panel { position:absolute; z-index:10; background:#0f1324; border:1px solid #2a3150; border-radius:8px; min-width:240px; box-shadow:0 8px 24px rgba(0,0,0,.4); }
.suggest .item { padding:8px 10px; cursor:pointer; }
.suggest .item:hover { background:#151a2c; }
footer { text-align:center; padding:20px; color:var(--muted); border-top:1px solid #222a44; }
.auth { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap:16px; }

/* Responsive columns for cards-3 */
@media (max-width: 1100px) { .cards-3 { grid-template-columns: repeat(2, minmax(280px, 1fr)); } }
@media (max-width: 740px) { .cards-3 { grid-template-columns: 1fr; } }

/* Templates list: max. 4 Einträge sichtbar, danach scrollen */
#tpl-list { overflow-y: auto; padding-right: 4px; scroll-behavior: smooth; }
#tpl-list::-webkit-scrollbar { width: 8px; }
#tpl-list::-webkit-scrollbar-thumb { background: #2a3150; border-radius: 6px; }
#tpl-list::-webkit-scrollbar-track { background: #0f1324; }
