/* ============================================================
   Sevki Dashboard — Stijlen
   Donker thema geïnspireerd op Homarr
   ============================================================ */

:root {
  --bg:           #0f1117;
  --surface:      #1a1d27;
  --surface-hover:#1f2335;
  --border:       rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.15);
  --text:         #e2e8f0;
  --text-muted:   #64748b;
  --text-dim:     #94a3b8;
  --accent:       #6366f1;
  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 4px 24px rgba(0,0,0,0.4);
  --transition:   0.18s ease;
  --header-height: 64px;
  --tabs-height:   48px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Header ─────────────────────────────────────────────────── */
#dashboard-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,17,23,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  padding: 0 24px;
  display: flex;
  align-items: center;
}

#header-widgets {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

/* ── Tab bar ─────────────────────────────────────────────────── */
#tabs-bar {
  position: sticky;
  top: var(--header-height);
  z-index: 90;
  background: rgba(15,17,23,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--tabs-height);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.tab-btn iconify-icon {
  font-size: 16px;
}

.tab-btn:hover {
  color: var(--text);
  background: var(--surface);
}

.tab-btn.active {
  color: var(--accent);
  background: rgba(99,102,241,0.12);
}

/* ── Klok widget (header) ────────────────────────────────────── */
.widget-clock {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.widget-clock .time {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.5px;
}
.widget-clock .date {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: capitalize;
}

/* ── Stats widget (header) ───────────────────────────────────── */
.widget-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.stats-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.stats-item iconify-icon {
  font-size: 14px;
  color: var(--accent);
}

.stats-label {
  color: var(--text-muted);
  min-width: 28px;
}

.stats-bar {
  width: 60px;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.stats-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.5s ease;
  width: 0%;
}

.stats-value {
  color: var(--text-dim);
  min-width: 50px;
  font-size: 11px;
}

/* ── Weer widget (header) ────────────────────────────────────── */
.widget-weather {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.widget-weather .temp {
  font-size: 15px;
  font-weight: 500;
}
.widget-weather .city {
  font-size: 12px;
  color: var(--text-muted);
}
.widget-weather iconify-icon {
  font-size: 20px;
  color: #f59e0b;
}

/* ── Main layout — 3 kolommen ────────────────────────────────── */
#dashboard-main {
  flex: 1;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 340px 1fr 340px;
  gap: 20px;
  width: 100%;
  align-items: start;
}

/* Linkerkolom: widgets */
#left-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--header-height) + var(--tabs-height) + 20px);
  max-height: calc(100vh - var(--header-height) - var(--tabs-height) - 40px);
  overflow-y: auto;
  scrollbar-width: none;
}
#left-panel::-webkit-scrollbar { display: none; }

/* Middenkolom: bookmarks */
#center-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Rechterkolom: widgets */
#right-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: start;
  position: sticky;
  top: calc(var(--header-height) + var(--tabs-height) + 20px);
}

#right-panel .widget-card iframe {
  height: calc(100vh - var(--header-height) - var(--tabs-height) - 80px);
  min-height: 360px;
}

/* ── Bookmark secties ────────────────────────────────────────── */
.bookmark-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bookmark-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}

.bookmark-group-header iconify-icon {
  font-size: 15px;
  color: var(--tile-color, var(--accent));
}

.bookmark-group-header span {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* ── App tiles grid ───────────────────────────────────────────── */
.bookmark-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bookmark-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 90px;
  padding: 14px 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}

.bookmark-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--tile-color, var(--accent));
  opacity: 0;
  transition: opacity var(--transition);
}

.bookmark-tile:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.bookmark-tile:hover::before {
  opacity: 1;
}

.tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.bookmark-tile:hover .tile-icon {
  background: rgba(99, 102, 241, 0.28);
}

.tile-icon iconify-icon {
  font-size: 24px;
  color: var(--tile-color, var(--accent));
}

.tile-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
}

.tile-name {
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.tile-desc {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ── Widget kaart ────────────────────────────────────────────── */
.widget-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.widget-card.size-small  { min-height: 120px; }
.widget-card.size-medium { min-height: 240px; }
.widget-card.size-large  { min-height: 400px; grid-column: span 2; }
.widget-card.size-full   { grid-column: 1 / -1; }

.widget-card iframe {
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: none;
  display: block;
}

/* Inline HTML widget */
.widget-inline {
  width: 100%;
}

/* ── Laadindicator ───────────────────────────────────────────── */
.loading-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 13px;
  gap: 8px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Widget titel (voor iframe panels) ───────────────────────── */
.widget-title {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

/* ── iFrame fallback ─────────────────────────────────────────── */
.iframe-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  height: 100%;
  min-height: 160px;
}

.iframe-fallback iconify-icon {
  font-size: 32px;
  opacity: 0.4;
}

.iframe-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: opacity var(--transition);
}

.iframe-link:hover { opacity: 0.85; }

.hidden { display: none !important; }

/* ── Foutmelding ─────────────────────────────────────────────── */
.error-msg {
  padding: 12px 16px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-sm);
  color: #f87171;
  font-size: 12px;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1300px) {
  #dashboard-main {
    grid-template-columns: 280px 1fr 280px;
  }
}

@media (max-width: 960px) {
  #dashboard-main {
    grid-template-columns: 1fr;
  }
  #left-panel, #right-panel {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
  #right-panel .widget-card iframe {
    height: 400px;
  }
}

@media (max-width: 480px) {
  #dashboard-main { padding: 12px; gap: 12px; }
  .bookmark-tile { width: 76px; padding: 12px 6px 10px; }
  .tile-icon { width: 38px; height: 38px; }
  .tile-icon iconify-icon { font-size: 20px; }
  #tabs-bar { padding: 0 12px; }
}

/* ── Calendar widget ─────────────────────────────────────────── */
.cal-widget {
  padding: 14px;
}

.cal-loading {
  display: flex;
  justify-content: center;
  padding: 40px;
}

.cal-setup {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  gap: 12px;
  text-align: center;
}

.cal-setup iconify-icon {
  font-size: 42px;
  color: var(--text-muted);
}

.cal-setup p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.cal-setup code {
  background: var(--surface-hover);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
  color: var(--accent);
}

.cal-connect-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: #4285f4;
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: opacity var(--transition);
}

.cal-connect-btn:hover { opacity: 0.85; }

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cal-nav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  font-size: 20px;
  transition: background var(--transition), color var(--transition);
}

.cal-nav-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.cal-month-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-transform: capitalize;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 14px;
}

.cal-dow {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 2px 3px;
  border-radius: 6px;
  min-height: 32px;
  gap: 2px;
  transition: background var(--transition);
}

.cal-day:not(.empty):hover {
  background: var(--surface-hover);
}

.cal-day.today {
  background: rgba(99,102,241,0.15);
}

.cal-day.today .cal-num {
  color: var(--accent);
  font-weight: 700;
}

.cal-num {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1;
}

.cal-dots {
  display: flex;
  gap: 2px;
  justify-content: center;
}

.cal-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  display: block;
}

.cal-upcoming {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.cal-upcoming-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.cal-event-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.cal-event-row:last-child { border-bottom: none; }

.cal-event-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 4px;
}

.cal-event-info { flex: 1; min-width: 0; }

.cal-event-title {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-event-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Calendar day hover */
.cal-day:not(.empty) {
  cursor: pointer;
}

.cal-tooltip {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  z-index: 2000;
  min-width: 180px;
  max-width: 260px;
  box-shadow: var(--shadow);
  display: none;
  pointer-events: none;
}

.cal-tooltip-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px solid var(--border);
}

.cal-tooltip-row:last-child { border-bottom: none; }

.cal-tooltip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.cal-tooltip-title {
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.3;
}

.cal-tooltip-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

.cal-no-events {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 10px 0;
}

/* ── Voetbal widget ──────────────────────────────────────────── */
.fb-widget {
  padding: 12px;
}

.fb-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
}

.fb-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.fb-card {
  display: block;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition);
}

.fb-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.fb-card:last-child { margin-bottom: 0; }

.fb-card-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.fb-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.fb-team {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  min-width: 0;
}

.fb-team span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fb-team-r {
  justify-content: flex-end;
  text-align: right;
}

.fb-badge {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.fb-score {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  min-width: 44px;
  text-align: center;
  flex-shrink: 0;
}

.fb-time {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  min-width: 64px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1.4;
}

.fb-meta {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
}

/* ── Voetbal fixture lijst ───────────────────────────────────── */
.fb-fixtures {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.fb-fixtures-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.fb-fixture-day {
  margin-bottom: 8px;
}

.fb-fixture-date-hdr {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: capitalize;
  padding: 3px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3px;
}

.fb-fixture-match {
  display: grid;
  grid-template-columns: 36px 1fr 12px 1fr;
  align-items: center;
  gap: 4px;
  padding: 3px 0;
  font-size: 11px;
  color: var(--text-dim);
}

.fb-fixture-match.fb-fixture-hl {
  color: var(--text);
  font-weight: 700;
}

.fb-fixture-time {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

.fb-fixture-home {
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fb-fixture-vs {
  text-align: center;
  color: var(--text-muted);
  font-size: 10px;
}

.fb-fixture-away {
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Now Playing widget (Tautulli) ───────────────────────────── */
.widget-card:has(.np-widget) { min-height: auto; }

.np-widget { padding: 12px; }

.np-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.np-header iconify-icon { font-size: 18px; color: #e5a00d; }

.np-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 20px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}
.np-empty iconify-icon { font-size: 32px; opacity: 0.4; }

.np-session {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.np-session:last-child { border-bottom: none; }

.np-poster {
  width: 52px;
  height: 78px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--surface-hover);
}
.np-poster-empty { background: var(--surface-hover); }

.np-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.np-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.np-user-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-dim);
  flex-wrap: wrap;
}
.np-user-row iconify-icon { font-size: 13px; color: var(--text-muted); }
.np-dot { color: var(--text-muted); margin: 0 2px; }

.np-progress-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0;
}

.np-elapsed, .np-remaining {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  min-width: 36px;
}
.np-remaining { text-align: right; color: var(--text-dim); }

.np-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.np-bar-fill {
  height: 100%;
  background: #e5a00d;
  border-radius: 2px;
  transition: width 0.8s linear;
}

.np-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 10px;
  color: var(--text-muted);
}

.np-transcode-dp { color: #4ade80; }
.np-transcode-ds { color: #facc15; }
.np-transcode-tc { color: #f87171; }

/* ── Downloads widget ──────────────────────────────────────── */
.dl-widget {
  width: 100%;
}
.widget-card:has(.dl-widget) { min-height: auto; }

.dl-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.dl-header iconify-icon { font-size: 15px; }

.dl-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}
.dl-empty iconify-icon { font-size: 28px; }

.dl-empty-msg {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 0 4px;
}

.dl-source {
  margin-bottom: 10px;
}
.dl-source:last-child { margin-bottom: 0; }

.dl-source-hdr {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.dl-source-hdr iconify-icon { font-size: 14px; }

.dl-speed {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: #4ade80;
  font-variant-numeric: tabular-nums;
}
.dl-source-err  { margin-left: auto; font-size: 11px; color: #f87171; }
.dl-source-idle { margin-left: auto; font-size: 11px; color: var(--text-muted); }

.dl-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 5px;
}
.dl-item:last-child { margin-bottom: 0; }

.dl-item-name {
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
}

.dl-item-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.dl-bar-wrap { flex: 1; }
.dl-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.dl-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.8s ease;
}
.dl-bar-fill.dl-bar-active { background: #4ade80; }

.dl-pct {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  min-width: 30px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dl-state {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}
.dl-state-active  { background: rgba(74,222,128,0.12); color: #4ade80; }
.dl-state-paused  { background: rgba(250,204,21,0.12);  color: #facc15; }
.dl-state-stalled { background: rgba(148,163,184,0.10); color: var(--text-muted); }

.dl-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.dl-extra {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 4px 0 2px;
}
