/* Toast */
.toast-host { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast {
  min-width: 220px; max-width: 360px; padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--panel-3); color: var(--text); border: 1px solid var(--line-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); font-size: 13px;
  animation: toast-in 0.18s ease;
}
.toast.leaving { opacity: 0; transform: translateY(6px); transition: all 0.2s; }
.toast-error { border-color: rgba(255, 107, 115, 0.6); }
.toast-success { border-color: rgba(56, 199, 135, 0.6); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(6, 8, 12, 0.6);
  display: grid; place-items: center; padding: 20px; animation: fade 0.15s;
}
.modal {
  width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 20px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.modal-message { margin: 0 0 18px; font-size: 14px; line-height: 1.6; color: var(--text-2); white-space: pre-wrap; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Drawer */
.drawer-overlay { position: fixed; inset: 0; z-index: 95; background: rgba(6, 8, 12, 0.5); opacity: 0; transition: opacity 0.2s; }
.drawer-overlay.show, .drawer.open ~ .drawer-overlay { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 92vw; z-index: 96;
  background: var(--panel); border-left: 1px solid var(--line-strong);
  transform: translateX(100%); transition: transform 0.22s ease;
  display: flex; flex-direction: column; box-shadow: -16px 0 40px rgba(0, 0, 0, 0.4);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-title { font-size: 15px; }
.drawer-close { background: transparent; color: var(--muted); font-size: 16px; width: 30px; height: 30px; border-radius: 6px; }
.drawer-close:hover { background: var(--panel-2); color: var(--text); }
.drawer-body { padding: 16px 18px; overflow: auto; }
.drawer.open + .drawer-overlay, .drawer-overlay { pointer-events: auto; }
.drawer:not(.open) ~ .drawer-overlay { opacity: 0; pointer-events: none; }

/* key/value list */
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px 14px; margin: 0; }
.kv dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.kv dd { margin: 0; word-break: break-all; font-size: 13px; }
.kv dd .mono { font-size: 12px; }
