/* ===== Aurenlane Files · UI ===== */
:root {
  color-scheme: dark;
  --bg: #06070c;
  --sky: #1a1836;
  --sea: #07222a;
  --bg-2: #0b0d16;
  --panel: rgba(22, 25, 38, .58);
  --panel-solid: #12141f;
  --stroke: rgba(255, 255, 255, .085);
  --stroke-strong: rgba(255, 255, 255, .16);
  --text: #eef0f8;
  --muted: #99a0b8;
  --faint: #6a7188;
  --a1: #8b7bff;
  --a2: #38e8c8;
  --a3: #ff7bd5;
  --danger: #ff5d73;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .75);
  --ease: cubic-bezier(.22, .68, .32, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .35s var(--ease);
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* ---------- 背景光晕 ---------- */
.aurora {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background-color: var(--bg);
  background-image: radial-gradient(1200px 800px at 78% -10%, var(--sky) 0%, transparent 60%),
                    radial-gradient(900px 700px at 0% 100%, var(--sea) 0%, transparent 55%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(90px) saturate(120%); opacity: .5; }
.b1 { width: 52vw; height: 52vw; left: 4%; top: 6%; background: radial-gradient(circle at 30% 30%, #6b5bff, transparent 65%); animation: drift1 26s var(--ease) infinite alternate; }
.b2 { width: 44vw; height: 44vw; right: 2%; top: 22%; background: radial-gradient(circle at 60% 40%, #12c9b1, transparent 65%); animation: drift2 32s var(--ease) infinite alternate; }
.b3 { width: 40vw; height: 40vw; left: 32%; bottom: -8%; background: radial-gradient(circle at 50% 60%, #ff5fb0, transparent 65%); animation: drift3 38s var(--ease) infinite alternate; opacity: .65; }
.grain { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
  }
@keyframes drift1 { to { transform: translate3d(8vw, 6vh, 0) scale(1.18) rotate(12deg); } }
@keyframes drift2 { to { transform: translate3d(-7vw, 9vh, 0) scale(1.12) rotate(-10deg); } }
@keyframes drift3 { to { transform: translate3d(5vw, -8vh, 0) scale(1.22) rotate(8deg); } }

/* ---------- 通用 ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--stroke); border-radius: 12px; padding: 11px 18px;
  background: rgba(255, 255, 255, .045); color: var(--text); font-weight: 600; font-size: 14px;
  transition: transform .22s var(--spring), background .2s, border-color .2s, box-shadow .25s;
}
.btn:hover { background: rgba(255, 255, 255, .085); border-color: var(--stroke-strong); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn.primary {
  border: none; color: #0a0a12; font-weight: 700;
  background: linear-gradient(120deg, var(--a2), #7de0ff 42%, var(--a1));
  box-shadow: 0 12px 30px -12px rgba(56, 232, 200, .55);
  overflow: hidden;
}
.btn.primary::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
}
.btn.primary:hover::after { animation: sweep .9s var(--ease); }
.btn.primary:hover { box-shadow: 0 16px 38px -12px rgba(56, 232, 200, .7); }
.btn.ghost { background: transparent; }
.btn.danger { background: rgba(255, 93, 115, .14); border-color: rgba(255, 93, 115, .35); color: #ff8d9d; }
.btn.danger:hover { background: rgba(255, 93, 115, .22); }
@keyframes sweep { to { transform: translateX(120%); } }
.link { background: none; border: none; padding: 0; color: var(--a2); font-weight: 600; border-bottom: 1px dashed rgba(56, 232, 200, .5); }
.link:hover { color: #7df3dc; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }
.field input, .search input, select {
  background: rgba(255, 255, 255, .04); border: 1px solid var(--stroke); border-radius: 12px;
  padding: 12px 14px; outline: none; color: var(--text); transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input:focus, .search:focus-within, select:focus {
  border-color: rgba(139, 123, 255, .6); box-shadow: 0 0 0 4px rgba(139, 123, 255, .12); background: rgba(255, 255, 255, .06);
}
.field.compact input { padding: 10px 12px; }

/* ---------- 登录 ---------- */
.login-view { position: relative; z-index: 1; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(400px, 100%); padding: 38px 32px 30px; text-align: center;
  background: var(--panel); border: 1px solid var(--stroke); border-radius: 26px;
  backdrop-filter: blur(26px) saturate(140%); box-shadow: var(--shadow);
  animation: popIn .7s var(--spring) both;
}
.login-card.shake { animation: shake .45s var(--ease); }
.login-logo { width: 66px; height: 66px; margin: 0 auto 18px; animation: bob 5s ease-in-out infinite; }
.login-logo svg { width: 100%; height: 100%; filter: drop-shadow(0 8px 20px rgba(139, 123, 255, .45)); }
.login-card h1 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.02em; }
.login-card .muted { margin: 0 0 24px; font-size: 13.5px; }
.login-card .field { text-align: left; margin-bottom: 18px; }
.login-card .btn { width: 100%; padding: 13px; }
.login-card .hint { min-height: 18px; margin: 14px 0 0; font-size: 12.5px; color: var(--danger); }
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes shake {
  20% { transform: translateX(-9px); } 40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(3px); }
}

/* ---------- 顶栏 ---------- */
.app { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 26px 26px 60px; animation: fadeIn .5s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; } }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.brand { display: flex; align-items: center; gap: 13px; }
.mark { width: 42px; height: 42px; }
.mark svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 16px rgba(139, 123, 255, .35)); }
.brand-text h1 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.brand-text p { margin: 2px 0 0; font-size: 11.5px; color: var(--faint); font-family: var(--mono); letter-spacing: .02em; }
.brand-text .dot { color: var(--a2); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; font-size: 12.5px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--stroke); border-radius: 999px; backdrop-filter: blur(18px);
}
.pill svg { width: 16px; height: 16px; opacity: .8; }
.pill b { color: var(--text); font-weight: 600; font-family: var(--mono); }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--stroke); backdrop-filter: blur(18px);
  transition: transform .2s var(--spring), background .2s, border-color .2s;
}
.icon-btn svg { width: 18px; height: 18px; color: var(--muted); transition: color .2s; }
.icon-btn:hover { transform: translateY(-2px); border-color: var(--stroke-strong); background: rgba(255, 255, 255, .07); }
.icon-btn:hover svg { color: var(--text); }

/* ---------- 上传区 ---------- */
.dropzone {
  position: relative; overflow: hidden; border-radius: 26px; padding: 46px 26px; text-align: center;
  background: linear-gradient(160deg, rgba(139, 123, 255, .1), rgba(56, 232, 200, .05) 55%, rgba(255, 255, 255, .02));
  border: 1px dashed rgba(255, 255, 255, .16); cursor: pointer;
  transition: border-color .25s, transform .3s var(--spring), background .3s, box-shadow .3s;
  animation: riseIn .6s var(--ease) both .05s;
}
.dropzone:hover { border-color: rgba(56, 232, 200, .45); transform: translateY(-2px); box-shadow: 0 20px 50px -30px rgba(56, 232, 200, .5); }
.dropzone.drag {
  border-color: var(--a2); background: linear-gradient(160deg, rgba(56, 232, 200, .16), rgba(139, 123, 255, .1));
  transform: scale(1.008); box-shadow: 0 0 0 6px rgba(56, 232, 200, .08), 0 30px 80px -40px rgba(56, 232, 200, .7);
}
.dz-ring {
  position: absolute; width: 420px; height: 420px; left: 50%; top: 50%; translate: -50% -50%; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .05); box-shadow: inset 0 0 90px rgba(139, 123, 255, .12);
  animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.12); opacity: .55; } }
.dz-inner { position: relative; z-index: 1; }
.dz-icon { width: 54px; height: 54px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 16px;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--stroke); color: var(--a2); transition: transform .35s var(--spring); }
.dz-icon svg { width: 26px; height: 26px; }
.dropzone:hover .dz-icon { transform: translateY(-4px) scale(1.05); }
.dropzone h2 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.01em; }
.dropzone p { margin: 0; color: var(--muted); font-size: 13px; }
.dz-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; pointer-events: none;
  background: rgba(7, 9, 15, .62); backdrop-filter: blur(6px); transition: opacity .2s;
  font-size: 18px; font-weight: 700; letter-spacing: .06em; color: var(--a2);
}
.dropzone.drag .dz-overlay { opacity: 1; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } }

/* ---------- 文件库 ---------- */
.library { margin-top: 40px; }
.lib-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.lib-head h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 9px; }
.count { font-size: 11.5px; font-family: var(--mono); color: var(--a2); background: rgba(56, 232, 200, .1);
  border: 1px solid rgba(56, 232, 200, .22); padding: 2px 8px; border-radius: 999px; }
.tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid var(--stroke); border-radius: 12px;
  background: rgba(255, 255, 255, .04); transition: border-color .2s, box-shadow .2s; }
.search svg { width: 16px; height: 16px; color: var(--faint); }
.search input { border: none; background: none; padding: 10px 0; width: 168px; outline: none; font-size: 13.5px; }
select { padding: 9px 12px; font-size: 13px; border-radius: 12px; cursor: pointer; }
select option { background: var(--panel-solid); }
.view-toggle { display: flex; padding: 3px; gap: 2px; background: rgba(255, 255, 255, .04); border: 1px solid var(--stroke); border-radius: 12px; }
.view-toggle button { width: 32px; height: 30px; display: grid; place-items: center; border: none; border-radius: 9px; background: none; color: var(--faint); transition: background .2s, color .2s; }
.view-toggle button svg { width: 17px; height: 17px; }
.view-toggle button.active { background: rgba(255, 255, 255, .1); color: var(--text); }

/* 网格卡片 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 16px; }
.card {
  position: relative; overflow: hidden; border-radius: 18px; background: var(--panel);
  border: 1px solid var(--stroke); backdrop-filter: blur(20px) saturate(130%);
  transition: transform .3s var(--spring), border-color .25s, box-shadow .3s, background .25s;
  animation: cardIn .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 38ms);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.card:hover { transform: translateY(-5px) scale(1.012); border-color: rgba(255, 255, 255, .2);
  box-shadow: 0 26px 50px -24px rgba(0, 0, 0, .8), 0 0 0 1px rgba(139, 123, 255, .12); }
.thumb { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(150deg, rgba(139, 123, 255, .16), rgba(56, 232, 200, .07));
  display: grid; place-items: center; overflow: hidden; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .thumb img, .card:hover .thumb video { transform: scale(1.06); }
.thumb .fileicon { width: 46px; height: 46px; color: rgba(255, 255, 255, .82); filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .4)); }
.thumb .ext { position: absolute; bottom: 10px; left: 10px; padding: 3px 8px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; font-family: var(--mono); border-radius: 7px;
  background: rgba(6, 8, 13, .68); border: 1px solid var(--stroke); color: var(--muted); backdrop-filter: blur(8px); }
.card-actions { position: absolute; top: 9px; right: 9px; display: flex; gap: 6px; opacity: 0; transform: translateY(-6px);
  transition: opacity .22s, transform .28s var(--spring); }
.card:hover .card-actions, .card:focus-within .card-actions { opacity: 1; transform: none; }
.act { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--stroke);
  background: rgba(8, 10, 16, .72); backdrop-filter: blur(10px); color: var(--muted); transition: background .2s, color .2s, transform .2s var(--spring); }
.act svg { width: 15px; height: 15px; }
.act:hover { background: rgba(255, 255, 255, .14); color: var(--text); transform: scale(1.08); }
.act.del:hover { background: rgba(255, 93, 115, .22); color: #ff8d9d; }
.card-body { padding: 12px 14px 14px; }
.card-name { margin: 0; font-size: 13.5px; font-weight: 600; line-height: 1.35; word-break: break-all;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin: 7px 0 0; display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--faint); font-family: var(--mono); }
.card-meta .sep { opacity: .45; }
.toastlink { position: absolute; inset: 0; }

/* 列表视图 */
.grid.list { display: flex; flex-direction: column; gap: 8px; }
.grid.list .card { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 14px; animation-name: rowIn; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-10px); } }
.grid.list .thumb { width: 46px; height: 46px; border-radius: 11px; flex: none; aspect-ratio: auto; }
.grid.list .thumb .fileicon { width: 22px; height: 22px; }
.grid.list .thumb .ext, .grid.list .card-actions { display: none; }
.grid.list .card-body { flex: 1; min-width: 0; padding: 0; }
.grid.list .card-name { -webkit-line-clamp: 1; }
.grid.list .card-meta { margin-top: 4px; }
.grid.list .list-actions { display: flex; gap: 6px; opacity: 1; position: static; transform: none; }
.grid:not(.list) .list-actions { display: none; }

/* 空状态 */
.empty { text-align: center; padding: 60px 20px; animation: riseIn .6s var(--ease) both; }
.empty-art { color: var(--a2); margin-bottom: 10px; }
.empty-art svg { width: 110px; height: 110px; animation: breathe 6s ease-in-out infinite; }
.empty h3 { margin: 0 0 6px; font-size: 17px; }
.empty p { margin: 0; color: var(--muted); font-size: 13.5px; }
.footer { margin-top: 60px; text-align: center; font-size: 11.5px; color: var(--faint); letter-spacing: .02em; }

/* ---------- 上传队列 ---------- */
.uploads { position: fixed; right: 20px; bottom: 20px; width: min(360px, calc(100vw - 40px)); display: flex; flex-direction: column; gap: 10px; z-index: 40; }
.up-item { background: rgba(14, 16, 26, .86); border: 1px solid var(--stroke); border-radius: 15px; padding: 12px 14px;
  backdrop-filter: blur(22px); box-shadow: var(--shadow); animation: slideUp .4s var(--spring) both; }
.up-item.done { animation: slideUp .4s var(--spring) both, fadeOut .4s var(--ease) forwards 2.2s; }
@keyframes slideUp { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(20px); } }
.up-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.up-name { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-pct { font-size: 11.5px; font-family: var(--mono); color: var(--a2); flex: none; }
.up-bar { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.up-fill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--a2), var(--a1));
  transition: width .25s var(--ease); box-shadow: 0 0 14px rgba(56, 232, 200, .55); }
.up-sub { margin-top: 7px; font-size: 11px; color: var(--faint); font-family: var(--mono); display: flex; justify-content: space-between; }
.up-item.failed .up-fill { background: linear-gradient(90deg, #ff5d73, #ff8d9d); }
.up-item.failed .up-pct { color: #ff8d9d; }

/* ---------- Toast ---------- */
.toasts { position: fixed; left: 50%; bottom: 28px; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 60; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; padding: 11px 18px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: rgba(16, 18, 28, .92); border: 1px solid var(--stroke-strong); backdrop-filter: blur(20px); box-shadow: var(--shadow);
  animation: toastIn .45s var(--spring) both; }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
.toast.ok { border-color: rgba(56, 232, 200, .34); }
.toast.err { border-color: rgba(255, 93, 115, .4); }
.toast .dotmark { width: 7px; height: 7px; border-radius: 50%; background: var(--a2); box-shadow: 0 0 10px var(--a2); }
.toast.err .dotmark { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.96); } }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column;
  background: rgba(4, 5, 9, .82); backdrop-filter: blur(22px); animation: fadeIn .3s var(--ease) both; }
.lb-stage { flex: 1; display: grid; place-items: center; padding: 30px; min-height: 0; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; border-radius: 14px; box-shadow: 0 40px 90px -30px #000; animation: lbIn .45s var(--spring) both; }
@keyframes lbIn { from { opacity: 0; transform: scale(.94); } }
.lb-close { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, .06); color: var(--text); font-size: 15px; display: grid; place-items: center;
  transition: background .2s, transform .2s var(--spring); z-index: 2; }
.lb-close:hover { background: rgba(255, 255, 255, .14); transform: rotate(90deg); }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px 22px; }
.lb-bar > span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-actions { display: flex; gap: 8px; flex: none; }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px;
  background: rgba(4, 5, 9, .7); backdrop-filter: blur(14px); animation: fadeIn .25s var(--ease) both; }
.modal-card { width: min(520px, 100%); padding: 26px 26px 22px; border-radius: 22px; background: rgba(17, 19, 29, .97);
  border: 1px solid var(--stroke); box-shadow: var(--shadow); animation: popIn .45s var(--spring) both; }
.modal-card.small { width: min(400px, 100%); }
.modal-card h3 { margin: 0 0 18px; font-size: 17px; }
.modal-card hr { border: none; border-top: 1px solid var(--stroke); margin: 20px 0; }
.settings-grid { display: flex; flex-direction: column; gap: 11px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 13px; color: var(--muted); }
.setting-row code { font-family: var(--mono); font-size: 12px; color: var(--a2); background: rgba(56, 232, 200, .08);
  border: 1px solid rgba(56, 232, 200, .16); padding: 3px 8px; border-radius: 7px; }
.pw-form h4 { margin: 0 0 14px; font-size: 14px; }
.pw-form .field { margin-bottom: 12px; }
.pw-form .btn { width: 100%; margin-top: 4px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.danger-note { color: #ff8d9d; font-size: 12.5px; margin: 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .app { padding: 18px 16px 48px; }
  .topbar { flex-wrap: wrap; }
  .pill span { display: none; }
  .dropzone { padding: 34px 18px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .search input { width: 120px; }
  .lb-bar { flex-direction: column; align-items: stretch; gap: 12px; }
  .uploads { right: 12px; left: 12px; bottom: 12px; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- 登录页标签 ---------- */
.tabs { display: flex; gap: 5px; padding: 4px; margin-bottom: 18px; border-radius: 12px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--stroke); }
.tab { flex: 1; padding: 9px 8px; border: none; background: none; color: var(--muted); border-radius: 9px;
  font-size: 13px; font-weight: 600; transition: background .2s, color .2s, transform .2s var(--spring); }
.tab:hover { color: var(--text); }
.tab.active { background: rgba(255, 255, 255, .1); color: var(--text); }
.login-card form .field { text-align: left; margin-bottom: 14px; }
.hint-sub { margin: 12px 0 0; font-size: 11.5px; color: var(--faint); line-height: 1.6; }

/* ---------- 设置弹窗（宽） ---------- */
.modal-card.wide { width: min(640px, 100%); max-height: 88dvh; overflow-y: auto; }
.codes-section h4 { margin: 0; font-size: 14px; }
.codes-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.code-create { display: flex; gap: 8px; flex-wrap: wrap; }
.code-create input { flex: 1 1 170px; min-width: 0; background: rgba(255, 255, 255, .04); border: 1px solid var(--stroke);
  border-radius: 12px; padding: 10px 12px; outline: none; font-size: 13px; transition: border-color .2s, box-shadow .2s; }
.code-create input:focus { border-color: rgba(139, 123, 255, .6); box-shadow: 0 0 0 4px rgba(139, 123, 255, .12); }
.code-create select { padding: 9px 10px; font-size: 12.5px; }
.code-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; max-height: 230px; overflow-y: auto; }
.code-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--stroke); background: rgba(255, 255, 255, .03); animation: riseIn .35s var(--ease) both; }
.code-item.inactive { opacity: .45; }
.code-value { font-family: var(--mono); font-size: 13px; letter-spacing: .06em; color: var(--a2); flex: none; }
.code-note { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-meta { font-size: 10.5px; color: var(--faint); font-family: var(--mono); flex: none; }
.code-item .act { width: 28px; height: 28px; }
.pw-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.pw-row .field { flex: 1 1 150px; margin: 0; }
.small { font-size: 12px; }
.badge-up { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 2px 7px; border-radius: 999px;
  font-size: 10.5px; color: #b7adff; background: rgba(139, 123, 255, .12); border: 1px solid rgba(139, 123, 255, .24); }

/* ============ 浅色主题（跟随系统） ============ */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f2f4fa;
    --sky: #e3e7ff;
    --sea: #d6f4ef;
    --panel: rgba(255, 255, 255, .74);
    --panel-solid: #ffffff;
    --stroke: rgba(16, 22, 45, .10);
    --stroke-strong: rgba(16, 22, 45, .18);
    --text: #141a2b;
    --muted: #59607a;
    --faint: #878ea6;
    --a1: #6b5be6;
    --a2: #0f9e98;
    --a3: #d94f9f;
    --danger: #d62b4a;
    --shadow: 0 24px 60px -26px rgba(28, 38, 78, .35);
  }
  .b1 { background: radial-gradient(circle at 30% 30%, #b3a7ff, transparent 65%); opacity: .55; }
  .b2 { background: radial-gradient(circle at 60% 40%, #7fe4d7, transparent 65%); opacity: .5; }
  .b3 { background: radial-gradient(circle at 50% 60%, #ffb9dc, transparent 65%); opacity: .45; }

  .login-card, .modal-card { background: rgba(255, 255, 255, .9); }
  .modal { background: rgba(20, 26, 48, .38); }
  .btn { background: rgba(16, 22, 45, .05); }
  .btn:hover { background: rgba(16, 22, 45, .09); }
  .btn.ghost { background: transparent; }
  .icon-btn, .pill { background: rgba(255, 255, 255, .72); }
  .icon-btn:hover { background: rgba(255, 255, 255, .96); }
  .dropzone {
    background: linear-gradient(160deg, rgba(139, 123, 255, .12), rgba(15, 158, 152, .07) 55%, rgba(255, 255, 255, .35));
    border-color: rgba(16, 22, 45, .18);
  }
  .dz-icon { background: rgba(255, 255, 255, .75); border-color: var(--stroke); }
  .dz-overlay { background: rgba(248, 250, 255, .84); }
  .search, select, .field input, .code-create input { background: rgba(255, 255, 255, .85); }
  .view-toggle { background: rgba(255, 255, 255, .7); }
  .view-toggle button.active { background: rgba(16, 22, 45, .1); }
  .card { background: rgba(255, 255, 255, .84); }
  .card:hover { box-shadow: 0 26px 50px -26px rgba(28, 38, 78, .45), 0 0 0 1px rgba(107, 91, 230, .14); }
  .thumb { background: linear-gradient(150deg, rgba(139, 123, 255, .16), rgba(15, 158, 152, .09)); }
  .thumb .ext { background: rgba(255, 255, 255, .82); color: var(--muted); }
  .act { background: rgba(255, 255, 255, .9); }
  .act:hover { background: rgba(16, 22, 45, .1); }
  .up-item, .toast { background: rgba(255, 255, 255, .94); }
  .up-bar { background: rgba(16, 22, 45, .1); }
  .code-item { background: rgba(255, 255, 255, .78); }
  .badge-up { color: #5b4bd6; background: rgba(107, 91, 230, .1); border-color: rgba(107, 91, 230, .22); }
  .tab.active { background: rgba(16, 22, 45, .1); }
  .lb-close { background: rgba(255, 255, 255, .14); color: #fff; }
  .lb-bar > span { color: #ccd2e2; }
  .lb-bar .btn.ghost { color: #eef1f8; border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .08); }
}
