/* vmbasetool v09 — Top-nav + Multi-tab workspace */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; font-size: 14px; color: rgba(0,0,0,0.85); background: #f5f7fa; }
a { color: #1890ff; text-decoration: none; }

/* ========== Loading ========== */
#loading { position: fixed; inset: 0; z-index: 9999; background: #fff; display: flex; align-items: center; justify-content: center; transition: opacity 0.4s; }
#loading.fade-out { opacity: 0; pointer-events: none; }
.loading-dots { display: flex; gap: 10px; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: #1890ff; animation: dotB 1.4s infinite both; }
.dot:nth-child(2) { animation-delay: .16s; }
.dot:nth-child(3) { animation-delay: .32s; }
@keyframes dotB { 0%,80%,100%{transform:scale(0);opacity:.5} 40%{transform:scale(1);opacity:1} }

/* ========== Login ========== */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#0a1a3a,#1a3a7a,#0a1a3a); background-size: 200% 200%; animation: grd 8s ease infinite; }
@keyframes grd { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }
.login-card { width: 400px; padding: 40px 36px; background: #fff; border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,.3); }
.login-logo-text { text-align: center; font-size: 36px; font-weight: 700; background: linear-gradient(135deg,#4e8bff,#a450ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 6px; letter-spacing: 3px; }
.login-subtitle { text-align: center; font-size: 13px; color: #999; margin-bottom: 28px; }
.login-error { color: #ff4d4f; text-align: center; min-height: 22px; font-size: 13px; margin-bottom: 8px; }
.login-form .form-group { margin-bottom: 20px; }
.login-form .form-group label { display: block; margin-bottom: 6px; font-size: 13px; color: #333; font-weight: 500; }
.login-form input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; outline: none; transition: border-color .2s; }
.login-form input:focus { border-color: #1890ff; box-shadow: 0 0 0 2px rgba(24,144,255,.1); }
.login-btn { width: 100%; height: 44px; border: none; border-radius: 8px; background: linear-gradient(135deg, #1890ff, #096dd9); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; transition: all .25s ease; box-shadow: 0 2px 8px rgba(24,144,255,.3); letter-spacing: .5px; }
.login-btn:hover { background: linear-gradient(135deg, #40a9ff, #1890ff); box-shadow: 0 4px 14px rgba(24,144,255,.4); transform: translateY(-1px); }
.login-btn:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(24,144,255,.3); }
.login-btn:disabled { background: linear-gradient(135deg, #91caff, #69b4ff); cursor: not-allowed; opacity: .6; transform: none; box-shadow: none; }

/* ========== Top Nav Layout ========== */
.app-shell { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.top-nav { height: 50px; background: #fff; display: flex; align-items: center; padding: 0 16px; box-shadow: 0 1px 4px rgba(0,21,41,.08); position: relative; z-index: 10; }
.top-nav .logo { display: flex; align-items: center; gap: 8px; width: 150px; flex-shrink: 0; }
.top-nav .logo .logo-icon { width: 28px; height: 28px; display: inline-block; background: linear-gradient(135deg,#4e8bff,#a450ff); clip-path: polygon(50% 0, 100% 100%, 0 100%); position: relative; }
.top-nav .logo .logo-text { font-size: 18px; font-weight: 700; color: #222; letter-spacing: 1px; }
.top-nav .nav-menu { flex: 1; display: flex; justify-content: center; gap: 4px; }
.top-nav .nav-item { display: flex; align-items: center; gap: 6px; padding: 6px 16px; font-size: 14px; color: #555; cursor: pointer; border-radius: 4px; transition: all .2s; border-bottom: 2px solid transparent; }
.top-nav .nav-item:hover { color: #1890ff; }
.top-nav .nav-item.active { color: #1890ff; border-bottom-color: #1890ff; }
.top-nav .nav-item i { font-size: 14px; }
.top-nav .nav-right { display: flex; align-items: center; gap: 12px; width: 240px; justify-content: flex-end; flex-shrink: 0; }
.top-nav .nav-right .icon-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; color: #666; cursor: pointer; border-radius: 6px; transition: all .2s ease; }
.top-nav .nav-right .icon-btn:hover { background: #e6f4ff; color: #1890ff; transform: scale(1.08); }
.top-nav .nav-right .icon-btn:active { transform: scale(.95); }
.top-nav .nav-right .username { font-size: 13px; color: #444; padding: 4px 10px; cursor: pointer; }

/* ========== Tab Bar ========== */
.tab-bar { height: 40px; background: #fff; border-bottom: 1px solid #e8e8e8; display: flex; align-items: center; padding: 0 4px; overflow: hidden; }
.tab-bar .tab-scroll { flex: 1; display: flex; overflow-x: auto; overflow-y: hidden; height: 100%; align-items: center; gap: 2px; }
.tab-bar .tab-scroll::-webkit-scrollbar { height: 0; }
.tab-bar .tab { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 12px; background: #fafafa; border: 1px solid #e8e8e8; border-radius: 4px; font-size: 13px; color: #555; cursor: pointer; flex-shrink: 0; transition: all .15s; }
.tab-bar .tab:hover { color: #1890ff; }
.tab-bar .tab.active { background: #e6f4ff; color: #1890ff; border-color: #91caff; }
.tab-bar .tab i.tab-icon { font-size: 12px; color: inherit; }
.tab-bar .tab .tab-close { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 10px; color: #999; margin-left: 4px; transition: all .15s; }
.tab-bar .tab .tab-close:hover { background: rgba(0,0,0,.08); color: #333; }
.tab-bar .tab.pinned { border-style: dashed; border-color: #91caff; background: #f0f7ff; }
.tab-bar .tab.pinned.active { background: #e6f4ff; }
.tab-bar .tab .tab-pin { font-size: 10px; color: #1890ff; margin-left: 4px; transform: rotate(-45deg); }
.tab-bar .tab.dragging { opacity: 0.4; }
.tab-bar .tab.drag-over { border-left: 2px solid #1890ff; }

/* ========== Main Content Area ========== */
.app-content { flex: 1; overflow: hidden; padding: 16px 20px; background: #f5f7fa; display: flex; flex-direction: column; }
.app-content > div { flex: 1; min-height: 0; overflow: auto; }
.page-title { font-size: 20px; font-weight: 600; color: rgba(0,0,0,.85); margin-bottom: 4px; }
.page-subtitle { color: rgba(0,0,0,.45); font-size: 13px; margin-bottom: 16px; }

/* ========== Dashboard ========== */
.dashboard-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 16px; }
.stat-card { background: #fff; border-radius: 4px; padding: 16px 20px; box-shadow: 0 1px 2px rgba(0,0,0,.04); position: relative; min-height: 90px; display: flex; flex-direction: column; justify-content: space-between; }
.stat-card .stat-label { font-size: 13px; color: rgba(0,0,0,.55); margin-bottom: 10px; }
.stat-card .stat-value { font-size: 30px; font-weight: 400; color: rgba(0,0,0,.88); line-height: 1; }
.stat-card .stat-icon { font-size: 40px; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: #1890ff; opacity: .9; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.info-card { background: #fff; border-radius: 4px; padding: 16px 20px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.info-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 14px; color: rgba(0,0,0,.85); }
.info-card .info-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13px; border-bottom: 1px dashed #f0f0f0; }
.info-card .info-row:last-child { border-bottom: none; }
.info-card .info-row .label { color: rgba(0,0,0,.55); }
.info-card .info-row .value { color: rgba(0,0,0,.85); }
.sys-progress-row { margin-bottom: 12px; }
.sys-progress-row .label { display: flex; justify-content: space-between; font-size: 13px; color: rgba(0,0,0,.55); margin-bottom: 4px; }
.sys-progress-row .value { color: #1890ff; }
.sys-progress-bar { height: 6px; border-radius: 3px; background: #f0f0f0; overflow: hidden; }
.sys-progress-bar .sys-progress-fill { height: 100%; background: linear-gradient(90deg,#4e8bff,#1890ff); transition: width .3s; }

/* ========== Global Button ========== */
.btn { padding: 6px 16px; border-radius: 6px; border: 1px solid #d9d9d9; background: #fff; cursor: pointer; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; transition: all .2s ease; box-shadow: 0 1px 2px rgba(0,0,0,.04); color: rgba(0,0,0,.85); }
.btn:hover { border-color: #1890ff; color: #1890ff; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(24,144,255,.12); }
.btn:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.btn:disabled { opacity:.5; cursor:not-allowed; transform:none !important; box-shadow:none !important; }
.btn.primary { background: linear-gradient(135deg, #1890ff, #096dd9); color: #fff; border-color: transparent; box-shadow: 0 2px 6px rgba(24,144,255,.25); }
.btn.primary:hover { background: linear-gradient(135deg, #40a9ff, #1890ff); box-shadow: 0 4px 12px rgba(24,144,255,.35); transform: translateY(-1px); }
.btn.primary:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(24,144,255,.2); }
.btn.danger { background: linear-gradient(135deg, #ff4d4f, #cf1322); color: #fff; border-color: transparent; box-shadow: 0 2px 6px rgba(255,77,79,.25); }
.btn.danger:hover { background: linear-gradient(135deg, #ff7875, #ff4d4f); box-shadow: 0 4px 12px rgba(255,77,79,.35); transform: translateY(-1px); }
.btn.success { background: linear-gradient(135deg, #52c41a, #389e0d); color: #fff; border-color: transparent; box-shadow: 0 2px 6px rgba(82,196,26,.25); }
.btn.success:hover { background: linear-gradient(135deg, #73d13d, #52c41a); box-shadow: 0 4px 12px rgba(82,196,26,.35); transform: translateY(-1px); }
.btn.warning { background: linear-gradient(135deg, #faad14, #d48806); color: #fff; border-color: transparent; box-shadow: 0 2px 6px rgba(250,173,20,.25); }
.btn.warning:hover { background: linear-gradient(135deg, #ffc53d, #faad14); box-shadow: 0 4px 12px rgba(250,173,20,.35); transform: translateY(-1px); }
.btn-lg { padding: 10px 28px; font-size: 15px; border-radius: 8px; }

/* ========== Page Toolbar ========== */
.page-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.page-toolbar .toolbar-left { display: flex; gap: 8px; align-items: center; }
.page-toolbar .toolbar-right { display: flex; gap: 8px; align-items: center; }
.page-toolbar .btn { padding: 6px 16px; border-radius: 6px; border: 1px solid #d9d9d9; background: #fff; cursor: pointer; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; transition: all .2s ease; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.page-toolbar .btn:hover { border-color: #1890ff; color: #1890ff; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(24,144,255,.12); }
.page-toolbar .btn:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.page-toolbar .btn.primary { background: linear-gradient(135deg, #1890ff, #096dd9); color: #fff; border-color: transparent; box-shadow: 0 2px 6px rgba(24,144,255,.25); }
.page-toolbar .btn.primary:hover { background: linear-gradient(135deg, #40a9ff, #1890ff); box-shadow: 0 4px 12px rgba(24,144,255,.35); transform: translateY(-1px); }
.page-toolbar .btn.primary:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(24,144,255,.2); }
.page-toolbar .btn.danger { background: linear-gradient(135deg, #ff4d4f, #cf1322); color: #fff; border-color: transparent; box-shadow: 0 2px 6px rgba(255,77,79,.25); }
.page-toolbar .btn.danger:hover { background: linear-gradient(135deg, #ff7875, #ff4d4f); box-shadow: 0 4px 12px rgba(255,77,79,.35); transform: translateY(-1px); }
.page-toolbar .btn.danger:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(255,77,79,.2); }
.page-toolbar .search-input { height: 30px; padding: 0 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; outline: none; width: 220px; box-sizing: border-box; }
.page-toolbar .search-input:focus { border-color: #1890ff; box-shadow: 0 0 0 2px rgba(24,144,255,.2); }

/* ========== Status Badges ========== */
.badge-online { color: #52c41a; background: #f6ffed; border: 1px solid #b7eb8f; padding: 1px 8px; border-radius: 3px; font-size: 12px; }
.badge-offline { color: #8c8c8c; background: #fafafa; border: 1px solid #d9d9d9; padding: 1px 8px; border-radius: 3px; font-size: 12px; }
.badge-sleep { color: #faad14; background: #fffbe6; border: 1px solid #ffe58f; padding: 1px 8px; border-radius: 3px; font-size: 12px; }
.badge-lost { color: #ff4d4f; background: #fff2f0; border: 1px solid #ffccc7; padding: 1px 8px; border-radius: 3px; font-size: 12px; }
.badge-running { color: #52c41a; background: #f6ffed; border: 1px solid #b7eb8f; padding: 1px 8px; border-radius: 3px; font-size: 12px; }
.badge-stopped { color: #8c8c8c; background: #fafafa; border: 1px solid #d9d9d9; padding: 1px 8px; border-radius: 3px; font-size: 12px; }
.badge-hb { padding: 1px 10px; border-radius: 3px; font-size: 12px; background: #fafafa; color: #8c8c8c; border: 1px solid #d9d9d9; display: inline-block; min-width: 48px; text-align: center; }
.badge-hb.fresh { background: #f6ffed; color: #52c41a; border-color: #b7eb8f; }

/* ========== Relay Tree ========== */
.has-children { background: #f0f7ff !important; border-left: 3px solid #1890ff; }
.relay-child-row { background: #fafafa !important; }
.relay-child-row td:first-child { padding-left: 24px !important; }
.id-cell.expandable { cursor: pointer; user-select: none; }
.id-cell.expandable:hover { color: #1890ff; }
.child-count-badge { display: inline-block; background: #e6f4ff; color: #1890ff; font-size: 11px; padding: 0 6px; border-radius: 8px; margin-left: 6px; line-height: 18px; }

/* ========== Code Block ========== */
.code-block { background: #1e1e1e; color: #d4d4d4; border-radius: 4px; padding: 10px 14px; font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 13px; line-height: 1.6; overflow-x: auto; position: relative; margin-bottom: 16px; }
.code-block .code-lineno { color: #858585; margin-right: 14px; user-select: none; }
.code-block pre { white-space: pre-wrap; word-break: break-all; }
.cmd-section { margin-bottom: 20px; }
.cmd-section h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.cmd-section h4 { font-size: 14px; font-weight: 500; color: rgba(0,0,0,.85); display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; background: #fafafa; border: 1px solid #f0f0f0; border-radius: 4px 4px 0 0; cursor: pointer; }
.cmd-section h4 .cmd-arrow { color: #999; }

/* ========== Tab sub-navigation (for 客户端生成 / 主机管理) ========== */
.sub-tabs { display: flex; gap: 24px; border-bottom: 1px solid #e8e8e8; margin-bottom: 20px; }
.sub-tabs .sub-tab { padding: 8px 0; font-size: 14px; color: #666; cursor: pointer; border-bottom: 2px solid transparent; }
.sub-tabs .sub-tab:hover { color: #1890ff; }
.sub-tabs .sub-tab.active { color: #1890ff; border-bottom-color: #1890ff; font-weight: 500; }

/* ========== File Manager ========== */
.file-manager { display: flex; height: calc(100vh - 220px); min-height: 500px; background: #fff; border-radius: 4px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.file-tree { width: 280px; border-right: 1px solid #f0f0f0; display: flex; flex-direction: column; background: #fafafa; }
.file-tree-header { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; gap: 6px; font-size: 13px; }
.file-tree-header input { flex: 1; height: 28px; padding: 0 8px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 12px; outline: none; }
.file-tree-header .icon-btn { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: #888; border-radius: 6px; transition: all .2s ease; }
.file-tree-header .icon-btn:hover { color: #1890ff; background: #e6f4ff; transform: scale(1.08); }
.file-tree-header .icon-btn:active { transform: scale(.95); }
.file-tree-list { flex: 1; overflow-y: auto; padding: 6px 0; }
.file-tree-item { display: flex; align-items: center; gap: 6px; padding: 5px 12px; cursor: pointer; font-size: 13px; color: #444; }
.file-tree-item:hover { background: #e6f4ff; }
.file-tree-item.active { background: #e6f4ff; color: #1890ff; }
.file-tree-item i.arrow { color: #999; font-size: 11px; width: 12px; }
.file-tree-item i.ftype { color: #faad14; }
.file-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.file-toolbar { padding: 8px 14px; border-bottom: 1px solid #f0f0f0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: #fafafa; }
.file-toolbar input.path-input { flex: 1; min-width: 250px; height: 30px; padding: 0 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; outline: none; }
.file-toolbar .icon-btn { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: #666; border-radius: 6px; transition: all .2s ease; }
.file-toolbar .icon-btn:hover { background: #e6f4ff; color: #1890ff; transform: scale(1.08); }
.file-toolbar .icon-btn:active { transform: scale(.95); }
.file-list { flex: 1; overflow-y: auto; }
.file-list table { width: 100%; border-collapse: collapse; }
.file-list th { text-align: left; padding: 10px 16px; border-bottom: 1px solid #f0f0f0; font-weight: 500; font-size: 13px; color: rgba(0,0,0,.85); background: #fafafa; position: sticky; top: 0; }
.file-list td { padding: 8px 16px; border-bottom: 1px solid #f5f5f5; font-size: 13px; }
.file-list tr:hover td { background: #fafafa; }
.file-list .empty { padding: 80px 0; text-align: center; color: #999; }
.file-list .empty i { font-size: 36px; color: #d9d9d9; }

/* ========== Terminal ========== */
.terminal-container { flex: 1; min-height: 0; background: #1e1e1e; border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; }
.terminal-toolbar { padding: 8px 12px; background: #252525; display: flex; gap: 8px; align-items: center; }
.terminal-toolbar .term-dot { width: 12px; height: 12px; border-radius: 50%; }
.terminal-toolbar .term-dot.red { background: #ff5f56; }
.terminal-toolbar .term-dot.yellow { background: #ffbd2e; }
.terminal-toolbar .term-dot.green { background: #27c93f; }
.terminal-toolbar .term-title { color: rgba(255,255,255,.6); font-size: 13px; margin-left: 12px; flex: 1; }
.terminal-body { flex: 1; padding: 0; min-height: 0; overflow: hidden; background: #1e1e1e; }
.terminal-body .xterm { height: 100% !important; }
.terminal-body .xterm-viewport { height: 100% !important; }
.terminal-body .xterm-screen { height: 100% !important; }

/* ========== Screenshot ========== */
.screenshot-container { text-align: center; background: #fff; padding: 20px; border-radius: 4px; min-height: 500px; }
.screenshot-img { max-width: 100%; max-height: calc(100vh - 280px); border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.1); }

/* ========== Settings ========== */
.settings-form { max-width: 800px; padding: 20px 0; }
.settings-form .form-group { display: grid; grid-template-columns: 160px 1fr; align-items: center; gap: 20px; margin-bottom: 20px; }
.settings-form .form-label { text-align: right; color: rgba(0,0,0,.85); display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.settings-form .form-label i.help { color: #bbb; font-size: 12px; cursor: help; }
.settings-form .form-input { height: 34px; padding: 0 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; outline: none; }
.settings-form .form-input:focus { border-color: #1890ff; }
.settings-form .save-btn { padding: 8px 28px; background: linear-gradient(135deg, #1890ff, #096dd9); color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 500; margin-left: 180px; transition: all .2s ease; box-shadow: 0 2px 6px rgba(24,144,255,.25); }
.settings-form .save-btn:hover { background: linear-gradient(135deg, #40a9ff, #1890ff); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(24,144,255,.35); }
.settings-form .save-btn:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(24,144,255,.2); }

/* ========== Generic Table ========== */
.data-table { background: #fff; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.04); overflow: hidden; }
.data-table table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 12px 16px; border-bottom: 1px solid #f0f0f0; font-weight: 500; font-size: 13px; color: rgba(0,0,0,.85); background: #fafafa; }
.data-table td { padding: 10px 16px; border-bottom: 1px solid #f5f5f5; font-size: 13px; color: rgba(0,0,0,.85); }
.data-table tr:hover td { background: #fafafa; }
.data-table .actions { display: flex; gap: 8px; }
.data-table .actions a { color: #1890ff; cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.data-table .actions a.danger { color: #ff4d4f; }
.data-table .actions a:hover { opacity: .8; }
.pagination { padding: 12px 16px; display: flex; align-items: center; gap: 12px; font-size: 13px; color: #666; }
.pg-total { color: rgba(0,0,0,.45); }
.pg-controls { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.pg-btn { min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e0e0e0; border-radius: 6px; background: #fff; cursor: pointer; font-size: 13px; font-weight: 500; color: rgba(0,0,0,.65); transition: all .2s ease; padding: 0 6px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.pg-btn:hover:not(:disabled):not(.active) { border-color: #1890ff; color: #1890ff; transform: translateY(-1px); box-shadow: 0 2px 6px rgba(24,144,255,.12); }
.pg-btn:active:not(:disabled):not(.active) { transform: translateY(0); }
.pg-btn.active { background: linear-gradient(135deg, #1890ff, #096dd9); color: #fff; border-color: transparent; box-shadow: 0 2px 6px rgba(24,144,255,.3); }
.pg-btn:disabled { cursor: not-allowed; color: #d9d9d9; border-color: #e8e8e8; opacity: .5; }
.pg-ellipsis { width: 32px; text-align: center; color: rgba(0,0,0,.25); letter-spacing: 1px; }
.pg-size { height: 32px; padding: 0 8px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; color: rgba(0,0,0,.65); outline: none; cursor: pointer; background: #fff; }
.pg-size:focus { border-color: #1890ff; }

/* ========== Modals ========== */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal-box { background: #fff; border-radius: 6px; min-width: 420px; max-width: 90vw; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-header { padding: 14px 20px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.modal-header .title { font-size: 15px; font-weight: 500; }
.modal-header .close { cursor: pointer; color: #999; font-size: 16px; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-footer { padding: 12px 20px; border-top: 1px solid #f0f0f0; display: flex; justify-content: flex-end; gap: 8px; }
.modal-footer .btn { padding: 7px 20px; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 500; border: 1px solid #d9d9d9; background: #fff; transition: all .2s ease; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.modal-footer .btn:hover { border-color: #1890ff; color: #1890ff; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,.08); }
.modal-footer .btn:active { transform: translateY(0); }
.modal-footer .btn.primary { background: linear-gradient(135deg, #1890ff, #096dd9); color: #fff; border-color: transparent; box-shadow: 0 2px 6px rgba(24,144,255,.25); }
.modal-footer .btn.primary:hover { background: linear-gradient(135deg, #40a9ff, #1890ff); box-shadow: 0 4px 12px rgba(24,144,255,.35); transform: translateY(-1px); }
.modal-footer .btn.primary:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(24,144,255,.2); }

/* ========== Context Menu ========== */
.ctx-menu { position: fixed; z-index: 3000; background: #fff; border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.15); min-width: 160px; padding: 4px 0; animation: ctx-in .12s ease; }
.ctx-menu .ctx-item { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 13px; color: rgba(0,0,0,.85); cursor: pointer; transition: background .1s; }
.ctx-menu .ctx-item:hover { background: #f5f5f5; }
.ctx-menu .ctx-item i { width: 16px; text-align: center; color: #666; font-size: 13px; }
.ctx-menu .ctx-item.danger { color: #ff4d4f; }
.ctx-menu .ctx-item.danger i { color: #ff4d4f; }
.ctx-sep { height: 1px; background: #f0f0f0; margin: 4px 0; }
@keyframes ctx-in { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }

/* ========== Toast ========== */
.toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { padding: 10px 16px; background: #fff; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,.15); display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 200px; animation: toast-in .2s ease; }
.toast.success { color: #52c41a; }
.toast.error { color: #ff4d4f; }
.toast.info { color: #1890ff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px);} to { opacity: 1; transform: translateY(0);} }

/* ========== Utility ========== */
.text-success { color: #52c41a; }
.text-danger { color: #ff4d4f; }
.text-warning { color: #faad14; }
.text-muted { color: #999; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.flex-center { display: flex; align-items: center; gap: 6px; }
.nowrap { white-space: nowrap; }
.clickable { cursor: pointer; }
.mono { font-family: 'SF Mono', Menlo, Consolas, monospace; }

/* ========== Radio Group (模式选择器) ========== */
.radio-group { display: flex; flex-wrap: wrap; gap: 0; }
.radio-btn { display: inline-block; padding: 6px 18px; border: 1px solid #e0e0e0; background: #fff; color: rgba(0,0,0,.75); cursor: pointer; font-size: 13px; font-weight: 500; margin-right: -1px; transition: all .2s ease; }
.radio-btn:first-child { border-radius: 6px 0 0 6px; }
.radio-btn:last-child { border-radius: 0 6px 6px 0; }
.radio-btn.active { background: linear-gradient(135deg, #1890ff, #096dd9); color: #fff; border-color: #1890ff; z-index: 1; position: relative; box-shadow: 0 2px 6px rgba(24,144,255,.25); }
.radio-btn:hover:not(.active) { border-color: #1890ff; color: #1890ff; background: #f0f7ff; }

/* ========== Toggle Switch ========== */
.toggle-switch { width: 44px; height: 22px; border-radius: 11px; background: #d9d9d9; cursor: pointer; position: relative; transition: all .25s ease; }
.toggle-switch.on { background: linear-gradient(135deg, #1890ff, #096dd9); box-shadow: 0 2px 6px rgba(24,144,255,.3); }
.toggle-switch .toggle-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; position: absolute; top: 2px; left: 2px; transition: left .25s ease; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.toggle-switch.on .toggle-thumb { left: 24px; }

/* ========== Gen Panel (客户端生成) ========== */
.gen-panel { background: #fff; border-radius: 4px; padding: 24px 30px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.gen-panel h3 { font-size: 17px; font-weight: 600; }
.gen-panel .text-muted { font-size: 13px; color: rgba(0,0,0,.45); }
.gen-panel .form-group { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.gen-panel .form-label { min-width: 120px; text-align: right; color: rgba(0,0,0,.85); font-size: 13px; }
.gen-panel .form-input { height: 34px; padding: 0 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; outline: none; min-width: 200px; }
.gen-panel .form-input:focus { border-color: #1890ff; }
.gen-panel select.form-input { min-width: 260px; }

/* ========== Dark Code Block (上线命令) ========== */
.code-block.dark { background: #282c34; color: #e5c07b; border-radius: 4px; padding: 12px 16px; cursor: pointer; }
.code-block.dark:hover { background: #2c313a; }
.code-block.dark pre { white-space: pre-wrap; word-break: break-all; }

/* ========== Info action link ========== */
.data-table .actions a.info { color: #1890ff; }

/* ========== Terminal Mode Bar (交互/非交互切换) ========== */
.term-mode-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #fafafa; border-bottom: 1px solid #e8e8e8; }
.term-mode-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 20px; border: 1px solid #e0e0e0; border-radius: 6px; background: #fff; cursor: pointer; font-size: 13px; font-weight: 500; color: #555; transition: all .2s ease; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.term-mode-btn:hover { border-color: #1890ff; color: #1890ff; background: #f0f7ff; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(24,144,255,.1); }
.term-mode-btn:active { transform: translateY(0); }
.term-mode-btn.active { background: linear-gradient(135deg, #1890ff, #096dd9); color: #fff; border-color: transparent; box-shadow: 0 2px 8px rgba(24,144,255,.3); }
.term-action-btn { display: inline-flex; align-items: center; gap: 5px; padding: 5px 16px; border: none; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer; margin-left: auto; transition: all .2s ease; }
.term-action-btn.connect { background: linear-gradient(135deg, #52c41a, #389e0d); color: #fff; box-shadow: 0 2px 6px rgba(82,196,26,.3); }
.term-action-btn.connect:hover { background: linear-gradient(135deg, #73d13d, #52c41a); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(82,196,26,.35); }
.term-action-btn.connect:active { transform: translateY(0); box-shadow: 0 1px 3px rgba(82,196,26,.2); }
.term-action-btn.disconnect { background: linear-gradient(135deg, #ff4d4f, #cf1322); color: #fff; box-shadow: 0 2px 6px rgba(255,77,79,.3); }
.term-action-btn.disconnect:hover { background: linear-gradient(135deg, #ff7875, #ff4d4f); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(255,77,79,.35); }
.term-action-btn.disconnect:active { transform: translateY(0); box-shadow: 0 1px 3px rgba(255,77,79,.2); }

/* ========== Non-interactive Shell ========== */
.shell-container { display: flex; flex-direction: column; flex: 1; min-height: 0; background: #1e1e1e; border-radius: 6px; overflow: hidden; }
.shell-output { flex: 1; overflow-y: auto; padding: 12px 16px; font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 13px; line-height: 1.6; }
.shell-output pre { margin: 0; white-space: pre-wrap; word-break: break-all; }
.shell-cmd { color: #61afef; }
.shell-out { color: #abb2bf; }
.shell-err { color: #e06c75; }
.shell-input-row { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #282c34; border-top: 1px solid #3e4451; }
.shell-prompt { color: #98c379; font-family: monospace; font-weight: bold; font-size: 14px; }
.shell-input { flex: 1; background: transparent; border: 1px solid #3e4451; border-radius: 4px; padding: 6px 10px; color: #abb2bf; font-family: monospace; font-size: 13px; outline: none; }
.shell-input:focus { border-color: #528bff; }
.shell-input::placeholder { color: #5c6370; }

/* ========== File Manager Toolbar ========== */
.file-toolbar { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: #fafafa; border-bottom: 1px solid #f0f0f0; }
.ftb-icon { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 4px; cursor: pointer; color: #666; font-size: 14px; transition: all .15s; }
.ftb-icon:hover { background: #e6f7ff; color: #1890ff; }
.ftb-breadcrumb { flex: 1; display: flex; align-items: center; gap: 0; padding: 0 8px; font-size: 13px; overflow-x: auto; white-space: nowrap; }
.ftb-sep { color: #d9d9d9; margin: 0 2px; }
.ftb-seg { cursor: pointer; color: #666; padding: 2px 4px; border-radius: 3px; }
.ftb-seg:hover { background: #e6f7ff; color: #1890ff; }
.ftb-seg.current { color: #1890ff; font-weight: 500; }
.ftb-actions { display: flex; gap: 2px; margin-left: auto; }
.ftb-path-input { flex: 1; min-width: 200px; height: 28px; padding: 0 8px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; outline: none; font-family: 'SF Mono', Menlo, Consolas, monospace; }
.ftb-path-input:focus { border-color: #1890ff; box-shadow: 0 0 0 2px rgba(24,144,255,.1); }
.ftb-go-btn { height: 28px; padding: 0 14px; border: none; border-radius: 6px; background: linear-gradient(135deg, #1890ff, #096dd9); color: #fff; font-size: 12px; font-weight: 500; cursor: pointer; transition: all .2s ease; box-shadow: 0 1px 4px rgba(24,144,255,.25); }
.ftb-go-btn:hover { background: linear-gradient(135deg, #40a9ff, #1890ff); transform: translateY(-1px); box-shadow: 0 3px 8px rgba(24,144,255,.3); }
.ftb-go-btn:active { transform: translateY(0); box-shadow: 0 1px 3px rgba(24,144,255,.2); }
.ftb-action-btn { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 12px; border: 1px solid #e0e0e0; border-radius: 6px; background: #fff; font-size: 12px; font-weight: 500; color: #555; cursor: pointer; transition: all .2s ease; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.ftb-action-btn:hover { border-color: #1890ff; color: #1890ff; background: #f0f7ff; transform: translateY(-1px); box-shadow: 0 2px 6px rgba(24,144,255,.1); }
.ftb-action-btn:active { transform: translateY(0); }

/* ========== File Actions Column ========== */
.file-actions { display: flex; gap: 6px; }
.file-actions a { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 4px; color: #1890ff; font-size: 13px; cursor: pointer; transition: background .1s; }
.file-actions a:hover { background: #e6f7ff; }
.file-actions a.danger { color: #ff4d4f; }
.file-actions a.danger:hover { background: #fff1f0; }

/* ========== File Tree Root ========== */
.file-tree-item.root { font-weight: 600; color: #1890ff; padding: 8px 12px; border-bottom: 1px solid #f0f0f0; cursor: default; }

/* ========== Code Editor Modal ========== */
.editor-modal { width: 80vw; height: 80vh; background: #282a36; border-radius: 8px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 8px 40px rgba(0,0,0,.5); }
.editor-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: #21222c; border-bottom: 1px solid #44475a; }
.editor-title { color: #f8f8f2; font-size: 13px; display: flex; align-items: center; font-family: 'SF Mono', Menlo, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-actions { display: flex; gap: 8px; flex-shrink: 0; }
.editor-actions .btn { font-size: 12px; padding: 6px 16px; font-weight: 500; border-radius: 6px; transition: all .2s ease; }
.editor-actions .btn:not(.primary) { background: #44475a; color: #f8f8f2; border-color: #6272a4; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.editor-actions .btn:not(.primary):hover { background: #6272a4; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,.3); }
.editor-actions .btn:not(.primary):active { transform: translateY(0); }
.editor-actions .btn.primary { box-shadow: 0 2px 6px rgba(24,144,255,.3); }
.editor-actions .btn.primary:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(24,144,255,.4); }
.editor-actions .btn.primary:active { transform: translateY(0); }
.editor-body { flex: 1; overflow: hidden; }
.editor-body .CodeMirror { height: 100% !important; font-size: 13px; }

/* ========== Download Manager Panel ========== */
.dl-badge { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; line-height: 16px; border-radius: 8px; background: #ff4d4f; color: #fff; font-size: 10px; text-align: center; padding: 0 4px; }
.dl-panel { border-bottom: 1px solid #f0f0f0; background: #fff; max-height: 200px; display: flex; flex-direction: column; }
.dl-panel-header { display: flex; align-items: center; padding: 8px 14px; font-size: 13px; font-weight: 500; color: rgba(0,0,0,.85); border-bottom: 1px solid #f0f0f0; background: #fafafa; flex-shrink: 0; }
.dl-panel-body { flex: 1; overflow-y: auto; padding: 0; }
.dl-item { padding: 8px 14px; border-bottom: 1px solid #f5f5f5; }
.dl-item:last-child { border-bottom: none; }
.dl-item-info { display: flex; align-items: center; font-size: 13px; color: rgba(0,0,0,.85); margin-bottom: 2px; }
.dl-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.dl-progress-bar { height: 4px; border-radius: 2px; background: #f0f0f0; overflow: hidden; margin: 4px 0 2px; }
.dl-progress-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, #4e8bff, #1890ff); transition: width .2s; }

/* ========== Download Popup (floating) ========== */
.dl-item { padding: 10px 16px; border-bottom: 1px solid #f5f5f5; }
.dl-item:last-child { border-bottom: none; }
.dl-item-info { display: flex; align-items: center; font-size: 13px; color: rgba(0,0,0,.85); }
.dl-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-item-progress { height: 4px; border-radius: 2px; background: #f0f0f0; overflow: hidden; margin-top: 6px; }
.dl-item-bar { height: 100%; border-radius: 2px; background: linear-gradient(90deg, #4e8bff, #1890ff); transition: width .2s; }
.dl-item-error { font-size: 12px; color: #ff4d4f; margin-top: 4px; }

/* ========== Chmod Table ========== */
.chmod-table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.chmod-table th, .chmod-table td { padding: 8px 12px; text-align: center; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.chmod-table th { background: #fafafa; font-weight: 500; color: rgba(0,0,0,.65); }
.chmod-table td:first-child { text-align: left; font-weight: 500; color: rgba(0,0,0,.85); }
.chmod-table input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; accent-color: #1890ff; }

/* ========== Popconfirm ========== */
.popconfirm { position: fixed; z-index: 3001; background: #fff; border-radius: 6px; box-shadow: 0 3px 16px rgba(0,0,0,.18); padding: 14px 16px; min-width: 200px; max-width: 280px; }
.popconfirm-body { font-size: 13px; color: rgba(0,0,0,.85); margin-bottom: 10px; display: flex; align-items: center; }
.popconfirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.btn-sm { font-size: 12px !important; padding: 3px 12px !important; height: 26px !important; line-height: 20px !important; border-radius: 5px !important; }
.term-mode-bar .btn { padding: 5px 14px; border-radius: 6px; border: 1px solid #e0e0e0; background: #fff; cursor: pointer; font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; transition: all .2s ease; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.term-mode-bar .btn:hover { border-color: #1890ff; color: #1890ff; transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.term-mode-bar .btn:active { transform: translateY(0); }
.term-mode-bar .btn.primary { background: linear-gradient(135deg, #1890ff, #096dd9); color: #fff; border-color: transparent; box-shadow: 0 2px 6px rgba(24,144,255,.25); }
.term-mode-bar .btn.primary:hover { background: linear-gradient(135deg, #40a9ff, #1890ff); box-shadow: 0 4px 10px rgba(24,144,255,.35); transform: translateY(-1px); }
.term-mode-bar .btn.primary:active { transform: translateY(0); box-shadow: 0 1px 3px rgba(24,144,255,.2); }
.term-mode-bar .btn.danger { background: linear-gradient(135deg, #ff4d4f, #cf1322); color: #fff; border-color: transparent; box-shadow: 0 2px 6px rgba(255,77,79,.25); }
.term-mode-bar .btn.danger:hover { background: linear-gradient(135deg, #ff7875, #ff4d4f); box-shadow: 0 4px 10px rgba(255,77,79,.35); transform: translateY(-1px); }
.term-mode-bar .btn.danger:active { transform: translateY(0); box-shadow: 0 1px 3px rgba(255,77,79,.2); }

/* ========== Time Edit Form ========== */
.time-edit-form { display: flex; flex-direction: column; gap: 8px; }
.time-edit-form label { font-size: 13px; font-weight: 500; color: rgba(0,0,0,.65); }
.time-edit-form .time-input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; outline: none; color: rgba(0,0,0,.85); box-sizing: border-box; }
.time-edit-form .time-input:focus { border-color: #1890ff; box-shadow: 0 0 0 2px rgba(24,144,255,.2); }

/* ========== Inline Remark Edit ========== */
.remark-cell { cursor: pointer; display: flex; align-items: center; gap: 6px; min-height: 28px; }
.remark-cell:hover { color: #1890ff; }
.remark-edit-input { width: 100%; height: 28px; padding: 0 8px; border: 1px solid #1890ff; border-radius: 4px; font-size: 13px; outline: none; box-shadow: 0 0 0 2px rgba(24,144,255,.2); }

/* ========== Force all modals centered ========== */
/* antd.min.css 有三条 .ant-modal-centered .ant-modal 规则互相冲突：
   第1条: display:inline-block; text-align:left; vertical-align:middle; top:0
   第2条: flex:1  (覆盖了 inline-block)
   第3条: text-align:right  (覆盖了 left)
   必须用 !important 强制修复 */
.ant-modal-centered {
    text-align: center !important;
}
.ant-modal-centered:before {
    content: "" !important;
    display: inline-block !important;
    height: 100% !important;
    vertical-align: middle !important;
    width: 0 !important;
}
.ant-modal-centered .ant-modal {
    display: inline-block !important;
    top: 0 !important;
    padding-bottom: 0 !important;
    text-align: left !important;
    vertical-align: middle !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
}

/* ========== OSS Unified Panel ========== */
.oss-panel .ant-modal { min-width: 620px; max-width: 780px; }
.oss-tabs { display: flex; border-bottom: 1px solid #f0f0f0; padding: 0 20px; background: #fafafa; }
.oss-tab { padding: 12px 20px; cursor: pointer; font-size: 13px; color: #666; border-bottom: 2px solid transparent; transition: all .2s; display: flex; align-items: center; gap: 6px; user-select: none; }
.oss-tab:hover { color: #1890ff; }
.oss-tab.active { color: #1890ff; border-bottom-color: #1890ff; font-weight: 500; }
.oss-tab .tab-icon { font-size: 14px; }
.oss-direction { display: flex; gap: 0; margin-bottom: 16px; }
.oss-dir-btn { flex: 1; padding: 10px; text-align: center; border: 1px solid #e0e0e0; cursor: pointer; font-size: 13px; font-weight: 500; transition: all .2s; background: #fff; color: #666; user-select: none; }
.oss-dir-btn:first-child { border-radius: 6px 0 0 6px; }
.oss-dir-btn:last-child { border-radius: 0 6px 6px 0; margin-left: -1px; }
.oss-dir-btn.active { background: linear-gradient(135deg,#1890ff,#096dd9); color: #fff; border-color: #1890ff; z-index: 1; position: relative; box-shadow: 0 2px 6px rgba(24,144,255,.25); }
.oss-dir-btn:hover:not(.active) { border-color: #1890ff; color: #1890ff; background: #f0f7ff; }
.oss-form-section { padding: 20px; }
.oss-form-section .form-row { display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 12px; margin-bottom: 12px; }
.oss-form-section .form-row label { text-align: right; font-size: 13px; color: rgba(0,0,0,.65); }
.oss-form-section .form-row input, .oss-form-section .form-row select { height: 34px; padding: 0 10px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 13px; outline: none; transition: border-color .2s; }
.oss-form-section .form-row input:focus, .oss-form-section .form-row select:focus { border-color: #1890ff; box-shadow: 0 0 0 2px rgba(24,144,255,.1); }
.oss-submit-bar { padding: 16px 20px; border-top: 1px solid #f0f0f0; display: flex; justify-content: flex-end; gap: 8px; }
.oss-submit-btn { padding: 8px 28px; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .25s; display: inline-flex; align-items: center; gap: 8px; }
.oss-submit-btn.primary { background: linear-gradient(135deg,#1890ff 0%,#096dd9 100%); color: #fff; box-shadow: 0 4px 14px rgba(24,144,255,.35); }
.oss-submit-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(24,144,255,.45); }
.oss-submit-btn.primary:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(24,144,255,.25); }
.oss-submit-btn.cancel { background: #fff; color: #666; border: 1px solid #d9d9d9; }
.oss-submit-btn.cancel:hover { border-color: #1890ff; color: #1890ff; }

/* ========== Bucket Card Grid (Settings) ========== */
.bucket-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 16px; margin-top: 16px; }
.bucket-card { background: #fff; border: 1px solid #f0f0f0; border-radius: 10px; padding: 20px; transition: all .25s; position: relative; }
.bucket-card:hover { border-color: #91d5ff; box-shadow: 0 4px 16px rgba(24,144,255,.12); transform: translateY(-2px); }
.bucket-card .bc-name { font-size: 15px; font-weight: 600; color: rgba(0,0,0,.85); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.bucket-card .bc-name i { color: #1890ff; font-size: 16px; }
.bucket-card .bc-info { font-size: 12px; color: rgba(0,0,0,.45); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.bucket-card .bc-info span { color: rgba(0,0,0,.65); }
.bucket-card .bc-actions { position: absolute; top: 12px; right: 12px; display: flex; gap: 4px; opacity: 0; transition: opacity .2s; }
.bucket-card:hover .bc-actions { opacity: 1; }
.bucket-card .bc-actions button { width: 28px; height: 28px; border: none; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 12px; transition: all .2s; }
.bucket-card .bc-actions .bc-edit { background: #e6f7ff; color: #1890ff; }
.bucket-card .bc-actions .bc-edit:hover { background: #1890ff; color: #fff; }
.bucket-card .bc-actions .bc-del { background: #fff1f0; color: #ff4d4f; }
.bucket-card .bc-actions .bc-del:hover { background: #ff4d4f; color: #fff; }
.bucket-card .bc-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.bucket-card .bc-badge.ssl { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.bucket-card .bc-badge.no-ssl { background: #fff7e6; color: #fa8c16; border: 1px solid #ffd591; }
.bucket-add-card { border: 2px dashed #d9d9d9; border-radius: 10px; padding: 32px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: all .25s; color: #999; min-height: 140px; }
.bucket-add-card:hover { border-color: #1890ff; color: #1890ff; background: #f0f7ff; transform: translateY(-2px); }
.bucket-add-card i { font-size: 28px; margin-bottom: 8px; }
.bucket-add-card span { font-size: 13px; font-weight: 500; }

/* ========== Client Gen Buttons ========== */
.gen-btn { padding: 12px 36px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all .25s; display: inline-flex; align-items: center; gap: 8px; }
.gen-btn:disabled { opacity: .6; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.gen-btn-primary { background: linear-gradient(135deg,#1890ff 0%,#096dd9 100%); color: #fff; box-shadow: 0 4px 14px rgba(24,144,255,.35); }
.gen-btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(24,144,255,.45); }
.gen-btn-primary:active:not(:disabled) { transform: translateY(0); box-shadow: 0 2px 8px rgba(24,144,255,.25); }
.gen-btn-secondary { background: #fff; color: #1890ff; border: 1.5px solid #1890ff; box-shadow: 0 2px 8px rgba(24,144,255,.12); }
.gen-btn-secondary:hover:not(:disabled) { background: #f0f7ff; transform: translateY(-2px); box-shadow: 0 4px 14px rgba(24,144,255,.2); }
.gen-btn-secondary:active:not(:disabled) { transform: translateY(0); }
@keyframes gen-pulse { 0%,100%{box-shadow:0 4px 14px rgba(24,144,255,.35)} 50%{box-shadow:0 4px 24px rgba(24,144,255,.55)} }
.gen-btn-loading { animation: gen-pulse 1.5s ease-in-out infinite; }

/* ========== Symlink indicator ========== */
.symlink-target { font-size: 11px; color: #1890ff; margin-left: 6px; font-style: italic; }
.symlink-icon { color: #722ed1; margin-right: 6px; font-size: 12px; }

/* Settings sections */
.settings-section { background:#fff; border:1px solid #f0f0f0; border-radius:8px; padding:20px; margin-bottom:16px; }
.section-title { font-size:15px; font-weight:600; color:#1d2129; margin-bottom:16px; display:flex; align-items:center; gap:8px; }
.section-title i { color:#1890ff; }

/* Toggle switch */
.toggle-switch { display:inline-block; width:32px; height:18px; border-radius:9px; background:#d9d9d9; cursor:pointer; position:relative; transition:background .2s; vertical-align:middle; margin-right:6px; }
.toggle-switch.on { background:#52c41a; }
.toggle-dot { position:absolute; top:2px; left:2px; width:14px; height:14px; border-radius:50%; background:#fff; transition:left .2s; box-shadow:0 1px 2px rgba(0,0,0,.2); }
.toggle-switch.on .toggle-dot { left:16px; }

@keyframes fadeUp { 0%{opacity:1;transform:translateY(0)} 100%{opacity:0;transform:translateY(-12px)} }

/* ========== antd Animation Override (low-perf optimization) ========== */
.ant-modal, .ant-modal-mask, .ant-modal-wrap,
.ant-dropdown, .ant-select-dropdown, .ant-tooltip,
.ant-notification, .ant-message,
.ant-modal .ant-zoom-enter, .ant-modal .ant-zoom-leave,
.ant-modal-mask .ant-fade-enter, .ant-modal-mask .ant-fade-leave {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
}

/* ========== VS Table (lightweight data table) ========== */
.vs-table { width: 100%; border-collapse: collapse; }
.vs-table th { padding: 8px 12px; background: #fafafa; border-bottom: 2px solid #f0f0f0; text-align: left; font-weight: 500; font-size: 13px; color: rgba(0,0,0,.85); position: sticky; top: 0; z-index: 1; }
.vs-table td { padding: 8px 12px; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.vs-table tr:hover td { background: #e6f7ff; }
.vs-table .vs-checkbox { width: 16px; height: 16px; cursor: pointer; accent-color: #1890ff; }
.client-table-wrap { overflow-x: auto; overflow-y: visible; }
.client-table-wrap .vs-table { min-width: 1400px; }
.client-table-wrap .vs-table th,
.client-table-wrap .vs-table td { white-space: nowrap; }

/* ========== Page Container ========== */
.vs-page { padding: 16px; display: flex; flex-direction: column; gap: 12px; height: 100%; min-height: 0; }
.vs-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vs-card { border: 1px solid #e8e8e8; border-radius: 8px; padding: 16px; background: #fff; }

/* Responsive */
@media (max-width:1200px) { .dashboard-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width:768px) { .dashboard-grid, .info-grid { grid-template-columns: 1fr; } .top-nav .nav-menu { display: none; } }

/* ========== Upload Modal ========== */
.upload-tabs { display:flex; border-bottom:1px solid #f0f0f0; padding:0 20px; background:#fafafa; }
.upload-tab { padding:10px 16px; font-size:13px; color:#666; cursor:pointer; border-bottom:2px solid transparent; display:flex; align-items:center; gap:6px; transition:all .2s; user-select:none; }
.upload-tab:hover { color:#1890ff; }
.upload-tab.active { color:#1890ff; border-bottom-color:#1890ff; font-weight:500; }
.upload-tab-badge { min-width:16px; height:16px; line-height:16px; border-radius:8px; background:#ff4d4f; color:#fff; font-size:10px; text-align:center; padding:0 4px; display:inline-block; }
.upload-dropzone { border:2px dashed #d9d9d9; border-radius:8px; padding:40px 20px; text-align:center; cursor:pointer; transition:all .2s; }
.upload-dropzone:hover { border-color:#1890ff; background:#f0f7ff; }
.upload-dropzone.dragover { border-color:#1890ff; background:#e6f7ff; border-style:solid; }
.upload-queue-item { display:flex; align-items:center; padding:8px 12px; background:#fafafa; border-radius:6px; margin-bottom:6px; font-size:13px; position:relative; }
.upload-queue-info { display:flex; align-items:center; flex:1; min-width:0; gap:8px; }
.upload-queue-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:rgba(0,0,0,.85); max-width:200px; }
.upload-queue-size { color:#999; font-size:12px; flex-shrink:0; }
.upload-queue-path { color:#aaa; font-size:11px; margin-left:auto; margin-right:28px; flex-shrink:0; max-width:40%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; direction:rtl; text-align:left; }
.upload-queue-remove { position:absolute; right:8px; top:50%; transform:translateY(-50%); width:20px; height:20px; display:flex; align-items:center; justify-content:center; border-radius:50%; cursor:pointer; color:#999; font-size:12px; transition:all .15s; }
.upload-queue-remove:hover { background:#fff1f0; color:#ff4d4f; }

/* ========== Group Tags ========== */
.group-tag { display:inline-block; padding:1px 6px; border-radius:3px; font-size:11px; font-weight:500; margin-right:4px; margin-bottom:2px; white-space:nowrap; }

/* ========== User Dropdown Menu ========== */
.user-dropdown { position:absolute; right:0; top:calc(100% + 4px); background:#fff; border-radius:6px; box-shadow:0 6px 20px rgba(0,0,0,.15); min-width:160px; padding:4px 0; z-index:100; animation:ctx-in .12s ease; }
.dropdown-item { display:flex; align-items:center; gap:10px; padding:9px 16px; font-size:13px; color:rgba(0,0,0,.85); cursor:pointer; transition:background .1s; }
.dropdown-item:hover { background:#f5f5f5; }
.dropdown-item i { width:16px; text-align:center; color:#666; font-size:13px; }
