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

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: #05060a;
            color: #d8dde8;
            min-height: 100vh;
            padding: clamp(16px, 2vw, 32px);
            position: relative;
            z-index: 0;
        }

        :root {
            --sidebar-min-width: 280px;
            --sidebar-max-width: 440px;
            --sidebar-width: clamp(var(--sidebar-min-width), 25vw, var(--sidebar-max-width));
        }

        /* 登录页面 */
        #loginPage {
            display: flex;
            flex-direction: column;
            position: relative;
            min-height: 100vh;
            background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 100%);
            z-index: 2000;
            align-items: center;
            justify-content: center;
            padding: clamp(24px, 5vw, 64px);
            overflow-y: auto;
        }

        #mainPage {
            position: relative;
            z-index: 90;
        }


        .login-container {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            border: 2px solid #2a2a3e;
            border-radius: 18px;
            padding: clamp(28px, 6vw, 48px);
            width: min(540px, 100%);
            display: flex;
            flex-direction: column;
            gap: 24px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
            animation: slideUp 0.3s;
        }

        @media (max-width: 640px) {
            .login-container {
                padding: 28px 22px;
                border-radius: 16px;
            }
            .login-header h1 {
                font-size: 2.4em;
            }
            .login-header h2 {
                font-size: 1.5em;
            }
            .login-highlights {
                display: none;
            }
            .login-tabs {
                gap: 10px;
            }
        }

        @media (min-width: 992px) {
            #loginPage {
                padding: 60px 80px;
            }
            .login-container {
                width: min(960px, 100%);
                display: grid;
                grid-template-columns: 1.05fr 1fr;
                grid-template-rows: auto 1fr;
                column-gap: 60px;
                row-gap: 32px;
                align-items: start;
            }
            .login-info-panel {
                grid-column: 1;
                grid-row: 1 / span 2;
                text-align: left;
                gap: 32px;
                justify-content: center;
            }
            .login-header {
                text-align: left;
            }
            .login-tabs {
                justify-content: flex-end;
            }
            .login-form-panel {
                grid-column: 2;
                grid-row: 1 / span 2;
                gap: 28px;
            }
            .login-form {
                max-width: 460px;
                margin: 0 auto;
            }
            .login-tip {
                text-align: left;
                margin-top: 0;
                color: #c8dcff;
            }
            .login-highlights {
                display: grid;
            }
        }

        @media (max-width: 900px) {
            .header {
                flex-direction: column;
                gap: 24px;
            }
            .header-actions {
                width: 100%;
            }
            .header-actions > div:first-child {
                flex-wrap: wrap;
            }
            .action-buttons {
                width: 100%;
            }
            .search-box {
                width: 100%;
            }
        }

        @media (max-width: 640px) {
            #loginPage {
                justify-content: flex-start;
                align-items: stretch;
                padding: 24px 16px 48px;
            }
            .login-container {
                border-radius: 16px;
            }
            .login-info-panel {
                text-align: left;
                align-items: flex-start;
            }
            .login-highlights {
                display: none;
            }
            .login-tabs {
                gap: 10px;
            }
            .login-links {
                align-items: flex-start;
            }
        }

        @media (max-width: 720px) {
            .tasks-grid {
                grid-template-columns: 1fr;
            }
            .global-actions {
                right: 16px;
                top: 16px;
            }
            .container {
                padding-top: 48px;
            }
            .admin-container {
                padding-top: 70px;
            }
        }

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

        .login-header {
            text-align: center;
            margin-bottom: 40px;
        }

        .login-header h1 {
            font-size: 3em;
            margin-bottom: 15px;
        }

        .login-header h2 {
            font-size: 1.8em;
            background: linear-gradient(135deg, #00d4ff, #0099ff);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 10px;
        }

        .login-header p {
            color: #888;
            font-size: 0.95em;
        }

        .login-form {
            display: flex;
            flex-direction: column;
            gap: 20px;
            width: 100%;
        }

        .login-form input {
            width: 100%;
            min-width: 0;
            padding: 14px 18px;
            background: #0f0f1e;
            border: 2px solid #2a2a3e;
            border-radius: 8px;
            color: #e0e0e0;
            font-size: 1.05em;
            transition: all 0.3s;
        }

        .login-form input:focus {
            outline: none;
            border-color: #00d4ff;
            box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
        }

        .login-form input::placeholder {
            color: #666;
        }

        .login-info-panel {
            display: flex;
            flex-direction: column;
            gap: 24px;
            text-align: left;
            align-items: flex-start;
        }

        .login-form-panel {
            display: flex;
            flex-direction: column;
            gap: 24px;
        }

        .login-highlights {
            list-style: none;
            margin: 24px 0 0;
            padding: 0;
            display: grid;
            gap: 12px;
        }

        .login-highlights li {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 0.95em;
            background: rgba(0, 212, 255, 0.08);
            border: 1px solid rgba(0, 212, 255, 0.18);
            border-radius: 12px;
            padding: 12px 16px;
            color: #bed8ff;
        }

        .login-highlights li span {
            font-size: 1.2em;
        }

        .auth-brand-block {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 14px 18px;
            border: 1px solid #1c2435;
            border-radius: 12px;
            background: rgba(5, 9, 19, 0.7);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
            width: 100%;
        }

        .auth-form-heading {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-bottom: 8px;
        }

        .auth-form-heading h2 {
            color: #f5f7ff;
        }

        .auth-form-heading span {
            color: #8891a7;
            font-size: 0.95rem;
        }

        .verification-row {
            display: flex;
            gap: 10px;
            width: 100%;
            align-items: stretch;
        }

        .verification-row input {
            flex: 1;
            min-width: 0;
        }

        .current-user {
            padding: 12px;
            background: rgba(0, 212, 255, 0.08);
            border: 1px solid rgba(0, 212, 255, 0.2);
            border-radius: 8px;
            color: #e0ecff;
            font-weight: 600;
            word-break: break-all;
        }

        .btn-send-code {
            padding: 10px 18px;
            background: linear-gradient(135deg, #00d4ff, #0099ff);
            color: #0f0f1e;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            white-space: nowrap;
        }

        .verification-row .btn-send-code {
            flex: 0 0 180px;
            text-align: center;
        }

        .btn-send-code:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 0 20px rgba(0, 212, 255, 0.35);
        }

        .btn-send-code:disabled {
            cursor: not-allowed;
            background: linear-gradient(135deg, #2a2a3e, #343a4f);
            color: #9aa7bc;
            box-shadow: none;
        }

        .login-error {
            background: rgba(244, 67, 54, 0.2);
            border: 2px solid #ef5350;
            color: #ef5350;
            padding: 12px;
            border-radius: 6px;
            font-size: 0.9em;
            display: none;
        }

        .login-button {
            padding: 12px;
            background: linear-gradient(135deg, #00d4ff, #0099ff);
            color: #0f0f1e;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            font-size: 1em;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
        }

        .login-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
        }

        .login-tabs {
            display: flex;
            gap: 12px;
            margin-bottom: 25px;
            justify-content: space-between;
        }

        .login-tab {
            flex: 1;
            padding: 10px 16px;
            background: #0f0f1e;
            border: 2px solid #2a2a3e;
            border-radius: 8px;
            color: #bbb;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            text-align: center;
        }

        .login-tab.active {
            color: #0f0f1e;
            background: linear-gradient(135deg, #00d4ff, #0099ff);
            border-color: transparent;
            box-shadow: 0 0 25px rgba(0, 212, 255, 0.35);
        }

        .login-tab:not(.active):hover {
            border-color: #00d4ff;
            color: #00d4ff;
        }

        .form-helper {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            font-size: 0.85em;
            color: #888;
        }

        .remember-me {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .remember-me input {
            width: 16px;
            height: 16px;
            accent-color: #0099ff;
        }

        .switch-mode-link {
            background: none;
            border: none;
            color: #00d4ff;
            cursor: pointer;
            font-size: 0.85em;
            padding: 0;
            transition: color 0.3s;
        }

        .login-links {
            display: flex;
            flex-direction: column;
            gap: 8px;
            align-items: flex-end;
        }

        .link-button {
            background: none;
            border: none;
            color: #00d4ff;
            cursor: pointer;
            font-size: 0.85em;
            padding: 0;
            transition: color 0.3s;
        }

        .link-button:hover {
            color: #66e0ff;
        }

        .switch-mode-link:hover {
            color: #66e0ff;
        }

        .auth-message {
            background: rgba(255, 255, 255, 0.05);
            border: 2px solid rgba(0, 212, 255, 0.2);
            color: #ff8a80;
            padding: 12px;
            border-radius: 6px;
            font-size: 0.9em;
            display: none;
        }

        .auth-message.success {
            color: #4caf50;
            border-color: rgba(76, 175, 80, 0.4);
            background: rgba(76, 175, 80, 0.12);
        }

        .hidden {
            display: none !important;
        }

        .login-tip {
            text-align: center;
            margin-top: 12px;
            color: #9fb6d5;
            font-size: 0.9em;
            line-height: 1.6;
        }

        /* 主页面 */

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding-top: 36px;
        }

        #adminPage {
            position: relative;
            z-index: 90;
        }

        .admin-overview-grid .overview-card h3 {
            font-size: 1.05rem;
            color: #e9ecf9;
        }

        .admin-users-table-wrapper {
            border: 1px solid #141c2b;
            border-radius: 8px;
            overflow-x: auto;
            overflow-y: hidden;
            background: #050912;
        }

        .admin-users-table {
            width: 100%;
            border-collapse: collapse;
        }

        .admin-users-table th,
        .admin-users-table td {
            padding: 12px 14px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.04);
            font-size: 0.95em;
            text-align: left;
        }

        .admin-users-table th {
            color: #7b8396;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            font-size: 0.75rem;
            background: rgba(255, 255, 255, 0.01);
        }

        .admin-users-table tr {
            cursor: pointer;
            transition: background 0.2s;
        }

        .admin-users-table tr:hover {
            background: rgba(255, 255, 255, 0.02);
        }

        .admin-users-table tr.selected {
            background: rgba(39, 52, 76, 0.18);
        }

        .admin-badge {
            display: inline-block;
            margin-left: 6px;
            padding: 2px 6px;
            border-radius: 6px;
            background: rgba(0, 212, 255, 0.2);
            color: #00d4ff;
            font-size: 0.8em;
        }

        .admin-task-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
            max-height: 420px;
            overflow-y: auto;
            padding-right: 6px;
        }

        .admin-user-tools {
            margin-top: 16px;
            border-top: 1px solid #1c2232;
            padding-top: 16px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .admin-role-row {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            color: #99a3bd;
            font-size: 0.95em;
        }

        .admin-role-row strong {
            color: #f5f7ff;
        }

        .admin-password-row {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.95em;
            color: #99a3bd;
            flex-wrap: wrap;
        }

        .admin-password-row code {
            background: rgba(5, 9, 19, 0.8);
            padding: 4px 8px;
            border-radius: 6px;
            color: #f5f7ff;
            border: 1px solid #1e2637;
        }

        .admin-copy-btn {
            padding: 6px 12px;
            border-radius: 6px;
            border: 1px solid #1e2637;
            background: #050913;
            color: #dfe4f2;
            cursor: pointer;
            transition: background 0.2s, border-color 0.2s;
        }

        .admin-copy-btn:hover {
            border-color: #2d3a54;
            background: #0c1322;
        }

        .admin-reset-form {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            align-items: center;
        }

        .admin-reset-form input {
            flex: 1;
            min-width: 200px;
            padding: 8px 12px;
            border-radius: 6px;
            border: 1px solid #1e2738;
            background: #050913;
            color: #f4f6fb;
        }

        .admin-reset-form button {
            padding: 8px 14px;
            border-radius: 6px;
            border: 1px solid #1e2738;
            background: linear-gradient(135deg, #00d4ff, #0099ff);
            color: #0f172a;
            font-weight: 600;
            cursor: pointer;
        }

        .admin-delete-btn {
            margin-top: 6px;
            padding: 8px 14px;
            border-radius: 6px;
            border: 1px solid rgba(248, 113, 113, 0.6);
            background: transparent;
            color: #f87171;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s, border-color 0.2s;
            align-self: flex-start;
        }

        .admin-delete-btn:hover {
            background: rgba(248, 113, 113, 0.12);
            border-color: #f87171;
        }

        .admin-task-card {
            border: 1px solid #1c2334;
            border-radius: 12px;
            padding: 14px;
            background: #050913;
        }

        .admin-task-card h4 {
            margin-bottom: 6px;
            color: #fff;
        }

        .admin-task-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            font-size: 0.85em;
            color: #9fb6d5;
        }

        .admin-empty {
            color: #9fb6d5;
            text-align: center;
            padding: 40px 10px;
        }

        @media (max-width: 1024px) {
            .admin-panels {
                grid-template-columns: 1fr;
            }
        }

        .header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 40px;
            padding-bottom: 20px;
            border-bottom: 2px solid #1a1a2e;
            gap: 30px;
        }

        .header-left h1 {
            font-size: 2em;
            background: linear-gradient(135deg, #00d4ff, #0099ff);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 5px;
        }

        .header-left p {
            font-size: 0.9em;
            color: #888;
        }

        .header-stats {
            display: flex;
            gap: 20px;
            align-items: flex-start;
        }

        .stat-box {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            border: 2px solid #2a2a3e;
            border-radius: 10px;
            padding: 12px 20px;
            text-align: center;
            min-width: 100px;
        }

        .stat-box-label {
            font-size: 0.75em;
            color: #888;
            text-transform: uppercase;
            margin-bottom: 5px;
        }

        .stat-box-value {
            font-size: 1.8em;
            font-weight: 700;
            background: linear-gradient(135deg, #00d4ff, #0099ff);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .header-actions {
            display: flex;
            flex-direction: column;
            gap: 10px;
            min-width: 200px;
        }

        .btn-create {
            padding: 12px 30px;
            background: linear-gradient(135deg, #00d4ff, #0099ff);
            color: #0f0f1e;
            border: none;
            border-radius: 10px;
            font-weight: 600;
            font-size: 1em;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
        }

        .btn-create:hover {
            transform: translateY(-3px);
            box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
        }

        .search-box {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            border: 2px solid #2a2a3e;
            border-radius: 8px;
            padding: 10px 15px;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s;
        }

        .search-box:focus-within {
            border-color: #00d4ff;
            box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
        }

        .search-box input {
            background: none;
            border: none;
            color: #e0e0e0;
            font-size: 0.95em;
            outline: none;
            flex: 1;
            min-width: 120px;
        }

        .search-box input::placeholder {
            color: #666;
        }

        .search-icon {
            color: #00d4ff;
            font-size: 1.1em;
        }

        .search-clear {
            background: none;
            border: none;
            color: #888;
            cursor: pointer;
            font-size: 1.2em;
            transition: color 0.3s;
            padding: 0;
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .search-clear:hover {
            color: #00d4ff;
        }

        .action-buttons {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .btn-action {
            padding: 10px 16px;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            font-size: 0.9em;
            cursor: pointer;
            transition: all 0.3s;
            white-space: nowrap;
            flex: 1;
            min-width: 120px;
        }

        .btn-clear-stopped {
            background: linear-gradient(135deg, #ffa500, #ffb74d);
            color: white;
        }

        .btn-clear-stopped:hover {
            transform: translateY(-2px);
            box-shadow: 0 0 20px rgba(255, 165, 0, 0.4);
        }

        .btn-clear-all {
            background: linear-gradient(135deg, #ff6b6b, #ff8787);
            color: white;
        }

        .btn-clear-all:hover {
            transform: translateY(-2px);
            box-shadow: 0 0 20px rgba(255, 107, 107, 0.4);
        }

        /* 模态框 */
        .modal {
            display: none;
            position: fixed;
            z-index: 3000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(5px);
            animation: fadeIn 0.3s;
        }

        .modal.active {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .modal-content {
            background: #0d121e;
            padding: 36px;
            border-radius: 8px;
            width: 90%;
            max-width: 520px;
            box-shadow: 0 25px 55px rgba(0, 0, 0, 0.55);
            border: 1px solid #1b2536;
            animation: slideUp 0.3s;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 2px solid #2a2a3e;
        }

        .modal-header h2 {
            color: #f3f4f6;
        }

        .modal-close {
            background: none;
            border: none;
            font-size: 1.8em;
            color: #888;
            cursor: pointer;
            transition: color 0.3s;
        }

        .modal-close:hover {
            color: #00d4ff;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #00d4ff;
            font-size: 0.9em;
        }

        .form-group input {
            width: 100%;
            max-width: 100%;
            min-width: 0;
            padding: 14px 16px;
            background: #050913;
            border: 1px solid #202839;
            border-radius: 4px;
            color: #e4e7ef;
            font-size: 1.05em;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .form-group input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
        }

        .form-group textarea {
            width: 100%;
            padding: 12px;
            background: #050913;
            border: 1px solid #202839;
            border-radius: 4px;
            color: #e0e6f4;
            font-size: 0.95em;
            font-family: monospace;
            resize: vertical;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .form-group textarea:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
        }

        .form-actions {
            display: flex;
            gap: 12px;
            margin-top: 30px;
        }

        .btn {
            flex: 1;
            padding: 12px;
            border: 1px solid transparent;
            border-radius: 4px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s, color 0.2s, box-shadow 0.2s;
            font-size: 1em;
        }

        .btn-submit {
            background: #1f3ffe;
            border-color: #1b34c8;
            color: #f4f6fb;
        }

        .btn-submit:hover {
            box-shadow: 0 6px 18px rgba(31, 63, 254, 0.35);
        }

        .btn-cancel {
            background: transparent;
            border-color: #2a3347;
            color: #b9c1d5;
        }

        .btn-cancel:hover {
            background: rgba(255, 255, 255, 0.05);
            color: #f2f4f7;
        }

        /* 任务网格 */
        .tasks-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 20px;
            margin-bottom: 40px;
        }

        .task-card {
            background: #0b101b;
            border: 1px solid #151d2c;
            border-radius: 6px;
            padding: 20px;
            transition: border-color 0.2s, transform 0.2s;
            position: relative;
            overflow: hidden;
            box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
        }

        .task-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(90deg, #2563eb, #14b8a6);
            opacity: 1;
            transition: opacity 0.3s;
        }

        .task-card:hover {
            border-color: #1f2b3f;
            transform: translateY(-3px);
        }

        .task-status-badge {
            position: absolute;
            top: 15px;
            right: 15px;
            padding: 4px 10px;
            border-radius: 4px;
            font-size: 0.78em;
            font-weight: 600;
            letter-spacing: 0.02em;
        }

        .status-idle {
            background: #2a2a3e;
            color: #888;
        }

        .status-running {
            background: rgba(0, 212, 255, 0.2);
            color: #00d4ff;
            box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
        }

        .status-paused {
            background: rgba(255, 152, 0, 0.2);
            color: #ffb74d;
        }

        .status-completed {
            background: rgba(76, 175, 80, 0.2);
            color: #81c784;
        }

        .status-error {
            background: rgba(244, 67, 54, 0.2);
            color: #ef5350;
        }

        .task-name {
            font-size: 1.15em;
            font-weight: 700;
            color: #f4f5f7;
            margin-bottom: 15px;
            margin-right: 80px;
            word-break: break-all;
        }

        .task-username {
            font-size: 0.85em;
            color: #8c94ab;
            margin-bottom: 12px;
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background: #070b13;
            border-radius: 4px;
            overflow: hidden;
            margin-bottom: 8px;
            border: 1px solid #131a27;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #2563eb, #0ea5e9);
            transition: width 0.4s ease;
            box-shadow: none;
        }

        .progress-text {
            text-align: right;
            font-size: 0.85em;
            font-weight: 600;
            color: #9cc1ff;
            margin-bottom: 12px;
        }

        .task-stats {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-bottom: 12px;
            padding: 12px 0;
            border-top: 1px solid #141b2b;
            border-bottom: 1px solid #141b2b;
        }

        .stat-item {
            font-size: 0.85em;
        }

        .stat-label {
            color: #7f8599;
            font-size: 0.75em;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .stat-value {
            color: #e0e7ff;
            font-weight: 600;
            margin-top: 3px;
        }

        .task-message {
            background: #070a12;
            padding: 10px 12px;
            border-radius: 4px;
            font-size: 0.85em;
            color: #a8b0c5;
            margin-bottom: 12px;
            min-height: 32px;
            display: flex;
            align-items: center;
            gap: 8px;
            word-break: break-all;
            border-left: 3px solid #1c2435;
        }

        .task-message.success {
            border-left-color: #22c55e;
            color: #86efac;
        }

        .task-message.error {
            border-left-color: #f87171;
            color: #fecaca;
        }

        .loading-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #00d4ff;
            animation: pulse 1.5s infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .task-buttons {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }

        .task-button {
            padding: 8px;
            border: 1px solid #1c2435;
            border-radius: 4px;
            font-size: 0.85em;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s, border-color 0.2s, color 0.2s;
            background: #05060a;
            color: #c7cedf;
        }

        .btn-pause {
            border-color: #fbbf24;
            color: #fbbf24;
        }

        .btn-pause:hover {
            background: rgba(251, 191, 36, 0.12);
        }

        .btn-resume {
            border-color: #34d399;
            color: #34d399;
        }

        .btn-resume:hover {
            background: rgba(52, 211, 153, 0.12);
        }

        .btn-stop {
            border-color: #f87171;
            color: #f87171;
        }

        .btn-stop:hover {
            background: rgba(248, 113, 113, 0.12);
        }

        .btn-delete {
            border-color: #334155;
            color: #94a3b8;
            grid-column: 1 / -1;
        }

        .btn-delete:hover {
            border-color: #64748b;
            color: #e2e8f0;
        }

        .empty-state {
            text-align: center;
            padding: 60px 20px;
        }

        .empty-state h2 {
            font-size: 1.8em;
            margin-bottom: 10px;
            color: #f0f4ff;
        }

        .empty-state p {
            color: #8892a6;
        }

        @media (max-width: 768px) {
            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }

            .header-stats {
                flex-direction: column;
                width: 100%;
                gap: 10px;
            }

            .header-actions {
                width: 100%;
            }

            .tasks-grid {
                grid-template-columns: 1fr;
            }

            .modal-content {
                width: 95%;
            }
        }

        .admin-only-action {
            display: none;
        }

        .console-shell {
            display: grid;
            grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
            gap: 24px;
            min-height: calc(100vh - 40px);
            transition: grid-template-columns 0.25s ease;
            position: relative;
        }

        .console-sidebar {
            background: #080d18;
            border: 1px solid #131a27;
            border-radius: 8px;
            padding: 24px 20px;
            display: flex;
            flex-direction: column;
            gap: 24px;
            transition: opacity 0.25s, transform 0.25s;
            width: var(--sidebar-width);
            transform: translateX(0);
        }

        .sidebar-brand {
            display: flex;
            align-items: center;
            gap: 12px;
            justify-content: space-between;
        }

        .brand-mark {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 44px;
            height: 44px;
            border: 1px solid #1f2a3d;
            border-radius: 4px;
            background: #0b1220;
        }

        .brand-logo img {
            width: 24px;
            height: 24px;
            display: block;
        }

        .brand-meta {
            display: flex;
            flex-direction: column;
            line-height: 1.2;
        }

        .brand-meta strong {
            font-size: 1rem;
            color: #f0f4ff;
        }

        .brand-meta span {
            font-size: 0.75rem;
            color: #6c7282;
        }

        .sidebar-hide, .sidebar-toggle {
            border: 1px solid #1d2538;
            border-radius: 4px;
            background: #050912;
            color: #c7cedf;
            width: 38px;
            height: 34px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: border-color 0.2s, background 0.2s;
        }

        .sidebar-hide:hover, .sidebar-toggle:hover {
            border-color: #2d3a54;
        }

        .sidebar-section {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .sidebar-label {
            font-size: 0.78rem;
            letter-spacing: 0.18em;
            text-transform: uppercase;
            color: #5e6678;
        }

        .sidebar-link {
            display: flex;
            gap: 10px;
            padding: 12px;
            border-radius: 6px;
            border: 1px solid transparent;
            color: #dfe4f2;
            text-decoration: none;
            transition: border-color 0.2s, background 0.2s;
        }

        .sidebar-link:hover {
            border-color: #1c2435;
            background: rgba(255, 255, 255, 0.02);
        }

        .sidebar-link.active {
            border-color: #27344c;
            background: rgba(39, 52, 76, 0.2);
        }

        .sidebar-link small {
            display: block;
            margin-top: 4px;
            color: #6d768b;
        }

        .sidebar-action {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 12px;
            border-radius: 4px;
            background: #050913;
            border: 1px solid #1c2435;
            color: #d8deec;
            cursor: pointer;
            transition: background 0.2s, border-color 0.2s;
        }

        .sidebar-action:hover {
            border-color: #2d3a54;
            background: #0c1322;
        }

        .sidebar-panel-button {
            width: 100%;
            justify-content: flex-start;
            text-align: left;
        }

        .sidebar-panel-button > div {
            display: flex;
            flex-direction: column;
            line-height: 1.2;
            align-items: flex-start;
            width: 100%;
            text-align: left;
        }

        .sidebar-panel-button > div span {
            font-weight: 500;
        }

        .sidebar-panel-button > div small {
            color: #7a8298;
            font-size: 0.75rem;
        }

        .sidebar-panel-button.is-active {
            border-color: #27344c;
            background: rgba(39, 52, 76, 0.2);
        }

        .sidebar-link i,
        .sidebar-action i,
        .tool-button i {
            font-size: 1rem;
            color: #7c849b;
        }

        .console-main {
            background: #080c16;
            border: 1px solid #101827;
            border-radius: 8px;
            padding: 28px;
            box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
        }

        .console-topbar {
            display: flex;
            justify-content: space-between;
            gap: 16px;
            flex-wrap: wrap;
            margin-bottom: 24px;
        }

        .topbar-left {
            display: flex;
            gap: 16px;
            align-items: center;
            flex: 1;
        }

        .topbar-heading h1 {
            font-size: 1.8rem;
            color: #f7f8fb;
            margin-bottom: 4px;
        }

        .topbar-heading span {
            font-size: 0.9rem;
            color: #838da4;
        }

        .account-info {
            display: flex;
            align-items: center;
            gap: 16px;
            background: #050912;
            border: 1px solid #1b2334;
            border-radius: 8px;
            padding: 12px 16px;
        }

        .account-meta {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .account-label {
            font-size: 0.75rem;
            color: #71788c;
            letter-spacing: 0.08em;
        }

        .account-meta strong {
            font-size: 1rem;
            color: #eef1fb;
        }

        .role-badge {
            padding: 4px 10px;
            border-radius: 4px;
            border: 1px solid #27344c;
            color: #9cb6ff;
            font-size: 0.78rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }

        .account-logout {
            border: 1px solid #273349;
            border-radius: 4px;
            background: transparent;
            color: #f5f6fb;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 12px;
            cursor: pointer;
            transition: background 0.2s, border-color 0.2s;
        }

        .account-logout:hover {
            background: rgba(248, 250, 255, 0.05);
            border-color: #3b4b68;
        }

        .panel {
            background: #0b111d;
            border: 1px solid #141c2b;
            border-radius: 8px;
            padding: 24px;
            margin-bottom: 24px;
        }

        .panel.is-hidden {
            display: none;
        }

        .about-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 20px;
        }

        .about-card {
            background: #080c16;
            border: 1px solid #151d2c;
            border-radius: 8px;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

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

        .panel-tools {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: flex-end;
        }

        .tool-button {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 14px;
            border-radius: 4px;
            border: 1px solid #1d2538;
            background: #050913;
            color: #dfe4f2;
            cursor: pointer;
            transition: background 0.2s, border-color 0.2s;
        }

        .tool-button:hover {
            border-color: #2d3a54;
            background: #0c1322;
        }

        .tool-button.danger {
            border-color: #40202b;
            color: #f87171;
        }

        .panel-status span {
            font-size: 0.85rem;
            color: #7f8a9f;
        }

        .overview-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 18px;
        }

        .overview-card {
            background: #050912;
            border: 1px solid #131a27;
            border-radius: 8px;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .card-header h2 {
            font-size: 1.2rem;
            color: #f4f6fb;
        }

        .user-details {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            gap: 12px;
        }

        .user-details span {
            font-size: 0.78rem;
            color: #7b8396;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .user-details strong {
            font-size: 1.05rem;
            color: #f2f3f8;
        }

        .card-hint {
            font-size: 0.85rem;
            color: #7c8499;
        }

        .overview-card .stat-value {
            font-size: 2.4rem;
            font-weight: 600;
            color: #f5f7ff;
        }

        .manual-steps {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding-left: 20px;
            color: #d5d9e6;
        }

        .manual-steps li {
            line-height: 1.6;
        }

        .profile-intro {
            display: flex;
            gap: 16px;
            align-items: center;
        }

        .profile-avatar {
            width: 64px;
            height: 64px;
            border-radius: 50%;
            background: linear-gradient(135deg, #2575fc, #6a11cb);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        .profile-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .profile-name {
            font-size: 1.1rem;
            color: #f7f8fb;
        }

        .profile-role {
            color: #9aa3ba;
            font-size: 0.9rem;
        }

        .profile-meta {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .profile-meta span {
            color: #7b8396;
            letter-spacing: 0.08em;
            font-size: 0.75rem;
            text-transform: uppercase;
        }

        .profile-meta strong {
            color: #f0f2fe;
            font-size: 0.95rem;
        }

        .search-control {
            display: flex;
            gap: 8px;
        }

        .search-control input {
            flex: 1;
            padding: 12px 14px;
            background: #050913;
            border: 1px solid #1e2738;
            border-radius: 4px;
            color: #f4f6fb;
        }

        .search-control button {
            padding: 0 16px;
            border-radius: 4px;
            border: 1px solid #1e2738;
            background: #0c1322;
            color: #c0c7d6;
            cursor: pointer;
        }

        .search-control button:hover {
            border-color: #2d3a54;
        }

        .tasks-toolbar {
            display: flex;
            justify-content: flex-start;
            margin-bottom: 16px;
        }

        .tasks-search {
            width: 100%;
            max-width: 360px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .eyebrow {
            text-transform: uppercase;
            letter-spacing: 0.28em;
            font-size: 0.7rem;
            color: #6b7280;
        }

        .sidebar-overlay {
            display: none;
        }

        body.sidebar-collapsed .console-shell {
            grid-template-columns: 0 minmax(0, 1fr);
        }

        body.sidebar-collapsed .console-sidebar {
            opacity: 0;
            pointer-events: none;
            transform: translateX(calc(-1 * var(--sidebar-width)));
        }

        @media (max-width: 1280px) {
            .console-shell {
                grid-template-columns: 240px minmax(0, 1fr);
            }
        }

        @media (max-width: 1024px) {
            .console-shell {
                grid-template-columns: minmax(0, 1fr);
            }

            .console-sidebar {
                position: fixed;
                top: 24px;
                bottom: 24px;
                left: 24px;
                width: 260px;
                z-index: 1200;
                transform: translateX(-120%);
                opacity: 1;
            }

            body:not(.sidebar-collapsed) .console-sidebar {
                transform: translateX(0);
            }

            .sidebar-overlay {
                display: block;
                position: fixed;
                inset: 0;
                background: rgba(0, 0, 0, 0.6);
                opacity: 0;
                pointer-events: none;
                transition: opacity 0.2s;
                z-index: 1100;
            }

            body:not(.sidebar-collapsed) .sidebar-overlay {
                opacity: 1;
                pointer-events: auto;
            }

            .account-info {
                flex-direction: column;
                align-items: flex-start;
            }

            .panel-header {
                flex-direction: column;
                align-items: flex-start;
            }

        }
        
        @media (min-width: 1025px) {
            body.sidebar-collapsed .console-sidebar {
                transform: translateX(calc(-1 * var(--sidebar-width)));
            }
        }
        
        
        
        
@media (max-width: 480px) {
    /* --- 基础和全局调整 --- */
    body {
        padding: 12px; /* 进一步减小全局内边距 */
    }

    /* --- 登录页面优化 --- */
    #loginPage {
        padding: 12px 10px 30px;
    }

    .login-container {
        padding: 24px 18px; /* 减小登录容器内边距 */
        gap: 20px;
    }

    .login-header {
        margin-bottom: 25px;
    }

    .login-header h1 {
        font-size: 2em; /* 进一步减小大标题 */
        margin-bottom: 10px;
    }

    .login-header h2 {
        font-size: 1.3em;
    }

    .login-tabs {
        flex-direction: column; /* 登录/注册切换按钮垂直堆叠 */
        gap: 8px;
        margin-bottom: 20px;
    }

    .login-form input,
    .login-button {
        padding: 12px 14px; /* 略微减小输入框和按钮高度 */
        font-size: 1em;
    }

    /* 验证码行的优化 */
    .verification-row {
        flex-direction: column; /* 垂直堆叠输入框和发送按钮 */
        gap: 10px;
    }

    .verification-row .btn-send-code {
        flex: auto; /* 让发送按钮占满宽度 */
        width: 100%;
        padding: 12px 18px;
    }

    /* --- 主页面 Header 优化 --- */
    .header {
        margin-bottom: 20px;
        gap: 15px;
        padding-bottom: 15px;
    }
    
    .header-left h1 {
        font-size: 1.6em; /* 减小主页标题 */
    }

    .header-stats {
        flex-direction: row; /* 保持统计数据横向排列（如果只有少数几个） */
        flex-wrap: wrap;
        gap: 10px;
    }

    .stat-box {
        padding: 10px 15px;
        min-width: 80px;
        flex: 1; /* 均分宽度 */
    }

    .stat-box-value {
        font-size: 1.5em; /* 减小统计数值 */
    }

    /* 顶部操作区优化 */
    .search-box {
        padding: 8px 12px;
    }

    .btn-create {
        padding: 10px 20px;
    }

    .action-buttons {
        flex-direction: column; /* 操作按钮垂直堆叠 */
        gap: 8px;
    }

    .btn-action {
        min-width: 100%;
        font-size: 1em;
        padding: 10px 16px;
    }

    /* --- 任务卡片优化 --- */
    .task-card {
        padding: 16px;
    }
    
    .task-name {
        font-size: 1.1em;
        margin-right: 60px; /* 为状态 Badge 留出空间 */
    }
    
    .task-status-badge {
        top: 10px;
        right: 10px;
        padding: 3px 8px;
        font-size: 0.75em;
    }

    .task-stats {
        grid-template-columns: 1fr; /* 任务统计信息垂直堆叠 */
        gap: 8px;
        padding: 10px 0;
    }

    .task-buttons {
        grid-template-columns: 1fr 1fr; /* 保持两列按钮布局 */
        gap: 6px;
    }

    .btn-delete {
        grid-column: 1 / -1; /* 删除按钮依然占满一行 */
    }

    .task-button {
        padding: 8px;
        font-size: 0.8em;
    }

    /* --- 模态框优化 --- */
    .modal-content {
        padding: 24px;
        width: 95%;
    }

    .modal-header h2 {
        font-size: 1.4rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 1em;
    }

    .form-actions {
        flex-direction: column; /* 模态框操作按钮垂直堆叠 */
        gap: 10px;
    }

    .btn {
        padding: 12px;
    }
}

        
        
        
        
/* ==================================== */
/* 移动端响应式布局优化 (max-width: 768px)         */
/* ==================================== */

/* 1. 桌面端默认隐藏移动端菜单按钮 */
.mobile-menu-button {
    display: none;
}

@media (max-width: 768px) {
    /* 1. 强制主控制台切换到单列布局 */
    .console-shell {
        display: block; /* 移除桌面端的 Grid 布局 */
        gap: 0;
    }

    /* 2. 将侧边栏 (Sidebar) 变为固定定位并默认隐藏 (抽屉效果) */
    .console-sidebar {
        position: fixed;
        z-index: 1000; /* 确保侧边栏在最上层 */
        top: 0;
        left: 0;
        height: 100vh;
        width: min(80vw, 300px); /* 限制宽度，适应手机屏幕 */
        transform: translateX(-100%); /* 默认向左侧隐藏 */
        transition: transform 0.3s ease-out; /* 添加过渡动画 */
        border-radius: 0; /* 移除圆角 */
    }

    /* 侧边栏打开时的状态，由 JavaScript 控制 */
    .console-sidebar.is-open {
        transform: translateX(0); /* 侧边栏打开时显示 */
    }
    
    /* 3. 确保主内容区域占据全部宽度 */
    .console-main {
        width: 100%;
        padding: 16px; /* 调整主内容区域内边距 */
    }

    /* 4. 遮罩层样式 (点击外部时关闭菜单) */
    .sidebar-mask {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999; /* 比侧边栏低一点 */
        display: none; /* 默认隐藏 */
    }
    
    .sidebar-mask.is-visible {
        display: block;
        opacity: 1;
    }
    
    /* 5. 移动端菜单按钮样式 */
    .mobile-menu-button {
        display: block; /* 在移动端显示 */
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 1001; /* 比侧边栏高一点 */
        background: #3e5399; /* 按钮背景色 */
        color: white;
        border: none;
        padding: 10px;
        border-radius: 4px;
        cursor: pointer;
        box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    }
}

