:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #f3f4f6;
    --bg-dark: #0f172a;
    --bg-light: #1e293b;
    --card: rgba(30, 41, 59, 0.7);
    --text: #f8fafc;
    --text-dark: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #94a3b8;
    --border: rgba(148, 163, 184, 0.15);
    --border-light: #e5e7eb;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-sm: 10px;
    --shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 12px 40px -8px rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===========================
   通用组件
   =========================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px -3px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px -5px rgba(99, 102, 241, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px -3px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px -5px rgba(239, 68, 68, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    box-shadow: 0 4px 15px -3px rgba(34, 197, 94, 0.4);
}

.btn-success:hover {
    transform: translateY(-1px);
}

.btn-ghost {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.btn-ghost:hover {
    background: rgba(99, 102, 241, 0.15);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 10px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 14px;
}

.btn-block {
    width: 100%;
}

/* ===========================
   登录页
   =========================== */
.login-body {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-bg {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
    z-index: -1;
}

.login-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(99,102,241,0.3) 0%, transparent 45%);
}

.login-wrapper {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    z-index: 2;
}

.login-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 44px 40px;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.35);
    text-align: center;
}

.login-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.login-form {
    text-align: left;
}

.login-field {
    margin-bottom: 18px;
}

.login-field label {
    display: block;
    font-size: 13px;
    color: #374151;
    margin-bottom: 6px;
    font-weight: 500;
}

.login-field input {
    width: 100%;
    background: #f3f4f6;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 13px 14px;
    font-size: 14px;
    color: #111827;
    outline: none;
    transition: all 0.2s ease;
}

.login-field input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.login-error {
    background: #fef2f2;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}

.login-submit {
    width: 100%;
    margin-top: 8px;
    padding: 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

.login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 35px -5px rgba(99, 102, 241, 0.5);
}

@media (max-width: 640px) {
    .login-card {
        padding: 30px 24px;
    }
}

/* ===========================
   后台布局
   =========================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #4f46e5 0%, #7c3aed 60%, #a855f7 100%);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 10;
    color: white;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 22px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 16px;
}

.sidebar-logo .logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.sidebar-logo .logo-icon svg {
    width: 22px;
    height: 22px;
}

.logo-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    color: white;
}

.logo-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-footer {
    padding: 16px 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-footer .btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.sidebar-footer .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
}

.admin-main {
    flex: 1;
    margin-left: 240px;
    padding: 30px;
    min-height: 100vh;
    overflow-y: auto;
    background: var(--bg);
}

.admin-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.admin-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.admin-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
}

/* ===========================
   面板/卡片 - 统一圆角
   =========================== */
.panel,
.upload-card,
.stats-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s ease;
}

.panel:hover,
.upload-card:hover {
    box-shadow: var(--shadow-hover);
}

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

.panel h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
}

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

.stats-card {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 0;
}

.stats-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stats-icon.blue {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #3b82f6;
}

.stats-icon.green {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #22c55e;
}

.stats-icon.orange {
    background: linear-gradient(135deg, #ffedd5, #fed7aa);
    color: #f59e0b;
}

.stats-icon.purple {
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
    color: #a855f7;
}

.stats-info {
    flex: 1;
}

.stats-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.1;
}

.stats-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ===========================
   上传区域
   =========================== */
.upload-zone {
    border: 2px dashed rgba(99, 102, 241, 0.35);
    border-radius: var(--radius);
    padding: 50px 24px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: white;
}

.upload-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.06), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary);
    border-style: solid;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.upload-zone:hover::before, .upload-zone.dragover::before {
    opacity: 1;
}

.upload-zone > * {
    position: relative;
    z-index: 1;
}

.upload-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-icon svg {
    width: 30px;
    height: 30px;
}

.upload-zone h2 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

.upload-zone p {
    margin: 0 0 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 多网盘上传模块 */
/* ===========================
   上传队列
   =========================== */
.queue-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: #f9fafb;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    transition: all 0.4s ease;
}

.queue-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.queue-info {
    flex: 1;
    min-width: 0;
}

.queue-name {
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.queue-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.status-waiting {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-light);
}

.status-uploading {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
}

.status-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.status-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.progress-bar {
    width: 100%;
    height: 5px;
    background: #e5e7eb;
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    width: 0%;
    transition: width 0.2s ease;
}

/* ===========================
   记录表格
   =========================== */
.records-wrap {
    overflow-x: auto;
}

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

.records-table th {
    text-align: left;
    padding: 12px 14px;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
    background: #f9fafb;
}

.records-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    color: #374151;
}

.records-table tbody tr:hover {
    background: #fafafa;
}

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

.empty-row td {
    text-align: center;
    color: #9ca3af;
    padding: 40px 14px;
}

.filename-cell {
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copy-btn {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.copy-btn:hover {
    background: rgba(99, 102, 241, 0.2);
}

.copy-btn.copied {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

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

/* ===========================
   表单
   =========================== */
.config-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
    background: #f9fafb;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text-dark);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group small {
    font-size: 12px;
    color: var(--text-secondary);
}

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

/* ===========================
   网盘配置面板
   =========================== */
.drive-note {
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
    border: 1px solid #c7d2fe;
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #3730a3;
    line-height: 1.7;
}

/* ===========================
   操作按钮
   =========================== */
.action-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.action-cell {
    min-width: 180px;
}

/* ===========================
   记录工具栏
   =========================== */
.records-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    margin: -24px -24px 0;
    border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(180deg, #fafbfc, #f3f4f6);
}

.records-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.records-title svg {
    color: var(--primary);
}

.records-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.records-search {
    width: 220px;
    padding: 9px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 13px;
    outline: none;
    background: white;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.records-search:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.records-filter {
    padding: 9px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: white;
    color: var(--text-dark);
    outline: none;
    cursor: pointer;
}

.records-filter:focus {
    border-color: var(--primary);
}

.records-info {
    padding: 12px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===========================
   表格元素样式
   =========================== */
.id-cell {
    color: #9ca3af;
    font-weight: 500;
    width: 50px;
}

.name-cell {
    min-width: 200px;
}

.file-name-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-name {
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    display: inline-block;
}

.type-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 8px;
    background: #eef2ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-pill.status-success {
    background: #dcfce7;
    color: #16a34a;
}

.status-pill.status-error {
    background: #fee2e2;
    color: #dc2626;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.link-cell {
    white-space: nowrap;
}

.link-view {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    margin-right: 8px;
}

.link-view:hover {
    text-decoration: underline;
}

.icon-copy {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #eef2ff;
    color: var(--primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    transition: all 0.2s ease;
}

.icon-copy:hover {
    background: #e0e7ff;
}

.icon-copy.copied {
    background: #dcfce7;
    color: #16a34a;
}

.time-cell {
    color: var(--text-secondary);
    white-space: nowrap;
}

.op-cell {
    white-space: nowrap;
}

/* 操作按钮 - 下载 */
.btn-download {
    background: #dbeafe;
    color: #2563eb;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 6px;
}

.btn-download:hover {
    background: #bfdbfe;
    transform: translateY(-1px);
}

/* 操作按钮 - 删除 */
.text-delete {
    background: #fee2e2;
    border: none;
    color: #dc2626;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.text-delete:hover {
    background: #fecaca;
}

/* ===========================
   分页
   =========================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 16px 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.pagination-btn {
    min-width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    background: white;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0 12px;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    margin-left: 8px;
}

/* ===========================
   批量操作栏
   =========================== */
.batch-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
    border-radius: var(--radius);
    margin-bottom: 16px;
    gap: 16px;
    flex-wrap: wrap;
    border: 1px solid #e0e7ff;
}

.batch-bar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: #3730a3;
}

.batch-bar-actions {
    display: flex;
    gap: 10px;
}

.checkbox-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-dark);
    user-select: none;
}

.checkbox-wrap input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* ===========================
   记录面板 - 统一圆角
   =========================== */
.records-panel {
    overflow: hidden;
    border-radius: var(--radius);
    background: white;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow);
}

.records-panel .pagination {
    padding-bottom: 24px;
}

/* 上传记录表格圆角 - 完整包裹 */
.records-wrap {
    border-radius: var(--radius);
    overflow: hidden;
}

.records-wrap .records-table {
    border-radius: var(--radius);
    overflow: hidden;
}

/* 表头圆角 */
.records-wrap .records-table thead tr:first-child th:first-child {
    border-top-left-radius: var(--radius);
}

.records-wrap .records-table thead tr:first-child th:last-child {
    border-top-right-radius: var(--radius);
}

/* 表尾最后一行圆角 */
.records-wrap .records-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--radius);
}

.records-wrap .records-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--radius);
}

/* ===========================
   网盘配置面板 - 美化
   =========================== */
.drive-config-panel {
    margin-bottom: 20px;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}

.drive-config-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 0.8;
}

.drive-config-panel .panel-header {
    margin-bottom: 20px;
}

.drive-config-panel .panel-header h3 {
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.drive-config-panel .panel-header h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--primary), var(--primary-light));
    border-radius: 2px;
}

/* ===========================
   全局白色模块统一圆角
   =========================== */
.admin-main .panel,
.admin-main .upload-card {
    border-radius: var(--radius);
    overflow: hidden;
}

.stats-card,
.panel,
.upload-card,
.batch-bar,
.pagination,
.records-panel,
.drive-config-panel,
.upload-zone {
    border-radius: var(--radius);
}

/* ===========================
   数据备份面板
   =========================== */
.backup-panel {
    border-radius: var(--radius);
    overflow: hidden;
}

.backup-header {
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 24px;
    border: 1px solid #e0e7ff;
}

.backup-header h3 {
    margin: 0 0 10px;
    font-size: 17px;
    color: #4338ca;
    display: flex;
    align-items: center;
    gap: 8px;
}

.backup-header h3::before {
    content: '⚠️';
}

.backup-header p {
    margin: 0 0 10px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.7;
}

.backup-tips {
    margin: 0;
    padding-left: 20px;
}

.backup-tips li {
    padding: 4px 0;
    color: #374151;
    font-size: 14px;
    line-height: 1.7;
}

.backup-tips b {
    color: #4338ca;
}

.backup-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.backup-card {
    background: linear-gradient(180deg, #ffffff, #f9fafb);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    transition: all 0.3s ease;
}

.backup-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.backup-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px -8px rgba(0,0,0,0.2);
}

.backup-card h4 {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--text-dark);
}

.backup-card p {
    margin: 0 0 20px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px -4px rgba(34, 197, 94, 0.4);
}

@media (max-width: 768px) {
    .backup-cards {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   状态标签和文件标签
   =========================== */
.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-tag.ok {
    background: #dcfce7;
    color: #16a34a;
}

.status-tag.err {
    background: #fee2e2;
    color: #dc2626;
}

.status-tag.pending {
    background: #fef3c7;
    color: #d97706;
}

.file-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 8px;
    background: #eef2ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    margin-right: 6px;
}

.file-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-name {
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
    display: inline-block;
}

.file-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.file-date {
    color: #9ca3af;
}

/* ===========================
   按钮图标
   =========================== */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-weight: 500;
}

.btn-icon:hover {
    opacity: 0.85;
}

/* ===========================
   Toast
   =========================== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: white;
    border: 1px solid var(--border-light);
    color: var(--text-dark);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.2);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    border-color: #fecaca;
    color: #dc2626;
    background: #fef2f2;
}

.toast.success {
    border-color: #bbf7d0;
    color: #16a34a;
    background: #f0fdf4;
}

/* ===========================
   设置页面 - 大号卡片
   =========================== */
.settings-card {
    max-width: 500px;
    margin: 0 auto;
    padding: 44px 40px;
}

.settings-card h3 {
    font-size: 20px;
    margin-bottom: 24px;
    text-align: center;
}

/* ===========================
   响应式
   =========================== */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        width: 100%;
        position: relative;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        padding: 16px;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .admin-main {
        margin-left: 0;
        padding: 20px;
    }

    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0;
        width: 100%;
        order: 3;
        margin-top: 12px;
    }

    .nav-item {
        white-space: nowrap;
    }

    .sidebar-footer {
        border-top: none;
        padding: 0;
        margin-left: auto;
        order: 2;
    }

    .sidebar-footer .btn {
        width: auto;
    }

    .upload-card {
        padding: 20px;
    }

    .upload-zone {
        padding: 40px 16px;
    }

    .records-toolbar {
        flex-direction: column;
        align-items: flex-start;
        margin: -20px -20px 0;
        padding: 14px 16px;
    }

    .records-actions {
        width: 100%;
    }

    .records-search {
        flex: 1;
        width: auto;
        min-width: 140px;
    }

    .records-table th,
    .records-table td {
        padding: 10px 8px;
    }

    .file-name {
        max-width: 120px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .batch-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}
