.yx-dialog-root {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.yx-dialog-root[hidden] {
  display: none !important;
}

.yx-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 36, 68, 0.42);
  backdrop-filter: blur(2px);
}

.yx-dialog-panel {
  position: relative;
  width: min(100%, 420px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 36, 68, 0.22);
  border: 1px solid rgba(15, 79, 152, 0.12);
  overflow: hidden;
  animation: yx-dialog-in 0.18s ease-out;
}

@keyframes yx-dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.yx-dialog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 0;
}

.yx-dialog-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.yx-dialog-root[data-type="info"] .yx-dialog-icon,
.yx-dialog-root[data-type="success"] .yx-dialog-icon {
  background: #e8f5e9;
  color: #2e7d32;
}

.yx-dialog-root[data-type="error"] .yx-dialog-icon {
  background: #ffebee;
  color: #c62828;
}

.yx-dialog-root[data-type="warning"] .yx-dialog-icon,
.yx-dialog-root[data-type="confirm"] .yx-dialog-icon {
  background: #fff8e1;
  color: #f57f17;
}

.yx-dialog-root[data-type="prompt"] .yx-dialog-icon {
  background: #e3f2fd;
  color: #1565c0;
}

.yx-dialog-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1b2a45;
  line-height: 1.3;
}

.yx-dialog-body {
  padding: 14px 20px 20px;
}

.yx-dialog-message {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #42566f;
  white-space: pre-wrap;
  word-break: break-word;
}

.yx-dialog-input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #c5d4e8;
  border-radius: 8px;
  font-size: 15px;
  color: #1b2a45;
  background: #f8fbff;
}

.yx-dialog-input:focus {
  outline: none;
  border-color: #0f4f98;
  box-shadow: 0 0 0 3px rgba(15, 79, 152, 0.12);
}

.yx-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 20px 18px;
}

.yx-dialog-btn {
  min-width: 88px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #c5d4e8;
  background: #fff;
  color: #42566f;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.yx-dialog-btn:hover {
  background: #f3f7fc;
}

.yx-dialog-btn-primary {
  background: linear-gradient(180deg, #0f5ba8 0%, #0f4f98 100%);
  border-color: #0a396f;
  color: #fff;
}

.yx-dialog-btn-primary:hover {
  background: linear-gradient(180deg, #1268bc 0%, #0f5ba8 100%);
}

.yx-dialog-btn-danger {
  background: linear-gradient(180deg, #d32f2f 0%, #c62828 100%);
  border-color: #b71c1c;
  color: #fff;
}

.yx-dialog-btn-danger:hover {
  background: linear-gradient(180deg, #e53935 0%, #d32f2f 100%);
}

.yx-toast-root {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 13000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.yx-toast {
  min-width: 220px;
  max-width: min(92vw, 420px);
  padding: 12px 18px;
  border-radius: 10px;
  background: #1b2a45;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(15, 36, 68, 0.28);
  animation: yx-toast-in 0.2s ease-out;
  text-align: center;
}

.yx-toast[data-type="success"] {
  background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
}

.yx-toast[data-type="error"] {
  background: linear-gradient(135deg, #c62828 0%, #8e0000 100%);
}

.yx-toast[data-type="info"] {
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
}

@keyframes yx-toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
