/* ObjDock v2 — polished UI. Clean light theme, no frameworks. */
:root {
  --bg: #f3f5fa;
  --card: #ffffff;
  --line: #e8ecf3;
  --text: #1e293b;
  --muted: #8a94a6;
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-soft: #eff6ff;
  --danger: #ef4444;
  --danger-soft: #fef2f2;
  --green: #10b981;
  --amber: #f59e0b;
  --purple: #8b5cf6;
  --radius: 14px;
  --shadow: 0 1px 4px rgba(15, 23, 42, .06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, .14);
}
/* 深色模式 */
[data-theme="dark"] {
  --bg: #0f172a;
  --card: #1e293b;
  --line: #334155;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --primary-soft: #1e3a5f;
  --danger-soft: #3f1d1d;
  --shadow: 0 1px 4px rgba(0, 0, 0, .3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .4);
}
[data-theme="dark"] .input, [data-theme="dark"] select.input {
  background: #0f172a; border-color: #334155; color: #f1f5f9;
}
[data-theme="dark"] .btn { background: #334155; color: #f1f5f9; }
[data-theme="dark"] .btn-primary { background: var(--primary); color: #fff; }
[data-theme="dark"] img { opacity: .92; }
[data-theme="dark"] .nav-item { color: #cbd5e1; }
[data-theme="dark"] .nav-item.active { background: #1e3a5f; color: #fff; }
[data-theme="dark"] .sname { color: #f1f5f9; }
[data-theme="dark"] .ssub { color: #94a3b8; }
[data-theme="dark"] #ctxMenu { background: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .ctx-it { color: #f1f5f9; }
[data-theme="dark"] .ctx-it:hover { background: #334155 !important; }
[data-theme="dark"] .fitem, [data-theme="dark"] .frow { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .fname, [data-theme="dark"] .fitem .fn { color: #f1f5f9; }
[data-theme="dark"] .dropdown { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .di { color: #f1f5f9; }
[data-theme="dark"] .di:hover { background: #334155; }
[data-theme="dark"] .modal { background: #1e293b; color: #f1f5f9; }
[data-theme="dark"] .fld span { color: #cbd5e1; }
[data-theme="dark"] .folder-name { color: #e2e8f0; }
[data-theme="dark"] .bucket-name { color: #f1f5f9; }
[data-theme="dark"] .ctx-it { color: #f1f5f9 !important; }
[data-theme="dark"] .ctx-it:hover { background: #334155 !important; color: #fff !important; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.muted { color: var(--muted); font-size: 13px; }
button { font-family: inherit; }

/* ================= 按钮 ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; cursor: pointer; font-size: 13.5px; font-weight: 500;
  padding: 9px 16px; border-radius: 10px;
  background: #eef2f7; color: #334155;
  transition: background-color .15s ease, transform .08s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { background: #e2e8f0; }
.btn:active { transform: scale(.96); }
.btn .ic-svg { width: 16px; height: 16px; }
.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .3);
}
.btn-primary:hover { background: linear-gradient(135deg, #2563eb, #1d4ed8); box-shadow: 0 4px 12px rgba(37, 99, 235, .4); }
.btn-danger { background: var(--danger-soft); color: #dc2626; }
.btn-danger:hover { background: #fee2e2; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn.active { background: #dbeafe; color: var(--primary-dark); font-weight: 600; }

/* 图标按钮：无边框，悬停才有底色 */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: none; border-radius: 9px;
  background: transparent; color: #64748b; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .08s ease;
}
.icon-btn:hover { background: #eef2ff; color: var(--primary-dark); }
.icon-btn:active { transform: scale(.88); }
.icon-btn.danger:hover { background: var(--danger-soft); color: #dc2626; }
.icon-btn .ic-svg { width: 17px; height: 17px; }

/* ================= 输入框 ================= */
.input, select.input, textarea.input {
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  padding: 10px 14px; font-size: 14px; color: var(--text); font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
  outline: none;
}
.input:focus, select.input:focus, textarea.input:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
}
.input::placeholder { color: #b6bdc9; }
.input-sm { padding: 7px 11px; font-size: 13px; border-radius: 9px; width: auto; }
select.input-sm { cursor: pointer; }

/* ================= 登录/注册 ================= */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #dbeafe 0%, #ede9fe 60%, #fce7f3 100%);
}
.auth-card {
  background: var(--card); border-radius: 20px; padding: 40px; width: 400px;
  box-shadow: var(--shadow-lg); animation: pop .3s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.auth-card .logo { text-align: center; color: var(--primary); }
.auth-card .logo .ic-svg { width: 44px; height: 44px; }
.auth-card h1 { text-align: center; font-size: 24px; margin: 10px 0 4px; letter-spacing: 1px; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 24px; font-size: 13px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; background: #f1f5f9; padding: 4px; border-radius: 12px; }
.auth-tabs button {
  flex: 1; padding: 9px; border: none; background: transparent; color: var(--muted);
  border-radius: 9px; cursor: pointer; font-size: 14px; font-weight: 500;
  transition: all .15s ease;
}
.auth-tabs button.active { background: #fff; color: var(--primary-dark); font-weight: 600; box-shadow: var(--shadow); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: #475569; }
.field .input { width: 100%; }
.fld { display: block; margin-bottom: 15px; }
.fld > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: #334155; }
.fld .input { width: 100%; }
.fld .hint { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.5; }

/* ================= 布局 ================= */
.layout { display: flex; height: 100vh; }
.sidebar {
  width: 250px; background: var(--card); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 14px; flex-shrink: 0;
}
/* 顶部品牌 */
.brand {
  display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px;
  border-bottom: 1px solid var(--line); margin-bottom: 14px;
}
.brand .logo-ic {
  width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(59, 130, 246, .35);
}
.brand .logo-ic .ic-svg { width: 22px; height: 22px; }
.brand .t { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.brand .s { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
/* 导航 */
.nav-item {
  transition: background-color .15s ease, color .15s ease;
  display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 11px;
  cursor: pointer; color: #475569; font-size: 14px; margin-bottom: 3px; font-weight: 500;
}
.nav-item .ic-svg { width: 19px; height: 19px; }
.nav-item:hover { background: #f1f5f9; color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.nav-sec { font-size: 11px; color: var(--muted); padding: 14px 13px 7px; letter-spacing: .5px; }
.folder-item {
  display: flex; align-items: center; gap: 9px; padding: 9px 13px; border-radius: 9px;
  cursor: pointer; font-size: 13px; color: #475569;
  transition: background-color .12s ease;
}
.folder-item:hover { background: #f1f5f9; }
.folder-item .ic-svg { width: 16px; height: 16px; color: #94a3b8; }
/* 侧边栏底部：存储切换 + 用户 */
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.storage-switch {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border-radius: 12px; cursor: pointer; background: #f8fafc; border: 1px solid var(--line);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.storage-switch:hover { border-color: #bfdbfe; box-shadow: 0 2px 8px rgba(59, 130, 246, .1); }
.storage-switch .avatar {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff; display: flex; align-items: center; justify-content: center;
}
.storage-switch .avatar .ic-svg { width: 20px; height: 20px; }
.storage-switch .sname { font-weight: 600; font-size: 13px; }
.storage-switch .ssub { font-size: 11px; color: var(--muted); }
.acct-card {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px;
  cursor: pointer; transition: background-color .12s ease;
}
.acct-card:hover { background: #f8fafc; }
.acct-card .avatar {
  width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #64748b, #334155);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}
.acct-card .sname { font-weight: 600; font-size: 13px; }
.acct-card .ssub { font-size: 11px; color: var(--muted); }
.main { flex: 1; overflow-y: auto; padding: 24px 28px; min-width: 0; }

/* 顶部栏 */
.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.topbar h2 { margin: 0; font-size: 19px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.topbar h2 .ic-svg { width: 22px; height: 22px; color: var(--primary); }
.topbar .spacer { flex: 1; }
.view-toggle { display: flex; background: #eef2f7; border-radius: 11px; padding: 3px; gap: 2px; }
.view-toggle button {
  border: none; background: transparent; padding: 7px 13px; cursor: pointer; font-size: 13px;
  border-radius: 8px; color: #64748b; font-weight: 500; display: inline-flex; align-items: center; gap: 5px;
  transition: all .15s ease; white-space: nowrap;
}
.view-toggle button .ic-svg { width: 15px; height: 15px; }
.view-toggle button:hover { color: var(--text); }
.view-toggle button.active { background: #fff; color: var(--primary-dark); font-weight: 600; box-shadow: var(--shadow); }

/* 面包屑 */
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.crumbs .c { cursor: pointer; padding: 5px 10px; border-radius: 8px; transition: background-color .12s ease; }
.crumbs .c:hover { background: #e8eefb; color: var(--primary-dark); }
.crumbs .sep { color: #cbd5e1; }

/* 选择工具条 */
.toolbar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px 14px;
  background: var(--primary-soft); border: 1px solid #bfdbfe; border-radius: 12px;
  animation: slideDown .2s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } }
.toolbar #selCount { font-size: 13px; font-weight: 600; color: var(--primary-dark); }

/* ================= 缩略图网格 ================= */
.fgrid { display: grid; gap: 14px; }
.fgrid.sz-s { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.fgrid.sz-m { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.fgrid.sz-l { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.fitem {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .12s ease;
}
.fitem:hover { border-color: #bfdbfe; box-shadow: 0 6px 18px rgba(37, 99, 235, .1); transform: translateY(-2px); }
.fitem:active { transform: translateY(0) scale(.99); }
.fitem.sel { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(59, 130, 246, .3); }
.fitem .check {
  position: absolute; top: 10px; left: 10px; width: 20px; height: 20px; z-index: 2;
  accent-color: var(--primary); cursor: pointer; margin: 0;
  opacity: 0; transform: scale(.7); transition: opacity .15s ease, transform .15s ease;
  pointer-events: none;
}
.fgrid.selecting .fitem .check { opacity: 1; transform: scale(1); pointer-events: auto; }
.fitem .fic {
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%); overflow: hidden;
}
.fitem .fic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fitem .fic .ic-svg { width: 44px; height: 44px; color: #94a3b8; }
.fitem.folder-card .fic { background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); }
.fitem.folder-card .fic .ic-svg { width: 54px; height: 54px; color: #2563eb; }
.fgrid.sz-s .fitem.folder-card .fic .ic-svg { width: 38px; height: 38px; }
.fgrid.sz-l .fitem.folder-card .fic .ic-svg { width: 70px; height: 70px; }
.fitem .fmeta, .fitem .fsub { padding: 10px 13px 12px; }
.fitem .fn { font-size: 13px; font-weight: 500; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fitem .fs { font-size: 11.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ================= 列表视图（重写） ================= */
.ftable-wrap {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; border: 1px solid var(--line);
}
table.ftable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ftable thead th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .3px;
  padding: 12px 16px; background: #f8fafc; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ftable tbody td { padding: 13px 16px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.ftable tbody tr:last-child td { border-bottom: none; }
.ftable tbody tr { transition: background-color .12s ease; }
.ftable tbody tr:hover { background: #f8fafc; }
.ftable .fname { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ftable .fname .fic-sm {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #f1f5f9; color: #94a3b8; overflow: hidden;
}
.ftable .fname .fic-sm .ic-svg { width: 19px; height: 19px; }
.ftable .fname .fic-sm img { width: 100%; height: 100%; object-fit: cover; }
.ftable .fname .fic-sm.folder { background: var(--primary-soft); color: var(--primary); }
.ftable .fname .nm { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.ftable .fname.clickable { cursor: pointer; }
.ftable .fname.clickable:hover .nm { color: var(--primary-dark); }
.ftable .fsize { color: #475569; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ftable .ftime { color: var(--muted); white-space: nowrap; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ftable .row-actions { display: flex; gap: 2px; justify-content: flex-end; opacity: .55; transition: opacity .15s ease; }
.ftable tbody tr:hover .row-actions { opacity: 1; }
.ftable .check-cell { width: 40px; }
.ftable input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; margin: 0; vertical-align: middle; }

/* ================= 仪表盘 ================= */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat {
  background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  display: flex; gap: 14px; align-items: center; border: 1px solid var(--line);
  transition: transform .15s ease, box-shadow .15s ease;
}
.stat:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(15, 23, 42, .08); }
.stat .ic {
  width: 48px; height: 48px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat .ic .ic-svg { width: 24px; height: 24px; }
.stat .v { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.panel { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.panel h4 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.panel .desc { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; font-size: 13px; }
.bar-row .bn { width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; font-weight: 500; }
.bar-row .bt { flex: 1; height: 10px; background: #f1f5f9; border-radius: 5px; overflow: hidden; }
.bar-row .bf { height: 100%; background: linear-gradient(90deg, #3b82f6, #8b5cf6); border-radius: 5px; transition: width .5s ease; }
.bar-row .bv { width: 90px; text-align: right; color: var(--muted); font-size: 12px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.donut-wrap { display: flex; gap: 20px; align-items: center; }
.legend { font-size: 13px; }
.legend .lr { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.legend .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
/* 活跃度：30 天柱状图 */
.activity-chart { display: flex; align-items: flex-end; gap: 4px; height: 130px; padding-top: 8px; }
.activity-chart .ab {
  flex: 1; border-radius: 4px 4px 2px 2px; background: #dbeafe; min-height: 4px;
  transition: height .4s ease, background-color .15s ease; cursor: default; position: relative;
}
.activity-chart .ab:hover { background: var(--primary); }
.activity-chart .ab .tip {
  display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: #1e293b; color: #fff; font-size: 11px; padding: 4px 8px; border-radius: 6px;
  white-space: nowrap; margin-bottom: 6px; z-index: 5;
}
.activity-chart .ab:hover .tip { display: block; }
.activity-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 8px; }
.card {
  background: var(--card); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); margin-bottom: 16px; border: 1px solid var(--line);
}
.card h3 { margin: 0 0 4px; font-size: 16px; display: flex; align-items: center; gap: 9px; font-weight: 600; }
.card h3 .ic-svg { width: 20px; height: 20px; color: var(--primary); }
.card .desc { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.trend { width: 100%; height: 120px; }

/* ================= 弹窗 ================= */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  animation: fadeIn .18s ease; padding: 20px;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  background: #fff; border-radius: 18px; padding: 28px; width: 420px; max-width: 100%;
  box-shadow: var(--shadow-lg); position: relative;
  animation: modalPop .22s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes modalPop { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.modal h3 { margin: 0 0 6px; font-size: 17px; font-weight: 650; }
.modal .muted { margin: 0 0 18px; line-height: 1.6; }
.modal .input { width: 100%; margin-bottom: 6px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal-x {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: none;
  background: #f1f5f9; font-size: 18px; line-height: 1; color: #64748b; cursor: pointer;
  border-radius: 10px; transition: all .15s ease;
  display: flex; align-items: center; justify-content: center;
}
.modal-x:hover { background: #e2e8f0; color: #334155; }
.modal-x:active { transform: scale(.9); }
/* 预览弹窗 */
.preview-modal { width: 860px; max-width: 94vw; padding: 20px; }
.preview-modal img, .preview-modal video { max-width: 100%; max-height: 70vh; border-radius: 10px; display: block; margin: 0 auto; }
.preview-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding-right: 40px; }
.preview-head .t { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 服务商选择 */
.prov-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.prov-card {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 13px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--card);
  transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.prov-card:hover { border-color: #bfdbfe; box-shadow: 0 4px 12px rgba(59, 130, 246, .1); transform: translateY(-1px); }
.prov-card:active { transform: scale(.98); }
.prov-card .pn { font-weight: 600; font-size: 14px; }
.prov-card .pd { font-size: 12px; color: var(--muted); margin-top: 2px; }
.prov-ic {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 11px; background: #eef2ff; color: #4f46e5; flex: none;
}
.prov-ic .ic-svg { width: 22px; height: 22px; }
/* 向导步骤条 */
.wiz-steps { display: flex; gap: 8px; margin-bottom: 20px; }
.wiz-steps .ws {
  flex: 1; text-align: center; font-size: 12.5px; color: var(--muted); font-weight: 500;
  padding: 8px 4px; border-radius: 9px; background: #f1f5f9;
}
.wiz-steps .ws.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
/* 服务商卡片 */
.prov-card .pi {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 11px; background: #eef2ff; color: #4f46e5; flex: none; font-size: 20px;
}
.prov-card .pi .ic-svg { width: 22px; height: 22px; }
.prov-card.sel { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(59, 130, 246, .25); background: var(--card); }
[data-theme="dark"] .prov-card.sel { background: #1e3a5f; }
.prov-card .pd { font-size: 12px; color: var(--muted); margin-top: 2px; }
/* 向导表单 */
.wiz-field { margin-bottom: 15px; }
.wiz-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: #334155; }
.wiz-field label .req { color: var(--danger); margin-left: 2px; }
.wiz-field .input { width: 100%; }
.wiz-field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.wiz-err {
  display: none; margin-top: 14px; padding: 11px 14px; border-radius: 10px; font-size: 13px;
  background: var(--danger-soft); color: #b91c1c; border: 1px solid #fecaca; line-height: 1.6;
}
.wiz-err.show { display: block; }
.wiz-ok {
  display: none; margin-top: 14px; padding: 11px 14px; border-radius: 10px; font-size: 13px;
  background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; line-height: 1.6;
}
.wiz-ok.show { display: block; }

/* ================= 设置页 ================= */
.set-row {
  display: flex; align-items: center; gap: 14px; padding: 15px 4px;
  border-bottom: 1px solid #f1f5f9;
}
.set-row:last-child { border-bottom: none; }
.set-row .grow { flex: 1; min-width: 0; }
.set-row .t { font-weight: 600; font-size: 14px; }
.set-row .d { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
/* 开关 */
.switch { position: relative; width: 44px; height: 25px; flex-shrink: 0; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .sl { position: absolute; inset: 0; background: #cbd5e1; border-radius: 13px; transition: background-color .2s ease; }
.switch .sl::before {
  content: ''; position: absolute; width: 19px; height: 19px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s ease; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .sl { background: var(--primary); }
.switch input:checked + .sl::before { transform: translateX(19px); }

/* ================= 其他 ================= */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .big { margin-bottom: 14px; }
.empty .big .ic-svg { width: 56px; height: 56px; opacity: .4; }
#toast {
  position: fixed; top: 28px; left: 50%; transform: translateX(-50%);
  background: #1e293b; color: #fff; padding: 12px 22px; border-radius: 12px; font-size: 13.5px;
  box-shadow: var(--shadow-lg); z-index: 200; animation: toastDown .25s ease;
  max-width: 80vw;
}
@keyframes toastDown { from { opacity: 0; transform: translateX(-50%) translateY(-10px); } }
.dropdown {
  position: fixed; background: #fff; border-radius: 13px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); z-index: 90; min-width: 230px; max-width: 300px; padding: 6px;
  max-height: 60vh; overflow-y: auto;
  animation: pop .15s ease;
}
.dropdown .di {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px;
  cursor: pointer; font-size: 13.5px; transition: background-color .12s ease;
}
.dropdown .di:hover { background: #f1f5f9; }
.dropdown .di .avatar {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--purple)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
}
.dropdown .di .avatar .ic-svg { width: 18px; height: 18px; }
.dropdown .di .t { font-weight: 600; }
.dropdown .di .s { font-size: 11.5px; color: var(--muted); }
.dropdown .dsec { font-size: 11px; color: var(--muted); padding: 8px 12px 4px; letter-spacing: .4px; }
.seg button .ic-svg { margin-right: 4px; }

/* 图标尺寸 */
.fic .ic-svg { width: 40px; height: 40px; }
.avatar .ic-svg { width: 26px; height: 26px; }
.di .avatar .ic-svg { width: 20px; height: 20px; margin-right: 0; }

/* 响应式 */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .panels { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { width: 70px; padding: 14px 8px; }
  .brand .t, .brand .s, .nav-item span, .nav-sec, .folder-item span,
  .storage-switch div, .acct-card div { display: none; }
  .nav-item, .folder-item { justify-content: center; }
  .brand { justify-content: center; padding-bottom: 14px; }
  .storage-switch, .acct-card { justify-content: center; }
  .main { padding: 16px; }
  .ftable .ftime { display: none; }
}

[data-theme="dark"] .storage-switch { background: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .storage-switch .sname { color: #f1f5f9 !important; }
[data-theme="dark"] .storage-switch .ssub { color: #94a3b8 !important; }

[data-theme="dark"] .nav-item:hover { background: #334155 !important; color: #f1f5f9 !important; }
[data-theme="dark"] .nav-item:hover span { color: #f1f5f9 !important; }

/* ---------- 仪表盘桶快速切换 ---------- */
.bucket-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.bucket-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 10px 16px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--card);
  transition: all .15s ease; min-width: 120px;
}
.bucket-chip:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59,130,246,.12); }
.bucket-chip.active { border-color: var(--primary); background: rgba(59,130,246,.08); box-shadow: 0 0 0 2px rgba(59,130,246,.2); }
.bucket-chip .bc-acct { font-size: 11px; color: var(--muted); display: flex; align-items: center; }
.bucket-chip .bc-bucket { font-size: 15px; font-weight: 600; color: var(--text); }
[data-theme="dark"] .bucket-chip .bc-bucket { color: #f1f5f9; }
