/* overlays.css — 右键菜单、对话框、通知、重启遮罩（Win10：直角、浅灰蓝 hover、灰底按钮区） */
.ctx-menu {
  position: fixed; z-index: 9800; min-width: 220px;
  max-height: calc(100vh - 8px); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  background: var(--menu-bg); color: var(--menu-fg);
  border: 1px solid var(--win-border); border-radius: 0;
  box-shadow: var(--shadow-pop); padding: 2px; font-size: 12px;
}
.ctx-item {
  position: relative; display: flex; align-items: center; gap: 10px;
  width: 100%; height: 30px; padding: 0 14px; border-radius: 0; text-align: left;
  white-space: nowrap;
}
.ctx-item:hover { background: var(--accent-soft); }
.ctx-item.danger { color: #e81123; }
.ctx-item.disabled { opacity: .45; pointer-events: none; }
.ctx-ico { width: 18px; display: flex; justify-content: center; flex: none; }
.ctx-label { flex: 1; }
.ctx-sub { display: flex; opacity: .7; }
.ctx-check { position: absolute; right: 8px; display: flex; color: var(--accent); }
.ctx-div { height: 1px; background: var(--win-border); margin: 3px 2px; }
.ctx-menu-sub {
  position: fixed; left: 0; top: 0; z-index: 9810;
  min-width: 170px; max-height: calc(100vh - 8px);
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  background: var(--menu-bg); color: var(--menu-fg);
  border: 1px solid var(--win-border); border-radius: 0;
  box-shadow: var(--shadow-pop); padding: 2px;
}

/* 对话框 */
.dlg-overlay {
  position: fixed; inset: 0; z-index: 9900;
  background: rgba(0, 0, 0, .35);
  display: flex; align-items: center; justify-content: center;
}
.dlg {
  width: 440px; max-width: 92vw;
  background: var(--win-bg); color: var(--win-fg);
  border: 1px solid var(--win-border); border-radius: 2px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, .45);
  overflow: hidden; animation: dlgIn .14s ease;
}
@keyframes dlgIn { from { transform: scale(.96); opacity: 0; } }
.dlg-titlebar { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 8px 16px; font-size: 13px; font-weight: 600; }
.dlg-x { width: 32px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 0; }
.dlg-x:hover { background: #E81123; color: #fff; }
.dlg-body { padding: 4px 18px 16px; font-size: 14px; max-height: 54vh; overflow: auto; }
.dlg-msg { line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.dlg-input {
  width: 100%; margin-top: 12px; padding: 7px 10px;
  border: 1px solid var(--btn-border); border-radius: 0;
  background: var(--win-bg); color: inherit; outline: none; font-size: 14px;
}
.dlg-input:focus { border-color: var(--accent); }
.dlg-conflict-list {
  margin-top: 10px; max-height: 170px; overflow: auto;
  border: 1px solid var(--win-border); border-radius: 0;
  padding: 6px 10px; font-size: 13px; opacity: .9;
}
.dlg-conflict-list div { padding: 2px 0; }
.dlg-btns {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 16px; flex-wrap: wrap;
  background: var(--dlg-btns-bg);
}
.dlg-btn {
  min-width: 90px; padding: 6px 14px; font-size: 12px;
  border: 1px solid var(--btn-border); border-radius: 0;
  background: var(--btn-bg); color: var(--win-fg);
}
.dlg-btn:hover { border-color: var(--accent); }
.dlg-btn.primary { background: var(--accent); border: 1px solid var(--accent); color: var(--on-accent); }
.dlg-btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.dlg-btn.danger { background: #E81123; border-color: #E81123; color: #fff; }
.dlg-btn.danger:hover { filter: brightness(1.12); }

/* 通知 toast：右下任务栏上方 */
#notify-toasts {
  position: fixed; right: 12px; bottom: calc(var(--taskbar-h, 40px) + 12px); z-index: 9600;
  display: flex; flex-direction: column; gap: 10px;
  width: 360px; max-width: 90vw;
}
.toast {
  display: flex; overflow: hidden;
  background: var(--menu-bg); color: var(--menu-fg);
  border: 1px solid var(--win-border); border-radius: 2px;
  box-shadow: var(--shadow-pop);
  transform: translateX(112%); transition: transform .3s ease;
}
.toast.in { transform: none; }
.toast-bar { width: 4px; flex: none; background: var(--accent); }
.toast-success .toast-bar { background: var(--success); }
.toast-warning .toast-bar { background: var(--warning); }
.toast-error .toast-bar { background: var(--error); }
.toast-body { flex: 1; padding: 10px 12px; min-width: 0; }
.toast-title { font-weight: 600; font-size: 13px; }
.toast-text { font-size: 12.5px; opacity: .85; margin-top: 2px; word-break: break-all; }
.toast-x { width: 34px; flex: none; display: flex; align-items: flex-start; justify-content: center; padding-top: 8px; }
.toast-x:hover { background: var(--menu-hover); }

/* 通知中心 */
#notify-center {
  position: fixed; top: 0; right: 0; bottom: var(--taskbar-h, 40px);
  width: 360px; max-width: 92vw; z-index: 6500;
  display: flex; flex-direction: column;
  background: var(--menu-bg); color: var(--menu-fg);
  border-left: 1px solid var(--win-border);
  box-shadow: -8px 0 30px rgba(0, 0, 0, .3);
  transform: translateX(106%); transition: transform .25s ease;
}
#notify-center.open { transform: none; }
.nc-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; font-size: 15px; font-weight: 600; }
#nc-clear { font-size: 12px; color: var(--accent); }
#nc-clear:hover { text-decoration: underline; }
.nc-list { flex: 1; overflow-y: auto; padding: 0 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.nc-item {
  border-left: 3px solid var(--accent);
  background: var(--win-bg); border-radius: 2px;
  padding: 9px 12px; box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}
.nc-item.nc-success { border-left-color: var(--success); }
.nc-item.nc-warning { border-left-color: var(--warning); }
.nc-item.nc-error { border-left-color: var(--error); }
.nc-title { font-size: 13px; font-weight: 600; }
.nc-text { font-size: 12.5px; opacity: .85; margin-top: 2px; word-break: break-all; }
.nc-time { font-size: 11px; opacity: .5; margin-top: 4px; }
.nc-empty { text-align: center; opacity: .5; margin-top: 60px; }

/* 重启遮罩 */
#restart-overlay {
  position: fixed; inset: 0; z-index: 11000;
  background: rgba(0, 18, 38, .92); color: #fff;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  font-size: 18px; font-weight: 300;
}
#restart-overlay.show { display: flex; }
.rs-spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .22); border-top-color: #fff;
  animation: rsSpin 1s linear infinite;
}
@keyframes rsSpin { to { transform: rotate(360deg); } }
