        html {
            overflow-x: hidden;
            max-width: 100vw;
        }

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

        body {
            padding-top: 80px;
            min-height: 100vh;
            max-width: 100vw;
            overflow-x: hidden;
            background: linear-gradient(rgba(255,255,255,0.2), rgba(255, 255, 255, 0.2)), #f0f2f5;
        }

        .topbar {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 70px;
            background: #ffffff;
            box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 5%;
            z-index: 1001;
            gap: 20px;
            border-bottom: 1px solid #eee;
        }

        .brand-text {
            font-size: 1.8em;
            color: #2c3e50;
            font-weight: 600;
            letter-spacing: 1.5px;
            font-family: -apple-system, BlinkMacSystemFont, sans-serif;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            text-rendering: optimizeLegibility;
            display: flex;
            align-items: center;
            gap: 18px;
        }

        .brand-text::before,
        .brand-text::after {
            content: '';
            display: inline-block;
            width: 50px;
            height: 2px;
            background: #bdc3c7;
            border-radius: 1px;
            flex-shrink: 0;
        }

        .logo-container {
            display: flex;
            align-items: center;
            gap: 30px;
            position: absolute;
            right: 5%;
        }

        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .right-logo {
            height: 45px;
            width: auto;
            transition: transform 0.3s ease;
            cursor: pointer;
        }

        .right-logo:hover {
            animation: spin 0.5s linear;
        }

        .dropdown-menu.active {
            display: block;
            animation: menuSlide 0.3s ease;
        }

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

        .dropdown-menu a {
            display: block;
            padding: 12px 20px;
            color: #2c3e50;
            text-decoration: none;
            font-size: 1em;
            transition: background 0.2s ease;
        }

        .dropdown-menu a:hover {
            background: rgba(44, 62, 80, 0.05);
        }

        .hamburger {
            display: none;
            cursor: pointer;
            padding: 10px;
        }

        .bar {
            width: 25px;
            height: 3px;
            background-color: #2c3e50;
            margin: 4px 0;
            transition: 0.4s;
        }
        


        .system-manager-container {
            display: flex;
            flex-direction: column;
            max-width: 90%;
            margin: 20px auto;
            padding: 20px;
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(8px);
            border-radius: 20px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            min-height: 70vh;
        }

        .system-section {
            display: flex;
            flex-direction: column;
        }

        /* 文件区吃掉容器剩余高度: 计数栏被推到 system-manager-container 底部 */
        #file-section {
            flex: 1;
            min-height: 0;
        }

        .system-divider {
            height: 1px;
            background: rgba(0, 0, 0, 0.08);
            margin: 16px 0;
        }

        .system-button-row {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 8px;
        }

        .status-manager-title {
            font-size: 0.75em;
            color: #3498db;
            font-weight: 600;
            user-select: none;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .status-toggle-btn {
            display: none;
            background: none;
            border: none;
            color: #3498db;
            font-size: 1.2em;
            font-weight: bold;
            cursor: pointer;
            padding: 0 4px;
            line-height: 1;
        }

        .status-manager-content {
            display: flex;
            flex-wrap: nowrap;
            align-items: center;
            justify-content: space-between;
            gap: 2px;
            margin-top: 8px;
            font-size: 0.85em;
            color: #2c3e50;
            overflow-x: auto;
            white-space: nowrap;
        }

        @media (min-width: 769px) {
            .status-manager-content {
                flex-wrap: wrap;
                justify-content: flex-start;
                gap: 10px;
            }
        }

        .status-manager-content::-webkit-scrollbar {
            height: 4px;
        }

        .status-item {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: rgba(52, 152, 219, 0.08);
            padding: 4px 8px;
            border-radius: 4px;
            flex-shrink: 0;
        }

        .status-item span {
            color: #666;
        }

        .status-item strong {
            color: #2c3e50;
            margin-left: 4px;
        }

        
        .btn-container {
            display: flex;
            flex-direction: column;
            max-width: 1200px;
            margin: 20px auto;
            padding: 20px;
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(8px);
            border-radius: 20px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        }

        .breadcrumb-bar {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 20px;
            border-bottom: 1px solid #eee;
        }

        .breadcrumb {
            display: flex;
            align-items: center;
            padding: 10px 0;
            flex: 1;
            min-width: 0;
            flex-wrap: wrap;
        }

        .btn.btn-copy-path {
            flex-shrink: 0;
            margin-left: auto;
            padding: 0;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: #fff;
            border: 1px solid #ddd;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .btn.btn-copy-path:hover {
            background: #fff;
        }

        .btn.btn-copy-path .copy-path-label,
        .btn.btn-copy-path i {
            display: none;
        }

        .btn.btn-copy-path .copy-path-emoji {
            display: inline;
            font-size: 15px;
            line-height: 1;
        }
        
        .breadcrumb-item {
            display: flex;
            align-items: center;
            cursor: pointer;
            color: #3498db;
            font-size: 0.95em;
        }
                

        
        .breadcrumb-separator {
            margin: 0 8px;
            color: #999;
        }
        
        .file-actions {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
            align-items: center;
        }

        .search-box {
            padding: 8px 12px;
            border: 1px solid #d0d0d0;
            border-radius: 4px;
            font-size: 0.9em;
            outline: none;
            width: 220px;
            transition: border-color 0.2s;
            margin-left: auto;
            font-family: -apple-system, BlinkMacSystemFont, sans-serif;
        }

        .search-box:focus {
            border-color: #3498db;
        }

        .search-box::placeholder {
            color: #999;
        }

        
        .btn {
            padding: 8px 16px;
            background: #3498db;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: background 0.2s;
            font-family: -apple-system, BlinkMacSystemFont, sans-serif;
        }
        
        .btn:hover {
            background: #2980b9;
        }
        
        .btn-danger {
            background: #e74c3c;
        }
        
        .btn-danger:hover {
            background: #c0392b;
        }

        .btn:disabled {
            background: #bdc3c7;
            cursor: not-allowed;
            opacity: 0.6;
        }

        .manager-btn {
            padding: 8px 16px;
            background: #3498db;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: background 0.2s;
            font-family: -apple-system, BlinkMacSystemFont, sans-serif;
            align-self: flex-start;
        }

        .manager-btn:hover {
            background: #2980b9;
        }

        #share-manager-modal .modal-content {
            width: 70vw;
            max-width: 900px;
            display: flex;
            flex-direction: column;
        }

        #share-manager-content {
            display: flex;
            flex-direction: column;
            gap: 12px;
            overflow: auto;
        }

        .share-item {
            background: #f8f9fa;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            padding: 14px;
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 12px;
            align-items: start;
        }

        .share-item.view-mode .share-field input,
        .share-item.view-mode .share-field textarea {
            background: transparent;
            border: none;
            pointer-events: none;
        }

        .share-fields {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }

        .share-field {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .share-field.full-width {
            grid-column: 1 / -1;
        }

        .share-field label {
            font-size: 0.8em;
            color: #666;
            font-weight: 500;
        }

        .share-field input,
        .share-field textarea {
            padding: 6px 8px;
            border: 1px solid #d0d0d0;
            border-radius: 4px;
            font-family: inherit;
            font-size: 0.9em;
            width: 100%;
            box-sizing: border-box;
        }

        .share-field textarea {
            min-height: 60px;
            resize: vertical;
        }

        .share-actions {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .share-actions .btn {
            padding: 6px 12px;
            font-size: 0.85em;
        }

        #btn-share-edit,
        #btn-links-edit {
            margin-left: auto;
        }

        /* ── 快捷方式弹窗 ── */
        #links-modal .modal-content {
            width: 60vw;
            max-width: 720px;
            display: flex;
            flex-direction: column;
        }

        #links-content {
            display: flex;
            flex-direction: column;
            gap: 12px;
            overflow: auto;
        }

        #links-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .link-item {
            background: #f8f9fa;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            padding: 12px 14px;
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 12px;
            align-items: center;
            cursor: default;
        }

        .link-item.view-mode {
            cursor: pointer;
            transition: background 0.15s, border-color 0.15s;
        }

        .link-item.view-mode:hover {
            background: #eef6fd;
            border-color: #3498db;
        }

        .link-info {
            min-width: 0;
        }

        .link-name {
            font-size: 1em;
            font-weight: 600;
            color: #2c3e50;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .link-path {
            font-size: 0.8em;
            color: #888;
            margin-top: 2px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .link-fields {
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 0;
        }

        .link-fields label {
            font-size: 0.8em;
            color: #666;
            font-weight: 500;
        }

        .link-fields input {
            padding: 6px 8px;
            border: 1px solid #d0d0d0;
            border-radius: 4px;
            font-family: inherit;
            font-size: 0.9em;
            width: 100%;
            box-sizing: border-box;
        }

        .link-actions {
            display: flex;
            flex-direction: column;
            gap: 8px;
            align-items: stretch;
        }

        .link-actions .btn {
            padding: 6px 12px;
            font-size: 0.85em;
            white-space: nowrap;
        }

        .link-jump-hint {
            font-size: 0.75em;
            color: #3498db;
            white-space: nowrap;
        }

        /* ── 文件数统计栏 (沉底: 固定在 system-manager-container 底部上方) ── */
        .file-count-bar {
            margin-top: auto;
            text-align: center;
            font-size: 0.75em;
            color: #999;
            padding: 10px 0 4px;
            user-select: none;
            border-top: 1px solid rgba(0, 0, 0, 0.06);
        }

        #btn-preview-edit {
            margin-left: auto;
        }

        .preview-editor {
            width: 100%;
            height: 65vh;
            text-align: left;
            font-family: monospace;
            font-size: 0.95em;
            line-height: 1.5;
            padding: 15px;
            background: #f8f8f8;
            border: 1px solid #d0d0d0;
            border-radius: 5px;
            box-sizing: border-box;
            resize: none;
            overflow: auto;
            white-space: pre;
        }

        .preview-edit-wrap {
            width: 100%;
            display: flex;
            flex-direction: column;
        }

        /* 编辑器行号 + 代码区水平布局 */
        .edit-row {
            display: flex;
            height: 65vh;
        }
        .edit-gutter {
            flex-shrink: 0;
            width: 50px;
            overflow: hidden;
            background: #f0f0f0;
            border: 1px solid #d0d0d0;
            border-right: none;
            border-radius: 5px 0 0 5px;
            padding: 15px 0;
            text-align: right;
            font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
            font-size: 0.95em;
            line-height: 1.5;
            color: #999;
            user-select: none;
        }
        .edit-gutter span {
            display: block;
            padding-right: 10px;
            line-height: 1.5;
        }

        .preview-editor-shell {
            position: relative;
            flex: 1;
            height: 65vh;
        }

        /* 编辑高亮层与透明 textarea 必须保持相同的字体/行高/内边距/边框, 否则文字错位 */
        .preview-editor-shell .preview-edit-highlight,
        .preview-editor-shell .preview-edit-highlight code {
            white-space: pre;
        }

        .preview-editor-shell .preview-edit-highlight {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            margin: 0;
            font-family: monospace;
            font-size: 0.95em;
            line-height: 1.5;
            padding: 15px;
            border: 1px solid #d0d0d0;
            border-radius: 5px;
            box-sizing: border-box;
            background: #f8f8f8;
            overflow: auto;
        }

        .preview-editor-shell .preview-editor {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            width: 100%;
            height: 100%;
            margin: 0;
            background: transparent;
            color: transparent;
            caret-color: #2c3e50;
            -webkit-text-fill-color: transparent;
            z-index: 1;
        }

        /* 统一 textarea 与高亮层的字体度量, 否则两边解析到不同等宽字体时行高不同, 光标越往下越偏 */
        .preview-editor-shell .preview-editor,
        .preview-editor-shell .preview-edit-highlight,
        .preview-editor-shell .preview-edit-highlight code {
            font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
            letter-spacing: normal;
            word-spacing: normal;
            tab-size: 4;
        }

        /* 有行号时, 编辑区左侧圆角为 0 */
        .edit-row .preview-editor-shell .preview-edit-highlight {
            border-radius: 0 5px 5px 0;
            border-left: none;
        }
        .edit-row > .preview-editor {
            border-radius: 0 5px 5px 0;
            border-left: none;
        }

        .preview-edit-actions {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            gap: 10px;
            margin-top: 10px;
        }

        .preview-edit-actions .operation-message {
            margin-right: auto;
            margin-top: 0;
        }

        #btn-share-add,
        #btn-links-add {
            align-self: flex-start;
        }

        #webshell-modal .modal-content {
            width: 80vw;
            max-width: 900px;
            display: flex;
            flex-direction: column;
            padding: 20px;
        }

        #webshell-content {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        #webshell-output {
            background: #1e1e1e;
            color: #d4d4d4;
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
            font-size: 0.9em;
            border-radius: 6px;
            padding: 12px;
            min-height: 200px;
            max-height: 50vh;
            overflow: auto;
            white-space: pre-wrap;
            word-break: break-all;
        }

        .webshell-output-line {
            margin: 2px 0;
            line-height: 1.4;
        }

        .webshell-output-line.command {
            color: #4fc1ff;
        }

        .webshell-output-line.error {
            color: #f48771;
        }

        .webshell-output-line.success {
            color: #89d185;
        }

        .webshell-input-row {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .webshell-prompt {
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
            font-weight: bold;
            color: #3498db;
            user-select: none;
        }

        .webshell-command-input {
            flex: 1;
            padding: 8px 12px;
            border: 1px solid #d0d0d0;
            border-radius: 4px;
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
            font-size: 0.9em;
            outline: none;
        }

        .webshell-command-input:focus {
            border-color: #3498db;
        }

        #services-modal .modal-content {
            width: 60vw;
            max-width: 700px;
            display: flex;
            flex-direction: column;
        }

        #services-content {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .service-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 12px;
            background: #f8f9fa;
            border: 1px solid #e0e0e0;
            border-radius: 6px;
        }

        .services-divider {
            border-top: 1px solid #dcdcdc;
            margin: 14px 0;
        }

        .service-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .service-name {
            font-weight: 600;
            color: #2c3e50;
        }

        .service-desc {
            font-size: 0.85em;
            color: #666;
        }

        .service-status {
            padding: 4px 10px;
            border-radius: 4px;
            font-size: 0.85em;
            font-weight: 600;
        }

        .service-status.active {
            background: rgba(39, 174, 96, 0.15);
            color: #27ae60;
        }

        .service-status.inactive {
            background: rgba(231, 76, 60, 0.15);
            color: #e74c3c;
        }

        .service-status.oneshot {
            background: rgba(52, 152, 219, 0.15);
            color: #3498db;
        }

        .service-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        .service-actions .btn {
            padding: 5px 12px;
            font-size: 0.85em;
        }

        .service-actions .btn:disabled {
            cursor: not-allowed;
            opacity: 0.6;
        }

        .service-toggle-btn.start {
            background: #27ae60;
        }

        .service-toggle-btn.start:hover {
            background: #219150;
        }

        .sort-wrapper {
            position: relative;
            display: inline-block;
        }

        .sort-dropdown {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            background: white;
            border: 1px solid #e0e0e0;
            border-radius: 6px;
            box-shadow: 0 4px 16px rgba(0,0,0,0.12);
            z-index: 1002;
            min-width: 180px;
            margin-top: 4px;
            overflow: hidden;
        }

        .sort-dropdown.show {
            display: block;
        }

        .sort-option {
            padding: 10px 16px;
            cursor: pointer;
            font-size: 0.9em;
            color: #2c3e50;
            transition: background 0.15s;
            white-space: nowrap;
        }

        .sort-option:hover {
            background: #f0f4f8;
        }

        .sort-option.active {
            background: #e8f4fd;
            color: #3498db;
            font-weight: 600;
        }
        
        .files-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            gap: 15px;
            margin-top: 20px;
            margin-bottom: 8px;
        }
        
        .file-item {
            background: white;
            border-radius: 8px;
            padding: 15px;
            text-align: center;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            position: relative;
        }
        
        .file-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }
        
        .file-icon {
            font-size: 3em;
            margin-bottom: 10px;
            color: #3498db;
        }

        .file-item.hidden-file {
            opacity: var(--hidden-opacity, 0.4);
        }
        
        .file-name {
            font-size: 0.9em;
            word-break: break-all;
            margin-bottom: 5px;
        }
        
        .file-size {
            font-size: 0.8em;
            color: #777;
        }
        
        .file-date {
            font-size: 0.75em;
            color: #999;
        }
        
        .file-actions-menu {
            position: absolute;
            top: 5px;
            right: 5px;
            display: none;
        }
        
        .file-item:hover .file-actions-menu {
            display: flex;
            gap: 5px;
        }
        
        .action-btn {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: rgba(255,255,255,0.9);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8em;
            cursor: pointer;
            box-shadow: 0 1px 3px rgba(0,0,0,0.2);
            transition: background 0.2s;
        }
        
        .action-btn:hover {
            background: #3498db;
            color: white;
        }
        
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 2000;
            align-items: center;
            justify-content: center;
        }
        
        .modal-content {
            background: white;
            border-radius: 10px;
            padding: 30px;
            width: 80vw;
            max-width: 80vw;
            min-width: 300px;
            max-height: 90vh;
            overflow: auto;
            box-shadow: 0 5px 30px rgba(0,0,0,0.3);
        }

        #operation-modal .modal-content {
            max-width: 480px;
        }

        #upload-modal .modal-content {
            width: 60vw;
            max-width: 60vw;
        }

        #preview-modal .modal-content {
            width: 95vw;
            max-width: 95vw;
            height: 95vh;
            max-height: 95vh;
            padding: 20px;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            flex-wrap: nowrap;
            gap: 12px;
        }

        .modal-title {
            font-size: 1.5em;
            font-weight: bold;
            color: #2c3e50;
            flex: 1;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        
        .close-modal {
            font-size: 1.5em;
            cursor: pointer;
            color: #999;
            line-height: 1;
            flex-shrink: 0;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 4px;
        }

        .close-modal:hover {
            color: #333;
            background: #f0f0f0;
        }

        .close-modal.disabled {
            color: #ccc;
            cursor: not-allowed;
            pointer-events: none;
        }

        .btn-done {
            background: #27ae60;
        }

        .btn-done:hover {
            background: #219a52;
        }

        /* 同名文件确认弹窗: 风格与 operation-modal 一致, 层级更高以便叠加在其他弹窗之上 */
        #confirm-modal {
            z-index: 3000;
        }

        #confirm-modal .modal-content {
            max-width: 480px;
        }

        #confirm-message {
            color: #2c3e50;
            white-space: pre-wrap;
            word-break: break-all;
            margin: 0;
        }

        /* 上传弹窗内的同名文件处理下拉框(纯文字标签, 无按钮背景) */
        #upload-modal .form-actions {
            flex-wrap: wrap;
        }

        .upload-conflict-label {
            color: #2c3e50;
            font-size: 0.95em;
            align-self: center;
            white-space: nowrap;
        }

        .upload-conflict-select {
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 0.95em;
            color: #2c3e50;
            background: white;
            align-self: center;
            min-width: 0;
        }

        /* 移动端上传弹窗按钮行: 标签 / 下拉框 / 按钮 各占一行 */
        @media (max-width: 768px) {
            .upload-conflict-label {
                flex-basis: 100%;
            }

            .upload-conflict-select {
                flex-basis: 100%;
                width: 100%;
                box-sizing: border-box;
            }
        }

        /* 图片预览放大/缩小圆形按钮 */
        .btn-zoom {
            border-radius: 50%;
            width: 36px;
            height: 36px;
            padding: 0;
            font-size: 20px;
            line-height: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        /* 图片放大后允许滚动查看 */
        .preview-content {
            overflow: auto;
        }

        .preview-content {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: calc(100% - 50px);
            background: rgba(255, 255, 255, 0.8);
            padding: 20px;
            box-sizing: border-box;
        }

        /* 文本预览模式：提示在文件内容上方垂直排列 */
        .preview-content.text-mode {
            flex-direction: column;
            align-items: stretch;
            justify-content: flex-start;
        }

        .preview-image {
            max-width: 100%;
            max-height: 70vh;
            border-radius: 5px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        .preview-text {
            text-align: left;
            white-space: pre-wrap;
            font-family: monospace;
            padding: 15px;
            background: #f8f8f8;
            border-radius: 5px;
            max-height: 70vh;
            overflow: auto;
        }

        .preview-text code[class*="language-"] {
            background: none;
            padding: 0;
            white-space: inherit;
        }

        .preview-text.line-numbers {
            padding-left: 3.8em;
        }

        .preview-content.text-mode .preview-text {
            width: 100%;
            flex: 1;
            max-height: none;
        }

        .preview-unsupported {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;
        }

        .preview-unsupported-actions {
            display: flex;
            gap: 12px;
        }

        .settings-row {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 16px;
        }

        .settings-label {
            min-width: 110px;
            font-size: 0.95em;
            color: #2c3e50;
        }

        .settings-input {
            width: 120px;
            padding: 6px 10px;
            border: 1px solid #d0d0d0;
            border-radius: 5px;
            font-size: 0.95em;
        }

        .settings-input-wide {
            width: 280px;
        }

        .settings-checkbox {
            width: 18px;
            height: 18px;
            accent-color: #3498db;
            cursor: pointer;
        }

        .settings-range {
            flex: 1;
            max-width: 220px;
            accent-color: #3498db;
            cursor: pointer;
        }

        .settings-value {
            min-width: 40px;
            font-size: 0.95em;
            color: #2c3e50;
        }

        .settings-hint {
            font-size: 0.8em;
            color: #95a5a6;
        }

        .settings-actions {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-top: 20px;
        }

        .settings-actions .operation-message {
            margin: 0;
        }

        @media (max-width: 600px) {
            #settings-modal .settings-row {
                display: grid;
                grid-template-columns: minmax(0, 1fr) auto;
                gap: 8px 12px;
            }

            #settings-modal .settings-label {
                min-width: 0;
            }

            #settings-modal .settings-input-wide,
            #settings-modal .settings-hint {
                grid-column: 1 / -1;
                width: 100%;
                min-width: 0;
                overflow-wrap: anywhere;
            }

            #settings-modal .settings-range {
                width: 120px;
            }

            #settings-modal .settings-value {
                grid-column: 2;
                text-align: right;
            }

            #settings-modal .settings-actions {
                flex-wrap: wrap;
            }
        }

        .preview-truncated-notice {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            padding: 12px 15px;
            margin-bottom: 12px;
            background: #fff8e1;
            border: 1px solid #ffe082;
            border-radius: 5px;
            color: #8a6d3b;
            font-size: 0.9em;
            text-align: left;
        }

        /* CSV column coloring — alternating colors per column */
        .language-csv .csv-col-0 { color: #1565c0; }
        .language-csv .csv-col-1 { color: #2e7d32; }
        .language-csv .csv-col-2 { color: #c62828; }
        .language-csv .csv-col-3 { color: #6a1b9a; }
        .language-csv .csv-col-4 { color: #e65100; }
        .language-csv .csv-col-5 { color: #00838f; }
        .language-csv .csv-col-6 { color: #4527a0; }
        .language-csv .csv-col-7 { color: #ad1457; }
        .language-csv .csv-col-8 { color: #283593; }
        .language-csv .csv-col-9 { color: #558b2f; }
        .language-csv .token.punctuation { color: #90a4ae; }

        /* Parquet 表格预览 */
        .parquet-loading { text-align: center; padding: 40px; color: #666; }
        .parquet-loading .file-icon { font-size: 2em; margin-bottom: 10px; }
        .parquet-table-wrap { overflow: auto; max-height: 55vh; border: 1px solid #e0e0e0; border-radius: 4px; }
        .parquet-table { border-collapse: collapse; width: 100%; font-size: 0.85em; }
        .parquet-table th { position: sticky; top: 0; background: #f5f5f5; padding: 8px 12px; text-align: left; border-bottom: 2px solid #ddd; white-space: nowrap; font-weight: 600; z-index: 1; }
        .parquet-table td { padding: 6px 12px; border-bottom: 1px solid #eee; white-space: nowrap; max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
        .parquet-table tbody tr:hover { background: #fafafa; }
        .parquet-row-num { color: #999; min-width: 40px; text-align: right !important; }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        .form-label {
            display: block;
            margin-bottom: 8px;
            font-weight: bold;
            color: #2c3e50;
        }
        
        .form-input {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 1em;
        }
        
        .form-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 20px;
        }

        .preview-video {
            width: 100%;
            height: 100%;
            max-width: 95%;
            max-height: 95%;
            border-radius: 8px;
            background: #000;
            box-shadow: 0 0 20px rgba(0,0,0,0.6);
            display: block;
            }

        .preview-audio {
            width: 90%;
            max-width: 500px;
            outline: none;
            border-radius: 8px;
            background: #f5f5f5;
            padding: 4px;
            }

        .file-item-upload {
            display: flex;
            flex-direction: column;
            padding: 12px;
            background: white;
            border-radius: 6px;
            margin-bottom: 8px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            border: 1px solid #e0e0e0;
        }

        .file-item-first-line {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
            width: 100%;
        }

        .file-name-upload {
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 0.95em;
            font-weight: 500;
            color: #2c3e50;
        }

        .file-size-upload {
            margin: 0 15px;
            color: #7f8c8d;
            font-size: 0.85em;
            white-space: nowrap;
        }

        .file-remove {
            border: 0;
            background: transparent;
            color: #e74c3c;
            cursor: pointer;
            font-weight: bold;
            font-size: 1.1em;
            padding: 2px 6px;
            border-radius: 3px;
            transition: background 0.2s;
            white-space: nowrap;
        }

        .file-remove:hover {
            background: rgba(231, 76, 60, 0.1);
        }

        .progress-bar {
            width: 100%;
            height: 6px;
            background: #ecf0f1;
            border-radius: 3px;
            overflow: hidden;
        }

        .progress {
            height: 100%;
            background: #3498db;
            width: 0%;
            transition: width 0.3s;
            border-radius: 3px;
        }

        
        .drop-zone {
            border: 2px dashed #3498db;
            border-radius: 8px;
            padding: 30px 20px;
            text-align: center;
            margin-bottom: 20px;
            cursor: pointer;
            transition: all 0.3s;
            background: rgba(52, 152, 219, 0.05);
        }

        .drop-zone.active {
            background: rgba(52, 152, 219, 0.1);
            border-color: #2980b9;
        }

        .drop-text {
            font-size: 1.1em;
            color: #3498db;
            margin-bottom: 15px;
        }

        .file-list {
            max-height: 300px;
            overflow-y: auto;
            margin-top: 15px;
            text-align: left;
        }

        .chat-input-container {
            position: fixed;
            bottom: 20px; 
            left: 0;
            right: 0;
            display: flex;
            justify-content: center;
            padding: 0 20px;
            z-index: 1000;
        }
        
        .chat-input-wrapper {
            display: flex;
            width: 100%;
            max-width: 800px;
            align-items: center;
            gap: 10px;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 30px;
            padding: 8px 15px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            border: 1px solid #ddd;
        }
        
        #chat-input {
            flex: 1;
            height: 40px;
            border: none;
            outline: none;
            font-size: 1em;
            background: transparent;
            padding: 0 10px;
        }
        
        #chat-send-btn {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            background: #3498db;
            color: white;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: background 0.3s;
            font-size: 1.2em;
        }
        
        #chat-send-btn:hover {
            background: #2980b9;
        }
        
        .explain-text {
            color: rgba(128, 128, 128, 0.8); 
            font-size: 0.8rem; 
        }

        .login-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 1);
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .login-content {
            background: white;
            border-radius: 10px;
            padding: 30px;
            width: 400px;
            max-width: 90%;
            box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);

        }

        .login-loading {
            text-align: center;
            padding: 20px 0;
            color: #666;
        }

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

        .login-header h2 {
            color: #2c3e50;
            font-family: -apple-system, BlinkMacSystemFont, sans-serif;
        }

        .login-footer {
            display: flex;
            justify-content: center;
            margin-top: 20px;
            width: 100%;
            flex-direction: column;
        }

        #login-submit {
            width: 80px;
            margin: 10px auto;
            display: block;
        }

        .error-message {
            margin-top: 10px;
            font-size: 0.9em;
        }

        .operation-message {
            margin: 10px 0;
            padding: 10px 12px;
            border-radius: 4px;
            font-size: 0.9em;
            display: none;
        }
        .operation-message.info {
            display: block;
            color: #666;
            text-align: center;
            padding: 24px 12px;
        }
        .operation-message.success {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
            display: block;
        }
        .operation-message.error {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
            display: block;
        }

        .ip-banned-message {
            text-align: center;
            padding: 20px;
            color: #e74c3c;
            font-size: 1.2em;
            font-weight: bold;
        }

        .ip-banned-details {
            text-align: center;
            color: #7f8c8d;
            margin-top: 10px;
            font-size: 0.9em;
        }

        .login-form-hidden {
            display: none;
        }
    

        .login-required {
            display: none !important;
        }

        
        @media (max-width: 768px) {
            .btn.btn-copy-path {
                width: 24px;
                height: 24px;
            }

            .btn.btn-copy-path .copy-path-emoji {
                font-size: 12px;
            }

            .topbar {
                height: 60px;
                padding: 0 20px;
                justify-content: center;
                overflow: hidden;
            }

            .logo-container {
                margin-left: 0;
            }

            .brand-text {
                font-size: 1.2em;
                text-align: center;
                max-width: 100%;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }

            .right-logo {
                height: 30px;
                display:none;
            }

            .brand-text::before,
            .brand-text::after {
                display: none;
            }

            .system-manager-container {
                margin: 10px auto;
                padding: 15px;
                max-width: 95%;
                overflow-x: hidden;
            }

            .system-divider {
                margin: 12px 0;
            }

            .system-button-row {
                justify-content: flex-start;
            }

            .status-toggle-btn {
                display: block;
            }

            .status-manager-content {
                display: none;
                grid-template-columns: repeat(3, 1fr);
                gap: 6px;
                margin-top: 10px;
            }

            #status-section.expanded .status-manager-content {
                display: grid;
            }

            #tools-section .system-button-row {
                display: none;
            }

            #tools-section.expanded .system-button-row {
                display: flex;
            }

            .status-item {
                min-width: 0;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                justify-content: center;
                font-size: 0.75em;
            }

            .status-manager-content {
                font-size: 0.75em;
            }

            .status-manager-title {
                font-size: 0.7em;
            }

            .manager-btn {
                align-self: center;
            }

            #share-manager-modal .modal-content {
                width: 95vw;
                max-width: 95vw;
            }

            .share-item {
                grid-template-columns: 1fr;
            }

            .share-fields {
                grid-template-columns: 1fr;
            }

            .share-actions {
                flex-direction: row;
                flex-wrap: wrap;
            }

            #webshell-modal .modal-content {
                width: 95vw;
                max-width: 95vw;
            }

            #services-modal .modal-content {
                width: 95vw;
                max-width: 95vw;
            }

            .file-actions {
                justify-content: center;
                max-width: 98%;
                margin-left: auto;
                margin-right: auto;
            }

            .btn-container {
                margin: 10px;
                padding: 15px;
            }
            
            .search-box {
                margin-left: auto;
                margin-right: auto;
                width: 95%;
                max-width: 95%;
                order: 99;
                margin-top: 4px;
            }

            .files-container {
                grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
                padding: 0 10px;
                justify-items: center;
            }

            .file-item {
                padding: 10px;
                width: 130px;
                max-width: 100%;
                box-sizing: border-box;
            }
            
            .file-icon {
                font-size: 2.5em;
            }
            
            .file-name {
                font-size: 0.8em;
            }
            
            .modal-content {
                min-width: auto;
                width: 95vw;
                max-width: 95vw;
                padding: 20px;
            }

            #upload-modal .modal-content {
                width: 90vw;
                max-width: 90vw;
            }

            #preview-modal .modal-content {
                width: 100vw;
                max-width: 100vw;
                height: 100vh;
                max-height: 100vh;
                border-radius: 0;
                padding: 12px;
            }

            .action-btn {
                width: 16px;
                height: 16px;
                font-size: 0.3em;
            }
                        
            .chat-input-container {
                bottom: 15px;
                padding: 0 15px;
            }

        }

        @media (min-width: 769px) and (max-width: 1366px) {
            .system-manager-container, .btn-container {
                margin: 10px auto !important;
            }
            
            .files-container {
                grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
                gap: 12px;
            }
            
            .file-item {
                padding: 12px;
                width: 160px;
            }
            
            .file-icon {
                font-size: 2.8em;
            }
            
            .file-name {
                font-size: 0.85em;
            }

            .action-btn {
                width: 20px;
                height: 20px;
                font-size: 0.7em;
            }
        }


/* Night palette: selected by the saved appearance setting or system preference. */
html { color-scheme: light; }
html[data-theme="dark"] {
        color-scheme: dark;
        --night-bg: #080c12;
        --night-panel: #0e141d;
        --night-card: #151e2a;
        --night-hover: #1c293a;
        --night-input: #0a1018;
        --night-text: #e6edf5;
        --night-muted: #a6b4c5;
        --night-border: #2e3d50;
        --night-accent: #82baff;
    }
:where(html[data-theme="dark"]) body { background-image: none; background-color: var(--night-bg); color: var(--night-text); }
:where(html[data-theme="dark"]) .topbar,
:where(html[data-theme="dark"]) .modal-content,
:where(html[data-theme="dark"]) .login-content {
        background-color: var(--night-panel);
    }
:where(html[data-theme="dark"]) .topbar,
:where(html[data-theme="dark"]) .breadcrumb-bar,
:where(html[data-theme="dark"]) .file-count-bar,
:where(html[data-theme="dark"]) .services-divider {
        border-color: var(--night-border);
    }
:where(html[data-theme="dark"]) .system-manager-container,
:where(html[data-theme="dark"]) .btn-container,
:where(html[data-theme="dark"]) body .file-manager-container {
        background-color: rgba(14, 20, 29, 0.95);
    }
:where(html[data-theme="dark"]) .system-divider { background-color: var(--night-border); }
:where(html[data-theme="dark"]) .brand-text::before,
:where(html[data-theme="dark"]) .brand-text::after { background-color: var(--night-border); }
:where(html[data-theme="dark"]) .bar { background-color: var(--night-text); }
:where(html[data-theme="dark"]) .brand-text,
:where(html[data-theme="dark"]) .dropdown-menu a,
:where(html[data-theme="dark"]) .status-manager-content,
:where(html[data-theme="dark"]) .status-item strong,
:where(html[data-theme="dark"]) .link-name,
:where(html[data-theme="dark"]) .service-name,
:where(html[data-theme="dark"]) .sort-option,
:where(html[data-theme="dark"]) .modal-title,
:where(html[data-theme="dark"]) #confirm-message,
:where(html[data-theme="dark"]) .upload-conflict-label,
:where(html[data-theme="dark"]) .settings-label,
:where(html[data-theme="dark"]) .settings-value,
:where(html[data-theme="dark"]) .form-label,
:where(html[data-theme="dark"]) .file-name-upload,
:where(html[data-theme="dark"]) .login-header h2 {
        color: var(--night-text);
    }
:where(html[data-theme="dark"]) .status-item span,
:where(html[data-theme="dark"]) .share-field label,
:where(html[data-theme="dark"]) .link-fields label,
:where(html[data-theme="dark"]) .link-path,
:where(html[data-theme="dark"]) .file-count-bar,
:where(html[data-theme="dark"]) .service-desc,
:where(html[data-theme="dark"]) .file-size,
:where(html[data-theme="dark"]) .file-date,
:where(html[data-theme="dark"]) .breadcrumb-separator,
:where(html[data-theme="dark"]) .close-modal,
:where(html[data-theme="dark"]) .settings-hint,
:where(html[data-theme="dark"]) .parquet-loading,
:where(html[data-theme="dark"]) .parquet-row-num,
:where(html[data-theme="dark"]) .file-size-upload,
:where(html[data-theme="dark"]) .explain-text,
:where(html[data-theme="dark"]) .login-loading,
:where(html[data-theme="dark"]) .operation-message.info,
:where(html[data-theme="dark"]) .ip-banned-details,
:where(html[data-theme="dark"]) body .preview-unsupported-title {
        color: var(--night-muted);
    }
:where(html[data-theme="dark"]) #current-ip-display { color: var(--night-muted) !important; }
:where(html[data-theme="dark"]) .status-manager-title,
:where(html[data-theme="dark"]) .status-toggle-btn,
:where(html[data-theme="dark"]) .breadcrumb-item,
:where(html[data-theme="dark"]) .link-jump-hint,
:where(html[data-theme="dark"]) .file-icon,
:where(html[data-theme="dark"]) .webshell-prompt,
:where(html[data-theme="dark"]) .drop-text {
        color: var(--night-accent);
    }
:where(html[data-theme="dark"]) .status-item { background-color: rgba(130, 186, 255, 0.12); }
:where(html[data-theme="dark"]) .dropdown-menu a:hover { background-color: var(--night-hover); }
:where(html[data-theme="dark"]) .btn,
:where(html[data-theme="dark"]) .manager-btn,
:where(html[data-theme="dark"]) #chat-send-btn {
        background-color: #666a70;
        color: #ffffff;
    }
:where(html[data-theme="dark"]) .btn:hover,
:where(html[data-theme="dark"]) .manager-btn:hover,
:where(html[data-theme="dark"]) #chat-send-btn:hover {
        background-color: #70747a;
    }
:where(html[data-theme="dark"]) .btn-danger,
:where(html[data-theme="dark"]) .btn-done,
:where(html[data-theme="dark"]) .service-toggle-btn.start { color: #ffffff; }
:where(html[data-theme="dark"]) .btn-danger { background-color: #b83f4b; }
:where(html[data-theme="dark"]) .btn-danger:hover { background-color: #9f3440; }
:where(html[data-theme="dark"]) .btn-done,
:where(html[data-theme="dark"]) .service-toggle-btn.start { background-color: #217346; }
:where(html[data-theme="dark"]) .btn-done:hover,
:where(html[data-theme="dark"]) .service-toggle-btn.start:hover { background-color: #29834f; }
:where(html[data-theme="dark"]) .btn:disabled { background-color: #2e3d50; color: #d4deea; }
:where(html[data-theme="dark"]) .share-item,
:where(html[data-theme="dark"]) .link-item,
:where(html[data-theme="dark"]) .service-item,
:where(html[data-theme="dark"]) .file-item,
:where(html[data-theme="dark"]) .file-item-upload,
:where(html[data-theme="dark"]) .sort-dropdown {
        background-color: var(--night-card);
        border-color: var(--night-border);
    }
:where(html[data-theme="dark"]) .link-item.view-mode:hover,
:where(html[data-theme="dark"]) .sort-option:hover {
        background-color: var(--night-hover);
    }
:where(html[data-theme="dark"]) .link-item.view-mode:hover { border-color: var(--night-accent); }
:where(html[data-theme="dark"]) .sort-option.active { background-color: #192d43; color: var(--night-accent); }
:where(html[data-theme="dark"]) .btn.btn-copy-path,
:where(html[data-theme="dark"]) .btn.btn-copy-path:hover,
:where(html[data-theme="dark"]) .action-btn {
        background-color: var(--night-hover);
        border-color: var(--night-border);
        color: var(--night-text);
    }
:where(html[data-theme="dark"]) .action-btn:hover { background-color: #666a70; color: #ffffff; }
:where(html[data-theme="dark"]) .search-box,
:where(html[data-theme="dark"]) .form-input,
:where(html[data-theme="dark"]) .settings-input,
:where(html[data-theme="dark"]) .webshell-command-input,
:where(html[data-theme="dark"]) .upload-conflict-select,
:where(html[data-theme="dark"]) .share-field input,
:where(html[data-theme="dark"]) .share-field textarea,
:where(html[data-theme="dark"]) .link-fields input,
:where(html[data-theme="dark"]) .preview-editor {
        background-color: var(--night-input);
        color: var(--night-text);
        border-color: var(--night-border);
        caret-color: var(--night-text);
    }
:where(html[data-theme="dark"]) .search-box::placeholder,
:where(html[data-theme="dark"]) .form-input::placeholder,
:where(html[data-theme="dark"]) .settings-input::placeholder,
:where(html[data-theme="dark"]) .webshell-command-input::placeholder,
:where(html[data-theme="dark"]) .share-field input::placeholder,
:where(html[data-theme="dark"]) .share-field textarea::placeholder,
:where(html[data-theme="dark"]) .link-fields input::placeholder,
:where(html[data-theme="dark"]) #chat-input::placeholder {
        color: var(--night-muted);
    }
:where(html[data-theme="dark"]) .search-box:focus,
:where(html[data-theme="dark"]) .webshell-command-input:focus {
        border-color: var(--night-accent);
    }
:where(html[data-theme="dark"]) .settings-checkbox,
:where(html[data-theme="dark"]) .settings-range { accent-color: var(--night-accent); }
:where(html[data-theme="dark"]) .share-item.view-mode .share-field input,
:where(html[data-theme="dark"]) .share-item.view-mode .share-field textarea { background-color: transparent; }
:where(html[data-theme="dark"]) .chat-input-wrapper {
        background-color: var(--night-panel);
        border-color: var(--night-border);
    }
:where(html[data-theme="dark"]) #chat-input { color: var(--night-text); caret-color: var(--night-text); }
:where(html[data-theme="dark"]) .modal { background-color: rgba(0, 0, 0, 0.7); }
:where(html[data-theme="dark"]) .login-modal { background-color: var(--night-bg); }
:where(html[data-theme="dark"]) .close-modal:hover { color: var(--night-text); background-color: var(--night-hover); }
:where(html[data-theme="dark"]) .close-modal.disabled { color: #718198; }
:where(html[data-theme="dark"]) .preview-content { background-color: var(--night-input); }
:where(html[data-theme="dark"]) .preview-text,
:where(html[data-theme="dark"]) .preview-editor-shell .preview-edit-highlight {
        background-color: var(--night-input);
        border-color: var(--night-border);
    }
:where(html[data-theme="dark"]) .edit-gutter {
        background-color: var(--night-card);
        color: var(--night-muted);
        border-color: var(--night-border);
    }
:where(html[data-theme="dark"]) .preview-editor-shell .preview-editor {
        background-color: transparent;
        color: transparent;
        caret-color: var(--night-text);
    }
:where(html[data-theme="dark"]) .preview-audio { background-color: var(--night-card); }
:where(html[data-theme="dark"]) .parquet-table-wrap,
:where(html[data-theme="dark"]) .parquet-table th,
:where(html[data-theme="dark"]) .parquet-table td {
        border-color: var(--night-border);
    }
:where(html[data-theme="dark"]) .parquet-table th { background-color: var(--night-card); }
:where(html[data-theme="dark"]) .parquet-table tbody tr:hover { background-color: var(--night-hover); }
:where(html[data-theme="dark"]) .progress-bar { background-color: #263449; }
:where(html[data-theme="dark"]) .progress { background-color: var(--night-accent); }
:where(html[data-theme="dark"]) .drop-zone {
        background-color: rgba(130, 186, 255, 0.06);
        border-color: var(--night-accent);
    }
:where(html[data-theme="dark"]) .drop-zone.active {
        background-color: rgba(130, 186, 255, 0.14);
        border-color: #acd2ff;
    }
:where(html[data-theme="dark"]) .service-status.active { background-color: #173d2e; color: #86d7a4; }
:where(html[data-theme="dark"]) .service-status.inactive { background-color: #45252e; color: #ffabb2; }
:where(html[data-theme="dark"]) .service-status.oneshot { background-color: #203d59; color: var(--night-accent); }
:where(html[data-theme="dark"]) .operation-message.success {
        background-color: #173d2e; color: #a3e5bd; border-color: #367653;
    }
:where(html[data-theme="dark"]) .operation-message.error {
        background-color: #45252e; color: #ffabb2; border-color: #8b4e5d;
    }
:where(html[data-theme="dark"]) .preview-truncated-notice {
        background-color: #42351c; color: #f1d08a; border-color: #806536;
    }
:where(html[data-theme="dark"]) .ip-banned-message,
:where(html[data-theme="dark"]) .file-remove,
:where(html[data-theme="dark"]) body .temp-share-banner { color: #ffabb2; }
:where(html[data-theme="dark"]) .file-remove:hover { background-color: rgba(255, 171, 178, 0.12); }
:where(html[data-theme="dark"]) #login-error,
:where(html[data-theme="dark"]) .preview-content p[style*="color:#c62828"] {
        color: #ffabb2 !important;
    }
:where(html[data-theme="dark"]) body .breadcrumb { border-color: var(--night-border); }
:where(html[data-theme="dark"]) code[class*="language-"],
:where(html[data-theme="dark"]) pre[class*="language-"],
:where(html[data-theme="dark"]) :not(pre) > code[class*="language-"] {
        color: var(--night-text);
        text-shadow: none;
        background-color: var(--night-input);
    }
:where(html[data-theme="dark"]) code[class*="language-"]::selection,
:where(html[data-theme="dark"]) pre[class*="language-"]::selection,
:where(html[data-theme="dark"]) code[class*="language-"] ::selection,
:where(html[data-theme="dark"]) pre[class*="language-"] ::selection {
        background-color: #345779;
    }
:where(html[data-theme="dark"]) .token { text-shadow: none; }
:where(html[data-theme="dark"]) .token.comment,
:where(html[data-theme="dark"]) .token.prolog,
:where(html[data-theme="dark"]) .token.doctype,
:where(html[data-theme="dark"]) .token.cdata {
        color: var(--night-muted);
    }
:where(html[data-theme="dark"]) .token.punctuation { color: #b8c6d9; }
:where(html[data-theme="dark"]) .token.namespace { color: #b8c6d9; }
:where(html[data-theme="dark"]) .token.property,
:where(html[data-theme="dark"]) .token.tag,
:where(html[data-theme="dark"]) .token.constant,
:where(html[data-theme="dark"]) .token.symbol,
:where(html[data-theme="dark"]) .token.deleted { color: #ffabb2; }
:where(html[data-theme="dark"]) .token.boolean,
:where(html[data-theme="dark"]) .token.number { color: #f0bd86; }
:where(html[data-theme="dark"]) .token.selector,
:where(html[data-theme="dark"]) .token.attr-name,
:where(html[data-theme="dark"]) .token.string,
:where(html[data-theme="dark"]) .token.char,
:where(html[data-theme="dark"]) .token.builtin,
:where(html[data-theme="dark"]) .token.inserted { color: #a3dfa2; }
:where(html[data-theme="dark"]) .token.operator,
:where(html[data-theme="dark"]) .token.entity,
:where(html[data-theme="dark"]) .token.url,
:where(html[data-theme="dark"]) .language-css .token.string,
:where(html[data-theme="dark"]) .style .token.string {
        color: #f1d08a;
        background-color: transparent;
    }
:where(html[data-theme="dark"]) .token.atrule,
:where(html[data-theme="dark"]) .token.attr-value,
:where(html[data-theme="dark"]) .token.keyword { color: #b6a7f2; }
:where(html[data-theme="dark"]) .token.function,
:where(html[data-theme="dark"]) .token.class-name { color: #82baff; }
:where(html[data-theme="dark"]) .token.regex,
:where(html[data-theme="dark"]) .token.important,
:where(html[data-theme="dark"]) .token.variable { color: #f0bd86; }
:where(html[data-theme="dark"]) .line-numbers .line-numbers-rows { border-color: var(--night-border); }
:where(html[data-theme="dark"]) .line-numbers-rows > span:before { color: var(--night-muted); }
:where(html[data-theme="dark"]) .language-csv .csv-col-0 { color: #82baff; }
:where(html[data-theme="dark"]) .language-csv .csv-col-1 { color: #a3dfa2; }
:where(html[data-theme="dark"]) .language-csv .csv-col-2 { color: #ffabb2; }
:where(html[data-theme="dark"]) .language-csv .csv-col-3 { color: #d5a8ec; }
:where(html[data-theme="dark"]) .language-csv .csv-col-4 { color: #f0bd86; }
:where(html[data-theme="dark"]) .language-csv .csv-col-5 { color: #84d6df; }
:where(html[data-theme="dark"]) .language-csv .csv-col-6 { color: #b6a7f2; }
:where(html[data-theme="dark"]) .language-csv .csv-col-7 { color: #f4a9cd; }
:where(html[data-theme="dark"]) .language-csv .csv-col-8 { color: #a7bbf3; }
:where(html[data-theme="dark"]) .language-csv .csv-col-9 { color: #c9da8c; }
:where(html[data-theme="dark"]) .language-csv .token.punctuation { color: #b8c6d9; }

/* Upload status follows the existing light/dark palette. */
.upload-file-status { font-size: 12px; margin-top: 6px; opacity: .8; overflow-wrap: anywhere; }

/* File-operation progress, shared by the four existing operation dialogs. */
.file-operation-progress { margin: 16px 0; display: flex; flex-direction: column; gap: 8px; }
.file-operation-progress progress { width: 100%; height: 14px; accent-color: #3498db; }
.file-operation-phase { font-weight: 600; }
.file-operation-current { overflow-wrap: anywhere; font-size: .85em; }
.file-operation-note, .file-operation-detail { color: #666; font-size: .85em; }
:where(html[data-theme="dark"]) .file-operation-note,
:where(html[data-theme="dark"]) .file-operation-detail { color: var(--night-muted); }

/* A quiet inline action in the same size row as ordinary files. */
.folder-usage-button {
    padding: 0 3px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: inherit;
    cursor: pointer;
    max-width: 100%;
    overflow-wrap: anywhere;
    text-decoration: none;
}
.folder-usage-button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.folder-usage-button:disabled { cursor: wait; opacity: .75; }
.folder-usage-button.is-error { color: #b02a22; }
:where(html[data-theme="dark"]) .folder-usage-button.is-error { color: #ffabb2; }
