/* ============================================================
   云匣网盘 · 全局样式
   ============================================================ */

/* hidden 属性必须永远生效，避免被后文的 display 声明覆盖 */
[hidden] {
    display: none !important;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-50: #eef4ff;
    --primary-100: #dbe7fe;

    --bg: #f2f3f5;
    --card: #ffffff;
    --text: #101319;
    --text-2: #333a45;
    --muted: #6b7280;
    --muted-2: #9ca3af;
    --border: #d8dce2;
    --border-2: #e7e9ed;

    --success: #0f9d6b;
    --danger: #d92d20;
    --warn: #d97706;
    --info: #2563eb;

    /* 企业级硬直角：所有圆角归零 */
    --radius: 0;
    --radius-sm: 0;
    --radius-lg: 0;

    --shadow-xs: 0 1px 1px rgba(16, 24, 40, .03);
    --shadow: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow-lg: 0 4px 16px rgba(16, 24, 40, .10);

    --sidebar-w: 238px;
    --topbar-h: 64px;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

img {
    max-width: 100%;
}

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

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

.small {
    font-size: 12.5px;
}

.dot {
    color: var(--muted-2);
    margin: 0 4px;
}

.ico {
    flex: 0 0 auto;
    display: inline-block;
    vertical-align: middle;
}

/* ---------------- 布局 ---------------- */

.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: #111c2e;
    color: #d7dee8;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 0;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #fff;
}

.brand-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    letter-spacing: .3px;
}

.sb-close {
    display: none;
    margin-left: auto;
    background: none;
    border: 0;
    color: #9fb0c7;
}

.admin-site {
    padding: 10px 18px 0;
    font-size: 12px;
    color: #8fa2bb;
}

.nav {
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: #b9c5d6;
    font-size: 13.5px;
    transition: background .15s, color .15s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.nav-item.active {
    background: rgba(37, 99, 235, .22);
    color: #fff;
    box-shadow: inset 2px 0 0 #3b82f6;
}

.nav-ico {
    display: inline-flex;
    color: #8ea4c0;
}

.nav-item.active .nav-ico {
    color: #7db1ff;
}

.sb-foot {
    padding: 12px 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.back-link {
    margin-bottom: 10px;
    background: rgba(255, 255, 255, .04);
}

.usage {
    margin-bottom: 12px;
}

.usage-top {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #9fb0c7;
    margin-bottom: 6px;
}

.bar {
    height: 6px;
    border-radius: 0;
    background: #e8edf5;
    overflow: hidden;
}

.bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    border-radius: 0;
    transition: width .4s;
}

.bar i.warn {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.bar i.danger {
    background: linear-gradient(90deg, #ef4444, #f97316);
}

.sidebar .bar {
    background: rgba(255, 255, 255, .12);
}

.bar.big {
    height: 9px;
}

.sb-user {
    display: flex;
    align-items: center;
    gap: 9px;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 0;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex: 0 0 auto;
}

.avatar.sm {
    width: 26px;
    height: 26px;
    font-size: 12px;
}

.sb-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.sb-user-info b {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sb-user-info em {
    font-style: normal;
    font-size: 11.5px;
    color: #8fa2bb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    transition: background .15s, color .15s;
}

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

.sidebar .icon-btn {
    color: #8fa2bb;
}

.sidebar .icon-btn:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.icon-btn.danger:hover {
    background: #fee2e2;
    color: var(--danger);
}

/* ---------------- 主区 ---------------- */

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 22px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 30;
}

.menu-btn {
    display: none;
}

.page-title {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 40%;
}

.search-box {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 0 14px;
    height: 36px;
    width: 280px;
    max-width: 34vw;
    transition: border-color .15s, box-shadow .15s;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .45);
    background: #fff;
}

.search-ico {
    color: var(--muted-2);
    display: inline-flex;
}

.search-box input {
    border: 0;
    outline: 0;
    background: transparent;
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
    color: var(--text);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.content {
    flex: 1;
    padding: 20px 22px 40px;
}

.footer {
    padding: 16px 22px 22px;
    color: var(--muted-2);
    font-size: 12px;
    display: flex;
    gap: 4px;
    align-items: center;
}

.site-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 22px 0;
    padding: 10px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    color: #92400e;
    font-size: 13px;
}

/* ---------------- 按钮 ---------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: all .15s;
}

.btn:hover {
    border-color: #d1d5db;
    background: #fafafa;
    color: var(--text);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

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

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

.btn-ghost {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .18);
    color: #fff;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.btn-ghost.danger {
    color: #fecaca;
}

.btn-sm {
    height: 30px;
    padding: 0 10px;
    font-size: 12.5px;
}

.btn-block {
    width: 100%;
    height: 42px;
    font-size: 14px;
}

/* ---------------- 表单 ---------------- */

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.field > span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
}

.field input,
.field select,
.field textarea,
.input,
.select,
textarea {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

textarea {
    height: auto;
    padding: 9px 12px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.input:focus,
.select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .45);
}

.field input:disabled {
    background: #f9fafb;
    color: var(--muted);
}

.field small {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}

.form .field-row {
    display: flex;
    gap: 12px;
}

.form .field-row .field {
    flex: 1;
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--text-2);
    margin-bottom: 12px;
    cursor: pointer;
}

.check input {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
}

.filter-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-form .input {
    width: 200px;
    height: 36px;
}

.filter-form .select {
    width: auto;
    min-width: 120px;
    height: 36px;
}

/* ---------------- 提示 ---------------- */

.alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 14px;
    border: 1px solid transparent;
}

.alert span {
    flex: 1;
}

.alert-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-warn {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.alert-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.alert-x {
    border: 0;
    background: transparent;
    color: inherit;
    opacity: .6;
    display: inline-flex;
    padding: 2px;
}

.alert-x:hover {
    opacity: 1;
}

/* ---------------- 面包屑 / 工具栏 ---------------- */

.crumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--muted);
}

.crumb-item {
    padding: 3px 6px;
    border-radius: 0;
}

.crumb-item:hover {
    background: var(--primary-50);
    color: var(--primary);
}

.crumb-item.current {
    color: var(--text-2);
    font-weight: 500;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crumb-sep {
    display: inline-flex;
    color: var(--muted-2);
}

.crumb-clear {
    margin-left: auto;
    color: var(--primary);
    font-size: 12.5px;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-count {
    color: var(--muted);
    font-size: 12.5px;
}

.sort-group .select {
    height: 32px;
    width: auto;
    font-size: 12.5px;
    padding: 0 8px;
    color: var(--text-2);
}

.view-switch {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #fff;
}

.view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 30px;
    color: var(--muted);
}

.view-btn:hover {
    background: var(--bg);
}

.view-btn.active {
    background: var(--primary-50);
    color: var(--primary);
}

/* ---------------- 文件列表 ---------------- */

.file-list {
    background: transparent;
}

.file-item {
    position: relative;
    border-radius: var(--radius-sm);
    transition: background .12s, border-color .12s, box-shadow .12s;
}

/* 列表视图 */
.file-list.is-list .file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--border-2);
}

.file-list.is-list .file-item:hover {
    background: #fff;
    box-shadow: var(--shadow-xs);
}

.file-list.is-list .file-item:last-child {
    border-bottom: 0;
}

.file-list.is-list .fi-main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.file-list.is-list .fi-name {
    flex: 1;
    min-width: 0;
}

.file-list.is-list .fi-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
    font-size: 12.5px;
    color: var(--muted);
}

.file-list.is-list .m-path {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted-2);
}

/* 网格视图 */
.file-list.is-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
    gap: 12px;
}

.file-list.is-grid .file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 12px 14px;
    background: #fff;
    border: 1px solid var(--border);
    text-align: center;
}

.file-list.is-grid .file-item:hover {
    border-color: #c7d7f5;
    box-shadow: none;
    transform: translateY(-1px);
}

.file-list.is-grid .fi-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 100%;
    min-width: 0;
}

.file-list.is-grid .fi-name {
    width: 100%;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-list.is-grid .fi-meta {
    display: flex;
    gap: 6px;
    justify-content: center;
    font-size: 11.5px;
    color: var(--muted);
    flex-wrap: wrap;
}

.file-list.is-grid .m-path {
    display: none;
}

/* 公共部分 */
.fi-check {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity .12s;
}

.file-item:hover .fi-check,
.file-item.selected .fi-check {
    opacity: 1;
}

.file-list.is-grid .fi-check {
    position: absolute;
    top: 8px;
    left: 8px;
}

.fi-check input {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
    cursor: pointer;
}

.fi-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: #f1f5fb;
    color: #64748b;
    flex: 0 0 auto;
    overflow: hidden;
}

.file-list.is-grid .fi-icon {
    width: 62px;
    height: 62px;
    border-radius: 0;
}

.k-folder { background: #eff6ff; color: #3b82f6; }
.k-image  { background: #ecfeff; color: #0891b2; }
.k-video  { background: #f5f3ff; color: #7c3aed; }
.k-audio  { background: #fffbeb; color: #d97706; }
.k-doc    { background: #ecfdf5; color: #059669; }
.k-pdf    { background: #fef2f2; color: #dc2626; }
.k-zip    { background: #fefce8; color: #a16207; }
.k-code   { background: #f1f5f9; color: #475569; }
.k-file   { background: #f1f5f9; color: #64748b; }

.fi-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fi-ext {
    position: absolute;
    bottom: 2px;
    right: 3px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .4px;
    color: #fff;
    background: rgba(17, 24, 39, .55);
    padding: 1px 3px;
    border-radius: 0;
    line-height: 1.2;
}

.fi-name {
    display: block;
    font-size: 13.5px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-item:hover .fi-name {
    color: var(--primary);
}

.fi-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
    opacity: 0;
    transition: opacity .12s;
}

.file-item:hover .fi-actions,
.file-item.selected .fi-actions {
    opacity: 1;
}

.file-list.is-grid .fi-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255, 255, 255, .92);
    border-radius: 0;
}

.file-item.selected {
    background: var(--primary-50) !important;
    box-shadow: inset 0 0 0 1px var(--primary-100);
}

/* 回收站样式 */
.file-item.is-trashed .fi-name {
    color: var(--text-2);
}

.file-item.is-trashed:hover .fi-name {
    color: var(--text-2);
}

/* ---------------- 空状态 ---------------- */

.empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--muted);
}

.empty.small {
    padding: 20px;
}

.empty-ico {
    width: 76px;
    height: 76px;
    border-radius: 0;
    background: #eef3fb;
    color: #9db4d6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.empty h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-2);
}

.empty p {
    margin: 0;
    font-size: 13px;
    max-width: 380px;
    line-height: 1.7;
}

.hint {
    margin-top: 16px;
    padding: 10px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    color: #92400e;
    font-size: 12.5px;
}

/* ---------------- 批量操作条 ---------------- */

.batch-bar {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #111c2e;
    border-radius: 0;
    box-shadow: var(--shadow-lg);
    z-index: 60;
}

.batch-count {
    color: #cbd5e1;
    font-size: 13px;
    padding: 0 8px;
}

.batch-count b {
    color: #fff;
}

/* ---------------- 上传面板 ---------------- */

.upload-panel {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 340px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 70;
    overflow: hidden;
}

.up-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-2);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
}

.up-list {
    max-height: 240px;
    overflow-y: auto;
    padding: 6px 0;
}

.up-item {
    padding: 8px 14px;
}

.up-item .up-name {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-2);
    margin-bottom: 5px;
}

.up-item .up-name span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.up-item .up-name span:last-child {
    color: var(--muted);
    flex: 0 0 auto;
}

.up-item .bar {
    height: 4px;
}

.up-item.error .up-name {
    color: var(--danger);
}

/* ---------------- 拖拽遮罩 ---------------- */

.drop-mask {
    position: fixed;
    inset: 0;
    background: rgba(37, 99, 235, .1);
    backdrop-filter: blur(2px);
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.drop-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 36px 54px;
    border: 2px dashed #6ea0f5;
    border-radius: 0;
    background: rgba(255, 255, 255, .95);
    color: var(--primary);
    font-weight: 500;
}

/* ---------------- 弹窗 ---------------- */

.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, .45);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal.wide {
    max-width: 560px;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-2);
}

.modal-head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.modal-body {
    padding: 18px 20px;
}

.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--border-2);
    background: #fcfcfd;
}

.modal-body p {
    margin: 0 0 12px;
    color: var(--text-2);
    line-height: 1.7;
}

/* 右键菜单 */
.ctx-menu {
    position: fixed;
    min-width: 168px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 5px;
    z-index: 110;
}

.ctx-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    border-radius: 0;
    font-size: 13px;
    color: var(--text-2);
    text-align: left;
}

.ctx-item:hover {
    background: var(--bg);
}

.ctx-item.danger {
    color: var(--danger);
}

.ctx-item.danger:hover {
    background: #fef2f2;
}

/* 目录选择器 */
.folder-picker {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
    margin-bottom: 14px;
}

.folder-node {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 0;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-2);
}

.folder-node:hover {
    background: var(--bg);
}

.folder-node.active {
    background: var(--primary-50);
    color: var(--primary);
    font-weight: 500;
}

.folder-node .ico {
    color: var(--muted-2);
}

.folder-node.active .ico {
    color: var(--primary);
}

/* ---------------- 卡片 ---------------- */

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-xs);
}

.card-title {
    font-size: 14.5px;
    font-weight: 600;
    margin: 0 0 16px;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.card-head .card-title {
    margin: 0;
}

.link {
    color: var(--primary);
    font-size: 12.5px;
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.section-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
}

.section-sub {
    margin: 0;
    color: var(--muted);
    font-size: 12.5px;
}

/* ---------------- 表格 ---------------- */

.table-wrap {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table thead th {
    text-align: left;
    padding: 11px 14px;
    background: #fafbfc;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-weight: 500;
    font-size: 12.5px;
    white-space: nowrap;
}

.table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-2);
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table tbody tr:hover {
    background: #fbfcfe;
}

.ta-right {
    text-align: right;
}

.ta-center {
    text-align: center;
}

.cell-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cell-user > div {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.cell-user b {
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}

.cell-user em {
    font-style: normal;
    font-size: 11.5px;
    color: var(--muted);
}

.quota-cell {
    min-width: 150px;
}

.quota-cell .bar {
    margin-bottom: 4px;
}

.inline-form {
    display: inline-block;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 18px 0;
}

.pager-btn {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 13px;
    color: var(--text-2);
}

.pager-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pager-info {
    color: var(--muted);
    font-size: 12.5px;
}

/* ---------------- 标签 ---------------- */

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 0;
    font-size: 11.5px;
    line-height: 1.7;
    white-space: nowrap;
}

.tag-ok {
    background: #ecfdf5;
    color: #047857;
}

.tag-danger {
    background: #fef2f2;
    color: #b91c1c;
}

.tag-warn {
    background: #fffbeb;
    color: #b45309;
}

.tag-info {
    background: var(--primary-50);
    color: var(--primary-dark);
}

.tag-muted {
    background: #f3f4f6;
    color: var(--muted);
}

.chip {
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 0;
    background: #fff;
    font-size: 12px;
    color: var(--text-2);
}

.chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
}

.quick-quota {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.info-box {
    background: #f8fafc;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 12.5px;
}

.info-box b {
    display: block;
    margin-bottom: 6px;
    color: var(--text-2);
}

.info-box ul {
    margin: 0;
    padding-left: 16px;
    color: var(--muted);
    line-height: 1.9;
}

.danger-zone {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px dashed #fecaca;
}

.danger-zone h4 {
    margin: 0 0 4px;
    font-size: 13px;
    color: var(--danger);
}

/* ---------------- 登录 / 注册 ---------------- */

.auth-body {
    background:
        radial-gradient(1200px 600px at 10% -10%, #e8f1ff 0%, transparent 60%),
        radial-gradient(900px 500px at 100% 100%, #e6f7f5 0%, transparent 55%),
        var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-wrap {
    width: 100%;
    max-width: 404px;
}

.auth-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 30px 30px 24px;
    box-shadow: 0 4px 16px rgba(16, 24, 40, .10);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    font-weight: 600;
    color: var(--text);
    font-size: 15px;
}

.auth-brand .brand-logo {
    width: 34px;
    height: 34px;
}

.auth-title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 650;
    letter-spacing: -.2px;
}

.auth-sub {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 13px;
}

.auth-form .field {
    margin-bottom: 14px;
}

.auth-form .field input {
    height: 42px;
}

.auth-foot {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

.auth-foot a {
    color: var(--primary);
    font-weight: 500;
}

.auth-copy {
    text-align: center;
    margin-top: 18px;
    color: var(--muted-2);
    font-size: 11.5px;
}

/* ---------------- 分享页 ---------------- */

.share-body {
    background:
        radial-gradient(900px 500px at 50% -20%, #e9f1ff 0%, transparent 60%),
        var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.share-page {
    width: 100%;
    max-width: 640px;
}

.share-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 15px;
}

.share-brand .brand-logo {
    width: 32px;
    height: 32px;
}

.share-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0;
    box-shadow: 0 4px 16px rgba(16, 24, 40, .10);
    overflow: hidden;
}

.share-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border-2);
}

.share-head .fi-icon {
    width: 52px;
    height: 52px;
}

.share-meta {
    flex: 1;
    min-width: 0;
}

.share-meta h1 {
    margin: 0 0 3px;
    font-size: 16px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-meta p {
    margin: 0;
    font-size: 12.5px;
    color: var(--muted);
}

.share-dl .btn {
    height: 38px;
}

.share-list {
    max-height: 420px;
    overflow-y: auto;
}

.share-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 22px;
    border-bottom: 1px solid var(--border-2);
    font-size: 13px;
}

.share-row:hover {
    background: #fafcff;
}

.share-row .fi-icon {
    width: 34px;
    height: 34px;
}

.share-row-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-row-size {
    color: var(--muted);
    font-size: 12px;
    flex: 0 0 auto;
}

.share-row-ico {
    color: var(--muted-2);
    display: inline-flex;
}

.share-foot {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 22px;
    font-size: 12px;
    color: var(--muted);
    background: #fafbfc;
}

.share-copy {
    text-align: center;
    margin-top: 16px;
    font-size: 11.5px;
    color: var(--muted-2);
}

.share-notice {
    padding: 40px 24px;
    text-align: center;
}

.share-notice h2 {
    margin: 0 0 6px;
    font-size: 17px;
}

.share-notice p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 13px;
}

.share-notice .pv-unknown-ico {
    margin: 0 auto 14px;
    width: 72px;
    height: 72px;
    border-radius: 0;
    background: #eef3fb;
    color: #9db4d6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-code-form {
    display: flex;
    gap: 8px;
    max-width: 320px;
    margin: 0 auto;
}

.share-code-input {
    flex: 1;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    font-size: 14px;
    text-align: center;
    letter-spacing: 1px;
}

.share-code-input:focus {
    border-color: var(--primary);
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .45);
}

/* ---------------- 预览 ---------------- */

.preview-page {
    max-width: 980px;
    margin: 0 auto;
}

.pv-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.pv-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-2);
    flex-wrap: wrap;
}

.pv-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.pv-name {
    margin: 0 0 2px;
    font-size: 15px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 520px;
}

.pv-sub {
    font-size: 12px;
    color: var(--muted);
}

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

.pv-body {
    padding: 20px;
    background: #fbfcfe;
    min-height: 200px;
}

.pv-image-wrap {
    text-align: center;
}

.pv-img {
    max-height: 70vh;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(16, 24, 40, .08);
}

.pv-media {
    text-align: center;
}

.pv-media video {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 0;
    background: #000;
}

.pv-audio {
    text-align: center;
    padding: 30px 0;
}

.pv-audio-ico {
    color: #d97706;
    margin-bottom: 16px;
}

.pv-audio audio {
    width: 100%;
    max-width: 520px;
}

.pv-frame {
    width: 100%;
    height: 74vh;
    border: 1px solid var(--border);
    border-radius: 0;
    background: #fff;
}

.pv-text-head {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
}

.pv-text {
    margin: 0;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0;
    max-height: 70vh;
    overflow: auto;
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-2);
}

.pv-unknown {
    text-align: center;
    padding: 44px 20px;
    color: var(--muted);
}

.pv-unknown-ico {
    color: #c3d0e2;
    margin-bottom: 12px;
}

.pv-unknown h3 {
    margin: 0 0 6px;
    font-size: 15px;
    color: var(--text-2);
}

.pv-unknown p {
    margin: 0 0 18px;
    font-size: 13px;
}

/* ---------------- 个人中心 ---------------- */

.profile-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1.1fr) minmax(260px, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.profile-grid .profile-card {
    grid-row: span 2;
}

.profile-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 0;
    object-fit: cover;
    flex: 0 0 auto;
}

.avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #fff;
    font-size: 26px;
    font-weight: 600;
}

.profile-head h2 {
    margin: 0 0 2px;
    font-size: 17px;
    font-weight: 600;
}

.profile-head p {
    margin: 0;
    font-size: 12.5px;
}

.avatar-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-2);
}

.usage-block {
    margin-top: 4px;
}

.usage-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 10px;
    font-size: 12.5px;
    color: var(--muted);
}

.usage-stats b {
    color: var(--text-2);
    font-weight: 600;
}

/* ---------------- 管理后台 ---------------- */

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

.stat-card {
    display: flex;
    gap: 13px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
}

.stat-ico {
    width: 42px;
    height: 42px;
    border-radius: 0;
    background: var(--primary-50);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.stat-body {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
}

.stat-value {
    font-size: 22px;
    font-weight: 650;
    line-height: 1.3;
    color: var(--text);
}

.stat-foot {
    font-size: 11.5px;
    color: var(--muted-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.mini-list {
    display: flex;
    flex-direction: column;
}

.mini-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border-2);
    font-size: 13px;
}

.mini-row:last-child {
    border-bottom: 0;
}

.mini-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.mini-main b {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-main em {
    font-style: normal;
    font-size: 11.5px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 13px;
}

.rank-name {
    width: 90px;
    flex: 0 0 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-2);
}

.rank-name:hover {
    color: var(--primary);
}

.rank-bar {
    flex: 1;
}

.rank-num {
    width: 74px;
    text-align: right;
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
}

.log-list {
    display: flex;
    flex-direction: column;
}

.log-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-2);
    font-size: 12.5px;
}

.log-row:last-child {
    border-bottom: 0;
}

.log-action {
    flex: 0 0 86px;
    color: var(--primary);
    font-weight: 500;
}

.log-detail {
    flex: 1;
    min-width: 0;
    color: var(--text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-user {
    flex: 0 0 70px;
    color: var(--muted);
    text-align: right;
}

.log-time {
    flex: 0 0 76px;
    color: var(--muted-2);
    text-align: right;
}

/* ---------------- 分享管理 ---------------- */

.share-table {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.st-head {
    display: grid;
    grid-template-columns: 1.4fr 2fr .8fr .7fr 110px;
    gap: 12px;
    padding: 11px 16px;
    background: #fafbfc;
    border-bottom: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--muted);
}

.st-row {
    display: grid;
    grid-template-columns: 1.4fr 2fr .8fr .7fr 110px;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-2);
}

.st-row:last-child {
    border-bottom: 0;
}

.st-file {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.st-file .fi-icon {
    width: 34px;
    height: 34px;
}

.st-file > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.st-file b {
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.st-file em {
    font-style: normal;
    font-size: 11.5px;
    color: var(--muted);
}

.st-link {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.link-input {
    flex: 1;
    min-width: 0;
    height: 30px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: 0;
    font-size: 12px;
    color: var(--muted);
    background: #fafbfc;
    outline: none;
}

.code-tag {
    flex: 0 0 auto;
    font-size: 11.5px;
    color: var(--primary);
    background: var(--primary-50);
    padding: 2px 7px;
    border-radius: 0;
    white-space: nowrap;
}

.code-tag.muted {
    color: var(--muted);
    background: #f3f4f6;
}

.st-count {
    font-size: 12.5px;
    color: var(--muted);
}

.st-actions {
    display: flex;
    gap: 2px;
    justify-content: flex-end;
}

/* ---------------- 响应式 ---------------- */

.sidebar-mask {
    display: none;
}

@media (max-width: 1080px) {
    .admin-cols {
        grid-template-columns: 1fr;
    }
    .profile-grid {
        grid-template-columns: 1fr;
    }
    .profile-grid .profile-card {
        grid-row: auto;
    }
}

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform .22s ease;
        box-shadow: 0 0 40px rgba(0, 0, 0, .2);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sb-close {
        display: inline-flex;
    }
    .menu-btn {
        display: inline-flex;
    }
    .sidebar-mask {
        position: fixed;
        inset: 0;
        background: rgba(17, 24, 39, .4);
        z-index: 35;
    }
    .sidebar-mask[hidden] {
        display: none;
    }
    .sidebar.open ~ .sidebar-mask,
    body.sb-open .sidebar-mask {
        display: block;
    }
    .page-title {
        max-width: none;
        font-size: 16px;
    }
    .search-box {
        width: 180px;
        max-width: none;
    }
    .content {
        padding: 16px 14px 40px;
    }
    .topbar {
        padding: 0 14px;
        gap: 10px;
    }
    .st-head {
        display: none;
    }
    .st-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .st-actions {
        justify-content: flex-start;
    }
    .file-list.is-list .fi-meta {
        display: none;
    }
    .pv-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .search-box {
        display: none;
    }
    .file-list.is-grid {
        grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    }
    .upload-panel {
        right: 10px;
        left: 10px;
        width: auto;
    }
    .batch-bar {
        left: 10px;
        right: 10px;
        bottom: 10px;
        transform: none;
        flex-wrap: wrap;
        border-radius: 0;
    }
    .auth-card {
        padding: 24px 20px 18px;
    }
    .form .field-row {
        flex-direction: column;
        gap: 0;
    }
}

/* ============================================================
   补充组件：Toast、右键菜单图标、触摸设备适配
   ============================================================ */

.toast-box {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
}

.toast {
    padding: 9px 18px;
    border-radius: 0;
    font-size: 13px;
    color: #fff;
    background: #111827;
    box-shadow: 0 4px 14px rgba(16, 24, 40, .14);
    animation: toastIn .22s ease;
    max-width: 80vw;
}

.toast-success { background: #047857; }
.toast-error   { background: #b91c1c; }
.toast-warn    { background: #b45309; }

.toast.out {
    opacity: 0;
    transform: translateY(-6px);
    transition: all .25s ease;
}

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

.ctx-ico {
    display: none;
}

/* 触摸设备：勾选框与操作按钮常显 */
@media (hover: none) {
    .fi-check,
    .fi-actions {
        opacity: 1;
    }
}

/* 选择器里的三角符号 */
.fn-ico {
    color: var(--muted-2);
    font-size: 11px;
    display: inline-block;
    width: 12px;
}

.folder-node .fn-ico {
    color: var(--muted-2);
}

.folder-node.active .fn-ico {
    color: var(--primary);
}

/* ============================================================
   企业级硬直角主题 · 组件强化
   基准：0 圆角 / 1px 实线 / 无柔光上浮 / 紧凑字距
   ============================================================ */

/* 容器层次：一律用描边，不用投影 */
.card,
.info-box {
    box-shadow: none;
    border: 1px solid var(--border);
}

/* 顶栏实线分隔 */
.topbar {
    border-bottom: 1px solid var(--border);
}

/* 侧栏加深底色，导航块直角 + 左侧色条指示 */
.sidebar {
    background: #0b1220;
    border-right: 1px solid #1b2433;
}

.nav-item {
    border-radius: 0;
}

.nav-item.active {
    box-shadow: inset 3px 0 0 var(--primary);
}

/* 按钮：方形、无投影、字距略拉开 */
.btn {
    border-radius: 0;
    box-shadow: none;
    letter-spacing: .3px;
}

/* 输入框焦点：硬描边取代柔光圈 */
.field input:focus,
.field select:focus,
.field textarea:focus,
.search-box:focus-within {
    box-shadow: inset 0 0 0 2px var(--primary);
    border-color: var(--primary);
    outline: none;
}

/* 标签 / 快捷档位：方形色块 */
.tag,
.chip {
    border-radius: 0;
}

/* 网格文件卡：悬停只加深边框，不位移不投影 */
.file-list.is-grid .file-item:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--primary);
}

/* 弹窗：直角 + 顶部主线 */
.modal {
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
}

/* 提示条直角 */
.alert {
    border-radius: 0;
}

/* 头像方形 */
.avatar,
.avatar-lg {
    border-radius: 0;
}
/* ============================================================
   我的文件 · 工作区版式（企业级）
   ============================================================ */

/* 面包屑 */
.crumb {
    margin-bottom: 16px;
    font-size: 13.5px;
    gap: 4px;
}

.crumb-item {
    padding: 4px 8px;
    color: var(--text-2);
}

.crumb-item:hover {
    background: var(--primary-50);
    color: var(--primary);
}

.crumb-item.current {
    color: var(--text);
    font-weight: 600;
}

/* 列表面板 */
.file-panel {
    background: #fff;
    border: 1px solid var(--border);
    overflow: hidden;
}

.file-panel.is-grid {
    background: transparent;
    border: 0;
    overflow: visible;
}

/* 列头 */
.list-head {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 38px;
    padding: 0 14px;
    background: #f8f9fb;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: .2px;
}

.list-head .lh-name {
    flex: 1;
    padding-left: 77px;
}

.list-head .lh-size { width: 110px;
    text-align: right;
}

.list-head .lh-time { width: 130px; padding-left: 24px;
}

.list-head .lh-act {
    width: 68px;
}

/* 列表行 */
.file-list.is-list .file-item {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 52px;
    padding: 0 14px;
    border-bottom: 1px solid var(--border-2);
    background: #fff;
}

.file-list.is-list .file-item:last-child {
    border-bottom: 0;
}

.file-list.is-list .file-item:hover {
    background: #f6f8fc;
}

.file-list.is-list .file-item.selected {
    background: var(--primary-50);
}

.file-list.is-list .fi-icon {
    width: 34px;
    height: 34px;
}

.file-list.is-list .fi-main {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 0;
}

.file-list.is-list .fi-name {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
}

.file-list.is-list .fi-meta {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0;
    font-size: 12.5px;
    color: var(--muted);
}

.file-list.is-list .m-size { width: 110px;
    text-align: right;
}

.file-list.is-list .m-time { width: 130px; padding-left: 24px;
}

.file-list.is-list .m-path {
    width: 200px;
    margin-left: 16px;
    max-width: 200px;
}

.file-list.is-list .fi-actions {
    width: 68px;
    justify-content: flex-end;
    gap: 4px;
}

/* 空状态更有容器感 */
.file-panel .empty {
    padding: 64px 20px;
}

/* 公告条降调，避免压过内容 */
.site-notice {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 3px solid var(--warn);
    color: var(--text-2);
}

/* 窄屏收敛列宽 */
@media (max-width: 820px) {
    .list-head .lh-size,
    .file-list.is-list .m-size {
        width: 72px;
    }

    .list-head .lh-time,
    .file-list.is-list .m-time {
        width: 104px;
        padding-left: 10px;
    }

    .list-head .lh-name {
        padding-left: 62px;
    }

    .list-head .lh-act,
    .file-list.is-list .fi-actions {
        width: 40px;
    }

    .file-list.is-list .file-item {
        gap: 10px;
        padding: 0 10px;
    }
}
/* ============================================================
   全选 / 回收站列宽 / 用户中心数据卡
   ============================================================ */

.list-head .lh-check {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    width: 15px;
}

.list-head .lh-check input {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
    cursor: pointer;
}

.list-head .lh-name {
    padding-left: 48px;
}

/* 回收站：时间列与操作列更宽 */
.file-panel.is-trash .list-head .lh-time,
.file-panel.is-trash .file-list.is-list .m-time {
    width: 160px;
    padding-left: 24px;
}

.file-panel.is-trash .list-head .lh-act,
.file-panel.is-trash .file-list.is-list .fi-actions {
    width: 112px;
}

.file-panel.is-trash .file-list.is-list .m-size {
    width: 90px;
}

.file-panel.is-trash .list-head .lh-size {
    width: 90px;
}

/* 用户中心数据卡 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-card.accent {
    border-left: 3px solid var(--primary);
}

.stat-card .stat-label {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: .2px;
}

.stat-card .stat-value {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text);
    letter-spacing: -.2px;
}

.stat-card .stat-sub {
    font-size: 12px;
    color: var(--muted);
}

@media (max-width: 820px) {
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .list-head .lh-name {
        padding-left: 44px;
    }

    .list-head .lh-size,
    .file-list.is-list .m-size {
        width: 72px;
    }

    .list-head .lh-time,
    .file-list.is-list .m-time {
        width: 104px;
        padding-left: 10px;
    }

    .file-panel.is-trash .list-head .lh-time,
    .file-panel.is-trash .file-list.is-list .m-time {
        width: 124px;
    }

    .file-panel.is-trash .list-head .lh-act,
    .file-panel.is-trash .file-list.is-list .fi-actions {
        width: 76px;
    }
}
/* ===== 用户中心：工作台两栏 ===== */
.uc-layout {
    display: grid;
    grid-template-columns: 288px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    margin-bottom: 16px;
}

.uc-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.uc-id { padding: 22px 20px; }

.uc-id-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 9px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-2);
}

.uc-id-top .avatar-lg {
    width: 76px;
    height: 76px;
    border: 1px solid var(--border);
}

.uc-id-top h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -.1px;
    line-height: 1.2;
}

.uc-id-mail {
    margin: 0;
    padding: 10px 0 16px;
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
    word-break: break-all;
}

.uc-meta {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 14px 0 16px;
    border-top: 1px solid var(--border-2);
    border-bottom: 1px solid var(--border-2);
}

.uc-meta > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12.5px;
}

.uc-meta span { color: var(--muted); }
.uc-meta b { font-weight: 500; color: var(--text); }

.uc-id .avatar-form {
    display: block;
    margin: 16px 0 0;
    padding: 0;
    border-bottom: 0;
}

.btn-block { width: 100%; justify-content: center; }

.uc-quota {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-2);
}

.uc-quota-foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 9px;
    font-size: 11.5px;
    color: var(--muted);
}

.uc-main .uc-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 0;
}

.uc-forms {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

/* ===== 站点公告：列表 ===== */
.notice-board { padding: 0; overflow: hidden; }

.nb-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--border-2);
}

.nb-head-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nb-head-left .card-title { margin: 0; font-size: 13.5px; }

.nb-badge {
    flex: 0 0 auto;
    padding: 2px 8px;
    font-size: 11.5px;
    color: var(--primary);
    background: var(--primary-50);
    letter-spacing: .2px;
}

.nb-cols,
.nb-item {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) 92px 18px;
    align-items: center;
    gap: 10px;
}

.nb-cols {
    padding: 8px 18px;
    background: #fafbfc;
    border-bottom: 1px solid var(--border-2);
    font-size: 11.5px;
    color: var(--muted);
    letter-spacing: .3px;
}

.nb-cols span:nth-child(3) { text-align: right; }

.nb-item {
    padding: 11px 18px;
    border-bottom: 1px solid var(--border-2);
    text-decoration: none;
}

.nb-item:last-child { border-bottom: 0; }

.nb-item.unread {
    background: #fbfcff;
    box-shadow: inset 3px 0 0 var(--primary);
}

.nb-item:hover { background: #f6f8fc; }

.nb-dot { width: 6px; height: 6px; background: var(--primary); opacity: 0; }
.nb-item.unread .nb-dot { opacity: 1; }

.nb-title {
    font-size: 13.5px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nb-item.unread .nb-title { font-weight: 700; }
.nb-item:hover .nb-title { text-decoration: underline; }

.nb-time { font-size: 12px; color: #8a919e; text-align: right; white-space: nowrap; }
.nb-arrow { display: flex; justify-content: flex-end; color: #c5cbd6; }
.nb-item:hover .nb-arrow { color: var(--primary); }

.nb-empty { padding: 26px 18px; font-size: 13px; color: #8a919e; text-align: center; }

@media (max-width: 1100px) {
    .uc-layout { grid-template-columns: 256px minmax(0, 1fr); }
    .uc-main .uc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .uc-forms { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .uc-layout { grid-template-columns: 1fr; }
    .uc-main .uc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nb-cols, .nb-item { grid-template-columns: 12px minmax(0, 1fr) 84px 16px; }
}
/* ===== 公告详情页 ===== */
.notice-view { background: #fff; border: 1px solid var(--border); padding: 26px 28px; max-width: 860px; }
.notice-view .crumb-item { display: inline-block; margin-bottom: 14px; font-size: 12.5px; color: #6b7280; text-decoration: none; }
.notice-view .crumb-item:hover { color: var(--primary); }
.notice-view-title { margin: 0 0 8px; font-size: 22px; line-height: 1.4; color: var(--text); font-weight: 600; letter-spacing: .2px; }
.notice-view-meta { font-size: 12px; color: #8a919e; padding-bottom: 14px; border-bottom: 1px solid var(--border-2); margin-bottom: 18px; }
.notice-view-body { font-size: 13.5px; line-height: 1.85; color: #262b33; word-break: break-word; }

@media (max-width: 640px) {
    .notice-view { padding: 18px 16px; }
    .notice-view-title { font-size: 18px; }
    .nb-time { font-size: 11.5px; }
}
/* ===== 用户中心：编辑资料入口 ===== */
.uc-id-link { margin-top: 16px; }

/* ===== 用户中心：最近文件 ===== */
.recent-panel { padding: 0; overflow: hidden; }

.nb-head > .card-title { margin: 0; font-size: 13.5px; }

.panel-more {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    color: var(--muted);
    text-decoration: none;
}
.panel-more:hover { color: var(--primary); }

.recent-cols,
.recent-item {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 90px 92px;
    align-items: center;
    gap: 10px;
}

.recent-cols {
    padding: 8px 18px;
    background: #fafbfc;
    border-bottom: 1px solid var(--border-2);
    font-size: 11.5px;
    color: var(--muted);
    letter-spacing: .3px;
}

.recent-cols span:nth-child(3),
.recent-cols span:nth-child(4) { text-align: right; }

.recent-item {
    padding: 10px 18px;
    border-bottom: 1px solid var(--border-2);
    text-decoration: none;
}

.recent-item:last-child { border-bottom: 0; }
.recent-item:hover { background: #f6f8fc; }

.recent-ico { display: flex; align-items: center; justify-content: center; }

.recent-name {
    font-size: 13px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-item:hover .recent-name { color: var(--primary); }

.recent-size { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.recent-time { font-size: 12px; color: #8a919e; text-align: right; white-space: nowrap; }

@media (max-width: 860px) {
    .recent-cols,
    .recent-item { grid-template-columns: 22px minmax(0, 1fr) 76px; }
    .recent-cols span:nth-child(4),
    .recent-item .recent-time { display: none; }
}
/* ===== 仪表盘：两列栅格 / Top5 / 类型构成 / 活动 ===== */
.dash-2col { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.stat-bar { margin-top: 10px; }

.recent-cols.dash-top-cols,
.recent-item.dash-top-item { grid-template-columns: 22px minmax(0, 1fr) 84px 108px; }

.dash-share { display: flex; align-items: center; gap: 7px; }
.dash-share-bar { flex: 1 1 auto; height: 5px; background: #eef1f5; overflow: hidden; }
.dash-share-bar i { display: block; height: 5px; background: var(--primary); }
.dash-share em { font-style: normal; font-size: 11.5px; color: var(--muted); min-width: 34px; text-align: right; }

.kind-list { padding: 4px 18px 12px; }
.kind-row { display: grid; grid-template-columns: 106px minmax(0, 1fr) 86px; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-2); }
.kind-row:last-child { border-bottom: 0; }
.kind-name { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); white-space: nowrap; }
.kind-name em { font-style: normal; font-size: 11px; color: var(--muted); }
.kind-dot { width: 8px; height: 8px; display: inline-block; flex: 0 0 8px; }
.kind-bar { height: 6px; background: #eef1f5; overflow: hidden; }
.kind-bar i { display: block; height: 6px; }
.kind-val { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }

.recent-cols.recent-3,
.recent-item.recent-3 { grid-template-columns: 22px minmax(0, 1fr) 84px; }

.recent-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.recent-dir { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.act-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border-2); border-top: 1px solid var(--border-2); }
.act-cell { background: #fff; padding: 14px 16px; }
.act-cell b { display: block; font-size: 19px; font-weight: 600; line-height: 1.2; letter-spacing: -.3px; }
.act-cell span { font-size: 11.5px; color: var(--muted); }

@media (max-width: 1100px) {
  .dash-2col { grid-template-columns: minmax(0, 1fr); }
}