/* نوافذ وإشعارات ڤيتنا — تعمل في لوحة التحكم والشاشة والموقع (داكن/فاتح) */
.vd-bg { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 10, 12, .55); backdrop-filter: blur(4px); opacity: 0; transition: opacity .18s; }
.vd-bg.on { opacity: 1; }
.vd-box { width: min(420px, 100%); background: #fff; color: #17171A; border-radius: 22px; padding: 26px 24px 20px;
  text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.35); transform: translateY(14px) scale(.97); transition: transform .2s;
  font-family: inherit; }
.vd-bg.on .vd-box { transform: none; }
.vd-ic { width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 18px; display: grid; place-items: center;
  background: #FBF6CF; color: #7A6A00; }
.vd-danger .vd-ic { background: #FDECEC; color: #DC2626; }
.vd-warning .vd-ic, .vd-error .vd-ic { background: #FFF1DC; color: #C2650A; }
.vd-title { margin: 0 0 6px; font-size: 19px; font-weight: 700; }
.vd-text { margin: 0 0 20px; font-size: 15px; line-height: 1.75; color: #4b4b4f; white-space: pre-line; }
.vd-in { width: 100%; height: 48px; margin: -6px 0 18px; padding: 0 14px; border: 1px solid #ddd9cc; border-radius: 12px; font: 15px inherit; font-family: inherit; background: #fff; color: #17171A; }
.vd-in:focus { outline: 2px solid #E9DB5A; border-color: #E9DB5A; }
.vd-btns { display: flex; gap: 10px; }
.vd-btns button { flex: 1; height: 48px; border-radius: 14px; border: 0; font: 700 15px inherit; font-family: inherit; cursor: pointer; transition: filter .15s, transform .15s; }
.vd-btns button:hover { filter: brightness(.96); transform: translateY(-1px); }
.vd-ok { background: linear-gradient(135deg, #F2E777, #E9DB5A 50%, #CFBF34); color: #111; }
.vd-danger .vd-ok { background: #DC2626; color: #fff; }
.vd-cancel { background: #F1EFE8; color: #2b2b2f; }

/* الإشعارات: مكدّسة أعلى الصفحة في الوسط */
.vt-stack { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 1001; width: min(440px, calc(100% - 24px));
  display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.vt { position: relative; overflow: hidden; pointer-events: auto; display: flex; align-items: flex-start; gap: 12px;
  background: #fff; color: #17171A; border-radius: 16px; padding: 13px 14px 15px; box-shadow: 0 16px 44px rgba(0,0,0,.22);
  border-inline-start: 5px solid #16A34A; opacity: 0; transform: translateY(-12px); transition: opacity .22s, transform .22s; font-family: inherit; }
.vt.on { opacity: 1; transform: none; }
.vt-ic { width: 34px; height: 34px; flex: none; border-radius: 11px; display: grid; place-items: center; background: #E8F7EE; color: #16A34A; }
.vt-ic svg { width: 19px; height: 19px; }
.vt-error { border-inline-start-color: #DC2626; } .vt-error .vt-ic { background: #FDECEC; color: #DC2626; }
.vt-warning { border-inline-start-color: #D97706; } .vt-warning .vt-ic { background: #FFF1DC; color: #D97706; }
.vt-info { border-inline-start-color: #2563EB; } .vt-info .vt-ic { background: #E5EEFD; color: #2563EB; }
.vt-body { flex: 1; min-width: 0; padding-top: 6px; }
.vt-text { font-size: 14.5px; line-height: 1.6; font-weight: 600; white-space: pre-line; }
.vt-act { display: inline-flex; margin-top: 8px; padding: 6px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 700; text-decoration: none;
  background: linear-gradient(135deg, #F2E777, #E9DB5A 50%, #CFBF34); color: #111; }
.vt-x { flex: none; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: #8a8a8f; font-size: 20px; line-height: 1; cursor: pointer; }
.vt-x:hover { background: #F1EFE8; color: #17171A; }
.vt-side { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.vt-left { font-size: 11.5px; font-weight: 700; color: #8a8a8f; font-variant-numeric: tabular-nums; min-width: 28px; text-align: center; }
.vt.hold .vt-left { opacity: .45; }
.vt-bar { position: absolute; bottom: 0; inset-inline: 0; height: 3px; background: currentColor; opacity: .18; transform-origin: right;
  animation: vt-bar linear forwards; color: #16A34A; }
.vt-error .vt-bar { color: #DC2626; } .vt-warning .vt-bar { color: #D97706; } .vt-info .vt-bar { color: #2563EB; }
.vt.hold .vt-bar { animation-play-state: paused; }
@keyframes vt-bar { to { transform: scaleX(0); } }

/* الوضع الداكن (الموقع والشاشة) */
:root[data-theme="dark"] .vd-box, .vd-dark .vd-box, :root:not([data-theme="light"]) body.vd-darkui .vd-box { background: #1c1c1f; color: #f5f5f5; }
:root[data-theme="dark"] .vd-text, :root:not([data-theme="light"]) body.vd-darkui .vd-text { color: #c9c9cd; }
:root[data-theme="dark"] .vd-cancel, :root:not([data-theme="light"]) body.vd-darkui .vd-cancel { background: #2c2c30; color: #f0f0f0; }
:root:not([data-theme="light"]) body.vd-darkui .vt { background: #1f1f22; color: #f5f5f5; box-shadow: 0 16px 44px rgba(0,0,0,.55); }
:root:not([data-theme="light"]) body.vd-darkui .vt-x:hover { background: #2c2c30; color: #fff; }
