/* ==========================================================================
   FileHub — 样式表
   浅色为默认主题，跟随系统自动切换深色。无外部依赖。
   ========================================================================== */

:root {
    --bg:            #f6f7f9;
    --bg-elevated:   #ffffff;
    --surface:       #ffffff;
    --surface-2:     #f2f4f7;
    --surface-3:     #e9ecf1;
    --border:        #e3e6ec;
    --border-strong: #d0d5dd;
    --text:          #14181f;
    --text-soft:     #475467;
    --text-muted:    #8a94a6;
    --accent:        #3355ff;
    --accent-hover:  #2445e6;
    --accent-soft:   #eef1ff;
    --accent-text:   #ffffff;
    --ok:            #067647;
    --ok-soft:       #e7f6ee;
    --warn:          #b54708;
    --warn-soft:     #fdf3e7;
    --danger:        #b42318;
    --danger-soft:   #fdeceb;
    --radius:        12px;
    --radius-sm:     8px;
    --radius-lg:     18px;
    --shadow-sm:     0 1px 2px rgba(16, 24, 40, .05);
    --shadow:        0 4px 16px -4px rgba(16, 24, 40, .10), 0 2px 6px -2px rgba(16, 24, 40, .06);
    --shadow-lg:     0 24px 60px -20px rgba(16, 24, 40, .22);
    --font:          -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                     "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    --mono:          ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
                     "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:            #0e1116;
        --bg-elevated:   #161a21;
        --surface:       #161a21;
        --surface-2:     #1c212a;
        --surface-3:     #252b36;
        --border:        #262d38;
        --border-strong: #333c4a;
        --text:          #eef1f6;
        --text-soft:     #aab4c4;
        --text-muted:    #7b8698;
        --accent:        #7d94ff;
        --accent-hover:  #93a6ff;
        --accent-soft:   #1d2440;
        --accent-text:   #0b0e14;
        --ok:            #6ee7b7;
        --ok-soft:       #10261d;
        --warn:          #fbc48b;
        --warn-soft:     #2a1e10;
        --danger:        #fca5a0;
        --danger-soft:   #2c1414;
        --shadow-sm:     0 1px 2px rgba(0, 0, 0, .4);
        --shadow:        0 4px 16px -4px rgba(0, 0, 0, .5);
        --shadow-lg:     0 24px 60px -20px rgba(0, 0, 0, .7);
    }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.6 var(--font);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 650; }
h2 { font-size: 1.1rem; font-weight: 650; }

code {
    font: .875em/1.4 var(--mono);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: .1em .35em;
}

.mono { font-family: var(--mono); font-size: .86em; }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* ---------------------------------------------------------------- 顶栏 */
.topbar {
    position: sticky; top: 0; z-index: 40;
    background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 20px; height: 60px;
}

.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand-mark { width: 24px; height: 24px; color: var(--accent); }
.brand-mark path:first-child { fill: currentColor; opacity: .13; stroke: currentColor; stroke-width: 1.6; }
.brand-mark-arrow { stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; fill: none; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
    padding: 7px 13px; border-radius: 999px; font-size: .92rem; font-weight: 520;
    color: var(--text-soft); transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav .nav-quiet { color: var(--text-muted); }

/* ---------------------------------------------------------------- 主体 */
.main { padding: 34px 0 64px; display: flex; flex-direction: column; gap: 28px; }

.hero { text-align: center; padding: 14px 0 0; }
.hero h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
.hero-sub { margin: 10px auto 0; max-width: 640px; color: var(--text-soft); }
.hero-sub strong { color: var(--text); font-weight: 620; }

.page-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
}
.page-sub { margin: 6px 0 0; color: var(--text-soft); font-size: .93rem; }
.page-head-actions { display: flex; gap: 8px; }

/* ---------------------------------------------------------------- 卡片 */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    padding: 18px 22px 0;
}
.card-head-hint { font-size: .82rem; color: var(--text-muted); }

.upload-card { padding: 26px; }

/* ---------------------------------------------------------------- 拖拽区 */
.dropzone {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px;
    padding: 46px 24px;
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface-2);
    cursor: pointer;
    text-align: center;
    transition: border-color .16s, background .16s, transform .16s;
}
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.005); }

.dropzone-glyph { width: 40px; height: 40px; color: var(--accent); opacity: .85; margin-bottom: 4px; }
.dropzone-title { margin: 0; font-size: 1.05rem; font-weight: 600; }
.dropzone-hint { margin: 0; font-size: .9rem; color: var(--text-soft); }
.link-like { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.upload-options {
    display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap;
    margin-top: 20px;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-grow { flex: 1 1 240px; }
.field-label { font-size: .82rem; font-weight: 560; color: var(--text-soft); }

.input, .select {
    width: 100%;
    padding: 9px 12px;
    font: inherit; font-size: .93rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.select { appearance: none; padding-right: 32px;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
                      linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
    background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
.select-xs { padding: 4px 26px 4px 8px; font-size: .8rem; }

.upload-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.upload-total { font-size: .88rem; color: var(--text-soft); }

/* ---------------------------------------------------------------- 按钮 */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 16px;
    font: inherit; font-size: .92rem; font-weight: 560;
    border: 1px solid transparent; border-radius: var(--radius-sm);
    cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); color: var(--accent-text); }

.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); color: var(--text); }

.btn-ghost { background: transparent; color: var(--text-soft); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-danger-ghost { background: transparent; color: var(--danger); border-color: transparent; }
.btn-danger-ghost:hover { background: var(--danger-soft); color: var(--danger); }

.btn-lg { padding: 12px 24px; font-size: 1rem; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-xs { padding: 4px 9px; font-size: .78rem; border-radius: 6px; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------------- 队列 */
.queue { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }

.queue-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 14px;
    padding: 12px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.queue-name { font-size: .9rem; font-weight: 520; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-size { font-size: .82rem; color: var(--text-muted); }
.queue-status { font-size: .82rem; color: var(--text-soft); text-align: right; white-space: nowrap; }
.queue-status.is-ok { color: var(--ok); }
.queue-status.is-error { color: var(--danger); }

.progress {
    grid-column: 1 / -1;
    height: 4px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 6px;
}
.progress-bar {
    height: 100%; width: 0;
    background: var(--accent);
    border-radius: 999px;
    transition: width .18s ease-out;
}
.queue-item.is-done .progress-bar { background: var(--ok); }
.queue-item.is-error .progress-bar { background: var(--danger); }

/* ---------------------------------------------------------------- 结果 */
.results { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }

.result-row {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px;
    background: var(--ok-soft);
    border: 1px solid color-mix(in srgb, var(--ok) 24%, transparent);
    border-radius: var(--radius-sm);
    font-size: .9rem;
}
.result-row.is-error {
    background: var(--danger-soft);
    border-color: color-mix(in srgb, var(--danger) 24%, transparent);
}
.result-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-meta { color: var(--text-soft); font-size: .82rem; white-space: nowrap; }

/* ---------------------------------------------------------------- 区块 */
.section { display: flex; flex-direction: column; gap: 14px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.link-more { font-size: .88rem; color: var(--accent); }

.empty-state {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 56px 24px; text-align: center;
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    color: var(--text-soft);
}
.empty-state p { margin: 0; }
.error-code { font: 700 3rem/1 var(--mono); color: var(--accent); margin: 0; }
.error-state h1 { font-size: 1.15rem; font-weight: 600; color: var(--text-soft); }

.faq { padding-top: 8px; }
.faq-title { font-size: .95rem; color: var(--text-soft); }
.faq-list { margin: 0; padding-left: 20px; color: var(--text-soft); font-size: .9rem; display: grid; gap: 7px; }
.faq-list strong { color: var(--text); }

/* ---------------------------------------------------------------- 文件网格 */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}

.file-card {
    display: flex; flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .16s, box-shadow .16s, transform .16s;
}
.file-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-2px); }

.file-thumb {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    aspect-ratio: 16 / 10;
    background: var(--surface-2);
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-thumb-icon { width: 40px; height: 40px; color: var(--text-muted); }
.file-ext {
    position: absolute; right: 8px; bottom: 7px;
    font: 600 .66rem/1 var(--mono);
    letter-spacing: .04em;
    padding: 4px 6px;
    border-radius: 5px;
    background: color-mix(in srgb, var(--surface-3) 80%, transparent);
    color: var(--text-soft);
}

.file-body { display: flex; flex-direction: column; gap: 7px; padding: 13px 14px 14px; }
.file-name {
    font-size: .93rem; font-weight: 560;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-meta { display: flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--text-muted); flex-wrap: wrap; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }

.file-flag { font-size: .76rem; font-weight: 560; }
.flag-danger { color: var(--danger); }
.flag-muted { color: var(--text-muted); }

.file-actions { display: flex; gap: 7px; margin-top: 3px; }

/* ---------------------------------------------------------------- 工具栏 */
.toolbar {
    display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.toolbar-search { flex: 1 1 260px; width: auto; }
.toolbar .select { width: auto; min-width: 130px; }
.toolbar .btn { flex: 0 0 auto; }

/* ---------------------------------------------------------------- 分页 */
.pagination { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; padding: 8px 0; }
.page-btn {
    min-width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 11px;
    font-size: .88rem; font-weight: 520;
    color: var(--text-soft);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.page-btn:hover { border-color: var(--border-strong); color: var(--text); }
.page-btn.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.page-btn.is-disabled { opacity: .45; pointer-events: none; }
.page-gap { display: inline-flex; align-items: center; color: var(--text-muted); padding: 0 3px; }

/* ---------------------------------------------------------------- 单文件页 */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-current { color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40ch; }

.file-detail { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
@media (max-width: 900px) { .file-detail { grid-template-columns: 1fr; } }

.file-detail-preview {
    display: flex; align-items: center; justify-content: center;
    background: var(--surface-2);
    border-right: 1px solid var(--border);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    min-height: 340px; padding: 20px;
}
@media (max-width: 900px) { .file-detail-preview { border-right: none; border-bottom: 1px solid var(--border); border-radius: var(--radius-lg) var(--radius-lg) 0 0; } }
.file-detail-preview img, .file-detail-preview video { max-width: 100%; max-height: 460px; border-radius: var(--radius-sm); display: block; }
.file-detail-preview iframe { width: 100%; height: 460px; border: 0; border-radius: var(--radius-sm); background: var(--surface); }
.audio-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
.audio-wrap audio { width: min(380px, 100%); }
.audio-glyph { width: 56px; height: 56px; color: var(--accent); opacity: .8; }
.file-detail-glyph { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--text-muted); }
.detail-icon { width: 72px; height: 72px; }
.file-ext-lg { font: 600 .8rem/1 var(--mono); letter-spacing: .06em; }

.file-detail-info { padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.file-detail-name { font-size: 1.2rem; word-break: break-word; }

.meta-list { margin: 0; display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.meta-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 13px; background: var(--surface); font-size: .88rem; }
.meta-list dt { color: var(--text-muted); flex: 0 0 auto; }
.meta-list dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.meta-compact > div { padding: 7px 13px; font-size: .84rem; }

.file-detail-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.share-box { display: flex; flex-direction: column; gap: 6px; }
.share-row { display: flex; gap: 8px; }
.share-row .input { flex: 1; }

/* ---------------------------------------------------------------- 登录 */
.auth-wrap { display: flex; justify-content: center; padding: 40px 0; }
.auth-card { width: min(400px, 100%); padding: 30px; }
.auth-title { font-size: 1.25rem; }
.auth-sub { margin: 7px 0 20px; color: var(--text-soft); font-size: .9rem; }
.stack { display: flex; flex-direction: column; gap: 15px; }

/* ---------------------------------------------------------------- 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat-card {
    display: flex; flex-direction: column; gap: 3px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.stat-label { font-size: .8rem; color: var(--text-muted); }
.stat-value { font-size: 1.4rem; font-weight: 660; letter-spacing: -.02em; }
.stat-hint { font-size: .78rem; color: var(--text-muted); }

/* ---------------------------------------------------------------- 表格 */
.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .89rem; }
.data-table th, .data-table td { padding: 11px 14px; text-align: left; vertical-align: middle; }
.data-table thead th {
    font-size: .78rem; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .03em;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table tbody tr { border-bottom: 1px solid var(--border); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface-2); }
.row-muted { opacity: .55; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.table-empty { text-align: center; color: var(--text-muted); padding: 34px 0; }
.col-file { min-width: 240px; }
.col-actions { min-width: 300px; }

.cell-file { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-icon { width: 20px; height: 20px; color: var(--text-muted); flex: 0 0 auto; }
.cell-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cell-name { font-weight: 540; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34ch; }
.cell-sub { font-size: .74rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 38ch; }

.row-actions { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.inline-form { display: inline-flex; }

.badge {
    display: inline-block;
    padding: 3px 9px; border-radius: 999px;
    font-size: .75rem; font-weight: 560; white-space: nowrap;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-muted { background: var(--surface-3); color: var(--text-soft); }

.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }

/* ---------------------------------------------------------------- 日志 */
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 22px 0; }
.chip {
    font-size: .78rem; padding: 3px 9px; border-radius: 999px;
    background: var(--surface-2); color: var(--text-soft);
    border: 1px solid var(--border);
}
.chip strong { color: var(--text); }

.log-list { list-style: none; margin: 14px 0 0; padding: 0 0 8px; max-height: 420px; overflow-y: auto; }
.log-list li {
    display: grid;
    grid-template-columns: minmax(96px, auto) minmax(0, 1fr) auto auto;
    gap: 10px; align-items: baseline;
    padding: 8px 22px;
    border-top: 1px solid var(--border);
    font-size: .82rem;
}
.log-list li:first-child { border-top: none; }
.log-list .log-action { font-weight: 560; color: var(--text-soft); }
.log-login, .log-upload { color: var(--ok); }
.log-delete, .log-purge, .log-error { color: var(--danger); }
.log-detail { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-soft); }
.log-meta { color: var(--text-muted); }
.log-time { color: var(--text-muted); white-space: nowrap; }
.log-empty { display: block !important; color: var(--text-muted); text-align: center; padding: 24px 0; }

/* ---------------------------------------------------------------- 提示 */
.alerts { display: flex; flex-direction: column; gap: 8px; }
.alert {
    padding: 11px 15px; border-radius: var(--radius-sm);
    font-size: .89rem; border: 1px solid transparent;
}
.alert-success { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 22%, transparent); }
.alert-error   { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 22%, transparent); }
.alert-info    { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.alert-warn    { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 22%, transparent); }

.toasts {
    position: fixed; right: 20px; bottom: 20px; z-index: 80;
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: none;
}
.toast {
    padding: 10px 16px;
    background: var(--text); color: var(--bg);
    border-radius: var(--radius-sm);
    font-size: .87rem; font-weight: 520;
    box-shadow: var(--shadow-lg);
    animation: toast-in .2s ease-out;
}
.toast.is-error { background: var(--danger); color: #fff; }

@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- 页脚 */
.footer { border-top: 1px solid var(--border); padding: 20px 0; margin-top: 20px; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .8rem; color: var(--text-muted); }

.admin-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }

@media (max-width: 640px) {
    .wrap { width: calc(100% - 28px); }
    .upload-card { padding: 18px; }
    .dropzone { padding: 34px 16px; }
    .file-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .main { padding: 22px 0 48px; gap: 20px; }
    .log-list li { grid-template-columns: 1fr auto; }
    .log-detail { grid-column: 1 / -1; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
