       * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary: #2563eb;
            --primary-dark: #1d4ed8;
            --primary-soft: #eff6ff;
            --gray-50: #f9fafb;
            --gray-100: #f3f4f6;
            --gray-200: #e5e7eb;
            --gray-300: #d1d5db;
            --gray-400: #9ca3af;
            --gray-500: #6b7280;
            --gray-600: #4b5563;
            --gray-700: #374151;
            --gray-800: #1f2937;
            --gray-900: #111827;
            --danger: #dc2626;
            --danger-dark: #b91c1c;
            --success: #10b981;
            --border-radius: 8px;
            --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 3px 0 rgba(0, 0, 0, 0.05);
            --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
        }

        body {
            font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
            background: var(--gray-100);
            min-height: 100vh;
            color: var(--gray-800);
        }

        .admin-layout {
            display: flex;
            min-height: 100vh;
        }

        /* 侧边栏 - 深色专业风格 */
        .sidebar {
            width: 280px;
            background: var(--gray-900);
            color: var(--gray-300);
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            transition: all 0.2s ease;
            box-shadow: var(--shadow-lg);
            z-index: 10;
        }

        .sidebar-header {
            padding: 24px 20px;
            border-bottom: 1px solid var(--gray-800);
            margin-bottom: 20px;
        }

        .sidebar-header h2 {
            color: white;
            font-size: 1.3rem;
            font-weight: 600;
            letter-spacing: -0.2px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .sidebar-header h2 i {
            color: var(--primary);
            font-size: 1.6rem;
        }

        .sidebar-header p {
            font-size: 0.7rem;
            color: var(--gray-500);
            margin-top: 8px;
            letter-spacing: 0.3px;
        }

        .nav-menu {
            flex: 1;
            padding: 0 16px;
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 16px;
            margin-bottom: 6px;
            border-radius: var(--border-radius);
            cursor: pointer;
            font-weight: 500;
            transition: all 0.2s;
            color: var(--gray-400);
        }

        .nav-item i {
            font-size: 1.2rem;
            width: 24px;
            text-align: center;
        }

        .nav-item:hover {
            background: var(--gray-800);
            color: white;
        }

        .nav-item.active {
            background: var(--primary);
            color: white;
            box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
        }

        .logout-btn-bottom {
            margin: 20px 16px 28px;
            background: var(--gray-800);
            border-radius: var(--border-radius);
            padding: 10px 12px;
            text-align: center;
            cursor: pointer;
            font-weight: 500;
            transition: 0.2s;
            color: var(--gray-300);
            font-size: 0.9rem;
        }

        .logout-btn-bottom i {
            margin-right: 8px;
        }

        .logout-btn-bottom:hover {
            background: var(--danger);
            color: white;
        }

        .main-content {
            flex: 1;
            padding: 28px 32px;
            overflow-y: auto;
            background: var(--gray-100);
        }

        .card {
            background: #ffffff;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-sm);
            padding: 24px 28px;
            margin-bottom: 28px;
            border: 1px solid var(--gray-200);
            transition: box-shadow 0.2s;
        }

        .card:hover {
            box-shadow: var(--shadow-md);
        }

        .flex-between {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 16px;
            margin-bottom: 1.5rem;
        }

        input, button, select, .btn, .toggle-password, .toggle-pwd-btn {
            border-radius: var(--border-radius);
        }

        input, select, textarea {
            padding: 8px 14px;
            border: 1px solid var(--gray-300);
            background: white;
            outline: none;
            font-size: 0.85rem;
            transition: all 0.2s;
            font-weight: 400;
            height: 40px;
            line-height: 1.4;
        }

        input:focus, select:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

        button {
            background: var(--primary);
            color: white;
            border: none;
            padding: 0 18px;
            height: 40px;
            font-weight: 500;
            cursor: pointer;
            font-size: 0.85rem;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            white-space: nowrap;
        }

        button i {
            font-size: 0.9rem;
        }

        button:hover {
            background: var(--primary-dark);
            transform: translateY(-1px);
        }

        button.danger {
            background: var(--danger);
        }

        button.danger:hover {
            background: var(--danger-dark);
        }

        button.outline {
            background: transparent;
            border: 1px solid var(--gray-300);
            color: var(--gray-700);
            box-shadow: none;
        }

        button.outline:hover {
            background: var(--gray-50);
            border-color: var(--gray-400);
            transform: none;
        }

        /* 上传区域 - 完美对齐修复（核心） */
        .file-upload-area {
            background: var(--gray-50);
            border-radius: var(--border-radius);
            padding: 20px;
            border: 1px dashed var(--gray-300);
        }

        .upload-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
        }

        /* 三个字段组的灵活宽度：文件选择占更多空间，分类适中，按钮自适应 */
        .upload-row .field-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .upload-row .field-group:first-child {
            flex: 2;          /* 文件选择区域更宽 */
            min-width: 200px;
        }

        .upload-row .field-group:nth-child(2) {
            flex: 1.2;        /* 分类输入框适当宽度，不会过长 */
            min-width: 150px;
        }

        .upload-row .field-group:last-child {
            flex: 0.8;        /* 按钮区域固定比例，确保按钮完整显示 */
            min-width: 120px;
        }

        .upload-row .field-group label {
            font-size: 0.7rem;
            color: var(--gray-600);
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            margin: 0;
            line-height: 1.2;
        }

        .upload-row input,
        .upload-row select,
        .upload-row button {
            width: 100%;
            height: 40px;
            box-sizing: border-box;
        }

        .upload-row button {
            justify-content: center;
        }

        /* 移动端适配：改为纵向排列，保证对齐 */
        @media (max-width: 768px) {
            .sidebar {
                width: 72px;
            }
            .sidebar-header h2 span, .sidebar-header p, .nav-item span:last-child {
                display: none;
            }
            .sidebar-header h2 i {
                margin-right: 0;
            }
            .nav-item i {
                margin-right: 0;
            }
            .nav-item {
                justify-content: center;
            }
            .main-content {
                padding: 20px 16px;
            }
            .card {
                padding: 18px;
            }
            .upload-row {
                flex-direction: column;
                gap: 16px;
            }
            .upload-row .field-group {
                width: 100%;
                min-width: auto;
            }
            .filter-bar {
                flex-direction: column;
                align-items: stretch;
            }
            .filter-bar .search-wrapper {
                width: 100%;
            }
            .modal-card {
                width: 90%;
                margin: 16px;
            }
        }

        /* 表格及其他样式 */
        .material-table-wrapper {
            overflow-x: auto;
            border-radius: var(--border-radius);
            border: 1px solid var(--gray-200);
        }

        table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.85rem;
        }

        th, td {
            padding: 12px 16px;
            text-align: left;
        }

        th {

            font-weight: 600;
            color: var(--gray-700);
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }


        .badge {
            background: var(--gray-200);
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 0.7rem;
            font-weight: 500;
        }

        .modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(2px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2000;
        }

        .modal-card {
            background: white;
            border-radius: var(--border-radius);
            width: 440px;
            padding: 28px;
            box-shadow: var(--shadow-lg);
            border: 1px solid var(--gray-200);
        }

        .modal-card h3 {
            margin-bottom: 18px;
            font-weight: 600;
        }

        .hidden {
            display: none;
        }

        .toast-message {
            position: fixed;
            bottom: 24px;
            right: 24px;
            background: var(--gray-800);
            color: white;
            padding: 10px 20px;
            border-radius: var(--border-radius);
            font-size: 0.8rem;
            z-index: 3000;
            box-shadow: var(--shadow-lg);
            font-weight: 500;
        }

        .toast-error {
            background: var(--danger);
        }

        .pwd-cell {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .pwd-masked, .pwd-plain {
            font-family: 'SF Mono', monospace;
            font-size: 0.8rem;
            background: var(--gray-100);
            padding: 4px 10px;
            border-radius: 6px;
        }

        .toggle-pwd-btn {
            background: none;
            border: none;
            cursor: pointer;
            color: var(--gray-500);
            font-size: 0.9rem;
            padding: 6px;
            width: 30px;
            height: 30px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            transition: 0.2s;
            box-shadow: none;
        }

        .toggle-pwd-btn:hover {
            background: var(--gray-200);
            color: var(--primary);
            transform: none;
        }

        .filter-bar {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 12px;
            margin-bottom: 24px;
            background: var(--gray-50);
            padding: 12px 16px;
            border-radius: var(--border-radius);
            border: 1px solid var(--gray-200);
        }

        .filter-bar .search-wrapper {
            display: flex;
            gap: 8px;
            align-items: center;
            flex: 2;
            min-width: 240px;
        }

        .filter-bar .search-wrapper input {
            height: 40px;
            width: 100%;
        }

        .filter-bar .category-filter {
            display: flex;
            align-items: center;
            gap: 12px;
            background: white;
            padding: 0 8px 0 16px;
            border-radius: var(--border-radius);
            border: 1px solid var(--gray-200);
            height: 40px;
        }

        .filter-bar .category-filter label {
            font-weight: 500;
            font-size: 0.8rem;
            margin: 0;
            white-space: nowrap;
        }

        .category-filter select {
            border: none;
            background: transparent;
            padding: 6px 8px;
            font-weight: 500;
            outline: none;
            box-shadow: none;
            height: 38px;
        }

        .password-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        .password-wrapper input {
            flex: 1;
            padding-right: 40px;
            height: 40px;
        }

        .toggle-password {
            position: absolute;
            right: 10px;
            cursor: pointer;
            background: none;
            border: none;
            font-size: 1rem;
            padding: 0;
            width: auto;
            color: var(--gray-500);
            box-shadow: none;
            height: auto;
        }

        .toggle-password:hover {
            background: none;
            transform: none;
            color: var(--primary);
        }

        #loginPanel.card {
            max-width: 420px;
            margin: 80px auto;
            text-align: center;
            padding: 32px;
        }

        .btn-download, .btn-del {
            font-size: 0.75rem;
            padding: 0 12px;
            height: 32px;
            margin: 0 4px;
        }

        .empty-state {
            text-align: center;
            padding: 48px 20px;
            color: var(--gray-500);
        }

        .material-table td:first-child {
            width: 60px;
            text-align: center;
        }

        .btn-download {
            background: var(--gray-600);
        }

        .btn-download:hover {
            background: var(--gray-700);
        }