.nl-download-list {
  --nl-bg: #f9fafb;
  --nl-text: #1f2937;
  --nl-heading: #111827;
  --nl-btn-bg: linear-gradient(135deg, #111827, #4b5563);
  --nl-btn-text: #f9fafb;
  --nl-accent: #111827;
  --nl-header-bg: var(--nl-accent);
  --nl-card-thumb-bg: var(--nl-accent);
  --nl-filter-bg: #f8fafc;
  --nl-filter-text: #0f172a;
  --nl-filter-chip-bg: #ffffff;
  --nl-filter-chip-border: #d1d5db;
  --nl-filter-chip-text: #111827;
  --nl-filter-btn-bg: linear-gradient(135deg, #0ea5e9, #2563eb);
  --nl-filter-btn-text: #ffffff;
  width: 100%;
  font-family: inherit;
  color: var(--nl-text);
  background: var(--nl-bg);
  padding: 0px;
  border-radius: 8px;
}

.nl-download-table {
  width: 100%;
  border-collapse: collapse;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.nl-download-table th,
.nl-download-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.nl-download-table th {
  background: var(--nl-header-bg);
  color: var(--nl-header-text, var(--nl-heading));
  font-weight: 600;
}

.nl-download-table tr:nth-child(odd) {
  background: #ffffff;
}

.nl-download-table tr:nth-child(even) {
  background: #f3f4f6;
}

.nl-icon {
  font-size: 20px;
}
.nl-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, rgba(37,99,235,0.14), rgba(14,165,233,0.14));
  color: #0f172a;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid rgba(37,99,235,0.2);
  backdrop-filter: blur(4px);
}

.nl-preview-cell {
  width: 96px;
}

.nl-preview-thumb {
  width: 78px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
  object-fit: cover;
  display: block;
}

.nl-download-btn {
  display: inline-block;
  padding: 8px 12px;
  background: var(--nl-btn-bg);
  color: var(--nl-btn-text);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: clamp(12px, 1vw + 0.2rem, 15px);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  gap: 8px;
}

.nl-single .nl-download-btn {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
}

.nl-download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* View / Öffnen Button */
.nl-view-btn {
  display: inline-block;
  padding: 8px 12px;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-weight: 600;
  font-size: clamp(12px, 1vw + 0.2rem, 15px);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  gap: 8px;
}

.nl-view-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: #93c5fd;
}

.nl-btn-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  background: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}
.nl-btn-icon-eye {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 5c-7 0-11 7-11 7s4 7 11 7 11-7 11-7-4-7-11-7Zm0 12a5 5 0 1 1 0-10 5 5 0 0 1 0 10Zm0-2.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 5c-7 0-11 7-11 7s4 7 11 7 11-7 11-7-4-7-11-7Zm0 12a5 5 0 1 1 0-10 5 5 0 0 1 0 10Zm0-2.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z'/%3E%3C/svg%3E");
}
.nl-btn-icon-download {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 3a1 1 0 0 1 1 1v8.586l2.293-2.293a1 1 0 1 1 1.414 1.414l-4.001 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 1.414-1.414L11 12.586V4a1 1 0 0 1 1-1Zm-7 14a1 1 0 0 1 1 1v1h12v-1a1 1 0 1 1 2 0v2a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 3a1 1 0 0 1 1 1v8.586l2.293-2.293a1 1 0 1 1 1.414 1.414l-4.001 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 1.414-1.414L11 12.586V4a1 1 0 0 1 1-1Zm-7 14a1 1 0 0 1 1 1v1h12v-1a1 1 0 1 1 2 0v2a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1Z'/%3E%3C/svg%3E");
}
.nl-btn-label {
  display: inline-block;
  line-height: 1.2;
}

.nl-action-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.nl-layout-cards {
  display: grid;
  grid-template-columns: repeat(var(--nl-columns, auto-fit), minmax(280px, 1fr));
  gap: 18px;
}

.nl-card {
  background: var(--nl-card-bg, linear-gradient(140deg, #0f172a, #0b1220 45%, #0f172a));
  color: var(--nl-text, #e5e7eb);
  border-radius: 14px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
  display: grid;
  grid-template-columns: minmax(96px, 110px) 1fr;
  grid-template-rows: auto auto 1fr;
  grid-template-areas:
    "thumb title"
    "thumb meta"
    "thumb actions";
  column-gap: 14px;
  row-gap: 8px;
  align-items: start;
}

.nl-card-thumb-wrap {
  width: 100%;
  max-width: 108px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  background: var(--nl-card-thumb-bg);
  grid-area: thumb;
}

.nl-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nl-card-icon {
  font-size: 18px;
  line-height: 1;
  color: var(--nl-heading, inherit);
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37,99,235,0.14), rgba(14,165,233,0.14));
  border: 1px solid rgba(37,99,235,0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  backdrop-filter: blur(4px);
  grid-area: thumb;
}

.nl-card-title {
  margin: 0;
  font-size: clamp(16px, 1.4vw + 0.2rem, 19px);
  color: var(--nl-card-title, var(--nl-heading, inherit));
  line-height: 1.3;
  word-break: break-word;
  grid-area: title;
}

.nl-card-body {
  display: grid;
  gap: 4px;
  align-content: start;
  grid-area: meta;
}

.nl-meta {
  margin: 0px 0px !important;
  color: var(--nl-text, #9ca3af);
  font-size: clamp(12px, 1vw + 0.2rem, 14px);
}

.nl-card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  justify-content: flex-end;
  /*
  align-self: stretch;
  grid-area: actions;
  */
}

.nl-card-actions .nl-download-btn {
  width: max-content;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .nl-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "thumb"
      "meta"
      "actions";
    align-items: flex-start;
  }
  .nl-card-title,
  .nl-card-body,
  .nl-card-actions {
    grid-column: 1 / -1;
  }
  .nl-card-thumb-wrap,
  .nl-card-icon {
    grid-area: thumb;
  }
  .nl-card-actions {
    width: 100%;
    align-items: stretch;
    justify-content: flex-start;
  }
  .nl-card-actions .nl-download-btn {
    width: 100%;
    text-align: center;
  }
  .nl-card-thumb-wrap,
  .nl-card-thumb {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

.nl-filter-bar select {
  min-width: 180px;
}
.nl-filter-bar .button {
  background: var(--nl-filter-btn-bg);
  color: var(--nl-filter-btn-text);
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
}

.nl-filter-bar {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--nl-filter-chip-border);
  border-radius: 10px;
  background: var(--nl-filter-bg);
  width: 100%;
  box-sizing: border-box;
}
.nl-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}
.nl-filter-row label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  color: var(--nl-filter-text);
  gap: 6px;
}
.nl-filter-row input[type="date"],
.nl-filter-row select {
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  min-width: 180px;
}
.nl-filter-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
}
.nl-filter-label {
  font-weight: 600;
  color: var(--nl-filter-text);
  margin-right: 6px;
}
.nl-chip {
  background: var(--nl-filter-chip-bg);
  color: var(--nl-filter-chip-text);
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid var(--nl-filter-chip-border);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.nl-chip input {
  margin: 0;
  accent-color: #2563eb;
}
.nl-chip:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}
.nl-download-table-wrap {
  overflow-x: auto;
}

@media (max-width: 640px) {
  .nl-layout-table .nl-download-table th:nth-child(3),
  .nl-layout-table .nl-download-table td:nth-child(3),
  .nl-layout-table .nl-download-table th:nth-child(4),
  .nl-layout-table .nl-download-table td:nth-child(4) {
    display: none;
  }
  .nl-card {
    flex-direction: column;
  }
  .nl-filter-bar {
    padding: 10px;
    gap: 10px;
  }
  .nl-filter-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

.nl-card .nl-download-btn {
  margin-top: 8px;
  background: linear-gradient(135deg, #14b8a6, #0ea5e9);
}

/* ---------- Single View ---------- */
.nl-single {
  margin: 0 auto;
  max-width: 1100px;
  padding: clamp(18px, 2vw, 28px);
  font-family: inherit;
}

.nl-single-card {
  background: linear-gradient(145deg, #0f172a, #111827 48%, #0b1220);
  color: #e5e7eb;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.nl-single-hero {
  padding: clamp(18px, 2vw, 28px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: radial-gradient(circle at 12% 20%, rgba(59, 130, 246, 0.16), transparent 32%),
              radial-gradient(circle at 82% 0%, rgba(14, 165, 233, 0.18), transparent 28%),
              rgba(255, 255, 255, 0.02);
}

.nl-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.nl-chip-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
  font-weight: 600;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.nl-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.18);
}

.nl-single-title {
  margin: 0 0 10px;
  font-size: clamp(24px, 2.6vw, 34px);
  color: #fff;
  letter-spacing: -0.01em;
}

.nl-single-excerpt {
  margin: 0;
  color: #cbd5e1;
  font-size: 16px;
}

.nl-single-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.nl-single-hint {
  color: #fbbf24;
  font-weight: 600;
}

.nl-single-body {
  display: grid;
  grid-template-columns: minmax(260px, 38%) 1fr;
  gap: clamp(16px, 2vw, 26px);
  padding: clamp(18px, 2vw, 26px);
}

.nl-single-preview {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}

.nl-single-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.nl-single-icon {
  font-size: 42px;
  opacity: 0.7;
}

.nl-single-details {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: clamp(14px, 1.6vw, 20px);
  color: #e2e8f0;
}

.nl-single-details h2 {
  margin: 0 0 12px;
  font-size: 18px;
  letter-spacing: 0.01em;
}

.nl-single-filelist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.nl-single-filelist li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.nl-file-name {
  font-weight: 600;
}

.nl-file-size {
  color: #cbd5e1;
  font-size: 14px;
}

.nl-file-open {
  margin-left: auto;
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
}

.nl-file-open:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .nl-single-body {
    grid-template-columns: 1fr;
  }
}

/* Widget-Variante: helle, konturierte Karte für Sidebars/Footers */
.nl-widget {
  --nl-bg: transparent;
  --nl-text: #1f2937;
  --nl-heading: #0f172a;
  --nl-card-bg: rgba(255, 255, 255, 0.72);
  --nl-card-title: #000000;
  --nl-card-thumb-bg: rgba(15, 23, 42, 0.08);
  --nl-btn-bg: linear-gradient(135deg, #ffffff, #e5e7eb);
  --nl-btn-text: #0f172a;
  --nl-header-bg: transparent;
  font-family: inherit;
}

.nl-widget .nl-card {
  background: var(--nl-card-bg);
  color: var(--nl-text);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(6px);
}

.nl-widget .nl-card-thumb-wrap {
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14);
}

.nl-widget .nl-card-title {
  color: #000;
  float: left;
}

.nl-widget .nl-card-icon {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.25), rgba(226, 232, 240, 0.25));
  border-color: rgba(148, 163, 184, 0.45);
}

.nl-widget .nl-view-btn {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

.nl-widget .nl-download-btn {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.nl-widget .nl-view-btn:hover,
.nl-widget .nl-download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
}
