/**
 * app.css —— 新增组件样式
 *
 * 只包含 legacy.css 里没有的东西：启动页、登录页、分级提示、
 * 确认弹窗、侧边面板（告警/日志）、骨架屏、空状态。
 * 沿用 legacy.css 定义的颜色变量，保证视觉统一。
 */

/* ============================================================ 启动加载页 */

#splash {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 30%, #e9f1ff 0, #f4f7fb 60%);
  transition: opacity .4s ease;
}
#splash.done { opacity: 0; pointer-events: none; }
.splash-inner { text-align: center; }
.splash-logo { width: 132px; margin-bottom: 26px; }
.splash-bar {
  width: 190px; height: 3px; margin: 0 auto 16px;
  border-radius: 2px; background: #dfe7f3; overflow: hidden;
}
.splash-bar i {
  display: block; height: 100%; width: 40%;
  border-radius: 2px; background: linear-gradient(90deg, #3979f5, #2868eb);
  animation: splash-slide 1.1s ease-in-out infinite;
}
@keyframes splash-slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}
#splashStage { color: #7d8ca4; font-size: 13px; }

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

[hidden] { display: none !important; }
html.signed-out-root { min-width: 0; overflow: hidden; }
body.signed-out { min-width: 0; overflow: hidden; }
#login {
  position: fixed; inset: 0; z-index: 900; overflow: auto;
  background: #edf2f8;
}

.login-stage {
  min-height: 100vh; display: grid; grid-template-columns: minmax(580px, 1.22fr) minmax(430px, .78fr);
  align-items: stretch;
}

.login-visual {
  padding: 46px clamp(42px, 5vw, 76px); color: #fff;
  background-image:
    linear-gradient(90deg, rgba(7, 30, 72, .92) 0%, rgba(12, 48, 109, .78) 48%, rgba(10, 43, 93, .42) 100%),
    url('../../assets/library/lobby-city-wall.jpg');
  background-size: cover; background-position: center;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.login-visual::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 25, 61, .08), rgba(4, 22, 54, .4));
}
.login-visual::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: rgba(255,255,255,.18);
}
.login-visual > * { position: relative; z-index: 1; }
.login-brand { display: flex; align-items: center; gap: 18px; }
.login-logo { width: 118px; height: auto; filter: brightness(0) invert(1); }
.login-brand span { padding-left: 18px; border-left: 1px solid rgba(255,255,255,.34); color: rgba(255,255,255,.82); font-size: 13px; letter-spacing: .04em; }
.login-message { margin: auto 0; max-width: 620px; padding: 72px 0; }
.login-visual h1 { margin: 0 0 22px; font-size: clamp(42px, 4.3vw, 66px); line-height: 1.16; letter-spacing: -.035em; text-wrap: balance; }
.login-tagline { margin: 0; font-size: 16px; line-height: 1.9; color: rgba(255, 255, 255, .82); max-width: 530px; }
.login-capabilities { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 34px; }
.login-capabilities span { padding: 8px 12px; border: 1px solid rgba(255,255,255,.28); border-radius: 7px; background: rgba(8,35,79,.34); color: rgba(255,255,255,.92); font-size: 12px; backdrop-filter: blur(6px); }
.login-trust { display: flex; align-items: center; gap: 9px; color: rgba(255,255,255,.72); font-size: 12px; }
.login-trust i { width: 7px; height: 7px; border-radius: 50%; background: #55d497; box-shadow: 0 0 0 4px rgba(85,212,151,.14); }

.login-form {
  padding: 64px clamp(42px, 6vw, 88px);
  display: flex; flex-direction: column; justify-content: center;
  background: #fff;
}
.login-form-head { margin-bottom: 34px; }
.login-service { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 24px; color: #557066; font-size: 11.5px; }
.login-service i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(67,187,134,.13); }
.login-form h2 { margin: 0 0 9px; font-size: 29px; letter-spacing: -.025em; color: #17233c; }
.login-sub { margin: 0; color: #8190a8; line-height: 1.7; }

.login-form .field { display: block; margin-bottom: 18px; }
.login-form .field span { display: block; margin-bottom: 8px; font-size: 13px; color: #56647b; }
.login-form .field input {
  width: 100%; height: 48px; padding: 0 14px;
  border: 1px solid #d9e1ec; border-radius: 10px;
  background: #fbfcfe; transition: border-color .16s, box-shadow .16s, background .16s;
}
.login-form .field input:focus {
  outline: none; border-color: #7aa6ff; background: #fff;
  box-shadow: 0 0 0 3px rgba(62, 117, 244, .12);
}

.login-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #6b7890; margin-bottom: 14px; }
.login-error { min-height: 20px; margin: 0 0 12px; color: #ef5a62; font-size: 13px; }
.login-submit { width: 100%; height: 48px; font-size: 15px; border-radius: 10px; box-shadow: 0 8px 20px rgba(40,104,235,.2); }
.login-access-note { display: flex; align-items: center; gap: 12px; margin-top: 28px; padding: 14px; border-radius: 10px; background: #f5f8fd; }
.login-access-note svg { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: #6d8ecf; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.login-access-note b { display: block; color: #42516a; font-size: 12.5px; }
.login-access-note span { display: block; margin-top: 3px; color: #8b98aa; font-size: 11.5px; line-height: 1.45; }
.login-foot { margin-top: 24px; font-size: 11px; color: #a3aebe; }

@media (max-width: 980px) {
  .login-stage { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-form { min-height: 100vh; width: min(520px, 100%); margin: 0 auto; }
}

/* ============================================================== 分级提示 */

.toast-stack {
  position: fixed; z-index: 2000; right: 24px; bottom: 24px;
  display: flex; flex-direction: column-reverse; gap: 10px;
  max-width: min(430px, calc(100vw - 48px));
}
.toast-item {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 14px; border-radius: 11px;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(26, 46, 80, .14);
  transform: translateY(14px); opacity: 0; transition: .22s ease;
}
.toast-item.visible { transform: none; opacity: 1; }
.toast-item.leaving { transform: translateY(8px); opacity: 0; }
.toast-body { flex: 1; min-width: 0; }
.toast-text { display: block; font-size: 13.5px; color: #24324a; line-height: 1.55; word-break: break-word; }
.toast-detail { display: block; margin-top: 3px; font-size: 11px; color: #9aa7bb; font-family: ui-monospace, Consolas, monospace; }

.toast-item .fb-ico {
  width: 19px; height: 19px; flex: 0 0 19px; margin-top: 1px;
  fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.toast-success { border-color: #cdebdc; }
.toast-success .fb-ico { stroke: var(--green); }
.toast-error   { border-color: #f3c8cc; }
.toast-error .fb-ico { stroke: var(--red); }
.toast-warn    { border-color: #f2d8ae; }
.toast-warn .fb-ico { stroke: var(--orange); }
.toast-pending { border-color: #cbdafd; }
.toast-pending .fb-ico { stroke: var(--blue); }
.toast-info    { border-color: #d6dde7; }
.toast-info .fb-ico { stroke: #8190a8; }

.fb-ico.spin { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast-retry {
  flex: 0 0 auto; padding: 5px 11px; border-radius: 6px;
  background: #fdeced; color: var(--red); font-size: 12px; cursor: pointer;
}
.toast-retry:hover { background: #fbdfe1; }
.toast-close {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 5px;
  background: transparent; color: #b6c0cf; font-size: 17px; line-height: 1; cursor: pointer;
}
.toast-close:hover { background: #f1f4f9; color: #6b7890; }

/* ============================================================== 确认弹窗 */

.confirm-backdrop {
  position: fixed; inset: 0; z-index: 2100;
  display: grid; place-items: center;
  background: rgba(17, 31, 54, .34);
  opacity: 0; transition: opacity .18s;
}
.confirm-backdrop.open { opacity: 1; }
.confirm-box {
  width: 392px; max-width: calc(100vw - 40px);
  padding: 28px 26px 22px; border-radius: 15px; background: #fff; text-align: center;
  box-shadow: 0 24px 60px rgba(18, 33, 58, .24);
  transform: scale(.95); transition: transform .18s;
}
.confirm-backdrop.open .confirm-box { transform: none; }
.confirm-icon {
  width: 48px; height: 48px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; background: #eef3ff;
}
.confirm-icon.danger { background: #fdecec; }
.confirm-icon .fb-ico { width: 24px; height: 24px; fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.confirm-icon.danger .fb-ico { stroke: var(--red); }
.confirm-box h3 { margin: 0 0 9px; font-size: 17px; color: #17233c; }
.confirm-box p { margin: 0 0 24px; color: #6b7890; line-height: 1.75; font-size: 13.5px; }
.confirm-actions { display: flex; gap: 10px; }
.confirm-actions .btn { flex: 1; height: 40px; border-radius: 9px; justify-content: center; }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger:hover { background: #e04a52; }

/* ===================================================== 按钮 loading 状态 */

.btn.is-busy { opacity: .75; cursor: progress; }
.btn-spinner {
  display: inline-block; width: 13px; height: 13px; margin-right: 7px;
  vertical-align: -2px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.btn.ghost .btn-spinner, .btn:not(.primary) .btn-spinner {
  border-color: rgba(62, 117, 244, .28); border-top-color: var(--blue);
}
.btn.no-permission { opacity: .42; cursor: not-allowed; }

/* ============================================================== 顶栏扩展 */

.top-extras { display: flex; align-items: center; gap: 12px; margin-left: 14px; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #8190a8; }
.live-dot i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 3px rgba(67, 187, 134, .18); transition: .3s;
}
.live-dot.pulse i { transform: scale(1.45); }

.icon-btn {
  position: relative; width: 34px; height: 34px; border-radius: 9px;
  background: #f2f5fa; color: #56647b; display: grid; place-items: center; cursor: pointer;
}
.icon-btn:hover { background: #e8eefa; color: var(--blue); }
.icon-btn.has-alarm { color: var(--red); background: #fdeced; }
.badge-count {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff;
  font-size: 10px; line-height: 17px; text-align: center;
}

/* =========================================================== 账号区/菜单 */

.account { position: relative; }
.account-meta { min-width: 0; flex: 1; }
.account-meta strong { display: block; }
.account-meta small { display: block; color: #8190a8; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-btn {
  width: 26px; height: 26px; border-radius: 6px; background: transparent;
  color: #9aa7bb; font-size: 16px; cursor: pointer;
}
.account-menu-btn:hover { background: #f1f4f9; color: #56647b; }

.account-dropdown {
  position: absolute; bottom: 62px; left: 14px; right: 14px; z-index: 30;
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
  box-shadow: 0 16px 40px rgba(26, 46, 80, .16); overflow: hidden; padding: 6px;
}
.dropdown-head { padding: 11px 12px 12px; border-bottom: 1px solid #f1f4f9; margin-bottom: 5px; }
.dropdown-head strong { display: block; font-size: 13px; color: #17233c; }
.dropdown-head small { display: block; color: #8190a8; font-size: 11px; margin-top: 3px; }
.session-left { color: #a3aebe !important; }
.account-dropdown button {
  display: block; width: 100%; padding: 9px 12px; border-radius: 7px;
  background: transparent; text-align: left; font-size: 13px; color: #56647b; cursor: pointer;
}
.account-dropdown button:hover { background: #f4f7fd; color: var(--blue); }
.account-dropdown button.danger:hover { background: #fdeced; color: var(--red); }

/* ====================================================== 侧边面板（告警） */

.side-panel {
  position: fixed; z-index: 1500; top: 0; right: 0; bottom: 0; width: 392px;
  max-width: 92vw; background: #fff; border-left: 1px solid var(--line);
  box-shadow: -16px 0 44px rgba(26, 46, 80, .12);
  transform: translateX(100%); transition: transform .26s cubic-bezier(.3, .8, .4, 1);
  display: flex; flex-direction: column;
}
.side-panel.open { transform: none; }
.panel-title {
  height: 62px; flex: 0 0 62px; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 700; color: #17233c;
}
.panel-close { background: transparent; font-size: 22px; color: #9aa7bb; cursor: pointer; line-height: 1; }
.panel-close:hover { color: #56647b; }
.panel-body { flex: 1; overflow: auto; padding: 14px 16px; }

.alarm-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; margin-bottom: 9px; border-radius: 10px;
  background: #fffdfa; border: 1px solid #f1d9b5;
}
.alarm-row.error { background: #fffafa; border-color: #f1c8cc; }
.alarm-row.acked { opacity: .55; background: #fbfcfe; border-color: #cbd5e3; }
.alarm-main { flex: 1; min-width: 0; }
.alarm-main b { display: block; font-size: 13px; color: #17233c; }
.alarm-main span { display: block; margin: 3px 0; font-size: 12.5px; color: #6b7890; line-height: 1.6; }
.alarm-main small { font-size: 11px; color: #a3aebe; }
.alarm-acked { font-size: 11px; color: #9aa7bb; }
.btn.small { height: 28px; padding: 0 12px; font-size: 12px; border-radius: 7px; background: #eef3ff; color: var(--blue); }

.audit-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 13px; border-bottom: 1px solid #f2f5f9;
}
.audit-row b { display: block; font-size: 13px; color: #24324a; font-weight: 500; }
.audit-row small { display: block; margin-top: 3px; font-size: 11px; color: #a3aebe; }
.audit-row code {
  flex: 0 0 auto; padding: 3px 7px; border-radius: 5px; background: #f2f5fa;
  font-size: 10.5px; color: #8190a8; font-family: ui-monospace, Consolas, monospace;
}

/* ================================================== 骨架屏 / 空状态 */

.skeleton-grid { display: grid; gap: 12px; }
.skeleton-grid.card { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.skeleton-item {
  padding: 18px; border-radius: 12px; background: #fff; border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.skeleton-item span {
  height: 11px; border-radius: 5px;
  background: linear-gradient(90deg, #eef1f6 25%, #f7f9fc 50%, #eef1f6 75%);
  background-size: 400% 100%; animation: shimmer 1.3s infinite;
}
.skeleton-item span:nth-child(1) { width: 62%; }
.skeleton-item span:nth-child(2) { width: 90%; }
.skeleton-item span:nth-child(3) { width: 44%; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.empty-block { padding: 54px 20px; text-align: center; color: #8796a9; }
.empty-art { width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 50%; background: #eef3ff; display: grid; place-items: center; }
.empty-art .fb-ico { width: 24px; height: 24px; fill: none; stroke: var(--blue); stroke-width: 1.8; }
.empty-art.danger { background: #fdecec; }
.empty-art.danger .fb-ico { stroke: var(--red); }
.empty-block h3 { margin: 0 0 7px; font-size: 15px; color: #56647b; font-weight: 600; }
.empty-block p { margin: 0 0 18px; font-size: 13px; }

/* ============================================ 状态角标 / 冲突高亮 */

.stat-card.has-conflict { border-color: #f6cdd0; background: #fffafa; }
.stat-card.has-conflict b { color: var(--red); }
.context-menu button.danger { color: var(--red); }
.context-menu button.danger:hover { background: #fdeced; }

/* ========================================================= 诊断报告状态 */

code.diag-ok   { background: #e8f8ec; color: #2f9d5f; }
code.diag-warn { background: #fff4e3; color: #d48414; }
code.diag-fail { background: #fdeced; color: var(--red); }

/* 重复提示的次数徽标：同一条消息再次发生时显示 ×N，而不是新开一条 */
.toast-times {
  display: inline-block; margin-left: 5px; padding: 0 5px;
  border-radius: 8px; background: rgba(0, 0, 0, .07);
  font-size: 11px; font-style: normal; color: #6b7890; vertical-align: 1px;
}

/* ======================================================= 登录页细节补充 */

.password-field { position: relative; }
.pw-toggle {
  position: absolute; right: 10px; top: 31px;
  width: 30px; height: 30px; border-radius: 7px;
  background: transparent; color: #b6c0cf; cursor: pointer;
  display: grid; place-items: center;
}
.pw-toggle:hover { background: #f1f4f9; color: #6b7890; }
.pw-toggle.on { color: var(--blue); }
.pw-toggle .ui-icon { width: 17px; height: 17px; }
.caps-hint {
  display: block; margin-top: 6px; font-size: 11.5px; color: var(--orange);
}
.caps-hint[hidden] { display: none; }

/* ==================================================== 设备卡片遥测指标 */

.device-info .metric { font-variant-numeric: tabular-nums; }
.device-info .metric.good { color: var(--green); }
.device-info .metric.warn { color: var(--orange); }
.device-info .metric.bad  { color: var(--red); }
.device-info .metric.muted { color: #a3aebe; }

/* ======================================================== 设备详情弹窗 */

.detail-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.detail-head b { display: block; font-size: 15px; color: #17233c; }
.detail-head small { display: block; margin-top: 4px; color: #8190a8; font-size: 12px; }

.detail-metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin: 16px 0;
}
.detail-metric {
  padding: 11px 12px; border-radius: 9px; background: #f7f9fc; text-align: center;
}
.detail-metric small { display: block; font-size: 11px; color: #8190a8; margin-bottom: 5px; }
.detail-metric b { font-size: 15px; font-variant-numeric: tabular-nums; color: #24324a; }
.detail-metric b.good { color: var(--green); }
.detail-metric b.warn { color: var(--orange); }
.detail-metric b.bad  { color: var(--red); }

.detail-rows { display: grid; gap: 1px; background: var(--line); border-radius: 9px; overflow: hidden; }
.detail-rows > div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 13px; background: #fff; font-size: 13px;
}
.detail-rows span:first-child { color: #8190a8; }
.detail-rows span:last-child { color: #24324a; }

.detail-section-title {
  margin: 18px 0 9px; font-size: 13px; font-weight: 600; color: #56647b;
}
.detail-commands { display: grid; gap: 6px; }
.detail-command {
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  padding: 9px 12px; border-radius: 8px; background: #f7f9fc; font-size: 12.5px;
}
.detail-command .cmd-name { font-family: ui-monospace, Consolas, monospace; color: #56647b; }
.detail-command .cmd-time { color: #a3aebe; font-size: 11.5px; }
.detail-command .cmd-state { font-size: 11.5px; padding: 2px 8px; border-radius: 10px; }
.detail-command.success .cmd-state { background: #e8f8ec; color: #2f9d5f; }
.detail-command.failed .cmd-state  { background: #fdeced; color: var(--red); }
.detail-command.pending .cmd-state { background: #eef3ff; color: var(--blue); }
.detail-command.unreachable .cmd-state { background: #f1f4f9; color: #8190a8; }
.detail-loading, .detail-empty { padding: 16px; text-align: center; color: #a3aebe; font-size: 12.5px; }

/* =========================================================== 空状态内嵌 */

.empty-block.inline { grid-column: 1 / -1; padding: 40px 20px; }
.empty-block.inline .empty-art { width: 44px; height: 44px; margin-bottom: 13px; }

/* ============================================================ 断网提示 */

.net-banner {
  position: fixed; z-index: 2500; left: 50%; top: -60px;
  transform: translateX(-50%);
  padding: 10px 20px; border-radius: 0 0 11px 11px;
  background: var(--red); color: #fff; font-size: 13px;
  box-shadow: 0 8px 24px rgba(239, 90, 98, .3);
  transition: top .28s cubic-bezier(.3, .8, .4, 1);
}
.net-banner.show { top: 0; }

/* ====================================================== 侧边面板工具条 */

.panel-toolbar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.panel-search {
  flex: 1; min-width: 0; height: 32px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; font-size: 13px;
}
.panel-search:focus { outline: none; border-color: #9bbcff; background: #fff; }

.seg { display: inline-flex; padding: 2px; border-radius: 8px; background: #f1f4f9; }
.seg button {
  padding: 5px 13px; border-radius: 6px; background: transparent;
  font-size: 12px; color: #6b7890; cursor: pointer;
}
.seg button.active { background: #fff; color: var(--blue); box-shadow: 0 1px 3px rgba(26, 46, 80, .1); }
.panel-toolbar .btn.small:disabled { opacity: .45; cursor: not-allowed; }

/* 空状态里的可操作出口 */
.empty-state .empty-actions {
  display: flex; gap: 9px; justify-content: center; margin-top: 14px;
}
.empty-state .empty-actions .btn { height: 32px; padding: 0 14px; font-size: 13px; border-radius: 8px; }

/* ============================================= 真实素材上传 / 预览 */

.modal.asset-upload-modal,
.modal.asset-preview-modal {
  width: 640px; max-width: calc(100vw - 36px); padding: 26px;
}
.asset-upload-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.asset-upload-head h2 { margin: 0 0 7px; font-size: 19px; color: #17233c; }
.asset-upload-head p { margin: 0; color: #7a879b; font-size: 12.5px; line-height: 1.65; }
.modal-x {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 8px;
  background: #f2f5f9; color: #7e8b9e; font-size: 21px; line-height: 1; cursor: pointer;
}
.modal-x:hover { background: #e9eef6; color: #42516a; }
.asset-dropzone {
  min-height: 150px; padding: 24px; border: 1px dashed #aebfda; border-radius: 13px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: #f8faff; color: #4d5c74; cursor: pointer; transition: .18s ease;
}
.asset-dropzone:hover,
.asset-dropzone.dragging { border-color: var(--blue); background: #eff5ff; box-shadow: inset 0 0 0 1px rgba(40,104,235,.08); }
.asset-drop-icon { width: 42px; height: 42px; margin-bottom: 3px; border-radius: 12px; display: grid; place-items: center; color: var(--blue); background: #e8f0ff; }
.asset-drop-icon .ui-icon { width: 22px; height: 22px; }
.asset-dropzone b { font-size: 14px; color: #31405a; }
.asset-dropzone small { color: #8b98ab; font-size: 11.5px; }
.asset-upload-preview { margin-top: 14px; }
.asset-upload-preview:empty { display: none; }
.asset-upload-preview > img,
.asset-upload-preview > video {
  width: 150px; height: 86px; object-fit: cover; border-radius: 9px; background: #0d1c32; float: left; margin-right: 13px;
}
.asset-upload-preview::after { content: ''; display: table; clear: both; }
.asset-upload-file { min-height: 86px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.asset-upload-file b { color: #26344b; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-upload-file span { margin-top: 6px; color: #8190a8; font-size: 12px; }
.asset-upload-fields { margin-top: 17px; }
.asset-upload-fields select:disabled { color: #56647b; background: #f5f7fa; opacity: 1; }
.asset-file-state { margin: -2px 0 18px; color: #8491a4; font-size: 11.5px; }
.asset-upload-modal .modal-actions,
.asset-preview-modal .modal-actions { padding-top: 18px; border-top: 1px solid #edf1f6; }
.asset-upload-modal .modal-actions .btn { min-width: 112px; }
.asset-upload-modal .modal-actions .btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.asset-preview-stage { height: min(380px, 45vh); border-radius: 12px; overflow: hidden; background: #091528; }
.asset-preview-stage .library-media { width: 100%; height: 100%; }
.asset-preview-stage img,
.asset-preview-stage video { width: 100%; height: 100%; object-fit: contain; display: block; }
.asset-preview-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 2px; }
.asset-preview-meta span { max-width: 100%; padding: 5px 9px; border-radius: 6px; background: #f1f4f8; color: #6c7990; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* =============================================== 素材库真实媒体 */

.library-card {
  width: 100%; height: 228px; padding: 10px; overflow: hidden; color: inherit;
  text-align: left; cursor: pointer; background: #fff;
}
.library-card:hover { transform: translateY(-2px); border-color: #c4d5ef; box-shadow: 0 10px 26px rgba(35,64,112,.1); }
.library-card:focus-visible { outline: 2px solid #8eaff8; outline-offset: 3px; }
.library-preview { position: relative; height: 142px; }
.library-media,
.asset-media { position: relative; }
.library-media img,
.library-media video,
.asset-media img,
.asset-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: rgba(8,22,45,.62); backdrop-filter: blur(5px); box-shadow: 0 5px 16px rgba(0,0,0,.2);
}
.media-play .ui-icon { width: 16px; height: 16px; }
.library-card-body { padding: 10px 2px 0; min-width: 0; }
.library-card-body h4 { margin: 0 0 5px; font-size: 13px; color: #26344b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-card-body small { display: block; color: #7e8b9f; font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-card-body span { display: block; margin-top: 4px; color: #a0aabb; font-size: 10.5px; }
.asset-utility { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #6f83a7; }
.asset-utility small { color: #8d9bb0; font-size: 10px; }
.screen-photo img,
.ops-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ops-preview { background-image: none !important; }
.browser-storage { line-height: 1.45; }
.browser-storage b { color: #31415c; font-size: 15px; }
.browser-storage > span { color: #8190a8; }
.browser-storage .storage-count { display: block; margin-top: 5px; color: #9aa6b7; font-size: 10.5px; }
.asset-list { max-height: calc(100% - 132px); overflow-y: auto; scrollbar-width: thin; }

@media (max-width: 720px) {
  .modal-fields.two.asset-upload-fields { grid-template-columns: 1fr; }
  .asset-upload-preview > img,
  .asset-upload-preview > video { width: 112px; height: 72px; }
}
