/* ==========================================================================
   FileHub 全站样式表
   --------------------------------------------------------------------------
   本文件由 functions.php 的 layout_header() 内联 CSS 抽取而来（V5.2.1）。
   抽取原则：规则内容与顺序与原内联样式完全一致，仅做换行与注释，视觉零变化。

   动态部分（原为 PHP 插值，现改为内联 style 注入 CSS 变量）：
     --brand  品牌主色，来自后台「品牌主色」设置
     --align  文本对齐方向，RTL 语言为 right，其余为 left
   在 :root 中已给出默认值，运行时由 <head> 内联 <style> 覆盖。
   ========================================================================== */

:root {
    --brand: #2563eb;
    --bg: #f5f7fb;
    --ink: #172033;
    --muted: #697386;
    --line: #e6e9ef;
    --panel: #fff;
    --dark: #111827;
    --align: left;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    text-align: var(--align);
}

/* ---- 布局骨架 ---- */
.app {
    min-height: 100vh;
}

.shell {
    max-width: 1380px;
    margin: auto;
    padding: 0 24px 34px;
}

/* ---- 顶部导航 ---- */
.header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, .93);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    margin-bottom: 28px;
}

.header-inner {
    max-width: 1380px;
    margin: auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 240px;
}

.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--brand);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    overflow: hidden;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-name {
    font-weight: 800;
    font-size: 17px;
    white-space: nowrap;
}

.nav {
    display: flex;
    gap: 6px;
    flex: 1;
    flex-wrap: wrap;
}

.nav a {
    color: #4b5563;
    text-decoration: none;
    padding: 9px 11px;
    border-radius: 9px;
    font-size: 14px;
}

.nav a:hover {
    background: #f1f5f9;
    color: var(--brand);
}

.lang-form select {
    width: auto;
    min-width: 128px;
    padding: 9px 11px;
}

/* ---- 页头 ---- */
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin: 4px 0 18px;
}

.page-head h1 {
    font-size: 26px;
    margin: 0;
}

.eyebrow {
    font-size: 12px;
    color: var(--brand);
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* ---- 卡片与栅格 ---- */
.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 7px 28px rgba(15, 23, 42, .045);
    margin-bottom: 18px;
}

.card h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.meta {
    background: #fafbfc;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 17px;
}

.meta small {
    display: block;
    color: var(--muted);
    margin-bottom: 7px;
}

.meta strong {
    font-size: 19px;
}

/* ---- 按钮 ---- */
.btn,
.btn2,
.danger-btn,
.copy-btn,
.download-btn,
.link-copy-btn,
.hash-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    padding: 10px 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}

.btn {
    background: var(--brand);
    color: #fff;
}

.btn2,
.copy-btn {
    background: #eef2f7;
    color: #263244;
}

.download-btn {
    background: #2563eb;
    color: #fff;
}

.link-copy-btn {
    background: #16a34a;
    color: #fff;
}

.hash-copy-btn {
    background: #7c3aed;
    color: #fff;
}

.danger-btn {
    background: #dc2626;
    color: #fff;
}

.download-btn:hover,
.link-copy-btn:hover,
.hash-copy-btn:hover,
.danger-btn:hover,
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, .12);
}

/* ---- 表单 ---- */
input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d7dce5;
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
}

label {
    display: block;
    font-size: 13px;
    color: #465064;
    font-weight: 700;
    margin-bottom: 7px;
}

.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

/* ---- 提示条 ---- */
.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
}

.success {
    background: #ecfdf3;
    color: #067647;
}

.error {
    background: #fef3f2;
    color: #b42318;
}

.info {
    background: #eff8ff;
    color: #175cd3;
}

.warn {
    background: #fffaeb;
    color: #b54708;
}

/* ---- 表格 ---- */
.table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
}

th,
td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    text-align: var(--align);
}

th {
    font-size: 12px;
    color: #667085;
    background: #fafbfc;
    white-space: nowrap;
}

.tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef4ff;
    color: #3538cd;
    font-size: 12px;
    font-weight: 700;
}

.hash {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    word-break: break-all;
    color: #667085;
}

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

/* ---- 进度条 ---- */
.progress-wrap {
    display: none;
    margin-top: 16px;
    padding: 16px;
    border-radius: 12px;
    background: #fafbfc;
    border: 1px solid var(--line);
}

.progress-bar {
    height: 11px;
    border-radius: 999px;
    background: #e7ebf0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: var(--brand);
}

/* ---- 页脚与操作区 ---- */
.footer {
    color: #8a94a6;
    text-align: center;
    font-size: 12px;
    padding: 24px 0;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---- 表格排序 ---- */
.sort-link {
    display: inline-block;
    text-decoration: none;
    color: #98a2b3;
    font-size: 10px;
    line-height: 1;
    padding: 2px;
}

.sort-link:hover,
.sort-link.active {
    color: var(--brand);
    font-weight: 900;
}

/* ---- 容量条 ---- */
.capacity-bar {
    height: 8px;
    background: #e8edf4;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 12px;
}

.capacity-fill {
    height: 100%;
    background: var(--brand);
}

/* ---- 响应式 ---- */
@media (max-width: 850px) {
    .header-inner {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 12px 14px;
    }

    .brand {
        min-width: auto;
    }

    .nav {
        order: 3;
        width: 100%;
    }

    .shell {
        padding: 0 14px 24px;
    }

    .page-head {
        align-items: flex-start;
        flex-direction: column;
    }
}
