*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { width: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-user-select: none; user-select: none; }
body { background: #f5f5f7; color: #1d1d1f; }
button { font: inherit; cursor: pointer; background: none; border: none; }
.header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: rgba(255,255,255,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid #e5e5ea; gap: 12px; }
.header-left h1 { font-size: 17px; font-weight: 600; }
.header-left .status { font-size: 11px; color: #6e6e73; margin-top: 2px; }
.error-banner { display: none; margin: 12px 16px 0; padding: 10px 12px; border: 1px solid #ffd5d1; background: #fff3f1; color: #b42318; border-radius: 12px; font-size: 12px; }
.pill { flex-shrink: 0; font-size: 11px; color: #007AFF; background: #f0f5ff; padding: 4px 8px; border-radius: 999px; font-weight: 500; }
.row-action { padding: 7px 12px; border-radius: 999px; background: #007AFF; color: #fff; font-size: 12px; font-weight: 500; white-space: nowrap; }
.row-action.secondary { background: #eef1f6; color: #344054; }
.row-action:hover, .row-action:focus-visible { filter: brightness(0.96); }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 0; color: #8e8e93; gap: 8px; text-align: center; }
.empty-icon { font-size: 44px; opacity: 0.6; }
.empty p { font-size: 14px; font-weight: 500; color: #6e6e73; }
.empty span:last-child { font-size: 12px; max-width: 260px; color: #8e8e93; }
.date-group { margin-top: 16px; }
.date-group:first-child { margin-top: 8px; }
.date-label { font-size: 12px; font-weight: 600; color: #6e6e73; text-transform: uppercase; letter-spacing: 0.5px; padding: 0 2px 8px; }
.item {
display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
background: #fff; border-radius: 12px; margin-bottom: 1px;
transition: background 120ms;
}
.item:first-child { border-radius: 12px 12px 2px 2px; }
.item:last-child { border-radius: 2px 2px 12px 12px; margin-bottom: 0; }
.item:only-child { border-radius: 12px; }
.item:hover { background: #fafafa; }
.file-icon { width: 36px; height: 36px; border-radius: 8px; background: #f2f4f7; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.file-icon.is-active { background: #e8f0fe; }
.file-icon.is-failed { background: #fff1f2; }
.item-body { flex: 1; min-width: 0; }
.item-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.file-name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; color: #1d1d1f; text-decoration: none; }
.file-name-link { color: #0b57d0; cursor: pointer; text-align: left; }
.file-name-link:hover, .file-name-link:focus-visible { color: #174ea6; text-decoration: underline; }
.file-name-link:focus-visible { outline: none; }
.item-controls { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.ctrl-btn { width: 26px; height: 26px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: #667085; background: transparent; font-size: 12px; transition: all 100ms; }
.ctrl-btn:hover, .ctrl-btn:focus-visible { background: #f2f4f7; color: #111827; }
.ctrl-btn.danger:hover, .ctrl-btn.danger:focus-visible { background: #fff1f2; color: #b42318; }
.ctrl-btn svg { width: 14px; height: 14px; pointer-events: none; }
.item-detail { font-size: 11px; color: #8e8e93; margin-top: 2px; line-height: 1.4; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.item-detail .sep { color: #d1d5db; }
.error-text { color: #dc2626; }
.progress-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.progress-track { flex: 1; height: 3px; background: #e5e5ea; border-radius: 2px; overflow: hidden; }
.progress-bar { height: 100%; background: #007AFF; border-radius: 2px; width: 100%; transform-origin: left; transition: transform 140ms linear; will-change: transform; }
.progress-bar.paused { background: #8e8e93; transition-duration: 0ms; }
.progress-bar.indeterminate { transform: scaleX(0.34) !important; animation: dl-slide 1.2s ease-in-out infinite; }
.progress-info { font-size: 11px; color: #007AFF; flex-shrink: 0; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.progress-info.paused { color: #8e8e93; }
.action-row { margin-top: 6px; display: flex; gap: 6px; }
.act-btn { font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; color: #007AFF; background: #f0f5ff; transition: all 100ms; }
.act-btn:hover, .act-btn:focus-visible { background: #dbeafe; }
.act-btn.warn { color: #dc2626; background: #fff1f2; }
.act-btn.warn:hover, .act-btn.warn:focus-visible { background: #ffe4e6; }
@keyframes dl-slide {
0% { transform: translateX(-120%); }
100% { transform: translateX(320%); }
}