/* ============================================================
   思弈云盘 - 全局样式（白橙圆角液态玻璃设计）
   配色：白底 + 深棕侧边栏 + 橙色点缀
   图标：Font Awesome 6
   字体：Segoe UI / Roboto / system-ui
   ============================================================ */

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

:root {
    --bg: #fdf8f2;
    --sidebar-bg: #38200c;
    --sidebar-hover: #553017;
    --sidebar-active: #553017;
    --sidebar-border: #fb923c;
    --text: #4b3425;
    --text-strong: #38200c;
    --muted: #93755c;
    --muted-2: #c9ab8e;
    --primary: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #fb923c;
    --green: #2d7d46;
    --danger: #b34a5a;
    --warning: #f5b342;
    --border: #f6e9db;
    --border-strong: #e9d3bc;
    --card: #ffffff;
    --soft-bg: #fffaf4;
    --soft-blue: #fff3e8;
    --radius: 16px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --font: 'Segoe UI', Roboto, 'Helvetica Neue', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

html, body {
    width: 100%;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    letter-spacing: 0.01em;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background:
        radial-gradient(circle at 6% 10%, rgba(251, 146, 60, 0.10), transparent 30%),
        radial-gradient(circle at 90% 15%, rgba(249, 115, 22, 0.08), transparent 32%),
        radial-gradient(circle at 45% 90%, rgba(251, 146, 60, 0.06), transparent 34%),
        var(--bg);
    margin: 0;
    padding: 0;
}

body > *:last-child.site-footer { margin-top: auto; }

::selection {
    background: rgba(249, 115, 22, 0.18);
    color: var(--primary-dark);
}

a {
    color: inherit;
    text-decoration: none;
    transition: 0.15s;
}

img, video { max-width: 100%; }

input, textarea, select, button {
    font: inherit;
    color: inherit;
    outline: none;
}

button { cursor: pointer; border: none; background: none; }

code {
    padding: 2px 6px;
    border-radius: 6px;
    background: #fdf0e3;
    color: #9a4413;
    font-size: 0.9em;
}

/* ============================================================
   主布局：侧边栏 + 内容
   ============================================================ */
.app-layout {
    width: 100%;
    max-width: 1400px;
    background: var(--card);
    box-shadow: 0 20px 40px rgba(60, 25, 5, 0.08);
    display: flex;
    min-height: calc(100vh - 80px);
    border-radius: 0;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    flex: 1 0 auto;
}

/* ============================================================
   侧边栏（深蓝）
   ============================================================ */
.app-sidebar {
    width: 220px;
    background: var(--sidebar-bg);
    color: #fff;
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    min-height: 100vh;
    height: 100vh;
    position: sticky;
    top: 0;
    align-self: stretch;
    overflow-y: auto;
}

.app-sidebar::-webkit-scrollbar { width: 6px; }
.app-sidebar::-webkit-scrollbar-thumb { background: #553017; border-radius: 3px; }

.app-sidebar .sidebar-logo {
    padding: 0 1.5rem 2rem;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.app-sidebar .sidebar-logo i { color: var(--primary-light); font-size: 1.5rem; }

.app-sidebar .sidebar-logo img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(70, 30, 8, 0.35);
    flex-shrink: 0;
}

.app-sidebar .nav-item {
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted-2);
    transition: 0.15s;
    border-left: 3px solid transparent;
    text-decoration: none;
    position: relative;
    font-size: 0.95rem;
}

.app-sidebar .nav-item i { width: 20px; text-align: center; font-size: 1rem; }

.app-sidebar .nav-item:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.app-sidebar .nav-item.active {
    background: var(--sidebar-active);
    color: #fff;
    border-left-color: var(--primary-light);
}

.app-sidebar .nav-divider {
    flex: 1;
    min-height: 20px;
}

.app-sidebar .nav-item.logout {
    color: #e07a7a;
    margin-top: 10px;
    border-top: 1px solid #553017;
    padding-top: 1rem;
}

.app-sidebar .nav-item.logout:hover {
    color: #ff6b6b;
    background: #2a1a1a;
}

.app-sidebar .nav-item .badge-count {
    background: var(--primary);
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: auto;
    font-weight: 600;
}

.app-sidebar .nav-item .badge-admin {
    background: #e07a7a;
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: auto;
    font-weight: 600;
}

/* ============================================================
   主内容区
   ============================================================ */
.app-content {
    flex: 1;
    padding: 0;
    overflow-y: auto;
    width: 100%;
    position: relative;
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.app-content > *:not(.content-scroll) { flex-shrink: 0; }

.content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 2rem 2.5rem;
}

/* 顶部固定头 */
.app-content .sticky-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--card);
    padding: 1rem 2rem 0.5rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(70, 30, 8, 0.03);
}

.app-content .sticky-header header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.app-content .sticky-header h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1.75rem;
    color: var(--text-strong);
    margin-bottom: 0;
}

.app-content .sticky-header h1 i { color: var(--primary); font-size: 1.75rem; }

.app-content .sticky-header .subhead {
    color: #6d5844;
    margin: 0.6rem 0 0;
    border-left: 4px solid var(--primary);
    padding: 0.4rem 1.2rem;
    font-weight: 400;
    font-size: 0.95rem;
    background: var(--soft-blue);
    border-radius: 0 12px 12px 0;
    line-height: 1.6;
    width: fit-content;
}

.app-content .sticky-header .user-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.user-name-pill {
    background: #fdf0e3;
    padding: 0.4rem 1.2rem;
    border-radius: 60px;
    font-size: 0.9rem;
    color: #9a4413;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.user-name-pill i { color: var(--primary); }

.admin-badge-pill {
    background: #b34a5a;
    color: #fff;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.vip-badge-pill {
    background: linear-gradient(135deg, #f5b342, #e0a02a);
    color: #fff;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   面包屑
   ============================================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 0.8rem;
    background: var(--soft-bg);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    border: 1px solid var(--border);
}

.breadcrumb .crumb-item {
    cursor: pointer;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 2px 6px;
    border-radius: 6px;
    transition: 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.breadcrumb .crumb-item:hover { background: #fdeedd; }
.breadcrumb .crumb-item.current {
    color: var(--text-strong);
    cursor: default;
    background: transparent;
}
.breadcrumb .crumb-item i { font-size: 0.85rem; }

.breadcrumb .separator { color: var(--muted-2); }

/* ============================================================
   通用面板/卡片
   ============================================================ */
.panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: 0 4px 14px rgba(70, 30, 8, 0.04);
    margin-bottom: 22px;
}

.panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.panel-title h2 {
    margin: 0 0 4px;
    font-size: 1.15rem;
    color: var(--text-strong);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-title h2 i { color: var(--primary); }

.panel-title .muted { color: var(--muted); font-size: 0.85rem; }

/* 统计卡片 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: 0 4px 14px rgba(70, 30, 8, 0.04);
    transition: 0.18s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(70, 30, 8, 0.08);
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    background: var(--soft-blue);
    color: var(--primary);
    font-size: 1.25rem;
}

.stat-card .stat-icon.green { background: #e8f4ec; color: var(--green); }
.stat-card .stat-icon.warning { background: #fcf3df; color: #b8861f; }
.stat-card .stat-icon.danger { background: #fde8ea; color: var(--danger); }

.stat-card .stat-label {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-strong);
    word-break: break-all;
}

/* ============================================================
   工具栏
   ============================================================ */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 1.5rem;
}

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

.badge-pill {
    background: #fdeedd;
    padding: 6px 18px;
    border-radius: 40px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #9a4413;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-pill i { color: var(--primary); }

/* 按钮体系（白蓝圆角） */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 16px;
    border-radius: 30px;
    border: 1px solid var(--border-strong);
    background: #fff;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: 0.18s;
    white-space: nowrap;
    font-size: 0.9rem;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(70, 30, 8, 0.08);
    color: var(--text);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.30);
}

.btn-navy {
    border-color: transparent;
    background: var(--text-strong);
    color: #fff;
}

.btn-navy:hover {
    background: #553017;
    color: #fff;
}

.btn-ghost {
    background: #fdeedd;
    border: none;
    color: #7c3a10;
}

.btn-ghost:hover {
    background: #f3ddc4;
    color: #7c3a10;
}

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

.btn-danger:hover {
    background: #9a3a4a;
    color: #fff;
    box-shadow: 0 6px 16px rgba(179, 74, 90, 0.30);
}

.btn-success {
    border-color: transparent;
    background: var(--green);
    color: #fff;
}

.btn-success:hover {
    background: #1f6a34;
    color: #fff;
}

.btn-extract {
    border-color: transparent;
    background: var(--green);
    color: #fff;
}

.btn-extract:hover { background: #1f6a34; color: #fff; }

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

.btn-warning:hover { background: #d99d2c; color: #fff; }

.btn-sm {
    min-height: 32px;
    padding: 0 14px;
    font-size: 0.85rem;
}

.btn-xs {
    min-height: 28px;
    padding: 0 10px;
    font-size: 0.78rem;
}

.btn-block { width: 100%; }

.btn-back {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: #7c3a10;
}

.btn-back:hover {
    background: #fdeedd;
    border-color: #f0a35c;
    color: #7c3a10;
}

.btn[disabled], .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-refresh {
    background: #fdeedd;
    border: none;
    color: #7c3a10;
}

.btn-refresh i { transition: 0.3s; }
.btn-refresh:hover i { transform: rotate(180deg); }

/* ============================================================
   文件网格（白蓝圆角卡片）
   ============================================================ */
.file-grid,
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 6px;
}

.file-card-new {
    background: #fff;
    border-radius: 20px;
    padding: 14px 12px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border);
    transition: 0.18s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    cursor: pointer;
    user-select: none;
}

.file-card-new:hover {
    transform: translateY(-2px);
    border-color: #ecc9a4;
    box-shadow: 0 12px 24px -8px rgba(120, 55, 15, 0.10);
}

.file-card-new.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

.card-preview {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 160px;
    background: #fef6ee;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.card-preview img, .card-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.card-preview i { font-size: 1.5rem; color: #b45309; opacity: 0.5; }

.card-preview .checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.78rem;
}

.card-preview .checkbox.checked { background: var(--primary); border-color: var(--primary); }
.card-preview .checkbox.show { display: inline-flex; }

.file-card-new .card-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: #4b3425;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 4px 0 2px;
}

.file-card-new .card-meta {
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 0.2px;
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 4px;
}

.file-card-new .card-actions {
    margin-top: 6px;
    width: 100%;
    border-top: 1px solid #fdf0e3;
    padding-top: 6px;
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.file-card-new .card-actions .btn { padding: 2px 8px; min-height: 22px; font-size: 0.74rem; border-radius: 16px; }

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 0;
    color: var(--muted);
}

.empty-state i { font-size: 3rem; opacity: 0.3; margin-bottom: 10px; display: block; }

/* 文件夹图标特殊颜色 */
.folder-card .card-preview { background: #fff7e6; }
.folder-card .card-preview i { color: var(--warning); opacity: 0.95; font-size: 1.6rem; }

/* 文件类型图标颜色 */
.card-preview .icon-image { color: var(--primary); opacity: 0.7; }
.card-preview .icon-video { color: #8b5cf6; opacity: 0.7; }
.card-preview .icon-audio { color: #ec4899; opacity: 0.7; }
.card-preview .icon-doc { color: var(--primary); opacity: 0.7; }
.card-preview .icon-archive { color: var(--warning); opacity: 0.8; }
.card-preview .icon-other { color: #93755c; opacity: 0.6; }

/* ============================================================
   内联文件夹创建
   ============================================================ */
.folder-create-inline {
    padding: 0;
    margin-bottom: 12px;
}

.folder-create-pill {
    display: flex;
    gap: 8px;
    align-items: center;
    background: #fff;
    padding: 6px 8px 6px 14px;
    border-radius: 30px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(70, 30, 8, 0.04);
}

.folder-create-pill > i {
    color: var(--primary);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.folder-create-pill input {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    border: none;
    border-radius: 0;
    font-size: 0.88rem;
    background: transparent;
    color: var(--text);
    box-shadow: none;
    height: 28px;
}

.folder-create-pill input:focus {
    border: none;
    box-shadow: none;
    outline: none;
}

/* ============================================================
   上传进度
   ============================================================ */
.upload-progress-wrap {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.upload-progress-item {
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(70, 30, 8, 0.04);
}

.upload-progress-item .name {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-strong);
}

.upload-progress-item .size {
    display: block;
    margin-bottom: 8px;
    font-size: 0.78rem;
    color: var(--muted);
}

.upload-progress-bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #f3f4f6;
    overflow: hidden;
    position: relative;
}

.upload-progress-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    width: var(--progress, 0%);
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transition: width 0.3s ease;
}

.upload-progress-item .percent {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    text-align: right;
}

.upload-progress-item.success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.upload-progress-item.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* ============================================================
   FAB 上传按钮
   ============================================================ */
.fab-upload {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fab-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    box-shadow: 0 8px 22px rgba(249, 115, 22, 0.40);
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.fab-main:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
    box-shadow: 0 10px 28px rgba(249, 115, 22, 0.50);
}

.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(70, 30, 8, 0.18);
    padding: 6px 0;
    min-width: 200px;
    display: none;
    flex-direction: column;
    border: 1px solid var(--border);
}

.fab-menu.open { display: flex; }

.fab-menu .menu-item {
    padding: 12px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    text-decoration: none;
}

.fab-menu .menu-item i { width: 20px; color: var(--primary); }

.fab-menu .menu-item:hover {
    background: var(--soft-blue);
    color: var(--primary);
}

.fab-menu .menu-item input { display: none; }

/* ============================================================
   模态框
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    place-items: center;
    padding: 20px;
    background: rgba(56, 32, 12, 0.55);
    backdrop-filter: blur(6px);
    animation: fadeIn 0.2s ease;
}

.modal-overlay.show { display: grid; }

.modal-content {
    width: min(440px, 100%);
    padding: 28px;
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: 0 24px 70px rgba(70, 30, 8, 0.25);
    animation: scaleIn 0.22s ease;
}

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

.modal-content h3 {
    margin: 0 0 16px;
    font-size: 1.15rem;
    color: var(--text-strong);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-content h3 i { color: var(--primary); }

.modal-content .modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.modal-content .form-field {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.modal-content .form-field label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-strong);
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    padding: 12px 14px;
    background: #fff;
    color: var(--text);
    font-size: 0.95rem;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }

/* ============================================================
   表单（用于设置页、登录页等）
   ============================================================ */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], input:not([type]), textarea, select {
    width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    padding: 12px 14px;
    background: #fff;
    color: var(--text);
    transition: 0.15s;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15);
}

textarea { resize: vertical; min-height: 100px; }

.form-field {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.form-field label {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-strong);
}

.form-field .hint { color: var(--muted); font-size: 0.82rem; }

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

.form-actions.between { justify-content: space-between; }

/* ============================================================
   消息提示
   ============================================================ */
.flash-wrap { display: grid; gap: 10px; margin-bottom: 18px; }

.flash {
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid;
    box-shadow: 0 4px 12px rgba(70, 30, 8, 0.04);
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.flash i { font-size: 1.1rem; }

.flash.success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.flash.success i { color: #16a34a; }

.flash.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.flash.error i { color: #b91c1c; }

.flash.info { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.flash.info i { color: var(--primary); }

/* ============================================================
   存储条
   ============================================================ */
.storage-bar-wrap {
    padding: 0;
    margin: 0;
}

.storage-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
    margin: 8px 0;
}

.storage-bar::after {
    content: "";
    display: block;
    height: 100%;
    width: var(--storage-percent, 0%);
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transition: width 0.4s ease;
}

.storage-bar.warning::after { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.storage-bar.danger::after { background: linear-gradient(90deg, var(--danger), #f87171); }

.storage-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--muted);
}

.storage-label strong { color: var(--text-strong); }

/* ============================================================
   分享 / 列表项
   ============================================================ */
.list-grid { display: grid; gap: 14px; }

.list-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: 0 4px 12px rgba(70, 30, 8, 0.04);
    transition: 0.18s;
}

.list-item:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(70, 30, 8, 0.08); }

.list-item .list-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.list-item h3 {
    margin: 0 0 4px;
    font-size: 1rem;
    color: var(--text-strong);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.list-item .meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--muted);
    font-size: 0.82rem;
}

.list-item .meta-line span { padding: 2px 8px; border-radius: 10px; background: #f1f5f9; }

.link-row {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}

.link-row input {
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.list-item .list-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* ============================================================
   VIP 卡片
   ============================================================ */
.vip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.vip-card {
    position: relative;
    padding: 24px 20px;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(70, 30, 8, 0.04);
    text-align: center;
    transition: 0.22s;
}

.vip-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(70, 30, 8, 0.10);
}

.vip-card.current { border-color: var(--primary); }
.vip-card.grayed { opacity: 0.45; pointer-events: none; filter: grayscale(0.5); }

.vip-card .vip-name {
    margin: 0 0 6px;
    font-size: 1.15rem;
    color: var(--text-strong);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.vip-card .vip-name i { color: var(--warning); }

.vip-card .vip-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    margin: 8px 0 12px;
}

.vip-card .vip-price .unit { font-size: 0.85rem; color: var(--muted); font-weight: 500; }

.vip-card .vip-storage {
    display: block;
    padding: 8px 12px;
    border-radius: 12px;
    background: var(--soft-blue);
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.vip-card .vip-features {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    display: grid;
    gap: 8px;
    text-align: left;
    font-size: 0.88rem;
    color: var(--muted);
}

.vip-card .vip-features li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vip-card .vip-features li i { color: var(--green); font-size: 0.85rem; }

.vip-card .vip-tag-recommend {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--primary);
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}

.vip-card .vip-tag-current {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--green);
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ============================================================
   登录 / 注册 / 验证页面
   ============================================================ */
.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 40px 20px;
}

.auth-card {
    width: min(420px, 100%);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: 0 24px 60px rgba(70, 30, 8, 0.10);
}

.auth-card h1 {
    margin: 0 0 6px;
    font-size: 1.5rem;
    color: var(--text-strong);
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-card h1 i { color: var(--primary); font-size: 1.7rem; }

.auth-card h1 img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(70, 30, 8, 0.18);
    flex-shrink: 0;
}

.auth-card .auth-sub {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 0.92rem;
}

.auth-card .form-field label { font-size: 0.85rem; color: var(--text-strong); }

.auth-card .btn { width: 100%; margin-top: 4px; }

.auth-card .auth-switch {
    text-align: center;
    margin-top: 18px;
    font-size: 0.9rem;
    color: var(--muted);
}

.auth-card .auth-switch a {
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
}

.auth-card .auth-switch a:hover { text-decoration: underline; }

.auth-card .auth-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================================
   预览 / 分享公开页
   ============================================================ */
.preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
}

.preview-toolbar .file-title {
    font-size: 1rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    color: var(--text-strong);
}

.preview-toolbar .toolbar-actions { display: flex; gap: 8px; flex-shrink: 0; }

.preview-content {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 20px;
    background: #fdf8f2;
    min-height: calc(100vh - 60px);
}

.preview-content img,
.preview-content video {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    border-radius: 16px;
    object-fit: contain;
    box-shadow: 0 16px 40px rgba(70, 30, 8, 0.12);
}

.preview-content audio { width: min(480px, 90%); }

.preview-iframe {
    width: 100%;
    height: calc(100vh - 60px);
    border: none;
}

.share-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 40px 20px;
}

.share-card {
    width: min(520px, 100%);
    padding: 32px;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 24px 60px rgba(70, 30, 8, 0.10);
}

.share-card .share-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 20px;
    background: var(--soft-blue);
    color: var(--primary);
    font-size: 1.6rem;
}

.share-card h1 {
    margin: 0 0 8px;
    text-align: center;
    font-size: 1.25rem;
    word-break: break-all;
    color: var(--text-strong);
}

.share-card .share-meta {
    display: block;
    margin-bottom: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 0.88rem;
}

.share-info {
    padding: 14px;
    border-radius: 14px;
    background: var(--soft-bg);
    border: 1px solid var(--border);
    margin-bottom: 18px;
}

.share-info .share-info-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: 0.88rem;
}

.share-info .share-info-row span:first-child { color: var(--muted); flex-shrink: 0; }
.share-info .share-info-row span:last-child { font-weight: 600; text-align: right; word-break: break-all; }

/* ============================================================
   回收站
   ============================================================ */
.recycle-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(70, 30, 8, 0.04);
    margin-bottom: 10px;
    transition: 0.18s;
}

.recycle-item:hover { box-shadow: 0 8px 20px rgba(70, 30, 8, 0.08); }

.recycle-item .recycle-checkbox { flex-shrink: 0; }

.recycle-item .recycle-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.recycle-item .recycle-info i { font-size: 1.3rem; color: var(--muted); }

.recycle-item .recycle-info .recycle-name {
    font-weight: 600;
    color: var(--text-strong);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.recycle-item .recycle-info .recycle-meta {
    color: var(--muted);
    font-size: 0.8rem;
    white-space: nowrap;
}

.recycle-item .recycle-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ============================================================
   404 / 封禁
   ============================================================ */
.empty-page {
    min-height: 70vh;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 40px 20px;
}

.empty-page .empty-icon {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 18px;
    opacity: 0.5;
}

.empty-page h1 { font-size: 1.5rem; color: var(--text-strong); margin-bottom: 8px; }
.empty-page p { color: var(--muted); margin-bottom: 18px; }

/* ============================================================
   账号信息卡
   ============================================================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.info-grid > div {
    padding: 14px;
    border-radius: 14px;
    background: var(--soft-bg);
    border: 1px solid var(--border);
}

.info-grid > div > span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.82rem;
}

.info-grid > div > strong {
    display: block;
    word-break: break-all;
    color: var(--text-strong);
}

/* ============================================================
   状态徽章
   ============================================================ */
.status-badge, .role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
}

.status-badge.active { background: #ecfdf5; color: #166534; border: 1px solid #bbf7d0; }
.status-badge.banned { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.status-badge.expired { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }

.role-badge.admin { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.role-badge.user { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }
.role-badge.password { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
    .app-content .sticky-header { padding: 0.8rem 1rem 0.4rem; }
    .content-scroll { padding: 0 1rem 2rem; }
    .file-grid,
    .files-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .app-sidebar { width: 70px; padding: 1rem 0; }
    .app-sidebar .sidebar-logo span,
    .app-sidebar .nav-item span:not(.badge-count):not(.badge-admin) { display: none; }
    .app-sidebar .sidebar-logo { padding: 0 0.5rem 1.5rem; justify-content: center; }
    .app-sidebar .nav-item { padding: 0.8rem 0.6rem; justify-content: center; }
    .app-sidebar .nav-item .badge-count,
    .app-sidebar .nav-item .badge-admin {
        position: absolute;
        top: 6px;
        right: 6px;
        margin: 0;
    }
    .fab-upload { bottom: 20px; right: 20px; }
    .fab-main { width: 48px; height: 48px; font-size: 1.2rem; }
}

@media (max-width: 600px) {
    .app-layout { flex-direction: column; }
    .app-sidebar {
        width: 100%;
        height: auto;
        min-height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0.5rem 0.8rem;
        position: relative;
        align-items: center;
    }
    .app-sidebar .sidebar-logo { padding: 0.3rem 0; font-size: 1rem; }
    .app-sidebar .sidebar-logo span { display: inline; }
    .app-sidebar .nav-item { padding: 0.5rem 0.8rem; border-left: none; border-bottom: 2px solid transparent; font-size: 0.85rem; }
    .app-sidebar .nav-item span { display: inline; }
    .app-sidebar .nav-item.active { border-left-color: transparent; border-bottom-color: var(--primary-light); }
    .app-sidebar .nav-divider { display: none; }
    .app-sidebar .nav-item.logout { border-top: none; margin-top: 0; padding-top: 0.5rem; }
    .app-content { max-height: none; min-height: auto; }
    .app-content .sticky-header { padding: 0.6rem 1rem 0.3rem; }
    .app-content .sticky-header h1 { font-size: 1.3rem; }
    .file-grid,
    .files-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .vip-grid { grid-template-columns: 1fr; }
    .panel { padding: 18px; }
    .recycle-item { flex-wrap: wrap; }
    .recycle-item .recycle-actions { width: 100%; justify-content: flex-end; }
}

/* 实用工具类 */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.full-width { width: 100%; }

/* ============================================================
   全局文件头部 / 工具条（液态玻璃）
   ============================================================ */
.file-header {
    background: var(--card);
    padding: 18px 2rem 12px;
    border-bottom: 1px solid var(--border);
}

.file-header .top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}

.file-header .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--text);
    font-size: 0.95rem;
}

.file-header .user-info > span { display: inline-flex; align-items: center; gap: 4px; }

.file-header .vip-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.file-header .vip-tag i { font-size: 0.7rem; }

.file-header .quick-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.file-header h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1.7rem;
    color: var(--text-strong);
    margin: 0;
}

.file-header h1 i { color: var(--primary); font-size: 1.6rem; }

.file-header .subhead {
    margin: 8px 0 0;
    border-left: 4px solid var(--primary);
    background: var(--soft-blue);
    border-radius: 0 12px 12px 0;
    padding: 6px 14px;
    color: #6d5844;
    font-size: 0.9rem;
    width: fit-content;
}

.sign-in-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 30px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: 0.18s;
    white-space: nowrap;
}

.sign-in-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.32);
}

.sign-in-btn.signed {
    background: linear-gradient(135deg, var(--green), #16a34a);
    cursor: default;
}

.sign-in-btn.signed:hover { transform: none; box-shadow: none; }

/* ============================================================
   工具条
   ============================================================ */
.file-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 2rem 8px;
}

.file-toolbar .toolbar-left,
.file-toolbar .toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.count-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--soft-bg);
    border: 1px solid var(--border);
    color: #9a4413;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
}

.count-badge i { color: var(--primary); }

/* ============================================================
   卡片内的复选框 / 右键菜单
   ============================================================ */
.card-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: rgba(56, 32, 12, 0.35);
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    backdrop-filter: blur(2px);
}

.card-checkbox.show { display: inline-flex; }
.card-checkbox.checked { background: var(--primary); border-color: var(--primary); }

.context-menu {
    position: absolute;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(70, 30, 8, 0.22);
    padding: 3px 0;
    min-width: 120px;
    display: none;
    z-index: 9999;
    border: 1px solid var(--border);
    left: 0;
    top: 0;
}

.context-menu.open { display: block; }

.context-menu .menu-item {
    padding: 5px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #4b3425;
    font-size: 0.8rem;
    font-weight: 500;
    transition: 0.1s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    white-space: nowrap;
}

.context-menu .menu-item:hover { background: var(--soft-blue); color: var(--text-strong); }
.context-menu .menu-item i { width: 13px; color: var(--primary); font-size: 0.78rem; }
.context-menu .menu-item.danger i { color: var(--danger); }
.context-menu .menu-item.danger:hover { background: #fde8ea; }

/* ============================================================
   侧边栏小标题
   ============================================================ */
.app-sidebar .nav-divider-title {
    padding: 16px 1.5rem 6px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #a98a6b;
    font-weight: 600;
}

/* ============================================================
   用户管理列表（admin）
   ============================================================ */
.user-admin-list {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(70, 30, 8, 0.04);
}

.user-admin-list .list-row {
    display: grid;
    grid-template-columns: 1.5fr 2fr 1fr 1fr 1.3fr;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}

.user-admin-list .list-row:last-child { border-bottom: none; }

.user-admin-list .list-row.head {
    background: var(--soft-bg);
    font-weight: 700;
    color: var(--text-strong);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.user-admin-list .list-row .row-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* 表格 */
.admin-table {
    width: 100%;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: 0 4px 12px rgba(70, 30, 8, 0.04);
}

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    vertical-align: middle;
}

.admin-table th {
    background: var(--soft-bg);
    color: var(--text-strong);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.admin-table tr:last-child td { border-bottom: none; }

.admin-table tr:hover td { background: #fffdf9; }

@media (max-width: 900px) {
    .user-admin-list .list-row {
        grid-template-columns: 1fr 1fr;
    }
    .user-admin-list .list-row.head { display: none; }
    .admin-table thead { display: none; }
    .admin-table tr { display: block; padding: 8px 12px; border-bottom: 1px solid var(--border); }
    .admin-table td { display: block; padding: 6px 0; border: none; }
}

/* ============================================================
   设置页分区
   ============================================================ */
.settings-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: 0 4px 12px rgba(70, 30, 8, 0.04);
}

.settings-section h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    margin: 0 0 14px;
    color: var(--text-strong);
}

.settings-section h2 i { color: var(--primary); }

.settings-section .form-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.settings-section .form-group {
    flex: 1;
    min-width: 200px;
}

.settings-section .form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-strong);
}

.settings-section .form-group .hint {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.78rem;
}

/* ============================================================
   提示框
   ============================================================ */
.tip-box {
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--soft-blue);
    border: 1px solid #f3ddc6;
    color: #9a4413;
    font-size: 0.88rem;
    margin-bottom: 14px;
}

.tip-box i { color: var(--primary); margin-right: 6px; }

/* ============================================================
   复选框
   ============================================================ */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ============================================================
   通用页面包装
   ============================================================ */
.page-wrap {
    padding: 26px 2rem 2rem;
}

.page-title {
    margin: 0 0 4px;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-strong);
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title i { color: var(--primary); }

.page-desc {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 0.92rem;
}

.content-scroll { padding: 0 2rem 2.5rem; }

/* ============================================================
   全局底部 Footer（©思弈云盘 + ICP 备案）
   ============================================================ */
.site-footer {
    text-align: center;
    padding: 18px 16px 24px;
    color: var(--muted);
    font-size: 0.85rem;
    background: transparent;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    margin-top: auto;
    order: 99;
    position: relative;
    z-index: 1;
}

.site-footer-inner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.site-footer a {
    color: var(--primary);
    text-decoration: none;
    transition: 0.15s;
}

.site-footer a:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

.site-footer-sep {
    color: var(--muted-2);
}

/* ============================================================
   水平文件/文件夹列表（新设计）
   左：图标+文件名 | 中：操作按钮 | 右：大小
   ============================================================ */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.file-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(70, 30, 8, 0.03);
    transition: 0.16s;
    cursor: default;
    user-select: none;
    min-height: 64px;
}

.file-row:hover {
    border-color: #ecc9a4;
    box-shadow: 0 8px 18px rgba(120, 55, 15, 0.08);
    transform: translateY(-1px);
}

.file-row.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.18);
}

.file-row .row-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 auto;
    min-width: 0;
}

.file-row .row-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--soft-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.35rem;
    color: var(--primary);
}

.file-row .row-icon.icon-folder { background: #fff7e6; color: var(--warning); }
.file-row .row-icon.icon-image { background: #ffeedd; color: var(--primary); }
.file-row .row-icon.icon-video { background: #f3e8ff; color: #8b5cf6; }
.file-row .row-icon.icon-audio { background: #fce7f3; color: #ec4899; }
.file-row .row-icon.icon-pdf { background: #ffe8ea; color: #ef4444; }
.file-row .row-icon.icon-word { background: #ffeccd; color: #f97316; }
.file-row .row-icon.icon-excel { background: #e6f7ed; color: #1f6a34; }
.file-row .row-icon.icon-ppt { background: #ffe9d6; color: #d97706; }
.file-row .row-icon.icon-archive { background: #fff3d6; color: #b8861f; }
.file-row .row-icon.icon-code { background: #f8f0e6; color: #8a7360; }
.file-row .row-icon.icon-html { background: #ffe4d6; color: #e2680a; }
.file-row .row-icon.icon-text { background: #faf1e7; color: #8a7360; }
.file-row .row-icon.icon-doc { background: #ffeedd; color: var(--primary); }
.file-row .row-icon.icon-other { background: #f6efe6; color: #93755c; }

.file-row .row-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
    cursor: default;
}

.file-row .row-name .name-text {
    font-weight: 600;
    color: var(--text-strong);
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: 0.15s;
    display: inline-block;
    max-width: 100%;
    word-break: break-all;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    text-decoration: none;
}

.file-row .row-name .name-text:hover { color: var(--primary); }

.file-row .row-name .name-meta {
    font-size: 0.75rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-row .row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.file-row .row-actions .row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--soft-bg);
    color: var(--text);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: 0.15s;
    font-size: 0.9rem;
    text-decoration: none;
    flex-shrink: 0;
}

.file-row .row-actions .row-action:hover {
    background: var(--soft-blue);
    color: var(--primary);
    border-color: var(--primary-light);
    transform: translateY(-1px);
}

.file-row .row-actions .row-action.danger:hover {
    background: #fde8ea;
    color: var(--danger);
    border-color: #f3a5b0;
}

.file-row .row-actions .row-action.active {
    background: var(--warning);
    color: #fff;
    border-color: var(--warning);
}

.file-row .row-actions .row-action .action-label {
    display: none;
    margin-left: 6px;
    font-size: 0.85rem;
}

.file-row .row-actions .row-action .action-tip {
    display: none;
}

.file-row .row-size {
    min-width: 70px;
    text-align: right;
    font-weight: 600;
    color: var(--text-strong);
    font-size: 0.9rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.file-row .row-time {
    min-width: 110px;
    text-align: right;
    color: var(--muted);
    font-size: 0.8rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.file-row .row-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    background: #fff;
    color: #fff;
    transition: 0.15s;
}

.file-row .row-checkbox.checked {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.file-row .row-checkbox i { font-size: 0.72rem; }

@media (max-width: 900px) {
    .file-row .row-time { display: none; }
    .file-row .row-actions .row-action { width: 32px; height: 32px; }
}

@media (max-width: 600px) {
    .file-row { padding: 10px 12px; gap: 8px; min-height: 56px; }
    .file-row .row-icon { width: 38px; height: 38px; font-size: 1.1rem; }
    .file-row .row-actions { gap: 4px; }
    .file-row .row-actions .row-action { width: 30px; height: 30px; font-size: 0.8rem; border-radius: 8px; }
    .file-row .row-size { min-width: 60px; font-size: 0.82rem; }
}

/* ============================================================
   分享公开页面（按图示重做）
   顶部：分享方用户名（左上） | 保存/下载按钮（右上）
   下方：水平文件/文件夹列表
   ============================================================ */
.share-public-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 6% 10%, rgba(251, 146, 60, 0.10), transparent 30%),
        radial-gradient(circle at 90% 15%, rgba(249, 115, 22, 0.08), transparent 32%),
        var(--bg);
    padding: 0 0 40px;
}

.share-public-header {
    max-width: 980px;
    margin: 0 auto;
    padding: 28px 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.share-public-header .sharer {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    padding: 10px 18px;
    border-radius: 30px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 14px rgba(70, 30, 8, 0.05);
    font-size: 0.95rem;
    color: var(--text-strong);
    font-weight: 600;
}

.share-public-header .sharer i {
    color: var(--primary);
    font-size: 1.1rem;
}

.share-public-header .sharer .sharer-name {
    color: var(--primary);
    font-weight: 700;
}

.share-public-header .sharer-meta {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 500;
}

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

.share-public-card {
    max-width: 980px;
    margin: 18px auto 0;
    padding: 0 20px;
}

.share-public-card .file-list { margin-top: 0; }

.share-public-card .share-tip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--soft-blue);
    border: 1px solid #f3ddc6;
    color: #9a4413;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.share-public-card .share-tip i { color: var(--primary); font-size: 1.05rem; }

.share-public-card .share-info-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.share-public-card .share-info-pills .pill {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 5px 14px;
    font-size: 0.82rem;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.share-public-card .share-info-pills .pill i { color: var(--primary); }

.share-public-card .share-public-media {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(70, 30, 8, 0.03);
}

.share-public-card .share-public-media img,
.share-public-card .share-public-media video {
    max-width: 100%;
    max-height: 460px;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}

.share-public-card .share-public-media audio { width: 100%; }

/* 旧版 share-card 兼容 */
.share-card {
    width: min(520px, 100%);
    padding: 32px;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 24px 60px rgba(70, 30, 8, 0.10);
}
