/* ============ 工具内部通用组件样式 ============ */
.tool-section { margin-bottom: 22px; }
.tool-label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.tool-hint { font-size: 12px; color: var(--ink-3); margin-top: 6px; line-height: 1.6; }

/* 上传拖拽区 */
.drop-zone {
  border: 2px dashed #cfd7ea; border-radius: 14px; padding: 34px 20px; text-align: center;
  background: #fafbff; cursor: pointer; transition: .2s; color: var(--ink-2);
}
.drop-zone:hover, .drop-zone.dragover { border-color: var(--primary); background: rgba(79,110,247,.05); color: var(--primary); }
.drop-zone .dz-icon { font-size: 38px; display: block; margin-bottom: 8px; }
.drop-zone .dz-title { font-weight: 700; font-size: 15px; }
.drop-zone .dz-sub { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.drop-zone input { display: none; }

/* 工具行布局 */
.tool-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.tool-col { flex: 1; min-width: 220px; }
.tool-col.narrow { flex: 0 0 260px; }

/* 表单控件 */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; color: var(--ink-2); }
.field input[type="text"], .field input[type="number"], .field input[type="password"],
.field select, .field textarea, .tool-input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); outline: none; transition: .2s;
}
.field textarea { min-height: 150px; resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,110,247,.10); }
input[type="range"] { width: 100%; accent-color: var(--primary); }
input[type="color"] { width: 46px; height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 2px; background: #fff; cursor: pointer; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; margin-right: 14px; }

/* 按钮 */
.btn-sm {
  padding: 9px 16px; border-radius: 9px; border: 0; font-weight: 700; font-size: 13px;
  cursor: pointer; transition: .2s; background: var(--primary); color: #fff;
}
.btn-sm:hover { background: var(--primary-dark); }
.btn-sm:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm.secondary { background: #eef1f8; color: var(--ink); }
.btn-sm.secondary:hover { background: #e2e7f2; }
.btn-sm.danger { background: #ffe5e5; color: #d33; }
.btn-sm.danger:hover { background: #ffd0d0; }
.btn-group { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* 预览区 */
.preview-box {
  border: 1px solid var(--line); border-radius: 12px; background:
    linear-gradient(45deg,#f0f2f7 25%,transparent 25%,transparent 75%,#f0f2f7 75%),
    linear-gradient(45deg,#f0f2f7 25%,transparent 25%,transparent 75%,#f0f2f7 75%);
  background-size: 20px 20px; background-position: 0 0, 10px 10px;
  min-height: 180px; display: grid; place-items: center; overflow: auto; padding: 12px;
}
.preview-box img { max-width: 100%; max-height: 360px; border-radius: 6px; }
.preview-placeholder { color: var(--ink-3); font-size: 13px; text-align: center; }

/* 结果信息条 */
.result-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: rgba(79,110,247,.06); border: 1px solid rgba(79,110,247,.15);
  border-radius: 12px; padding: 14px 16px; margin-top: 16px; font-size: 13px;
}
.result-bar b { color: var(--primary); font-size: 16px; }
.result-bar .save { color: #16a34a; font-weight: 700; }

/* 文件列表 */
.file-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.file-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 13px; background: #fff;
}
.file-item .fname { flex: 1; word-break: break-all; font-weight: 600; }
.file-item .fremove { border: 0; background: none; color: #e33; cursor: pointer; font-size: 16px; }
.file-item .fupdown { display: flex; flex-direction: column; }
.file-item .fupdown button { border: 0; background: none; cursor: pointer; color: var(--ink-3); line-height: 1; font-size: 12px; }

/* 提示信息 */
.info-note {
  background: rgba(34,195,198,.07); border-left: 3px solid var(--accent);
  padding: 12px 14px; border-radius: 0 10px 10px 0; font-size: 13px; color: var(--ink-2); line-height: 1.7;
}
.warn-note { background: #fff7e6; border-left-color: #f5a623; }

/* 横向标签按钮组 */
.pill-group { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-size: 13px; cursor: pointer; transition: .2s; color: var(--ink-2);
}
.pill:hover { border-color: var(--primary); }
.pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 终端容器（SSH） */
.terminal-box { height: 380px; border-radius: 12px; overflow: hidden; background: #0d1117; padding: 10px; }
.term-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.xterm .xterm-viewport { border-radius: 8px; }

/* WebADB 说明卡 */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 12px; margin: 14px 0; }
.feature-item { background: #f8faff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-size: 13px; }
.feature-item .fi-icon { font-size: 22px; }
.feature-item b { display: block; margin: 6px 0 3px; }

@media (max-width: 760px) {
  .tool-col.narrow { flex: 1 1 100%; }
  .result-bar { font-size: 12px; }
}
