/* ==========================================================================
   多网盘资源监控与自动转存 —— 全局样式
   ========================================================================== */

:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --sidebar: #1d2430;
  --sidebar-hover: #2a3342;
  --sidebar-text: #b7c1cf;
  --sidebar-text-strong: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e8ee;
  --accent: #3b74f2;
  --accent-dark: #2f5fd0;
  --green: #10b981;
  --red: #ef4444;
  --yellow: #f59e0b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 12px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.modal-open { overflow: hidden; }

h1, h2, h3 { margin: 0; font-weight: 600; }
h3 { font-size: 15px; margin-bottom: 12px; }
p { margin: 0 0 8px; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.grow { flex: 1 1 220px; min-width: 0; }

/* ============================ 通用控件 ============================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
  white-space: nowrap;
}
.btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.danger { color: var(--red); border-color: #fbd5d5; }
.btn.danger:hover { background: #fef2f2; border-color: #f7b4b4; }
.btn.small { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.block { width: 100%; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover { background: #f8fafc; color: var(--text); }

.ico {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

input[type="text"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 116, 242, .12);
}
input:disabled, input[readonly] { background: #f8fafc; color: var(--muted); }
textarea { resize: vertical; min-height: 68px; }

.field { display: block; margin-bottom: 12px; }
.field > span:first-child {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.input-row { display: flex; align-items: center; gap: 8px; }
.input-row > input { flex: 1 1 auto; min-width: 0; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 14px;
}
.form-grid .field.wide { grid-column: 1 / -1; }

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
}
.check-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.hint { font-size: 12px; color: var(--muted); }

.form-error {
  min-height: 0;
  color: var(--red);
  font-size: 12.5px;
  word-break: break-all;
}
.form-error:not(:empty) { margin-bottom: 10px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.toolbar.wrap { flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.page-status { margin: 0 0 12px 4px; font-size: 12.5px; }

/* 徽标 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #4b5563;
  font-size: 11.5px;
  line-height: 1.7;
  white-space: nowrap;
}
.badge.ok { background: #e7f7f0; color: #0b7a58; }
.badge.warn { background: #fef4e2; color: #a2640a; }
.badge.err { background: #fdeaea; color: #b42318; }
.badge.pinned { background: #eef3ff; color: #2f5fd0; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; flex: 0 0 auto; }
.dot.ok { background: var(--green); }
.dot.warn { background: var(--yellow); }
.dot.err { background: var(--red); }

.notice {
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  border: 1px solid transparent;
}
.notice.warn { background: #fff8e8; border-color: #f6dfae; color: #8a5a08; }

/* ============================ 登录页 ============================ */

.login-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: linear-gradient(160deg, #1d2430 0%, #303c4f 100%);
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(12, 20, 33, .35);
  padding: 28px;
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.login-brand h1 { font-size: 18px; }
.login-brand p { margin: 2px 0 0; font-size: 12.5px; }
.login-mark, .nav-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  flex: 0 0 auto;
}

/* ============================ 应用框架 ============================ */

.app-view { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 224px;
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  color: var(--sidebar-text);
  z-index: 30;
  transition: transform .22s ease;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  color: var(--sidebar-text-strong);
  font-weight: 600;
  font-size: 14px;
}
.nav { flex: 1 1 auto; padding: 6px 10px; overflow-y: auto; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 4px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--sidebar-hover); color: var(--sidebar-text-strong); }
.nav-item.active { background: var(--accent); color: #fff; }
.nav-item.ghost { justify-content: center; font-size: 12.5px; }
.sidebar-foot {
  padding: 12px 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.sidebar-version { font-size: 11.5px; color: #7d8898; margin-bottom: 8px; }

.sidebar-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 25;
}

.main {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 224px;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(244, 246, 249, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.menu-btn { display: none; }
.page-title { font-size: 16px; }
.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.health { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.health-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9ca3af;
  box-shadow: 0 0 0 3px rgba(156, 163, 175, .18);
}
.health-dot.ok { background: var(--green); box-shadow: 0 0 0 3px rgba(16, 185, 129, .18); }
.health-dot.err { background: var(--red); box-shadow: 0 0 0 3px rgba(239, 68, 68, .18); }

.content { padding: 18px 20px 40px; flex: 1 1 auto; min-width: 0; }

/* ============================ 运行概览 ============================ */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.stat-card { display: flex; align-items: center; gap: 14px; margin-bottom: 0; padding: 16px; }
.stat-info { min-width: 0; }
.stat-value { font-size: 22px; font-weight: 600; line-height: 1.25; }
.stat-label { font-size: 12.5px; color: var(--muted); }

.ring-wrap { position: relative; width: 62px; height: 62px; flex: 0 0 auto; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3.4; }
.ring-bg { stroke: #e8ecf3; }
.ring-fg {
  stroke: var(--green);
  stroke-linecap: round;
  transition: stroke-dasharray .45s ease;
}
.ring-fg.err { stroke: var(--red); }
.ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

.next-card { display: block; }
.next-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.next-head h3 { margin-bottom: 0; }
.next-count { font-size: 20px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.next-card .muted { margin-top: 6px; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.grid-2 .card { margin-bottom: 0; }

.mini-list { display: flex; flex-direction: column; gap: 10px; max-height: 380px; overflow-y: auto; }
.mini-row { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.mini-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mini-name { font-weight: 600; font-size: 13px; }
.mini-msg { font-size: 12.5px; margin-top: 2px; word-break: break-all; }
.mini-meta { font-size: 12px; margin-top: 2px; }
.mini-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ============================ 影视探索 ============================ */

.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.poster-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.poster-thumb { position: relative; aspect-ratio: 2 / 3; background: #e9edf4; }
.poster-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-noimg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9aa4b2;
  font-size: 12.5px;
  background: repeating-linear-gradient(45deg, #eef1f6, #eef1f6 10px, #e7ebf2 10px, #e7ebf2 20px);
}
.poster-score {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(17, 24, 39, .72);
  color: #ffd166;
  font-size: 11.5px;
}
.poster-info { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.poster-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poster-meta { font-size: 12px; }
.poster-overview { font-size: 12px; color: #4b5563; margin-top: 4px; }

.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 16px; }

.save-card { margin-top: 4px; }
.save-card textarea { margin-bottom: 12px; }

.result-box { margin-top: 12px; }
.result-box:empty { display: none; }
.result-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  margin-bottom: 8px;
  font-size: 12.5px;
  word-break: break-word;
}
.result-title { font-weight: 600; flex: 0 0 auto; }
.result-row .grow { flex: 1 1 auto; }
.result-errors { margin: 6px 0 0; padding-left: 18px; color: var(--red); }
.result-errors li { margin-bottom: 2px; }
.env-list { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.env-item { display: flex; gap: 8px; }
.env-key { color: var(--muted); min-width: 96px; }

/* ============================ 资源监控 / 账号 ============================ */

.card-list { display: flex; flex-direction: column; gap: 14px; }
.mon-card, .acc-card { margin-bottom: 0; }
.card-head { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.card-title { font-size: 14.5px; font-weight: 600; word-break: break-all; }
.badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.card-text {
  font-size: 12.5px;
  color: #4b5563;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-text.multiline { white-space: normal; word-break: break-all; }
.card-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 6px 0 10px; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================ 日志 ============================ */

.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab {
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f1f4f9;
  color: #4b5563;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
}
.tab:hover { background: #e7ecf4; }
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.log-list { display: flex; flex-direction: column; }
.log-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  flex-wrap: wrap;
}
.log-row:last-child { border-bottom: none; }
.log-time { color: var(--muted); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.log-cat { color: var(--muted); flex: 0 0 auto; }
.log-msg { flex: 1 1 220px; min-width: 0; word-break: break-word; }
.log-details { flex: 1 1 100%; color: var(--muted); font-size: 12px; word-break: break-all; }

/* ============================ 弹窗 ============================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
  overflow-y: auto;
  z-index: 60;
}
.modal-box {
  width: 100%;
  max-width: 720px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(12, 20, 33, .3);
  animation: modal-in .16s ease;
}
.modal-box.narrow { max-width: 460px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin-bottom: 0; flex: 1 1 auto; }
.modal-body { padding: 18px; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg-btn {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.seg-btn:hover { background: #f8fafc; }
.seg-btn.active { border-color: var(--accent); background: #eef3ff; color: var(--accent-dark); font-weight: 600; }

.auth-tabs { display: flex; gap: 4px; margin: 16px 0 14px; border-bottom: 1px solid var(--line); }
.auth-tab {
  padding: 8px 12px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.auth-tab.active { color: var(--accent-dark); border-bottom-color: var(--accent); font-weight: 600; }

.qr-box { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 0; }
.qr-frame {
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fbfcfe;
  padding: 8px;
}
.qr-img { width: 100%; height: 100%; object-fit: contain; }
.qr-status { font-size: 13px; }

/* 目录浏览 */
.dir-browser { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.dir-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}
.dir-path { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-list { max-height: 300px; overflow-y: auto; }
.dir-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.dir-row:last-child { border-bottom: none; }
.dir-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-fid { font-size: 11.5px; flex: 0 0 auto; }
.dir-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.dir-foot {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
  flex-wrap: wrap;
}

/* 分享预览 */
.preview-area { margin-top: 14px; }
.preview-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.preview-list {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.prev-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.prev-row:last-child { border-bottom: none; }
.prev-row input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); flex: 0 0 auto; }
.prev-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prev-size { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.dir-tag {
  flex: 0 0 auto;
  width: 15px;
  text-align: center;
  font-size: 10.5px;
  color: #a2640a;
}
.preview-foot { display: flex; justify-content: flex-end; margin-top: 10px; }

.weekdays { display: flex; gap: 10px; flex-wrap: wrap; }
.wd { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.wd input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); }

.selected-hint { font-size: 12px; color: var(--accent-dark); margin-top: 6px; }

/* ============================ Toast ============================ */

.toast-wrap {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 90;
  pointer-events: none;
}
.toast {
  max-width: 320px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  border-left: 4px solid var(--green);
  box-shadow: 0 10px 30px rgba(12, 20, 33, .18);
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
  animation: toast-in .18s ease;
  opacity: 1;
  transition: opacity .3s ease;
}
.toast.err { border-left-color: var(--red); }
.toast.out { opacity: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

/* ============================ 移动端 ============================ */

@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .sidebar.open { transform: none; }
  .sidebar-mask.show { display: block; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 10px 14px; }
  .content { padding: 14px 14px 32px; }
  .page-title { font-size: 15px; }
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .poster-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
  .modal-overlay { padding: 16px 12px; }
  .toolbar { flex-wrap: wrap; }
  .badges { margin-left: 0; width: 100%; }
}

/* ---------- 资源搜索结果 ---------- */
.search-list { display: flex; flex-direction: column; gap: 12px; }
.search-card { padding: 14px 16px; }
.search-title { font-weight: 600; font-size: 15px; margin-bottom: 4px; word-break: break-all; }
.search-meta { font-size: 12px; margin-bottom: 8px; }
.search-links { display: flex; flex-direction: column; gap: 6px; }
.search-link { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-url { flex: 1; min-width: 200px; font-size: 12px; color: #4b5563; word-break: break-all; }
.search-link .badge { display: inline-block; padding: 1px 8px; border-radius: 10px; background: #eef2ff; color: #3730a3; font-size: 12px; }

/* ---------- 多网盘链接选择 ---------- */
.multi-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.multi-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid #f1f3f5; }
.multi-row select { max-width: 160px; }
.multi-url { flex: 1; min-width: 180px; font-size: 12px; color: #6b7280; word-break: break-all; }

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: #e6ebf2;
  overflow: hidden;
  margin: 10px 0 6px;
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4a7cf7, #52c7a4);
  transition: width .35s ease;
}
.small-text { font-size: 12px; }

.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.poster-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px;
  background: var(--card);
  overflow: hidden;
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.poster-card:hover,
.poster-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
  outline: none;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  background: #f1f5f9;
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.poster-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  font-size: 12px;
}

.poster-score {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 11px;
  line-height: 1.6;
}

.poster-title {
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.poster-meta {
  padding: 0 8px 8px;
  font-size: 11px;
  color: var(--muted);
}

.poster-frame.poster-failed::after {
  content: "海报加载失败";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}

.explore-progress { margin: 14px 0 4px; }
.explore-progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.explore-progress-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #6ea0ff);
  transition: width 0.35s ease;
}
.explore-progress-text {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
}

.filter-chip {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-chip:hover { border-color: var(--accent); color: var(--accent); }

.filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.filter-chip .count {
  opacity: 0.7;
  margin-left: 4px;
  font-size: 12px;
}

.pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  color: var(--text);
}

.pick-row:hover { border-color: var(--accent); }

.pick-kind {
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--accent);
  font-size: 12px;
}

.pick-name { flex: 1; font-weight: 600; }

.source-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 2px;
  font-size: 13px;
}

.source-switch button {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

.source-switch button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.save-dir-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 2px;
}
.save-dir-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line, #2a2f3a);
  border-radius: 10px;
  background: var(--panel-2, rgba(255, 255, 255, 0.02));
}
.save-dir-row .save-dir-name {
  flex: 0 0 84px;
  font-size: 13px;
  opacity: 0.75;
}
.save-dir-row .save-dir-value {
  flex: 1 1 auto;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.save-dir-row .btn {
  flex: 0 0 auto;
  padding: 4px 10px;
  font-size: 12px;
}

.mon-progress {
  margin: 8px 0 4px;
}
.mon-progress-bar {
  height: 6px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--line, rgba(127,127,127,.25));
}
.mon-progress-fill {
  height: 100%;
  background: var(--accent, #4c8bf5);
  transition: width .4s ease;
}
.mon-progress-text {
  margin-top: 4px;
  font-size: 12px;
  opacity: .8;
}

.mon-group {
  margin-bottom: 18px;
}
.mon-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  margin: 6px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line, rgba(127,127,127,.28));
}
.mon-group-title .count {
  font-size: 12px;
  font-weight: 500;
  opacity: .65;
}

.strm-dir-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line, rgba(127,127,127,.2));
  font-size: 14px;
}
.strm-dir-row input { flex: 0 0 auto; }
.strm-dir-row .strm-dir-name {
  flex: 1 1 auto;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.strm-dir-hint {
  font-size: 12px;
  opacity: .65;
  margin-bottom: 8px;
}

.strm-dir-inline {
  margin: 10px 0 6px;
  padding: 10px 12px;
  border: 1px solid var(--line, rgba(127,127,127,.28));
  border-radius: 10px;
  background: rgba(255,255,255,.04);
}
.strm-crumb-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 8px;
  font-size: 13px;
  opacity: .85;
}
#local-strm-list .pick-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: none;
  border-top: 1px solid var(--line, rgba(127,127,127,.2));
  background: transparent;
  font-size: 14px;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.strm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-top: 1px solid var(--line, rgba(127,127,127,.22));
}
.strm-row:first-child { border-top: none; }
.strm-row .pick-row {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  text-align: left;
  padding: 4px 0;
}
.strm-row .pick-row .muted { margin-left: 8px; white-space: nowrap; }
.strm-row input[type="checkbox"] {
  flex: 0 0 auto;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border: 1.5px solid rgba(60,70,90,.4);
  border-radius: 4px;
  background: #fff;
  position: relative;
  cursor: pointer;
  align-self: center;
}
.strm-row input[type="checkbox"]:checked {
  background: var(--accent, #3f7ef2);
  border-color: var(--accent, #3f7ef2);
}
.strm-row input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 1.5px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.strm-row-file .pick-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.strm-row.strm-row-file { padding: 6px 10px; }

.strm-newdir-row { display: flex; gap: 8px; padding: 10px; align-items: center; }
.strm-newdir-row input[type="text"] { flex: 1 1 auto; min-width: 0; }
.strm-newdir-row .btn { flex: 0 0 auto; }

.notif-count {
  display: inline-block;
  margin-left: 6px;
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 9px;
  background: #e5484d;
  color: #fff;
  font-size: 11px;
  line-height: 15px;
  text-align: center;
}
.notif-count:empty { display: none; }
.notif-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid rgba(127,127,127,.2);
  font-size: 13px;
}
.notif-row:first-child { border-top: none; }
.notif-row .log-time { flex: 0 0 auto; color: rgba(127,127,127,.8); font-size: 12px; }
.notif-row .log-msg { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* TMDB 手动匹配搜索结果海报 */
.search-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.search-poster {
  width: 56px;
  min-width: 56px;
  border-radius: 6px;
  object-fit: cover;
  aspect-ratio: 2 / 3;
  background: #eef1f5;
}
.search-poster-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #98a2b3;
  font-size: 11px;
}

.search-match-row {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.source-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 10px;
  background: #e8f0fe;
  color: #1a56db;
}
