        /* 屏幕样式（保持不变） */
        body {
            font-family: 'Segoe UI', '微軟正黑體', 'Poppins', system-ui, sans-serif;
            background: linear-gradient(135deg, #0A0F24 0%, #181D45 50%, #0C1230 100%);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 20px;
            position: relative;
            overflow-x: hidden;
        }
        body::before, body::after { content: ''; position: absolute; pointer-events: none; }
        body::before {
            width: 100%; height: 100%;
            background-image: linear-gradient(rgba(0,255,255,0.03) 1px, transparent 1px),
                              linear-gradient(90deg, rgba(0,255,255,0.03) 1px, transparent 1px);
            background-size: 40px 40px;
        }
        body::after {
            width: 150%; height: 150%; top: -25%; left: -25%;
            background: radial-gradient(circle at 30% 40%, rgba(99,102,241,0.2), transparent 55%),
                        radial-gradient(circle at 72% 65%, rgba(34,211,238,0.14), transparent 50%);
            animation: pulse 8s ease-in-out infinite;
        }
        .glass-card {
            background: rgba(248, 250, 255, 0.96);
            backdrop-filter: blur(14px);
            border-radius: 40px;
            box-shadow: 0 25px 55px rgba(15,23,42,0.28), 0 0 40px rgba(99,102,241,0.18);
            width: 100%;
            max-width: 1250px;
            padding: 2.2rem 2rem 2.8rem;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            position: relative;
            z-index: 2;
            isolation: isolate;
        }
        .glass-card:hover {
            transform: translateY(-6px);
            box-shadow: 0 32px 60px rgba(15,23,42,0.35), 0 0 55px rgba(139,92,246,0.25);
        }
        h1 {
            font-size: 2.2rem; font-weight: 700;
            background: linear-gradient(120deg, #22d3ee, #818cf8 45%, #ec4899);
            background-clip: text;
            -webkit-background-clip: text;
            color: transparent;
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
        }
        .subtitle {
            text-align: center; font-size: 0.9rem;
            margin-bottom: 2rem; border-bottom: 1px solid rgba(139,92,246,0.25);
            padding-bottom: 0.8rem; font-weight: 600;
            background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            letter-spacing: 0.4px;
        }
        .input-group { margin-bottom: 1.5rem; }
        label { display: block; font-weight: 600; color: #475569; margin-bottom: 0.6rem; font-size: 0.9rem; letter-spacing: 0.8px; }
        .input-wrapper { position: relative; }
        .input-icon {
            position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
            color: #6366f1; font-size: 1.2rem; pointer-events: none; z-index: 1;
        }
        input, select, button {
            width: 100%; padding: 15px 20px 15px 55px; font-size: 1rem;
            border: 1px solid rgba(99,102,241,0.4); border-radius: 60px;
            background: #f8fafc; transition: all 0.2s; font-family: inherit; color: #1e293b;
        }
        input:focus, select:focus {
            outline: none; border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99,102,241,0.2); background: white;
        }
        button {
            background: linear-gradient(90deg, #22d3ee, #6366f1); color: white; cursor: pointer; font-weight: bold;
        }
        button:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(99,102,241,0.4); }
        button:disabled { opacity: 0.7; cursor: not-allowed; }
        .checkbox-group {
            display: flex; align-items: center; gap: 8px; margin: 15px 0; padding: 0; border: none;
        }
        .checkbox-group input { width: auto; margin: 0; padding: 0; transform: scale(1.1); cursor: pointer; }
        .checkbox-group label { margin: 0; font-weight: normal; cursor: pointer; color: #475569; }
        .control-bar {
            display: flex;
            gap: 12px;
            margin: 20px 0;
            flex-wrap: wrap;
            background: rgba(248,250,255,0.9);
            padding: 12px;
            border-radius: 40px;
            border: 1px solid rgba(99,102,241,0.3);
        }
        .control-bar > div {
            display: flex;
            align-items: center;
            gap: 5px;
        }
        .control-bar label {
            font-size: 0.8rem;
            margin: 0;
            color: #475569;
        }
        .control-bar select {
            width: auto;
            padding: 6px 12px;
            font-size: 0.9rem;
            border-radius: 30px;
            background: white;
            border: 1px solid #6366f1;
        }
        .search-bar {
            display: flex;
            gap: 12px;
            margin-bottom: 20px;
            flex-wrap: wrap;
            align-items: center;
        }
        .search-bar .search-input-wrapper {
            flex: 1;
            position: relative;
        }
        .search-bar .search-input-wrapper input {
            padding-left: 48px;
        }
        .search-bar .search-icon {
            position: absolute;
            left: 18px;
            top: 50%;
            transform: translateY(-50%);
            color: #6366f1;
            font-size: 1.1rem;
            pointer-events: none;
        }
        .device-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 12px;
            margin: 20px 0;
            max-height: 400px;
            overflow-y: auto;
            border: 1px solid rgba(99,102,241,0.3);
            padding: 15px;
            border-radius: 24px;
            background: rgba(248,250,255,0.8);
            min-height: 220px; /* 预留空间，减少设备列表异步加载时的布局偏移（CLS） */
        }
        .device-item {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 5px;
            padding: 8px;
            border-bottom: 1px solid #eee;
            background: white;
            border-radius: 16px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        }
        .device-item > div:first-child {
            display: flex;
            align-items: center;
            gap: 12px;
            width: 100%;
            justify-content: space-between;
        }
        .device-item input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: #6366f1; }
        .device-item .custom-text-input {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 8px;
            width: 100%;
        }
        .device-item .custom-text-input span {
            font-size: 0.8rem;
            color: #475569;
        }
        .device-item .custom-text-input input {
            flex: 1;
            padding: 4px 8px;
            border-radius: 20px;
            border: 1px solid #ccc;
            background: white;
        }
        .device-item .download-btn {
            background: #6366f1;
            color: white;
            border: none;
            border-radius: 30px;
            padding: 4px 12px;
            font-size: 0.7rem;
            cursor: pointer;
            transition: 0.2s;
        }
        .device-item .download-btn:hover {
            background: #4f46e5;
        }
        .action-bar {
            display: flex;
            gap: 12px;
            margin: 20px 0;
            flex-wrap: wrap;
        }
        .action-bar button {
            flex: 1;
            padding: 12px;
            font-size: 0.9rem;
        }
        .status {
            margin: 1rem 0;
            padding: 12px;
            border-radius: 60px;
            display: none;
            text-align: center;
        }
        .status.success { background: #10b981; color: white; }
        .status.error { background: #f43f5e; color: white; }
        .hidden { display: none; }
        /* 已登录用户首帧直接显示打印面板，避免闪现登录页（配合 head 内同步脚本） */
        html.authed #passwordGroup { display: none !important; }
        html.authed #printPanel { display: block !important; }
        footer {
            margin-top: 2rem;
            text-align: center;
            font-size: 0.7rem;
            color: #94a3b8;
            letter-spacing: 0.5px;
        }
        .preview-btn { background: #6366f1; }
    