:root{
  --bg:#0b0f14;
  --card:#111826;
  --text:#e7eef7;
  --muted:#9fb0c3;
  --line:#223044;
  --accent:#4ea1ff;
  --danger:#ff5a6a;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  background:var(--bg);
  color:var(--text);
}
.container{ max-width: 1100px; margin:0 auto; padding:20px; }

h1{ margin:0 0 8px; font-size:22px; }
h2{ margin:0 0 12px; font-size:16px; }
h3{ margin:0 0 6px; font-size:15px; }
.muted{ color:var(--muted); }
.small{ font-size:12px; }
code{ background:#0d1420; padding:2px 6px; border:1px solid var(--line); border-radius:8px; }

.grid{
  display:grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap:16px;
  align-items:start;
}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:14px;
  padding:16px;
}

.sticky{ position: sticky; top: 16px; }

hr{ border:none; border-top:1px solid var(--line); margin:16px 0; }

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
}

.badge{
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  background:#0d1420;
  min-width: 180px;
}
.badge .name{ font-weight:800; margin-top:6px; }

.notice{
  margin-top: 12px;
  padding:12px;
  border:1px solid rgba(78,161,255,0.35);
  background: rgba(78,161,255,0.06);
  border-radius: 14px;
}

.section-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom: 8px;
}

.stepbar{ display:flex; flex-wrap:wrap; gap:8px; }
.pill{
  text-decoration:none;
  color:var(--text);
  border:1px solid var(--line);
  background:#0d1420;
  border-radius: 999px;
  padding:6px 10px;
  font-size:12px;
}
.pill:hover{ border-color: rgba(78,161,255,0.75); }

.step{
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.step:first-of-type{ border-top:none; }

.step-title{
  display:flex;
  gap:12px;
  align-items:flex-start;
}
.step-no{
  width:54px;
  flex: 0 0 54px;
  height: 30px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background:#0d1420;
  font-weight:800;
}

.tool-grid{
  margin-top: 12px;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:12px;
}

.toolcard{
  border:1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background:#0d1420;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.toolname{ font-weight:750; }

.btn, .toolbtn{
  cursor:pointer;
  border-radius: 10px;
  border:1px solid var(--line);
  background: var(--accent);
  color:#06111f;
  font-weight:800;
  padding: 8px 10px;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.secondary{ background: transparent; color: var(--text); }
.danger{ background: transparent; color: var(--danger); border-color: rgba(255,90,106,0.4); }

.btn-row{ display:flex; gap:10px; flex-wrap:wrap; }

.tips{
  margin-top: 12px;
  color: var(--muted);
}
.tips summary{ cursor:pointer; }

.preview-block{
  margin-top: 12px;
  border: 1px solid var(--line);
  background:#0d1420;
  border-radius: 14px;
  padding: 12px;
}

.preview-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

.dropzone{
  margin-top: 10px;
  border: 1px dashed rgba(78,161,255,0.55);
  border-radius: 12px;
  padding: 14px;
  background: rgba(78,161,255,0.06);
}

.dropzone input[type="file"]{ margin-top: 10px; width:100%; }

.preview{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap:12px;
  margin: 12px 0 0;
}

.preview img{
  width:100%;
  height: 220px;
  object-fit: contain;       /* damit Details sichtbar bleiben */
  background:#0b0f14;
  border-radius:12px;
  border:1px solid var(--line);
  cursor: zoom-in;
}

@media (max-width: 520px){
  .grid{ grid-template-columns: 1fr; }
  .sticky{ position: static; }
  .preview img{ height: 260px; }
  .badge{ min-width: unset; }
}

.notes{
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background:#0d1420;
}

.notes-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom: 10px;
}

.label{
  display:grid;
  gap:6px;
  font-size: 13px;
  margin-top: 10px;
}

input, textarea, select{
  width:100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0b0f14;
  color: var(--text);
  outline:none;
}

input:focus, textarea:focus, select:focus{ border-color: var(--accent); }

.two-col{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}

.checklist{
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}
.footer{
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-size: 12px;
}

/* Modal */
.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  display:none;
  padding: 18px;
  z-index: 9999;
}
.modal.show{
  display:flex;
  align-items:center;
  justify-content:center;
}
.modal-inner{
  width: min(980px, 96vw);
  max-height: 92vh;
  background: #0d1420;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  position: relative;
  overflow: auto;
}
.modal-inner img{
  width:100%;
  max-height: 75vh;
  object-fit: contain;
  background:#0b0f14;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.modal-close{
  position:absolute;
  top: 8px;
  right: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.modal-caption{
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  word-break: break-all;
}
.table-wrap{
  overflow:auto;
  border:1px solid var(--line);
  border-radius:12px;
  margin-top: 12px;
}
table{
  width:100%;
  border-collapse: collapse;
  min-width: 760px;
}
th, td{
  border-bottom: 1px solid var(--line);
  padding: 10px;
  font-size: 12px;
  vertical-align: top;
}
th{
  text-align:left;
  position: sticky;
  top: 0;
  background: #0b0f14;
}
td a{ color: var(--accent); }
